From: "Sascha Hauer" <s.hauer@pengutronix.de>
To: "Primoz Fiser" <primoz.fiser@norik.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 0/1] of_property: resolve phandles against the booted device tree
Date: Tue, 17 Nov 2026 08:44:30 +0000 [thread overview]
Message-ID: <a852661e-264f-4a3e-8f9a-c69868b4ae0d@pengutronix.de> (raw)
In-Reply-To: <20261113115548.2224914-1-primoz.fiser@norik.com>
Hi Primoz,
On 2026-11-13 12:55, Primoz Fiser wrote:
> Hi,
>
> I ran into this on a phyBOARD-Mira (i.MX6) secure boot setup. Two board
> expansions configure a UART pin group via a fixup along these lines:
>
> of_property -s -f -e $global.bootm.oftree /soc/.../serial@21ec000 \
> pinctrl-0 </soc/.../pinctrl@20e0000/uart3grp>
So you are using -e to pass the same device tree that you are booting
with later to make the phandles fit together. Took me a while to figure
that out ;)
I think -f and -e should be mutually exclusive as a combination of both
doesn't make sense, but now as you are apparently using exactly this
combination to work around a bug I think it's fine to just ignore -e
when -f is given.
BTW while looking at the patch I stumbled upon:
/*
* standard console buffer size. The result won't be bigger than the
* string input.
*/
data = malloc(1024);
This is actually wrong. A property given as <1 2 3 4> will expand to
4*32bit which is already longer than the input string, so putting more
than 256 numbers like this into a property will overflow the buffer.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2026-11-17 10:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 11:55 Primoz Fiser
2026-11-13 11:55 ` [PATCH 1/1] commands: of_property: resolve phandles of fixups in the booted tree Primoz Fiser
2026-11-17 8:23 ` Sascha Hauer
2026-11-17 8:44 ` Sascha Hauer [this message]
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=a852661e-264f-4a3e-8f9a-c69868b4ae0d@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=primoz.fiser@norik.com \
/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