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:   Mon, 24 Feb 2020 12:31:22 +0000
From:   Mark Brown <broonie@...nel.org>
To:     "H. Nikolaus Schaller" <hns@...delico.com>
Cc:     Andreas Kemnade <andreas@...nade.info>, j.neuschaefer@....net,
        contact@...lk.fr, GNUtoo@...erdimension.org, josua.mayer@....eu,
        lgirdwood@...il.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC] regulator: core: fix handling negative voltages e.g.
 in EPD PMICs

On Mon, Feb 24, 2020 at 01:22:21PM +0100, H. Nikolaus Schaller wrote:
> > Am 24.02.2020 um 13:05 schrieb Mark Brown <broonie@...nel.org>:

> > This is what'd be needed, your approach here is a bit of a hack and
> > leaves some values unrepresentable if they overlap with errnos which
> > obviously has issues if someone has a need for those values.

> Negative ERRNOs have BIT(31) set.

This code is working with the numberic representation, not with the
bitwise representation - it's using -MAX_ERRNO.  

> But then it seems to be a little inconsistent that the voltage
> parameters of regulator_set_voltage_unlocked() are signed integers
> and not unsigned.

> So shouldn't that be protected against attempting to set negative voltages?

Or just convert it to unsigned, I don't recall there being any
particular reason why it's signed.

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