lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51157F65.2050309@wwwdotorg.org>
Date:	Fri, 08 Feb 2013 15:42:45 -0700
From:	Stephen Warren <swarren@...dotorg.org>
To:	Grant Likely <grant.likely@...retlab.ca>
CC:	Rob Herring <robherring2@...il.com>, Michal Marek <mmarek@...e.cz>,
	Grant Likely <glikely@...retlab.ca>,
	Srinivas KANDAGATLA <srinivas.kandagatla@...com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Scott Wood <scottwood@...escale.com>,
	Sam Ravnborg <sam@...nborg.org>, linux-kernel@...r.kernel.org,
	devicetree-discuss@...ts.ozlabs.org,
	Stephen Warren <swarren@...dia.com>
Subject: Re: [PATCH V8] kbuild: create a rule to run the pre-processor on
 *.dts files

On 02/08/2013 03:04 PM, Grant Likely wrote:
> On Fri, 08 Feb 2013 15:24:25 -0600, Rob Herring <robherring2@...il.com> wrote:
>> On 02/08/2013 08:45 AM, Grant Likely wrote:
>>> On Tue,  5 Feb 2013 12:06:28 -0700, Stephen Warren <swarren@...dotorg.org> wrote:
>>>> From: Stephen Warren <swarren@...dia.com>
>>>>
>>>> Create cmd_dtc_cpp to run the C pre-processor on *.dts file before
>>>> passing them to dtc for final compilation. This allows the use of #define
>>>> and #include within the .dts file.
>>>>
>>>> Acked-by: Simon Glass <sjg@...omium.org>
>>>> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@...osoft.com>
>>>> Acked-by: Michal Marek <mmarek@...e.cz>
>>>> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@...com>
>>>> Signed-off-by: Stephen Warren <swarren@...dia.com>
>>>
>>> I've applied this and was going to push it out, but I've just thought of
>>> a problem that could be a show stopper. Once a dtsp file includes a C
>>> header, the contents of that header become part of the Device Tree ABI.
>>> If someone changes that file (ie. to renumber a series of #defines) then
>>> that will break the binding. We need a way to protect against that.
>>> Someone changing a .h file may make the assumption that it is only
>>> kernel internal and won't realize that it has external implications.
>>>
>>> I'm thinking that any dts includes need to be treated in the same way as
>>> userspace headers. We could put them into include/uapi and piggy back on
>>> the protection already afforded by that directory, or come up with
>>> something new. Any thoughts?
>>
>> Also, we would never be able to separate the dts files from the kernel
>> tree without some separation.
> 
> Good point. They better be in a completely separate directory then.

How about arch/*/include/dts/.

Both *.dts and kernel code will need to include those headers (so that
the kernel can parse the DTB using the same values), so putting the
headers right into arch/*/boot/dts/ or arch/*/boot/dts/include/ might
not make sense, since then that directory would still have to exist even
if/when the .dts files are separated from the kernel.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ