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>] [day] [month] [year] [list]
Date:   Tue, 01 Oct 2019 19:45:10 -0700
From:   Patrick Williams <patrick@...cx.xyz>
To:     "Guenter Roeck" <linux@...ck-us.net>
Cc:     "Patrick Williams" <alpawi@...zon.com>,
        "Jean Delvare" <jdelvare@...e.com>,
        "linux-hwmon" <linux-hwmon@...r.kernel.org>,
        "linux-kernel" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] hwmon: (pmbus) add VR12/VR13 mode support write paths

---- On Tue, 01 Oct 2019 16:02:10 -0700 Guenter Roeck <linux@...ck-us.net> wrote ----
 
 > > -    val = clamp_val(val, 500, 1600); 
 > > +    switch (data->info->vrm_version) { 
 > > +    case vr11: 
 > > +        val = clamp_val(val, 500, 1600); 
 > > +        return 2 + DIV_ROUND_CLOSEST((1600 - val) * 100, 625); 
 > > +    case vr12: 
 > > +        val = clamp_val(val, 0, 1520); 
 > > +        return ((val - 250) / 5) + 1; 
 > > +    case vr13: 
 > > +        val = clamp_val(val, 0, 2500); 
 > > +        return ((val - 500) / 10) + 1; 
 >  
 > Both vr12 and vr13 converts low values into negative values, 
 > which are then converted into more or less random register 
 > values. That can not be correct. The resulting register values 
 > must always be valid. 
 >  
 > Guenter 

Thanks for catching this.  It may be as simple as me adjusting the lower
bound on the clamp_val.  I’ll check with one of the device specs and
confirm the appropriate behavior on the lower bounds.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ