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:	Tue, 08 Jul 2008 14:21:16 -0700
From:	Joe Perches <joe@...ches.com>
To:	Kyle McMartin <kyle@...artin.ca>
Cc:	Alan Cox <alan@...rguk.ukuu.org.uk>, kmcmartin@...hat.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] padlock: don't whinge when loaded on a non-VIA cpu

On Tue, 2008-07-08 at 15:37 -0400, Kyle McMartin wrote:
> diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c
> index c666b4e..70ec14b 100644
> --- a/drivers/crypto/padlock-sha.c
> +++ b/drivers/crypto/padlock-sha.c
> @@ -253,6 +253,10 @@ static int __init padlock_init(void)
>  {
>  	int rc = -ENODEV;
>  
> +	if (!((boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR) &&
> +	     (boot_cpu_data.x86 >= 6)))	/* only on VIA C3 and above */
> +		return -ENODEV;
> +
>  	if (!cpu_has_phe) {
>  		printk(KERN_ERR PFX "VIA PadLock Hash Engine not detected.\n");
>  		return -ENODEV;

int rc doesn't need to be initialized to -ENODEV either.

diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c
--- a/drivers/crypto/padlock-sha.c
+++ b/drivers/crypto/padlock-sha.c
@@ -251,7 +251,7 @@ static struct crypto_alg sha256_alg = {
 
 static int __init padlock_init(void)
 {
-	int rc = -ENODEV;
+	int rc;
 
 	if (!cpu_has_phe) {
 		printk(KERN_ERR PFX "VIA PadLock Hash Engine not detected.\n");


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