* [PATCH] x86/kprobes: remove free_insn_page since it is same with the common weak function
@ 2021-06-01 4:08 Barry Song
2021-06-07 8:15 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Barry Song @ 2021-06-01 4:08 UTC (permalink / raw)
To: hpa, tglx, mingo, bp, x86; +Cc: linux-kernel, Barry Song
free_insn_page() in x86 is same with the common weak function in
kernel/kprobes.c. Plus, its comment "Recover page to RW mode before
releasing it" seems insensible to be there since resetting mapping
is done by common code in vfree() of module_memfree().
So drop the strong function and its comment in x86 totally.
Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
---
arch/x86/kernel/kprobes/core.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index d3d65545cb8b..3bce67d3a03c 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -422,12 +422,6 @@ void *alloc_insn_page(void)
return page;
}
-/* Recover page to RW mode before releasing it */
-void free_insn_page(void *page)
-{
- module_memfree(page);
-}
-
/* Kprobe x86 instruction emulation - only regs->ip or IF flag modifiers */
static void kprobe_emulate_ifmodifiers(struct kprobe *p, struct pt_regs *regs)
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/kprobes: remove free_insn_page since it is same with the common weak function
2021-06-01 4:08 [PATCH] x86/kprobes: remove free_insn_page since it is same with the common weak function Barry Song
@ 2021-06-07 8:15 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2021-06-07 8:15 UTC (permalink / raw)
To: Barry Song; +Cc: hpa, tglx, mingo, bp, x86, linux-kernel
On Tue, Jun 01, 2021 at 04:08:56PM +1200, Barry Song wrote:
> free_insn_page() in x86 is same with the common weak function in
> kernel/kprobes.c. Plus, its comment "Recover page to RW mode before
> releasing it" seems insensible to be there since resetting mapping
> is done by common code in vfree() of module_memfree().
> So drop the strong function and its comment in x86 totally.
>
> Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
It also is the same for s390, so please remove that as well and remove
the __weak.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-07 8:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 4:08 [PATCH] x86/kprobes: remove free_insn_page since it is same with the common weak function Barry Song
2021-06-07 8:15 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).