diff options
author | Will Deacon <[email protected]> | 2020-07-03 12:08:42 +0100 |
---|---|---|
committer | Will Deacon <[email protected]> | 2020-07-16 11:41:31 +0100 |
commit | 15956689a0e60aa0c795174f3c310b60d8794235 (patch) | |
tree | 7e7e6e911ca9ccbf33c0db2aaa54be3b59e022da /scripts/gcc-plugins/randomize_layout_plugin.c | |
parent | 3a5a4366cecc25daa300b9a9174f7fdd352b9068 (diff) |
arm64: compat: Ensure upper 32 bits of x0 are zero on syscall return
Although we zero the upper bits of x0 on entry to the kernel from an
AArch32 task, we do not clear them on the exception return path and can
therefore expose 64-bit sign extended syscall return values to userspace
via interfaces such as the 'perf_regs' ABI, which deal exclusively with
64-bit registers.
Explicitly clear the upper 32 bits of x0 on return from a compat system
call.
Cc: <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Keno Fischer <[email protected]>
Cc: Luis Machado <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions