kmsan: add missing __user tags
sparse complains that __user pointers are being passed to functions that expect non-__user ones. In all cases, these functions are in fact working with user pointers, only the tag is missing. Add it. Link: https://lkml.kernel.org/r/20240627145754.27333-2-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202406272033.KejtfLkw-lkp@intel.com/ Reviewed-by: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Marco Elver <elver@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
3a8f6f3b46
commit
b072880d69
@ -249,8 +249,8 @@ struct page *kmsan_vmalloc_to_page_or_null(void *vaddr)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void kmsan_internal_check_memory(void *addr, size_t size, const void *user_addr,
|
||||
int reason)
|
||||
void kmsan_internal_check_memory(void *addr, size_t size,
|
||||
const void __user *user_addr, int reason)
|
||||
{
|
||||
depot_stack_handle_t cur_origin = 0, new_origin = 0;
|
||||
unsigned long addr64 = (unsigned long)addr;
|
||||
|
@ -73,7 +73,7 @@ void kmsan_print_origin(depot_stack_handle_t origin);
|
||||
* @off_last corresponding to different @origin values.
|
||||
*/
|
||||
void kmsan_report(depot_stack_handle_t origin, void *address, int size,
|
||||
int off_first, int off_last, const void *user_addr,
|
||||
int off_first, int off_last, const void __user *user_addr,
|
||||
enum kmsan_bug_reason reason);
|
||||
|
||||
DECLARE_PER_CPU(struct kmsan_ctx, kmsan_percpu_ctx);
|
||||
@ -163,8 +163,8 @@ depot_stack_handle_t kmsan_internal_chain_origin(depot_stack_handle_t id);
|
||||
void kmsan_internal_task_create(struct task_struct *task);
|
||||
|
||||
bool kmsan_metadata_is_contiguous(void *addr, size_t size);
|
||||
void kmsan_internal_check_memory(void *addr, size_t size, const void *user_addr,
|
||||
int reason);
|
||||
void kmsan_internal_check_memory(void *addr, size_t size,
|
||||
const void __user *user_addr, int reason);
|
||||
|
||||
struct page *kmsan_vmalloc_to_page_or_null(void *vaddr);
|
||||
void kmsan_setup_meta(struct page *page, struct page *shadow,
|
||||
|
@ -148,7 +148,7 @@ void kmsan_print_origin(depot_stack_handle_t origin)
|
||||
}
|
||||
|
||||
void kmsan_report(depot_stack_handle_t origin, void *address, int size,
|
||||
int off_first, int off_last, const void *user_addr,
|
||||
int off_first, int off_last, const void __user *user_addr,
|
||||
enum kmsan_bug_reason reason)
|
||||
{
|
||||
unsigned long stack_entries[KMSAN_STACK_DEPTH];
|
||||
|
Loading…
Reference in New Issue
Block a user