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:	Wed, 21 Mar 2012 15:15:17 -0700
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Kent Yoder <key@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
	rcj@...ux.vnet.ibm.com, benh@...nel.crashing.org,
	linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH 14/17] powerpc: crypto: nx driver code supporting nx
 encryption

On Wed, Mar 21, 2012 at 04:41:08PM -0500, Kent Yoder wrote:
> +static int nx_register_algs(void)
> +{
> +	int rc = -1;
> +
> +	if (nx_driver.of.flags != NX_OF_FLAG_MASK_READY)
> +		goto out;
> +
> +	memset(&nx_driver.stats, 0, sizeof(struct nx_stats));
> +
> +	rc = nx_sysfs_init(&nx_driver.viodriver.driver);

Ok, that's not bad, you are doing it from the probe() function of your
bus.  As long as the bus got things right on when uevents get sent to
userspace, does it?

> +static struct vio_device_id nx_crypto_driver_ids[] __devinitdata = {
> +	{ "ibm,sym-encryption-v1", "ibm,sym-encryption" },
> +	{ "", "" }
> +};
> +MODULE_DEVICE_TABLE(vio, nx_crypto_driver_ids);
> +
> +/* driver state structure */
> +struct nx_crypto_driver nx_driver = {
> +	.viodriver = {
> +		.id_table = nx_crypto_driver_ids,
> +		.probe = nx_probe,
> +		.remove = nx_remove,
> +		.driver = {
> +			.name  = "nx",
> +			.owner = THIS_MODULE,
> +		},

Really?  vio drivers are supposed to look like this with the .name and
.owner field manually being set in the static initialization of the
driver?  That's sad, and should be fixed, the vio core should do this
type of thing for you.

greg k-h
--
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