On Wed, May 06, 2020 at 12:01:32PM -0700, Linus Torvalds wrote:
> Oh, absolutely. I did *NOT* mean that you'd use "unsafe_get_user()" as
> the actual interface. I just meant that as an implementation detail on
> x86, using "unsafe_get_user()" instead of "__get_user_size()"
> internally both simplif
On Wed, May 6, 2020 at 11:15 AM Christoph Hellwig wrote:
>
> That was the first prototype, and or x86 it works great, just the
> __user cases in maccess.c are a little ugly. And they point to
> the real problem - for architectures like sparc and s390 that use
> an entirely separate address space
On Wed, May 06, 2020 at 10:51:51AM -0700, Linus Torvalds wrote:
> My private tree no longer has those __get/put_user_size() things,
> because "unsafe_get/put_user()" is the only thing that remains with my
> conversion to asm goto.
>
> And we're actively trying to get rid of the whole __get_user()
On Tue, May 5, 2020 at 11:23 PM Christoph Hellwig wrote:
>
> +#define arch_kernel_read(dst, src, type, err_label)\
> + __get_user_size(*((type *)dst), (__force type __user *)src, \
> + sizeof(type), __kr_err);\
..
> +#defi
Provide arch_kernel_read and arch_kernel_write routines to implement the
maccess routines without messing with set_fs and without stac/clac that
opens up access to user space.
Signed-off-by: Christoph Hellwig
---
arch/x86/include/asm/uaccess.h | 16
1 file changed, 16 insertions