]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
arm64: vdso: Fix population of AT_SYSINFO_EHDR for compat vdso
authorVincenzo Frascino <vincenzo.frascino@arm.com>
Wed, 10 Jul 2019 14:01:19 +0000 (15:01 +0100)
committerWill Deacon <will@kernel.org>
Mon, 22 Jul 2019 09:33:42 +0000 (10:33 +0100)
commit85751e9e5b1480fc675106aeaf94fadb8028469b
tree1e957c725006511faccf784b35e7d16319678102
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b
arm64: vdso: Fix population of AT_SYSINFO_EHDR for compat vdso

Prior to the introduction of Unified vDSO support and compat layer for
vDSO on arm64, AT_SYSINFO_EHDR was not defined for compat tasks.
In the current implementation, AT_SYSINFO_EHDR is defined even if the
compat vdso layer is not built, which has been shown to break Android
applications using bionic:

 | 01-01 01:22:14.097   755   755 F libc    : Fatal signal 11 (SIGSEGV),
 | code 1 (SEGV_MAPERR), fault addr 0x3cf2c96c in tid 755 (cameraserver),
 | pid 755 (cameraserver)
 | 01-01 01:22:14.112   759   759 F libc    : Fatal signal 11 (SIGSEGV),
 | code 1 (SEGV_MAPERR), fault addr 0x3cf2c96c in tid 759
 | (android.hardwar), pid 759 (android.hardwar)
 | 01-01 01:22:14.120   756   756 F libc    : Fatal signal 11 (SIGSEGV)
 | code 1 (SEGV_MAPERR), fault addr 0x3cf2c96c in tid 756 (drmserver),
 | pid 756 (drmserver)

Restore the old behaviour by making sure that AT_SYSINFO_EHDR for compat
tasks is defined only when CONFIG_COMPAT_VDSO is enabled.

Reported-by: John Stultz <john.stultz@linaro.org>
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/elf.h