From: Sascha Hauer <s.hauer@pengutronix.de>
To: Bastian Krause <bst@pengutronix.de>
Cc: barebox@lists.infradead.org, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: Re: [PATCH 2/3] common: machine_id: introduce machine id generation and pass id on
Date: Wed, 17 Jul 2019 16:18:11 +0200 [thread overview]
Message-ID: <20190717141811.ajuzihp2ayibbsmi@pengutronix.de> (raw)
In-Reply-To: <91ce3e31-4c30-4021-78bd-5c8e3f6fffc1@pengutronix.de>
On Wed, Jul 17, 2019 at 04:02:45PM +0200, Bastian Krause wrote:
>
> On 7/17/19 12:31 PM, Ahmad Fatoum wrote:
> >
> >
> > On 17/7/19 12:02, Roland Hieber wrote:
> >> On Tue, Jul 16, 2019 at 12:58:36PM +0200, Bastian Krause wrote:
> >>> By default systemd generates a machine id on first boot and tries to
> >>> persist it (see `man machine-id`). When the root file system is read-only
> >>> systemd cannot persist the machine id. In case multiple redundant slots
> >>> are used the machine id will vary. When not handled explicitly the
> >>> machine id will also change during updates.
> >>>
> >>> It is possible to pass a machine id to the kernel which will be used by
> >>> systemd (systemd.machine_id=).
> >>>
> >>> This adds functionality to pass device-specific information that will be
> >>> hashed to generate a persistent unique machine id. The machine id will
> >>> be finally added to the kernel parameters via the
> >>> linux.bootargs.machine_id global variable.
> >>>
> >>> Note: if multiple sources provide hashable device-specific information
> >>> (via machine_id_set_hashable()) the information provided by the last call
> >>> prior to the late initcall set_machine_id() is used to generate the
> >>> machine id from. Thus when updating barebox the machine id might change.
> >>
> >> I would also add this paragraph to the kconfig help text, so it is more
> >> visible for users.
> >
> > Maybe add a priority parameter like we do with e.g. reset reason?
> > That way we can have a base machine-id in the OTP, but board code can
> > override it with e.g. an EEPROM value which is given higher priority.
>
> Hm, that makes things complicated. At the end everybody will have their
> own high priority call like..
>
> machine_id_set_hashable(my_board_specific_info, len, 99);
>
> .. to have a machine id that persists such an update scenario? That does
> not sound too good to me..
>
> Any opinions on this?
I don't think there's going to be a race for priorities. But anyway, I
think we can introduce priorities when we really have a need for them.
Just introducing them because we might need them some day seems like
unnecessary overhead to me.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-07-17 14:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-16 10:58 [PATCH 1/3] digest.h: needs errno definitions Bastian Krause
2019-07-16 10:58 ` [PATCH 2/3] common: machine_id: introduce machine id generation and pass id on Bastian Krause
2019-07-17 9:48 ` Sascha Hauer
2019-07-17 9:58 ` Bastian Krause
2019-07-17 10:31 ` Sascha Hauer
2019-07-17 10:34 ` Bastian Krause
2019-07-17 9:53 ` Ahmad Fatoum
2019-07-17 10:02 ` Roland Hieber
2019-07-17 10:31 ` Ahmad Fatoum
2019-07-17 14:02 ` Bastian Krause
2019-07-17 14:18 ` Sascha Hauer [this message]
2019-07-16 10:58 ` [PATCH 3/3] nvmem: ocotp: set unique id as machine-id hashable Bastian Krause
2019-07-17 9:50 ` Sascha Hauer
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=20190717141811.ajuzihp2ayibbsmi@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=bst@pengutronix.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