Re: [PATCH net-next v4 4/4] net: phy: dp83td510: Add support for the DP83TD510 Ethernet PHY

2020-11-17 Thread kernel test robot
Hi Dan, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Dan-Murphy/DP83TD510-Single-Pair-10Mbps-Ethernet-PHY/20201118-041918 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 72308

[PATCH bpf-next v2 3/3] selftests/bpf: Mark tests that require unaligned memory access

2020-11-17 Thread Björn Töpel
A lot of tests require unaligned memory access to work. Mark the tests as such, so that they can be avoided on unsupported architectures such as RISC-V. Signed-off-by: Björn Töpel --- .../selftests/bpf/verifier/ctx_sk_lookup.c| 7 +++ .../bpf/verifier/direct_value_access.c| 3 ++ .

[PATCH bpf-next v2 2/3] selftests/bpf: Avoid running unprivileged tests with alignment requirements

2020-11-17 Thread Björn Töpel
Some architectures have strict alignment requirements. In that case, the BPF verifier detects if a program has unaligned accesses and rejects them. A user can pass BPF_F_ANY_ALIGNMENT to a program to override this check. That, however, will only work when a privileged user loads a program. An unpri

[PATCH bpf-next v2 1/3] selftests/bpf: Fix broken riscv build

2020-11-17 Thread Björn Töpel
The selftests/bpf Makefile includes system include directories from the host, when building BPF programs. On RISC-V glibc requires that __riscv_xlen is defined. This is not the case for "clang -target bpf", which messes up __WORDSIZE (errno.h -> ... -> wordsize.h) and breaks the build. By explicit

[PATCH bpf-next v2 0/3] RISC-V selftest/bpf fixes

2020-11-17 Thread Björn Töpel
This series contain some fixes for selftests/bpf when building/running on a RISC-V host. Details can be found in each individual commit. Cheers, Björn v2: Makefile cosmetics. (Andrii) Simplified unpriv check and added comment. (Andrii) Björn Töpel (3): selftests/bpf: Fix broken riscv buil

Re: [PATCH v2 net-next 3/3] net/sched: sch_frag: add generic packet fragment support.

2020-11-17 Thread Cong Wang
On Tue, Nov 17, 2020 at 5:37 PM wrote: > > From: wenxu > > Currently kernel tc subsystem can do conntrack in cat_ct. But when several > fragment packets go through the act_ct, function tcf_ct_handle_fragments > will defrag the packets to a big one. But the last action will redirect > mirred to a

[PATCH net-next v2] r8153_ecm: avoid to be prior to r8152 driver

2020-11-17 Thread Hayes Wang
Avoid r8153_ecm is compiled as built-in, if r8152 driver is compiled as modules. Otherwise, the r8153_ecm would be used, even though the device is supported by r8152 driver. Fixes: c1aedf015ebd ("net/usb/r8153_ecm: support ECM mode for RTL8153") Reported-by: Marek Szyprowski Signed-off-by: Hayes

[PATCH net-next v5] net/tun: Call netdev notifiers

2020-11-17 Thread Martin Schiller
Call netdev notifiers before and after changing the device type. Signed-off-by: Martin Schiller --- Changes to v4: * Fix copy'n'paste error Changes to v3: * Handle return value of call_netdevice_notifiers() Changes to v2: * Use subject_prefix 'net-next' to fix 'fixes_present' issue Changes to

Re: [PATCH bpf-next 2/3] selftests/bpf: Avoid running unprivileged tests with alignment requirements

2020-11-17 Thread Björn Töpel
On Wed, 18 Nov 2020 at 02:43, Andrii Nakryiko wrote: > > On Tue, Nov 17, 2020 at 12:29 AM Björn Töpel wrote: > > > > Some architectures have strict alignment requirements. In that case, > > the BPF verifier detects if a program has unaligned accesses and > > rejects them. A user can pass BPF_F_AN

Re: [PATCH bpf-next 1/3] selftests/bpf: Fix broken riscv build

2020-11-17 Thread Björn Töpel
On Wed, 18 Nov 2020 at 02:43, Andrii Nakryiko wrote: > > On Tue, Nov 17, 2020 at 12:28 AM Björn Töpel wrote: > > > > The selftests/bpf Makefile includes system include directories from > > the host, when building BPF programs. On RISC-V glibc requires that > > __riscv_xlen is defined. This is not

Re: [PATCH v4 01/10] Add auxiliary bus support

2020-11-17 Thread Greg KH
On Tue, Nov 17, 2020 at 01:04:56PM -0800, Dan Williams wrote: > On Mon, Nov 16, 2020 at 11:02 PM Greg KH wrote: > > > > On Tue, Nov 17, 2020 at 07:30:00AM +0200, Leon Romanovsky wrote: > > > On Fri, Nov 13, 2020 at 08:18:50AM -0800, Dave Ertman wrote: > > > > Add support for the Auxiliary Bus, aux

Re: [PATCH bpf-next 4/9] samples: bpf: refactor task_fd_query program with libbpf

2020-11-17 Thread Martin KaFai Lau
On Tue, Nov 17, 2020 at 02:56:39PM +, Daniel T. Lee wrote: > This commit refactors the existing kprobe program with libbpf bpf > loader. To attach bpf program, this uses generic bpf_program__attach() > approach rather than using bpf_load's load_bpf_file(). > > To attach bpf to perf_event, inst

Re: [PATCH net-next] ip_gre: remove CRC flag from dev features in gre_gso_segment

2020-11-17 Thread Xin Long
On Wed, Nov 18, 2020 at 8:29 AM Jakub Kicinski wrote: > > On Mon, 16 Nov 2020 17:15:47 +0800 Xin Long wrote: > > This patch is to let it always do CRC checksum in sctp_gso_segment() > > by removing CRC flag from the dev features in gre_gso_segment() for > > SCTP over GRE, just as it does in Commit

Re: [PATCH net] vhost_vdpa: Return -EFUALT if copy_from_user() fails

2020-11-17 Thread Jason Wang
On 2020/10/26 上午10:59, Jason Wang wrote: On 2020/10/23 下午11:34, Michael S. Tsirkin wrote: On Fri, Oct 23, 2020 at 03:08:53PM +0300, Dan Carpenter wrote: The copy_to/from_user() functions return the number of bytes which we weren't able to copy but the ioctl should return -EFAULT if they fail

Re: [PATCH bpf-next 3/9] samples: bpf: refactor test_cgrp2_sock2 program with libbpf

2020-11-17 Thread Martin KaFai Lau
On Tue, Nov 17, 2020 at 02:56:38PM +, Daniel T. Lee wrote: [ ... ] > diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile > index 01449d767122..7a643595ac6c 100644 > --- a/samples/bpf/Makefile > +++ b/samples/bpf/Makefile > @@ -82,7 +82,7 @@ test_overhead-objs := bpf_load.o test_overhead_u

[PATCH net-next v4] net/tun: Call netdev notifiers

2020-11-17 Thread Martin Schiller
Call netdev notifiers before and after changing the device type. Signed-off-by: Martin Schiller --- Changes to v3: * Handle return value of call_netdevice_notifiers() Changes to v2: * Use subject_prefix 'net-next' to fix 'fixes_present' issue Changes to v1: * Fix 'subject_prefix' and 'checkpatc

Re: [PATCH] bus: mhi: Remove auto-start option

2020-11-17 Thread Kalle Valo
Manivannan Sadhasivam writes: > From: Loic Poulain > > There is really no point having an auto-start for channels. > This is confusing for the device drivers, some have to enable the > channels, others don't have... and waste resources (e.g. pre allocated > buffers) that may never be used. > > T

Re: [PATCH 5.9 000/255] 5.9.9-rc1 review

2020-11-17 Thread Naresh Kamboju
On Tue, 17 Nov 2020 at 19:02, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 5.9.9 release. > There are 255 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > > Resp

[PATCH] bus: mhi: Remove auto-start option

2020-11-17 Thread Manivannan Sadhasivam
From: Loic Poulain There is really no point having an auto-start for channels. This is confusing for the device drivers, some have to enable the channels, others don't have... and waste resources (e.g. pre allocated buffers) that may never be used. This is really up to the MHI device(channel) dr

Re: [PATCH net-next v3] net/tun: Call netdev notifiers

2020-11-17 Thread Martin Schiller
On 2020-11-18 01:32, Jakub Kicinski wrote: On Mon, 16 Nov 2020 11:41:21 +0100 Martin Schiller wrote: Call netdev notifiers before and after changing the device type. Signed-off-by: Martin Schiller --- Change from v2: use subject_prefix 'net-next' to fix 'fixes_present' issue Change from v1:

linux-next: build warning after merge of the net-next tree

2020-11-17 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (htmldocs) produced this warning: Documentation/networking/index.rst:6: WARNING: toctree contains reference to nonexisting document 'networking/framerelay' Introduced by commit f73659192b0b ("net: wan: Delete the DLCI / SDLA d

Re: [PATCH bpf-next 5/9] samples: bpf: refactor ibumad program with libbpf

2020-11-17 Thread Daniel T. Lee
On Wed, Nov 18, 2020 at 12:10 PM Andrii Nakryiko wrote: > > On Tue, Nov 17, 2020 at 7:05 PM Daniel T. Lee wrote: > > > > On Wed, Nov 18, 2020 at 11:52 AM Andrii Nakryiko > > wrote: > > > > > > On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee > > > wrote: > > > > > > > > This commit refactors the

Re: [PATCH] bpf: don't fail kmalloc while releasing raw_tp

2020-11-17 Thread Paul E. McKenney
On Tue, Nov 17, 2020 at 08:09:22PM -0500, Steven Rostedt wrote: > On Tue, 17 Nov 2020 16:42:44 -0800 > Matt Mullins wrote: > > > > > Indeed with a stub function, I don't see any need for > > > READ_ONCE/WRITE_ONCE. > > > > I'm not sure if this is a practical issue, but without WRITE_ONCE, ca

Re: [PATCH v2] tracepoint: Do not fail unregistering a probe due to memory allocation

2020-11-17 Thread Alexei Starovoitov
On Tue, Nov 17, 2020 at 6:18 PM Steven Rostedt wrote: > > From: "Steven Rostedt (VMware)" > > The list of tracepoint callbacks is managed by an array that is protected > by RCU. To update this array, a new array is allocated, the updates are > copied over to the new array, and then the list of fu

Re: [PATCH net-next] net/nfc/nci: Support NCI 2.x initial sequence

2020-11-17 Thread Bongsu Jeon
On 11/18/20, Jakub Kicinski wrote: > On Tue, 17 Nov 2020 14:37:59 +0900 Bongsu Jeon wrote: >> implement the NCI 2.x initial sequence to support NCI 2.x NFCC. >> Since NCI 2.0, CORE_RESET and CORE_INIT sequence have been changed. >> If NFCEE supports NCI 2.x, then NCI 2.x initial sequence will work

Re: [PATCH] bpf:Fix update dirty data in lru percpu hash maps

2020-11-17 Thread Alexei Starovoitov
On Tue, Nov 10, 2020 at 1:04 AM Xin Yin wrote: > > For lru_percpu_map update elem, prealloc_lru_pop() may return > an unclear elem, if the func called by bpf prog and "onallcpus" > set to false, it may update an elem whith dirty data. > > Clear percpu value of the elem, before use it. > > Signed-o

Re: [PATCH bpf-next 2/3] bpf: allow bpf_{s,g}etsockopt from cgroup bind{4,6} hooks

2020-11-17 Thread Alexei Starovoitov
On Tue, Nov 17, 2020 at 4:17 PM Stanislav Fomichev wrote: > > I have to now lock/unlock socket for the bind hook execution. > That shouldn't cause any overhead because the socket is unbound > and shouldn't receive any traffic. > > Signed-off-by: Stanislav Fomichev > --- > include/linux/bpf-cgrou

memory leak in bpf

2020-11-17 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:f01c30de Merge tag 'vfs-5.10-fixes-2' of git://git.kernel... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=15b9b18150 kernel config: https://syzkaller.appspot.com/x/.config?x=a3f13716fa0212fd das

Re: [PATCH net] atl1e: fix error return code in atl1e_probe()

2020-11-17 Thread Zhang Changzhong
On 2020/11/18 4:38, Marion & Christophe JAILLET wrote: > > Le 17/11/2020 à 03:57, Zhang Changzhong a écrit : >> Fix to return a negative error code from the error handling >> case instead of 0, as done elsewhere in this function. >> >> Fixes: 85eb5bc33717 ("net: atheros: switch from 'pci_' to '

Re: [PATCH] [v7] wireless: Initial driver submission for pureLiFi STA devices

2020-11-17 Thread Srinivasan Raju
> trivial notes and some style and content defects: > (I stopped reading after awhile) Thanks, I will address the comments. Regards Srini

Re: [PATCH bpf-next 3/9] samples: bpf: refactor test_cgrp2_sock2 program with libbpf

2020-11-17 Thread Daniel T. Lee
On Wed, Nov 18, 2020 at 12:02 PM Andrii Nakryiko wrote: > > On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee wrote: > > > > This commit refactors the existing cgroup program with libbpf bpf > > loader. The original test_cgrp2_sock2 has keeped the bpf program > > attached to the cgroup hierarchy even

Re: [PATCH bpf-next 4/9] samples: bpf: refactor task_fd_query program with libbpf

2020-11-17 Thread Daniel T. Lee
On Wed, Nov 18, 2020 at 11:58 AM Andrii Nakryiko wrote: > > On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee wrote: > > > > This commit refactors the existing kprobe program with libbpf bpf > > loader. To attach bpf program, this uses generic bpf_program__attach() > > approach rather than using bpf_

Re: [PATCH bpf-next 5/9] samples: bpf: refactor ibumad program with libbpf

2020-11-17 Thread Andrii Nakryiko
On Tue, Nov 17, 2020 at 7:05 PM Daniel T. Lee wrote: > > On Wed, Nov 18, 2020 at 11:52 AM Andrii Nakryiko > wrote: > > > > On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee > > wrote: > > > > > > This commit refactors the existing ibumad program with libbpf bpf > > > loader. Attach/detach of Tracep

Re: [PATCH net-next v3] Add Mellanox BlueField Gigabit Ethernet driver

2020-11-17 Thread Andrew Lunn
Hi David > +static int mlxbf_gige_phy_enable_interrupt(struct phy_device *phydev) > +{ > + int err = 0; > + > + if (phydev->drv->ack_interrupt) > + err = phydev->drv->ack_interrupt(phydev); > + if (err < 0) > + return err; > + > + phydev->interrupts = PHY_IN

Re: [PATCH] ipv4: use IS_ENABLED instead of ifdef

2020-11-17 Thread Randy Dunlap
On 11/17/20 5:07 PM, Jakub Kicinski wrote: > On Tue, 17 Nov 2020 17:55:54 -0700 David Ahern wrote: >> On 11/17/20 5:01 PM, Jakub Kicinski wrote: >>> On Sun, 15 Nov 2020 23:45:09 +0100 Florian Klink wrote: Checking for ifdef CONFIG_x fails if CONFIG_x=m. Use IS_ENABLED instead, whic

Re: [PATCH bpf-next 5/9] samples: bpf: refactor ibumad program with libbpf

2020-11-17 Thread Daniel T. Lee
On Wed, Nov 18, 2020 at 11:52 AM Andrii Nakryiko wrote: > > On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee wrote: > > > > This commit refactors the existing ibumad program with libbpf bpf > > loader. Attach/detach of Tracepoint bpf programs has been managed > > with the generic bpf_program__attach

Re: [PATCH bpf-next 1/9] selftests: bpf: move tracing helpers to trace_helper

2020-11-17 Thread Andrii Nakryiko
On Tue, Nov 17, 2020 at 6:55 PM Daniel T. Lee wrote: > > On Wed, Nov 18, 2020 at 10:58 AM Andrii Nakryiko > wrote: > > > > On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee > > wrote: > > > > > > Under the samples/bpf directory, similar tracing helpers are > > > fragmented around. To keep consisten

Re: [PATCH bpf-next 3/9] samples: bpf: refactor test_cgrp2_sock2 program with libbpf

2020-11-17 Thread Andrii Nakryiko
On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee wrote: > > This commit refactors the existing cgroup program with libbpf bpf > loader. The original test_cgrp2_sock2 has keeped the bpf program > attached to the cgroup hierarchy even after the exit of user program. > To implement the same functionalit

Re: [PATCH bpf-next 4/9] samples: bpf: refactor task_fd_query program with libbpf

2020-11-17 Thread Andrii Nakryiko
On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee wrote: > > This commit refactors the existing kprobe program with libbpf bpf > loader. To attach bpf program, this uses generic bpf_program__attach() > approach rather than using bpf_load's load_bpf_file(). > > To attach bpf to perf_event, instead of u

Re: [PATCH bpf-next 9/9] samples: bpf: remove bpf_load loader completely

2020-11-17 Thread Daniel T. Lee
On Wed, Nov 18, 2020 at 11:49 AM Andrii Nakryiko wrote: > > On Tue, Nov 17, 2020 at 6:58 AM Daniel T. Lee wrote: > > > > Numerous refactoring that rewrites BPF programs written with bpf_load > > to use the libbpf loader was finally completed, resulting in BPF > > programs using bpf_load within th

[PATCH v7] lib: optimize cpumask_local_spread()

2020-11-17 Thread Shaokun Zhang
From: Yuqi Jin In multi-processor and NUMA system, I/O driver will find cpu cores that which shall be bound IRQ. When cpu cores in the local numa have been used up, it is better to find the node closest to the local numa node for performance, instead of choosing any online cpu immediately. On ar

Re: [PATCH bpf-next 1/9] selftests: bpf: move tracing helpers to trace_helper

2020-11-17 Thread Daniel T. Lee
On Wed, Nov 18, 2020 at 10:58 AM Andrii Nakryiko wrote: > > On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee wrote: > > > > Under the samples/bpf directory, similar tracing helpers are > > fragmented around. To keep consistent of tracing programs, this commit > > moves the helper and define location

Re: [PATCH bpf-next 5/9] samples: bpf: refactor ibumad program with libbpf

2020-11-17 Thread Andrii Nakryiko
On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee wrote: > > This commit refactors the existing ibumad program with libbpf bpf > loader. Attach/detach of Tracepoint bpf programs has been managed > with the generic bpf_program__attach() and bpf_link__destroy() from > the libbpf. > > Also, instead of us

Re: [PATCH bpf-next 9/9] samples: bpf: remove bpf_load loader completely

2020-11-17 Thread Andrii Nakryiko
On Tue, Nov 17, 2020 at 6:58 AM Daniel T. Lee wrote: > > Numerous refactoring that rewrites BPF programs written with bpf_load > to use the libbpf loader was finally completed, resulting in BPF > programs using bpf_load within the kernel being completely no longer > present. > > This commit remove

Re: [net] net/tls: missing received data after fast remote close

2020-11-17 Thread Vadim Fedorenko
On 18.11.2020 01:53, Jakub Kicinski wrote: On Wed, 18 Nov 2020 00:50:48 + Vadim Fedorenko wrote: On 17.11.2020 22:38, Jakub Kicinski wrote: On Sun, 15 Nov 2020 14:43:48 +0300 Vadim Fedorenko wrote: In case when tcp socket received FIN after some data and the parser haven't started befor

Re: [PATCH bpf-next 6/9] samples: bpf: refactor test_overhead program with libbpf

2020-11-17 Thread Andrii Nakryiko
On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee wrote: > > This commit refactors the existing program with libbpf bpf loader. > Since the kprobe, tracepoint and raw_tracepoint bpf program can be > attached with single bpf_program__attach() interface, so the > corresponding function of libbpf is used

Re: [PATCH bpf-next 1/9] selftests: bpf: move tracing helpers to trace_helper

2020-11-17 Thread Daniel T. Lee
On Wed, Nov 18, 2020 at 10:19 AM Martin KaFai Lau wrote: > > On Tue, Nov 17, 2020 at 02:56:36PM +, Daniel T. Lee wrote: > > Under the samples/bpf directory, similar tracing helpers are > > fragmented around. To keep consistent of tracing programs, this commit > > moves the helper and define lo

Re: [PATCH v2 1/4] rtlwifi: rtl8188ee: avoid accessing the data mapped to streaming DMA

2020-11-17 Thread Pkshih
On Wed, 2020-11-18 at 09:53 +0800, Jia-Ju Bai wrote: > In rtl88ee_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on > line 677: >   dma_addr_t mapping = dma_map_single(..., skb->data, ...); > > On line 680, skb->data is assigned to hdr after cast: >   struct ieee80211_hdr *hdr = (struct i

[PATCH] aquantia: Reserve space when allocating an SKB

2020-11-17 Thread Ramsay, Lincoln
When performing IPv6 forwarding, there is an expectation that SKBs will have some headroom. When forwarding a packet from the aquantia driver, this does not always happen, triggering a kernel warning. It was observed that napi_alloc_skb and other ethernet drivers reserve (NET_SKB_PAD + NET_IP_ALIG

[PATCH v2] tracepoint: Do not fail unregistering a probe due to memory allocation

2020-11-17 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" The list of tracepoint callbacks is managed by an array that is protected by RCU. To update this array, a new array is allocated, the updates are copied over to the new array, and then the list of functions for the tracepoint is switched over to the new array. Afte

Re: [PATCH bpf-next 2/9] samples: bpf: refactor hbm program with libbpf

2020-11-17 Thread Martin KaFai Lau
On Tue, Nov 17, 2020 at 02:56:37PM +, Daniel T. Lee wrote: [ ... ] > diff --git a/samples/bpf/hbm.c b/samples/bpf/hbm.c > index b9f9f771dd81..008bc635ad9b 100644 > --- a/samples/bpf/hbm.c > +++ b/samples/bpf/hbm.c > @@ -46,7 +46,6 @@ > #include > #include > > -#include "bpf_load.h" > #i

Re: [PATCH bpf-next 1/9] selftests: bpf: move tracing helpers to trace_helper

2020-11-17 Thread Andrii Nakryiko
On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee wrote: > > Under the samples/bpf directory, similar tracing helpers are > fragmented around. To keep consistent of tracing programs, this commit > moves the helper and define locations to increase the reuse of each > helper function. > > Signed-off-by:

Re: [PATCH net-next] net/nfc/nci: Support NCI 2.x initial sequence

2020-11-17 Thread Jakub Kicinski
On Tue, 17 Nov 2020 14:37:59 +0900 Bongsu Jeon wrote: > implement the NCI 2.x initial sequence to support NCI 2.x NFCC. > Since NCI 2.0, CORE_RESET and CORE_INIT sequence have been changed. > If NFCEE supports NCI 2.x, then NCI 2.x initial sequence will work. > > In NCI 1.0, Initial sequence and p

[PATCH v2 4/4] rtlwifi: rtl8723ae: avoid accessing the data mapped to streaming DMA

2020-11-17 Thread Jia-Ju Bai
In rtl8723e_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on line 531: dma_addr_t mapping = dma_map_single(..., skb->data, ...); On line 534, skb->data is assigned to hdr after cast: struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); Then hdr->frame_control is accessed

Re: [PATCH net-next] net: add in_softirq() debug checking in napi_consume_skb()

2020-11-17 Thread Yunsheng Lin
On 2020/11/3 3:41, Jakub Kicinski wrote: > On Mon, 2 Nov 2020 11:14:32 +0800 Yunsheng Lin wrote: >> On 2020/11/1 6:38, Jakub Kicinski wrote: >>> On Thu, 29 Oct 2020 19:34:48 +0800 Yunsheng Lin wrote: The current semantic for napi_consume_skb() is that caller need to provide non-zero bud

Re: [PATCH] rtl8192ce: avoid accessing the data mapped to streaming DMA

2020-11-17 Thread Jia-Ju Bai
On 2020/11/7 19:44, Kalle Valo wrote: Jia-Ju Bai wrote: In rtl92ce_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on line 530: dma_addr_t mapping = dma_map_single(..., skb->data, ...); On line 533, skb->data is assigned to hdr after cast: struct ieee80211_hdr *hdr = (struct

Re: [PATCH 1/2] hwmon: (max127) Add Maxim MAX127 hardware monitoring driver

2020-11-17 Thread Tao Ren
Hi Guenter, Thanks for pointing out these problems. I'm working on the comments and will send out v2 soon. Cheers, Tao On Mon, Nov 16, 2020 at 09:13:52PM -0800, Guenter Roeck wrote: > On Mon, Nov 16, 2020 at 05:09:43PM -0800, rentao.b...@gmail.com wrote: > > From: Tao Ren > > > > Add hardwar

[PATCH v2 3/4] rtlwifi: rtl8192de: avoid accessing the data mapped to streaming DMA

2020-11-17 Thread Jia-Ju Bai
In rtl92de_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on line 667: dma_addr_t mapping = dma_map_single(..., skb->data, ...); On line 669, skb->data is assigned to hdr after cast: struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); Then hdr->frame_control is accessed

[PATCH v2 2/4] rtlwifi: rtl8192ce: avoid accessing the data mapped to streaming DMA

2020-11-17 Thread Jia-Ju Bai
In rtl92ce_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on line 530: dma_addr_t mapping = dma_map_single(..., skb->data, ...); On line 533, skb->data is assigned to hdr after cast: struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); Then hdr->frame_control is accessed

[PATCH v2 1/4] rtlwifi: rtl8188ee: avoid accessing the data mapped to streaming DMA

2020-11-17 Thread Jia-Ju Bai
In rtl88ee_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on line 677: dma_addr_t mapping = dma_map_single(..., skb->data, ...); On line 680, skb->data is assigned to hdr after cast: struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); Then hdr->frame_control is accessed

Re: [net] net/tls: missing received data after fast remote close

2020-11-17 Thread Jakub Kicinski
On Wed, 18 Nov 2020 00:50:48 + Vadim Fedorenko wrote: > On 17.11.2020 22:38, Jakub Kicinski wrote: > > On Sun, 15 Nov 2020 14:43:48 +0300 Vadim Fedorenko wrote: > >> In case when tcp socket received FIN after some data and the > >> parser haven't started before reading data caller will receiv

Re: [PATCH bpf-next 1/3] selftests/bpf: Fix broken riscv build

2020-11-17 Thread Andrii Nakryiko
On Tue, Nov 17, 2020 at 12:28 AM Björn Töpel wrote: > > The selftests/bpf Makefile includes system include directories from > the host, when building BPF programs. On RISC-V glibc requires that > __riscv_xlen is defined. This is not the case for "clang -target bpf", > which messes up __WORDSIZE (e

Re: [PATCH bpf-next 2/3] selftests/bpf: Avoid running unprivileged tests with alignment requirements

2020-11-17 Thread Andrii Nakryiko
On Tue, Nov 17, 2020 at 12:29 AM Björn Töpel wrote: > > Some architectures have strict alignment requirements. In that case, > the BPF verifier detects if a program has unaligned accesses and > rejects them. A user can pass BPF_F_ANY_ALIGNMENT to a program to > override this check. That, however,

[PATCH v2 net-next 3/3] net/sched: sch_frag: add generic packet fragment support.

2020-11-17 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in cat_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet ove

[PATCH v2 net-next 1/3] net/sched: fix miss init the mru in qdisc_skb_cb

2020-11-17 Thread wenxu
From: wenxu The mru in the qdisc_skb_cb should be init as 0. Only defrag packets in the act_ct will set the value. Fixes: 038ebb1a713d ("net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct") Signed-off-by: wenxu --- v2: no change net/core/dev.c | 2 ++ 1 file changed, 2 insert

[PATCH v2 net-next 2/3] net/sched: act_mirred: refactor the handle of xmit

2020-11-17 Thread wenxu
From: wenxu This one is prepare for the next patch. Signed-off-by: wenxu --- v2: no change include/net/sch_generic.h | 5 - net/sched/act_mirred.c| 21 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/net/sch_generic.h b/include/net/sch_g

[PATCH v2 net-next 0/3] net/sched: fix over mtu packet of defrag in

2020-11-17 Thread wenxu
From: wenxu Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet ove

Re: [PATCH bpf-next v6 06/34] bpf: prepare for memcg-based memory accounting for bpf maps

2020-11-17 Thread Roman Gushchin
On Tue, Nov 17, 2020 at 05:11:00PM -0800, Alexei Starovoitov wrote: > On Tue, Nov 17, 2020 at 5:07 PM Roman Gushchin wrote: > > > > On Tue, Nov 17, 2020 at 04:46:34PM -0800, Roman Gushchin wrote: > > > On Wed, Nov 18, 2020 at 01:06:17AM +0100, Daniel Borkmann wrote: > > > > On 11/17/20 4:40 AM, Ro

RE: [PATCH net-next] r8153_ecm: avoid to be prior to r8152 driver

2020-11-17 Thread Hayes Wang
Jakub Kicinski > Sent: Wednesday, November 18, 2020 12:12 AM [...] > Something like this? > > config USB_RTL8153_ECM > tristate > select MII > select USB_NET_CDCETHER > depends on USB_RTL8152 || USB_RTL8152=n > help > > > > select clauses will pull

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2020-11-17 Thread Vinicius Costa Gomes
Richard Cochran writes: > On Mon, Nov 16, 2020 at 05:06:30PM -0800, Vinicius Costa Gomes wrote: >> The PTM dialogs are a pair of messages: a Request from the endpoint (in >> my case, the NIC) to the PCIe root (or switch), and a Response from the >> other side (this message includes the Master Roo

Re: [PATCH bpf-next 1/9] selftests: bpf: move tracing helpers to trace_helper

2020-11-17 Thread Martin KaFai Lau
On Tue, Nov 17, 2020 at 02:56:36PM +, Daniel T. Lee wrote: > Under the samples/bpf directory, similar tracing helpers are > fragmented around. To keep consistent of tracing programs, this commit > moves the helper and define locations to increase the reuse of each > helper function. > > Signed

Re: [PATCH net-next] net-loopback: allow lo dev initial state to be controlled

2020-11-17 Thread David Ahern
On 11/17/20 1:53 PM, Mahesh Bandewar (महेश बंडेवार) wrote: > On Tue, Nov 17, 2020 at 9:18 AM Ido Schimmel wrote: >> >> On Mon, Nov 16, 2020 at 01:03:32PM -0800, Mahesh Bandewar (महेश बंडेवार) >> wrote: >>> On Mon, Nov 16, 2020 at 12:34 PM Jakub Kicinski wrote: On Mon, 16 Nov 2020 12:02

Re: [PATCH bpf-next v6 06/34] bpf: prepare for memcg-based memory accounting for bpf maps

2020-11-17 Thread Alexei Starovoitov
On Tue, Nov 17, 2020 at 5:07 PM Roman Gushchin wrote: > > On Tue, Nov 17, 2020 at 04:46:34PM -0800, Roman Gushchin wrote: > > On Wed, Nov 18, 2020 at 01:06:17AM +0100, Daniel Borkmann wrote: > > > On 11/17/20 4:40 AM, Roman Gushchin wrote: > > > > In the absolute majority of cases if a process is

Re: [PATCH] tracepoint: Do not fail unregistering a probe due to memory allocation

2020-11-17 Thread Steven Rostedt
On Tue, 17 Nov 2020 18:08:19 -0500 (EST) Mathieu Desnoyers wrote: > Because of this end-of-loop condition ^ > which is also testing for a NULL func. So if we reach a stub, we end up > stopping > iteration and not firing the following tracepoint probes. Ah right. OK, since it's looking like we'r

Re: [PATCH bpf-next v6 06/34] bpf: prepare for memcg-based memory accounting for bpf maps

2020-11-17 Thread Roman Gushchin
On Tue, Nov 17, 2020 at 04:46:34PM -0800, Roman Gushchin wrote: > On Wed, Nov 18, 2020 at 01:06:17AM +0100, Daniel Borkmann wrote: > > On 11/17/20 4:40 AM, Roman Gushchin wrote: > > > In the absolute majority of cases if a process is making a kernel > > > allocation, it's memory cgroup is getting c

Re: [PATCH] bpf: don't fail kmalloc while releasing raw_tp

2020-11-17 Thread Steven Rostedt
On Tue, 17 Nov 2020 16:42:44 -0800 Matt Mullins wrote: > > Indeed with a stub function, I don't see any need for READ_ONCE/WRITE_ONCE. > > > > I'm not sure if this is a practical issue, but without WRITE_ONCE, can't > the write be torn? A racing __traceiter_ could potentially see a > half-m

Re: [PATCH] ipv4: use IS_ENABLED instead of ifdef

2020-11-17 Thread Jakub Kicinski
On Tue, 17 Nov 2020 17:55:54 -0700 David Ahern wrote: > On 11/17/20 5:01 PM, Jakub Kicinski wrote: > > On Sun, 15 Nov 2020 23:45:09 +0100 Florian Klink wrote: > >> Checking for ifdef CONFIG_x fails if CONFIG_x=m. > >> > >> Use IS_ENABLED instead, which is true for both built-ins and modules. > >>

Re: [PATCH] ipv4: use IS_ENABLED instead of ifdef

2020-11-17 Thread David Ahern
On 11/17/20 5:01 PM, Jakub Kicinski wrote: > On Sun, 15 Nov 2020 23:45:09 +0100 Florian Klink wrote: >> Checking for ifdef CONFIG_x fails if CONFIG_x=m. >> >> Use IS_ENABLED instead, which is true for both built-ins and modules. >> >> Otherwise, a >>> ip -4 route add 1.2.3.4/32 via inet6 fe80::2 de

Re: [net] net/tls: missing received data after fast remote close

2020-11-17 Thread Vadim Fedorenko
On 17.11.2020 22:38, Jakub Kicinski wrote: On Sun, 15 Nov 2020 14:43:48 +0300 Vadim Fedorenko wrote: In case when tcp socket received FIN after some data and the parser haven't started before reading data caller will receive an empty buffer. This is pretty terse, too terse for me to understand.

[PATCH v4 net-next 3/3] net: add support for sending RFC8335 PROBE

2020-11-17 Thread Andreas Roeseler
Modifying the ping_supported function to support probe message types allows the user to send probe requests through the existing framework for sending ping requests. Signed-off-by: Andreas Roeseler --- Changes since v1: - Switch to correct base tree Changes since v2: - Switch to net-next tree

[PATCH v4 net-next 2/3] ICMPv6: define PROBE message types

2020-11-17 Thread Andreas Roeseler
The types of ICMPV6 Extended Echo Request and ICMPV6 Extended Echo Reply are defined in sections 2 and 3 of RFC8335. Signed-off-by: Andreas Roeseler --- Changes since v1: - Switch to correct base tree Changes since v2: - Switch to net-next tree 67c70b5eb2bf7d0496fcb62d308dc3096bc11553 Changes

Re: [PATCH bpf-next v6 06/34] bpf: prepare for memcg-based memory accounting for bpf maps

2020-11-17 Thread Roman Gushchin
On Wed, Nov 18, 2020 at 01:06:17AM +0100, Daniel Borkmann wrote: > On 11/17/20 4:40 AM, Roman Gushchin wrote: > > In the absolute majority of cases if a process is making a kernel > > allocation, it's memory cgroup is getting charged. > > > > Bpf maps can be updated from an interrupt context and i

[PATCH v4 net-next 1/3] icmp: define PROBE message types

2020-11-17 Thread Andreas Roeseler
The types of ICMP Extended Echo Request and ICMP Extended Echo Reply are defined in sections 2 and 3 of RFC8335. Signed-off-by: Andreas Roeseler --- Changes since v1: - Switch to correct base tree Changes since v2: - Switch to net-next tree 67c70b5eb2bf7d0496fcb62d308dc3096bc11553 Changes sin

[PATCH v4 net-next 0/3] add support for sending RFC8335 PROBE

2020-11-17 Thread Andreas Roeseler
The popular utility ping has several severe limitations such as the inability to query specific interfaces on a node and requiring bidirectional connectivity between the probing and the probed interfaces. RFC8335 attempts to solve these limitations by creating the new utility PROBE which is a spec

Re: [PATCH] bpf: don't fail kmalloc while releasing raw_tp

2020-11-17 Thread Matt Mullins
On Tue, Nov 17, 2020 at 06:05:51PM -0500, Mathieu Desnoyers wrote: > - On Nov 16, 2020, at 5:10 PM, rostedt rost...@goodmis.org wrote: > > > On Mon, 16 Nov 2020 16:34:41 -0500 (EST) > > Mathieu Desnoyers wrote: > > [...] > > >> I think you'll want a WRITE_ONCE(old[i].func, tp_stub_func) her

Re: [PATCH net] qed: fix ILT configuration of SRC block

2020-11-17 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Mon, 16 Nov 2020 16:29:44 +0300 you wrote: > The code refactoring of ILT configuration was not complete, the old > unused variables were used for the SRC block. That could lead to the memory > corruption by HW when rx filters

Re: [PATCH net-next v3] net/tun: Call netdev notifiers

2020-11-17 Thread Jakub Kicinski
On Mon, 16 Nov 2020 11:41:21 +0100 Martin Schiller wrote: > Call netdev notifiers before and after changing the device type. > > Signed-off-by: Martin Schiller > --- > > Change from v2: > use subject_prefix 'net-next' to fix 'fixes_present' issue > > Change from v1: > fix 'subject_prefix' and '

Re: [PATCH net-next] ip_gre: remove CRC flag from dev features in gre_gso_segment

2020-11-17 Thread Jakub Kicinski
On Mon, 16 Nov 2020 17:15:47 +0800 Xin Long wrote: > This patch is to let it always do CRC checksum in sctp_gso_segment() > by removing CRC flag from the dev features in gre_gso_segment() for > SCTP over GRE, just as it does in Commit 527beb8ef9c0 ("udp: support > sctp over udp in skb_udp_tunnel_se

Re: [PATCH net] inet_diag: Fix error path to cancel the meseage in inet_req_diag_fill()

2020-11-17 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Mon, 16 Nov 2020 16:20:18 +0800 you wrote: > nlmsg_cancel() needs to be called in the error path of > inet_req_diag_fill to cancel the message. > > Fixes: d545caca827b ("net: inet: diag: expose the socket mark to privileged

Re: [PATCH bpf-next v6 06/34] bpf: prepare for memcg-based memory accounting for bpf maps

2020-11-17 Thread Daniel Borkmann
On 11/17/20 4:40 AM, Roman Gushchin wrote: In the absolute majority of cases if a process is making a kernel allocation, it's memory cgroup is getting charged. Bpf maps can be updated from an interrupt context and in such case there is no process which can be charged. It makes the memory account

Re: [PATCH] ipv4: use IS_ENABLED instead of ifdef

2020-11-17 Thread Jakub Kicinski
On Sun, 15 Nov 2020 23:45:09 +0100 Florian Klink wrote: > Checking for ifdef CONFIG_x fails if CONFIG_x=m. > > Use IS_ENABLED instead, which is true for both built-ins and modules. > > Otherwise, a > > ip -4 route add 1.2.3.4/32 via inet6 fe80::2 dev eth1 > fails with the message "Error: IPv6 s

Re: [PATCH v10 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-17 Thread wenxu
在 2020/11/18 6:43, Cong Wang 写道: > On Mon, Nov 16, 2020 at 8:06 PM wenxu wrote: >> >> On 11/17/2020 3:01 AM, Cong Wang wrote: >>> On Sun, Nov 15, 2020 at 5:06 AM wenxu wrote: 在 2020/11/15 2:05, Cong Wang 写道: > On Wed, Nov 11, 2020 at 9:44 PM wrote: >> diff --git a/net/sched/act_fr

Re: [RFC bpf-next 1/3] bpf: add module support to btf display helpers

2020-11-17 Thread Andrii Nakryiko
On Sun, Nov 15, 2020 at 2:53 AM Alan Maguire wrote: > > On Sat, 14 Nov 2020, Yonghong Song wrote: > > > > > > > On 11/14/20 8:04 AM, Alexei Starovoitov wrote: > > > On Fri, Nov 13, 2020 at 10:59 PM Andrii Nakryiko > > > wrote: > > >> > > >> On Fri, Nov 13, 2020 at 10:11 AM Alan Maguire > > >> wr

Re: [PATCH net-next 4/4] ptp: ptp_ines: use enum ptp_msg_type

2020-11-17 Thread Vladimir Oltean
On Wed, Nov 18, 2020 at 07:17:41AM +0800, kernel test robot wrote: > >> drivers/ptp/ptp_ines.c:690:26: error: conflicting types for > >> 'tag_to_msgtype' > 690 | static enum ptp_msg_type tag_to_msgtype(u8 tag) > | ^~ >drivers/ptp/ptp_ines.c:17

Re: [bpf PATCH v3 0/6] sockmap fixes

2020-11-17 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf.git (refs/heads/master): On Mon, 16 Nov 2020 14:27:23 -0800 you wrote: > This includes fixes for sockmap found after I started running skmsg and > verdict programs on systems that I use daily. To date with attached > series I've been running for multiple

Re: [PATCH net-next 4/4] ptp: ptp_ines: use enum ptp_msg_type

2020-11-17 Thread kernel test robot
Hi Christian, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Christian-Eggers/net-ptp-introduce-enum-ptp_msg_type/20201118-033828 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git

[PATCH net-next v2] net-loopback: allow lo dev initial state to be controlled

2020-11-17 Thread Jian Yang
From: Mahesh Bandewar Traditionally loopback devices comes up with initial state as DOWN for any new network-namespace. This would mean that anyone needing this device (which is mostly true except sandboxes where networking in not needed at all), would have to bring this UP by issuing something l

[PATCH net-next v3] Add Mellanox BlueField Gigabit Ethernet driver

2020-11-17 Thread David Thompson
This patch adds build and driver logic for the "mlxbf_gige" Ethernet driver from Mellanox Technologies. The second generation BlueField SoC from Mellanox supports an out-of-band GigaBit Ethernet management port to the Arm subsystem. This driver supports TCP/IP network connectivity for that port, a

Re: [PATCH] tracepoint: Do not fail unregistering a probe due to memory allocation

2020-11-17 Thread Mathieu Desnoyers
- On Nov 17, 2020, at 5:19 PM, rostedt rost...@goodmis.org wrote: > On Tue, 17 Nov 2020 13:33:42 -0800 > Kees Cook wrote: > >> As I think got discussed in the thread, what you had here wouldn't work >> in a CFI build if the function prototype of the call site and the >> function don't match.

Re: [PATCH] tracepoint: Do not fail unregistering a probe due to memory allocation

2020-11-17 Thread Mathieu Desnoyers
- On Nov 17, 2020, at 5:16 PM, rostedt rost...@goodmis.org wrote: > On Tue, 17 Nov 2020 16:22:23 -0500 (EST) > Mathieu Desnoyers wrote: > >> If we don't call the stub, then there is no point in having the stub at >> all, and we should just compare to a constant value, e.g. 0x1UL. As far >> a

  1   2   3   4   >