[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240409191415.5a7b445f@gandalf.local.home>
Date: Tue, 9 Apr 2024 19:14:15 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Kees Cook <keescook@...omium.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org, Masami
Hiramatsu <mhiramat@...nel.org>, Mark Rutland <mark.rutland@....com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Andrew Morton
<akpm@...ux-foundation.org>, "Liam R. Howlett" <Liam.Howlett@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>, Lorenzo Stoakes <lstoakes@...il.com>,
linux-mm@...ck.org, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar
<mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, Dave Hansen
<dave.hansen@...ux.intel.com>, x86@...nel.org, "H. Peter Anvin"
<hpa@...or.com>, Peter Zijlstra <peterz@...radead.org>, Tony Luck
<tony.luck@...el.com>, "Guilherme G. Piccoli" <gpiccoli@...lia.com>,
linux-hardening@...r.kernel.org, Guenter Roeck <linux@...ck-us.net>, Ross
Zwisler <zwisler@...gle.com>, wklin@...gle.com, Vineeth Remanan Pillai
<vineeth@...byteword.org>, Joel Fernandes <joel@...lfernandes.org>,
Suleiman Souhlal <suleiman@...gle.com>, Linus Torvalds
<torvalds@...uxfoundation.org>, Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>
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@...omium.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
Powered by blists - more mailing lists