Hi Dear Herbert,
Sorry to bother you , but we’ve met a problem in crypto module,
would you please kindly help us look into it ? Thank you very much.
In the below function chain, scatterwalk_start() doesn't check the
result of sg_next(), so the kernel will crash if sg_ne
On Wed, Nov 14, 2018 at 12:21:11PM -0800, Eric Biggers wrote:
> From: Eric Biggers
>
> 'shash' algorithms are always synchronous, so passing CRYPTO_ALG_ASYNC
> in the mask to crypto_alloc_shash() has no effect. Many users therefore
> already don't pass it, but some still do. This inconsistency
On Wed, Nov 14, 2018 at 12:19:39PM -0800, Eric Biggers wrote:
> From: Eric Biggers
>
> 'cipher' algorithms (single block ciphers) are always synchronous, so
> passing CRYPTO_ALG_ASYNC in the mask to crypto_alloc_cipher() has no
> effect. Many users therefore already don't pass it, but some still
On Fri, Nov 16, 2018 at 05:26:17PM -0800, Eric Biggers wrote:
> Hello,
>
> We've been working to find a way to bring storage encryption to
> entry-level Android devices like the inexpensive "Android Go" devices
> sold in developing countries, and some smartwatches. Unfortunately,
> often these de
On Wed, Nov 14, 2018 at 11:35:48AM -0800, Eric Biggers wrote:
> From: Eric Biggers
>
> Some algorithms initialize their .cra_list prior to registration.
> But this is unnecessary since crypto_register_alg() will overwrite
> .cra_list when adding the algorithm to the 'crypto_alg_list'.
> Apparentl
On Wed, Nov 14, 2018 at 11:10:53AM -0800, Eric Biggers wrote:
> From: Eric Biggers
>
> Remove the unnecessary setting of CRYPTO_ALG_TYPE_SKCIPHER.
> Commit 2c95e6d97892 ("crypto: skcipher - remove useless setting of type
> flags") took care of this everywhere else, but a few more instances made
>
From: Jason A. Donenfeld
This ports SSSE3, AVX-2, AVX-512F, and AVX-512VL implementations for
ChaCha20. The AVX-512F implementation is disabled on Skylake, due to
throttling, and the VL ymm implementation is used instead. These come
from Andy Polyakov's implementation, with the following modifica
From: Jason A. Donenfeld
This implements the ChaCha20 permutation as a single C statement, by way
of the comma operator, which the compiler is able to simplify
terrifically.
Information: https://cr.yp.to/chacha.html
Signed-off-by: Jason A. Donenfeld
Cc: Samuel Neves
Cc: Jean-Philippe Aumasson
This patch exposes the crypto API x86 chacha20 implementation through
zinc.
Signed-off-by: Herbert Xu
---
lib/zinc/Kconfig |1
lib/zinc/chacha20/chacha20-x86_64-glue.c | 55 +++
lib/zinc/chacha20/chacha20.c |4 ++
3 file
This patch exports the raw chacha20 functions, including the generic
as well as x86/arm accelerated versions. This allows them to be
used without going through the crypto API.
This patch also renames struct chacha20_ctx to crypto_chacha20_ctx
to avoid naming conflicts with zinc.
In order to ensu
On Mon, Nov 19, 2018 at 01:24:51PM +0800, Herbert Xu wrote:
>
> In response to Martin's patch-set which I merged last week, I think
> here is quick way out for the zinc interface.
>
> Going through the past zinc discussions it would appear that
> everybody is quite happy with the zinc interface pe
On Tue, Nov 20, 2018 at 06:46:59AM +0100, LABBE Corentin wrote:
> On Tue, Nov 20, 2018 at 11:10:47AM +0800, Herbert Xu wrote:
> > On Mon, Nov 19, 2018 at 12:25:10PM -0800, Ard Biesheuvel wrote:
> > > On Mon, 19 Nov 2018 at 11:53, Corentin Labbe wrote:
> > > >
> > > > Since we will need crypto_alg_
On Tue, Nov 20, 2018 at 11:10:47AM +0800, Herbert Xu wrote:
> On Mon, Nov 19, 2018 at 12:25:10PM -0800, Ard Biesheuvel wrote:
> > On Mon, 19 Nov 2018 at 11:53, Corentin Labbe wrote:
> > >
> > > Since we will need crypto_alg_get/crypto_alg_put for "locking"
> > > crypto_alg when updating stats, we
On Tue, Nov 20, 2018 at 11:07:02AM +0800, Kenneth Lee wrote:
> On Mon, Nov 19, 2018 at 11:49:54AM -0700, Jason Gunthorpe wrote:
> > Date: Mon, 19 Nov 2018 11:49:54 -0700
> > From: Jason Gunthorpe
> > To: Kenneth Lee
> > CC: Leon Romanovsky , Kenneth Lee ,
> > Tim Sell , linux-...@vger.kernel.org
Hallo,
Sie haben eine wohltätige Spende in Höhe von 4.800, 000.00EUR, ich der
Amerika-Lotterie Wert $ 560 Millionen gewonnen und ich bin einen Teil davon
fünf glückliche Menschen und Altersheimen Spenden.Kontaktieren Sie mich für
diesen Gott Gelegenheit per e-Mail: jane.d...@zoho.com
--
This
On Tue, Nov 20, 2018 at 11:07:02AM +0800, Kenneth Lee wrote:
> On Mon, Nov 19, 2018 at 11:49:54AM -0700, Jason Gunthorpe wrote:
> > Date: Mon, 19 Nov 2018 11:49:54 -0700
> > From: Jason Gunthorpe
> > To: Kenneth Lee
> > CC: Leon Romanovsky , Kenneth Lee ,
> > Tim Sell , linux-...@vger.kernel.org
On Mon, Nov 19, 2018 at 12:25:10PM -0800, Ard Biesheuvel wrote:
> On Mon, 19 Nov 2018 at 11:53, Corentin Labbe wrote:
> >
> > Since we will need crypto_alg_get/crypto_alg_put for "locking"
> > crypto_alg when updating stats, we need it to be via linux/crypto.h
> >
>
> This seems backwards to me.
Hi Herbert,
On Tue, Nov 20, 2018 at 4:06 AM Herbert Xu wrote:
> > I'd still prefer to see the conversion patches included. Skipping them
> > would be
> > kicking the can down the road and avoiding issues that will need to be
> > addressed
> > anyway. Like you, I don't want a "half-baked conco
On Mon, Nov 19, 2018 at 02:54:15PM -0800, Eric Biggers wrote:
>
> > I think the remaining issue right now is how to order my series and
> > Eric's series. If Eric's goes in first, it means that I can either a)
> > spend some time developing Zinc further _now_ to support chacha12 and
> > keep the to
On Mon, Nov 19, 2018 at 11:49:54AM -0700, Jason Gunthorpe wrote:
> Date: Mon, 19 Nov 2018 11:49:54 -0700
> From: Jason Gunthorpe
> To: Kenneth Lee
> CC: Leon Romanovsky , Kenneth Lee ,
> Tim Sell , linux-...@vger.kernel.org, Alexander
> Shishkin , Zaibo Xu
> , zhangfei@foxmail.com, linux..
On Mon, Nov 19, 2018 at 12:48:01PM +0200, Leon Romanovsky wrote:
> Date: Mon, 19 Nov 2018 12:48:01 +0200
> From: Leon Romanovsky
> To: Kenneth Lee
> CC: Tim Sell , linux-...@vger.kernel.org,
> Alexander Shishkin , Zaibo Xu
> , zhangfei@foxmail.com, linux...@huawei.com,
> haojian.zhu...@lin
Hi Eric,
On Tue, Nov 20, 2018 at 12:23 AM Eric Biggers wrote:
> It's much better to have the documentation in a permanent location.
Agreed.
> I actually did add ChaCha12 support to most of the Zinc assembly in
> "[WIP] crypto: assembly support for ChaCha12"
> (https://git.kernel.org/pub/scm/lin
On Tue, Nov 20, 2018 at 12:15:17AM +0100, Jason A. Donenfeld wrote:
> Hi Eric,
>
> On Mon, Nov 19, 2018 at 11:54 PM Eric Biggers wrote:
> > Will v9 include a documentation file for Zinc in Documentation/crypto/?
> > That's been suggested several times.
>
> I had started writing that there, but t
Hi Eric,
On Mon, Nov 19, 2018 at 11:54 PM Eric Biggers wrote:
> Will v9 include a documentation file for Zinc in Documentation/crypto/?
> That's been suggested several times.
I had started writing that there, but then thought that the requested
information could go in the commit message instead.
On Mon, Nov 19, 2018 at 07:13:07AM +0100, Jason A. Donenfeld wrote:
> Hi Herbert,
>
> On Mon, Nov 19, 2018 at 6:25 AM Herbert Xu
> wrote:
> > My proposal is to merge the zinc interface as is, but to invert
> > how we place the algorithm implementations. IOW the implementations
> > should stay w
On Mon, Nov 19, 2018 at 04:33:20PM -0500, Jerome Glisse wrote:
> On Mon, Nov 19, 2018 at 02:26:38PM -0700, Jason Gunthorpe wrote:
> > On Mon, Nov 19, 2018 at 03:26:15PM -0500, Jerome Glisse wrote:
> > > On Mon, Nov 19, 2018 at 01:11:56PM -0700, Jason Gunthorpe wrote:
> > > > On Mon, Nov 19, 2018 at
On Mon, Nov 19, 2018 at 02:26:38PM -0700, Jason Gunthorpe wrote:
> On Mon, Nov 19, 2018 at 03:26:15PM -0500, Jerome Glisse wrote:
> > On Mon, Nov 19, 2018 at 01:11:56PM -0700, Jason Gunthorpe wrote:
> > > On Mon, Nov 19, 2018 at 02:46:32PM -0500, Jerome Glisse wrote:
> > >
> > > > > ?? How can O_D
On Mon, Nov 19, 2018 at 03:26:15PM -0500, Jerome Glisse wrote:
> On Mon, Nov 19, 2018 at 01:11:56PM -0700, Jason Gunthorpe wrote:
> > On Mon, Nov 19, 2018 at 02:46:32PM -0500, Jerome Glisse wrote:
> >
> > > > ?? How can O_DIRECT be fine but RDMA not? They use exactly the same
> > > > get_user_page
On Mon, Nov 19, 2018 at 9:05 PM Milan Broz wrote:
> p.s.
> Reading the discussion about Zinc/Adiantum - I would perhaps prefer to merge
> Adiantum first (if it is ready).
> It is a new feature, I see it as useful cipher alternative for dm-crypt and
> it can be
> esily backported without Zinc to o
On Mon, Nov 19, 2018 at 01:11:56PM -0700, Jason Gunthorpe wrote:
> On Mon, Nov 19, 2018 at 02:46:32PM -0500, Jerome Glisse wrote:
>
> > > ?? How can O_DIRECT be fine but RDMA not? They use exactly the same
> > > get_user_pages flow, right? Can we do what O_DIRECT does in RDMA and
> > > be fine too
On Mon, 19 Nov 2018 at 11:53, Corentin Labbe wrote:
>
> Since we will need crypto_alg_get/crypto_alg_put for "locking"
> crypto_alg when updating stats, we need it to be via linux/crypto.h
>
This seems backwards to me. Surely, crypto stats are permitted to use
the internal crypto API?
> Signed-o
On Mon, Nov 19, 2018 at 02:46:32PM -0500, Jerome Glisse wrote:
> > ?? How can O_DIRECT be fine but RDMA not? They use exactly the same
> > get_user_pages flow, right? Can we do what O_DIRECT does in RDMA and
> > be fine too?
> >
> > AFAIK the only difference is the length of the race window. You'
Hi,
On 19/11/2018 20:28, Eric Biggers wrote:
> Note that Adiantum benchmarks on x86 are misleading at the moment, since the
> initial kernel patchset doesn't include SSE2 and AVX2 optimized XChaCha and
> NHPoly1305. To start, only C and arm32 NEON implementations are included.
> Hence, on x86 Adi
CRYPTO_STATS is using CRYPTO_USER stuff, so it should depends on it.
Signed-off-by: Corentin Labbe
---
crypto/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/crypto/Kconfig b/crypto/Kconfig
index 62dbd1a99fa3..a2f1b4a86b92 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -1829,6 +1
It is cleaner to have each stat in their own structures.
Signed-off-by: Corentin Labbe
---
crypto/crypto_user_stat.c | 20 +++
include/uapi/linux/cryptouser.h | 100
2 files changed, 72 insertions(+), 48 deletions(-)
diff --git a/crypto/crypto_user_st
Even if CRYPTO_STATS is set to n, some part of CRYPTO_STATS are
compiled.
This patch made all part of crypto_user_stat uncompiled in that case.
Signed-off-by: Corentin Labbe
---
crypto/Makefile | 3 ++-
crypto/algapi.c | 2 ++
include/crypto/internal/c
All the 32-bit fields need to be 64-bit. In some cases, UINT32_MAX crypto
operations can be done in seconds.
Reported-by: Eric Biggers
Signed-off-by: Corentin Labbe
---
crypto/algapi.c | 10 +--
crypto/crypto_user_stat.c | 114 +++-
include/cr
All crypto_stats functions use the struct xxx_request for feeding stats,
but in some case this structure could already be freed.
For fixing this, the needed parameters (len and alg) will be stored
before the request being executed.
Fixes: cac5818c25d0 ("crypto: user - Implement a generic crypto st
The use of the v64 intermediate variable is useless, and removing it
bring to much readable code.
Signed-off-by: Corentin Labbe
---
crypto/crypto_user_stat.c | 132 --
1 file changed, 41 insertions(+), 91 deletions(-)
diff --git a/crypto/crypto_user_stat.c b/
Like for userspace, this patch splits stats into multiple structures,
one for each algorithm class.
Signed-off-by: Corentin Labbe
---
crypto/algapi.c| 8 +-
crypto/crypto_user_stat.c | 82
include/crypto/acompress.h | 12 +--
include/crypto/aead.h | 12 +--
Since now all crypto stats are on their own structures, it is now
useless to have the algorithm name in the err_cnt member.
Signed-off-by: Corentin Labbe
---
crypto/crypto_user_stat.c | 18 +-
include/crypto/acompress.h | 4 ++--
include/crypto/aead.h | 4 +
Hello
This patchset fixes all reported problem by Eric Biggers.
Regards
Changes since v2:
- Better locking of crypto_alg via crypto_alg_get/crypto_alg_put
- remove all intermediate variables in crypto/crypto_user_stat.c
- splited all internal stats variables into different structures
Corentin L
Since we will need crypto_alg_get/crypto_alg_put for "locking"
crypto_alg when updating stats, we need it to be via linux/crypto.h
Signed-off-by: Corentin Labbe
---
crypto/internal.h | 12
include/linux/crypto.h | 12
2 files changed, 12 insertions(+), 12 deletions
This patch converts the getstat example tool to the recent changes done in
crypto_user_stat
- changed all stats to u64
- separated struct stats for each crypto alg
Signed-off-by: Corentin Labbe
---
tools/crypto/getstat.c | 54 +-
1 file changed, 27 insert
Some error count use the wrong name for getting this data.
But this had not caused any reporting problem, since all error count are shared
in the same
union.
Signed-off-by: Corentin Labbe
---
crypto/crypto_user_stat.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/cry
On Mon, Nov 19, 2018 at 12:27:02PM -0700, Jason Gunthorpe wrote:
> On Mon, Nov 19, 2018 at 02:17:21PM -0500, Jerome Glisse wrote:
> > On Mon, Nov 19, 2018 at 11:53:33AM -0700, Jason Gunthorpe wrote:
> > > On Mon, Nov 19, 2018 at 01:42:16PM -0500, Jerome Glisse wrote:
> > > > On Mon, Nov 19, 2018 at
Hi Milan,
On Sat, Nov 17, 2018 at 11:29:23AM +0100, Milan Broz wrote:
> On 16/11/2018 22:52, Eric Biggers wrote:
> > Hi Milan,
> >
> > On Sat, Oct 20, 2018 at 12:26:20PM +0200, Milan Broz wrote:
> >>
> >> Adiantum (as in your current git branches on kernel.org) can be used for
> >> dm-crypt
> >>
On Mon, Nov 19, 2018 at 02:17:21PM -0500, Jerome Glisse wrote:
> On Mon, Nov 19, 2018 at 11:53:33AM -0700, Jason Gunthorpe wrote:
> > On Mon, Nov 19, 2018 at 01:42:16PM -0500, Jerome Glisse wrote:
> > > On Mon, Nov 19, 2018 at 11:27:52AM -0700, Jason Gunthorpe wrote:
> > > > On Mon, Nov 19, 2018 at
On Mon, Nov 19, 2018 at 07:19:04PM +, Christopher Lameter wrote:
> On Mon, 19 Nov 2018, Jerome Glisse wrote:
>
> > > IIRC this is solved in IB by automatically calling
> > > madvise(MADV_DONTFORK) before creating the MR.
> > >
> > > MADV_DONTFORK
> > > .. This is useful to prevent copy-on-wr
On Mon, 19 Nov 2018, Jerome Glisse wrote:
> > IIRC this is solved in IB by automatically calling
> > madvise(MADV_DONTFORK) before creating the MR.
> >
> > MADV_DONTFORK
> > .. This is useful to prevent copy-on-write semantics from changing the
> > physical location of a page if the parent wri
On Mon, Nov 19, 2018 at 11:53:33AM -0700, Jason Gunthorpe wrote:
> On Mon, Nov 19, 2018 at 01:42:16PM -0500, Jerome Glisse wrote:
> > On Mon, Nov 19, 2018 at 11:27:52AM -0700, Jason Gunthorpe wrote:
> > > On Mon, Nov 19, 2018 at 11:48:54AM -0500, Jerome Glisse wrote:
> > >
> > > > Just to comment
On Mon, Nov 19, 2018 at 01:42:16PM -0500, Jerome Glisse wrote:
> On Mon, Nov 19, 2018 at 11:27:52AM -0700, Jason Gunthorpe wrote:
> > On Mon, Nov 19, 2018 at 11:48:54AM -0500, Jerome Glisse wrote:
> >
> > > Just to comment on this, any infiniband driver which use umem and do
> > > not have ODP (her
On Mon, Nov 19, 2018 at 01:42:16PM -0500, Jerome Glisse wrote:
> On Mon, Nov 19, 2018 at 11:27:52AM -0700, Jason Gunthorpe wrote:
> > On Mon, Nov 19, 2018 at 11:48:54AM -0500, Jerome Glisse wrote:
> >
> > > Just to comment on this, any infiniband driver which use umem and do
> > > not have ODP (he
On Mon, Nov 19, 2018 at 05:14:05PM +0800, Kenneth Lee wrote:
> If the hardware cannot share page table with the CPU, we then need to have
> some way to change the device page table. This is what happen in ODP. It
> invalidates the page table in device upon mmu_notifier call back. But this
> cann
On Mon, Nov 19, 2018 at 11:27:52AM -0700, Jason Gunthorpe wrote:
> On Mon, Nov 19, 2018 at 11:48:54AM -0500, Jerome Glisse wrote:
>
> > Just to comment on this, any infiniband driver which use umem and do
> > not have ODP (here ODP for me means listening to mmu notifier so all
> > infiniband drive
On Mon, Nov 19, 2018 at 11:48:54AM -0500, Jerome Glisse wrote:
> Just to comment on this, any infiniband driver which use umem and do
> not have ODP (here ODP for me means listening to mmu notifier so all
> infiniband driver except mlx5) will be affected by same issue AFAICT.
>
> AFAICT there is
Hi Martin,
On Mon, Nov 19, 2018 at 8:52 AM Martin Willi wrote:
>
> Adding AVX-512VL support is relatively simple. I have a patchset mostly
> ready that is more than competitive with the code from Zinc. I'll clean
> that up and do more testing before posting it later this week.
Terrific. Dependin
On Mon, Nov 19, 2018 at 12:48:01PM +0200, Leon Romanovsky wrote:
> On Mon, Nov 19, 2018 at 05:19:10PM +0800, Kenneth Lee wrote:
> > On Mon, Nov 19, 2018 at 05:14:05PM +0800, Kenneth Lee wrote:
> > > On Thu, Nov 15, 2018 at 04:54:55PM +0200, Leon Romanovsky wrote:
> > > > On Thu, Nov 15, 2018 at 04:
On Mon, Nov 19, 2018 at 05:19:10PM +0800, Kenneth Lee wrote:
> On Mon, Nov 19, 2018 at 05:14:05PM +0800, Kenneth Lee wrote:
> > Date: Mon, 19 Nov 2018 17:14:05 +0800
> > From: Kenneth Lee
> > To: Leon Romanovsky
> > CC: Tim Sell , linux-...@vger.kernel.org,
> > Alexander Shishkin , Zaibo Xu
> >
On Mon, Nov 19, 2018 at 05:14:05PM +0800, Kenneth Lee wrote:
> Date: Mon, 19 Nov 2018 17:14:05 +0800
> From: Kenneth Lee
> To: Leon Romanovsky
> CC: Tim Sell , linux-...@vger.kernel.org,
> Alexander Shishkin , Zaibo Xu
> , zhangfei@foxmail.com, linux...@huawei.com,
> haojian.zhu...@linaro.
On Thu, Nov 15, 2018 at 04:54:55PM +0200, Leon Romanovsky wrote:
> Date: Thu, 15 Nov 2018 16:54:55 +0200
> From: Leon Romanovsky
> To: Kenneth Lee
> CC: Kenneth Lee , Tim Sell ,
> linux-...@vger.kernel.org, Alexander Shishkin
> , Zaibo Xu ,
> zhangfei@foxmail.com, linux...@huawei.com, haoj
61 matches
Mail list logo