Re: [PATCH v3 4/5] selftests/mseal: add more tests for mmap

2024-09-08 Thread Pedro Falcato
On Sat, Sep 07, 2024 at 08:27:52PM GMT, Lorenzo Stoakes wrote: > On Fri, Aug 30, 2024 at 04:57:26PM GMT, Jeff Xu wrote: > > On Fri, Aug 30, 2024 at 12:23 PM Lorenzo Stoakes > > wrote: > > > > > > On Fri, Aug 30, 2024 at 07:43:12PM GMT, Lorenzo Stoakes wrote: > > > > On Fri, Aug 30, 2024 at 06:02:3

Re: [PATCH v3 4/5] selftests/mseal: add more tests for mmap

2024-09-08 Thread Pedro Falcato
On Sun, Sep 8, 2024 at 10:35 PM Pedro Falcato wrote: > Hi, > > I agree with most of the points. Sitting down here to write unofficial > guidelines for mseal behavior. > > mseal should seal regions and mark them immutable, which means their > protection > and contents (i

Re: [PATCH v4 0/6] binfmt_elf: Support segments with 0 filesz and misaligned starts

2023-09-29 Thread Pedro Falcato
.dynamic .got .toc 04 .data .got.plt .bss 05 .dynamic 06 .data.rel.ro .dynamic .got .toc 07 .eh_frame_hdr 08 09 .note.gnu.build-id So on that end, you can take my Tested-by: Pedro Falcato Although this still doesn't address the other bug I found (https://gith

Re: [PATCH v4 1/6] binfmt_elf: Support segments with 0 filesz and misaligned starts

2023-09-29 Thread Pedro Falcato
On Fri, Sep 29, 2023 at 4:24 AM Kees Cook wrote: > > From: "Eric W. Biederman" > > Implement a helper elf_load() that wraps elf_map() and performs all > of the necessary work to ensure that when "memsz > filesz" the bytes > described by "memsz > filesz" are zeroed. > > An outstanding issue is if

Re: [PATCH v4 4/6] binfmt_elf: Use elf_load() for library

2023-09-29 Thread Pedro Falcato
On Fri, Sep 29, 2023 at 4:24 AM Kees Cook wrote: > > While load_elf_library() is a libc5-ism, we can still replace most of > its contents with elf_load() as well, further simplifying the code. While I understand you want to break as little as possible (as the ELF loader maintainer), I'm wondering

Re: [PATCH v3 1/1] mseal: update mseal.rst

2024-10-08 Thread Pedro Falcato
On Tue, Oct 8, 2024 at 5:09 AM wrote: > > From: Jeff Xu > > Update doc after in-loop change: mprotect/madvise can have > partially updated and munmap is atomic. > > Fix indentation and clarify some sections to improve readability. > > Signed-off-by: Jeff Xu Please reply to the points I raised:

Re: [PATCH v1 1/1] mseal: update mseal.rst

2024-10-04 Thread Pedro Falcato
On Mon, Sep 30, 2024 at 05:24:39PM -0700, Jeff Xu wrote: > Hi Pedro > > On Sat, Sep 28, 2024 at 6:43 AM Pedro Falcato wrote: > > > > On Fri, Sep 27, 2024 at 06:29:30PM GMT, Jeff Xu wrote: > > > Hi Pedro, > > > > > > On Fri, Sep

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 v1 1/2] mseal: Two fixes for madvise(MADV_DONTNEED) when sealed

2024-10-17 Thread Pedro Falcato
properly, or Andrew can pick it up, whatever floats people's boats. 8< >From dc5ec662dcb79156f4bdc1cba2a2575dce905ffa Mon Sep 17 00:00:00 2001 From: Pedro Falcato Date: Thu, 17 Oct 2024 20:21:10 +0100 Subject: [PATCH] mm/mseal: Disallow madvise discard on file-private seale

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 pr

Re: [PATCH v1 1/1] mseal: update mseal.rst

2024-09-28 Thread Pedro Falcato
On Fri, Sep 27, 2024 at 06:29:30PM GMT, Jeff Xu wrote: > Hi Pedro, > > On Fri, Sep 27, 2024 at 3:59 PM Pedro Falcato wrote: > > > + > > > + Blocked mm syscall: > > > + - munmap > > > + - mmap > > > + - mremap > &g

Re: [PATCH v1 1/1] mseal: update mseal.rst

2024-09-27 Thread Pedro Falcato
On Fri, Sep 27, 2024 at 06:52:09PM GMT, jef...@chromium.org wrote: > From: Jeff Xu > > Update doc after in-loop change: mprotect/madvise can have > partially updated and munmap is atomic. > > Fix indentation and clarify some sections to improve readability. > > Signed-off-by: Jeff Xu > --- >

Re: [RFC PATCH v5 0/7] mseal system mappings

2025-02-12 Thread Pedro Falcato
On Wed, Feb 12, 2025 at 11:25 AM Lorenzo Stoakes wrote: > > On Wed, Feb 12, 2025 at 03:21:48AM +, jef...@chromium.org wrote: > > From: Jeff Xu > > > > The commit message in the first patch contains the full description of > > this series. > > Sorry to nit, but it'd be useful to reproduce in t

Re: [PATCH v4 1/1] exec: seal system mappings

2025-01-16 Thread Pedro Falcato
On Thu, Jan 16, 2025 at 5:02 PM Benjamin Berg wrote: > > Hi Lorenzo, > > On Thu, 2025-01-16 at 15:48 +, Lorenzo Stoakes wrote: > > On Wed, Jan 15, 2025 at 12:20:59PM -0800, Jeff Xu wrote: > > > On Wed, Jan 15, 2025 at 11:46 AM Lorenzo Stoakes > > > wrote: > > > > [SNIP] > > > > > > > I've mad

Re: [RFC PATCH v5 0/7] mseal system mappings

2025-02-13 Thread Pedro Falcato
On Wed, Feb 12, 2025 at 2:02 PM Lorenzo Stoakes wrote: > > (sorry I really am struggling to reply to mail as lore still seems to be > broken). > > On Wed, Feb 12, 2025 at 12:37:50PM +, Pedro Falcato wrote: > > On Wed, Feb 12, 2025 at 11:25 AM Lorenzo Stoakes > >

Re: [PATCH v7 0/7] mseal system mappings

2025-02-24 Thread Pedro Falcato
On Mon, Feb 24, 2025 at 10:52 PM wrote: > > From: Jeff Xu > > This is V7 version, addressing comments from V6, without code logic > change. > > -- > > History: > V7: > - Remove cover letter from the first patch (Liam R. Howlett) > - Change macro n

Re: [RFC PATCH v5 0/7] mseal system mappings

2025-02-18 Thread Pedro Falcato
On Thu, Feb 13, 2025 at 8:47 PM Kees Cook wrote: > > On Thu, Feb 13, 2025 at 07:59:48PM +, Pedro Falcato wrote: > > On Wed, Feb 12, 2025 at 2:02 PM Lorenzo Stoakes > > wrote: > > > > > > (sorry I really am struggling to reply to mail as lore still seems

Re: [RFC PATCH v1 2/2] mseal: allow noop mprotect

2025-03-12 Thread Pedro Falcato
On Wed, Mar 12, 2025 at 3:28 PM Kees Cook wrote: > > > > On March 12, 2025 6:49:39 AM PDT, Lorenzo Stoakes > wrote: > >On Wed, Mar 12, 2025 at 12:21:17AM +, jef...@chromium.org wrote: > >> From: Jeff Xu > >> > >> Initially, when mseal was introduced in 6.10, semantically, when a VMA > >> wi