[External] : Re: [PATCH] Documentation/arm64: update memory layout table.

Punit Agrawal punit.agrawal at bytedance.com
Wed Jul 20 06:57:56 PDT 2022


Apologies for reviving an old thread.

Catalin Marinas <catalin.marinas at arm.com> writes:

> On Tue, Jun 21, 2022 at 02:47:30PM +0000, Russell King wrote:
>> From: Catalin Marinas <catalin.marinas at arm.com>
>> > On Tue, Jun 21, 2022 at 10:16:51AM +0200, Andre Mueller wrote:
>> > > Commit b89ddf4cca43("arm64/bpf: Remove 128MB limit for BPF JIT programs")
>> > > removes the bpf jit region from the memory layout of the Aarch64
>> > > architecture. However, it forgets to update the documentation
>> > > accordingly.
>> > >
>> > > - Remove the bpf jit region.
>> > > - Fix the Start and End addresses of the modules region.
>> > > - Fix the Start address of the vmalloc region.
>> > >
>> > > Signed-off-by: Andre Mueller <am at emlix.com>
>> > 
>> > Acked-by: Catalin Marinas <catalin.marinas at arm.com>
>> > 
>> > but I still wonder whether we should remove this table altogether.
>> 
>> I've found the table particularly useful when wanting to know the
>> virtual address space layout, so it does seem to have some value.
>
> Yes but that's only one of the configurations and it keeps getting out
> of sync. We used to print the information at boot until commit
> 071929dbdd86 ("arm64: Stop printing the virtual memory layout"). I think
> we could bring some of that back, maybe even behind a debug command line
> option or config (or expose it via sysfs). We shouldn't print the info
> that has security implications like where stext is mapped or anything
> randomised, only the rough layout like in the doc.

The kernel memory layout is available (indirectly) from
/sys/kernel/debug/kernel_page_tables with CONFIG_PTDUMP_DEBUGFS
enabled. Admittedly, it requires a bit of staring to infer the start,
end and size of the various regions but the information is there.

Is that sufficient? If so, the documentation can be updated to point to
the debugfs node.

[...]



More information about the linux-arm-kernel mailing list