]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
UBUNTU: [Packaging] retpoline-extract: flag *0xNNN(%reg) branches
authorSteve Beattie <sbeattie@ubuntu.com>
Fri, 2 Mar 2018 07:54:34 +0000 (23:54 -0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 5 Apr 2018 08:41:57 +0000 (10:41 +0200)
BugLink: http://bugs.launchpad.net/bugs/1758856
Catch indirect jmps and calls of the form 'jmp  *0xNNNN(%reg)'.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
debian/scripts/retpoline-extract

index 5baa35e74cc54bcf67d306dfc08c9884703281f9..83cbc9e502115f57f8fa7d925b5a8808a54f2acb 100755 (executable)
@@ -9,6 +9,6 @@ cd "$1" || exit 1
 awk -F'        ' '
        /^.\//                          { file=$1; sub(":.*", "", file); sub("^.*/", "", file); }
        /^[0-9a-f][0-9a-f]* <.*>:/      { tag=$1; sub(".*<", "", tag); sub(">.*", "", tag); tag=file " " tag; }
-       $3 ~ /(call|jmp)q?  *\*%/       { print(tag " " $3); }
+       $3 ~ /(call|jmp)q?  *\*(0x[a-f0-9]+\()?%/       { print(tag " " $3); }
 ' | \
        grep -v " \*%cs:0x"             # elide 32bit code-segment absolute offsets.