On Wed, Sep 26, 2018 at 11:49:52AM -0600, Jason Gunthorpe wrote: > On Wed, Sep 26, 2018 at 10:44:33AM -0700, Dennis Dalessandro wrote: > > > +/* platform specific: cacheless copy */ > > +static void cacheless_memcpy(void *dst, void *src, size_t n) > > +{ > > + /* > > + * Use the only available X64 cacheless copy. Add a __user cast > > + * to quiet sparse. The src agument is already in the kernel so > > + * there are no security issues. The extra fault recovery machinery > > + * is not invoked. > > + */ > > + __copy_user_nocache(dst, (void __user *)src, n, 0); > > +} > > No way you can call copy_user on kernel pointers. Test this with PTI > turned on and see it break. Sorry, it isn't PTI, it is 32 bit HIGHMEM that messes with this, and generally other things.. And doing this defeats SMAP as well. Just why? Jason