Re: [PATCH 0/2] shmem: fix faulting into a hole while it's punched, take 3

2014-07-22 Thread Hugh Dickins
On Tue, 22 Jul 2014, Sasha Levin wrote: > On 07/22/2014 04:07 AM, Hugh Dickins wrote: > > But there is one easy change which might do it: please would you try > > changing the TASK_KILLABLE a few lines above to TASK_UNINTERRUPTIBLE. > > That seems to have done the trick, everything works fine. Su

Re: [PATCH 0/2] shmem: fix faulting into a hole while it's punched, take 3

2014-07-22 Thread Sasha Levin
On 07/22/2014 04:07 AM, Hugh Dickins wrote: > But there is one easy change which might do it: please would you try > changing the TASK_KILLABLE a few lines above to TASK_UNINTERRUPTIBLE. That seems to have done the trick, everything works fine. Thanks, Sasha -- To unsubscribe from this list: sen

Re: [PATCH 0/2] shmem: fix faulting into a hole while it's punched, take 3

2014-07-22 Thread Hugh Dickins
On Tue, 22 Jul 2014, Vlastimil Babka wrote: > On 07/22/2014 12:06 PM, Vlastimil Babka wrote: > > So if this is true, the change to TASK_UNINTERRUPTIBLE will avoid the > > problem, but it would be nicer to keep the KILLABLE state. > > I think it could be done by testing if the wait queue still exist

Re: [PATCH 0/2] shmem: fix faulting into a hole while it's punched, take 3

2014-07-22 Thread Vlastimil Babka
On 07/22/2014 12:06 PM, Vlastimil Babka wrote: So if this is true, the change to TASK_UNINTERRUPTIBLE will avoid the problem, but it would be nicer to keep the KILLABLE state. I think it could be done by testing if the wait queue still exists and is the same, before attempting finish wait. If it

Re: [PATCH 0/2] shmem: fix faulting into a hole while it's punched, take 3

2014-07-22 Thread Vlastimil Babka
On 07/22/2014 10:07 AM, Hugh Dickins wrote: On Mon, 21 Jul 2014, Sasha Levin wrote: On 07/19/2014 07:44 PM, Hugh Dickins wrote: Otherwise, I've been unable to reproduce the shmem_fallocate hang. Great. Andrew, I think we can say that it's now safe to send 1/2 shmem: fix faulting into a hole,

Re: [PATCH 0/2] shmem: fix faulting into a hole while it's punched, take 3

2014-07-22 Thread Hugh Dickins
On Mon, 21 Jul 2014, Sasha Levin wrote: > On 07/19/2014 07:44 PM, Hugh Dickins wrote: > >> Otherwise, I've been unable to reproduce the shmem_fallocate hang. > > Great. Andrew, I think we can say that it's now safe to send > > 1/2 shmem: fix faulting into a hole, not taking i_mutex > > 2/2 shmem:

Re: [PATCH 0/2] shmem: fix faulting into a hole while it's punched, take 3

2014-07-21 Thread Sasha Levin
On 07/19/2014 07:44 PM, Hugh Dickins wrote: >> Otherwise, I've been unable to reproduce the shmem_fallocate hang. > Great. Andrew, I think we can say that it's now safe to send > 1/2 shmem: fix faulting into a hole, not taking i_mutex > 2/2 shmem: fix splicing from a hole while it's punched > on t

Re: [PATCH 0/2] shmem: fix faulting into a hole while it's punched, take 3

2014-07-19 Thread Hugh Dickins
On Fri, 18 Jul 2014, Sasha Levin wrote: > On 07/17/2014 12:12 PM, Sasha Levin wrote: > > On 07/17/2014 12:10 PM, Vlastimil Babka wrote: > >> > On 07/15/2014 12:28 PM, Hugh Dickins wrote: > >>> >> In the end I decided that we had better look at it as two problems, > >>> >> the trinity faulting starv

Re: [PATCH 0/2] shmem: fix faulting into a hole while it's punched, take 3

2014-07-18 Thread Sasha Levin
On 07/17/2014 12:12 PM, Sasha Levin wrote: > On 07/17/2014 12:10 PM, Vlastimil Babka wrote: >> > On 07/15/2014 12:28 PM, Hugh Dickins wrote: >>> >> In the end I decided that we had better look at it as two problems, >>> >> the trinity faulting starvation, and the indefinite punching loop, >>> >> so

Re: [PATCH 0/2] shmem: fix faulting into a hole while it's punched, take 3

2014-07-18 Thread Vlastimil Babka
On 07/18/2014 01:34 AM, Hugh Dickins wrote: > On Thu, 17 Jul 2014, Vlastimil Babka wrote: >> On 07/15/2014 12:28 PM, Hugh Dickins wrote: >> > In the end I decided that we had better look at it as two problems, >> > the trinity faulting starvation, and the indefinite punching loop, >> > so 1/2 and 2

Re: [PATCH 0/2] shmem: fix faulting into a hole while it's punched, take 3

2014-07-17 Thread Hugh Dickins
On Thu, 17 Jul 2014, Vlastimil Babka wrote: > On 07/15/2014 12:28 PM, Hugh Dickins wrote: > > In the end I decided that we had better look at it as two problems, > > the trinity faulting starvation, and the indefinite punching loop, > > so 1/2 and 2/2 present both solutions: belt and braces. > > I

Re: [PATCH 0/2] shmem: fix faulting into a hole while it's punched, take 3

2014-07-17 Thread Sasha Levin
On 07/17/2014 12:10 PM, Vlastimil Babka wrote: > On 07/15/2014 12:28 PM, Hugh Dickins wrote: >> In the end I decided that we had better look at it as two problems, >> the trinity faulting starvation, and the indefinite punching loop, >> so 1/2 and 2/2 present both solutions: belt and braces. > > I

Re: [PATCH 0/2] shmem: fix faulting into a hole while it's punched, take 3

2014-07-17 Thread Vlastimil Babka
On 07/15/2014 12:28 PM, Hugh Dickins wrote: In the end I decided that we had better look at it as two problems, the trinity faulting starvation, and the indefinite punching loop, so 1/2 and 2/2 present both solutions: belt and braces. I tested that with my reproducer and it was OK, but as I alr

[PATCH 0/2] shmem: fix faulting into a hole while it's punched, take 3

2014-07-15 Thread Hugh Dickins
Hi Andrew, Here's my latest and hopefully last stab at fixing the trinity hole-punch starvation issue that became known as CVE-2014-4171. You may prefer to hear a testing update from Sasha and Vlastimil before paying any attention to these, or you may prefer to add them into mmotm for wider testi