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] [thread-next>] [day] [month] [year] [list]
Message-ID: <2e9e559e-82b3-4ba7-8316-a514abe9dd38@arm.com>
Date: Tue, 8 Oct 2024 12:33:18 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: Mark Brown <broonie@...nel.org>, Alexander Viro
 <viro@...iv.linux.org.uk>, Christian Brauner <brauner@...nel.org>,
 Jan Kara <jack@...e.cz>, Eric Biederman <ebiederm@...ssion.com>,
 Kees Cook <kees@...nel.org>, Catalin Marinas <catalin.marinas@....com>,
 Will Deacon <will@...nel.org>, Jonathan Corbet <corbet@....net>
Cc: linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org, Yury Khrustalev <yury.khrustalev@....com>,
 Wilco Dijkstra <wilco.dijkstra@....com>,
 linux-arm-kernel@...ts.infradead.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH RFC v2 1/2] binfmt_elf: Wire up AT_HWCAP3 at AT_HWCAP4



On 10/5/24 01:56, Mark Brown wrote:
> AT_HWCAP3 and AT_HWCAP4 were recently defined for use on PowerPC in commit
> 3281366a8e79 ("uapi/auxvec: Define AT_HWCAP3 and AT_HWCAP4 aux vector,
> entries"). Since we want to start using AT_HWCAP3 on arm64 add support for
> exposing both these new hwcaps via binfmt_elf.
> 
> Signed-off-by: Mark Brown <broonie@...nel.org>
> ---
>  fs/binfmt_elf.c        |  6 ++++++
>  fs/binfmt_elf_fdpic.c  |  6 ++++++
>  fs/compat_binfmt_elf.c | 10 ++++++++++
>  3 files changed, 22 insertions(+)
> 
> diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
> index 06dc4a57ba78a7939bbde96bf181eefa950ea13a..3039a6b7aba4bd38f26e21b626b579cc03f3a03e 100644
> --- a/fs/binfmt_elf.c
> +++ b/fs/binfmt_elf.c
> @@ -257,6 +257,12 @@ create_elf_tables(struct linux_binprm *bprm, const struct elfhdr *exec,
>  	NEW_AUX_ENT(AT_RANDOM, (elf_addr_t)(unsigned long)u_rand_bytes);
>  #ifdef ELF_HWCAP2
>  	NEW_AUX_ENT(AT_HWCAP2, ELF_HWCAP2);
> +#endif
> +#ifdef ELF_HWCAP3
> +	NEW_AUX_ENT(AT_HWCAP3, ELF_HWCAP3);
> +#endif
> +#ifdef ELF_HWCAP4
> +	NEW_AUX_ENT(AT_HWCAP4, ELF_HWCAP4);
>  #endif
>  	NEW_AUX_ENT(AT_EXECFN, bprm->exec);
>  	if (k_platform) {
> diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
> index 4fe5bb9f1b1f5e0be6e8d1ef5b20492935b90633..31d253bd3961a8679678c600f4346bba23502598 100644
> --- a/fs/binfmt_elf_fdpic.c
> +++ b/fs/binfmt_elf_fdpic.c
> @@ -623,6 +623,12 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
>  	NEW_AUX_ENT(AT_HWCAP,	ELF_HWCAP);
>  #ifdef ELF_HWCAP2
>  	NEW_AUX_ENT(AT_HWCAP2,	ELF_HWCAP2);
> +#endif
> +#ifdef ELF_HWCAP3
> +	NEW_AUX_ENT(AT_HWCAP3,	ELF_HWCAP3);
> +#endif
> +#ifdef ELF_HWCAP4
> +	NEW_AUX_ENT(AT_HWCAP4,	ELF_HWCAP4);
>  #endif
>  	NEW_AUX_ENT(AT_PAGESZ,	PAGE_SIZE);
>  	NEW_AUX_ENT(AT_CLKTCK,	CLOCKS_PER_SEC);
> diff --git a/fs/compat_binfmt_elf.c b/fs/compat_binfmt_elf.c
> index 8f0af4f626316ed2e92204ff9bf381cd14103ae9..d5ef5469e4e620f6ee97f40ce9cbbfa48e37e33c 100644
> --- a/fs/compat_binfmt_elf.c
> +++ b/fs/compat_binfmt_elf.c
> @@ -80,6 +80,16 @@
>  #define	ELF_HWCAP2		COMPAT_ELF_HWCAP2
>  #endif
>  
> +#ifdef	COMPAT_ELF_HWCAP3
> +#undef	ELF_HWCAP3
> +#define	ELF_HWCAP3		COMPAT_ELF_HWCAP3
> +#endif
> +
> +#ifdef	COMPAT_ELF_HWCAP4
> +#undef	ELF_HWCAP4
> +#define	ELF_HWCAP4		COMPAT_ELF_HWCAP4
> +#endif
> +
>  #ifdef	COMPAT_ARCH_DLINFO
>  #undef	ARCH_DLINFO
>  #define	ARCH_DLINFO		COMPAT_ARCH_DLINFO
> 

Reviewed-by: Anshuman Khandual <anshuman.khandual@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ