Re: [PATCH 1/2] crypto: ccp - Reduce stack frame size with KASAN

2017-03-28 Thread Gary R Hook
On 03/28/2017 10:10 AM, Arnd Bergmann wrote: -}; +} __packed __aligned(4); My gcc 4.8 doesn't understand __aligned(). Shouldn't we use #pragma(4) here? That is odd, the __aligned() macro gets defined for all compiler versions in linux/compiler.h, and the aligned attribute should work for all

Re: [PATCH 1/2] crypto: ccp - Reduce stack frame size with KASAN

2017-03-28 Thread Gary R Hook
On 03/28/2017 10:10 AM, Arnd Bergmann wrote: -}; +} __packed __aligned(4); My gcc 4.8 doesn't understand __aligned(). Shouldn't we use #pragma(4) here? That is odd, the __aligned() macro gets defined for all compiler versions in linux/compiler.h, and the aligned attribute should work for all

Re: [PATCH 1/2] crypto: ccp - Reduce stack frame size with KASAN

2017-03-28 Thread Gary R Hook
On 03/28/2017 10:10 AM, Arnd Bergmann wrote: On Tue, Mar 28, 2017 at 4:15 PM, Gary R Hook wrote: On 03/28/2017 04:58 AM, Arnd Bergmann wrote:> The newly added AES GCM implementation uses one of the largest stack frames diff --git a/drivers/crypto/ccp/ccp-dev.h

Re: [PATCH 1/2] crypto: ccp - Reduce stack frame size with KASAN

2017-03-28 Thread Gary R Hook
On 03/28/2017 10:10 AM, Arnd Bergmann wrote: On Tue, Mar 28, 2017 at 4:15 PM, Gary R Hook wrote: On 03/28/2017 04:58 AM, Arnd Bergmann wrote:> The newly added AES GCM implementation uses one of the largest stack frames diff --git a/drivers/crypto/ccp/ccp-dev.h b/drivers/crypto/ccp/ccp-dev.h

Re: [PATCH 1/2] crypto: ccp - Reduce stack frame size with KASAN

2017-03-28 Thread Arnd Bergmann
On Tue, Mar 28, 2017 at 4:15 PM, Gary R Hook wrote: > On 03/28/2017 04:58 AM, Arnd Bergmann wrote:> The newly added AES GCM > implementation uses one of the largest stack frames >> diff --git a/drivers/crypto/ccp/ccp-dev.h b/drivers/crypto/ccp/ccp-dev.h >> index

Re: [PATCH 1/2] crypto: ccp - Reduce stack frame size with KASAN

2017-03-28 Thread Arnd Bergmann
On Tue, Mar 28, 2017 at 4:15 PM, Gary R Hook wrote: > On 03/28/2017 04:58 AM, Arnd Bergmann wrote:> The newly added AES GCM > implementation uses one of the largest stack frames >> diff --git a/drivers/crypto/ccp/ccp-dev.h b/drivers/crypto/ccp/ccp-dev.h >> index 3a45c2af2fbd..c5ea0796a891 100644

Re: [PATCH 1/2] crypto: ccp - Reduce stack frame size with KASAN

2017-03-28 Thread Arnd Bergmann
On Tue, Mar 28, 2017 at 4:15 PM, Gary R Hook wrote: >> A more drastic refactoring of the driver might be needed to reduce the >> stack usage more substantially, but this patch is fairly simple and >> at least addresses the third one of the problems I mentioned, reducing the >>

Re: [PATCH 1/2] crypto: ccp - Reduce stack frame size with KASAN

2017-03-28 Thread Arnd Bergmann
On Tue, Mar 28, 2017 at 4:15 PM, Gary R Hook wrote: >> A more drastic refactoring of the driver might be needed to reduce the >> stack usage more substantially, but this patch is fairly simple and >> at least addresses the third one of the problems I mentioned, reducing the >> stack size by

Re: [PATCH 1/2] crypto: ccp - Reduce stack frame size with KASAN

2017-03-28 Thread Gary R Hook
On 03/28/2017 04:58 AM, Arnd Bergmann wrote:> The newly added AES GCM implementation uses one of the largest stack frames in the kernel, around 1KB on normal 64-bit kernels, and 1.6KB when CONFIG_KASAN is enabled: drivers/crypto/ccp/ccp-ops.c: In function 'ccp_run_aes_gcm_cmd':

Re: [PATCH 1/2] crypto: ccp - Reduce stack frame size with KASAN

2017-03-28 Thread Gary R Hook
On 03/28/2017 04:58 AM, Arnd Bergmann wrote:> The newly added AES GCM implementation uses one of the largest stack frames in the kernel, around 1KB on normal 64-bit kernels, and 1.6KB when CONFIG_KASAN is enabled: drivers/crypto/ccp/ccp-ops.c: In function 'ccp_run_aes_gcm_cmd':

[PATCH 1/2] crypto: ccp - Reduce stack frame size with KASAN

2017-03-28 Thread Arnd Bergmann
The newly added AES GCM implementation uses one of the largest stack frames in the kernel, around 1KB on normal 64-bit kernels, and 1.6KB when CONFIG_KASAN is enabled: drivers/crypto/ccp/ccp-ops.c: In function 'ccp_run_aes_gcm_cmd': drivers/crypto/ccp/ccp-ops.c:851:1: error: the frame size of

[PATCH 1/2] crypto: ccp - Reduce stack frame size with KASAN

2017-03-28 Thread Arnd Bergmann
The newly added AES GCM implementation uses one of the largest stack frames in the kernel, around 1KB on normal 64-bit kernels, and 1.6KB when CONFIG_KASAN is enabled: drivers/crypto/ccp/ccp-ops.c: In function 'ccp_run_aes_gcm_cmd': drivers/crypto/ccp/ccp-ops.c:851:1: error: the frame size of