You've sent me less than a handfull of 14 patches, there's no way
to properly review this.
On Tue, Nov 10, 2020 at 02:24:35PM -0500, Chris Mason wrote:
> I think APIs change based on the needs of the project. We do this all the
> time in the kernel, and we don???t think twice about updating users of the
> API as needed.
We update kernel APIs when:
- we need additional functionality
On Mon, Nov 09, 2020 at 02:01:41PM -0500, Chris Mason wrote:
> You do consistently ask for a shim layer, but you haven???t explained what
> we gain by diverging from the documented and tested API of the upstream zstd
> project. It???s an important discussion given that we hope to regularly
> updat
You just keep resedning this crap, don't you? Haven't you been told
multiple times to provide a proper kernel API by now?
On Mon, Nov 02, 2020 at 10:05:27PM -0800, Nick Terrell wrote:
> From: Nick Terrell
>
> Adds zstd_compat.h which provides the necessary functions from the
> current zstd.h AP
On Mon, Oct 05, 2020 at 08:44:39AM +0200, Ard Biesheuvel wrote:
> On Mon, 5 Oct 2020 at 08:40, Stephan Mueller wrote:
> >
> > Am Montag, 5. Oktober 2020, 08:24:46 CEST schrieb Ard Biesheuvel:
> >
> > Hi Ard,
> >
> > > If jitterentropy is a special case, we could put a alternate
> > > non-'static i
[adding Thomas]
On Mon, Oct 05, 2020 at 08:40:25AM +0200, Stephan Mueller wrote:
> > If jitterentropy is a special case, we could put a alternate
> > non-'static inline' version of random_get_entropy() in the core
> > kernel, and only export it if JITTER_ENTROPY is built as a module in
> > the fir
On Sun, Oct 04, 2020 at 11:16:10PM +0200, Ard Biesheuvel wrote:
> On Sun, 4 Oct 2020 at 20:48, Stephan M??ller wrote:
> >
> > The RISC-V architecture is about to implement the callback
> > random_get_entropy with a function that is not exported to modules.
>
> Why is that? Wouldn't it be better t
On Thu, Oct 01, 2020 at 06:35:34PM +, Nick Terrell wrote:
> I???m open to suggestions on how to get a zstd update done better. I don???t
> know of any way to break this patch up into smaller patches that all compile.
> The code is all generated directly from upstream and modified to work in the
On Wed, Sep 30, 2020 at 08:05:45PM +, Nick Terrell wrote:
>
>
> > On Sep 29, 2020, at 11:53 PM, Christoph Hellwig wrote:
> >
> > As you keep resend this I keep retelling you that should not do it.
> > Please provide a proper Linux API, and switch to
On Tue, Sep 29, 2020 at 11:56:18PM -0700, Palmer Dabbelt wrote:
> clint_time_val will soon be used by the RISC-V implementation of
> random_get_entropy(), which is a static inline function that may be used by
> modules (at least CRYPTO_JITTERENTROPY=m).
At very least this needs to be an EXPORT_SYM
As you keep resend this I keep retelling you that should not do it.
Please provide a proper Linux API, and switch to that. Versioned APIs
have absolutely no business in the Linux kernel.
On Tue, Sep 29, 2020 at 11:53:09PM -0700, Nick Terrell wrote:
> From: Nick Terrell
>
> This patchset upgrade
On Mon, Sep 21, 2020 at 02:38:46PM +0300, Peter Ujfalusi wrote:
> Make sure that we call the dma_unmap_sg on the correct scatterlist on
> completion with the correct sg_nents.
>
> We also should be calling dma_sync_sg_for_device() on the tx buffer before
> giving it to the DMA and the dma_sync_sg_
FYI, as mentioned last time: clear NAK for letting these bad APIs
slip into the overall kernel code. Please provide proper kernel style
wrappers to avoid these kinds of updates and in the future just change
APIs on an as-needed basis.
On Wed, Sep 16, 2020 at 09:35:51PM -0400, Rik van Riel wrote:
> > One possibility is to have a kernel wrapper on top of the zstd API to
> > make it
> > more ergonomic. I personally don???t really see the value in it, since
> > it adds
> > another layer of indirection between zstd and the caller, bu
On Wed, Sep 16, 2020 at 10:43:04AM -0400, Chris Mason wrote:
> Otherwise we just end up with drift and kernel-specific bugs that are harder
> to debug. To the extent those APIs make us contort the kernel code, I???m
> sure Nick is interested in improving things in both places.
Seriously, we do no
On Wed, Sep 16, 2020 at 10:20:52AM -0400, Chris Mason wrote:
> It???s not completely clear what you???re asking for here. If the API
> matches what???s in zstd-1.4.6, that seems like a reasonable way to label
> it. That???s what the upstream is for this code.
>
> I???m also not sure why we???re
On Tue, Sep 15, 2020 at 08:42:59PM -0700, Nick Terrell wrote:
> From: Nick Terrell
>
> Move away from the compatibility wrapper to the zstd-1.4.6 API. This
> code is functionally equivalent.
Again, please use sensible names And no one gives a fuck if this bad
API is "zstd-1.4.6" as the Linux ke
On Tue, Sep 15, 2020 at 08:42:54PM -0700, Nick Terrell wrote:
> From: Nick Terrell
>
> Adds zstd_compat.h which provides the necessary functions from the
> current zstd.h API. It is only active for zstd versions 1.4.6 and newer.
> That means it is disabled currently, but will become active when a
> + const size_t wksp_size = ZSTD_estimateCCtxSize(ZSTD_DEF_LEVEL);
> +
> + if (ZSTD_isError(wksp_size)) {
> + ret = -EINVAL;
> + goto out_free;
> + }
Pleas switch to properly named functions when you touch this.
The API names here look like a cat threw up on t
On Thu, Aug 06, 2020 at 03:21:25PM -0700, Eric Dumazet wrote:
> converting get_user(...) to copy_from_sockptr(...) really assumed the
> optlen
> has been validated to be >= sizeof(int) earlier.
>
> Which is not always the case, for example here.
Yes. And besides the bpfilter mess the main re
On Sun, Aug 02, 2020 at 02:14:06PM -0500, Bjorn Helgaas wrote:
> But what guarantees that a PCI config register cannot contain ~0?
> If there's something about that in the spec I'd love to know where it
> is because it would simplify a lot of things.
There isn't. An we even have cases like the NV
On Mon, Jul 27, 2020 at 06:16:32PM +0200, Jason A. Donenfeld wrote:
> Maybe sockptr_advance should have some safety checks and sometimes
> return -EFAULT? Or you should always use the implementation where
> being a kernel address is an explicit bit of sockptr_t, rather than
> being implicit?
I alr
Can you try the patch below?
---
>From cce2d2e1b43ecee5f4af7cf116808b74b330080f Mon Sep 17 00:00:00 2001
From: Christoph Hellwig
Date: Mon, 27 Jul 2020 17:42:27 +0200
Subject: net: remove sockptr_advance
sockptr_advance never properly worked. Replace it with _offset variants
I have to admit I didn't spot the difference between the good and the
bad output even after trying hard..
But can you try the patch below?
---
>From cce2d2e1b43ecee5f4af7cf116808b74b330080f Mon Sep 17 00:00:00 2001
From: Christoph Hellwig
Date: Mon, 27 Jul 2020 17:42:27 +0200
Subj
On Mon, Jul 27, 2020 at 05:03:10PM +0200, Jason A. Donenfeld wrote:
> Hi Christoph,
>
> On Thu, Jul 23, 2020 at 08:08:54AM +0200, Christoph Hellwig wrote:
> > diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
> > index da933f99b5d517..42befbf12846c0 1006
On Mon, Jul 27, 2020 at 03:15:05PM +0300, Ido Schimmel wrote:
> I see a regression with IPv6 flowlabel that I bisected to this patch.
> When passing '-F 0' to 'ping' the flow label should be random, yet it's
> the same every time after this patch.
Can you send a reproducer?
>
> It seems that the
push this out when
> that is done.
The buildbot found one warning with the isdn debug code after a few
days, here is what I think is the best fix:
---
>From 6601732f7a54db5f04efba08f7e9224e5b757112 Mon Sep 17 00:00:00 2001
From: Christoph Hellwig
Date: Sun, 26 Jul 2020 09:00:09
On Thu, Jul 23, 2020 at 09:40:27AM -0700, Eric Dumazet wrote:
> I am not sure why you chose sockptr_t for something that really seems
> generic.
>
> Or is it really meant to be exclusive to setsockopt() and/or getsockopt() ?
>
> If the first user of this had been futex code, we would have used
On Thu, Jul 23, 2020 at 02:42:11PM +, David Laight wrote:
> From: Christoph Hellwig
> > Sent: 23 July 2020 07:09
> >
> > The bpfilter user mode helper processes the optval address using
> > process_vm_readv. Don't send it kernel addresses fed under
> >
On Thu, Jul 23, 2020 at 11:16:16AM +, David Laight wrote:
> From: Christoph Hellwig
> > Sent: 23 July 2020 07:09
> >
> > This is mostly to prepare for cleaning up the callers, as bpfilter by
> > design can't handle kernel pointers.
>
> You've f
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 -
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
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
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/bpf
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
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
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
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
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
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
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
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
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
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_sockg
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
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
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
ed to check that users don't pass in kernel
address and thus gain access to kernel memory. Thus the USER_SOCKPTR
helper is replaced with a init_user_sockptr function that does this check
and returns an error if it fails.
Signed-off-by: Christoph Hellwig
---
include/linux/sockptr.
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
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
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
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
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.
> ^^
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
On Tue, Jul 21, 2020 at 04:40:16AM +0200, Luc Van Oostenryck wrote:
> > req.pid = current->pid;
> > req.cmd = optname;
> > - req.addr = (long __force __user)optval;
> > + req.addr = (__force long)optval;
>
> For casts to integers, even '__force' is not needed (since integers
> can't be
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_ADDRESS_SPACE?
>
> AFAICS, userspace can pass in a pointer >= TASK_SIZE,
> and this code makes it be treated as a kernel pointer.
Yeah, we'll
On Mon, Jul 20, 2020 at 09:38:36AM -0700, Eric Biggers wrote:
> Please mention what git tree your patchset applies to.
net-next/master
When feeding addresses to userspace we can't support kernel addresses
that were fed under set_fs(KERNEL_DS) from bpf-cgroup.
Signed-off-by: Christoph Hellwig
---
net/bpfilter/bpfilter_kern.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/net/bpfilter/bpfilter_kern.c b/net/bpf
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
architectures with overlapping
address spaces a flag to indicate the address space is used instead.
Signed-off-by: Christoph Hellwig
---
include/linux/sockptr.h | 121
1 file changed, 121 insertions(+)
create mode 100644 include/linux/sockptr.h
diff --git
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 91224709869389..bd20fc5cce0850
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 bd20fc5cce0850
The __user doesn't make sense when casting to an integer type.
Signed-off-by: Christoph Hellwig
---
net/bpfilter/bpfilter_kern.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bpfilter/bpfilter_kern.c b/net/bpfilter/bpfilter_kern.c
index 977e9dad72ca4f..713b4b3d0
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
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
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
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
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
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 | 8
net/ipv4/bpfilter/sockopt.c | 8
net/ipv4/ip_sockg
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
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
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
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
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
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
---
crypto/af_alg.c | 7 ++--
drivers/crypto/chelsio
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
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
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
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
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
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
On Wed, Jul 01, 2020 at 01:42:09PM +0100, Christoph Hellwig wrote:
> On Wed, Jul 01, 2020 at 12:02:57PM +0100, Giovanni Cabiddu wrote:
> > This patchset defines a blocklist of devices in the vfio-pci module and adds
> > the current generation of Intel(R) QuickAssist devices to
On Wed, Jul 01, 2020 at 12:02:57PM +0100, Giovanni Cabiddu wrote:
> This patchset defines a blocklist of devices in the vfio-pci module and adds
> the current generation of Intel(R) QuickAssist devices to it as they are
> not designed to run in an untrusted environment.
How can they not be safe?
On Tue, May 26, 2020 at 07:49:08PM +0800, Zhangfei Gao wrote:
> Some platform devices appear as PCI but are actually on the AMBA bus,
> and they need fixup in drivers/pci/quirks.c handling iommu_fwnode.
> Here introducing PCI_FIXUP_IOMMU, which is called after iommu_fwnode
> is allocated, instead o
On Fri, Oct 11, 2019 at 09:38:47PM -0700, Eric Biggers wrote:
> This series converts the glue code for the SPARC64 crypto opcodes
> implementations of AES, Camellia, DES, and 3DES modes from the
> deprecated "blkcipher" API to the "skcipher" API. This is needed in
> order for the blkcipher API to
Yes, we should never do zero-length dma mappings, so this looks good:
Reviewed-by: Christoph Hellwig
scatterlist elements longer than 4GB sound odd. Please submit it
in a series with your actual user so that we can help figuring out
if it really makes sense or if there is a better way to solve your
problem.
As is this patch will massively increase the memory usage for all users
of struct scatter
On Tue, Aug 21, 2018 at 09:40:34PM -0400, Martin K. Petersen wrote:
> When crc-t10dif is initialized, the crypto infrastructure will pick the
> algorithm with the highest priority currently registered. Both block and
> SCSI will cause crc-t10dif to be compiled as a built-in so this
> selection happ
On Wed, Jan 10, 2018 at 04:25:22PM +0100, Boris Brezillon wrote:
> On Wed, 10 Jan 2018 15:15:43 +
> Robin Murphy wrote:
>
> > phys_to_dma() is an internal helper for certain DMA API implementations,
> > and is not appropriate for drivers to use. It appears that what the CESA
> > driver really
On Wed, Oct 04, 2017 at 11:21:53AM +0200, Borislav Petkov wrote:
> On Wed, Oct 04, 2017 at 12:26:11PM +0530, P J P wrote:
> > Each return above needs to be on its own line.
>
> ... because?
It's actually readable by humanѕ that way.
1 - 100 of 164 matches
Mail list logo