Re: [PATCH v1 3/3] crypto: ccp - Protect against poorly marked end of sg list

2015-05-28 Thread Tom Lendacky
On 05/27/2015 07:36 PM, Herbert Xu wrote: On Wed, May 27, 2015 at 09:12:02AM -0500, Tom Lendacky wrote: The reason I'm asking is because while this patch fixes your driver everybody else will still crash and burn should something like this happen again. A number of other drivers already

Re: [PATCH v1 3/3] crypto: ccp - Protect against poorly marked end of sg list

2015-05-27 Thread Herbert Xu
On Wed, May 27, 2015 at 05:43:05PM +0800, Herbert Xu wrote: Tom Lendacky thomas.lenda...@amd.com wrote: Scatter gather lists can be created with more available entries than are actually used (e.g. using sg_init_table() to reserve a specific number of sg entries, but in actuality using

Re: [PATCH v1 3/3] crypto: ccp - Protect against poorly marked end of sg list

2015-05-27 Thread Tom Lendacky
On 05/27/2015 04:43 AM, Herbert Xu wrote: Tom Lendacky thomas.lenda...@amd.com wrote: Scatter gather lists can be created with more available entries than are actually used (e.g. using sg_init_table() to reserve a specific number of sg entries, but in actuality using something less than that

Re: [PATCH v1 3/3] crypto: ccp - Protect against poorly marked end of sg list

2015-05-27 Thread Tom Lendacky
On 05/27/2015 04:45 AM, Herbert Xu wrote: On Wed, May 27, 2015 at 05:43:05PM +0800, Herbert Xu wrote: Tom Lendacky thomas.lenda...@amd.com wrote: Scatter gather lists can be created with more available entries than are actually used (e.g. using sg_init_table() to reserve a specific number of

Re: [PATCH v1 3/3] crypto: ccp - Protect against poorly marked end of sg list

2015-05-27 Thread Herbert Xu
On Wed, May 27, 2015 at 09:12:02AM -0500, Tom Lendacky wrote: The reason I'm asking is because while this patch fixes your driver everybody else will still crash and burn should something like this happen again. A number of other drivers already have similar sg-count functions in them.

[PATCH v1 3/3] crypto: ccp - Protect against poorly marked end of sg list

2015-05-26 Thread Tom Lendacky
Scatter gather lists can be created with more available entries than are actually used (e.g. using sg_init_table() to reserve a specific number of sg entries, but in actuality using something less than that based on the data length). The caller sometimes fails to mark the last entry with