lkml.org 
[lkml]   [2020]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 4/5] binfmt_elf, binfmt_elf_fdpic: Use a VMA list snapshot
On Wed, Aug 26, 2020 at 8:15 AM Jann Horn <jannh@google.com> wrote:
>
> A downside of this approach is that we now need a bigger amount of kernel
> memory per userspace VMA in the normal ELF case, and that we need O(n)
> kernel memory in the FDPIC ELF case at all; but 40 bytes per VMA shouldn't
> be terribly bad.

So this looks much simpler now.

But it also makes it more obvious how that dump-size callback is kind
of pointless. Why does elf_fdpic have different heuristics than
regular elf? And not in meaningful ways - the heuristics look
basically identical, just with different logging and probably random
other differences that have mostly just grown over time.

So rather than the callback function pointer, I think you should just
copy the ELF version of the dump_size() logic, and get rid of a very
odd and strange callback.

But even in this form, at least this patch doesn't make the code look
_worse_ than it used to, so while I would like to see a further
cleanup I no longer dislike it.

Linus

\
 
 \ /
  Last update: 2020-08-26 19:16    [W:0.056 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site