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: <20131126091301.GB10899@dhcp-16-126.nay.redhat.com>
Date:	Tue, 26 Nov 2013 17:13:01 +0800
From:	Dave Young <dyoung@...hat.com>
To:	Borislav Petkov <bp@...en8.de>
Cc:	linux-kernel@...r.kernel.org, linux-efi@...r.kernel.org,
	x86@...nel.org, mjg59@...f.ucam.org, hpa@...or.com,
	James.Bottomley@...senPartnership.com, vgoyal@...hat.com,
	ebiederm@...ssion.com, horms@...ge.net.au,
	kexec@...ts.infradead.org, greg@...ah.com, matt@...sole-pimps.org,
	toshi.kani@...com
Subject: Re: [PATCH v4 05/12] efi: export more efi table variable to sysfs

On 11/26/13 at 09:50am, Borislav Petkov wrote:
> On Tue, Nov 26, 2013 at 01:57:50PM +0800, Dave Young wrote:
> > diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
> > index 2e2fbde..5d85956 100644
> > --- a/drivers/firmware/efi/efi.c
> > +++ b/drivers/firmware/efi/efi.c
> > @@ -32,6 +32,9 @@ struct efi __read_mostly efi = {
> >  	.hcdp       = EFI_INVALID_TABLE_ADDR,
> >  	.uga        = EFI_INVALID_TABLE_ADDR,
> >  	.uv_systab  = EFI_INVALID_TABLE_ADDR,
> > +	.fw_vendor  = EFI_INVALID_TABLE_ADDR,
> > +	.runtime    = EFI_INVALID_TABLE_ADDR,
> > +	.config_table  = EFI_INVALID_TABLE_ADDR,
> 
> See what I mean with alignment?

Yes, I see. As for this segment I would not like change the previous code
just because of this reason

> 
> Now this config_table thing sticks out and completely destroys the
> balance in the universe.
> 
> :-)
> 
> >  };
> >  EXPORT_SYMBOL(efi);
> >  
> > @@ -71,13 +74,54 @@ static ssize_t systab_show(struct kobject *kobj,
> >  static struct kobj_attribute efi_attr_systab =
> >  			__ATTR(systab, 0400, systab_show, NULL);
> >  
> > +static ssize_t fw_vendor_show(struct kobject *kobj,
> > +				struct kobj_attribute *attr, char *buf)
> > +{
> > +	return sprintf(buf, "0x%lx\n", efi.fw_vendor);
> > +}
> > +
> > +static ssize_t runtime_show(struct kobject *kobj,
> > +				struct kobj_attribute *attr, char *buf)
> > +{
> > +	return sprintf(buf, "0x%lx\n", efi.runtime);
> > +}
> > +
> > +static ssize_t config_table_show(struct kobject *kobj,
> > +				struct kobj_attribute *attr, char *buf)
> > +{
> > +	return sprintf(buf, "0x%lx\n", efi.config_table);
> > +}
> 
> Those are sooo similar, it's like the macro SHOW writes itself.

Ok, will add a macro for the above functions..

Thanks for review
Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ