Re: [PATCH] random: use correct memory barriers for crng_node_pool

2020-09-24 Thread Paul E. McKenney
On Thu, Sep 24, 2020 at 07:09:08PM -0700, Eric Biggers wrote: > On Thu, Sep 24, 2020 at 05:59:34PM -0700, Paul E. McKenney wrote: > > On Tue, Sep 22, 2020 at 02:55:58PM -0700, Eric Biggers wrote: > > > On Tue, Sep 22, 2020 at 01:56:28PM -0700, Paul E. McKenney wrote: > > > > > You're missing the po

Re: [PATCH] random: use correct memory barriers for crng_node_pool

2020-09-24 Thread Eric Biggers
On Thu, Sep 24, 2020 at 05:59:34PM -0700, Paul E. McKenney wrote: > On Tue, Sep 22, 2020 at 02:55:58PM -0700, Eric Biggers wrote: > > On Tue, Sep 22, 2020 at 01:56:28PM -0700, Paul E. McKenney wrote: > > > > You're missing the point here. b and c could easily be allocated by a > > > > function >

Re: [PATCH] random: use correct memory barriers for crng_node_pool

2020-09-24 Thread Paul E. McKenney
On Tue, Sep 22, 2020 at 02:55:58PM -0700, Eric Biggers wrote: > On Tue, Sep 22, 2020 at 01:56:28PM -0700, Paul E. McKenney wrote: > > > You're missing the point here. b and c could easily be allocated by a > > > function > > > alloc_b() that's in another file. > > > > I am still missing somethin

Re: [PATCH 2/2] crypto: xor - use ktime for template benchmarking

2020-09-24 Thread Doug Anderson
Hi, On Thu, Sep 24, 2020 at 11:40 AM Ard Biesheuvel wrote: > > On Thu, 24 Sep 2020 at 20:22, Doug Anderson wrote: > > > > Hi, > > > > On Thu, Sep 24, 2020 at 8:36 AM Ard Biesheuvel wrote: > > > > > > On Thu, 24 Sep 2020 at 17:28, Doug Anderson wrote: > > > > > > > > On Thu, Sep 24, 2020 at 1:3

Re: [PATCH 2/2] crypto: xor - use ktime for template benchmarking

2020-09-24 Thread Ard Biesheuvel
On Thu, 24 Sep 2020 at 20:22, Doug Anderson wrote: > > Hi, > > On Thu, Sep 24, 2020 at 8:36 AM Ard Biesheuvel wrote: > > > > On Thu, 24 Sep 2020 at 17:28, Doug Anderson wrote: > > > > > > On Thu, Sep 24, 2020 at 1:32 AM Ard Biesheuvel wrote: > > > > > > ... > > > > > > +#define REPS 1

Re: [PATCH 2/2] crypto: xor - use ktime for template benchmarking

2020-09-24 Thread Doug Anderson
Hi, On Thu, Sep 24, 2020 at 8:36 AM Ard Biesheuvel wrote: > > On Thu, 24 Sep 2020 at 17:28, Doug Anderson wrote: > > > > On Thu, Sep 24, 2020 at 1:32 AM Ard Biesheuvel wrote: > > > > ... > > > > > +#define REPS 100 > > > > > > > > Is this sufficient? I'm not sure what the lower bound

Re: [PATCH 2/2] crypto: xor - use ktime for template benchmarking

2020-09-24 Thread Ard Biesheuvel
On Thu, 24 Sep 2020 at 17:28, Doug Anderson wrote: > > On Thu, Sep 24, 2020 at 1:32 AM Ard Biesheuvel wrote: > > ... > > > > +#define REPS 100 > > > > > > Is this sufficient? I'm not sure what the lower bound on what's > > > expected of ktime. If I'm doing the math right, on your syst

Re: [PATCH 2/2] crypto: xor - use ktime for template benchmarking

2020-09-24 Thread Doug Anderson
Hi, On Thu, Sep 24, 2020 at 1:32 AM Ard Biesheuvel wrote: > > On Thu, 24 Sep 2020 at 02:36, Doug Anderson wrote: > > > > Hi, > > > > On Wed, Sep 23, 2020 at 11:22 AM Ard Biesheuvel wrote: > > > > > > Currently, we use the jiffies counter as a time source, by staring at > > > it until a HZ perio

Re: [v2 PATCH] crypto: sun4i-ss - Fix sparse endianness markers

2020-09-24 Thread Corentin Labbe
On Thu, Sep 24, 2020 at 01:08:59PM +1000, Herbert Xu wrote: > On Mon, Sep 14, 2020 at 12:40:58PM +0200, Corentin Labbe wrote: > > > > I got this on next-20200910/multi_v7_defconfig BigEndian > > [ 12.137856] alg: hash: skipping comparison tests for md5-sun4i-ss > > because md5-generic is unavail

Re: [PATCH] crypto: inside-secure - Fix corruption on not fully coherent systems

2020-09-24 Thread Herbert Xu
On Thu, Sep 24, 2020 at 12:51:11PM +, Van Leeuwen, Pascal wrote: > > But you still have 2 potential gaps (from buffer 1 to buffer 2 and from > buffer 2 to > the other items in the struct) that are larger then they may need to be. So put some of the rest of your struct in the middle, up to 128

RE: [PATCH] crypto: inside-secure - Fix corruption on not fully coherent systems

2020-09-24 Thread Van Leeuwen, Pascal
> -Original Message- > From: Herbert Xu > Sent: Thursday, September 24, 2020 2:36 PM > To: Van Leeuwen, Pascal > Cc: linux-crypto@vger.kernel.org; antoine.ten...@bootlin.com; > da...@davemloft.net; Ard Biesheuvel > Subject: Re: [PATCH] crypto: inside-secure - Fix corruption on not full

Re: [PATCH] crypto: inside-secure - Fix corruption on not fully coherent systems

2020-09-24 Thread Herbert Xu
On Thu, Sep 24, 2020 at 08:08:12AM +, Van Leeuwen, Pascal wrote: > > The fact that kmalloc uses it does _not_ rule out the fact that it wastes > memory ... > And as long as you use kmalloc for fairly large data structures, it shouldn't > matter much. > But here I need a couple of fairly small

Re: [PATCH 2/2] crypto: xor - use ktime for template benchmarking

2020-09-24 Thread Ard Biesheuvel
On Thu, 24 Sep 2020 at 02:36, Doug Anderson wrote: > > Hi, > > On Wed, Sep 23, 2020 at 11:22 AM Ard Biesheuvel wrote: > > > > Currently, we use the jiffies counter as a time source, by staring at > > it until a HZ period elapses, and then staring at it again and perform > > as many XOR operations

Re: [PATCH v3 3/9] lib: zstd: Upgrade to latest upstream zstd version 1.4.6

2020-09-24 Thread Rong Chen
; as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Nick-Terrell/Update-to-zstd-1-4-6/20200924-064102 base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next config: h8300-randconfig-p002-20200923 (attached as .c

RE: [PATCH] crypto: inside-secure - Fix corruption on not fully coherent systems

2020-09-24 Thread Van Leeuwen, Pascal
> -Original Message- > From: Herbert Xu > Sent: Thursday, September 24, 2020 5:12 AM > To: Van Leeuwen, Pascal > Cc: linux-crypto@vger.kernel.org; antoine.ten...@bootlin.com; > da...@davemloft.net; Ard Biesheuvel > Subject: Re: [PATCH] crypto: inside-secure - Fix corruption on not fully