Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/vdso: Add __user annotation to VDSO32_SYMBOL

The address calculated by VDSO32_SYMBOL() is a pointer into
userland. Add the __user annotation to fix related sparse
warnings in its users.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Andy Lutomirski <luto@MIT.EDU>
Link: http://lkml.kernel.org/r/1346621506-30857-3-git-send-email-minipli@googlemail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Mathias Krause and committed by
Ingo Molnar
3d133406 f0002627

+2 -1
+2 -1
arch/x86/include/asm/vdso.h
··· 11 11 #define VDSO32_SYMBOL(base, name) \ 12 12 ({ \ 13 13 extern const char VDSO32_##name[]; \ 14 - (void *)(VDSO32_##name - VDSO32_PRELINK + (unsigned long)(base)); \ 14 + (void __user *)(VDSO32_##name - VDSO32_PRELINK + \ 15 + (unsigned long)(base)); \ 15 16 }) 16 17 #endif 17 18