Thread (75 messages) 75 messages, 14 authors, 2022-02-25

Re: [PATCH v2 13/18] uaccess: generalize access_ok()

From: Arnd Bergmann <arnd@kernel.org>
Date: 2022-02-24 08:41:58
Also in: linux-alpha, linux-api, linux-arch, linux-m68k, linux-mips, linux-mm, linux-riscv, linux-s390, linux-sh, linux-um, lkml, sparclinux

On Thu, Feb 24, 2022 at 9:29 AM Stafford Horne [off-list ref] wrote:
quoted
-
-#define access_ok(addr, size)                                                \
-({                                                                   \
-     __chk_user_ptr(addr);                                           \
-     __range_ok((unsigned long)(addr), (size));                      \
-})
+#include <asm-generic/access_ok.h>
I was going to ask why we are missing __chk_user_ptr in the generic version.
But this is basically now a no-op so I think its OK.
Correct, the type checking is implied by making __access_ok() an inline
function that takes a __user pointer.
Acked-by: Stafford Horne <shorne@gmail.com> [openrisc, asm-generic]
Thanks!

       Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help