mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
UPSTREAM: arm64: mm: Really fix sparse warning in untagged_addr()
(Upstream commit 9c1cac424c).
untagged_addr() can be called with a '__user' pointer parameter and must
therefore use '__force' casts both when passing this parameter through
to sign_extend64() as a 'u64', but also when casting the 's64' return
value back to the '__user' pointer type.
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Bug: 135692346
Change-Id: I8806aa6911cda3ab0489dff59b75ae214b02d48e
This commit is contained in:
committed by
Alistair Delva
parent
fc8246889d
commit
86794180e2
@@ -217,7 +217,7 @@ static inline unsigned long kaslr_offset(void)
|
||||
* pass on to access_ok(), for instance.
|
||||
*/
|
||||
#define untagged_addr(addr) \
|
||||
((__typeof__(addr))sign_extend64((__force u64)(addr), 55))
|
||||
((__force __typeof__(addr))sign_extend64((__force u64)(addr), 55))
|
||||
|
||||
#ifdef CONFIG_KASAN_SW_TAGS
|
||||
#define __tag_shifted(tag) ((u64)(tag) << 56)
|
||||
|
||||
Reference in New Issue
Block a user