Re: [PATCH v4 16/17] crypto: sun8i-ce: fix comparison of integer expressions of different signedness

2020-07-21 Thread LABBE Corentin
On Tue, Jul 21, 2020 at 02:32:15PM -0700, Joe Perches wrote: > On Tue, 2020-07-21 at 19:06 +, Corentin Labbe wrote: > > This patch fixes the warning: > > warning: comparison of integer expressions of different signedness: 'int' > > and 'long unsigned int' [-Wsign-compare] > > I think these do

[PATCH] Makefile.extrawarn: Move sign-compare from W=2 to W=3

2020-07-21 Thread Joe Perches
This -Wsign-compare compiler warning can be very noisy and most of the suggested conversions are unnecessary. Make the warning W=3 so it's described under the "can most likely be ignored" block. Signed-off-by: Joe Perches --- On Tue, 2020-07-21 at 14:32 -0700, Joe Perches wrote: > On Tue, 2020-0

Re: [PATCH v2 2/2] kbuild: trace functions in subdirectories of lib/

2020-07-21 Thread Masahiro Yamada
On Wed, Jul 8, 2020 at 1:02 AM Steven Rostedt wrote: > > On Tue, 7 Jul 2020 18:21:17 +0900 > Masahiro Yamada wrote: > > > ccflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_FTRACE) > > > > exists here in sub-directories of lib/ to keep the behavior of > > commit 2464a609ded0 ("ftrace: do n

Re: [PATCH v2 2/2] kbuild: trace functions in subdirectories of lib/

2020-07-21 Thread Masahiro Yamada
On Wed, Jul 8, 2020 at 6:23 PM Petr Mladek wrote: > > On Wed 2020-07-08 08:52:23, Petr Mladek wrote: > > > > PS: BTW: The livepatch selftests fail in Linus's master now. But it > > seems to be for another reason. I am going to dig into it. > > JFYI, the livepatch selftests are actually working. I

Re: [PATCH v4 16/17] crypto: sun8i-ce: fix comparison of integer expressions of different signedness

2020-07-21 Thread Joe Perches
On Tue, 2020-07-21 at 19:06 +, Corentin Labbe wrote: > This patch fixes the warning: > warning: comparison of integer expressions of different signedness: 'int' and > 'long unsigned int' [-Wsign-compare] I think these do not really need conversion. Are these useful compiler warnings ? > Sign

[PATCH v4 01/17] crypto: sun8i-ss: Add SS_START define

2020-07-21 Thread Corentin Labbe
Instead of using an hardcoded value, let's use a defined value for SS_START. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 2 +- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH v4 02/17] crypto: sun8i-ss: Add support for the PRNG

2020-07-21 Thread Corentin Labbe
This patch had support for the PRNG present in the SS. The output was tested with rngtest without any failure. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 8 + drivers/crypto/allwinner/sun8i-ss/Makefile| 1 + .../crypto/allwinner/sun8i-ss/sun8i-ss-co

[PATCH v4 07/17] crypto: sun8i-ce: handle endianness of t_common_ctl

2020-07-21 Thread Corentin Labbe
t_common_ctl is LE32 so we need to convert its value before using it. This value is only used on H6 (ignored on other SoCs) and not handling the endianness cause failure on xRNG/hashes operations on H6 when running BE. Fixes: 06f751b61329 ("crypto: allwinner - Add sun8i-ce Crypto Engine") Signed-o

[PATCH v4 08/17] crypto: sun8i-ce: move iv data to request context

2020-07-21 Thread Corentin Labbe
Instead of storing IV data in the channel context, store them in the request context. Storing them in the channel structure was conceptualy wrong since they are per request related. Signed-off-by: Corentin Labbe --- .../allwinner/sun8i-ce/sun8i-ce-cipher.c | 27 +-- drivers/

[PATCH v4 03/17] crypto: sun8i-ss: support hash algorithms

2020-07-21 Thread Corentin Labbe
The SS support multiples hash algorithms, this patch adds support for MD5, SHA1, SHA224 and SHA256. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 9 + drivers/crypto/allwinner/sun8i-ss/Makefile| 1 + .../crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 155

[PATCH v4 17/17] crypto: sun8i-ss: fix comparison of integer expressions of different signedness

2020-07-21 Thread Corentin Labbe
This patch fixes the warning: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare] Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

[PATCH v4 16/17] crypto: sun8i-ce: fix comparison of integer expressions of different signedness

2020-07-21 Thread Corentin Labbe
This patch fixes the warning: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare] Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

[PATCH v4 10/17] crypto: sun8i-ce: handle different error registers

2020-07-21 Thread Corentin Labbe
Error registers are different across SoCs. This patch handle those difference. Signed-off-by: Corentin Labbe --- .../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 62 --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 8 +++ 2 files changed, 62 insertions(+), 8 deletions(-) diff

[PATCH v4 06/17] crypto: sun8i-ss: better debug printing

2020-07-21 Thread Corentin Labbe
This patch reworks the way debug info are printed. Instead of printing raw numbers, let's add a bit of context. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/allwinner/s

[PATCH v4 00/17] crypto: allwinner: add xRNG and hashes

2020-07-21 Thread Corentin Labbe
Hello The main goal of this serie is to add support for TRNG, PRNG and hashes to the sun8i-ss/sun8i-ce driver. The whole serie is tested with CRYPTO_EXTRA_TESTS enabled and loading tcrypt. The PRNG and TRNG are tested with rngtest. Both LE and BE kernel are tested. This serie was tested on: - sun

[PATCH v4 15/17] crypto: sun8i-ce: Add support for the TRNG

2020-07-21 Thread Corentin Labbe
This patch had support for the TRNG present in the CE. Note that according to the algorithm ID, 2 version of the TRNG exists, the first present in H3/H5/R40/A64 and the second present in H6. This patch adds support for both, but only the second is working reliabily according to rngtest. Signed-off

[PATCH v4 04/17] crypto: sun8i-ss: fix a trivial typo

2020-07-21 Thread Corentin Labbe
This fixes a trivial typo. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h index 377ea7acb54d..da71d8059

[PATCH v4 11/17] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes

2020-07-21 Thread Corentin Labbe
Hash algorithms will need also a spetial t_dlen handling, but since the meaning will be different, rename the current flag to specify it apply only on ciphers algorithms. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 2 +- drivers/crypto/allwinner/sun8i-

[PATCH v4 09/17] crypto: sun8i-ce: split into prepare/run/unprepare

2020-07-21 Thread Corentin Labbe
This patch split the do_one_request into three. Prepare will handle all DMA mapping and initialisation of the task structure. Unprepare will clean all DMA mapping. And the do_one_request will be limited to just executing the task. Signed-off-by: Corentin Labbe --- .../allwinner/sun8i-ce/sun8i-ce

[PATCH v4 05/17] crypto: sun8i-ss: Add more comment on some structures

2020-07-21 Thread Corentin Labbe
This patch adds some comment on structures used by sun8i-ss. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h index da7

[PATCH v4 14/17] crypto: sun8i-ce: Add support for the PRNG

2020-07-21 Thread Corentin Labbe
This patch had support for the PRNG present in the CE. The output was tested with rngtest without any failure. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 8 + drivers/crypto/allwinner/sun8i-ce/Makefile| 1 + .../crypto/allwinner/sun8i-ce/sun8i-ce-co

[PATCH v4 12/17] crypto: sun8i-ce: support hash algorithms

2020-07-21 Thread Corentin Labbe
The CE support multiples hash algorithms, this patch adds support for MD5, SHA1, SHA224, SHA256, SHA384 and SHA512. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 10 + drivers/crypto/allwinner/sun8i-ce/Makefile| 1 + .../crypto/allwinner/sun8i-ce/sun8i-

[PATCH v4 13/17] crypto: sun8i-ce: Add stat_bytes debugfs

2020-07-21 Thread Corentin Labbe
This patch adds a new stat_bytes counter in the sun8i-ce debugfs. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h inde

Re: [PATCH for v5.9] ARM: STM32: Replace HTTP links with HTTPS ones

2020-07-21 Thread Alexander A. Klimov
Am 21.07.20 um 10:49 schrieb Alexandre Torgue: Hi Alexander On 7/19/20 11:49 AM, Alexander A. Klimov wrote: Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file:    If not .svg:

Re: [PATCH v1] crypto: ccp: sp-pci: use generic power management

2020-07-21 Thread Vaibhav Gupta
On Tue, Jul 21, 2020 at 12:15:13PM -0500, Tom Lendacky wrote: > On 7/21/20 11:30 AM, Vaibhav Gupta wrote: > > On Tue, Jul 21, 2020 at 10:19:33AM -0500, Tom Lendacky wrote: > >> On 7/21/20 7:31 AM, Vaibhav Gupta wrote: > >>> +bool __maybe_unused ccp_queues_suspended(struct ccp_device *ccp) > >> > >>

Re: [PATCH v1] crypto: ccp: sp-pci: use generic power management

2020-07-21 Thread Tom Lendacky
On 7/21/20 11:30 AM, Vaibhav Gupta wrote: > On Tue, Jul 21, 2020 at 10:19:33AM -0500, Tom Lendacky wrote: >> On 7/21/20 7:31 AM, Vaibhav Gupta wrote: >>> Drivers using legacy power management .suspen()/.resume() callbacks >>> have to manage PCI states and device's PM states themselves. They also >>

Re: [PATCH v1] crypto: ccp: sp-pci: use generic power management

2020-07-21 Thread Vaibhav Gupta
On Tue, Jul 21, 2020 at 10:19:33AM -0500, Tom Lendacky wrote: > On 7/21/20 7:31 AM, Vaibhav Gupta wrote: > > Drivers using legacy power management .suspen()/.resume() callbacks > > have to manage PCI states and device's PM states themselves. They also > > need to take care of standard configuration

Re: [PATCH v1] crypto: ccp: sp-pci: use generic power management

2020-07-21 Thread Tom Lendacky
On 7/21/20 7:31 AM, Vaibhav Gupta wrote: > Drivers using legacy power management .suspen()/.resume() callbacks > have to manage PCI states and device's PM states themselves. They also > need to take care of standard configuration registers. > > Switch to generic power management framework using a

Re: [PATCH v2] crypto: af_alg - add extra parameters for DRBG interface

2020-07-21 Thread Stephan Mueller
Am Dienstag, 21. Juli 2020, 14:55:14 CEST schrieb Elena Petrova: Hi Elena, > > > +#ifdef CONFIG_CRYPTO_CAVS_DRBG > > > +static int rng_setentropy(void *private, const u8 *entropy, unsigned > > > int > > > len) +{ > > > + struct rng_parent_ctx *pctx = private; > > > + u8 *kentropy = NULL;

Re: [PATCH v1] crypto: ccp: sp-pci: use generic power management

2020-07-21 Thread Vaibhav Gupta
The Patch is Compile-tested only.

[PATCH v1] crypto: ccp: sp-pci: use generic power management

2020-07-21 Thread Vaibhav Gupta
Drivers using legacy power management .suspen()/.resume() callbacks have to manage PCI states and device's PM states themselves. They also need to take care of standard configuration registers. Switch to generic power management framework using a single "struct dev_pm_ops" variable to take the unn

Re: [PATCH v3 0/5] DH: SP800-56A rev 3 compliant validation checks

2020-07-21 Thread Marcelo Henrique Cerri
Reviewed-by: Marcelo Henrique Cerri Tested-by: Marcelo Henrique Cerri On Mon, Jul 20, 2020 at 07:05:45PM +0200, Stephan Müller wrote: > Hi, > > This patch set adds the required checks to make all aspects of > (EC)DH compliant with SP800-56A rev 3 assuming that all keys > are ephemeral. The use

RE: get rid of the address_space override in setsockopt

2020-07-21 Thread David Laight
From: Christoph Hellwig > Sent: 20 July 2020 13:47 > > setsockopt is the last place in architecture-independ code that still > uses set_fs to force the uaccess routines to operate on kernel pointers. > > This series adds a new sockptr_t type that can contained either a kernel > or user pointer, a

RE: [PATCH 03/24] net: add a new sockptr_t type

2020-07-21 Thread David Laight
From: Christoph Hellwig > Sent: 20 July 2020 13:47 > > Add a uptr_t type that can hold a pointer to either a user or kernel > memory region, and simply helpers to copy to and from it. For > architectures like x86 that have non-overlapping user and kernel > address space it just is a union and use

RE: [PATCH 03/24] net: add a new sockptr_t type

2020-07-21 Thread David Laight
From: Eric Biggers > Sent: 20 July 2020 17:38 ... > How does this not introduce a massive security hole when > CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE? > > AFAICS, userspace can pass in a pointer >= TASK_SIZE, > and this code makes it be treated as a kernel pointer. One thought I've had is

RE: get rid of the address_space override in setsockopt

2020-07-21 Thread David Laight
From: Christoph Hellwig > Sent: 20 July 2020 13:47 > > setsockopt is the last place in architecture-independ code that still > uses set_fs to force the uaccess routines to operate on kernel pointers. > > This series adds a new sockptr_t type that can contained either a kernel > or user pointer, an

Re: [PATCH for v5.9] ARM: STM32: Replace HTTP links with HTTPS ones

2020-07-21 Thread Alexandre Torgue
Hi Alexander On 7/19/20 11:49 AM, Alexander A. Klimov wrote: Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\

RE: [PATCH 12/24] bpfilter: switch bpfilter_ip_set_sockopt to sockptr_t

2020-07-21 Thread David Laight
From: Christoph Hellwig > Sent: 20 July 2020 13:47 > > This is mostly to prepare for cleaning up the callers, as bpfilter by > design can't handle kernel pointers. ^^^ user ?? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK