Re: [PATCH] scripts/gdb: add mm introspection utils

From: Dmitrii Bundin
Date: Sat Dec 31 2022 - 12:14:46 EST


On Fri, Dec 30, 2022 at 11:07 PM Mike Rapoport <rppt@xxxxxxxxxx> wrote:
>
> The commit message does not mention it's x86-specific.
> Not sure how gdb scripts handle per-arch functionality, but at the very
> least this should be stated in the commit message.
>
Thanks for pointing this out. Will fix it. I put the command's code
under the if utils.is_target_arch("x86") ... else
gdb.GdbError("Virtual address translation is not supported for this
arch") as it's done in other scripts and have plans to implement the
same functionality for ARM in the foreseeable future.

On Fri, Dec 30, 2022 at 11:07 PM Mike Rapoport <rppt@xxxxxxxxxx> wrote:
> Any particular reason to make it ALL CAPS?
Actually, no. Do you propose to reformat the output with a lower case?

On Fri, Dec 30, 2022 at 11:07 PM Mike Rapoport <rppt@xxxxxxxxxx> wrote:
> What will happen here with 5-level paging?
This is safe to do since the PS bit of PML5/PML4 is reserved and it's
not possible that a 5 or 4 level entry maps a page.

On Fri, Dec 30, 2022 at 11:07 PM Mike Rapoport <rppt@xxxxxxxxxx> wrote:
> Please don't use magic numbers.
This was actually a page_offset_base in case the
CONFIG_DYNAMIC_MEMORY_LAYOUT option is disabled. Will fix it.