On Tue, Apr 16, 2019 at 9:16 AM Linus Torvalds wrote: > > We actually already *have* this function. > > It's called "gup_fast_permitted()" and it's used by x86-64 to verify > the proper address range. Exactly like s390 needs.. > > Could you please use that instead? IOW, something like the attached. Obviously untested. And maybe 'current' isn't declared in , in which case you'd need to modify it to instead make the inline function be "s390_gup_fast_permitted()" that takes a pointer to the mm, and do something like #define gup_fast_permitted(start, pages) \ s390_gup_fast_permitted(current->mm, start, pages) instead. But I think you get the idea.. Linus