[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240506141515.10fb2a69@gandalf.local.home>
Date: Mon, 6 May 2024 14:15:15 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Mike Rapoport <rppt@...nel.org>
Cc: linux-kernel@...r.kernel.org, Alexandre Ghiti <alexghiti@...osinc.com>,
Andrew Morton <akpm@...ux-foundation.org>, Björn Töpel
<bjorn@...nel.org>, Catalin Marinas <catalin.marinas@....com>, Christophe
Leroy <christophe.leroy@...roup.eu>, "David S. Miller"
<davem@...emloft.net>, Dinh Nguyen <dinguyen@...nel.org>, Donald Dutile
<ddutile@...hat.com>, Eric Chanudet <echanude@...hat.com>, Heiko Carstens
<hca@...ux.ibm.com>, Helge Deller <deller@....de>, Huacai Chen
<chenhuacai@...nel.org>, Kent Overstreet <kent.overstreet@...ux.dev>, Liviu
Dudau <liviu@...au.co.uk>, Luis Chamberlain <mcgrof@...nel.org>, Mark
Rutland <mark.rutland@....com>, Masami Hiramatsu <mhiramat@...nel.org>,
Michael Ellerman <mpe@...erman.id.au>, Nadav Amit <nadav.amit@...il.com>,
Palmer Dabbelt <palmer@...belt.com>, Peter Zijlstra <peterz@...radead.org>,
Philippe Mathieu-Daudé <philmd@...aro.org>, Rick
Edgecombe <rick.p.edgecombe@...el.com>, Russell King
<linux@...linux.org.uk>, Sam Ravnborg <sam@...nborg.org>, Song Liu
<song@...nel.org>, Thomas Bogendoerfer <tsbogend@...ha.franken.de>, Thomas
Gleixner <tglx@...utronix.de>, Will Deacon <will@...nel.org>,
bpf@...r.kernel.org, linux-arch@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-mips@...r.kernel.org,
linux-mm@...ck.org, linux-modules@...r.kernel.org,
linux-parisc@...r.kernel.org, linux-riscv@...ts.infradead.org,
linux-s390@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, loongarch@...ts.linux.dev,
netdev@...r.kernel.org, sparclinux@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH v8 06/17] mm: introduce execmem_alloc() and
execmem_free()
On Sun, 5 May 2024 17:25:49 +0300
Mike Rapoport <rppt@...nel.org> wrote:
> diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
> index 70139d9d2e01..c8ddb7abda7c 100644
> --- a/arch/x86/kernel/ftrace.c
> +++ b/arch/x86/kernel/ftrace.c
> @@ -25,6 +25,7 @@
> #include <linux/memory.h>
> #include <linux/vmalloc.h>
> #include <linux/set_memory.h>
> +#include <linux/execmem.h>
>
> #include <trace/syscall.h>
>
> @@ -261,15 +262,14 @@ void arch_ftrace_update_code(int command)
> #ifdef CONFIG_X86_64
>
> #ifdef CONFIG_MODULES
> -#include <linux/moduleloader.h>
> /* Module allocation simplifies allocating memory for code */
> static inline void *alloc_tramp(unsigned long size)
> {
> - return module_alloc(size);
> + return execmem_alloc(EXECMEM_FTRACE, size);
> }
> static inline void tramp_free(void *tramp)
> {
> - module_memfree(tramp);
> + execmem_free(tramp);
> }
> #else
> /* Trampolines can only be created if modules are supported */
> diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
Acked-by: Steven Rostedt (Google) <rostedt@...dmis.org>
-- Steve
Powered by blists - more mailing lists