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]
Date:	Fri, 22 Nov 2013 10:51:40 +0800
From:	Dave Young <dyoung@...hat.com>
To:	Greg KH <gregkh@...uxfoundation.org>
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, bp@...en8.de, matt@...sole-pimps.org,
	toshi.kani@...com
Subject: Re: [patch 5/9 v3] efi: export more efi table variable to sysfs

> > +
> > +	if (efi.config_table != EFI_INVALID_TABLE_ADDR) {
> > +		error = sysfs_create_file(efi_kobj,
> > +					&efi_attr_config_table.attr);
> > +		if (error) {
> > +			pr_err("efi: Sysfs attribute %s export failed with error %d.\n",
> > +				efi_attr_config_table.attr.name, error);
> > +			goto err_remove_runtime;
> > +		}
> > +	}
> 
> You don't need to do this "if SOMETHING then create the file", just use
> the "is_visible" attribute in the group to do this as a callback to
> determine this when the group is registered.

I did not know the is_visible before, thanks for the hint, will use it

--
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