Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1611082
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] crypto: ccp - Reduce stack frame size with KASAN |
| Date | 2017-03-28 17:20 +0200 |
| Message-ID | <tq14B-16f-3@gated-at.bofh.it> (permalink) |
| References | <tpWeC-62o-21@gated-at.bofh.it> <tq0UV-12M-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Mar 28, 2017 at 4:15 PM, Gary R Hook <ghook@amd.com> 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
>> --- a/drivers/crypto/ccp/ccp-dev.h
>> +++ b/drivers/crypto/ccp/ccp-dev.h
>> @@ -432,24 +432,24 @@ struct ccp_dma_info {
>> unsigned int offset;
>> unsigned int length;
>> enum dma_data_direction dir;
>> -};
>> +} __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 supported
compilers (3.2 and higher), while #pragma pack() requires gcc-4.0 or
higher.
We generally prefer attribute syntax in the kernel over pragmas, even
when they are functionally the same.
Arnd
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/2] crypto: ccp - Reduce stack frame size with KASAN Arnd Bergmann <arnd@arndb.de> - 2017-03-28 12:10 +0200
[PATCH 2/2] crypto: ccp - Mark driver as little-endian only Arnd Bergmann <arnd@arndb.de> - 2017-03-28 12:10 +0200
Re: [PATCH 2/2] crypto: ccp - Mark driver as little-endian only Arnd Bergmann <arnd@arndb.de> - 2017-03-28 17:10 +0200
Re: [PATCH 1/2] crypto: ccp - Reduce stack frame size with KASAN Arnd Bergmann <arnd@arndb.de> - 2017-03-28 17:10 +0200
Re: [PATCH 1/2] crypto: ccp - Reduce stack frame size with KASAN Arnd Bergmann <arnd@arndb.de> - 2017-03-28 17:20 +0200
csiph-web