Re: [PATCH] linux-user: Fix parse_elf_properties GNU0_MAGIC check

2024-10-05 Thread Michael Tokarev
05.10.2024 19:48, Richard Henderson wrote: Comparing a string of 4 bytes only works in little-endian. Adjust bulk bswap to only apply to the note payload. Perform swapping of the note header manually; the magic is defined so that it does not need a runtime swap. I think this is more confusing

[PATCH] linux-user: Fix parse_elf_properties GNU0_MAGIC check

2024-10-05 Thread Richard Henderson
Comparing a string of 4 bytes only works in little-endian. Adjust bulk bswap to only apply to the note payload. Perform swapping of the note header manually; the magic is defined so that it does not need a runtime swap. Fixes: 83f990eb5adb ("linux-user/elfload: Parse NT_GNU_PROPERTY_TYPE_0 notes"