Re: [PATCH] crypto - shash: reduce minimum alignment of shash_desc structure

2021-01-08 Thread Ard Biesheuvel
On Fri, 8 Jan 2021 at 11:59, Arnd Bergmann wrote: > > On Fri, Jan 8, 2021 at 11:44 AM Herbert Xu > wrote: > > > > On Fri, Jan 08, 2021 at 11:42:53AM +0100, Arnd Bergmann wrote: > > > > > > How does this work for kernels with CONFIG_VMAP_STACK? > > > I remember some other subsystems (usb, hid) ad

Re: [PATCH] crypto - shash: reduce minimum alignment of shash_desc structure

2021-01-08 Thread Arnd Bergmann
On Fri, Jan 8, 2021 at 11:44 AM Herbert Xu wrote: > > On Fri, Jan 08, 2021 at 11:42:53AM +0100, Arnd Bergmann wrote: > > > > How does this work for kernels with CONFIG_VMAP_STACK? > > I remember some other subsystems (usb, hid) adding workarounds > > for that, but I don't see those in drivers/cryp

Re: [PATCH] crypto - shash: reduce minimum alignment of shash_desc structure

2021-01-08 Thread Herbert Xu
On Fri, Jan 08, 2021 at 11:42:53AM +0100, Arnd Bergmann wrote: > > How does this work for kernels with CONFIG_VMAP_STACK? > I remember some other subsystems (usb, hid) adding workarounds > for that, but I don't see those in drivers/crypto I'm referring to the situation in general and not the subje

Re: [PATCH] crypto - shash: reduce minimum alignment of shash_desc structure

2021-01-08 Thread Arnd Bergmann
On Fri, Jan 8, 2021 at 10:22 AM Herbert Xu wrote: > > On Fri, Jan 08, 2021 at 09:36:23AM +0100, Ard Biesheuvel wrote: > > > > scatterlists, and I don't think we permit pointing the scatterlist > > into request structures) > > Not only do we allow that, we do that in lots of places. How does this

Re: [PATCH] crypto - shash: reduce minimum alignment of shash_desc structure

2021-01-08 Thread Ard Biesheuvel
On Fri, 8 Jan 2021 at 10:23, Herbert Xu wrote: > > On Fri, Jan 08, 2021 at 09:36:23AM +0100, Ard Biesheuvel wrote: > > > > scatterlists, and I don't think we permit pointing the scatterlist > > into request structures) > > Not only do we allow that, we do that in lots of places. > Fair enough. So

Re: [PATCH] crypto - shash: reduce minimum alignment of shash_desc structure

2021-01-08 Thread Herbert Xu
On Fri, Jan 08, 2021 at 09:36:23AM +0100, Ard Biesheuvel wrote: > > scatterlists, and I don't think we permit pointing the scatterlist > into request structures) Not only do we allow that, we do that in lots of places. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/

Re: [PATCH] crypto - shash: reduce minimum alignment of shash_desc structure

2021-01-08 Thread Ard Biesheuvel
On Thu, 7 Jan 2021 at 20:02, Eric Biggers wrote: > > On Thu, Jan 07, 2021 at 01:41:28PM +0100, Ard Biesheuvel wrote: > > Unlike many other structure types defined in the crypto API, the > > 'shash_desc' structure is permitted to live on the stack, which > > implies its contents may not be accessed

Re: [PATCH] crypto - shash: reduce minimum alignment of shash_desc structure

2021-01-07 Thread Eric Biggers
On Thu, Jan 07, 2021 at 01:41:28PM +0100, Ard Biesheuvel wrote: > Unlike many other structure types defined in the crypto API, the > 'shash_desc' structure is permitted to live on the stack, which > implies its contents may not be accessed by DMA masters. (This is > due to the fact that the stack m