public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ayush Singh <ayush@beagleboard.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:27:43 +1100	[thread overview]
Message-ID: <Z8fSv2rwhMA06Uik@zatzit> (raw)
In-Reply-To: <CAMuHMdUhw6q1DAOBJwG5FJUs_QHj3hZMD3damOo2uLZQgS9e7A@mail.gmail.com>

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

On Mon, Feb 24, 2025 at 09:37:56AM +0100, 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.

Right.

> This is what the various WIP "connector" abstractions are trying
> to solve.

Exactly.

> > ## Memory Leaks
> >
> > Currently, updating/removing properties leaks memory. Was it one of the
> > reasons for the rejection of previous proposals?
> 
> IMO this is a minor issue. I am sure this can be improved upon.  We just
> need some way to keep track of which properties are part of the initial
> FDT (and thus can't be freed), and which were allocated dynamically.

Somewhat related to this, "unapplying" a DT overlay is not a natural
operation, but we need it for a sane update interface.  The normal way
of applying overlays is a lossy process.  Obviously, it's possible to
make it reversible by keeping around enough undo information, but it's
kind of a hack.

-- 
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
2025-03-10  5:22       ` Ayush Singh
2025-03-05  4:27   ` David Gibson [this message]
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=Z8fSv2rwhMA06Uik@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