Re: [PATCH v1 1/2] mseal: Two fixes for madvise(MADV_DONTNEED) when sealed

2024-10-23 Thread Jeff Xu
Hi Vlastimil On Tue, Oct 22, 2024 at 8:55 AM Vlastimil Babka wrote: > > On 10/17/24 22:57, Jeff Xu wrote: > > On Thu, Oct 17, 2024 at 1:49 PM Pedro Falcato > > wrote: > >> > > >> > > > For file-backed, private, read-only memory mappings, we previously > >> > > > did > >> > > > not block the ma

Re: [PATCH v1 1/2] mseal: Two fixes for madvise(MADV_DONTNEED) when sealed

2024-10-22 Thread Theo de Raadt
Vlastimil Babka wrote: > On 10/17/24 22:57, Jeff Xu wrote: > > On Thu, Oct 17, 2024 at 1:49 PM Pedro Falcato > > wrote: > >> > > >> > > > For file-backed, private, read-only memory mappings, we previously > >> > > > did > >> > > > not block the madvise(MADV_DONTNEED). This was based on > >> >

Re: [PATCH v1 1/2] mseal: Two fixes for madvise(MADV_DONTNEED) when sealed

2024-10-22 Thread Vlastimil Babka
On 10/17/24 22:57, Jeff Xu wrote: > On Thu, Oct 17, 2024 at 1:49 PM Pedro Falcato wrote: >> > >> > > > For file-backed, private, read-only memory mappings, we previously did >> > > > not block the madvise(MADV_DONTNEED). This was based on >> > > > the assumption that the memory's content, being fi

Re: [PATCH v1 1/2] mseal: Two fixes for madvise(MADV_DONTNEED) when sealed

2024-10-20 Thread kernel test robot
d/20241017-085203 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20241017005105.3047458-2-jeffxu%40chromium.org patch subject: [PATCH v1 1/2] mseal: Two fixes for madvise(MADV_DONTNEED) when sealed config: i386-defconf

Re: [PATCH v1 1/2] mseal: Two fixes for madvise(MADV_DONTNEED) when sealed

2024-10-20 Thread kernel test robot
d/20241017-085203 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20241017005105.3047458-2-jeffxu%40chromium.org patch subject: [PATCH v1 1/2] mseal: Two fixes for madvise(MADV_DONTNEED) when sealed config: i386-allnoconf

Re: [PATCH v1 1/2] mseal: Two fixes for madvise(MADV_DONTNEED) when sealed

2024-10-17 Thread Jeff Xu
On Thu, Oct 17, 2024 at 1:49 PM Pedro Falcato wrote: > > On Thu, Oct 17, 2024 at 01:34:53PM -0700, Jeff Xu wrote: > > Hi Pedro > > > > On Thu, Oct 17, 2024 at 12:37 PM Pedro Falcato > > wrote: > > > > > > > For PROT_NONE mappings, the previous blocking of > > > > madvise(MADV_DONTNEED) is unnece

Re: [PATCH v1 1/2] mseal: Two fixes for madvise(MADV_DONTNEED) when sealed

2024-10-17 Thread Pedro Falcato
On Thu, Oct 17, 2024 at 01:34:53PM -0700, Jeff Xu wrote: > Hi Pedro > > On Thu, Oct 17, 2024 at 12:37 PM Pedro Falcato > wrote: > > > > > For PROT_NONE mappings, the previous blocking of > > > madvise(MADV_DONTNEED) is unnecessary. As PROT_NONE already prohibits > > > memory access, madvise(MADV

Re: [PATCH v1 1/2] mseal: Two fixes for madvise(MADV_DONTNEED) when sealed

2024-10-17 Thread Jeff Xu
Hi Pedro On Thu, Oct 17, 2024 at 12:37 PM Pedro Falcato wrote: > > > For PROT_NONE mappings, the previous blocking of > > madvise(MADV_DONTNEED) is unnecessary. As PROT_NONE already prohibits > > memory access, madvise(MADV_DONTNEED) should be allowed to proceed in > > order to free the page. > >

Re: [PATCH v1 1/2] mseal: Two fixes for madvise(MADV_DONTNEED) when sealed

2024-10-17 Thread Pedro Falcato
On Thu, Oct 17, 2024 at 12:51:04AM +, jef...@chromium.org wrote: > From: Jeff Xu > > Two fixes for madvise(MADV_DONTNEED) when sealed. > Please separate these fixes into two separate patches. > For PROT_NONE mappings, the previous blocking of > madvise(MADV_DONTNEED) is unnecessary. As PROT

Re: [PATCH v1 1/2] mseal: Two fixes for madvise(MADV_DONTNEED) when sealed

2024-10-17 Thread Lorenzo Stoakes
On Thu, Oct 17, 2024 at 12:51:04AM +, jef...@chromium.org wrote: > From: Jeff Xu > > Two fixes for madvise(MADV_DONTNEED) when sealed. > > For PROT_NONE mappings, the previous blocking of > madvise(MADV_DONTNEED) is unnecessary. As PROT_NONE already prohibits > memory access, madvise(MADV_DONT

[PATCH v1 1/2] mseal: Two fixes for madvise(MADV_DONTNEED) when sealed

2024-10-16 Thread jeffxu
From: Jeff Xu Two fixes for madvise(MADV_DONTNEED) when sealed. For PROT_NONE mappings, the previous blocking of madvise(MADV_DONTNEED) is unnecessary. As PROT_NONE already prohibits memory access, madvise(MADV_DONTNEED) should be allowed to proceed in order to free the page. For file-backed, p