Re: Linux 5.1-rc5

2019-05-20 Thread Greg KH
On Thu, May 02, 2019 at 05:10:55PM +0200, Martin Schwidefsky wrote: > On Thu, 2 May 2019 16:31:10 +0200 > Greg KH wrote: > > > On Thu, May 02, 2019 at 04:17:58PM +0200, Martin Schwidefsky wrote: > > > On Thu, 2 May 2019 14:21:28 +0200 > > > Greg KH wrote: > > > > > > > On Mon, Apr 15, 2019

Re: Linux 5.1-rc5

2019-05-03 Thread Michael Ellerman
Greg KH writes: > On Mon, Apr 15, 2019 at 09:17:10AM -0700, Linus Torvalds wrote: >> On Sun, Apr 14, 2019 at 10:19 PM Christoph Hellwig >> wrote: >> > >> > Can we please have the page refcount overflow fixes out on the list >> > for review, even if it is after the fact? >> >> They were

Re: Linux 5.1-rc5

2019-05-02 Thread Christoph Hellwig
On Mon, Apr 15, 2019 at 09:17:10AM -0700, Linus Torvalds wrote: > I ruthlessly also entirely ignored MIPS, SH and sparc, since they seem > largely irrelevant, partly since even theoretically this whole issue > needs a _lot_ of memory. Adding the relevant people - while the might be irrelevant, at

Re: Linux 5.1-rc5

2019-05-02 Thread Martin Schwidefsky
On Thu, 2 May 2019 16:31:10 +0200 Greg KH wrote: > On Thu, May 02, 2019 at 04:17:58PM +0200, Martin Schwidefsky wrote: > > On Thu, 2 May 2019 14:21:28 +0200 > > Greg KH wrote: > > > > > On Mon, Apr 15, 2019 at 09:17:10AM -0700, Linus Torvalds wrote: > > > > On Sun, Apr 14, 2019 at 10:19 PM

Re: Linux 5.1-rc5

2019-05-02 Thread Greg KH
On Thu, May 02, 2019 at 04:17:58PM +0200, Martin Schwidefsky wrote: > On Thu, 2 May 2019 14:21:28 +0200 > Greg KH wrote: > > > On Mon, Apr 15, 2019 at 09:17:10AM -0700, Linus Torvalds wrote: > > > On Sun, Apr 14, 2019 at 10:19 PM Christoph Hellwig > > > wrote: > > > > > > > > Can we please

Re: Linux 5.1-rc5

2019-05-02 Thread Martin Schwidefsky
On Thu, 2 May 2019 14:21:28 +0200 Greg KH wrote: > On Mon, Apr 15, 2019 at 09:17:10AM -0700, Linus Torvalds wrote: > > On Sun, Apr 14, 2019 at 10:19 PM Christoph Hellwig > > wrote: > > > > > > Can we please have the page refcount overflow fixes out on the list > > > for review, even if it is

Re: Linux 5.1-rc5

2019-05-02 Thread Greg KH
On Mon, Apr 15, 2019 at 09:17:10AM -0700, Linus Torvalds wrote: > On Sun, Apr 14, 2019 at 10:19 PM Christoph Hellwig wrote: > > > > Can we please have the page refcount overflow fixes out on the list > > for review, even if it is after the fact? > > They were actually on a list for review long

Re: Linux 5.1-rc5

2019-04-23 Thread Linus Torvalds
On Tue, Apr 23, 2019 at 8:39 AM Martin Schwidefsky wrote: > > Ok, I added two patches for my s390/linux:features branch > > Martin Schwidefsky (2): > s390/mm: make the pxd_offset functions more robust > s390/mm: convert to the generic get_user_pages_fast code > > All code changes are

Re: Linux 5.1-rc5

2019-04-23 Thread Martin Schwidefsky
On Fri, 19 Apr 2019 10:27:17 -0700 Linus Torvalds wrote: > On Fri, Apr 19, 2019 at 6:33 AM Martin Schwidefsky > wrote: > > > > That problem got stuck in my head and I thought more about it. Why not > > emulate the static folding sequence in the s390 page table code? > > So this model seems

Re: Linux 5.1-rc5

2019-04-19 Thread Linus Torvalds
On Fri, Apr 19, 2019 at 6:33 AM Martin Schwidefsky wrote: > > That problem got stuck in my head and I thought more about it. Why not > emulate the static folding sequence in the s390 page table code? So this model seems much closer to what x86 does in its folding, where the pattern is basically

Re: Linux 5.1-rc5

2019-04-19 Thread Martin Schwidefsky
On Thu, 18 Apr 2019 20:41:44 +0200 Martin Schwidefsky wrote: > On Thu, 18 Apr 2019 08:49:32 -0700 > Linus Torvalds wrote: > > > On Thu, Apr 18, 2019 at 1:02 AM Martin Schwidefsky > > wrote: > > > > > > The problematic lines in the generic gup code are these three: > > > > > > 1845: pmdp =

Re: Linux 5.1-rc5

2019-04-18 Thread Martin Schwidefsky
On Thu, 18 Apr 2019 08:49:32 -0700 Linus Torvalds wrote: > On Thu, Apr 18, 2019 at 1:02 AM Martin Schwidefsky > wrote: > > > > The problematic lines in the generic gup code are these three: > > > > 1845: pmdp = pmd_offset(, addr); > > 1888: pudp = pud_offset(, addr); > > 1916: p4dp =

Re: Linux 5.1-rc5

2019-04-18 Thread Linus Torvalds
On Thu, Apr 18, 2019 at 1:02 AM Martin Schwidefsky wrote: > > The problematic lines in the generic gup code are these three: > > 1845: pmdp = pmd_offset(, addr); > 1888: pudp = pud_offset(, addr); > 1916: p4dp = p4d_offset(, addr); > > Passing the pointer of a *copy* of a page table entry

Re: Linux 5.1-rc5

2019-04-18 Thread Martin Schwidefsky
On Wed, 17 Apr 2019 09:57:01 -0700 Linus Torvalds wrote: > On Wed, Apr 17, 2019 at 1:02 AM Martin Schwidefsky > wrote: > > > > Grumpf, that does *not* work. For gup the table entries may be read only > > once. Now I remember why I open-coded p4d_offset, pud_offset and pmd_offset > > in

Re: Linux 5.1-rc5

2019-04-17 Thread Linus Torvalds
On Wed, Apr 17, 2019 at 1:02 AM Martin Schwidefsky wrote: > > Grumpf, that does *not* work. For gup the table entries may be read only > once. Now I remember why I open-coded p4d_offset, pud_offset and pmd_offset > in arch/s390/mm/gup.c, to avoid to read the table entries twice. > It will be hard

Re: Linux 5.1-rc5

2019-04-17 Thread Martin Schwidefsky
On Wed, 17 Apr 2019 09:46:37 +0200 Martin Schwidefsky wrote: > On Tue, 16 Apr 2019 09:49:46 -0700 > Linus Torvalds wrote: > > > 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

Re: Linux 5.1-rc5

2019-04-17 Thread Martin Schwidefsky
On Tue, 16 Apr 2019 09:49:46 -0700 Linus Torvalds wrote: > 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

Re: Linux 5.1-rc5

2019-04-16 Thread Linus Torvalds
On Tue, Apr 16, 2019 at 8:38 PM Michael Ellerman wrote: > > > That said, powerpc and s390 should at least look at maybe adding a > > check for the page ref in their gup paths too. Powerpc has the special > > gup_hugepte() case > > Which uses page_cache_add_speculative(), which handles the case of

Re: Linux 5.1-rc5

2019-04-16 Thread Michael Ellerman
[ Cc += Nick & Aneesh & Paul ] Linus Torvalds writes: > On Sun, Apr 14, 2019 at 10:19 PM Christoph Hellwig wrote: >> >> Can we please have the page refcount overflow fixes out on the list >> for review, even if it is after the fact? > > They were actually on a list for review long before the

Re: Linux 5.1-rc5

2019-04-16 Thread Linus Torvalds
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

Re: Linux 5.1-rc5

2019-04-16 Thread Linus Torvalds
On Tue, Apr 16, 2019 at 5:08 AM Martin Schwidefsky wrote: > > This is not nice, would a patch like the following be acceptable? Umm. 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

Re: Linux 5.1-rc5

2019-04-16 Thread Martin Schwidefsky
On Tue, 16 Apr 2019 11:09:06 +0200 Martin Schwidefsky wrote: > On Mon, 15 Apr 2019 09:17:10 -0700 > Linus Torvalds wrote: > > > On Sun, Apr 14, 2019 at 10:19 PM Christoph Hellwig > > wrote: > > > > > > Can we please have the page refcount overflow fixes out on the list > > > for review,

Re: Linux 5.1-rc5

2019-04-16 Thread Martin Schwidefsky
On Mon, 15 Apr 2019 09:17:10 -0700 Linus Torvalds wrote: > On Sun, Apr 14, 2019 at 10:19 PM Christoph Hellwig wrote: > > > > Can we please have the page refcount overflow fixes out on the list > > for review, even if it is after the fact? > > They were actually on a list for review long

Re: Linux 5.1-rc5

2019-04-15 Thread Linus Torvalds
On Sun, Apr 14, 2019 at 10:19 PM Christoph Hellwig wrote: > > Can we please have the page refcount overflow fixes out on the list > for review, even if it is after the fact? They were actually on a list for review long before the fact, but it was the security mailing list. The issue actually got