[Acked] [PATCH][Bionic] UBUNTU: [Packaging] retpoline-extract: flag *0xNNN(%reg) branches

Andy Whitcroft apw at canonical.com
Mon Mar 5 12:42:14 UTC 2018


On Thu, Mar 01, 2018 at 11:54:34PM -0800, Steve Beattie wrote:
> 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/

Good catch.

Acked-by: Andy Whitcroft <apw at canonical.com>

-apw




More information about the kernel-team mailing list