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
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
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:
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
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
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(+
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
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
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
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_
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
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,
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
+++
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
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
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_
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
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
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
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
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_
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
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 |
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
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
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/
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/
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(-)
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
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
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
> -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
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
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
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
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
>
>
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
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
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
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
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
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
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
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
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
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
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/
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
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
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
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
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
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
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
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
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
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
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
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
> >
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
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
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
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
63 matches
Mail list logo