Linux 5.1-rc5
Linus Torvalds
torvalds at linux-foundation.org
Wed Apr 17 02:49:46 AEST 2019
On Tue, Apr 16, 2019 at 9:16 AM Linus Torvalds
<torvalds at linux-foundation.org> 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
<asm/pgtable.h>, 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 724 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20190416/c161cd37/attachment.bin>
More information about the Linuxppc-dev
mailing list