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: <63a04993864f4c08923ed753d83cdf37@AcuMS.aculab.com>
Date:   Wed, 23 Feb 2022 22:35:11 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Armin Wolf' <W_Armin@....de>,
        'Pali Rohár' <pali@...nel.org>,
        Guenter Roeck <linux@...ck-us.net>
CC:     "jdelvare@...e.com" <jdelvare@...e.com>,
        "linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
        "linux-assembly@...r.kernel.org" <linux-assembly@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v4] hwmon: (dell-smm) Improve assembly code

From: Armin Wolf
> Sent: 23 February 2022 21:39
...
> > As far as this patch goes I think I'd add a 'stc' (set carry)
> > instruction before the first 'outb'.
> > Then if the 'something magic happens here' doesn't happen (because
> > you aren't on the right kind of motherboard) the action fails.
> >
> > 	David
> 
> We already check for such scenarios by checking if eax changed.
> I would not set the carry flag before doing a SMM call since im
> not sure if the firmware code always clears the carry flag when
> the call was successful.
> If for example the firmware code only sets the carry flag on
> error and otherwise ignores the carry flag, we might create some
> false negatives when a successful SMM call leaves the carry flag set.

If you are worried about that you should be clearing carry on entry.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ