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-18 07:23:58
Also in: linux-api, linux-arch, linux-m68k, linux-mips, linux-mm, linux-riscv, linux-s390, linux-sh, linux-um, linuxppc-dev, lkml, sparclinux

On Fri, Feb 18, 2022 at 7:34 AM Christoph Hellwig [off-list ref] wrote:
quoted
+#include <asm-generic/access_ok.h>
Instead of the asm-generic games, shouldn't we just define access_ok in
<linux/uaccess.h> if not already defined by the architecture?
I tried, but couldn't actually make it work because asm/uaccess.h tends
to contain inline functions that rely on access_ok(). It could work once we
move all the high-level functions into linux/uaccess.h, but that would likely
require another long patch series.

One option that can work is to require architectures to have an
asm/access_ok.h header that gets included by linux/uaccess.h.
On most architectures, that would be redirected to
asm-generic/access_ok.h, as only ia64, x86, arm64 and um
need to override the definition.

      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