lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9619CDB8-59A1-4314-B4EA-10F51303A065@juniper.net>
Date: Tue, 6 Aug 2024 19:24:48 +0000
From: Brian Mak <makb@...iper.net>
To: Linus Torvalds <torvalds@...ux-foundation.org>
CC: "Eric W. Biederman" <ebiederm@...ssion.com>, Kees Cook <kees@...nel.org>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Christian Brauner
	<brauner@...nel.org>, Jan Kara <jack@...e.cz>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH v3] binfmt_elf: Dump smaller VMAs first in ELF cores

On Aug 6, 2024, at 11:33 AM, Linus Torvalds <torvalds@...ux-foundation.org> wrote:

> Hmm. Realistically we only dump core in ELF, and the order of the
> segments shouldn't matter.
> 
> But I wonder if we should do this in the ->core_dump() function
> itself, in case it would have mattered for other dump formats?
> 
> IOW, instead of being at the bottom of dump_vma_snapshot(), maybe the
> sorting should be at the top of elf_core_dump()?
> 
> And yes, in practice I doubt we'll ever have other dump formats, and
> no, a.out isn't doing some miraculous comeback either.
> 
> But I bet you didn't test elf_fdpic_core_dump() even if I bet it (a)
> works and (b) nobody cares.
> 
> So moving it to the ELF side might be conceptually the right thing to do?
> 
> (Or is there some reason it needs to be done at snapshot time that I
> just didn't fully appreciate?)

The main reason it was done at snapshot time was to make it so that it
works with other dump formats like ELF FDPIC (that being said, yes I
didn't explicitly test it). If another format is introduced and isn't
compatible with this type of reordering, then I think the introduction
of that format should be reconsidered for lack of flexibility, or if it
really must be introduced, then this logic can be changed at that time.

That being said, my opinion on this isn't too strong, so if you feel it
is better to have it in elf_core_dump, we can do that too. Since Eric
originally brought up placing it here, maybe he has his own opinions on
this as well.

Best,
Brian Mak

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ