Messages in this thread | ![/](/images/icornerl.gif) | | Date | Tue, 9 Apr 2024 19:14:15 -0400 | From | Steven Rostedt <> | Subject | Re: [POC][RFC][PATCH 2/2] pstore/ramoops: Add ramoops.mem_name= command line option |
| |
On Tue, 9 Apr 2024 15:18:45 -0700 Kees Cook <keescook@chromium.org> wrote:
> > @@ -914,6 +919,19 @@ static void __init ramoops_register_dummy(void) > > { > > struct ramoops_platform_data pdata; > > > > +#ifndef MODULE > > + /* Only allowed when builtin */ > > Why only when builtin?
Well, because the memory table that maps the found physical memory to a lable is marked as __initdata, and will not be available after boot. If you wanted it for a module, you would need some builtin code to find it.
> > > + if (mem_name) { > > + u64 start; > > + u64 size; > > + > > + if (memmap_named(mem_name, &start, &size)) { > > + mem_address = start; > > + mem_size = size; > > + } > > + } > > +#endif > > Otherwise this looks good, though I'd prefer some comments about what's > happening here. > > (And in retrospect, separately, I probably need to rename "dummy" to > "commandline" or something, since it's gathering valid settings here...)
Yeah, that was a bit confusing. I kept thinking "is this function stable?".
-- Steve
| ![\](/images/icornerr.gif) |