On Wed, Sep 10, 2025 at 03:16:20PM +0530, Anshuman Khandual wrote:
> Enable early kernel page table dump for debug purpose when required through
> a new kernel command line option 'early_ptdump'. But first this reorganizes
> ptdump_init() separating out the debugfs creation, so that it can be called
> early on in setup_arch(). This also adds kernel dmesg console print support
> for existing pt_dump_seq_[printf|puts]() helpers.
>
> This series applies on v6.17-rc5
>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Ryan Roberts <ryan.roberts@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-efi@vger.kernel.org
I'm really not convinced this is particularly useful and I've certainly
never felt the need to have something like it. If you're debugging really
early page-table issues, why you want to rely on all the ptdump
infrastructure to get logs out?
On the other hand, if people do find this useful, then I think it should
be implemented in the core code rather than done behind its back in the
arch code.
Will