diff mbox series

[v4,4/4] arm64: vdso32: enable orphan handling for VDSO

Message ID 20220414104611.17748-5-joey.gouly@arm.com (mailing list archive)
State New, archived
Headers show
Series Enable orphan-handling=warn for VDSO | expand

Commit Message

Joey Gouly April 14, 2022, 10:46 a.m. UTC
Like vmlinux, enable orphan-handling for the compat VDSO32. This can catch
subtle errors that might arise from unexpected sections being included.

Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Kees Cook <keescook@chromium.org>
---
 arch/arm64/kernel/vdso32/Makefile | 1 +
 1 file changed, 1 insertion(+)

Comments

Kees Cook April 14, 2022, 5:22 p.m. UTC | #1
On Thu, Apr 14, 2022 at 11:46:11AM +0100, Joey Gouly wrote:
> Like vmlinux, enable orphan-handling for the compat VDSO32. This can catch
> subtle errors that might arise from unexpected sections being included.
> 
> Signed-off-by: Joey Gouly <joey.gouly@arm.com>

Reviewed-by: Kees Cook <keescook@chromium.org>
Vincenzo Frascino April 19, 2022, 11:01 a.m. UTC | #2
On 4/14/22 11:46 AM, Joey Gouly wrote:
> Like vmlinux, enable orphan-handling for the compat VDSO32. This can catch
> subtle errors that might arise from unexpected sections being included.
> 
> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
> Cc: Kees Cook <keescook@chromium.org>

Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

> ---
>  arch/arm64/kernel/vdso32/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
> index ed181bedbffc..1bf0bfb99652 100644
> --- a/arch/arm64/kernel/vdso32/Makefile
> +++ b/arch/arm64/kernel/vdso32/Makefile
> @@ -104,6 +104,7 @@ VDSO_AFLAGS += -D__ASSEMBLY__
>  VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1
>  VDSO_LDFLAGS += -z max-page-size=4096 -z common-page-size=4096
>  VDSO_LDFLAGS += -shared --hash-style=sysv --build-id=sha1
> +VDSO_LDFLAGS += --orphan-handling=warn
>  
>  
>  # Borrow vdsomunge.c from the arm vDSO
diff mbox series

Patch

diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
index ed181bedbffc..1bf0bfb99652 100644
--- a/arch/arm64/kernel/vdso32/Makefile
+++ b/arch/arm64/kernel/vdso32/Makefile
@@ -104,6 +104,7 @@  VDSO_AFLAGS += -D__ASSEMBLY__
 VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1
 VDSO_LDFLAGS += -z max-page-size=4096 -z common-page-size=4096
 VDSO_LDFLAGS += -shared --hash-style=sysv --build-id=sha1
+VDSO_LDFLAGS += --orphan-handling=warn
 
 
 # Borrow vdsomunge.c from the arm vDSO