diff options
author | Mark Brown <broonie@kernel.org> | 2024-10-04 21:26:29 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2024-10-17 18:38:49 +0100 |
commit | 4e6e8c2b757f382684abc4765202cd25c221dea1 (patch) | |
tree | 2db900b84fb40120b1485a6690c1e26863b54ba9 /fs/binfmt_elf_fdpic.c | |
parent | 9852d85ec9d492ebef56dc5f229416c925758edc (diff) | |
download | lwn-4e6e8c2b757f382684abc4765202cd25c221dea1.tar.gz lwn-4e6e8c2b757f382684abc4765202cd25c221dea1.zip |
binfmt_elf: Wire up AT_HWCAP3 at AT_HWCAP4
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@kernel.org>
Acked-by: Kees Cook <kees@kernel.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/20241004-arm64-elf-hwcap3-v2-1-799d1daad8b0@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'fs/binfmt_elf_fdpic.c')
-rw-r--r-- | fs/binfmt_elf_fdpic.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index 4fe5bb9f1b1f..31d253bd3961 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c @@ -624,6 +624,12 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm, #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); NEW_AUX_ENT(AT_PHDR, exec_params->ph_addr); |