[PATCH] arm64: Support running gen_vdso_offsets.sh with BSD userland.

Catalin Marinas catalin.marinas at arm.com
Tue Dec 15 07:41:04 EST 2020


On Mon, Dec 14, 2020 at 05:03:52PM +0900, John Millikin wrote:
> BSD sed ignores whitespace character escape sequences such as '\t' in
> the replacement string, causing this script to produce the following
> incorrect output:
> 
>   #define vdso_offset_sigtrampt0x089c
> 
> Changing the hard tab to ' ' causes both BSD and GNU dialects of sed
> to produce equivalent output.
> 
> Signed-off-by: John Millikin <john at john-millikin.com>
> ---
>  arch/arm64/kernel/vdso/gen_vdso_offsets.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kernel/vdso/gen_vdso_offsets.sh b/arch/arm64/kernel/
> vdso/gen_vdso_offsets.sh
> index 8b806eacd0a6..0387209d65b1 100755
> --- a/arch/arm64/kernel/vdso/gen_vdso_offsets.sh
> +++ b/arch/arm64/kernel/vdso/gen_vdso_offsets.sh
> @@ -13,4 +13,4 @@
>  
>  LC_ALL=C
>  sed -n -e 's/^00*/0/' -e \
> -'s/^\([0-9a-fA-F]*\) . VDSO_\([a-zA-Z0-9_]*\)$/\#define vdso_offset_\2\t0x\1/
> p'
> +'s/^\([0-9a-fA-F]*\) . VDSO_\([a-zA-Z0-9_]*\)$/\#define vdso_offset_\2 0x\1/p'
> --
> 2.24.3 (Apple Git-128)

I'm ok with the patch but could you please send it with git send-email?
More importantly, as text/plain as it arrived as html in my inbox and
the mailing list blocked it.

Thanks.

-- 
Catalin



More information about the linux-arm-kernel mailing list