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: <YaTCpgYaPDssQp+N@sirena.org.uk>
Date:   Mon, 29 Nov 2021 12:08:06 +0000
From:   Mark Brown <broonie@...nel.org>
To:     Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc:     Hans de Goede <hdegoede@...hat.com>,
        "Rafael J . Wysocki" <rjw@...ysocki.net>,
        Mark Gross <markgross@...nel.org>,
        Andy Shevchenko <andy@...radead.org>,
        Wolfram Sang <wsa@...-dreams.de>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Daniel Scally <djrscally@...il.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>, Len Brown <lenb@...nel.org>,
        linux-acpi@...r.kernel.org, platform-driver-x86@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Kate Hsuan <hpa@...hat.com>, linux-media@...r.kernel.org,
        linux-clk@...r.kernel.org,
        Andy Shevchenko <andy.shevchenko@...il.com>
Subject: Re: [PATCH v6 05/15] regulator: Introduce tps68470-regulator driver

On Sun, Nov 28, 2021 at 01:38:34AM +0200, Laurent Pinchart wrote:
> On Fri, Nov 26, 2021 at 12:22:35PM +0100, Hans de Goede wrote:
> > On 11/26/21 00:32, Laurent Pinchart wrote:
> > > On Thu, Nov 25, 2021 at 05:54:02PM +0100, Hans de Goede wrote:
> > >> The TPS68470 PMIC provides Clocks, GPIOs and Regulators. At present in
> > >> the kernel the Regulators and Clocks are controlled by an OpRegion
> > >> driver designed to work with power control methods defined in ACPI, but

Please delete unneeded context from mails when replying.  Doing this
makes it much easier to find your reply in the message, helping ensure
it won't be missed by people scrolling through the irrelevant quoted
material.

> > >> + * (1) This regulator must have the same voltage as VIO if S_IO LDO is used to
> > >> + *     power a sensor/VCM which I2C is daisy chained behind the PMIC.
> > >> + * (2) If there is no I2C daisy chain it can be set freely.
> > >> + */

> > > Do we need safety checks for this ?

> > There really is no way to deal this condition needs to matches inside the driver,
> > this should be enforced by setting proper constraints on the 2 regulators where
> > the PMIC is used with a sensor I2C daisy chained behind it.

> Right. I tend to be cautious here, as incorrect settings can destroy the
> hardware. We should err on the side of too many safety checks rather
> than too few. I was thinking that the cio2-bridge driver could set a
> daisy-chaining flag, which could trigger additional checks here, but it
> wouldn't protect against someone experimenting to support a new device
> and setting different voltages without the daisy-chaining flag.

> My biggest worry is that someone with an unsupported machine may start
> by copying and pasting an existing configuration to try it out, and fry
> their hardware.

There's really nothing you can do that prevents this, especially in the
cut'n'paste scenario.  Overrides tend to get copied along with the rest
of the configuration, or checks hacked out if people think they're
getting in the way without realising what they're there for.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ