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


Groups > linux.kernel > #1666604

Re: Crypto Fixes for 4.12

From Herbert Xu <herbert@gondor.apana.org.au>
Newsgroups linux.kernel
Subject Re: Crypto Fixes for 4.12
Date 2017-06-15 11:50 +0200
Message-ID <tSzzA-MV-9@gated-at.bofh.it> (permalink)
References (3 earlier) <thcBY-5Kp-23@gated-at.bofh.it> <tK8ZA-68C-5@gated-at.bofh.it> <tQ1Vo-2mY-19@gated-at.bofh.it> <tSriG-3Uo-7@gated-at.bofh.it> <tSyWR-yc-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jun 15, 2017 at 06:04:44PM +0900, Linus Torvalds wrote:
>
> Then you *could* implement SHASH_DESC_ON_STACK() as a kmalloc, and
> SHASH_DESC_DEALLOC() would be a kfree - but with an alloca()-like
> allocation the SHASH_DESC_DEALLOC() would be that "barrier_data()".
> 
> At that point the interface would make _sense_ at some conceptual
> level, rather than being a random hack for a small collection of
> random users of this thing.

Yes we could probably do that.

> There's a fair number of SHASH_DESC_ON_STACK users, are all the others
> safe for some random reason that just happens to be about code
> generation? Did people actually verify that?

If I understand this correctly this is only an issue if you directly
return a value from the shash_desc struct allocated on the stack.
This is usually rare as normally you'd return an error code and the
hash result would be written directly to some memory passed in from
the caller.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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


Thread

Crypto Fixes for 4.12 Herbert Xu <herbert@gondor.apana.org.au> - 2017-06-08 11:30 +0200
  Re: Crypto Fixes for 4.12 David Miller <davem@davemloft.net> - 2017-06-08 16:10 +0200
    Re: Crypto Fixes for 4.12 Herbert Xu <herbert@gondor.apana.org.au> - 2017-06-09 05:00 +0200
  Crypto Fixes for 4.12 Herbert Xu <herbert@gondor.apana.org.au> - 2017-06-15 03:00 +0200
    Re: Crypto Fixes for 4.12 Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-15 11:10 +0200
      Re: Crypto Fixes for 4.12 Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-15 11:10 +0200
      Re: Crypto Fixes for 4.12 Herbert Xu <herbert@gondor.apana.org.au> - 2017-06-15 11:50 +0200
        Re: Crypto Fixes for 4.12 David Miller <davem@davemloft.net> - 2017-06-15 17:10 +0200
      Re: Crypto Fixes for 4.12 David Miller <davem@davemloft.net> - 2017-06-15 17:10 +0200
        Re: Crypto Fixes for 4.12 Theodore Ts'o <tytso@mit.edu> - 2017-06-16 15:00 +0200
          Re: Crypto Fixes for 4.12 David Miller <davem@davemloft.net> - 2017-06-16 19:00 +0200

csiph-web