[PATCH][Bionic] UBUNTU: [Packaging] retpoline-extract: flag *0xNNN(%reg) branches
Steve Beattie
sbeattie at ubuntu.com
Fri Mar 2 07:54:34 UTC 2018
UBUNTU: [Packaging] retpoline-extract: flag *0xNNN(%reg) branches
Catch indirect jmps and calls of the form 'jmp *0xNNNN(%reg)'.
Signed-off-by: Steve Beattie <steve.beattie at canonical.com>
---
debian/scripts/retpoline-extract | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/debian/scripts/retpoline-extract b/debian/scripts/retpoline-extract
index 5baa35e74cc5..83cbc9e50211 100755
--- a/debian/scripts/retpoline-extract
+++ b/debian/scripts/retpoline-extract
@@ -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.
--
2.15.1
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20180301/10753c8a/attachment.sig>
More information about the kernel-team
mailing list