Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1542146
| From | "Jason A. Donenfeld" <Jason@zx2c4.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform |
| Date | 2016-12-14 20:40 +0100 |
| Message-ID | <sOnzc-2MP-29@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <sO93b-1Im-11@gated-at.bofh.it> <sOhk5-6yG-21@gated-at.bofh.it> <sOm0p-1bT-5@gated-at.bofh.it> <sOma6-1ze-15@gated-at.bofh.it> <sOnpv-2DO-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Hannes,
On Wed, Dec 14, 2016 at 8:22 PM, Hannes Frederic Sowa
<hannes@stressinduktion.org> wrote:
> I don't think this helps. Did you test it? I don't see reason why
> padding could be left out between `d' and `end' because of the flexible
> array member?
Because the type u8 doesn't require any alignment requirements, it can
nestle right up there cozy with the u16:
zx2c4@thinkpad ~ $ cat a.c
#include <stdint.h>
#include <stdio.h>
#include <stddef.h>
int main()
{
struct {
uint64_t a;
uint32_t b;
uint32_t c;
uint16_t d;
char x[];
} a;
printf("%zu\n", sizeof(a));
printf("%zu\n", offsetof(typeof(a), x));
return 0;
}
zx2c4@thinkpad ~ $ gcc a.c
zx2c4@thinkpad ~ $ ./a.out
24
18
Jason
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-14 05:10 +0100
Re: [PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-14 14:00 +0100
Re: [PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-12-14 14:20 +0100
Re: [PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-14 14:50 +0100
RE: [PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform David Laight <David.Laight@ACULAB.COM> - 2016-12-14 15:50 +0100
Re: [PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-14 19:00 +0100
Re: [PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform David Miller <davem@davemloft.net> - 2016-12-14 19:00 +0100
Re: [PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-14 19:10 +0100
Re: [PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-12-14 20:30 +0100
Re: [PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-14 20:40 +0100
Re: [PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-12-14 21:30 +0100
Re: [PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform Tom Herbert <tom@herbertland.com> - 2016-12-14 21:20 +0100
Re: [PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-14 22:10 +0100
csiph-web