Re: [PATCH 1/2] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()

2020-05-24 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi Markus, On 2020/5/25 14:05, Markus Elfring wrote: >> The system will crash when we insmod crypto/tcrypt.ko whit mode=38. > > * I suggest to use the word “with” in this sentence. > OK, it's a typo. > * Will it be helpful to explain the passed mode number? > > >> BTW I add a check for sg_nen

Re: [PATCH 1/2] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()

2020-05-24 Thread Markus Elfring
> The system will crash when we insmod crypto/tcrypt.ko whit mode=38. * I suggest to use the word “with” in this sentence. * Will it be helpful to explain the passed mode number? > BTW I add a check for sg_nents_for_len() its return value since > sg_nents_for_len() function could fail. Please

Re: [PATCH 1/2] crypto: virtio: fix src/dst scatterlist calculation

2020-05-24 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi Jason, On 2020/5/25 11:12, Jason Wang wrote: > > On 2020/5/25 上午8:56, Longpeng(Mike) wrote: >> The system will crash when we insmod crypto/tcrypt.ko whit mode=38. >> >> Usually the next entry of one sg will be @sg@ + 1, but if this sg element >> is part of a chained scatterlist, it could jump

Re: [PATCH 1/2] crypto: virtio: fix src/dst scatterlist calculation

2020-05-24 Thread Jason Wang
On 2020/5/25 上午8:56, Longpeng(Mike) wrote: The system will crash when we insmod crypto/tcrypt.ko whit mode=38. Usually the next entry of one sg will be @sg@ + 1, but if this sg element is part of a chained scatterlist, it could jump to the start of a new scatterlist array. Let's fix it by sg_n

[PATCH 1/2] crypto: virtio: fix src/dst scatterlist calculation

2020-05-24 Thread Longpeng(Mike)
The system will crash when we insmod crypto/tcrypt.ko whit mode=38. Usually the next entry of one sg will be @sg@ + 1, but if this sg element is part of a chained scatterlist, it could jump to the start of a new scatterlist array. Let's fix it by sg_next() on calculation of src/dst scatterlist. B