devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Ayush Singh <ayush@beagleboard.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	xypron.glpk@gmx.de, Jason Kridner <jkridner@beagleboard.org>,
	Deepak Khatri <lorforlinux@beagleboard.org>,
	d-gole@ti.com, Robert Nelson <robertcnelson@beagleboard.org>,
	Andrew Davis <afd@ti.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	Pantelis Antoniou <pantelis.antoniou@gmail.com>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>
Subject: Re: [Question] Status of user-space dynamic overlays API
Date: Wed, 5 Mar 2025 15:31:13 +1100	[thread overview]
Message-ID: <Z8fTkTW-oTAT-NY4@zatzit> (raw)
In-Reply-To: <fed58d7b-d9af-402d-a215-a7e620239728@beagleboard.org>

[-- Attachment #1: Type: text/plain, Size: 2111 bytes --]

On Mon, Feb 24, 2025 at 03:39:41PM +0530, Ayush Singh wrote:
> On 2/24/25 14:07, Geert Uytterhoeven wrote:
> 
> > Hi Ayush,
> > 
> > On Sat, 22 Feb 2025 at 21:14, Ayush Singh <ayush@beagleboard.org> wrote:
> > > # Challenges
> > > 
> > > ## Security
> > > 
> > > The concerns regarding security seemed to show up in the other
> > > proposals. There was a proposal to have a devicetree property to
> > > allow/deny the application of overlays in some nodes, with default being
> > > deny. Was it insufficient?
> > This is the most important issue: using DT overlays, you can change
> > about anything.  There is no protection yet to limit this to e.g. the
> > expansion connectors on your board.
> > This is what the various WIP "connector" abstractions are trying
> > to solve.
> 
> Thanks for clarifying. However, as I mentioned above, there are usecases for
> dynamic overlays outside of connectors. Specifically, for the usecase of
> connecting random sensors to board pins. I do agree that any fairly well
> specified connector should probably have it's own drivers rather than using
> a generic userspace API.

I'm not sure that's just due to an insuffuciently broad conception of
what a "connector" might be.  Note that to justify a dynamic overlay
interface specifically you need to have *both*
  1) a need to update *anywhere* in the device tree and
  2) to do so at runtime, under userspace control

It's kind of hard to see why you'd need (2) in cases that don't at
some physical level involve a "connector".. in which case (1) is hard
to justify.

How are these sensors being connected to random board pins?  If it's
because those pins are exposed on some header, then it seems like it
ought to fall within the definition of a connector.  If someone is
just soldering onto them, it seems like an semi-permanent change that
would be better handled at boot time.

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2025-03-05  4:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-22 20:13 [Question] Status of user-space dynamic overlays API Ayush Singh
2025-02-22 20:31 ` Heinrich Schuchardt
2025-02-24  5:58   ` Ayush Singh
2025-02-24  8:37 ` Geert Uytterhoeven
2025-02-24 10:09   ` Ayush Singh
2025-02-24 13:29     ` Herve Codina
2025-03-05  4:31     ` David Gibson [this message]
2025-03-10  5:22       ` Ayush Singh
2025-03-05  4:27   ` David Gibson
2025-02-24 11:24 ` Luca Ceresoli
2025-04-30 10:18 ` Ayush Singh
2025-04-30 13:07   ` Luca Ceresoli

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=Z8fTkTW-oTAT-NY4@zatzit \
    --to=david@gibson.dropbear.id.au \
    --cc=afd@ti.com \
    --cc=ayush@beagleboard.org \
    --cc=d-gole@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jkridner@beagleboard.org \
    --cc=lorforlinux@beagleboard.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=pantelis.antoniou@gmail.com \
    --cc=robertcnelson@beagleboard.org \
    --cc=xypron.glpk@gmx.de \
    /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;
as well as URLs for NNTP newsgroup(s).