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: <c8aca75209f042e689f51c53caed80aa@ausx13mpc124.AMER.DELL.COM>
Date:   Wed, 18 Oct 2017 19:10:59 +0000
From:   <Mario.Limonciello@...l.com>
To:     <dvhart@...radead.org>, <pali.rohar@...il.com>
CC:     <andy.shevchenko@...il.com>, <linux-kernel@...r.kernel.org>,
        <platform-driver-x86@...r.kernel.org>, <luto@...nel.org>,
        <quasisec@...gle.com>, <rjw@...ysocki.net>, <mjg59@...gle.com>,
        <hch@....de>, <greg@...ah.com>, <gnomes@...rguk.ukuu.org.uk>
Subject: RE: [PATCH v9 11/17] platform/x86: dell-smbios-smm: test for WSMT

> -----Original Message-----
> From: Darren Hart [mailto:dvhart@...radead.org]
> Sent: Wednesday, October 18, 2017 2:09 PM
> To: Pali Rohár <pali.rohar@...il.com>
> Cc: Limonciello, Mario <Mario_Limonciello@...l.com>; Andy Shevchenko
> <andy.shevchenko@...il.com>; LKML <linux-kernel@...r.kernel.org>; platform-
> driver-x86@...r.kernel.org; Andy Lutomirski <luto@...nel.org>;
> quasisec@...gle.com; rjw@...ysocki.net; mjg59@...gle.com; hch@....de; Greg
> KH <greg@...ah.com>; Alan Cox <gnomes@...rguk.ukuu.org.uk>
> Subject: Re: [PATCH v9 11/17] platform/x86: dell-smbios-smm: test for WSMT
> 
> On Tue, Oct 17, 2017 at 09:22:58PM +0200, Pali Rohár wrote:
> > On Tuesday 17 October 2017 13:21:55 Mario Limonciello wrote:
> > > +/* When enabled this indicates that SMM won't work */
> > > +static int test_wsmt_enabled(void)
> > > +{
> > > +	struct calling_interface_token *token;
> > > +
> > > +	/* if token doesn't exist, SMM will work */
> > > +	token = dell_smbios_find_token(WSMT_EN_TOKEN);
> > > +	if (!token)
> > > +		return 0;
> > > +
> > > +	/* if token exists, try to access over SMM */
> > > +	buffer->class = CLASS_TOKEN_READ;
> > > +	buffer->select = SELECT_TOKEN_STD;
> > > +	memset(buffer, 0, sizeof(struct calling_interface_buffer));
> > > +	buffer->input[0] = token->location;
> > > +	dell_smbios_smm_call(buffer);
> > > +
> > > +	/* if lookup failed, we know WSMT was enabled */
> > > +	if (buffer->output[0] != 0)
> > > +		return 1;
> > > +
> > > +	/* query token status if it didn't fail */
> > > +	return (buffer->output[1] == token->value);
> > > +}
> >
> > Maybe small suggestion... function returns only zero or one -- what is a
> > good candidate to have return value boolean and not basic int.
> 
> Yes please.
> 

OK I'll adjust this (and the other things Pali sent recently) in the next submission.

Just waiting on feedback for some of the other areas before sending off again.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ