[PATCH] linux-user/elfload.c: Correction to HWCAP2 accessor

Jim MacArthur posted 1 patch 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260106-fix-hwcap2-sve2-v1-1-1d70dff63370@linaro.org
Maintainers: Laurent Vivier <laurent@vivier.eu>
linux-user/elfload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] linux-user/elfload.c: Correction to HWCAP2 accessor
Posted by Jim MacArthur 1 month ago
get_elf_hwcap was used when get_elf_hwcap2 should have been.

Fixes: fcac98d0ba8b ("linux-user: Remove ELF_HWCAP2")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3259
Signed-off-by: Jim MacArthur <jim.macarthur@linaro.org>
---
 linux-user/elfload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 0002d5be2f..35471c0c9a 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -708,7 +708,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
     NEW_AUX_ENT(AT_EXECFN, info->file_string);
 
     if (HAVE_ELF_HWCAP2) {
-        NEW_AUX_ENT(AT_HWCAP2, get_elf_hwcap(thread_cpu));
+        NEW_AUX_ENT(AT_HWCAP2, get_elf_hwcap2(thread_cpu));
     }
     if (u_base_platform) {
         NEW_AUX_ENT(AT_BASE_PLATFORM, u_base_platform);

---
base-commit: 0fc482b73d8e085d1375b4e17b0647fd2e6fe8f0
change-id: 20260106-fix-hwcap2-sve2-8ddbcf51b879

Best regards,
-- 
Jim MacArthur <jim.macarthur@linaro.org>
Re: [PATCH] linux-user/elfload.c: Correction to HWCAP2 accessor
Posted by Richard Henderson 1 month ago
On 1/7/26 02:40, Jim MacArthur wrote:
> get_elf_hwcap was used when get_elf_hwcap2 should have been.
> 
> Fixes: fcac98d0ba8b ("linux-user: Remove ELF_HWCAP2")
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3259
> Signed-off-by: Jim MacArthur <jim.macarthur@linaro.org>
> ---
>   linux-user/elfload.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/linux-user/elfload.c b/linux-user/elfload.c
> index 0002d5be2f..35471c0c9a 100644
> --- a/linux-user/elfload.c
> +++ b/linux-user/elfload.c
> @@ -708,7 +708,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
>       NEW_AUX_ENT(AT_EXECFN, info->file_string);
>   
>       if (HAVE_ELF_HWCAP2) {
> -        NEW_AUX_ENT(AT_HWCAP2, get_elf_hwcap(thread_cpu));
> +        NEW_AUX_ENT(AT_HWCAP2, get_elf_hwcap2(thread_cpu));
>       }
>       if (u_base_platform) {
>           NEW_AUX_ENT(AT_BASE_PLATFORM, u_base_platform);
> 
> ---
> base-commit: 0fc482b73d8e085d1375b4e17b0647fd2e6fe8f0
> change-id: 20260106-fix-hwcap2-sve2-8ddbcf51b879
> 
> Best regards,

Oops.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

And queued.


r~
Re: [PATCH] linux-user/elfload.c: Correction to HWCAP2 accessor
Posted by Philippe Mathieu-Daudé 1 month ago
On 6/1/26 16:40, Jim MacArthur wrote:
> get_elf_hwcap was used when get_elf_hwcap2 should have been.
> 
> Fixes: fcac98d0ba8b ("linux-user: Remove ELF_HWCAP2")
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3259
> Signed-off-by: Jim MacArthur <jim.macarthur@linaro.org>
> ---
>   linux-user/elfload.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>