lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250723080942.GN11056@google.com>
Date: Wed, 23 Jul 2025 09:09:42 +0100
From: Lee Jones <lee@...nel.org>
To: Sven Peter <sven@...nel.org>
Cc: Nick Chan <towinchenmi@...il.com>, asahi@...ts.linux.dev,
	Neal Gompa <neal@...pa.dev>, linux-arm-kernel@...ts.infradead.org,
	linux-gpio@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
	Linus Walleij <linus.walleij@...aro.org>,
	"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
	Hector Martin <marcan@...can.st>,
	Conor Dooley <conor+dt@...nel.org>, Janne Grunau <j@...nau.net>,
	Sebastian Reichel <sebastian.reichel@...labora.com>,
	Sebastian Reichel <sre@...nel.org>,
	Alyssa Rosenzweig <alyssa@...enzweig.io>,
	Bartosz Golaszewski <brgl@...ev.pl>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Marc Zyngier <maz@...nel.org>
Subject: Re: [PATCH v7 07/10] power: reset: macsmc-reboot: Add driver for
 rebooting via Apple SMC

On Wed, 23 Jul 2025, Lee Jones wrote:

> On Sat, 21 Jun 2025, Sven Peter wrote:
> 
> > On 16.06.25 06:13, Nick Chan wrote:
> > > 
> > > 
> > > On 10/6/2025 23:29, Sven Peter wrote:
> > > > From: Hector Martin <marcan@...can.st>
> > > > 
> > > > This driver implements the reboot/shutdown support exposed by the SMC
> > > > on Apple Silicon machines, such as Apple M1 Macs.
> > > > 
> > > > Signed-off-by: Hector Martin <marcan@...can.st>
> > > > Reviewed-by: Alyssa Rosenzweig <alyssa@...enzweig.io>
> > > > Reviewed-by: Neal Gompa <neal@...pa.dev>
> > > > Reviewed-by: Sebastian Reichel <sebastian.reichel@...labora.com>
> > > > Signed-off-by: Sven Peter <sven@...nel.org>
> > > > ---
> > > >   MAINTAINERS                         |   1 +
> > > >   drivers/power/reset/Kconfig         |   9 ++
> > > >   drivers/power/reset/Makefile        |   1 +
> > > >   drivers/power/reset/macsmc-reboot.c | 290 ++++++++++++++++++++++++++++++++++++
> > > >   4 files changed, 301 insertions(+)
> > > [...]
> > > 
> > > It seems that the reboot driver still probes even without the smc_reboot node in the smc node:
> > 
> > 
> > That's odd...
> > 
> > Lee, is it expected that a mfd sub-device declared with
> > MFD_CELL_OF("macsmc-reboot", NULL, NULL, 0, 0, "apple,smc-reboot"),
> > is loaded even if there's no corresponding node in the device tree?
> > 
> > I'll have to re-add the check that makes sure the sub-device is available
> > then.
> 
> Yes, that's expected.  MFD is orthogonal to DT with respect to device
> registration, unless you specifically disable the node in DT.  If the
> node is missing, the device will still be registered, but no link will
> be made from the (non-existent) node to the 'of_node' pointer.
> 
> You have 3 choices; provide a DT node and explicitly set the status to
> 'disabled', optionally omit registration from MFD (i.e. do not call
> mfd_add_devices()) or check for (!pdev->dev.of_node) in the sub-device's
> .probe() and bomb out early if true.

Did you see this warning in your bootlog:

  pr_warn("%s: Failed to locate of_node [id: %d]\n", cell->name, platform_id);

It's just a warning - the device will still be registered.

-- 
Lee Jones [李琼斯]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ