Re: [RFC/RFT PATCH 0/2] crypto: add CTS output IVs for arm64 and testmgr

2020-05-20 Thread Stephan Mueller
Am Mittwoch, 20. Mai 2020, 08:54:10 CEST schrieb Ard Biesheuvel: Hi Ard, > On Wed, 20 May 2020 at 08:47, Stephan Mueller wrote: > > Am Mittwoch, 20. Mai 2020, 08:40:57 CEST schrieb Ard Biesheuvel: > > > > Hi Ard, > > > > > On Wed, 20 May 2020 at 08:03, Stephan Mueller wrote: > > > > Am Diens

Re: [RFC/RFT PATCH 0/2] crypto: add CTS output IVs for arm64 and testmgr

2020-05-20 Thread Ard Biesheuvel
On Wed, 20 May 2020 at 09:01, Stephan Mueller wrote: > > Am Mittwoch, 20. Mai 2020, 08:54:10 CEST schrieb Ard Biesheuvel: > > Hi Ard, > > > On Wed, 20 May 2020 at 08:47, Stephan Mueller wrote: ... > > > The state of all block chaining modes we currently have is defined with > > > the > > > IV. Th

[PATCH] crypto: sun8i-ss - fix runtime pm imbalance on error

2020-05-20 Thread Dinghao Liu
pm_runtime_get_sync() increments the runtime PM usage counter even it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 1 + 1 file changed, 1 ins

[PATCH] crypto: sun8i-ss - fix runtime pm imbalance on error

2020-05-20 Thread Dinghao Liu
pm_runtime_get_sync() increments the runtime PM usage counter even it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 4 +++- 1 file changed, 3 in

[PATCH] crypto: sun8i-ce - fix runtime pm imbalance on error

2020-05-20 Thread Dinghao Liu
pm_runtime_get_sync() increments the runtime PM usage counter even it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 4 +++- 1 file changed, 3 in

Re: [PATCH] crypto: engine - do not requeue in case of fatal error

2020-05-20 Thread Horia Geantă
On 5/20/2020 1:17 AM, Iuliana Prodan wrote: > Now, in crypto-engine, if hardware queue is full (-ENOSPC), > requeue request regardless of MAY_BACKLOG flag. > If hardware throws any other error code (like -EIO, -EINVAL, > -ENOMEM, etc.) only MAY_BACKLOG requests are enqueued back into > crypto-engin

Re: [PATCH v2 1/2] hwrng: iproc-rng200 - Set the quality value

2020-05-20 Thread Kamil Konieczny
Hi, On 19.05.2020 23:25, Łukasz Stelmach wrote: > The value was estimaded with ea_iid[1] using on 10485760 bytes read from > the RNG via /dev/hwrng. The min-entropy value calculated using the most > common value estimate (NIST SP 800-90P[2], section 6.3.1) was 7.964464. > > [1] > https://protect

Re: [PATCH v2 1/2] hwrng: iproc-rng200 - Set the quality value

2020-05-20 Thread Lukasz Stelmach
It was <2020-05-20 śro 08:23>, when Stephan Mueller wrote: > Am Dienstag, 19. Mai 2020, 23:25:51 CEST schrieb Łukasz Stelmach: > >> The value was estimaded with ea_iid[1] using on 10485760 bytes read from >> the RNG via /dev/hwrng. The min-entropy value calculated using the most >> common value est

Re: [PATCH v2 1/2] hwrng: iproc-rng200 - Set the quality value

2020-05-20 Thread Stephan Mueller
Am Mittwoch, 20. Mai 2020, 11:10:32 CEST schrieb Lukasz Stelmach: Hi Lukasz, > It was <2020-05-20 śro 08:23>, when Stephan Mueller wrote: > > Am Dienstag, 19. Mai 2020, 23:25:51 CEST schrieb Łukasz Stelmach: > >> The value was estimaded with ea_iid[1] using on 10485760 bytes read from > >> the RN

[PATCH] crypto:hisilicon - fix driver compatibility issue with different versions of devices

2020-05-20 Thread Shukun Tan
From: Weili Qian In order to be compatible with devices of different versions, V1 in the accelerator driver is now isolated, and other versions are the previous V2 processing flow. Signed-off-by: Weili Qian Signed-off-by: Shukun Tan Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hp

Re: [PATCH v2 1/2] hwrng: iproc-rng200 - Set the quality value

2020-05-20 Thread Lukasz Stelmach
It was <2020-05-20 śro 11:18>, when Stephan Mueller wrote: > Am Mittwoch, 20. Mai 2020, 11:10:32 CEST schrieb Lukasz Stelmach: >> It was <2020-05-20 śro 08:23>, when Stephan Mueller wrote: >>> Am Dienstag, 19. Mai 2020, 23:25:51 CEST schrieb Łukasz Stelmach: The value was estimaded with ea_iid

Re: [PATCH v2 1/2] hwrng: iproc-rng200 - Set the quality value

2020-05-20 Thread Stephan Mueller
Am Mittwoch, 20. Mai 2020, 12:44:33 CEST schrieb Lukasz Stelmach: Hi Lukasz, > It was <2020-05-20 śro 11:18>, when Stephan Mueller wrote: > > Am Mittwoch, 20. Mai 2020, 11:10:32 CEST schrieb Lukasz Stelmach: > >> It was <2020-05-20 śro 08:23>, when Stephan Mueller wrote: > >>> Am Dienstag, 19. Ma

Re: [PATCH v2 1/2] hwrng: iproc-rng200 - Set the quality value

2020-05-20 Thread Krzysztof Kozlowski
On Wed, 20 May 2020 at 13:53, Stephan Mueller wrote: > > > That said, the illustrated example is typical for hardware RNGs. Yet > > > it is never guaranteed to work that way. Thus, if you can point to > > > architecture documentation of your specific hardware RNGs showing that > > > the data read

Re: [PATCH v2 1/2] hwrng: iproc-rng200 - Set the quality value

2020-05-20 Thread Stephan Mueller
Am Mittwoch, 20. Mai 2020, 14:00:01 CEST schrieb Krzysztof Kozlowski: Hi Krzysztof, > On Wed, 20 May 2020 at 13:53, Stephan Mueller wrote: > > > > That said, the illustrated example is typical for hardware RNGs. Yet > > > > it is never guaranteed to work that way. Thus, if you can point to > > >

[PATCH] hwrng: exynos - fix runtime pm imbalance on error

2020-05-20 Thread Dinghao Liu
pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu --- drivers/char/hw_random/exynos-trng.c | 3 +-- 1 file changed, 1 insertion(

[PATCH] hwrng: ks-sa - fix runtime pm imbalance on error

2020-05-20 Thread Dinghao Liu
pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu --- drivers/char/hw_random/ks-sa-rng.c | 1 + 1 file changed, 1 insertion(+)

[PATCH 3.16 15/99] padata: always acquire cpu_hotplug_lock before pinst->lock

2020-05-20 Thread Ben Hutchings
3.16.84-rc1 review patch. If anyone has any objections, please let me know. -- From: Daniel Jordan commit 38228e8848cd7dd86ccb90406af32de0cad24be3 upstream. lockdep complains when padata's paths to update cpumasks via CPU hotplug and sysfs are both taken: # echo 0 > /sys/de

[PATCH 3.16 10/99] padata: initialize pd->cpu with effective cpumask

2020-05-20 Thread Ben Hutchings
3.16.84-rc1 review patch. If anyone has any objections, please let me know. -- From: Daniel Jordan commit ec9c7d19336ee98ecba8de80128aa405c45feebb upstream. Exercising CPU hotplug on a 5.2 kernel with recent padata fixes from cryptodev-2.6.git in an 8-CPU kvm guest... # m

[PATCH 3.16 12/99] padata: purge get_cpu and reorder_via_wq from padata_do_serial

2020-05-20 Thread Ben Hutchings
3.16.84-rc1 review patch. If anyone has any objections, please let me know. -- From: Daniel Jordan commit 065cf577135a4977931c7a1e1edf442bfd9773dd upstream. With the removal of the padata timer, padata_do_serial no longer needs special CPU handling, so remove it. Signed-off-b

Re: [PATCH v2 1/2] hwrng: iproc-rng200 - Set the quality value

2020-05-20 Thread Lukasz Stelmach
It was <2020-05-20 śro 13:53>, when Stephan Mueller wrote: > Am Mittwoch, 20. Mai 2020, 12:44:33 CEST schrieb Lukasz Stelmach: >> It was <2020-05-20 śro 11:18>, when Stephan Mueller wrote: >>> Am Mittwoch, 20. Mai 2020, 11:10:32 CEST schrieb Lukasz Stelmach: It was <2020-05-20 śro 08:23>, when

Re: Backporting "padata: Remove broken queue flushing"

2020-05-20 Thread Ben Hutchings
On Tue, 2020-05-19 at 16:00 -0400, Daniel Jordan wrote: > Hello Ben, > > On Tue, May 19, 2020 at 02:53:05PM +0100, Ben Hutchings wrote: > > I noticed that commit 07928d9bfc81 "padata: Remove broken queue > > flushing" has been backported to most stable branches, but commit > > 6fc4dbcf0276 "padata

Re: [PATCH] hwrng: ks-sa - fix runtime pm imbalance on error

2020-05-20 Thread Sverdlin, Alexander (Nokia - DE/Ulm)
Hello Dinghao, On Wed, 2020-05-20 at 21:29 +0800, Dinghao Liu wrote: > pm_runtime_get_sync() increments the runtime PM usage counter even > the call returns an error code. Thus a pairing decrement is needed > on the error handling path to keep the counter balanced. I believe, this is the wrong pl

Re: [PATCH] hwrng: ks-sa - fix runtime pm imbalance on error

2020-05-20 Thread st...@rowland.harvard.edu
On Wed, May 20, 2020 at 03:42:17PM +, Sverdlin, Alexander (Nokia - DE/Ulm) wrote: > Hello Dinghao, > > On Wed, 2020-05-20 at 21:29 +0800, Dinghao Liu wrote: > > pm_runtime_get_sync() increments the runtime PM usage counter even > > the call returns an error code. Thus a pairing decrement is n

[PATCH v2 3/7] padata: allocate work structures for parallel jobs from a pool

2020-05-20 Thread Daniel Jordan
padata allocates per-CPU, per-instance work structs for parallel jobs. A do_parallel call assigns a job to a sequence number and hashes the number to a CPU, where the job will eventually run using the corresponding work. This approach fit with how padata used to bind a job to each CPU round-robin,

[PATCH v2 4/7] padata: add basic support for multithreaded jobs

2020-05-20 Thread Daniel Jordan
Sometimes the kernel doesn't take full advantage of system memory bandwidth, leading to a single CPU spending excessive time in initialization paths where the data scales with memory size. Multithreading naturally addresses this problem. Extend padata, a framework that handles many parallel yet s

[PATCH v2 5/7] mm: parallelize deferred_init_memmap()

2020-05-20 Thread Daniel Jordan
Deferred struct page init is a significant bottleneck in kernel boot. Optimizing it maximizes availability for large-memory systems and allows spinning up short-lived VMs as needed without having to leave them running. It also benefits bare metal machines hosting VMs that are sensitive to downtime

[PATCH v2 6/7] mm: make deferred init's max threads arch-specific

2020-05-20 Thread Daniel Jordan
Using padata during deferred init has only been tested on x86, so for now limit it to this architecture. If another arch wants this, it can find the max thread limit that's best for it and override deferred_page_init_max_threads(). Signed-off-by: Daniel Jordan --- arch/x86/mm/init_64.c| 12

[PATCH v2 2/7] padata: initialize earlier

2020-05-20 Thread Daniel Jordan
padata will soon initialize the system's struct pages in parallel, so it needs to be ready by page_alloc_init_late(). The error return from padata_driver_init() triggers an initcall warning, so add a warning to padata_init() to avoid silent failure. Signed-off-by: Daniel Jordan --- include/linu

[PATCH v2 7/7] padata: document multithreaded jobs

2020-05-20 Thread Daniel Jordan
Add Documentation for multithreaded jobs. Signed-off-by: Daniel Jordan --- Documentation/core-api/padata.rst | 41 +++ 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/Documentation/core-api/padata.rst b/Documentation/core-api/padata.rst index 9a24c111

[PATCH v2 0/7] padata: parallelize deferred page init

2020-05-20 Thread Daniel Jordan
Deferred struct page init is a bottleneck in kernel boot--the biggest for us and probably others. Optimizing it maximizes availability for large-memory systems and allows spinning up short-lived VMs as needed without having to leave them running. It also benefits bare metal machines hosting VMs t

[PATCH v2 1/7] padata: remove exit routine

2020-05-20 Thread Daniel Jordan
padata_driver_exit() is unnecessary because padata isn't built as a module and doesn't exit. padata's init routine will soon allocate memory, so getting rid of the exit function now avoids pointless code to free it. Signed-off-by: Daniel Jordan --- kernel/padata.c | 6 -- 1 file changed, 6

Re: [PATCH net] net/tls(TLS_SW): Fix integrity issue with non-blocking sw KTLS request

2020-05-20 Thread Pooja Trivedi
On Tue, May 19, 2020 at 5:43 PM Jakub Kicinski wrote: > > On Tue, 19 May 2020 13:21:56 -0400 Pooja Trivedi wrote: > > On Mon, May 18, 2020 at 6:50 PM Jakub Kicinski wrote: > > > On Sun, 17 May 2020 16:26:36 + Pooja Trivedi wrote: > > > > In pure sw ktls(AES-NI), -EAGAIN from tcp layer (do_tcp

Re: [PATCH net] net/tls(TLS_SW): Fix integrity issue with non-blocking sw KTLS request

2020-05-20 Thread Jakub Kicinski
On Wed, 20 May 2020 15:56:56 -0400 Pooja Trivedi wrote: > On Tue, May 19, 2020 at 5:43 PM Jakub Kicinski wrote: > > > > On Tue, 19 May 2020 13:21:56 -0400 Pooja Trivedi wrote: > > > On Mon, May 18, 2020 at 6:50 PM Jakub Kicinski wrote: > > > > On Sun, 17 May 2020 16:26:36 + Pooja Trivedi

Re: [PATCH v2 5/7] mm: parallelize deferred_init_memmap()

2020-05-20 Thread Alexander Duyck
On Wed, May 20, 2020 at 11:27 AM Daniel Jordan wrote: > > Deferred struct page init is a significant bottleneck in kernel boot. > Optimizing it maximizes availability for large-memory systems and allows > spinning up short-lived VMs as needed without having to leave them > running. It also benefi

Re: Re: [PATCH] hwrng: ks-sa - fix runtime pm imbalance on error

2020-05-20 Thread dinghao . liu
Hi Alexander, There are large amounts of cases that assume pm_runtime_get_sync() will modify runtime PM usage counter on error. Fixing this in PM subsystem will influence all callers of pm_runtime_get_sync() and introduce new bugs. Therefore I think the better solution is to fix misused cases ind