Re: [PATCH] munmap sealed memory cause memory to split (bug)

2024-10-17 Thread Jeff Xu
On Thu, Oct 17, 2024 at 12:14 PM Pedro Falcato wrote: > > On Thu, Oct 17, 2024 at 09:20:20AM -0700, Jeff Xu wrote: > > On Thu, Oct 17, 2024 at 1:18 AM Lorenzo Stoakes > > wrote: > > > > > > NACK. Greg's bot got to it but... > > > > > > As per Greg's bot, no signed-off-by line. > > > > > Sorry for

Re: [PATCH] munmap sealed memory cause memory to split (bug)

2024-10-17 Thread Lorenzo Stoakes
On Thu, Oct 17, 2024 at 08:14:11PM +0100, Pedro Falcato wrote: > On Thu, Oct 17, 2024 at 09:20:20AM -0700, Jeff Xu wrote: > > On Thu, Oct 17, 2024 at 1:18 AM Lorenzo Stoakes > > wrote: > > > > > > NACK. Greg's bot got to it but... > > > > > > As per Greg's bot, no signed-off-by line. > > > > > Sor

Re: [PATCH] munmap sealed memory cause memory to split (bug)

2024-10-17 Thread Pedro Falcato
On Thu, Oct 17, 2024 at 09:20:20AM -0700, Jeff Xu wrote: > On Thu, Oct 17, 2024 at 1:18 AM Lorenzo Stoakes > wrote: > > > > NACK. Greg's bot got to it but... > > > > As per Greg's bot, no signed-off-by line. > > > Sorry for confusion, I wasn't meant to send this as a PATCH, but > reporting the iss

Re: [PATCH] munmap sealed memory cause memory to split (bug)

2024-10-17 Thread Jeff Xu
On Thu, Oct 17, 2024 at 1:18 AM Lorenzo Stoakes wrote: > > NACK. Greg's bot got to it but... > > As per Greg's bot, no signed-off-by line. > Sorry for confusion, I wasn't meant to send this as a PATCH, but reporting the issue. The diff was just sent as reference to repro the bug, and I forgot to r

Re: [PATCH] munmap sealed memory cause memory to split (bug)

2024-10-17 Thread Jeff Xu
On Wed, Oct 16, 2024 at 11:04 PM Greg KH wrote: > > On Thu, Oct 17, 2024 at 02:26:27AM +, jef...@chromium.org wrote: > > From: Jeff Xu > > > > It appears there is a regression on the latest mm, > > when munmap sealed memory, it can cause unexpected VMA split. > > E.g. repro use this test. > >

Re: [PATCH] munmap sealed memory cause memory to split (bug)

2024-10-17 Thread Lorenzo Stoakes
OK having said all of the below I think I know exactly what this is... When an munmap() operation aborts due to error it does not attempt to re-merge previously split VMAs so you might observe more splits than you expect. This is not a bug, it's expected behaviour. We do intend to address this go

Re: [PATCH] munmap sealed memory cause memory to split (bug)

2024-10-17 Thread Lorenzo Stoakes
On Thu, Oct 17, 2024 at 10:46:10AM +0100, Lorenzo Stoakes wrote: [snip] > Anyway, let's try to decode (please take this as input as to how you should > try to communicate these things): > > > So we start with a VMA like this: > > 012345678901 > > > We then seal the middle, starting at

Re: [PATCH] munmap sealed memory cause memory to split (bug)

2024-10-17 Thread Lorenzo Stoakes
Another thing about etiquette - sending a barely coherent _failing_ test with basically zero explanation as a... patch is NOT how to interact with the upstream community. The sensible, respectful and workable way of doing this is to send something like a [DISCUSSION] or something and say 'hey guys

Re: [PATCH] munmap sealed memory cause memory to split (bug)

2024-10-17 Thread Lorenzo Stoakes
NACK. Greg's bot got to it but... As per Greg's bot, no signed-off-by line. The subject should be something about adding a test. You later say you are somehow dependning on things (what?) to make this work but it's broken. Jeff - you're doing things that were raised on previous reviews as if we

Re: [PATCH] munmap sealed memory cause memory to split (bug)

2024-10-16 Thread Greg KH
On Thu, Oct 17, 2024 at 02:26:27AM +, jef...@chromium.org wrote: > From: Jeff Xu > > It appears there is a regression on the latest mm, > when munmap sealed memory, it can cause unexpected VMA split. > E.g. repro use this test. > --- > tools/testing/selftests/mm/mseal_test.c | 76 +++

Re: [PATCH] munmap sealed memory cause memory to split (bug)

2024-10-16 Thread Jeff Xu
On Wed, Oct 16, 2024 at 7:26 PM wrote: > > From: Jeff Xu > > It appears there is a regression on the latest mm, > when munmap seals memory, it can cause an unexpected VMA split. > E.g. repro use this test. It appears that this test has some dependency tests that haven't been merged, so can't be

[PATCH] munmap sealed memory cause memory to split (bug)

2024-10-16 Thread jeffxu
From: Jeff Xu It appears there is a regression on the latest mm, when munmap sealed memory, it can cause unexpected VMA split. E.g. repro use this test. --- tools/testing/selftests/mm/mseal_test.c | 76 + 1 file changed, 76 insertions(+) diff --git a/tools/testing/selfte