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]
Date:   Tue, 23 Aug 2022 15:32:44 -0700
From:   Doug Anderson <dianders@...omium.org>
To:     Andrew Halaney <ahalaney@...hat.com>
Cc:     Mark Brown <broonie@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFT PATCH] regulator: core: Require regulator drivers to check
 uV for get_optimum_mode()

Hi,

On Tue, Aug 23, 2022 at 3:14 PM Andrew Halaney <ahalaney@...hat.com> wrote:
>
> I think this makes sense, but unfortunately it doesn't entirely fix my
> issue introduced by efb0cb50c427 ("regulator: qcom-rpmh: Implement get_optimum_mode(), not set_load()"),
> I'm seeing this now:
>
>     [    1.240757] vreg_l17c: mode operation not allowed
>     [    1.245586] vreg_l17c: failed to get optimum mode @ 800000 uA 0 -> 2504000 uV: -EPERM
>     [    1.253631] ufshcd-qcom 1d84000.ufs: ufshcd_enable_vreg: vcc enable failed, err=-1
>
> which if I understand correctly is because my devicetree isn't setting
> regulator-allowed-modes. It appears most of the qcom one's don't set
> that (and a good number set regulator-allow-set-load, which I think is
> necessary for the RPMH regulator to get this far), so I think others
> will be in the same boat as me.
>
> Just for clarity, I'm running with this dtb right now:
>
>     https://lore.kernel.org/all/20220812165453.11608-4-quic_ppareek@quicinc.com/

Wonderful. I guess the old mechanism that RPMH was using totally
bypassed regulator_mode_constrain(). Seems crazy that nobody has
noticed that till now...

I guess maybe we could add the "initial mode" as an implicitly allowed
mode? I guess the other option is to implicitly disable
regulator-allow-set-load if no allowed modes are listed? Both of these
two will still change behavior for your board, of course. Since I
think previously we were setting modes completely ignoring
"regulator-allowed-modes" both of those two options will effectively
disable mode switching.

I guess the other option would be to say that if
"regulator-allow-set-load" is set but not "regulator-allowed-modes"
then we allow all modes? Somehow that doesn't seem like the "safest"
option, though.

...or, of course, we could say that these device trees are broken and
we're not going to care about supporting them, then we could fix the
device trees...

-Doug

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ