mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list@gmail.com>
To: Alan Tull <atull@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
	Moritz Fischer <mdf@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-fpga@vger.kernel.org
Subject: Re: [RFC 0/2] of: Add whitelist
Date: Wed, 6 Dec 2017 06:47:20 -0500	[thread overview]
Message-ID: <cd4e2601-56e7-ecf9-bbf1-ed6b03eedd84@gmail.com> (raw)
In-Reply-To: <CANk1AXSAdRT8WWg+xqCWGNYwO=4ke-74ETs+HNObcswEBmKz4g@mail.gmail.com>

On 12/05/17 11:55, Alan Tull wrote:
> On Thu, Nov 30, 2017 at 6:18 AM, Frank Rowand <frowand.list@gmail.com> wrote:
>> On 11/29/17 08:31, Rob Herring wrote:
>>> On Wed, Nov 29, 2017 at 3:20 AM, Frank Rowand <frowand.list@gmail.com> wrote:
>>>> On 11/27/17 15:58, Alan Tull wrote:
>>>>> Here's a proposal for a whitelist to lock down the dynamic device tree.
>>>>>
>>>>> For an overlay to be accepted, all of its targets are required to be
>>>>> on a target node whitelist.
>>>>>
>>>>> Currently the only way I have to get on the whitelist is calling a
>>>>> function to add a node.  That works for fpga regions, but I think
>>>>> other uses will need a way of having adding specific nodes from the
>>>>> base device tree, such as by adding a property like 'allow-overlay;'
>>>>> or 'allow-overlay = "okay";' If that is acceptable, I could use some
>>>>> advice on where that particular code should go.
>>>>>
>>>>> Alan
>>>>>
>>>>> Alan Tull (2):
>>>>>   of: overlay: add whitelist
>>>>>   fpga: of region: add of-fpga-region to whitelist
>>>>>
>>>>>  drivers/fpga/of-fpga-region.c |  9 ++++++
>>>>>  drivers/of/overlay.c          | 73 +++++++++++++++++++++++++++++++++++++++++++
>>>>>  include/linux/of.h            | 12 +++++++
>>>>>  3 files changed, 94 insertions(+)
>>>>>
>>>>
>>>> The plan was to use connectors to restrict where an overlay could be applied.
>>>> I would prefer not to have multiple methods for accomplishing the same thing
>>>> unless there is a compelling reason to do so.
>>>
>>> Connector nodes need a mechanism to enable themselves, too. I don't
>>> think connector nodes are going to solve every usecase.
>>>
>>> Rob
>>>
>>
>> The overlay code related to connectors does not exist yet, so my comment
>> is going to be theoretical.
>>
>> I would expect the overlay code to check that the target of the overlay
>> fragment is a connector node, so there is no need to explicitly "enable"
>> applying an overlay to a connector node.
> 
> This will depend on how connectors are implemented.  My proposal in v1
> is that device nodes can have a flag bit.  If its not set, then an
> overlay that contains fragments that target that node can't be
> applied.  There's probably other ways a connector node could be marked
> as different from other nodes, but a flag bit seems simple.  The
> advantage to this scheme is that it gives me something I can use while
> connectors don't exist yet and it will still will be useful later for
> the implementation of connectors (giving connector drivers a way of
> marking their device nodes as valid targets).

I think it is premature to add this code to the kernel when we don't
have an agreed upon architecture for what we are trying to achieve.


> 
>>
>> -Frank
> 

  reply	other threads:[~2017-12-06 11:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27 20:58 Alan Tull
2017-11-27 20:58 ` [RFC 1/2] of: overlay: add whitelist Alan Tull
2017-11-28 15:15   ` Rob Herring
2017-11-28 19:26     ` Alan Tull
2017-11-29  9:25       ` Frank Rowand
2017-11-27 20:58 ` [RFC 2/2] fpga: of region: add of-fpga-region to whitelist Alan Tull
2017-11-29  9:20 ` [RFC 0/2] of: Add whitelist Frank Rowand
2017-11-29 13:31   ` Rob Herring
2017-11-29 16:11     ` Alan Tull
2017-11-30 12:46       ` Frank Rowand
2017-12-05 16:33         ` Alan Tull
2017-12-06 11:56           ` Frank Rowand
2017-12-07 19:22             ` Alan Tull
2017-11-30 12:18     ` Frank Rowand
2017-12-05 16:55       ` Alan Tull
2017-12-06 11:47         ` Frank Rowand [this message]
2017-11-29 22:47   ` Frank Rowand
2017-11-30 14:39     ` Rob Herring
2017-12-06 11:44       ` Frank Rowand
2017-11-30  0:58   ` Frank Rowand

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=cd4e2601-56e7-ecf9-bbf1-ed6b03eedd84@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=atull@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mdf@kernel.org \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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

Powered by JetHome