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)
- Follow-Ups:
- Re: [PATCH v4] hwmon: (dell-smm) Improve assembly code
- From: Guenter Roeck
- Re: [PATCH v4] hwmon: (dell-smm) Improve assembly code
- References:
- [PATCH v4] hwmon: (dell-smm) Improve assembly code
- From: Armin Wolf
- Re: [PATCH v4] hwmon: (dell-smm) Improve assembly code
- From: Guenter Roeck
- Re: [PATCH v4] hwmon: (dell-smm) Improve assembly code
- From: Pali Rohár
- RE: [PATCH v4] hwmon: (dell-smm) Improve assembly code
- From: David Laight
- Re: [PATCH v4] hwmon: (dell-smm) Improve assembly code
- From: Armin Wolf
- [PATCH v4] hwmon: (dell-smm) Improve assembly code
- Prev by Date: Re: [PATCH v4] hwmon: (dell-smm) Improve assembly code
- Next by Date: Re: [PATCH v4] hwmon: (dell-smm) Improve assembly code
- Previous by thread: Re: [PATCH v4] hwmon: (dell-smm) Improve assembly code
- Next by thread: Re: [PATCH v4] hwmon: (dell-smm) Improve assembly code
- Index(es):