Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1542137

Re: [PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform

From Hannes Frederic Sowa <hannes@stressinduktion.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform
Date 2016-12-14 20:30 +0100
Message-ID <sOnpv-2DO-17@gated-at.bofh.it> (permalink)
References <sO93b-1Im-3@gated-at.bofh.it> <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>
Organization linux.* mail to news gateway

Show all headers | View raw


On 14.12.2016 19:06, Jason A. Donenfeld wrote:
> Hi David,
> 
> On Wed, Dec 14, 2016 at 6:56 PM, David Miller <davem@davemloft.net> wrote:
>> Just marking the structure __packed, whether necessary or not, makes
>> the compiler assume that the members are not aligned and causes
>> byte-by-byte accesses to be performed for words.
>> Never, _ever_, use __packed unless absolutely necessary, it pessimizes
>> the code on cpus that require proper alignment of types.
> 
> Oh, jimminy cricket, I did not realize that it made assignments
> byte-by-byte *always*. So what options am I left with? What
> immediately comes to mind are:
> 
> 1)
> 
> struct {
>     u64 a;
>     u32 b;
>     u32 c;
>     u16 d;
>     u8 end[];

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?

Bye,
Hannes

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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