Re: LRW endian issues?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 10 Feb 2009, Herbert Xu wrote:
> On Fri, Feb 06, 2009 at 11:18:46AM +0100, Geert Uytterhoeven wrote:
> > Here's a backtrace from the RCU stall detector on PS3:
> > 
> > | INFO: RCU detected CPU 1 stall (t=4294906597/2500 jiffies)
> > | Call Trace:
> > | [c00000000c186fc0] [c00000000000f850] .show_stack+0x6c/0x16c (unreliable)
> > | [c00000000c187070] [c000000000098a04] .__rcu_pending+0x94/0x2c0
> > | [c00000000c187110] [c000000000098c7c] .rcu_pending+0x4c/0xa4
> > | [c00000000c1871b0] [c00000000005fa04] .update_process_times+0x40/0x94
> > | [c00000000c187240] [c00000000007b25c] .tick_sched_timer+0x154/0x1ac
> > | [c00000000c187300] [c000000000070df4] .__run_hrtimer+0x8c/0xfc
> > | [c00000000c1873a0] [c000000000071e6c] .hrtimer_interrupt+0x144/0x1e8
> > | [c00000000c187490] [c00000000001d46c] .timer_interrupt+0xb0/0xe4
> > | [c00000000c187520] [c00000000000360c] decrementer_common+0x10c/0x180
> > | --- Exception: 901 at .crypto_alg_mod_lookup+0x4/0xa8
> > |     LR = .crypto_lookup_skcipher+0x38/0x2b8
> > | [c00000000c187810] [c0000000001bf790] .crypto_lookup_skcipher+0x284/0x2b8 (unreliable)
> 
> Thanks, could you try this patch?

Unfortunately it doesn't seem to make any difference.

> diff --git a/crypto/api.c b/crypto/api.c
> index 9975a7b..d80e548 100644
> --- a/crypto/api.c
> +++ b/crypto/api.c
> @@ -205,6 +205,26 @@ struct crypto_alg *crypto_alg_lookup(const char *name, u32 type, u32 mask)
>  }
>  EXPORT_SYMBOL_GPL(crypto_alg_lookup);
>  
> +static struct crypto_alg *crypto_alg_lookup_untested(const char *name,
> +						     u32 type, u32 mask)
> +{
> +	struct crypto_alg *alg;
> +
> +	down_read(&crypto_alg_sem);
> +	alg = __crypto_alg_lookup(name, type, mask);
> +	if (!alg)
> +		alg = __crypto_alg_lookup(name, type,
> +					  mask & ~CRYPTO_ALG_TESTED);
> +	up_read(&crypto_alg_sem);
> +
> +	if (alg && ((alg->cra_flags ^ type) & mask & CRYPTO_ALG_TESTED)) {
> +		crypto_mod_put(alg);
> +		alg = ERR_PTR(-ENOENT);
> +	}
> +
> +	return alg;
> +}
> +
>  struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask)
>  {
>  	struct crypto_alg *alg;
> @@ -220,6 +240,18 @@ struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask)
>  	if (alg)
>  		return crypto_is_larval(alg) ? crypto_larval_wait(alg) : alg;
>  
> +	/*
> +	 * Do not probe again if a failed algorithm already exists,
> +	 * or we may loop forever while churning out an endless list
> +	 * of failed algorithms.
> +	 *
> +	 * The user may recover from this by removing the failed
> +	 * algorithm.
> +	 */
> +	alg = crypto_alg_lookup_untested(name, type, mask);
> +	if (alg)
> +		return alg;
> +
>  	return crypto_larval_add(name, type, mask);
>  }
>  EXPORT_SYMBOL_GPL(crypto_larval_lookup);

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@xxxxxxxxxxx
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux