Re: [PATCH v2 2/2] net: socket: implement SO_DESCRIPTION

2020-08-21 Thread kernel test robot
Hi Pascal, Thank you for the patch! Yet something to improve: [auto build test ERROR on security/next-testing] [also build test ERROR on linux/master] [cannot apply to mmotm/master tip/perf/core linus/master v5.9-rc1 next-20200821] [If your patch is applied to the wrong git tree, kindly drop us

Re: linux-next: build failure after merge of the net-next tree

2020-08-21 Thread Sven Joachim
On 2020-08-21 09:23 -0700, Brian Vazquez wrote: > Hi Sven, > > Sorry for the late reply, did you still see this after: > https://patchwork.ozlabs.org/project/netdev/patch/20200803131948.41736-1-yuehaib...@huawei.com/ > ?? That patch is apparently already in 5.9-rc1 as commit 80fbbb1672e7, so yes

[PATCH net-next v3 1/2] io_uring: allow tcp ancillary data for __sys_recvmsg_sock()

2020-08-21 Thread Luke Hsiao
From: Luke Hsiao For TCP tx zero-copy, the kernel notifies the process of completions by queuing completion notifications on the socket error queue. This patch allows reading these notifications via recvmsg to support TCP tx zero-copy. Ancillary data was originally disallowed due to privilege es

[PATCH net-next v3 2/2] io_uring: ignore POLLIN for recvmsg on MSG_ERRQUEUE

2020-08-21 Thread Luke Hsiao
From: Luke Hsiao Currently, io_uring's recvmsg subscribes to both POLLERR and POLLIN. In the context of TCP tx zero-copy, this is inefficient since we are only reading the error queue and not using recvmsg to read POLLIN responses. This patch was tested by using a simple sending program to call

Re: [PATCH next] net: add option to not create fall-back tunnels in root-ns as well

2020-08-21 Thread महेश बंडेवार
On Fri, Aug 21, 2020 at 2:35 PM David Miller wrote: > > From: Maciej Żenczykowski > Date: Fri, 21 Aug 2020 14:25:20 -0700 > > > If no kernel command line option is specified, should the default > > be to maintain compatibility, or do you think it's okay to make > > the default be no extra interfa

Re: [PATCH v2 1/2] mm: add GFP mask param to strndup_user

2020-08-21 Thread Andrew Morton
On Fri, 21 Aug 2020 20:28:26 -0700 Pascal Bouchareine wrote: > Let caller specify allocation. > Preserve existing calls with GFP_USER. > > 21 files changed, 65 insertions(+), 43 deletions(-) Why change all existing callsites so that one callsite can pass in a different gfp_t? > diff --git a/d

Re: [PATCH bpf-next v1 6/8] bpf: Introduce bpf_per_cpu_ptr()

2020-08-21 Thread Andrii Nakryiko
On Fri, Aug 21, 2020 at 8:26 PM Andrii Nakryiko wrote: > > On Wed, Aug 19, 2020 at 3:42 PM Hao Luo wrote: > > > > Add bpf_per_cpu_ptr() to help bpf programs access percpu vars. > > bpf_per_cpu_ptr() has the same semantic as per_cpu_ptr() in the kernel > > except that it may return NULL. This happ

Re: [PATCH bpf-next v1 8/8] bpf/selftests: Test for bpf_per_cpu_ptr()

2020-08-21 Thread Andrii Nakryiko
On Wed, Aug 19, 2020 at 3:42 PM Hao Luo wrote: > > Test bpf_per_cpu_ptr(). Test two paths in the kernel. If the base > pointer points to a struct, the returned reg is of type PTR_TO_BTF_ID. > Direct pointer dereference can be applied on the returned variable. > If the base pointer isn't a struct,

[PATCH v2 2/2] net: socket: implement SO_DESCRIPTION

2020-08-21 Thread Pascal Bouchareine
This command attaches the zero terminated string in optval to the socket for troubleshooting purposes. The free string is displayed in the process fdinfo file for that fd (/proc//fdinfo/). One intended usage is to allow processes to self-document sockets for netstat and friends to report We ignor

[PATCH v2 1/2] mm: add GFP mask param to strndup_user

2020-08-21 Thread Pascal Bouchareine
Let caller specify allocation. Preserve existing calls with GFP_USER. Signed-off-by: Pascal Bouchareine --- Updating patch 1/ and 2/ to address comments drivers/dma-buf/dma-buf.c | 2 +- drivers/gpu/drm/i915/i915_debugfs_params.c | 2 +- drivers/gpu/drm/vc4/vc4_bo.c

Re: [PATCH bpf-next v1 6/8] bpf: Introduce bpf_per_cpu_ptr()

2020-08-21 Thread Andrii Nakryiko
On Wed, Aug 19, 2020 at 3:42 PM Hao Luo wrote: > > Add bpf_per_cpu_ptr() to help bpf programs access percpu vars. > bpf_per_cpu_ptr() has the same semantic as per_cpu_ptr() in the kernel > except that it may return NULL. This happens when the cpu parameter is > out of range. So the caller must che

Re: [PATCH bpf-next 00/16] Add libbpf full support for BPF-to-BPF calls

2020-08-21 Thread Andrii Nakryiko
On Fri, Aug 21, 2020 at 4:00 PM Alexei Starovoitov wrote: > > On Thu, Aug 20, 2020 at 04:12:34PM -0700, Andrii Nakryiko wrote: > > Currently, libbpf supports a limited form of BPF-to-BPF subprogram calls. > > The > > restriction is that entry-point BPF program should use *all* of defined > > sub-

Re: [PATCH bpf-next v1 3/8] bpf: Introduce help function to validate ksym's type.

2020-08-21 Thread Andrii Nakryiko
On Fri, Aug 21, 2020 at 5:43 PM Hao Luo wrote: > > On Fri, Aug 21, 2020 at 2:50 PM Andrii Nakryiko > wrote: > > > > On Thu, Aug 20, 2020 at 10:22 AM Yonghong Song wrote: > > > > > > > > > > > > On 8/19/20 3:40 PM, Hao Luo wrote: > > > > For a ksym to be safely dereferenced and accessed, its type

Re: [PATCH net-next v2 2/2] io_uring: ignore POLLIN for recvmsg on MSG_ERRQUEUE

2020-08-21 Thread Jens Axboe
On 8/21/20 8:13 PM, Luke Hsiao wrote: > Hi Jens, > > On Fri, Aug 21, 2020 at 7:09 PM Jens Axboe wrote: >> >> On 8/21/20 8:04 PM, Luke Hsiao wrote: >>> >> Sorry, one more minor thing to fix up: >> >>> @@ -4932,6 +4934,11 @@ static bool io_arm_poll_handler(struct io_kiocb *req) >>> ma

Re: [PATCH net-next v2 2/2] io_uring: ignore POLLIN for recvmsg on MSG_ERRQUEUE

2020-08-21 Thread Jens Axboe
On 8/21/20 8:04 PM, Luke Hsiao wrote: > From: Luke Hsiao > > Currently, io_uring's recvmsg subscribes to both POLLERR and POLLIN. In > the context of TCP tx zero-copy, this is inefficient since we are only > reading the error queue and not using recvmsg to read POLLIN responses. > > This patch w

[PATCH net-next v2 2/2] io_uring: ignore POLLIN for recvmsg on MSG_ERRQUEUE

2020-08-21 Thread Luke Hsiao
From: Luke Hsiao Currently, io_uring's recvmsg subscribes to both POLLERR and POLLIN. In the context of TCP tx zero-copy, this is inefficient since we are only reading the error queue and not using recvmsg to read POLLIN responses. This patch was tested by using a simple sending program to call

[PATCH net-next v2 1/2] io_uring: allow tcp ancillary data for __sys_recvmsg_sock()

2020-08-21 Thread Luke Hsiao
From: Luke Hsiao For TCP tx zero-copy, the kernel notifies the process of completions by queuing completion notifications on the socket error queue. This patch allows reading these notifications via recvmsg to support TCP tx zero-copy. Ancillary data was originally disallowed due to privilege es

[PATCH net-next] net: Remove unnecessary intermediate variables

2020-08-21 Thread Jianlin Lv
It is not necessary to use src/dst as an intermediate variable for assignment operation; Delete src/dst intermediate variables to avoid unnecessary variable declarations. Signed-off-by: Jianlin Lv --- drivers/net/vxlan.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) di

Re: [PATCH v3 1/2] net: add support for threaded NAPI polling

2020-08-21 Thread Jakub Kicinski
On Fri, 21 Aug 2020 21:01:50 +0200 Felix Fietkau wrote: > For some drivers (especially 802.11 drivers), doing a lot of work in the NAPI > poll function does not perform well. Since NAPI poll is bound to the CPU it > was scheduled from, we can easily end up with a few very busy CPUs spending > most

Re: [PATCH iproute2 net-next] iplink: add support for protodown reason

2020-08-21 Thread Stephen Hemminger
On Fri, 21 Aug 2020 14:09:14 -0700 Roopa Prabhu wrote: > On 8/20/20 10:18 PM, Roopa Prabhu wrote: > > > > On 8/20/20 9:36 PM, Stephen Hemminger wrote: > >> > >> > >> On Thu, 20 Aug 2020 20:52:02 -0700 > >> Roopa Prabhu wrote: > >> > >>> + if (tb[IFLA_PROTO_DOWN]) { > >>> + if

Re: [RFC PATCH net-next 0/6] devlink: Add device metric support

2020-08-21 Thread David Ahern
On 8/21/20 6:37 PM, Jakub Kicinski wrote: >>> # cat /proc/net/tls_stat >> >> I do not agree with adding files under /proc/net for this. > > Yeah it's not the best, with higher LoC a better solution should be > within reach. The duplicity here is mind-boggling. Tls stats from hardware is on par

Re: [PATCH net-next 2/2] io_uring: ignore POLLIN for recvmsg on MSG_ERRQUEUE

2020-08-21 Thread Jens Axboe
On 8/21/20 6:08 PM, Luke Hsiao wrote: > Hi Jakub and Jens, > > Thank you for both of your reviews. Some responses inline below. > > On Fri, Aug 21, 2020 at 2:11 PM Jens Axboe wrote: >> >> On 8/21/20 2:41 PM, Jakub Kicinski wrote: >>> On Thu, 20 Aug 2020 16:49:54 -0700 Luke Hsiao wrote: +

Re: [PATCH] net: Get rid of consume_skb when tracing is off

2020-08-21 Thread Herbert Xu
On Fri, Aug 21, 2020 at 04:40:49PM -0700, Eric Dumazet wrote: > > I am not completely familiar with CONFIG_TRACEPOINTS > > Is "perf probe" support requiring it ? Yes. perf probe requires CONFIG_KPROBE_EVENTS which selects CONFIG_TRACING which selects CONFIG_TRACEPOINTS. > We want the following

Re: [RFC PATCH net-next 0/6] devlink: Add device metric support

2020-08-21 Thread Jakub Kicinski
On Fri, 21 Aug 2020 17:59:57 -0600 David Ahern wrote: > On 8/21/20 5:50 PM, Jakub Kicinski wrote: > > On Fri, 21 Aug 2020 13:12:59 -0600 David Ahern wrote: > >> I am not following what you are proposing as a solution. You do not like > >> Ido's idea of stats going through devlink, but you are not

Re: [PATCH v3 05/11] genirq: Shutdown irq chips in suspend/resume during hibernation

2020-08-21 Thread Thomas Gleixner
On Fri, Aug 21 2020 at 22:27, Thomas Gleixner wrote: > Add a new quirk flag IRQCHIP_SHUTDOWN_ON_SUSPEND and add support for > it the core interrupt suspend/resume paths. > > Changelog: > v1->v2: Corrected the author's name to tglx@ Can you please move that Changelog part below the --- seperator ne

Re: [RFC PATCH net-next 0/6] devlink: Add device metric support

2020-08-21 Thread David Ahern
On 8/21/20 5:50 PM, Jakub Kicinski wrote: > On Fri, 21 Aug 2020 13:12:59 -0600 David Ahern wrote: >> On 8/21/20 10:53 AM, Jakub Kicinski wrote: >>> How many times do I have to say that I'm not arguing against the value >>> of the data? >>> >>> If you open up this interface either someone will poli

Re: [RFC PATCH net-next 0/6] devlink: Add device metric support

2020-08-21 Thread Jakub Kicinski
On Fri, 21 Aug 2020 13:12:59 -0600 David Ahern wrote: > On 8/21/20 10:53 AM, Jakub Kicinski wrote: > > How many times do I have to say that I'm not arguing against the value > > of the data? > > > > If you open up this interface either someone will police it, or it will > > become a dumpster. >

Re: [PATCH] net: Get rid of consume_skb when tracing is off

2020-08-21 Thread Eric Dumazet
On 8/21/20 3:23 PM, Herbert Xu wrote: > The function consume_skb is only meaningful when tracing is enabled. > This patch makes it conditional on CONFIG_TRACEPOINTS. > > Signed-off-by: Herbert Xu > I am not completely familiar with CONFIG_TRACEPOINTS Is "perf probe" support requiring it ?

Re: [PATCH bpf-next v4 28/30] bpf: eliminate rlimit-based memory accounting infra for bpf maps

2020-08-21 Thread Roman Gushchin
On Fri, Aug 21, 2020 at 11:23:21AM -0700, Alexei Starovoitov wrote: > On Fri, Aug 21, 2020 at 08:01:32AM -0700, Roman Gushchin wrote: > > > > diff --git a/tools/testing/selftests/bpf/progs/map_ptr_kern.c > > b/tools/testing/selftests/bpf/progs/map_ptr_kern.c > > index 473665cac67e..49d1dcaf7999

Re: [PATCH bpf-next v1 5/8] bpf/selftests: ksyms_btf to test typed ksyms

2020-08-21 Thread Andrii Nakryiko
On Thu, Aug 20, 2020 at 10:32 AM Yonghong Song wrote: > > > > On 8/19/20 3:40 PM, Hao Luo wrote: > > Selftests for typed ksyms. Tests two types of ksyms: one is a struct, > > the other is a plain int. This tests two paths in the kernel. Struct > > ksyms will be converted into PTR_TO_BTF_ID by the

Re: [PATCH bpf-next 00/16] Add libbpf full support for BPF-to-BPF calls

2020-08-21 Thread Alexei Starovoitov
On Thu, Aug 20, 2020 at 04:12:34PM -0700, Andrii Nakryiko wrote: > Currently, libbpf supports a limited form of BPF-to-BPF subprogram calls. The > restriction is that entry-point BPF program should use *all* of defined > sub-programs in BPF .o file. If any of the subprograms is not used, such > ent

Re: [PATCH] net: dsa: sja1105: Do not use address of compatible member in sja1105_check_device_id

2020-08-21 Thread Vladimir Oltean
On Fri, Aug 21, 2020 at 03:25:16PM -0700, Nathan Chancellor wrote: > Clang warns: > > drivers/net/dsa/sja1105/sja1105_main.c:3418:38: warning: address of > array 'match->compatible' will always evaluate to 'true' > [-Wpointer-bool-conversion] > for (match = sja1105_dt_ids; match->compatibl

[PATCH bpf-next] libbpf: fix type compatibility check copy-paste error

2020-08-21 Thread Andrii Nakryiko
Fix copy-paste error in types compatibility check. Local type is accidentally used instead of target type for the very first type check strictness check. This can result in potentially less strict candidate comparison. Fix the error. Fixes: 3fc32f40c402 ("libbpf: Implement type-based CO-RE relocat

[PATCH bpf-next] libbpf: avoid false unuinitialized variable warning in bpf_core_apply_relo

2020-08-21 Thread Andrii Nakryiko
Some versions of GCC report uninitialized targ_spec usage. GCC is wrong, but let's avoid unnecessary warnings. Fixes: ddc7c3042614 ("libbpf: implement BPF CO-RE offset relocation algorithm") Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

Re: [PATCH bpf-next v1 4/8] bpf/libbpf: BTF support for typed ksyms

2020-08-21 Thread Andrii Nakryiko
On Wed, Aug 19, 2020 at 3:42 PM Hao Luo wrote: > > If a ksym is defined with a type, libbpf will try to find the ksym's btf > information from kernel btf. If a valid btf entry for the ksym is found, > libbpf can pass in the found btf id to the verifier, which validates the > ksym's type and value.

Re: [PATCH] net: dsa: sja1105: Do not use address of compatible member in sja1105_check_device_id

2020-08-21 Thread Florian Fainelli
On 8/21/20 3:25 PM, Nathan Chancellor wrote: > Clang warns: > > drivers/net/dsa/sja1105/sja1105_main.c:3418:38: warning: address of > array 'match->compatible' will always evaluate to 'true' > [-Wpointer-bool-conversion] > for (match = sja1105_dt_ids; match->compatible; match++) { >

[PATCH v3 10/11] xen: Update sched clock offset to avoid system instability in hibernation

2020-08-21 Thread Anchal Agarwal
Save/restore xen_sched_clock_offset in syscore suspend/resume during PM hibernation. Commit '867cefb4cb1012: ("xen: Fix x86 sched_clock() interface for xen")' fixes xen guest time handling during migration. A similar issue is seen during PM hibernation when system runs CPU intensive workload. Post

[PATCH v3 11/11] PM / hibernate: update the resume offset on SNAPSHOT_SET_SWAP_AREA

2020-08-21 Thread Anchal Agarwal
From: Aleksei Besogonov The SNAPSHOT_SET_SWAP_AREA is supposed to be used to set the hibernation offset on a running kernel to enable hibernating to a swap file. However, it doesn't actually update the swsusp_resume_block variable. As a result, the hibernation fails at the last step (after all th

[PATCH v3 09/11] xen: Introduce wrapper for save/restore sched clock offset

2020-08-21 Thread Anchal Agarwal
Introduce wrappers for save/restore xen_sched_clock_offset to be used by PM hibernation code to avoid system instability during resume. Signed-off-by: Anchal Agarwal --- arch/x86/xen/time.c| 15 +-- arch/x86/xen/xen-ops.h | 2 ++ 2 files changed, 15 insertions(+), 2 deletions(-)

[PATCH v3 08/11] x86/xen: save and restore steal clock during PM hibernation

2020-08-21 Thread Anchal Agarwal
Save/restore steal times in syscore suspend/resume during PM hibernation. Commit '5e25f5db6abb9: ("xen/time: do not decrease steal time after live migration on xen")' fixes xen guest steal time handling during migration. A similar issue is seen during PM hibernation. Currently, steal time accountin

[PATCH v3 06/11] xen-blkfront: add callbacks for PM suspend and hibernation

2020-08-21 Thread Anchal Agarwal
From: Munehisa Kamata S4 power transisiton states are much different than xen suspend/resume. Former is visible to the guest and frontend drivers should be aware of the state transistions and should be able to take appropriate actions when needed. In transition to S4 we need to make sure that at

[PATCH v3 07/11] xen-netfront: add callbacks for PM suspend and hibernation

2020-08-21 Thread Anchal Agarwal
From: Munehisa Kamata Add freeze, thaw and restore callbacks for PM suspend and hibernation support. The freeze handler simply disconnects the frotnend from the backend and frees resources associated with queues after disabling the net_device from the system. The restore handler just changes the

[PATCH v3 05/11] genirq: Shutdown irq chips in suspend/resume during hibernation

2020-08-21 Thread Thomas Gleixner
Many legacy device drivers do not implement power management (PM) functions which means that interrupts requested by these drivers stay in active state when the kernel is hibernated. This does not matter on bare metal and on most hypervisors because the interrupt is restored on resume without any

[PATCH v3 04/11] x86/xen: add system core suspend and resume callbacks

2020-08-21 Thread Anchal Agarwal
From: Munehisa Kamata Add Xen PVHVM specific system core callbacks for PM hibernation support. The callbacks suspend and resume Xen primitives like shared_info, pvclock and grant table. These syscore_ops are specifically for domU hibernation. xen_suspend() calls syscore_suspend() during Xen suspe

[PATCH v3 03/11] x86/xen: Introduce new function to map HYPERVISOR_shared_info on Resume

2020-08-21 Thread Anchal Agarwal
Introduce a small function which re-uses shared page's PA allocated during guest initialization time in reserve_shared_info() and not allocate new page during resume flow. It also does the mapping of shared_info_page by calling xen_hvm_init_shared_info() to use the function. Changelog: v1->v2: Re

[PATCH v3 02/11] xenbus: add freeze/thaw/restore callbacks support

2020-08-21 Thread Anchal Agarwal
From: Munehisa Kamata Since commit b3e96c0c7562 ("xen: use freeze/restore/thaw PM events for suspend/resume/chkpt"), xenbus uses PMSG_FREEZE, PMSG_THAW and PMSG_RESTORE events for Xen suspend. However, they're actually assigned to xenbus_dev_suspend(), xenbus_dev_cancel() and xenbus_dev_resume()

[PATCH v3 01/11] xen/manage: keep track of the on-going suspend mode

2020-08-21 Thread Anchal Agarwal
From: Munehisa Kamata Guest hibernation is different from xen suspend/resume/live migration. Xen save/restore does not use pm_ops as is needed by guest hibernation. Hibernation in guest follows ACPI path and is guest inititated , the hibernation image is saved within guest as compared to later

[PATCH] net: dsa: sja1105: Do not use address of compatible member in sja1105_check_device_id

2020-08-21 Thread Nathan Chancellor
Clang warns: drivers/net/dsa/sja1105/sja1105_main.c:3418:38: warning: address of array 'match->compatible' will always evaluate to 'true' [-Wpointer-bool-conversion] for (match = sja1105_dt_ids; match->compatible; match++) { ~~~ ~~~^~ 1 warning

[PATCH v3 00/11] Fix PM hibernation in Xen guests

2020-08-21 Thread Anchal Agarwal
Hello, This series fixes PM hibernation for hvm guests running on xen hypervisor. The running guest could now be hibernated and resumed successfully at a later time. The fixes for PM hibernation are added to block and network device drivers i.e xen-blkfront and xen-netfront. Any other driver that n

Re: [PATCH bpf-next v3 0/6] Allow updating sockmap / sockhash from BPF

2020-08-21 Thread Alexei Starovoitov
On Fri, Aug 21, 2020 at 3:30 AM Lorenz Bauer wrote: > > We're currently building a control plane for our BPF socket dispatch > work. As part of that, we have a need to create a copy of an existing > sockhash, to allow us to change the keys. I previously proposed allowing > privileged userspace to

[PATCH] net: Get rid of consume_skb when tracing is off

2020-08-21 Thread Herbert Xu
The function consume_skb is only meaningful when tracing is enabled. This patch makes it conditional on CONFIG_TRACEPOINTS. Signed-off-by: Herbert Xu diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 46881d902124..e8bca74857a3 100644 --- a/include/linux/skbuff.h +++ b/include/li

Re: [PATCH bpf-next v4 00/30] bpf: switch to memcg-based memory accounting

2020-08-21 Thread Roman Gushchin
On Fri, Aug 21, 2020 at 08:01:04AM -0700, Roman Gushchin wrote: > Currently bpf is using the memlock rlimit for the memory accounting. > This approach has its downsides and over time has created a significant > amount of problems: > > 1) The limit is per-user, but because most bpf operations are p

Re: [PATCH] dt-bindings: net: correct description of phy-connection-type

2020-08-21 Thread Rob Herring
On Thu, 20 Aug 2020 13:02:04 +0300, Madalin Bucur wrote: > The phy-connection-type parameter is described in ePAPR 1.1: > > Specifies interface type between the Ethernet device and a physical > layer (PHY) device. The value of this property is specific to the > implementation. > > Signed-off-by:

Re: [PATCH bpf-next v1 3/8] bpf: Introduce help function to validate ksym's type.

2020-08-21 Thread Andrii Nakryiko
On Thu, Aug 20, 2020 at 10:22 AM Yonghong Song wrote: > > > > On 8/19/20 3:40 PM, Hao Luo wrote: > > For a ksym to be safely dereferenced and accessed, its type defined in > > bpf program should basically match its type defined in kernel. Implement > > a help function for a quick matching, which i

Re: [PATCH 6/6] xfrm: add espintcp (RFC 8229)

2020-08-21 Thread Eric Dumazet
On 1/20/20 11:38 PM, Steffen Klassert wrote: > From: Sabrina Dubroca > > TCP encapsulation of IKE and IPsec messages (RFC 8229) is implemented > as a TCP ULP, overriding in particular the sendmsg and recvmsg > operations. A Stream Parser is used to extract messages out of the TCP > stream usin

RE: Use of genradix in sctp

2020-08-21 Thread David Laight
From: 'Marcelo Ricardo Leitner' > Sent: 21 August 2020 21:47 ... > > 3) Defer the allocation until the stream is used. > >for outbound streams this could remove the extra buffer. > > This can be tricky. What should happen if it gets a packet on a stream > that it couldn't allocate, and then an

Re: [PATCH next] net: add option to not create fall-back tunnels in root-ns as well

2020-08-21 Thread David Miller
From: Maciej Żenczykowski Date: Fri, 21 Aug 2020 14:25:20 -0700 > If no kernel command line option is specified, should the default > be to maintain compatibility, or do you think it's okay to make > the default be no extra interfaces? They can AFAICT always be added > manually via 'ip link add'

Re: [PATCH net-next 0/2] crypto/chelsio: Restructure chelsio's inline crypto drivers

2020-08-21 Thread David Miller
From: Vinay Kumar Yadav Date: Wed, 19 Aug 2020 19:31:19 +0530 > This series of patches will move chelsio's inline crypto > drivers (ipsec and chtls) from "drivers/crypto/chelsio/" > to "drivers/net/ethernet/chelsio/inline_crypto/" > for better maintenance. > > Patch1: moves out chtls. > Patch2:

Re: [PATCH v2 bpf-next] libbpf: add perf_buffer APIs for better integration with outside epoll loop

2020-08-21 Thread Alexei Starovoitov
On Fri, Aug 21, 2020 at 10:06 AM Andrii Nakryiko wrote: > > Add a set of APIs to perf_buffer manage to allow applications to integrate > perf buffer polling into existing epoll-based infrastructure. One example is > applications using libevent already and wanting to plug perf_buffer polling, > ins

[PATCH net v2] drivers/net/wan/lapbether: Added needed_tailroom

2020-08-21 Thread Xie He
The underlying Ethernet device may request necessary tailroom to be allocated by setting needed_tailroom. This driver should also set needed_tailroom to request the tailroom needed by the underlying Ethernet device to be allocated. Cc: Willem de Bruijn Cc: Martin Schiller Signed-off-by: Xie He

Re: [PATCH v2 1/2] ath10k: Keep track of which interrupts fired, don't poll them

2020-08-21 Thread Doug Anderson
Kalle, On Thu, Jul 9, 2020 at 8:22 AM Douglas Anderson wrote: > > If we have a per CE (Copy Engine) IRQ then we have no summary > register. Right now the code generates a summary register by > iterating over all copy engines and seeing if they have an interrupt > pending. > > This has a problem.

RE: Use of genradix in sctp

2020-08-21 Thread David Laight
From: 'Marcelo Ricardo Leitner' > Sent: 21 August 2020 21:47 ... > > > > 2) Optimise the genradix lookup for the case where there > >is a single page - it can be completely inlined. > > And/or our struct sizes. > > __idx_to_offset() will basically do: > if (!is_power_of_2(obj_size)) {

Re: [PATCH bpf-next v4 0/3] bpf: implement link_query for bpf iterators

2020-08-21 Thread Alexei Starovoitov
On Fri, Aug 21, 2020 at 12:04 PM Andrii Nakryiko wrote: > > On Fri, Aug 21, 2020 at 11:44 AM Yonghong Song wrote: > > > > "link" has been an important concept for bpf ecosystem to connect > > bpf program with other properties. Currently, the information related > > information can be queried from

[linux-firmware][pull request]ice: update package file to 1.3.13.0

2020-08-21 Thread Tony Nguyen
Update the package file for the ice driver to 1.3.13.0. Also update the license file to reflect licensing changes. Signed-off-by: Tony Nguyen Tested-by: Aaron Brown --- The following are changes since commit 7a30af16115959cf5a817ae51429e72c0084fc0c: Merge branch 'i915-firmware-updates-08-2020'

Re: [PATCH] net: bypass ->sendpage for slab pages

2020-08-21 Thread David Miller
From: Christoph Hellwig Date: Thu, 20 Aug 2020 06:37:44 +0200 > If you look at who uses sendpage outside the networking layer itself > you see that it is basically block driver and file systems. These > have no way to control what memory they get passed and have to deal > with everything someone

Re: [PATCH iproute2 v5 0/2] iplink: hsr: add support for creating PRP device

2020-08-21 Thread Murali Karicheri
Stephen, On 8/19/20 5:21 PM, Murali Karicheri wrote: Hi, Stephen, On 8/17/20 5:17 PM, Murali Karicheri wrote: This series enhances the iproute2 iplink module to add support for creating PRP device similar to HSR. The kernel part of this is already merged to v5.9 master v5 - addressed comment

Re: [PATCH net-next 2/2] io_uring: ignore POLLIN for recvmsg on MSG_ERRQUEUE

2020-08-21 Thread Jens Axboe
On 8/21/20 2:41 PM, Jakub Kicinski wrote: > On Thu, 20 Aug 2020 16:49:54 -0700 Luke Hsiao wrote: >> +/* If reading from MSG_ERRQUEUE using recvmsg, ignore POLLIN */ >> +if (req->opcode == IORING_OP_RECVMSG && (sqe->msg_flags & MSG_ERRQUEUE)) >> +mask &= ~(POLLIN); > > FWIW this

Re: [PATCH net-next 1/2] io_uring: allow tcp ancillary data for __sys_recvmsg_sock()

2020-08-21 Thread Jens Axboe
On 8/20/20 5:49 PM, Luke Hsiao wrote: > From: Luke Hsiao > > For TCP tx zero-copy, the kernel notifies the process of completions by > queuing completion notifications on the socket error queue. This patch > allows reading these notifications via recvmsg to support TCP tx > zero-copy. > > Ancill

Re: [PATCH iproute2 net-next] iplink: add support for protodown reason

2020-08-21 Thread Roopa Prabhu
On 8/20/20 10:18 PM, Roopa Prabhu wrote: On 8/20/20 9:36 PM, Stephen Hemminger wrote: On Thu, 20 Aug 2020 20:52:02 -0700 Roopa Prabhu wrote: + if (tb[IFLA_PROTO_DOWN]) { + if (rta_getattr_u8(tb[IFLA_PROTO_DOWN])) + print_bool(PRINT_ANY, +  

Re: [PATCH v2 bpf 1/2] bpf: verifier: check for packet data access based on target prog

2020-08-21 Thread Alexei Starovoitov
On Fri, Aug 21, 2020 at 1:53 PM Yonghong Song wrote: > > > > On 8/21/20 12:07 PM, Udip Pant wrote: > > > > > > > On 8/20/20, 11:17 PM, "Yonghong Song" wrote: > >> > >> > >> > >> On 8/20/20 11:13 PM, Yonghong Song wrote: > >>> > >>> > >>> On 8/20/20 5:28 PM, Udip Pant wrote: > While using dy

Re: [PATCH next] net: add option to not create fall-back tunnels in root-ns as well

2020-08-21 Thread David Miller
From: Mahesh Bandewar Date: Tue, 18 Aug 2020 17:51:23 -0700 > The sysctl that was added earlier by commit 79134e6ce2c ("net: do > not create fallback tunnels for non-default namespaces") to create > fall-back only in root-ns. This patch enhances that behavior to provide > option not to create fa

Re: [PATCH v2 bpf 1/2] bpf: verifier: check for packet data access based on target prog

2020-08-21 Thread Yonghong Song
On 8/21/20 12:07 PM, Udip Pant wrote: > On 8/20/20, 11:17 PM, "Yonghong Song" wrote: On 8/20/20 11:13 PM, Yonghong Song wrote: On 8/20/20 5:28 PM, Udip Pant wrote: While using dynamic program extension (of type BPF_PROG_TYPE_EXT), we need to check the program type of the target pro

Re: Use of genradix in sctp

2020-08-21 Thread 'Marcelo Ricardo Leitner'
On Wed, Aug 19, 2020 at 08:18:50AM +, David Laight wrote: > From:'Marcelo Ricardo Leitner > > Sent: 18 August 2020 22:38 > > > > On Tue, Aug 18, 2020 at 03:38:09PM +, David Laight wrote: > > > A few years ago (for 5.1) the 'arrays' that sctp uses for > > > info about data streams was chang

Re: [PATCH net-next 2/2] io_uring: ignore POLLIN for recvmsg on MSG_ERRQUEUE

2020-08-21 Thread Jakub Kicinski
On Thu, 20 Aug 2020 16:49:54 -0700 Luke Hsiao wrote: > + /* If reading from MSG_ERRQUEUE using recvmsg, ignore POLLIN */ > + if (req->opcode == IORING_OP_RECVMSG && (sqe->msg_flags & MSG_ERRQUEUE)) > + mask &= ~(POLLIN); FWIW this adds another W=1 C=1 warnings to this code: fs

RE: [EXT] Re: [PATCH v6 net-next 00/10] qed: introduce devlink health support

2020-08-21 Thread Igor Russkikh
> > v6: patch 4: changing serial to board.serial and fw to fw.app > > v5: improved patch 4 description > > v4: > > - commit message and other fixes after Jiri's comments > > - removed one patch (will send to net) > > v3: fix uninit var usage in patch 11 > > v2: fix #include issue from kbuild t

Re: [net-next PATCH] netlabel: fix problems with mapping removal

2020-08-21 Thread Paul Moore
On Fri, Aug 21, 2020 at 2:38 PM David Miller wrote: > From: Paul Moore > Date: Thu, 20 Aug 2020 21:46:14 -0400 > > > This patch fixes two main problems seen when removing NetLabel > > mappings: memory leaks and potentially extra audit noise. > > These are bug fixes therefore this needs to target

[net PATCH] netlabel: fix problems with mapping removal

2020-08-21 Thread Paul Moore
This patch fixes two main problems seen when removing NetLabel mappings: memory leaks and potentially extra audit noise. The memory leaks are caused by not properly free'ing the mapping's address selector struct when free'ing the entire entry as well as not properly cleaning up a temporary mapping

Re: [PATCH ghak90 V9 11/13] audit: contid check descendancy and nesting

2020-08-21 Thread Paul Moore
On Fri, Aug 7, 2020 at 1:10 PM Richard Guy Briggs wrote: > On 2020-07-05 11:11, Paul Moore wrote: > > On Sat, Jun 27, 2020 at 9:23 AM Richard Guy Briggs wrote: > > > Require the target task to be a descendant of the container > > > orchestrator/engine. If you want to get formal about this, you n

Re: [PATCH bpf] bpf: fix a buffer out-of-bound access when filling raw_tp link_info

2020-08-21 Thread Andrii Nakryiko
On Fri, Aug 21, 2020 at 12:11 PM Yonghong Song wrote: > > Commit f2e10bff16a0 ("bpf: Add support for BPF_OBJ_GET_INFO_BY_FD for > bpf_link") > added link query for raw_tp. One of fields in link_info is to > fill a user buffer with tp_name. The Scurrent checking only > declares "ulen && !ubuf" as

Re: [PATCHv2 net] sctp: not disable bh in the whole sctp_get_port_local()

2020-08-21 Thread Marcelo Ricardo Leitner
On Fri, Aug 21, 2020 at 02:59:38PM +0800, Xin Long wrote: > With disabling bh in the whole sctp_get_port_local(), when > snum == 0 and too many ports have been used, the do-while > loop will take the cpu for a long time and cause cpu stuck: > > [ ] watchdog: BUG: soft lockup - CPU#11 stuck for 2

Re: [net v2 PATCH 1/2] net: ethernet: ti: cpsw: fix clean up of vlan mc entries for host port

2020-08-21 Thread Jesse Brandeburg
Murali Karicheri wrote: > To flush the vid + mc entries from ALE, which is required when a VLAN > interface is removed, driver needs to call cpsw_ale_flush_multicast() > with ALE_PORT_HOST for port mask as these entries are added only for > host port. Without this, these entries remain in the ALE

Re: [net v2 PATCH 2/2] net: ethernet: ti: cpsw_new: fix clean up of vlan mc entries for host port

2020-08-21 Thread Jesse Brandeburg
Murali Karicheri wrote: > To flush the vid + mc entries from ALE, which is required when a VLAN > interface is removed, driver needs to call cpsw_ale_flush_multicast() > with ALE_PORT_HOST for port mask as these entries are added only for > host port. Without this, these entries remain in the ALE

Re: pull-request: bpf 2020-08-21

2020-08-21 Thread David Miller
From: Alexei Starovoitov Date: Fri, 21 Aug 2020 12:49:49 -0700 > The following pull-request contains BPF updates for your *net* tree. > > We've added 11 non-merge commits during the last 5 day(s) which contain > a total of 12 files changed, 78 insertions(+), 24 deletions(-). > > The main change

Re: [PATCH v6 net-next 00/10] qed: introduce devlink health support

2020-08-21 Thread Jesse Brandeburg
Igor Russkikh wrote: > This is a followup implementation after series > > https://patchwork.ozlabs.org/project/netdev/cover/20200514095727.1361-1-irussk...@marvell.com/ > > This is an implementation of devlink health infrastructure. > > With this we are now able to report HW errors to devlink,

pull-request: bpf 2020-08-21

2020-08-21 Thread Alexei Starovoitov
Hi David, The following pull-request contains BPF updates for your *net* tree. We've added 11 non-merge commits during the last 5 day(s) which contain a total of 12 files changed, 78 insertions(+), 24 deletions(-). The main changes are: 1) three fixes in BPF task iterator logic, from Yonghong.

Re: [PATCH v6 net-next 09/10] qed: align adjacent indent

2020-08-21 Thread Jesse Brandeburg
Igor Russkikh wrote: > Fix indent on some of adjacent declarations. > > Signed-off-by: Igor Russkikh > Signed-off-by: Alexander Lobakin > Signed-off-by: Michal Kalderon > --- > include/linux/qed/qed_if.h | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/incl

Re: [PATCH ghak90 V9 02/13] audit: add container id

2020-08-21 Thread Paul Moore
On Wed, Jul 29, 2020 at 4:06 PM Richard Guy Briggs wrote: > On 2020-07-05 11:09, Paul Moore wrote: > > On Sat, Jun 27, 2020 at 9:22 AM Richard Guy Briggs wrote: ... > > > @@ -212,6 +219,33 @@ void __init audit_task_init(void) > > > 0, SLAB_PANIC, NUL

Re: [PATCH] bpf: fix two typos in uapi/linux/bpf.h

2020-08-21 Thread Alexei Starovoitov
On Fri, Aug 21, 2020 at 6:36 AM Tobias Klauser wrote: > > Also remove trailing whitespaces in bpf_skb_get_tunnel_key example code. > > Signed-off-by: Tobias Klauser Applied to bpf tree. Thanks Please include destination tree in the subject line next time.

Re: [PATCH ghak90 V9 05/13] audit: log container info of syscalls

2020-08-21 Thread Paul Moore
On Wed, Jul 29, 2020 at 3:41 PM Richard Guy Briggs wrote: > On 2020-07-05 11:10, Paul Moore wrote: > > On Sat, Jun 27, 2020 at 9:22 AM Richard Guy Briggs wrote: ... > > > diff --git a/kernel/auditsc.c b/kernel/auditsc.c > > > index f03d3eb0752c..9e79645e5c0e 100644 > > > --- a/kernel/auditsc.c

[PATCH net-next 2/2] devlink: Protect devlink port list traversal

2020-08-21 Thread Parav Pandit
From: Parav Pandit Cited patch in fixes tag misses to protect port list traversal while traversing per port reporter list. Protect it using devlink instance lock. Fixes: f4f541660121 ("devlink: Implement devlink health reporters on per-port basis") Signed-off-by: Parav Pandit Reviewed-by: Jir

[PATCH net-next 1/2] devlink: Fix per port reporter fields initialization

2020-08-21 Thread Parav Pandit
From: Parav Pandit Cited patch in fixes tag initializes reporters_list and reporters_lock of a devlink port after devlink port is added to the list. Once port is added to the list, devlink_nl_cmd_health_reporter_get_dumpit() can access the uninitialized mutex and reporters list head. Fix it by in

[PATCH net-next 0/2] devlink fixes for port and reporter field access

2020-08-21 Thread Parav Pandit
From: Parav Pandit Hi Dave, These series contains two small fixes of devlink. Patch-1 initializes port reporter fields early enough to avoid access before initialized error. Patch-2 protects port list lock during traversal. Parav Pandit (2): devlink: Fix per port reporter fields initializati

Re: [RFC PATCH net-next 0/6] devlink: Add device metric support

2020-08-21 Thread David Ahern
On 8/21/20 10:53 AM, Jakub Kicinski wrote: > How many times do I have to say that I'm not arguing against the value > of the data? > > If you open up this interface either someone will police it, or it will > become a dumpster. I am not following what you are proposing as a solution. You do not

[PATCH bpf] bpf: fix a buffer out-of-bound access when filling raw_tp link_info

2020-08-21 Thread Yonghong Song
Commit f2e10bff16a0 ("bpf: Add support for BPF_OBJ_GET_INFO_BY_FD for bpf_link") added link query for raw_tp. One of fields in link_info is to fill a user buffer with tp_name. The Scurrent checking only declares "ulen && !ubuf" as invalid. So "!ulen && ubuf" will be valid. Later on, we do "copy_to_

Re: [PATCH v2 bpf 1/2] bpf: verifier: check for packet data access based on target prog

2020-08-21 Thread Udip Pant
> On 8/20/20, 11:17 PM, "Yonghong Song" wrote: > > > > On 8/20/20 11:13 PM, Yonghong Song wrote: >> >> >> On 8/20/20 5:28 PM, Udip Pant wrote: >>> While using dynamic program extension (of type BPF_PROG_TYPE_EXT), we >>> need to check the program type of the target program to grant the read /

Re: [PATCH bpf-next v4 0/3] bpf: implement link_query for bpf iterators

2020-08-21 Thread Andrii Nakryiko
On Fri, Aug 21, 2020 at 11:44 AM Yonghong Song wrote: > > "link" has been an important concept for bpf ecosystem to connect > bpf program with other properties. Currently, the information related > information can be queried from userspace through bpf command > BPF_LINK_GET_NEXT_ID, BPF_LINK_GET_F

[PATCH v3 1/2] net: add support for threaded NAPI polling

2020-08-21 Thread Felix Fietkau
For some drivers (especially 802.11 drivers), doing a lot of work in the NAPI poll function does not perform well. Since NAPI poll is bound to the CPU it was scheduled from, we can easily end up with a few very busy CPUs spending most of their time in softirq/ksoftirqd and some idle ones. Introduc

[PATCH v3 2/2] net: add sysfs attribute for enabling threaded NAPI

2020-08-21 Thread Felix Fietkau
This can be used to enable threaded NAPI on drivers that did not explicitly request it. Suggested-by: Eric Dumazet Signed-off-by: Felix Fietkau --- net/core/net-sysfs.c | 47 1 file changed, 47 insertions(+) diff --git a/net/core/net-sysfs.c b/net/c

Re: [PATCH] net: dsa: b53: check for timeout

2020-08-21 Thread David Miller
From: t...@redhat.com Date: Fri, 21 Aug 2020 06:56:00 -0700 > From: Tom Rix > > clang static analysis reports this problem > > b53_common.c:1583:13: warning: The left expression of the compound > assignment is an uninitialized value. The computed value will > also be garbage > ent.p

Re: [PATCH ghak90 V9 06/13] audit: add contid support for signalling the audit daemon

2020-08-21 Thread Paul Moore
On Wed, Jul 29, 2020 at 3:00 PM Richard Guy Briggs wrote: > On 2020-07-05 11:10, Paul Moore wrote: > > On Sat, Jun 27, 2020 at 9:22 AM Richard Guy Briggs wrote: > > > > > > Add audit container identifier support to the action of signalling the > > > audit daemon. > > > > > > Since this would need

  1   2   3   >