2018-12-10 22:34:34

by Nick Desaulniers

[permalink] [raw]
Subject: [PATCH] ARM: VDSO: Drop implicit common-page-size linker flag

GNU linker's -z common-page-size's default value is based on the target
architecture. arch/arm/vdso/Makefile sets it to the architecture
default, which is implicit and redundant. Drop it.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Nick Desaulniers <[email protected]>
---
arch/arm/vdso/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/vdso/Makefile b/arch/arm/vdso/Makefile
index f4efff9d3afb..8f2fac5acbc8 100644
--- a/arch/arm/vdso/Makefile
+++ b/arch/arm/vdso/Makefile
@@ -11,7 +11,7 @@ ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector
ccflags-y += -DDISABLE_BRANCH_PROFILING

VDSO_LDFLAGS := -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1
-VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
+VDSO_LDFLAGS += -Wl,-z,max-page-size=4096
VDSO_LDFLAGS += -nostdlib -shared
VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--build-id)
--
2.20.0.rc2.403.gdbc3b29805-goog



2019-01-14 21:52:03

by Nick Desaulniers

[permalink] [raw]
Subject: Re: [PATCH] ARM: VDSO: Drop implicit common-page-size linker flag

On Mon, Dec 10, 2018 at 2:32 PM <[email protected]> wrote:
>
> GNU linker's -z common-page-size's default value is based on the target
> architecture. arch/arm/vdso/Makefile sets it to the architecture
> default, which is implicit and redundant. Drop it.
>
> Link: https://lkml.kernel.org/r/[email protected]
> Signed-off-by: Nick Desaulniers <[email protected]>
> ---
> arch/arm/vdso/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/vdso/Makefile b/arch/arm/vdso/Makefile
> index f4efff9d3afb..8f2fac5acbc8 100644
> --- a/arch/arm/vdso/Makefile
> +++ b/arch/arm/vdso/Makefile
> @@ -11,7 +11,7 @@ ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector
> ccflags-y += -DDISABLE_BRANCH_PROFILING
>
> VDSO_LDFLAGS := -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1
> -VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
> +VDSO_LDFLAGS += -Wl,-z,max-page-size=4096
> VDSO_LDFLAGS += -nostdlib -shared
> VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
> VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--build-id)
> --
> 2.20.0.rc2.403.gdbc3b29805-goog
>

Bumping for review. This option has been removed from all other architectures.

--
Thanks,
~Nick Desaulniers

2019-04-24 07:39:28

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH] ARM: VDSO: Drop implicit common-page-size linker flag

On Mon, Dec 10, 2018 at 11:32 PM <[email protected]> wrote:
>
> GNU linker's -z common-page-size's default value is based on the target
> architecture. arch/arm/vdso/Makefile sets it to the architecture
> default, which is implicit and redundant. Drop it.
>
> Link: https://lkml.kernel.org/r/[email protected]
> Signed-off-by: Nick Desaulniers <[email protected]>
> ---

The patch looks good to me,

Acked-by: Arnd Bergmann <[email protected]>

Adding Nathan Lynch to Cc though for further comments, he originally
added the Makefile flags here and might still remember why he did it.

Unless Nathan objects, please add the patch to Russell's patch tracker.

> diff --git a/arch/arm/vdso/Makefile b/arch/arm/vdso/Makefile
> index f4efff9d3afb..8f2fac5acbc8 100644
> --- a/arch/arm/vdso/Makefile
> +++ b/arch/arm/vdso/Makefile
> @@ -11,7 +11,7 @@ ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector
> ccflags-y += -DDISABLE_BRANCH_PROFILING
>
> VDSO_LDFLAGS := -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1
> -VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
> +VDSO_LDFLAGS += -Wl,-z,max-page-size=4096
> VDSO_LDFLAGS += -nostdlib -shared
> VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
> VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--build-id)
> --
> 2.20.0.rc2.403.gdbc3b29805-goog
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

2019-04-24 14:01:26

by Nathan Lynch

[permalink] [raw]
Subject: Re: [PATCH] ARM: VDSO: Drop implicit common-page-size linker flag

Arnd Bergmann <[email protected]> writes:
> On Mon, Dec 10, 2018 at 11:32 PM <[email protected]> wrote:
>>
>> GNU linker's -z common-page-size's default value is based on the target
>> architecture. arch/arm/vdso/Makefile sets it to the architecture
>> default, which is implicit and redundant. Drop it.
>>
>> Link: https://lkml.kernel.org/r/[email protected]
>> Signed-off-by: Nick Desaulniers <[email protected]>
>> ---
>
> The patch looks good to me,
>
> Acked-by: Arnd Bergmann <[email protected]>
>
> Adding Nathan Lynch to Cc though for further comments, he originally
> added the Makefile flags here and might still remember why he did it.
>
> Unless Nathan objects, please add the patch to Russell's patch
> tracker.

Thanks for cc'ing me -- no objection.

Acked-by: Nathan Lynch <[email protected]>

2019-04-25 05:45:45

by Nick Desaulniers

[permalink] [raw]
Subject: Re: [PATCH] ARM: VDSO: Drop implicit common-page-size linker flag

On Wed, Apr 24, 2019 at 6:45 AM Nathan Lynch <[email protected]> wrote:
> Arnd Bergmann <[email protected]> writes:
> > Acked-by: Arnd Bergmann <[email protected]>
> Acked-by: Nathan Lynch <[email protected]>

https://www.armlinux.org.uk/developer/patches/viewpatch.php?id=8859/1
--
Thanks,
~Nick Desaulniers