lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1811814.VLH7GnMWUR@devpool47.emlix.com>
Date: Wed, 18 Dec 2024 13:13:24 +0100
From: Rolf Eike Beer <eb@...ix.com>
To: Russell King <linux@...linux.org.uk>, Arnd Bergmann <arnd@...db.de>,
 Yuntao Liu <liuyuntao12@...wei.com>, Linus Walleij <linus.walleij@...aro.org>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm32: simplify ARM_MMU_KEEP usage

On Montag, 7. Oktober 2024 15:11:40 Mitteleuropäische Normalzeit Rolf Eike 
Beer wrote:
> All current users need to add a KEEP() around the argument so the value is
> actually kept, which doesn't feel very natural and is prone to upcoming bugs
> as the name suggests that this macro alone already keeps things. Move that
> directly into the definition.
> 
> Signed-off-by: Rolf Eike Beer <eb@...ix.com>
> ---

Ping?

> I'm unsure if ARM_MMU_DISCARD() needs the same treatment for the non-MMU
> case. I suspect noone has tried dead code elimination for non-MMU?
> 
>  arch/arm/include/asm/vmlinux.lds.h | 2 +-
>  arch/arm/kernel/vmlinux-xip.lds.S  | 2 +-
>  arch/arm/kernel/vmlinux.lds.S      | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/include/asm/vmlinux.lds.h
> b/arch/arm/include/asm/vmlinux.lds.h index d60f6e83a9f7..89697f204715
> 100644
> --- a/arch/arm/include/asm/vmlinux.lds.h
> +++ b/arch/arm/include/asm/vmlinux.lds.h
> @@ -19,7 +19,7 @@
>  #endif
> 
>  #ifdef CONFIG_MMU
> -#define ARM_MMU_KEEP(x)		x
> +#define ARM_MMU_KEEP(x)		KEEP(x)
>  #define ARM_MMU_DISCARD(x)
>  #else
>  #define ARM_MMU_KEEP(x)
> diff --git a/arch/arm/kernel/vmlinux-xip.lds.S
> b/arch/arm/kernel/vmlinux-xip.lds.S index 5eddb75a7174..f2e8d4fac068 100644
> --- a/arch/arm/kernel/vmlinux-xip.lds.S
> +++ b/arch/arm/kernel/vmlinux-xip.lds.S
> @@ -63,7 +63,7 @@ SECTIONS
>  	. = ALIGN(4);
>  	__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
>  		__start___ex_table = .;
> -		ARM_MMU_KEEP(KEEP(*(__ex_table)))
> +		ARM_MMU_KEEP(*(__ex_table))
>  		__stop___ex_table = .;
>  	}
> 
> diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
> index de373c6c2ae8..d592a203f9c6 100644
> --- a/arch/arm/kernel/vmlinux.lds.S
> +++ b/arch/arm/kernel/vmlinux.lds.S
> @@ -74,7 +74,7 @@ SECTIONS
>  	. = ALIGN(4);
>  	__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
>  		__start___ex_table = .;
> -		ARM_MMU_KEEP(KEEP(*(__ex_table)))
> +		ARM_MMU_KEEP(*(__ex_table))
>  		__stop___ex_table = .;
>  	}


-- 
Rolf Eike Beer

emlix GmbH
Headquarters: Berliner Str. 12, 37073 Göttingen, Germany
Phone +49 (0)551 30664-0, e-mail info@...ix.com
District Court of Göttingen, Registry Number HR B 3160
Managing Directors: Heike Jordan, Dr. Uwe Kracke
VAT ID No. DE 205 198 055
Office Berlin: Panoramastr. 1, 10178 Berlin, Germany
Office Bonn: Bachstr. 6, 53115 Bonn, Germany
http://www.emlix.com

emlix - your embedded Linux partner
Download attachment "signature.asc" of type "application/pgp-signature" (314 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ