Thread (49 messages) 49 messages, 7 authors, 2023-11-07

Re: [PATCH v3 03/13] mm/execmem, arch: convert simple overrides of module_alloc to execmem

From: Mike Rapoport <rppt@kernel.org>
Date: 2023-10-05 14:48:39
Also in: bpf, linux-arm-kernel, linux-mips, linux-mm, linux-modules, linux-riscv, linux-s390, linux-trace-kernel, lkml, loongarch, netdev, sparclinux

On Wed, Oct 04, 2023 at 03:39:26PM +0000, Edgecombe, Rick P wrote:
On Tue, 2023-10-03 at 17:29 -0700, Rick Edgecombe wrote:
quoted
It seems a bit weird to copy all of this. Is it trying to be faster
or
something?

Couldn't it just check r->start in execmem_text/data_alloc() path and
switch to EXECMEM_DEFAULT if needed then? The execmem_range_is_data()
part that comes later could be added to the logic there too. So this
seems like unnecessary complexity to me or I don't see the reason.
I guess this is a bad idea because if you have the full size array
sitting around anyway you might as well use it and reduce the
exec_mem_alloc() logic.
That's was the idea, indeed. :)
Just looking at it from the x86 side (and
similar) though, where there is actually only one execmem_range and it
building this whole array with identical data and it seems weird.
Right, most architectures have only one range, but to support all variants
that we have, execmem has to maintain the whole array.

-- 
Sincerely yours,
Mike.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help