diff options
author | Mark Brown <broonie@kernel.org> | 2024-12-14 02:12:06 +0000 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2024-12-20 14:12:04 +0000 |
commit | 926e862058978a8f81872845715d67ad21c30f65 (patch) | |
tree | 55f88204b611ebf0468f93f902e01bf7b245c984 /.editorconfig | |
parent | ce03573a1917532da06057da9f8e74a2ee9e2ac9 (diff) | |
download | lwn-926e862058978a8f81872845715d67ad21c30f65.tar.gz lwn-926e862058978a8f81872845715d67ad21c30f65.zip |
arm64/signal: Silence sparse warning storing GCSPR_EL0
We are seeing a sparse warning in gcs_restore_signal():
arch/arm64/kernel/signal.c:1054:9: sparse: sparse: cast removes address space '__user' of expression
when storing the final GCSPR_EL0 value back into the register, caused by
the fact that write_sysreg_s() casts the value it writes to a u64 which
sparse sees as discarding the __userness of the pointer.
Avoid this by treating the address as an integer, casting to a pointer only
when using it to write to userspace.
While we're at it also inline gcs_signal_cap_valid() into it's one user
and make equivalent updates to gcs_signal_entry().
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202412082005.OBJ0BbWs-lkp@intel.com/
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20241214-arm64-gcs-signal-sparse-v3-1-5e8d18fffc0c@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to '.editorconfig')
0 files changed, 0 insertions, 0 deletions