Re: [PATCH v2] kprobes: remove duplicated strong free_insn_page in x86 and s390

From: Heiko Carstens
Date: Mon Jun 07 2021 - 06:58:43 EST


On Mon, Jun 07, 2021 at 09:18:54PM +1200, Barry Song wrote:
> free_insn_page() in x86 and s390 are same with the common weak function
> in kernel/kprobes.c.
> Plus, the comment "Recover page to RW mode before releasing it" in x86
> seems insensible to be there since resetting mapping is done by common
> code in vfree() of module_memfree().
> So drop these two duplicated strong functions and related comment, then
> mark the common one in kernel/kprobes.c strong.
>
> Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>
> Signed-off-by: Barry Song <song.bao.hua@xxxxxxxxxxxxx>
> ---
> -v2:
> remove free_insn_page in s390 as well and remove the __weak in common
> code according to Christoph's comment;
>
> arch/s390/kernel/kprobes.c | 5 -----
> arch/x86/kernel/kprobes/core.c | 6 ------
> kernel/kprobes.c | 2 +-
> 3 files changed, 1 insertion(+), 12 deletions(-)

For the s390 part:
Acked-by: Heiko Carstens <hca@xxxxxxxxxxxxx>