On Tue, Oct 01, 2024 at 06:55:25PM GMT, chenqiwu wrote: > On Mon, Sep 30, 2024 at 11:05:26AM -0700, Andrew Morton wrote: > > > > We will want to see (and review) the code which calls this function and > > that code should be part of the mainline kernel tree. > > > The similar code can see perf_event_mmap_event() in kernel/events/core.c, > and current talking topic: > https://patchwork.kernel.org/project/linux-mm/patch/20240924074341.37272-1-qiwu.chen@xxxxxxxxxxxxx/ This doesn't explain why you're exporting things... I am very much not in favour of that, sorry. All the same objections apply as I said there. We already have dump_mm() for dumping this kind of thing, and yes that requires CONFIG_DEBUG_VM and yes I think that's valid. On panic it'd probably not be a great idea to try to take locks and walk this data which might be corrupted or otherwise unavailable, seems very risky to me. I don't really understand why you think this will help an unhandled page fault in init? But yeah I'm not in favour of this patch, still. Also please, please do not put VMA/mm-related code that iterate through VAMs etc. in random other files, they _all_ belong in mm files. I'll reply there I guess. > > Thanks > Qiwu >