From: Eric Biggers <ebiggers3@gmail.com>
To: kernel-hardening@lists.openwall.com
Cc: Andy Lutomirski <luto@amacapital.net>,
linux-crypto@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Andrew Lutomirski <luto@kernel.org>,
Stephan Mueller <smueller@chronox.de>
Subject: Re: [kernel-hardening] Re: Remaining crypto API regressions with CONFIG_VMAP_STACK
Date: Fri, 9 Dec 2016 22:30:39 -0800 [thread overview]
Message-ID: <20161210063039.GA8630@zzz> (raw)
In-Reply-To: <20161210053711.GB27951@gondor.apana.org.au>
On Sat, Dec 10, 2016 at 01:37:12PM +0800, Herbert Xu wrote:
> On Fri, Dec 09, 2016 at 09:25:38PM -0800, Andy Lutomirski wrote:
> >
> > Herbert, how hard would it be to teach the crypto code to use a more
> > sensible data structure than scatterlist and to use coccinelle fix
> > this stuff for real?
>
> First of all we already have a sync non-SG hash interface, it's
> called shash.
>
> If we had enough sync-only users of skcipher then I'll consider
> adding an interface for it. However, at this point in time it
> appears to more sense to convert such users over to the async
> interface rather than the other way around.
>
> As for AEAD we never had a sync interface to begin with and I
> don't think I'm going to add one.
>
Isn't the question of "should the API use physical or virtual addresses"
independent of the question of "should the API support asynchronous requests"?
You can already choose, via the flags and mask arguments when allocating a
crypto transform, whether you want it to be synchronous or asynchronous or
whether you don't care. I don't see what that says about whether the API should
take in physical memory (e.g. scatterlists or struct pages) or virtual memory
(e.g. iov_iters or just regular pointers).
And while it's true that asynchronous algorithms are often provided by hardware
drivers that operate on physical memory, it's not always the case. For example
some of the AES-NI algorithms are asynchronous only because they use the SSE
registers which can't always available to kernel code, so the request may need
to be processed by another thread.
Eric
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-12-10 6:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 23:08 Eric Biggers
2016-12-10 5:25 ` Andy Lutomirski
2016-12-10 5:32 ` Herbert Xu
2016-12-10 6:03 ` [kernel-hardening] " Eric Biggers
2016-12-10 8:16 ` Herbert Xu
2016-12-10 8:39 ` Eric Biggers
2016-12-10 5:37 ` Herbert Xu
2016-12-10 6:30 ` Eric Biggers [this message]
2016-12-10 14:45 ` [kernel-hardening] " Jason A. Donenfeld
2016-12-10 17:48 ` Andy Lutomirski
2016-12-10 5:55 ` Eric Biggers
2016-12-11 19:13 ` Andy Lutomirski
2016-12-11 23:31 ` Eric Biggers
2016-12-12 18:34 ` Andy Lutomirski
2016-12-12 18:45 ` Gary R Hook
2016-12-13 3:39 ` Herbert Xu
2016-12-13 3:39 ` Herbert Xu
2016-12-13 17:06 ` Andy Lutomirski
2016-12-14 4:56 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161210063039.GA8630@zzz \
--to=ebiggers3@gmail.com \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@amacapital.net \
--cc=luto@kernel.org \
--cc=smueller@chronox.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox