Re: [PATCH v9 00/11] x86: PIE support to extend KASLR randomization

2019-08-29 Thread Thomas Garnier
On Tue, Aug 6, 2019 at 8:51 AM Peter Zijlstra wrote: > > On Tue, Aug 06, 2019 at 05:43:47PM +0200, Borislav Petkov wrote: > > On Tue, Jul 30, 2019 at 12:12:44PM -0700, Thomas Garnier wrote: > > > These patches make some of the changes necessary to build the kernel as > > > Position Independent Exe

[PATCH v2 1/9] padata: allocate workqueue internally

2019-08-29 Thread Daniel Jordan
Move workqueue allocation inside of padata to prepare for further changes to how padata uses workqueues. Guarantees the workqueue is created with max_active=1, which padata relies on to work correctly. No functional change. Signed-off-by: Daniel Jordan Acked-by: Steffen Klassert Cc: Herbert Xu

[PATCH v2 9/9] padata: remove cpu_index from the parallel_queue

2019-08-29 Thread Daniel Jordan
With the removal of the ENODATA case from padata_get_next, the cpu_index field is no longer useful, so it can go away. Signed-off-by: Daniel Jordan Acked-by: Steffen Klassert Cc: Herbert Xu Cc: Lai Jiangshan Cc: Peter Zijlstra Cc: Tejun Heo Cc: linux-crypto@vger.kernel.org Cc: linux-ker...@v

[PATCH v2 6/9] padata, pcrypt: take CPU hotplug lock internally in padata_alloc_possible

2019-08-29 Thread Daniel Jordan
With pcrypt's cpumask no longer used, take the CPU hotplug lock inside padata_alloc_possible. Useful later in the series for avoiding nested acquisition of the CPU hotplug lock in padata when padata_alloc_possible is allocating an unbound workqueue. Without this patch, this nested acquisition wou

[PATCH v2 8/9] padata: unbind parallel jobs from specific CPUs

2019-08-29 Thread Daniel Jordan
Padata binds the parallel part of a job to a single CPU and round-robins over all CPUs in the system for each successive job. Though the serial parts rely on per-CPU queues for correct ordering, they're not necessary for parallel work, and it improves performance to run the job locally on NUMA mac

[PATCH v2 5/9] pcrypt: remove padata cpumask notifier

2019-08-29 Thread Daniel Jordan
Now that padata_do_parallel takes care of finding an alternate callback CPU, there's no need for pcrypt's callback cpumask, so remove it and the notifier callback that keeps it in sync. Signed-off-by: Daniel Jordan Acked-by: Steffen Klassert Cc: Herbert Xu Cc: Lai Jiangshan Cc: Peter Zijlstra

[PATCH v2 2/9] workqueue: unconfine alloc/apply/free_workqueue_attrs()

2019-08-29 Thread Daniel Jordan
padata will use these these interfaces in a later patch, so unconfine them. Signed-off-by: Daniel Jordan Acked-by: Tejun Heo Acked-by: Steffen Klassert Cc: Herbert Xu Cc: Lai Jiangshan Cc: Peter Zijlstra Cc: linux-crypto@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- include/linux/wor

[PATCH v2 4/9] padata: make padata_do_parallel find alternate callback CPU

2019-08-29 Thread Daniel Jordan
padata_do_parallel currently returns -EINVAL if the callback CPU isn't in the callback cpumask. pcrypt tries to prevent this situation by keeping its own callback cpumask in sync with padata's and checks that the callback CPU it passes to padata is valid. Make padata handle this instead. padata_

[PATCH v2 3/9] workqueue: require CPU hotplug read exclusion for apply_workqueue_attrs

2019-08-29 Thread Daniel Jordan
Change the calling convention for apply_workqueue_attrs to require CPU hotplug read exclusion. Avoids lockdep complaints about nested calls to get_online_cpus in a future patch where padata calls apply_workqueue_attrs when changing other CPU-hotplug-sensitive data structures with the CPU read lock

[PATCH v2 0/9] padata: use unbound workqueues for parallel jobs

2019-08-29 Thread Daniel Jordan
Hello, Everything in the Testing section has been rerun after the suggestion from Herbert last round. Thanks again to Steffen for giving this a run. Any comments welcome. Daniel v1[*] -> v2: - Updated patch 8 to avoid queueing the reorder work if the next object by sequence number isn't r

[PATCH v2 7/9] padata: use separate workqueues for parallel and serial work

2019-08-29 Thread Daniel Jordan
padata currently uses one per-CPU workqueue per instance for all work. Prepare for running parallel jobs on an unbound workqueue by introducing dedicated workqueues for parallel and serial work. Signed-off-by: Daniel Jordan Acked-by: Steffen Klassert Cc: Herbert Xu Cc: Lai Jiangshan Cc: Peter

Re: [PATCH v2 13/15] crypto: testmgr - convert hash testing to use testvec_configs

2019-08-29 Thread Eric Biggers
On Thu, Aug 29, 2019 at 05:32:46PM +0200, Christophe Leroy wrote: > Hi Eric, > > > Le 01/02/2019 à 08:51, Eric Biggers a écrit : > > From: Eric Biggers > > > > Convert alg_test_hash() to use the new test framework, adding a list of > > testvec_configs to test by default. When the extra self-te

Re: [PATCH v2 13/15] crypto: testmgr - convert hash testing to use testvec_configs

2019-08-29 Thread Christophe Leroy
Hi Eric, Le 01/02/2019 à 08:51, Eric Biggers a écrit : From: Eric Biggers Convert alg_test_hash() to use the new test framework, adding a list of testvec_configs to test by default. When the extra self-tests are enabled, randomly generated testvec_configs are tested as well. This improves h

Re: [PATCH v5 4/4] KEYS: trusted: move tpm2 trusted keys code

2019-08-29 Thread Jarkko Sakkinen
On Wed, Aug 28, 2019 at 10:58:11AM +0530, Sumit Garg wrote: > So you mean to say we should use upper-case letters for 'TPM2' acronym? Yes. /Jarkko

Re: [PATCH v1 1/2] dt-binding: hwrng: add NPCM RNG documentation

2019-08-29 Thread Daniel Thompson
On Wed, Aug 28, 2019 at 07:26:16PM +0300, Tomer Maimon wrote: > Added device tree binding documentation for Nuvoton BMC > NPCM Random Number Generator (RNG). > > Signed-off-by: Tomer Maimon > --- > .../bindings/rng/nuvoton,npcm-rng.txt | 17 + > 1 file changed, 17 inser

Re: [PATCH v1 2/2] hwrng: npcm: add NPCM RNG driver

2019-08-29 Thread Daniel Thompson
On Wed, Aug 28, 2019 at 07:26:17PM +0300, Tomer Maimon wrote: > Add Nuvoton NPCM BMC Random Number Generator(RNG) driver. > > Signed-off-by: Tomer Maimon > --- > drivers/char/hw_random/Kconfig| 13 ++ > drivers/char/hw_random/Makefile | 1 + > drivers/char/hw_random/npcm-rng.c | 207 +++