Skip to content

Commit a44b56c

Browse files
Evgeniy Polyakovherbertx
authored andcommitted
crypto: hifn - Disable driver when physical size exceeds 32 bits
On Tue, Sep 23, 2008 at 08:06:32PM +0200, Dimitri Puzin (max@psycast.de) wrote: > With this patch applied it still doesn't work as expected. The overflow > messages are gone however syslog shows > [ 120.924266] hifn0: abort: c: 0, s: 1, d: 0, r: 0. > when doing cryptsetup luksFormat as in original e-mail. At this point > cryptsetup hangs and can't be killed with -SIGKILL. I've attached > SysRq-t dump of this condition. Yes, I was wrong with the patch: HIFN does not support 64-bit addresses afaics. Attached patch should not allow HIFN to be registered on 64-bit arch, so crypto layer will fallback to the software algorithms. Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 4a6908a commit a44b56c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎drivers/crypto/hifn_795x.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2782,6 +2782,11 @@ static int __devinit hifn_init(void)
27822782
unsigned int freq;
27832783
int err;
27842784

2785+
if (sizeof(dma_addr_t) > 4) {
2786+
printk(KERN_INFO "HIFN supports only 32-bit addresses.\n");
2787+
return -EINVAL;
2788+
}
2789+
27852790
if (strncmp(hifn_pll_ref, "ext", 3) &&
27862791
strncmp(hifn_pll_ref, "pci", 3)) {
27872792
printk(KERN_ERR "hifn795x: invalid hifn_pll_ref clock, "

0 commit comments

Comments
 (0)