From: Thiago Jung Bauermann <bauerman@linux•vnet.ibm.com>
To: Samuel Mendoza-Jonas <sam@mendozajonas•com>
Cc: kexec@lists•infradead.org,
Stewart Smith <stewart@linux•vnet.ibm.com>,
Baoquan He <bhe@redhat•com>,
linuxppc-dev@lists•ozlabs.org, x86@kernel•org,
"H. Peter Anvin" <hpa@zytor•com>,
linux-kernel@vger•kernel.org, Ingo Molnar <mingo@redhat•com>,
Paul Mackerras <paulus@samba•org>,
Eric Biederman <ebiederm@xmission•com>,
Thomas Gleixner <tglx@linutronix•de>,
Dave Young <dyoung@redhat•com>,
Andrew Morton <akpm@linux-foundation•org>,
Vivek Goyal <vgoyal@redhat•com>
Subject: Re: [PATCH v5 11/13] powerpc: Allow userspace to set device tree properties in kexec_file_load
Date: Thu, 11 Aug 2016 21:54:02 -0300 [thread overview]
Message-ID: <1516604.QKHlMVtQ9l@hactar> (raw)
In-Reply-To: <1470962700.2570.6.camel@mendozajonas.com>
Hello Sam,
Thanks for the quick response.
Am Freitag, 12 August 2016, 10:45:00 schrieb Samuel Mendoza-Jonas:
> On Thu, 2016-08-11 at 20:08 -0300, Thiago Jung Bauermann wrote:
> > @@ -908,4 +909,245 @@ bool find_debug_console(const void *fdt, int
> > chosen_node) return false;
> > }
> >
> > +/**
> > + * struct allowed_node - a node in the whitelist and its allowed
> > properties. + * @name: node name or full node path
> > + * @properties: NULL-terminated array of names or
> > name=value pairs + *
> > + * If name starts with /, then the node has to be at the specified path
> > in + * the device tree (including unit addresses for all nodes in the
> > path). + * If it doesn't, then the node can be anywhere in the device
> > tree. + *
> > + * An entry in properties can specify a string value that the property
> > must + * have by using the "name=value" format. If the entry ends with
> > =, it means + * that the property must be empty.
> > + */
> > +static struct allowed_node {
> > + const char *name;
> > + const char *properties[9];
> > +} allowed_nodes[] = {
> > + {
> > + .name = "/chosen",
> > + .properties = {
> > + "stdout-path",
> > + "linux,stdout-path",
> > + NULL,
> > + }
> > + },
> > + {
> > + .name = "vga",
> > + .properties = {
> > + "device_type=display",
> > + "assigned-addresses",
> > + "width",
> > + "height",
> > + "depth",
> > + "little-endian=",
> > + "linux,opened=",
> > + "linux,boot-display=",ss
> > + NULL,
> > + }
> > + },
> > +};
>
> Hi Thiago,
>
> As much as this solves problems for *me*, I suspect adding 'vga' here
> might be the subject of some discussion. Having /chosen whitelisted makes
> sense on it's own, but 'vga' and its properties are very specific without
> much explanation.
>
> If everyone's happy to have it there, cool! If not, I have the majority
> of a patch that handles the original reason for these property updates
> separately in the kernel rather than from userspace. If needed I'll clean
> it up and we can handle it that way.
Ok, that's good to know. I'm fine with it either way. In any case, 'vga' in
this patch also serves a good real-life example of a non-trivial binding
outside of /chosen that we might want to whitelist in the future.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
next prev parent reply other threads:[~2016-08-12 0:54 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 23:08 [PATCH v5 00/13] kexec_file_load implementation for PowerPC Thiago Jung Bauermann
2016-08-11 23:08 ` [PATCH v5 01/13] kexec_file: Allow arch-specific memory walking for kexec_add_buffer Thiago Jung Bauermann
2016-08-13 6:56 ` Balbir Singh
2016-08-11 23:08 ` [PATCH v5 02/13] kexec_file: Change kexec_add_buffer to take kexec_buf as argument Thiago Jung Bauermann
2016-08-15 7:30 ` Balbir Singh
2016-08-15 14:49 ` Thiago Jung Bauermann
2016-08-16 6:15 ` Balbir Singh
2016-08-16 18:49 ` Thiago Jung Bauermann
2016-08-17 2:04 ` Balbir Singh
2016-08-11 23:08 ` [PATCH v5 03/13] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer Thiago Jung Bauermann
2016-08-11 23:08 ` [PATCH v5 04/13] powerpc: Factor out relocation code from module_64.c to elf_util_64.c Thiago Jung Bauermann
2016-08-15 7:46 ` Balbir Singh
2016-08-15 23:25 ` Thiago Jung Bauermann
2016-08-16 6:52 ` Balbir Singh
2016-08-23 3:01 ` Thiago Jung Bauermann
2016-08-23 3:21 ` Balbir Singh
2016-08-24 0:50 ` Oliver O'Halloran
2016-08-24 0:53 ` Thiago Jung Bauermann
2016-08-11 23:08 ` [PATCH v5 05/13] powerpc: Generalize elf64_apply_relocate_add Thiago Jung Bauermann
2016-08-11 23:08 ` [PATCH v5 06/13] powerpc: Adapt elf64_apply_relocate_add for kexec_file_load Thiago Jung Bauermann
2016-08-11 23:08 ` [PATCH v5 07/13] powerpc: Add functions to read ELF files of any endianness Thiago Jung Bauermann
2016-08-11 23:08 ` [PATCH v5 08/13] powerpc: Implement kexec_file_load Thiago Jung Bauermann
2016-08-11 23:08 ` [PATCH v5 09/13] powerpc: Add code to work with device trees in kexec_file_load Thiago Jung Bauermann
2016-08-11 23:08 ` [PATCH v5 10/13] powerpc: Add support for loading ELF kernels with kexec_file_load Thiago Jung Bauermann
2016-08-11 23:08 ` [PATCH v5 11/13] powerpc: Allow userspace to set device tree properties in kexec_file_load Thiago Jung Bauermann
2016-08-12 0:45 ` Samuel Mendoza-Jonas
2016-08-12 0:54 ` Thiago Jung Bauermann [this message]
2016-08-11 23:08 ` [PATCH v5 12/13] powerpc: Add purgatory for kexec_file_load implementation Thiago Jung Bauermann
2016-08-11 23:08 ` [PATCH v5 13/13] powerpc: Enable CONFIG_KEXEC_FILE in powerpc server defconfigs Thiago Jung Bauermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1516604.QKHlMVtQ9l@hactar \
--to=bauerman@linux$(echo .)vnet.ibm.com \
--cc=akpm@linux-foundation$(echo .)org \
--cc=bhe@redhat$(echo .)com \
--cc=dyoung@redhat$(echo .)com \
--cc=ebiederm@xmission$(echo .)com \
--cc=hpa@zytor$(echo .)com \
--cc=kexec@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=mingo@redhat$(echo .)com \
--cc=paulus@samba$(echo .)org \
--cc=sam@mendozajonas$(echo .)com \
--cc=stewart@linux$(echo .)vnet.ibm.com \
--cc=tglx@linutronix$(echo .)de \
--cc=vgoyal@redhat$(echo .)com \
--cc=x86@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox