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:	Mon, 19 Dec 2011 15:25:06 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Dave Jones <davej@...hat.com>, Andi Kleen <andi@...stfloor.org>,
	linux-kernel@...r.kernel.org, trenn@...e.de, kay.sievers@....org,
	Andi Kleen <ak@...ux.intel.com>, kay.sievers@...y.org,
	axboe@...nel.dk, herbert@...dor.hengli.com.au, ying.huang@...el.com
Subject: Re: [PATCH 03/10] crypto: Add support for x86 cpuid auto loading
 for x86 crypto drivers

On 12/19/2011 03:22 PM, Dave Jones wrote:
> On Mon, Dec 19, 2011 at 02:47:39PM -0800, Andi Kleen wrote:
> 
>  >  static int __init padlock_init(void)
>  >  {
>  >  	int rc = -ENODEV;
>  > @@ -533,15 +540,8 @@ static int __init padlock_init(void)
>  >  	struct shash_alg *sha1;
>  >  	struct shash_alg *sha256;
>  >  
>  > -	if (!cpu_has_phe) {
>  > -		printk(KERN_NOTICE PFX "VIA PadLock Hash Engine not detected.\n");
>  > -		return -ENODEV;
>  > -	}
>  > -
>  > -	if (!cpu_has_phe_enabled) {
>  > -		printk(KERN_NOTICE PFX "VIA PadLock detected, but not enabled. Hmm, strange...\n");
>  > +	if (!x86_match_cpu(padlock_sha_ids) || !cpu_has_phe_enabled)
>  >  		return -ENODEV;
>  > -	}
> 
> don't we want to keep the printk ?
> 
> Seems that if it's been disabled by the BIOS for some reason, it will now
> silently fail instead of printing a nice warning.
> 

The first printk is insanely annoying, because the end result is that we
get a printk of all the crypto engines that are *not* enabled...
arguably it would be somewhat nice to get a printk when a crypto engine
*is* enabled.

	-hpa

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