[PATCH v2 1/2] dt-bindings: RNG: Add Ingenic RNG bindings.

2020-07-22 Thread Zhou Yanjie
Add the RNG bindings for the JZ4780 SoC and the X1000 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) --- Notes: v1->v2: No change. .../devicetree/bindings/rng/ingenic,rng.yaml | 36 ++ 1 file changed, 36 insertions(+) create mode 100644 Documentation/devi

[PATCH v2 0/2] Add support for the RNG in Ingenic JZ4780 and X1000.

2020-07-22 Thread Zhou Yanjie
v1->v2: Use "help" instead "---help---" in Kconfig. 周琰杰 (Zhou Yanjie) (2): dt-bindings: RNG: Add Ingenic RNG bindings. crypto: Ingenic: Add hardware RNG for Ingenic JZ4780 and X1000. .../devicetree/bindings/rng/ingenic,rng.yaml | 36 + drivers/char/hw_random/Kconfig

[PATCH v2 2/2] crypto: Ingenic: Add hardware RNG for Ingenic JZ4780 and X1000.

2020-07-22 Thread Zhou Yanjie
Add JZ4780 SoC and X1000 SoC random number generator driver, based on PrasannaKumar Muralidharan's JZ4780 RNG driver. Tested-by: 周正 (Zhou Zheng) Tested-by: Mathieu Malaterre Suggested-by: Jeffrey Walton Signed-off-by: PrasannaKumar Muralidharan Signed-off-by: 周琰杰 (Zhou Yanjie) --- Notes:

Re: [PATCH 2/2] crypto: Ingenic: Add hardware RNG for Ingenic JZ4780 and X1000.

2020-07-22 Thread Zhou Yanjie
Hello Randy, 在 2020/7/23 上午2:27, Randy Dunlap 写道: On 7/22/20 9:40 AM, 周琰杰 (Zhou Yanjie) wrote: diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig index 0ad17efc96df..fcb06027cd88 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig @@ -257,6

get rid of the address_space override in setsockopt v2

2020-07-22 Thread Christoph Hellwig
Hi Dave, 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, and which has accessors that do the right thing, and th

[PATCH 05/26] net: switch copy_bpf_fprog_from_user to sockptr_t

2020-07-22 Thread Christoph Hellwig
Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig --- include/linux/filter.h | 3 ++- net/core/filter.c | 6 +++--- net/core/sock.c| 6 -- net/packet/af_packet.c | 4 ++-- 4 files changed, 11 insertions(+

[PATCH 03/26] bpfilter: reject kernel addresses

2020-07-22 Thread Christoph Hellwig
The bpfilter user mode helper processes the optval address using process_vm_readv. Don't send it kernel addresses fed under set_fs(KERNEL_DS) as that won't work. Signed-off-by: Christoph Hellwig --- net/bpfilter/bpfilter_kern.c | 4 1 file changed, 4 insertions(+) diff --git a/net/bpfilte

[PATCH 02/26] net/bpfilter: split __bpfilter_process_sockopt

2020-07-22 Thread Christoph Hellwig
Split __bpfilter_process_sockopt into a low-level send request routine and the actual setsockopt hook to split the init time ping from the actual setsockopt processing. Signed-off-by: Christoph Hellwig --- net/bpfilter/bpfilter_kern.c | 51 +++- 1 file changed, 27

[PATCH 04/26] net: add a new sockptr_t type

2020-07-22 Thread Christoph Hellwig
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. Signed-off-by: Christoph Hellwig --- include/linux/sockptr.h | 104 1 file changed, 104 insertions(+) create mode 100644 includ

[PATCH 01/26] bpfilter: fix up a sparse annotation

2020-07-22 Thread Christoph Hellwig
The __user doesn't make sense when casting to an integer type, just switch to a uintptr_t cast which also removes the need for the __force. Signed-off-by: Christoph Hellwig --- net/bpfilter/bpfilter_kern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bpfilter/bpfilter_

[PATCH 07/26] net: switch sock_set_timeout to sockptr_t

2020-07-22 Thread Christoph Hellwig
Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig --- net/core/sock.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/net/core/sock.c b/net/core/sock.c index 5b55bc9397f282..8b9eddaff86

[PATCH 08/26] net: switch sock_set_timeout to sockptr_t

2020-07-22 Thread Christoph Hellwig
Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig --- include/net/sock.h | 3 ++- net/core/sock.c | 26 -- net/mptcp/protocol.c | 6 -- net/socket.c | 3 ++- 4 files changed,

[PATCH 10/26] netfilter: remove the unused user argument to do_update_counters

2020-07-22 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/bridge/netfilter/ebtables.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index fe13108af1f542..12f8929667bf43 100644 --- a/net/bridge/netfilter/ebtables.c +++

[PATCH 09/26] net/xfrm: switch xfrm_user_policy to sockptr_t

2020-07-22 Thread Christoph Hellwig
Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig --- include/net/xfrm.h | 8 +--- net/ipv4/ip_sockglue.c | 3 ++- net/ipv6/ipv6_sockglue.c | 3 ++- net/xfrm/xfrm_state.c| 6 +++--- 4 files changed, 12 ins

[PATCH 14/26] net/ipv4: switch ip_mroute_setsockopt to sockptr_t

2020-07-22 Thread Christoph Hellwig
Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig --- include/linux/mroute.h | 5 +++-- net/ipv4/ip_sockglue.c | 3 ++- net/ipv4/ipmr.c| 14 +++--- 3 files changed, 12 insertions(+), 10 deletions(-) dif

[PATCH 18/26] net/ipv6: split up ipv6_flowlabel_opt

2020-07-22 Thread Christoph Hellwig
Split ipv6_flowlabel_opt into a subfunction for each action and a small wrapper. Signed-off-by: Christoph Hellwig --- net/ipv6/ip6_flowlabel.c | 311 +-- 1 file changed, 167 insertions(+), 144 deletions(-) diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_

[PATCH 17/26] net/ipv6: switch ip6_mroute_setsockopt to sockptr_t

2020-07-22 Thread Christoph Hellwig
Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig --- include/linux/mroute6.h | 8 net/ipv6/ip6mr.c | 17 + net/ipv6/ipv6_sockglue.c | 3 ++- 3 files changed, 15 insertions(+), 13 delet

[PATCH 20/26] net/ipv6: factor out a ipv6_set_opt_hdr helper

2020-07-22 Thread Christoph Hellwig
Factour out a helper to set the IPv6 option headers from do_ipv6_setsockopt. Signed-off-by: Christoph Hellwig --- net/ipv6/ipv6_sockglue.c | 150 +++ 1 file changed, 75 insertions(+), 75 deletions(-) diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockg

[PATCH 12/26] netfilter: switch nf_setsockopt to sockptr_t

2020-07-22 Thread Christoph Hellwig
Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig --- include/linux/netfilter.h | 6 -- net/bridge/netfilter/ebtables.c | 37 +++-- net/decnet/af_decnet.c | 3 ++- net/ipv4

[PATCH 16/26] net/ipv4: switch do_ip_setsockopt to sockptr_t

2020-07-22 Thread Christoph Hellwig
Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig --- net/ipv4/ip_sockglue.c | 68 -- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/net/ipv4/ip_sockglue.c b/net/ip

[PATCH 11/26] netfilter: switch xt_copy_counters to sockptr_t

2020-07-22 Thread Christoph Hellwig
Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig --- include/linux/netfilter/x_tables.h | 4 ++-- net/ipv4/netfilter/arp_tables.c| 7 +++ net/ipv4/netfilter/ip_tables.c | 7 +++ net/ipv6/netfilter/ip6_

[PATCH 13/26] bpfilter: switch bpfilter_ip_set_sockopt to sockptr_t

2020-07-22 Thread Christoph Hellwig
This is mostly to prepare for cleaning up the callers, as bpfilter by design can't handle kernel pointers. Signed-off-by: Christoph Hellwig --- include/linux/bpfilter.h | 6 +++--- net/bpfilter/bpfilter_kern.c | 6 +++--- net/ipv4/bpfilter/sockopt.c | 8 net/ipv4/ip_sockglue.c

[PATCH 19/26] net/ipv6: switch ipv6_flowlabel_opt to sockptr_t

2020-07-22 Thread Christoph Hellwig
Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Note that the get case is pretty weird in that it actually copies data back to userspace from setsockopt. Signed-off-by: Christoph Hellwig --- include/net/ipv6.h | 2 +- net/ipv6/ip6_flowlabel.c |

[PATCH 15/26] net/ipv4: merge ip_options_get and ip_options_get_from_user

2020-07-22 Thread Christoph Hellwig
Use the sockptr_t type to merge the versions. Signed-off-by: Christoph Hellwig --- include/net/ip.h | 5 ++--- net/ipv4/ip_options.c | 43 +++--- net/ipv4/ip_sockglue.c | 7 --- 3 files changed, 17 insertions(+), 38 deletions(-) diff --git a/incl

[PATCH 24/26] net/tcp: switch do_tcp_setsockopt to sockptr_t

2020-07-22 Thread Christoph Hellwig
Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig --- net/ipv4/tcp.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 49bf15c27

[PATCH 22/26] net/udp: switch udp_lib_setsockopt to sockptr_t

2020-07-22 Thread Christoph Hellwig
Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig --- include/net/udp.h | 2 +- net/ipv4/udp.c| 7 --- net/ipv6/udp.c| 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/net/udp.h b/

[PATCH 21/26] net/ipv6: switch do_ipv6_setsockopt to sockptr_t

2020-07-22 Thread Christoph Hellwig
Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig --- net/ipv6/ipv6_sockglue.c | 66 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/net/ipv6/ipv6_sockglue.c b/net/

[PATCH 23/26] net/tcp: switch ->md5_parse to sockptr_t

2020-07-22 Thread Christoph Hellwig
Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig --- include/net/tcp.h | 2 +- net/ipv4/tcp.c | 3 ++- net/ipv4/tcp_ipv4.c | 4 ++-- net/ipv6/tcp_ipv6.c | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-)

[PATCH 25/26] net: pass a sockptr_t into ->setsockopt

2020-07-22 Thread Christoph Hellwig
Rework the remaining setsockopt code to pass a sockptr_t instead of a plain user pointer. This removes the last remaining set_fs(KERNEL_DS) outside of architecture specific code. Signed-off-by: Christoph Hellwig Acked-by: Stefan Schmidt [ieee802154] --- crypto/af_alg.c

[PATCH 26/26] net: optimize the sockptr_t for unified kernel/user address spaces

2020-07-22 Thread Christoph Hellwig
For architectures like x86 and arm64 we don't need the separate bit to indicate that a pointer is a kernel pointer as the address spaces are unified. That way the sockptr_t can be reduced to a union of two pointers, which leads to nicer calling conventions. The only caveat is that we need to chec

[PATCH 06/26] net: switch sock_setbindtodevice to sockptr_t

2020-07-22 Thread Christoph Hellwig
Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig --- net/core/sock.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/net/core/sock.c b/net/core/sock.c index 71fc7e4ddd0648..5b55bc9397f282 10064

RE: [RESEND PATCH v5] mm/zswap: move to use crypto_acomp API for hardware acceleration

2020-07-22 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Song Bao Hua (Barry Song) > Sent: Friday, July 17, 2020 1:51 AM > To: a...@linux-foundation.org; herb...@gondor.apana.org.au; > da...@davemloft.net > Cc: linux-crypto@vger.kernel.org; linux...@kvack.org; > linux-ker...@vger.kernel.org; Linuxarm ; Song Bao > H

Re: [PATCH v2 2/5] vfio/pci: Add device blocklist

2020-07-22 Thread Alex Williamson
On Tue, 14 Jul 2020 07:36:07 +0100 Giovanni Cabiddu wrote: > Add blocklist of devices that by default are not probed by vfio-pci. > Devices in this list may be susceptible to untrusted application, even > if the IOMMU is enabled. To be accessed via vfio-pci, the user has to > explicitly disable t

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

2020-07-22 Thread Steven Rostedt
On Wed, 22 Jul 2020 11:08:51 +0900 Masahiro Yamada wrote: > That's why I split this into two commits > so that we can do git-bisect and > revert the second one in case of a regression. > > Anyway, we have some more time to test this in linux-next > (and somebody reports an issue, if any). > Yo

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

2020-07-22 Thread John Allen
On Wed, Jul 22, 2020 at 03:00:58PM +0530, 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 managem

Re: [PATCH 2/2] crypto: Ingenic: Add hardware RNG for Ingenic JZ4780 and X1000.

2020-07-22 Thread Randy Dunlap
On 7/22/20 9:40 AM, 周琰杰 (Zhou Yanjie) wrote: > diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig > index 0ad17efc96df..fcb06027cd88 100644 > --- a/drivers/char/hw_random/Kconfig > +++ b/drivers/char/hw_random/Kconfig > @@ -257,6 +257,21 @@ config HW_RANDOM_IMX_RNGC > >

Re: get rid of the address_space override in setsockopt

2020-07-22 Thread Alexei Starovoitov
On Wed, Jul 22, 2020 at 12:56 AM Christoph Hellwig wrote: > > On Mon, Jul 20, 2020 at 01:47:56PM -0700, Alexei Starovoitov wrote: > > > a kernel pointer. This is something that works for most common sockopts > > > (and is something that the ePBF support relies on), but unfortunately > > > in vari

[PATCH 2/2] crypto: Ingenic: Add hardware RNG for Ingenic JZ4780 and X1000.

2020-07-22 Thread Zhou Yanjie
Add JZ4780 SoC and X1000 SoC random number generator driver, based on PrasannaKumar Muralidharan's JZ4780 RNG driver. Tested-by: 周正 (Zhou Zheng) Tested-by: Mathieu Malaterre Suggested-by: Jeffrey Walton Signed-off-by: PrasannaKumar Muralidharan Signed-off-by: 周琰杰 (Zhou Yanjie) --- drivers/ch

[PATCH 1/2] dt-bindings: RNG: Add Ingenic RNG bindings.

2020-07-22 Thread Zhou Yanjie
Add the RNG bindings for the JZ4780 SoC and the X1000 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) --- .../devicetree/bindings/rng/ingenic,rng.yaml | 36 ++ 1 file changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/rng/ingenic,rng.yaml

[PATCH 0/2] Add support for the RNG in Ingenic JZ4780 and X1000.

2020-07-22 Thread Zhou Yanjie
1.Add the RNG bindings for the JZ4780 SoC and the X1000 SoC from Ingenic. 2.Add JZ4780 SoC and X1000 SoC random number generator driver, based on PrasannaKumar Muralidharan's JZ4780 RNG driver. 周琰杰 (Zhou Yanjie) (2): dt-bindings: RNG: Add Ingenic RNG bindings. crypto: Ingenic: Add hardware

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

2020-07-22 Thread Eric Biggers
On Thu, Jul 16, 2020 at 05:40:28PM +0100, Elena Petrova wrote: > Extending the userspace RNG interface: > 1. adding ALG_SET_DRBG_ENTROPY setsockopt option for entropy input; > 2. using sendmsg syscall for specifying the additional data. > > Signed-off-by: Elena Petrova Can you add more detai

Re: [PATCH v3 1/5] crypto: ECDH - check validity of Z before export

2020-07-22 Thread Vitaly Chikunov
On Mon, Jul 20, 2020 at 07:07:48PM +0200, Stephan Müller wrote: > SP800-56A rev3 section 5.7.1.2 step 2 mandates that the validity of the > calculated shared secret is verified before the data is returned to the > caller. Thus, the export function and the validity check functions are > reversed. In

Re: [PATCH 6/7] crypto: caam - add more RNG hw error codes

2020-07-22 Thread Horia Geantă
On 7/22/2020 3:15 PM, Horia Geantă wrote: > In some cases, e.g. when TRNG is not properly configured, > the RNG module could issue a "Hardware error" at runtime. > > "Continuos check" error is emitted when some of the BISTs fail. > > Signed-off-by: Horia Geantă > Signed-off-by: Horia Geantă Oop

[PATCH 1/7] crypto: caam - remove deadcode on 32-bit platforms

2020-07-22 Thread Horia Geantă
From: Franck LENORMAND When building on a platform with a 32bit DMA address, taking the upper 32 bits makes no sense. Signed-off-by: Franck LENORMAND Signed-off-by: Horia Geantă --- drivers/crypto/caam/regs.h | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/driv

[PATCH 7/7] crypto: caam/qi2 - add module alias

2020-07-22 Thread Horia Geantă
Add a module alias, to enable udev-based module autoloading: $ modinfo -F alias drivers/crypto/caam/dpaa2_caam.ko fsl-mc:v1957ddpseci Signed-off-by: Horia Geantă --- drivers/crypto/caam/caamalg_qi2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/caam/caamalg_qi2.c b/dr

[PATCH 6/7] crypto: caam - add more RNG hw error codes

2020-07-22 Thread Horia Geantă
In some cases, e.g. when TRNG is not properly configured, the RNG module could issue a "Hardware error" at runtime. "Continuos check" error is emitted when some of the BISTs fail. Signed-off-by: Horia Geantă Signed-off-by: Horia Geantă --- drivers/crypto/caam/error.c | 3 +++ 1 file changed, 3

[PATCH 5/7] crypto: caam/jr - remove incorrect reference to caam_jr_register()

2020-07-22 Thread Horia Geantă
From: Dan Douglass caam_jr_register() function is no longer part of the driver since commit 6dad41158db6 ("crypto: caam - Remove unused functions from Job Ring") This patch removes a comment referencing the function. Signed-off-by: Dan Douglass Signed-off-by: Horia Geantă --- drivers/crypto/

[PATCH 4/7] crypto: caam - silence .setkey in case of bad key length

2020-07-22 Thread Horia Geantă
In case of bad key length, driver emits "key size mismatch" messages, but only for xts(aes) algorithms. Reduce verbosity by making them visible only when debugging. This way crypto fuzz testing log cleans up a bit. Signed-off-by: Horia Geantă --- drivers/crypto/caam/caamalg.c | 2 +- driver

[PATCH 3/7] crypto: caam/qi2 - create ahash shared descriptors only once

2020-07-22 Thread Horia Geantă
For keyed hash algorithms, shared descriptors are currently generated twice: -at tfm initialization time, in cra_init() callback -in setkey() callback Since it's mandatory to call setkey() for keyed algorithms, drop the generation in cra_init(). This is similar to the change in caamhash (caam/jr

[PATCH 2/7] crypto: caam/qi2 - fix error reporting for caam_hash_alloc

2020-07-22 Thread Horia Geantă
Fix error reporting when preparation of an hmac algorithm for registration fails: print the hmac algorithm name, not the unkeyed hash algorithm name. Signed-off-by: Horia Geantă --- drivers/crypto/caam/caamalg_qi2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cryp

[PATCH 0/7] crypto: caam - updates for 5.9

2020-07-22 Thread Horia Geantă
Hi Herbert, This patch set contains a few caam driver updates. The fixes are minor and thus ok to go through the cryptodev tree. Dan Douglass (1): crypto: caam/jr - remove incorrect reference to caam_jr_register() Franck LENORMAND (1): crypto: caam - remove deadcode on 32-bit platforms Hori

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

2020-07-22 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: [MPTCP] [PATCH 24/24] net: pass a sockptr_t into ->setsockopt

2020-07-22 Thread Matthieu Baerts
Hi Christoph, On 20/07/2020 14:47, Christoph Hellwig wrote: Rework the remaining setsockopt code to pass a sockptr_t instead of a plain user pointer. This removes the last remaining set_fs(KERNEL_DS) outside of architecture specific code. Signed-off-by: Christoph Hellwig --- ... diff --git

RE: get rid of the address_space override in setsockopt

2020-07-22 Thread David Laight
From: 'Christoph Hellwig' > Sent: 22 July 2020 09:07 > On Tue, Jul 21, 2020 at 09:38:23AM +, David Laight wrote: > > 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 ro

Re: get rid of the address_space override in setsockopt

2020-07-22 Thread 'Christoph Hellwig'
On Tue, Jul 21, 2020 at 10:26:58AM +, David Laight wrote: > 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

Re: get rid of the address_space override in setsockopt

2020-07-22 Thread 'Christoph Hellwig'
On Tue, Jul 21, 2020 at 09:38:23AM +, David Laight wrote: > 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

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

2020-07-22 Thread 'Christoph Hellwig'
On Wed, Jul 22, 2020 at 10:00:23AM +0200, 'Christoph Hellwig' wrote: > On Tue, Jul 21, 2020 at 08:36:57AM +, David Laight wrote: > > 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 handl

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

2020-07-22 Thread 'Christoph Hellwig'
On Tue, Jul 21, 2020 at 08:36:57AM +, David Laight wrote: > 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 ?? No, it can't handle user

Re: get rid of the address_space override in setsockopt

2020-07-22 Thread Christoph Hellwig
On Mon, Jul 20, 2020 at 01:47:56PM -0700, Alexei Starovoitov wrote: > > a kernel pointer. This is something that works for most common sockopts > > (and is something that the ePBF support relies on), but unfortunately > > in various corner cases we either don't use the passed in length, or in > >

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

2020-07-22 Thread Christoph Hellwig
On Mon, Jul 20, 2020 at 10:55:43AM -0700, Eric Biggers wrote: > On Mon, Jul 20, 2020 at 07:43:22PM +0200, Christoph Hellwig wrote: > > On Mon, Jul 20, 2020 at 09:37:48AM -0700, Eric Biggers wrote: > > > How does this not introduce a massive security hole when > > > CONFIG_ARCH_HAS_NON_OVERLAPPING_A

Re: [PATCH v2 0/7] crypto: add CRYPTO_ALG_ALLOCATES_MEMORY

2020-07-22 Thread Herbert Xu
On Fri, Jul 17, 2020 at 05:42:43PM +0300, Horia Geantă wrote: > > Looks like there's no mention of a limit on src, dst scatterlists size > that crypto implementations could use when pre-allocating memory > and crypto users needing CRYPTO_ALG_ALLOCATES_MEMORY should be aware of > (for the contract t

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

2020-07-22 Thread Herbert Xu
On Wed, Jul 22, 2020 at 09:06:29AM +0200, Alexandre Torgue wrote: > > hum, I was not aware that I could take "crypto" patches. But anyway I think, > the clean way (to avoid merge issue later) is that I take mach-stm32 patch > and Herbert the crypto one. Except if Herbert doesn't agree can you plea

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

2020-07-22 Thread Alexandre Torgue
On 7/21/20 7:49 PM, Alexander A. Klimov wrote: 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. Determinis