From: Michael Ellerman <mpe@ellerman.id.au>
To: Kefeng Wang <wangkefeng.wang@huawei.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] mm: remove kern_addr_valid() completely
Date: Tue, 18 Oct 2022 20:45:46 +1100 [thread overview]
Message-ID: <87mt9tlb1x.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20221018074014.185687-1-wangkefeng.wang@huawei.com>
Kefeng Wang <wangkefeng.wang@huawei.com> writes:
> Most architectures(except arm64/x86/sparc) simply return 1 for
> kern_addr_valid(), which is only used in read_kcore(), and it
> calls copy_from_kernel_nofault() which could check whether the
> address is a valid kernel address, so no need kern_addr_valid(),
> let's remove unneeded kern_addr_valid() completely.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> arch/alpha/include/asm/pgtable.h | 2 -
> arch/arc/include/asm/pgtable-bits-arcv2.h | 2 -
> arch/arm/include/asm/pgtable-nommu.h | 2 -
> arch/arm/include/asm/pgtable.h | 4 --
> arch/arm64/include/asm/pgtable.h | 2 -
> arch/arm64/mm/mmu.c | 47 -----------------------
> arch/arm64/mm/pageattr.c | 3 +-
> arch/csky/include/asm/pgtable.h | 3 --
> arch/hexagon/include/asm/page.h | 7 ----
> arch/ia64/include/asm/pgtable.h | 16 --------
> arch/loongarch/include/asm/pgtable.h | 2 -
> arch/m68k/include/asm/pgtable_mm.h | 2 -
> arch/m68k/include/asm/pgtable_no.h | 1 -
> arch/microblaze/include/asm/pgtable.h | 3 --
> arch/mips/include/asm/pgtable.h | 2 -
> arch/nios2/include/asm/pgtable.h | 2 -
> arch/openrisc/include/asm/pgtable.h | 2 -
> arch/parisc/include/asm/pgtable.h | 15 --------
> arch/powerpc/include/asm/pgtable.h | 7 ----
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
cheers
next prev parent reply other threads:[~2022-10-18 9:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 7:40 [PATCH] mm: remove kern_addr_valid() completely Kefeng Wang
2022-10-18 7:30 ` Geert Uytterhoeven
2022-10-18 8:03 ` Heiko Carstens
2022-10-18 8:09 ` Christoph Hellwig
2022-10-18 8:32 ` Helge Deller
2022-10-18 9:20 ` WANG Xuerui
2022-10-18 9:45 ` Michael Ellerman [this message]
2022-10-19 1:31 ` Guo Ren
2022-11-01 17:47 ` Catalin Marinas
2022-11-11 2:50 ` Palmer Dabbelt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mt9tlb1x.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=wangkefeng.wang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox