diff options
author | Lukas Bulwahn <[email protected]> | 2022-02-01 15:40:55 +0100 |
---|---|---|
committer | Borislav Petkov <[email protected]> | 2022-04-04 20:08:26 +0200 |
commit | 944fad4583bc8a6d7dd80fbe39db50141da95793 (patch) | |
tree | 4498c6cd39e8b66a6230b41ef8ed9dc909ea1ff2 /arch/x86/platform/uv/uv_nmi.c | |
parent | 3123109284176b1532874591f7c81f3837bbdc17 (diff) |
x86/fault: Cast an argument to the proper address space in prefetch()
Commit in Fixes uses accessors based on the access mode, i.e., it
distinguishes its access if instr carries a user address or a kernel
address.
Since that commit, sparse complains about passing an argument without
__user annotation to get_user(), which expects a pointer of the __user
address space:
arch/x86/mm/fault.c:152:29: warning: incorrect type in argument 1 (different address spaces)
arch/x86/mm/fault.c:152:29: expected void const volatile [noderef] __user *ptr
arch/x86/mm/fault.c:152:29: got unsigned char *[assigned] instr
Cast instr to __user when accessing user memory.
No functional change. No change in the generated object code.
[ bp: Simplify commit message. ]
Fixes: 35f1c89b0cce ("x86/fault: Fix AMD erratum #91 errata fixup for user code")
Signed-off-by: Lukas Bulwahn <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'arch/x86/platform/uv/uv_nmi.c')
0 files changed, 0 insertions, 0 deletions