Re: [PATCH] ixp4xx_crypto panic with fragmented packets in scatterlist

2009-03-02 Thread Herbert Xu
On Thu, Feb 26, 2009 at 11:20:26PM +, Russell King - ARM Linux wrote: > > I don't think you can use chained scatterlists unless the architecture > supports it. It's not a case that you have to flatten the chaining > before passing it over to the arch - it seems you're not allowed to > create a

Re: [PATCH] ixp4xx_crypto panic with fragmented packets in scatterlist

2009-02-27 Thread Christian Hohnstaedt
On Thu, Feb 26, 2009 at 09:27:09PM +0100, Karl Hiramoto wrote: > Herbert Xu wrote: >> Russell King - ARM Linux wrote: >> >>> We can't merge this until _all_ of ARM has been fixed for walking >>> scatterlist chains. >>> >> >> Right, this is definitely not the way to fix this bug. Because >

Re: [PATCH] ixp4xx_crypto panic with fragmented packets in scatterlist

2009-02-26 Thread Herbert Xu
Russell King - ARM Linux wrote: > > I don't think you can use chained scatterlists unless the architecture > supports it. It's not a case that you have to flatten the chaining > before passing it over to the arch - it seems you're not allowed to > create a chained scatterlist in the first place:

Re: [PATCH] ixp4xx_crypto panic with fragmented packets in scatterlist

2009-02-26 Thread Russell King - ARM Linux
On Thu, Feb 26, 2009 at 08:10:43PM +0800, Herbert Xu wrote: > Russell King - ARM Linux wrote: > > > > We can't merge this until _all_ of ARM has been fixed for walking > > scatterlist chains. > > Right, this is definitely not the way to fix this bug. Because > even if ARM completely supported ch

Re: [PATCH] ixp4xx_crypto panic with fragmented packets in scatterlist

2009-02-26 Thread Karl Hiramoto
Herbert Xu wrote: Russell King - ARM Linux wrote: We can't merge this until _all_ of ARM has been fixed for walking scatterlist chains. Right, this is definitely not the way to fix this bug. Because even if ARM completely supported chaining, you still have to fix all the other archit

Re: [PATCH] ixp4xx_crypto panic with fragmented packets in scatterlist

2009-02-26 Thread Herbert Xu
Russell King - ARM Linux wrote: > > We can't merge this until _all_ of ARM has been fixed for walking > scatterlist chains. Right, this is definitely not the way to fix this bug. Because even if ARM completely supported chaining, you still have to fix all the other architectures as well. So ple

Re: [PATCH] ixp4xx_crypto panic with fragmented packets in scatterlist

2009-02-26 Thread Russell King - ARM Linux
On Wed, Feb 25, 2009 at 04:35:40PM +0100, Karl Hiramoto wrote: > The attached patch fixes my issue, but am not sure if it is correct or > will cause problems else where. > diff -Naurp linux-2.6.28.7.a/arch/arm/include/asm/scatterlist.h > linux-2.6.28.7.b/arch/arm/include/asm/scatterlist.h > ---

Re: Re:[PATCH] ixp4xx_crypto panic with fragmented packets in scatterlist

2009-02-25 Thread Herbert Xu
Karl Hiramoto wrote: > > The attached patch fixes my issue, but am not sure if it is correct or > will cause problems else where. This is what we'll do once generic chaining is available on all architectures. Until then it's up to the driver to fix the SG list up before passing it to DMA. Che

Re: ixp4xx_crypto panic with fragmented packets in scatterlist

2009-02-25 Thread Herbert Xu
Christian Hohnstaedt wrote: > > However the scatterlist iteration in the arm implementation of > dma_map_sg() uses neither of them, but simply sg++ > > Please try the attached compile-tested patch. The chaining is only allowed within the crypto layer (because we haven't ported the generic chaini

Re:[PATCH] ixp4xx_crypto panic with fragmented packets in scatterlist

2009-02-25 Thread Karl Hiramoto
The attached patch fixes my issue, but am not sure if it is correct or will cause problems else where. diff -Naurp linux-2.6.28.7.a/arch/arm/include/asm/scatterlist.h linux-2.6.28.7.b/arch/arm/include/asm/scatterlist.h --- linux-2.6.28.7.a/arch/arm/include/asm/scatterlist.h 2009-02-20 23:41:27.0

Re: ixp4xx_crypto panic with fragmented packets in scatterlist

2009-02-25 Thread Karl Hiramoto
Christian Hohnstaedt wrote: > > > looks like there are different, incompatible sg chaining implementations: > > include/crypto/scatterwalk.h:scatterwalk_sg_chain() uses > sg->lenght == 0 as indicator for a chained sg > > include/linux/scatterlist.h:sg_chain() uses > bit 0 of sg->page_link to indic

Re: ixp4xx_crypto panic with fragmented packets in scatterlist

2009-02-25 Thread Christian Hohnstaedt
On Wed, Feb 25, 2009 at 10:36:11AM +0100, Karl Hiramoto wrote: > Christian Hohnstaedt wrote: > > On Tue, Feb 24, 2009 at 02:19:54PM +0100, Karl Hiramoto wrote: > > > >> [42949542.25] count_sg:758 len=0 sg_is_last(sg)=0 > >> [42949542.26] kernel BUG at lib/scatterlist.c:26! > >> [42949542

Re: ixp4xx_crypto panic with fragmented packets in scatterlist

2009-02-25 Thread Karl Hiramoto
Christian Hohnstaedt wrote: > On Tue, Feb 24, 2009 at 02:19:54PM +0100, Karl Hiramoto wrote: > >> The latest thing i found is kernel BUG at lib/scatterlist.c:26! >> >> ping -s 1800 host in a IPSec tunnel. Setup is 802.1Q VLAN --> >> ixp4xx_eth --> IPSec Tunnel >> >> trace with some d

Re: ixp4xx_crypto panic with fragmented packets in scatterlist

2009-02-25 Thread Christian Hohnstaedt
On Tue, Feb 24, 2009 at 02:19:54PM +0100, Karl Hiramoto wrote: > The latest thing i found is kernel BUG at lib/scatterlist.c:26! > > ping -s 1800 host in a IPSec tunnel. Setup is 802.1Q VLAN --> > ixp4xx_eth --> IPSec Tunnel > > trace with some debug printk's i added.printk("%s:%

Re: ixp4xx_crypto panic with fragmented packets in scatterlist

2009-02-24 Thread Karl Hiramoto
The latest thing i found is kernel BUG at lib/scatterlist.c:26! ping -s 1800 host in a IPSec tunnel. Setup is 802.1Q VLAN --> ixp4xx_eth --> IPSec Tunnel trace with some debug printk's i added.printk("%s:%d values",__func__, __LINE__); [42949542.17] esp_output:142 skb->le