Re: Crypto causes panic in scatterwalk_done with large/multiple buffers

2012-11-18 Thread Jorgen Lundman
> > From what I now researched, you must not pass vmalloc'd memory to > sg_set_buf() as it internally uses virt_to_page() to get page of buffer > address. You most likely need to walk through your vmalloc'd buffer and > pass all individual pages to scatterlist with sg_set_page(). I was told the s

Re: Crypto causes panic in scatterwalk_done with large/multiple buffers

2012-11-18 Thread Jussi Kivilinna
Quoting Jorgen Lundman : Appearently this patch only fixed my debug printk loop that used sg_next from scatterlist API instead of scatterwalk_sg_next from scatterwalk API. Sorry for the noise. Thanks for looking at this. I think I am dealing with 2 problems, one is that occasionally my buffe

Re: Crypto causes panic in scatterwalk_done with large/multiple buffers

2012-11-17 Thread Jorgen Lundman
Specifically, the crash I get is finally in here: static void Xscatterwalk_pagedone(struct scatter_walk *walk, int out, unsigned int more) { if (out) { struct page *page; page = sg_page(walk->sg) + ((walk->offset - 1) >> PAGE_SHIFT);

Re: Crypto causes panic in scatterwalk_done with large/multiple buffers

2012-11-17 Thread Jorgen Lundman
> > Appearently this patch only fixed my debug printk loop that used sg_next > from scatterlist API instead of scatterwalk_sg_next from scatterwalk API. > Sorry for the noise. > Thanks for looking at this. I think I am dealing with 2 problems, one is that occasionally my buffers are from vmalloc

Re: Crypto causes panic in scatterwalk_done with large/multiple buffers

2012-11-17 Thread Jussi Kivilinna
Quoting Jussi Kivilinna : Hello, I managed to reproduce something similiar with small buffers... Does attached patch help in your case? Appearently this patch only fixed my debug printk loop that used sg_next from scatterlist API instead of scatterwalk_sg_next from scatterwalk API. Sorr

Re: Crypto causes panic in scatterwalk_done with large/multiple buffers

2012-11-16 Thread Jussi Kivilinna
Hello, I managed to reproduce something similiar with small buffers... Does attached patch help in your case? -Jussi Quoting Jorgen Lundman : I have a situation where I setup scatterlists as: input scatterlist of 1, address c90003627000 len 0x2. output scatterlist of 2, address 0

Crypto causes panic in scatterwalk_done with large/multiple buffers

2012-11-15 Thread Jorgen Lundman
I have a situation where I setup scatterlists as: input scatterlist of 1, address c90003627000 len 0x2. output scatterlist of 2, address 0 c90002d45000 len 0x2 address 1 88003b079d98 len 0x000c When I call crypto_aead_encrypt(req); it will die with: