Thread (25 messages) flat view 25 messages, 11 authors, 2020-07-26

Re: [PATCH v2 1/3] module: Rename module_alloc() to text_alloc() and move to kernel proper

From: Masami Hiramatsu <mhiramat@kernel.org>
Date: 2020-07-15 05:50:27
Also in: linux-riscv

On Tue, 14 Jul 2020 10:03:45 -0400
Steven Rostedt [off-list ref] wrote:
On Tue, 14 Jul 2020 14:33:14 +0100
Mark Rutland [off-list ref] wrote:
quoted
quoted
Should work for all cases. Yes, we might then want something like a per
arch:

	{BPF,FTRACE,KPROBE}_TEXT_TYPE  
... at that point why not:

  text_alloc_ftrace();
  text_alloc_module();
  text_alloc_bpf();
  text_alloc_kprobe();
I don't know about bpf and kprobes, but for ftrace, the only place that
it allocates text happens to be in arch specific code.

If you want something special for ftrace, you could just add your own
function. But for x86, a text_alloc_immediate() would work.
(BTW, I like the function names over the enums)
kprobes will need the text_alloc_immediate() too, since it will use
the trampoline buffer where jumps to/from kernel code/modules.

Thanks,

-- 
Masami Hiramatsu [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help