Date: Tue, 13 Dec 2016 09:06:31 -0800 From: Andy Lutomirski <luto@...capital.net> To: Herbert Xu <herbert@...dor.apana.org.au> Cc: Eric Biggers <ebiggers3@...il.com>, linux-crypto@...r.kernel.org, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "linux-mm@...ck.org" <linux-mm@...ck.org>, "kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>, Andrew Lutomirski <luto@...nel.org>, Stephan Mueller <smueller@...onox.de> Subject: Re: Remaining crypto API regressions with CONFIG_VMAP_STACK On Mon, Dec 12, 2016 at 7:39 PM, Herbert Xu <herbert@...dor.apana.org.au> wrote: > On Mon, Dec 12, 2016 at 10:34:10AM -0800, Andy Lutomirski wrote: >> >> Here's my status. >> >> > drivers/crypto/bfin_crc.c:351 >> > drivers/crypto/qce/sha.c:299 >> > drivers/crypto/sahara.c:973,988 >> > drivers/crypto/talitos.c:1910 >> > drivers/crypto/qce/sha.c:325 >> >> I have a patch to make these depend on !VMAP_STACK. > > Why? They're all marked as ASYNC AFAIK. > >> I have a patch to convert this to, drumroll please: >> >> priv->tx_tfm_mic = crypto_alloc_shash("michael_mic", 0, >> CRYPTO_ALG_ASYNC); >> >> Herbert, I'm at a loss as what a "shash" that's "ASYNC" even means. > > Having 0 as type and CRYPTO_ALG_ASYNC as mask in general means > that we're requesting a sync algorithm (i.e., ASYNC bit off). > > However, it is completely unnecessary for shash as they can never > be async. So this could be changed to just ("michael_mic", 0, 0). I'm confused by a bunch of this. 1. Is it really the case that crypto_alloc_xyz(..., CRYPTO_ALG_ASYNC) means to allocate a *synchronous* transform? That's not what I expected. 2. What guarantees that an async request is never allocated on the stack? If it's just convention, could an assertion be added somewhere?
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.