Re: KASAN: use-after-free Read in decode_session6

2020-10-31 Thread syzbot
syzbot has bisected this issue to: commit bcd623d8e9fa5f82bbd8cd464dc418d24139157b Author: Xin Long Date: Thu Oct 29 07:05:05 2020 + sctp: call sk_setup_caps in sctp_packet_transmit instead bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=14df9cb850 start commit: 68b

Re: [PATCH] net: ethernet: ti: cpsw: disable PTPv1 hw timestamping advertisement

2020-10-31 Thread Richard Cochran
On Sat, Oct 31, 2020 at 11:40:42AM -0700, Jakub Kicinski wrote: > On Thu, 29 Oct 2020 21:09:10 +0200 Grygorii Strashko wrote: > > The TI CPTS does not natively support PTPv1, only PTPv2. But, as it > > happens, the CPTS can provide HW timestamp for PTPv1 Sync messages, because > > CPTS HW parser lo

Re: [PATCH net-next] selftests/net: timestamping: add ptp v2 support

2020-10-31 Thread Richard Cochran
On Sat, Oct 31, 2020 at 11:40:40AM -0700, Jakub Kicinski wrote: > On Thu, 29 Oct 2020 21:09:31 +0200 Grygorii Strashko wrote: > > The timestamping tool is supporting now only PTPv1 (IEEE-1588 2002) while > > modern HW often supports also/only PTPv2. > > > > Hence timestamping tool is still useful

Re: [PATCH v2 net-next 01/12] net: dsa: implement a central TX reallocation procedure

2020-10-31 Thread Vladimir Oltean
On Sun, Nov 01, 2020 at 03:14:34AM +0200, Vladimir Oltean wrote: > On Sat, Oct 31, 2020 at 06:00:43PM -0700, Jakub Kicinski wrote: > > On Fri, 30 Oct 2020 03:48:59 +0200 Vladimir Oltean wrote: > > > @@ -567,6 +591,17 @@ static netdev_tx_t dsa_slave_xmit(struct sk_buff > > > *skb, struct net_device

Re: [PATCH v2 net-next 01/12] net: dsa: implement a central TX reallocation procedure

2020-10-31 Thread Vladimir Oltean
On Sat, Oct 31, 2020 at 06:00:43PM -0700, Jakub Kicinski wrote: > On Fri, 30 Oct 2020 03:48:59 +0200 Vladimir Oltean wrote: > > @@ -567,6 +591,17 @@ static netdev_tx_t dsa_slave_xmit(struct sk_buff *skb, > > struct net_device *dev) > > */ > > dsa_skb_tx_timestamp(p, skb); > > > > + if

Re: [PATCH net 0/5] Netfilter fixes for net

2020-10-31 Thread Jakub Kicinski
On Sat, 31 Oct 2020 19:14:32 +0100 Pablo Neira Ayuso wrote: > Hi, > > The following patchset contains Netfilter fixes for net: > > 1) Incorrect netlink report logic in flowtable and genID. > > 2) Add a selftest to check that wireguard passes the right sk >to ip_route_me_harder, from Jason A.

Re: [PATCH v2 net-next 01/12] net: dsa: implement a central TX reallocation procedure

2020-10-31 Thread Jakub Kicinski
On Fri, 30 Oct 2020 03:48:59 +0200 Vladimir Oltean wrote: > @@ -567,6 +591,17 @@ static netdev_tx_t dsa_slave_xmit(struct sk_buff *skb, > struct net_device *dev) >*/ > dsa_skb_tx_timestamp(p, skb); > > + if (dsa_realloc_skb(skb, dev)) { > + kfree_skb(skb); dev_kfre

Re: [PATCH net-next] net: bridge: mcast: fix stub definition of br_multicast_querier_exists

2020-10-31 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Sun, 1 Nov 2020 02:08:45 +0200 you wrote: > The commit cited below has changed only the functional prototype of > br_multicast_querier_exists, but forgot to do that for the stub > prototype (the one where CONFIG_BRIDGE_

Re: [PATCH net v2] ip_tunnel: fix over-mtu packet send fail without TUNNEL_DONT_FRAGMENT flags

2020-10-31 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Fri, 30 Oct 2020 11:32:08 +0800 you wrote: > From: wenxu > > The tunnel dvice such as vxlan, bareudp and geneve in the lwt mode set > the outer df only based TUNNEL_DONT_FRAGMENT. > And this is also the some behavior for g

Re: [PATCH net v2] ip_tunnel: fix over-mtu packet send fail without TUNNEL_DONT_FRAGMENT flags

2020-10-31 Thread Jakub Kicinski
On Fri, 30 Oct 2020 11:32:08 +0800 we...@ucloud.cn wrote: > From: wenxu > > The tunnel dvice such as vxlan, bareudp and geneve in the lwt mode set > the outer df only based TUNNEL_DONT_FRAGMENT. > And this is also the some behavior for gre device before switching to use > ip_md_tunnel_xmit as

Re: [PATCH net v3] cadence: force nonlinear buffers to be cloned

2020-10-31 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Fri, 30 Oct 2020 15:58:14 + you wrote: > In my test setup, I had a SAMA5D27 device configured with ip forwarding, and > second device with usb ethernet (r8152) sending ICMP packets.  If the packet > was larger than about

Re: [net-next:master 38/46] net/bridge/br_device.c:96:7: error: too many arguments to function 'br_multicast_querier_exists'

2020-10-31 Thread Vladimir Oltean
On Sun, Nov 01, 2020 at 08:00:18AM +0800, kernel test robot wrote: > >> net/bridge/br_device.c:96:7: error: too many arguments to function > >> 'br_multicast_querier_exists' Oops, I sent this patch as a fixup: https://patchwork.ozlabs.org/project/netdev/patch/20201101000845.190009-1-vladimir.olt.

[PATCH net-next] net: bridge: mcast: fix stub definition of br_multicast_querier_exists

2020-10-31 Thread Vladimir Oltean
The commit cited below has changed only the functional prototype of br_multicast_querier_exists, but forgot to do that for the stub prototype (the one where CONFIG_BRIDGE_IGMP_SNOOPING is disabled). Fixes: 955062b03fa6 ("net: bridge: mcast: add support for raw L2 multicast groups") Reported-by: k

Re: [PATCH net v3] cadence: force nonlinear buffers to be cloned

2020-10-31 Thread Jakub Kicinski
On Fri, 30 Oct 2020 15:58:14 + Mark Deneen wrote: > In my test setup, I had a SAMA5D27 device configured with ip forwarding, and > second device with usb ethernet (r8152) sending ICMP packets.  If the packet > was larger than about 220 bytes, the SAMA5 device would "oops" with the > following t

[net-next:master 38/46] net/bridge/br_device.c:96:7: error: too many arguments to function 'br_multicast_querier_exists'

2020-10-31 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: 3752404a68e86d82b97a61aba78f6d6afae48549 commit: 955062b03fa62b802a1ee34fbb04e39f7a70ae73 [38/46] net: bridge: mcast: add support for raw L2 multicast groups config: i386-randconfig-m021-20201101 (attached a

Re: [PATCH net-next] r8169: use pm_runtime_put_sync in rtl_open error path

2020-10-31 Thread Jakub Kicinski
On Thu, 29 Oct 2020 19:02:53 +0100 Heiner Kallweit wrote: > We can safely runtime-suspend the chip if rtl_open() fails. Therefore > switch the error path to use pm_runtime_put_sync() as well. > > Signed-off-by: Heiner Kallweit Applied, thanks!

Re: [PATCH net-next] r8169: remove unneeded memory barrier in rtl_tx

2020-10-31 Thread Jakub Kicinski
On Thu, 29 Oct 2020 18:56:06 +0100 Heiner Kallweit wrote: > tp->dirty_tx isn't changed outside rtl_tx(). Therefore I see no need > to guarantee a specific order of reading tp->dirty_tx and tp->cur_tx. > Having said that we can remove the memory barrier. > In addition use READ_ONCE() when reading tp

Re: [PATCH net-next] net: dlci: Deprecate the DLCI driver (aka the Frame Relay layer)

2020-10-31 Thread Xie He
On Sat, Oct 31, 2020 at 2:41 PM Arnd Bergmann wrote: > > I think it can just go in the bin directly. I actually submitted a couple of > patches to clean up drivers/net/wan last year but didn't follow up > with a new version after we decided that x.25 is still needed, see > https://lore.kernel.org/

Re: [PATCH net-next v3] ne2k: Fix Typo in RW-Bugfix

2020-10-31 Thread Jakub Kicinski
On Thu, 29 Oct 2020 15:33:57 +0100 Armin Wolf wrote: > Correct a typo in ne.c and ne2k-pci.c which > prevented activation of the RW-Bugfix. > > Signed-off-by: Armin Wolf Applied.

Re: [RESEND PATCH v5] net: macb: add support for high speed interface

2020-10-31 Thread Jakub Kicinski
On Thu, 29 Oct 2020 13:47:07 +0100 Parshuram Thombare wrote: > This patch adds support for 10GBASE-R interface to the linux driver for > Cadence's ethernet controller. > This controller has separate MAC's and PCS'es for low and high speed paths. > High speed PCS supports 100M, 1G, 2.5G, 5G and 10G

Re: [PATCH net-next v2] net/usb/r8153_ecm: support ECM mode for RTL8153

2020-10-31 Thread Jakub Kicinski
On Fri, 30 Oct 2020 11:23:08 +0800 Hayes Wang wrote: > Support ECM mode based on cdc_ether with relative mii functions, > when CONFIG_USB_RTL8152 is not set, or the device is not supported > by r8152 driver. > > Signed-off-by: Hayes Wang Can you describe the use case in more detail? AFAICT r815

Re: [PATCH net-next v2] net/smc: improve return codes for SMC-Dv2

2020-10-31 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Sat, 31 Oct 2020 19:19:38 +0100 you wrote: > To allow better problem diagnosis the return codes for SMC-Dv2 are > improved by this patch. A few more CLC DECLINE codes are defined and > sent to the peer when an SMC connec

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

2020-10-31 Thread Jakub Kicinski
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 budget when calling from NAPI context, and > breaking this semantic will cause hard to debug problem, because > _kfree_skb_defer() need to run in atomic con

Re: [PATCH net-next v6 1/5] net: hdlc_fr: Simpify fr_rx by using "goto rx_drop" to drop frames

2020-10-31 Thread Xie He
On Sat, Oct 31, 2020 at 12:48 PM Willem de Bruijn wrote: > > Returning code in branches vs an error jump label seems more of a > personal preference, and to me does not pass the benefit/cost threshold. This patch is necessary for the 2nd and 5th patch in this series, because the 2nd and 5th patch

Re: [v2 net-next PATCH 00/10] Support for OcteonTx2 98xx silcion

2020-10-31 Thread Jakub Kicinski
On Thu, 29 Oct 2020 10:45:39 +0530 sundeep.l...@gmail.com wrote: > From: Subbaraya Sundeep > > OcteonTx2 series of silicons have multiple variants, the > 98xx variant has two network interface controllers (NIX blocks) > each of which supports upto 100Gbps. Similarly 98xx supports > two crypto blo

Re: [PATCH net-next] net: dlci: Deprecate the DLCI driver (aka the Frame Relay layer)

2020-10-31 Thread Jakub Kicinski
On Sat, 31 Oct 2020 22:41:30 +0100 Arnd Bergmann wrote: > On Sat, Oct 31, 2020 at 5:53 PM Jakub Kicinski wrote: > > > > On Fri, 30 Oct 2020 22:10:42 -0700 Xie He wrote: > > > > The usual way of getting rid of old code is to move it to staging/ > > > > for a few releases then delete it, like Arnd

Re: [GIT PULL] vhost,vdpa: fixes

2020-10-31 Thread pr-tracker-bot
The pull request you sent on Sat, 31 Oct 2020 15:59:40 -0400: > https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/c2dc4c073fb71b50904493657a7622b481b346e3 Thank you! -- Deet-doot-dot, I am a b

Re: [PATCH net-next] net: dlci: Deprecate the DLCI driver (aka the Frame Relay layer)

2020-10-31 Thread Arnd Bergmann
On Sat, Oct 31, 2020 at 5:53 PM Jakub Kicinski wrote: > > On Fri, 30 Oct 2020 22:10:42 -0700 Xie He wrote: > > > The usual way of getting rid of old code is to move it to staging/ > > > for a few releases then delete it, like Arnd just did with wimax. > > > > Oh. OK. But I see "include/linux/if_fr

[PATCH v3] net: usb: usbnet: update __usbnet_{read|write}_cmd() to use new API

2020-10-31 Thread Anant Thazhemadam
Currently, __usbnet_{read|write}_cmd() use usb_control_msg(). However, this could lead to potential partial reads/writes being considered valid, and since most of the callers of usbnet_{read|write}_cmd() don't take partial reads/writes into account (only checking for negative error number is done),

Re: [PATCH v2] net: usb: usbnet: update __usbnet_{read|write}_cmd() to use new API

2020-10-31 Thread Anant Thazhemadam
On 01/11/20 2:41 am, Jakub Kicinski wrote: > On Thu, 29 Oct 2020 18:52:56 +0530 Anant Thazhemadam wrote: >> +return usb_control_msg_recv(dev->udev, 0, >> + cmd, reqtype, value, index, data, size, >> + USB_CTRL_GET_TIMEOUT, GFP_KERNEL); > Pleas

Re: [PATCH iproute2-next v2 02/11] lib: Add parse_one_of(), parse_on_off()

2020-10-31 Thread Petr Machata
David Ahern writes: > On 10/30/20 6:29 AM, Petr Machata wrote: >> +int parse_on_off(const char *msg, const char *realval, int *p_err) >> +{ >> +static const char * const values_on_off[] = { "off", "on" }; >> + >> +return parse_one_of(msg, realval, values_on_off, >> ARRAY_SIZE(values_on

Re: [PATCH iproute2-next v2 03/11] lib: utils: Add print_on_off_bool()

2020-10-31 Thread Petr Machata
Stephen Hemminger writes: > On Fri, 30 Oct 2020 13:29:50 +0100 > Petr Machata wrote: > >> +void print_on_off_bool(FILE *fp, const char *flag, bool val) >> +{ >> +if (is_json_context()) >> +print_bool(PRINT_JSON, flag, NULL, val); >> +else >> +fprintf(fp, "%s %s

Re: [PATCH iproute2-next v2 03/11] lib: utils: Add print_on_off_bool()

2020-10-31 Thread Petr Machata
David Ahern writes: > On 10/30/20 6:29 AM, Petr Machata wrote: >> diff --git a/lib/utils.c b/lib/utils.c >> index 930877ae0f0d..8deec86ecbcd 100644 >> --- a/lib/utils.c >> +++ b/lib/utils.c >> @@ -1763,3 +1763,11 @@ int parse_on_off(const char *msg, const char >> *realval, int *p_err) >> >>

Re: [PATCH net-next v3] net: axienet: Properly handle PCS/PMA PHY for 1000BaseX mode

2020-10-31 Thread Jakub Kicinski
On Wed, 28 Oct 2020 17:49:39 + Radhey Shyam Pandey wrote: > > Update the axienet driver to properly support the Xilinx PCS/PMA PHY > > component which is used for 1000BaseX and SGMII modes, including > > properly configuring the auto-negotiation mode of the PHY and reading the > > negotiated st

Re: [PATCHv6 net 0/2] IPv6: reply ICMP error if fragment doesn't contain all headers

2020-10-31 Thread Jakub Kicinski
On Tue, 27 Oct 2020 20:33:11 +0800 Hangbin Liu wrote: > When our Engineer run latest IPv6 Core Conformance test, test v6LC.1.3.6: > First Fragment Doesn’t Contain All Headers[1] failed. The test purpose is to > verify that the node(Linux for example) should properly process IPv6 packets > that don’

Re: [PATCH v2] net: usb: usbnet: update __usbnet_{read|write}_cmd() to use new API

2020-10-31 Thread Jakub Kicinski
On Thu, 29 Oct 2020 18:52:56 +0530 Anant Thazhemadam wrote: > + return usb_control_msg_recv(dev->udev, 0, > + cmd, reqtype, value, index, data, size, > + USB_CTRL_GET_TIMEOUT, GFP_KERNEL); Please align continuation lines after the opening bra

Re: [PATCH v8,net-next,00/12] Add Support for Marvell OcteonTX2

2020-10-31 Thread Jakub Kicinski
On Sat, 31 Oct 2020 15:28:59 -0400 Willem de Bruijn wrote: > The point about parsing tar files remains open. In general error-prone > parsing is better left to userspace. The tar files have to go. Srujana said they have 3 files to load, just load them individually.

Re: [PATCH net-next] net: 9p: Fix kerneldoc warnings of missing parameters etc

2020-10-31 Thread Dominique Martinet
Andrew Lunn wrote on Sat, Oct 31, 2020: > net/9p/client.c:420: warning: Function parameter or member 'c' not described > in 'p9_client_cb' > net/9p/client.c:420: warning: Function parameter or member 'req' not > described in 'p9_client_cb' > net/9p/client.c:420: warning: Function parameter or mem

Re: [PATCH net-next] net: ipa: avoid a bogus warning

2020-10-31 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Sat, 31 Oct 2020 10:15:24 -0500 you wrote: > The previous commit added support for IPA having up to six source > and destination resources. But currently nothing uses more than > four. (Five of each are used in a newer

Re: [PATCH net-next v6 1/5] net: hdlc_fr: Simpify fr_rx by using "goto rx_drop" to drop frames

2020-10-31 Thread Jakub Kicinski
On Sat, 31 Oct 2020 15:47:28 -0400 Willem de Bruijn wrote: > On Sat, Oct 31, 2020 at 12:02 PM Xie He wrote: > > On Sat, Oct 31, 2020 at 8:18 AM Xie He wrote: > > > > Especially without that, I'm not sure this and the follow-on patch add > > > > much value. Minor code cleanups complicate backpor

[PATCH iproute2-next] tc: implement support for action terse dump

2020-10-31 Thread Vlad Buslov
Implement support for action terse dump using new TCA_FLAG_TERSE_DUMP value of TCA_ROOT_FLAGS tlv. Set the flag when user requested it with following example CLI (-br for 'brief'): $ tc -s -br actions ls action tunnel_key total acts 2 action order 0: tunnel_key index 1 Actio

Re: [PATCH net-next] net: ipa: avoid a bogus warning

2020-10-31 Thread Jakub Kicinski
On Sat, 31 Oct 2020 10:15:24 -0500 Alex Elder wrote: > The previous commit added support for IPA having up to six source > and destination resources. But currently nothing uses more than > four. (Five of each are used in a newer version of the hardware.) > > I find that in one of my build enviro

[PATCH net-next] net: sched: implement action-specific terse dump

2020-10-31 Thread Vlad Buslov
Allow user to request action terse dump with new flag value TCA_FLAG_TERSE_DUMP. Only output essential action info in terse dump (kind, stats and index). This is different from filter terse dump where index is excluded (filter can be identified by its own handle) and cookie is included. Move tcf_a

[GIT PULL] vhost,vdpa: fixes

2020-10-31 Thread Michael S. Tsirkin
The following changes since commit 88a0d60c6445f315fbcfff3db792021bb3a67b28: MAINTAINERS: add URL for virtio-mem (2020-10-21 10:48:11 -0400) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to 0c

Re: [PATCH net-next v6 1/5] net: hdlc_fr: Simpify fr_rx by using "goto rx_drop" to drop frames

2020-10-31 Thread Willem de Bruijn
On Sat, Oct 31, 2020 at 12:02 PM Xie He wrote: > > On Sat, Oct 31, 2020 at 8:18 AM Xie He wrote: > > > > > Especially without that, I'm not sure this and the follow-on patch add > > > much value. Minor code cleanups complicate backports of fixes. > > > > To me this is necessary, because I feel ha

Re: [PATCH] net: atm: fix update of position index in lec_seq_next

2020-10-31 Thread Jakub Kicinski
On Tue, 27 Oct 2020 11:49:25 + Colin King wrote: > From: Colin Ian King > > The position index in leq_seq_next is not updated when the next > entry is fetched an no more entries are available. This causes > seq_file to report the following error: > > "seq_file: buggy .next function lec_seq_n

Re: [PATCH v8,net-next,00/12] Add Support for Marvell OcteonTX2

2020-10-31 Thread Willem de Bruijn
On Wed, Oct 28, 2020 at 6:50 PM Srujana Challa wrote: > > This series introduces crypto(CPT) drivers(PF & VF) for Marvell OcteonTX2 > CN96XX Soc. > > OcteonTX2 SOC's resource virtualization unit (RVU) supports multiple > physical and virtual functions. Each of the PF/VF's functionality is > determ

Re: [PATCH v8,net-next,11/12] crypto: octeontx2: add support to process the crypto request

2020-10-31 Thread Willem de Bruijn
On Wed, Oct 28, 2020 at 5:52 PM Srujana Challa wrote: > > Attach LFs to CPT VF to process the crypto requests and register > LF interrupts. > > Signed-off-by: Suheil Chandran > Signed-off-by: Srujana Challa > --- > drivers/crypto/marvell/octeontx2/Makefile | 2 +- > .../marvell/octeontx2/

Re: [bpf-next PATCH v2 0/5] selftests/bpf: Migrate test_tcpbpf_user to be a part of test_progs framework

2020-10-31 Thread Alexander Duyck
On Sat, Oct 31, 2020 at 11:31 AM Alexander Duyck wrote: > > Move the test functionality from test_tcpbpf_user into the test_progs > framework so that it will be run any time the test_progs framework is run. > This will help to prevent future test escapes as the individual tests, such > as test_tcp

Re: [PATCH] sfp: Fix error handing in sfp_probe()

2020-10-31 Thread Andrew Lunn
On Sat, Oct 31, 2020 at 11:10:53AM +0800, YueHaibing wrote: > gpiod_to_irq() never return 0, but returns negative in > case of error, check it and set gpio_irq to 0. > > Fixes: 73970055450e ("sfp: add SFP module support") > Signed-off-by: YueHaibing Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v8,net-next,12/12] crypto: octeontx2: register with linux crypto framework

2020-10-31 Thread Willem de Bruijn
On Wed, Oct 28, 2020 at 5:43 PM Srujana Challa wrote: > > CPT offload module utilises the linux crypto framework to offload > crypto processing. This patch registers supported algorithms by > calling registration functions provided by the kernel crypto API. > > The module currently supports: > - A

[bpf-next PATCH v2 5/5] selftest/bpf: Use global variables instead of maps for test_tcpbpf_kern

2020-10-31 Thread Alexander Duyck
From: Alexander Duyck Use global variables instead of global_map and sockopt_results_map to track test data. Doing this greatly simplifies the code as there is not need to take the extra steps of updating the maps or looking up elements. Suggested-by: Martin KaFai Lau Signed-off-by: Alexander D

[bpf-next PATCH v2 2/5] selftests/bpf: Drop python client/server in favor of threads

2020-10-31 Thread Alexander Duyck
From: Alexander Duyck Drop the tcp_client/server.py files in favor of using a client and server thread within the test case. Specifically we spawn a new thread to play the role of the server, and the main testing thread plays the role of client. Add logic to the end of the run_test function to g

[bpf-next PATCH v2 4/5] selftests/bpf: Migrate tcpbpf_user.c to use BPF skeleton

2020-10-31 Thread Alexander Duyck
From: Alexander Duyck Update tcpbpf_user.c to make use of the BPF skeleton. Doing this we can simplify test_tcpbpf_user and reduce the overhead involved in setting up the test. In addition we can clean up the remaining bits such as the one remaining CHECK_FAIL at the end of test_tcpbpf_user so t

[bpf-next PATCH v2 1/5] selftests/bpf: Move test_tcppbf_user into test_progs

2020-10-31 Thread Alexander Duyck
From: Alexander Duyck Recently a bug was missed due to the fact that test_tcpbpf_user is not a part of test_progs. In order to prevent similar issues in the future move the test functionality into test_progs. By doing this we can make certain that it is a part of standard testing and will not be

[bpf-next PATCH v2 3/5] selftests/bpf: Replace EXPECT_EQ with ASSERT_EQ and refactor verify_results

2020-10-31 Thread Alexander Duyck
From: Alexander Duyck There is already logic in test_progs.h for asserting that a value is expected to be another value. So instead of reinventing it we should just make use of ASSERT_EQ in tcpbpf_user.c. This will allow for better debugging and integrates much more closely with the test_progs fr

Re: [PATCH] net: ethernet: ti: cpsw: disable PTPv1 hw timestamping advertisement

2020-10-31 Thread Jakub Kicinski
On Thu, 29 Oct 2020 21:09:10 +0200 Grygorii Strashko wrote: > The TI CPTS does not natively support PTPv1, only PTPv2. But, as it > happens, the CPTS can provide HW timestamp for PTPv1 Sync messages, because > CPTS HW parser looks for PTP messageType id in PTP message octet 0 which > value is 0 for

Re: [PATCH net-next] selftests/net: timestamping: add ptp v2 support

2020-10-31 Thread Jakub Kicinski
On Thu, 29 Oct 2020 21:09:31 +0200 Grygorii Strashko wrote: > The timestamping tool is supporting now only PTPv1 (IEEE-1588 2002) while > modern HW often supports also/only PTPv2. > > Hence timestamping tool is still useful for sanity testing of PTP drivers > HW timestamping capabilities it's reas

[PATCH v2] fix for potential NULL pointer dereference with bare lan743x

2020-10-31 Thread Sergej Bauer
Signed-off-by: Sergej Bauer --- drivers/net/ethernet/microchip/lan743x_ethtool.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/microchip/lan743x_ethtool.c b/drivers/net/ethernet/microchip/lan743x_ethtool.c index dcde496da7fb..ad38fc9e1468 1

Re: [PATCH net-next 0/4] net: add functionality to net core byte/packet counters and use it in r8169

2020-10-31 Thread Jakub Kicinski
On Thu, 29 Oct 2020 18:28:52 +0100 Heiner Kallweit wrote: > This series adds missing functionality to the net core handling of > byte/packet counters and statistics. The extensions are then used > to remove private rx/tx byte/packet counters in r8169 driver. Applied, thanks!

Re: [PATCH net-next] net: netfilter: Add __printf() attribute

2020-10-31 Thread Pablo Neira Ayuso
On Sat, Oct 31, 2020 at 07:21:44PM +0100, Andrew Lunn wrote: > nft_request_module calls vsnprintf() using parameters passed to it. > Make the function with __printf() attribute so the compiler can check > the format and arguments. Applied, thanks.

[PATCH net-next] net: ipv6: For kerneldoc warnings with W=1

2020-10-31 Thread Andrew Lunn
From: Xin Long net/ipv6/addrconf.c:2005: warning: Function parameter or member 'dev' not described in 'ipv6_dev_find' net/ipv6/ip6_vti.c:138: warning: Function parameter or member 'ip6n' not described in 'vti6_tnl_bucket' net/ipv6/ip6_tunnel.c:218: warning: Function parameter or member 'ip6n' n

[bpf-next PATCH v2 0/5] selftests/bpf: Migrate test_tcpbpf_user to be a part of test_progs framework

2020-10-31 Thread Alexander Duyck
Move the test functionality from test_tcpbpf_user into the test_progs framework so that it will be run any time the test_progs framework is run. This will help to prevent future test escapes as the individual tests, such as test_tcpbpf_user, are less likely to be run by developers and CI tests. As

[PATCH net-next] net: 9p: Fix kerneldoc warnings of missing parameters etc

2020-10-31 Thread Andrew Lunn
net/9p/client.c:420: warning: Function parameter or member 'c' not described in 'p9_client_cb' net/9p/client.c:420: warning: Function parameter or member 'req' not described in 'p9_client_cb' net/9p/client.c:420: warning: Function parameter or member 'status' not described in 'p9_client_cb' net/

[PATCH net-next] net: netfilter: Add __printf() attribute

2020-10-31 Thread Andrew Lunn
nft_request_module calls vsnprintf() using parameters passed to it. Make the function with __printf() attribute so the compiler can check the format and arguments. Signed-off-by: Andrew Lunn --- net/netfilter/nf_tables_api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/n

[PATCH net-next v2] net/smc: improve return codes for SMC-Dv2

2020-10-31 Thread Karsten Graul
To allow better problem diagnosis the return codes for SMC-Dv2 are improved by this patch. A few more CLC DECLINE codes are defined and sent to the peer when an SMC connection cannot be established. There are now multiple SMC variations that are offered by the client and the server may encounter pr

[PATCH net-next] net: driver: hamradio: Fix potential unterminated string

2020-10-31 Thread Andrew Lunn
With W=1 the following error is reported: In function ‘strncpy’, inlined from ‘hdlcdrv_ioctl’ at drivers/net/hamradio/hdlcdrv.c:600:4: ./include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Wstringop-truncation] 297 | #define __underlying_

[PATCH net 5/5] netfilter: ipset: Update byte and packet counters regardless of whether they match

2020-10-31 Thread Pablo Neira Ayuso
From: Stefano Brivio In ip_set_match_extensions(), for sets with counters, we take care of updating counters themselves by calling ip_set_update_counter(), and of checking if the given comparison and values match, by calling ip_set_match_counter() if needed. However, if a given comparison on cou

[PATCH net 3/5] netfilter: use actual socket sk rather than skb sk when routing harder

2020-10-31 Thread Pablo Neira Ayuso
From: "Jason A. Donenfeld" If netfilter changes the packet mark when mangling, the packet is rerouted using the route_me_harder set of functions. Prior to this commit, there's one big difference between route_me_harder and the ordinary initial routing functions, described in the comment above __i

[PATCH net-next] drivers: net: wan: lmc: Fix W=1 set but used variable warnings

2020-10-31 Thread Andrew Lunn
drivers/net/wan/lmc/lmc_main.c: In function ‘lmc_ioctl’: drivers/net/wan/lmc/lmc_main.c:356:25: warning: variable ‘mii’ set but not used [-Wunused-but-set-variable] 356 | u16 mii; | ^~~ drivers/net/wan/lmc/lmc_main.c:427:25: warning: variable ‘mi

[PATCH net 4/5] netfilter: nf_tables: missing validation from the abort path

2020-10-31 Thread Pablo Neira Ayuso
If userspace does not include the trailing end of batch message, then nfnetlink aborts the transaction. This allows to check that ruleset updates trigger no errors. After this patch, invoking this command from the prerouting chain: # nft -c add rule x y fib saddr . oif type local fails since oi

[PATCH net 1/5] netfilter: nftables: fix netlink report logic in flowtable and genid

2020-10-31 Thread Pablo Neira Ayuso
The netlink report should be sent regardless the available listeners. Fixes: 84d7fce69388 ("netfilter: nf_tables: export rule-set generation ID") Fixes: 3b49e2e94e6e ("netfilter: nf_tables: add flow table netlink frontend") Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_tables_api.c | 4 +

[PATCH net 2/5] wireguard: selftests: check that route_me_harder packets use the right sk

2020-10-31 Thread Pablo Neira Ayuso
From: "Jason A. Donenfeld" If netfilter changes the packet mark, the packet is rerouted. The ip_route_me_harder family of functions fails to use the right sk, opting to instead use skb->sk, resulting in a routing loop when used with tunnels. With the next change fixing this issue in netfilter, te

[PATCH net 0/5] Netfilter fixes for net

2020-10-31 Thread Pablo Neira Ayuso
Hi, The following patchset contains Netfilter fixes for net: 1) Incorrect netlink report logic in flowtable and genID. 2) Add a selftest to check that wireguard passes the right sk to ip_route_me_harder, from Jason A. Donenfeld. 3) Pass the actual sk to ip_route_me_harder(), also from Jason.

[PATCH net-next v7 3/5] net: hdlc_fr: Do skb_reset_mac_header for skbs received on normal PVC devices

2020-10-31 Thread Xie He
When an skb is received on a normal (non-Ethernet-emulating) PVC device, call skb_reset_mac_header before we pass it to upper layers. This is because normal PVC devices don't have header_ops, so any header we have would not be visible to upper layer code when sending, so the header shouldn't be vi

[PATCH net-next v7 4/5] net: hdlc_fr: Improve the initial checks when we receive an skb

2020-10-31 Thread Xie He
1. Change the skb->len check from "<= 4" to "< 4". At first we only need to ensure a 4-byte header is present. We indeed normally need the 5th byte, too, but it'd be more logical and cleaner to check its existence when we actually need it. 2. Add an fh->ea2 check to the initial checks in fr_rx. fh

[PATCH net-next v7 5/5] net: hdlc_fr: Add support for any Ethertype

2020-10-31 Thread Xie He
Change the fr_rx function to make this driver support any Ethertype when receiving skbs on normal (non-Ethernet-emulating) PVC devices. (This driver is already able to handle any Ethertype when sending.) Originally in the fr_rx function, the code that parses the long (10-byte) header only recogniz

[PATCH net-next v7 0/5] net: hdlc_fr: Improve fr_rx and add support for any Ethertype

2020-10-31 Thread Xie He
The main purpose of this series is the last patch. The previous 4 patches are just code clean-ups so that the last patch will not make the code too messy. The patches must be applied in sequence. The receiving code of this driver doesn't support arbitrary Ethertype values. It only recognizes a few

[PATCH net-next v7 1/5] net: hdlc_fr: Simpify fr_rx by using "goto rx_drop" to drop frames

2020-10-31 Thread Xie He
When the fr_rx function drops a received frame (because the protocol type is not supported, or because the PVC virtual device that corresponds to the DLCI number and the protocol type doesn't exist), the function frees the skb and returns. The code for freeing the skb and returning is repeated sev

[PATCH net-next v7 2/5] net: hdlc_fr: Change the use of "dev" in fr_rx to make the code cleaner

2020-10-31 Thread Xie He
The eth_type_trans function is called when we receive frames carrying Ethernet frames. This function expects a non-NULL pointer as an argument, and assigns it directly to skb->dev. However, the code handling other types of frames first assigns the pointer to "dev", and then at the end checks wheth

Re: [PATCH v11 4/4] bus: mhi: Add userspace client interface driver

2020-10-31 Thread Jakub Kicinski
On Thu, 29 Oct 2020 19:45:46 -0700 Hemant Kumar wrote: > +/* .driver_data stores max mtu */ > +static const struct mhi_device_id mhi_uci_match_table[] = { > + { .chan = "LOOPBACK", .driver_data = 0x1000}, > + {}, > +}; > +MODULE_DEVICE_TABLE(mhi, mhi_uci_match_table); I forgot to follow up

[PATCH net-next] drivers: net: xen-netfront: Fixed W=1 set but unused warnings

2020-10-31 Thread Andrew Lunn
drivers/net/xen-netfront.c:2416:16: warning: variable ‘target’ set but not used [-Wunused-but-set-variable] 2416 | unsigned long target; Remove target and just discard the return value from simple_strtoul(). This patch does give a checkpatch warning, but the warning was there before anyway, as

Re: [PATCH net-next] net/smc: improve return codes for SMC-Dv2

2020-10-31 Thread Karsten Graul
On 31/10/2020 04:18, Jakub Kicinski wrote: > On Wed, 28 Oct 2020 12:00:39 +0100 Karsten Graul wrote: >> To allow better problem diagnosis the return codes for SMC-Dv2 are >> improved by this patch. A few more CLC DECLINE codes are defined and >> sent to the peer when an SMC connection cannot be est

[PATCH net-next 0/3] xilinx_emaclite W=1 fixes

2020-10-31 Thread Andrew Lunn
kerneldoc, pointer issues, and add COMPILE_TEST support to easy finding future issues via build testing. Andrew Lunn (3): drivers: net: xilinx_emaclite: Add missing parameter kerneldoc drivers: net: xilinx_emaclite: Fix -Wpointer-to-int-cast warnings with W=1 drivers: net: xilinx_emaclit

[PATCH net-next 1/3] drivers: net: xilinx_emaclite: Add missing parameter kerneldoc

2020-10-31 Thread Andrew Lunn
The txqueue parameter to the watchdog callback is unused in this driver. But it still needs to be documented. Signed-off-by: Andrew Lunn --- drivers/net/ethernet/xilinx/xilinx_emaclite.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/

[PATCH net-next 3/3] drivers: net: xilinx_emaclite: Add COMPILE_TEST support

2020-10-31 Thread Andrew Lunn
To improve build testing of this driver, add COMPILE_TEST support. Signed-off-by: Andrew Lunn --- drivers/net/ethernet/xilinx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/xilinx/Kconfig b/drivers/net/ethernet/xilinx/Kconfig index d0d0d4fe9d40.

[PATCH net-next 2/3] drivers: net: xilinx_emaclite: Fix -Wpointer-to-int-cast warnings with W=1

2020-10-31 Thread Andrew Lunn
drivers/net/ethernet//xilinx/xilinx_emaclite.c:341:35: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 341 | addr = (void __iomem __force *)((u32 __force)addr ^ Use long instead of u32 to avoid problems on 64 bit systems. Signed-off-by: Andrew Lunn --- drive

[PATCH net-next] drivers: net: sky2: Fix -Wstringop-truncation with W=1

2020-10-31 Thread Andrew Lunn
In function ‘strncpy’, inlined from ‘sky2_name’ at drivers/net/ethernet/marvell/sky2.c:4903:3, inlined from ‘sky2_probe’ at drivers/net/ethernet/marvell/sky2.c:5049:2: ./include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 16 equals destination size [-Wstringop-trunc

Re: [PATCH net-next] net: dlci: Deprecate the DLCI driver (aka the Frame Relay layer)

2020-10-31 Thread Xie He
On Sat, Oct 31, 2020 at 9:51 AM Jakub Kicinski wrote: > > > > The usual way of getting rid of old code is to move it to staging/ > > > for a few releases then delete it, like Arnd just did with wimax. > > > > Oh. OK. But I see "include/linux/if_frad.h" is included in > > "net/socket.c", and there'

Re: [PATCH net-next 14/15] net: dpaa: Replace in_irq() usage.

2020-10-31 Thread Jakub Kicinski
On Tue, 27 Oct 2020 23:54:53 +0100 Sebastian Andrzej Siewior wrote: > The driver uses in_irq() + in_serving_softirq() magic to decide if NAPI > scheduling is required or packet processing. > > The usage of in_*() in drivers is phased out and Linus clearly requested > that code which changes behavi

Re: [PATCH net-next 00/15] in_interrupt() cleanup, part 2

2020-10-31 Thread Jakub Kicinski
On Tue, 27 Oct 2020 23:54:39 +0100 Sebastian Andrzej Siewior wrote: > Folks, > > in the discussion about preempt count consistency across kernel > configurations: > > https://lore.kernel.org/r/20200914204209.256266...@linutronix.de/ > > Linus clearly requested that code in drivers and librari

Re: [PATCH net-next v6 4/5] net: hdlc_fr: Improve the initial checks when we receive an skb

2020-10-31 Thread Xie He
On Fri, Oct 30, 2020 at 5:49 PM Xie He wrote: > > Add an fh->ea2 check to the initial checks in fr_rx. fh->ea2 == 1 means > the second address byte is the final address byte. We only support the > case where the address length is 2 bytes. If the address length is not > 2 bytes, the control field a

Re: [PATCH net-next 04/15] net: mlx5: Replace in_irq() usage.

2020-10-31 Thread Jakub Kicinski
On Tue, 27 Oct 2020 23:54:43 +0100 Sebastian Andrzej Siewior wrote: > mlx5_eq_async_int() uses in_irq() to decide whether eq::lock needs to be > acquired and released with spin_[un]lock() or the irq saving/restoring > variants. > > The usage of in_*() in drivers is phased out and Linus clearly req

Re: [PATCH net-next] net: dlci: Deprecate the DLCI driver (aka the Frame Relay layer)

2020-10-31 Thread Jakub Kicinski
On Fri, 30 Oct 2020 22:10:42 -0700 Xie He wrote: > > The usual way of getting rid of old code is to move it to staging/ > > for a few releases then delete it, like Arnd just did with wimax. > > Oh. OK. But I see "include/linux/if_frad.h" is included in > "net/socket.c", and there's still some co

Re: KASAN: use-after-free Read in decode_session6

2020-10-31 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:68bb4665 Merge branch 'l2-multicast-forwarding-for-ocelot-.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=1219346c50 kernel config: https://syzkaller.appspot.com/x/.config?x=eac680a

Re: WARNING in xfrm_alloc_compat

2020-10-31 Thread syzbot
syzbot has bisected this issue to: commit 5f3eea6b7e8f58cf5c8a9d4b9679dc19e9e67ba3 Author: Dmitry Safonov Date: Mon Sep 21 14:36:53 2020 + xfrm/compat: Attach xfrm dumps to 64=>32 bit translator bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=102aadf450 start commit:

Re: [PATCH net-next v6 1/5] net: hdlc_fr: Simpify fr_rx by using "goto rx_drop" to drop frames

2020-10-31 Thread Xie He
On Sat, Oct 31, 2020 at 8:18 AM Xie He wrote: > > > Especially without that, I'm not sure this and the follow-on patch add > > much value. Minor code cleanups complicate backports of fixes. > > To me this is necessary, because I feel hard to do any development on > un-cleaned-up code. I really don

Re: [PATCH net-next] net: avoid unneeded UDP L4 and fraglist GSO resegmentation

2020-10-31 Thread Alexander Lobakin
From: Willem de Bruijn Date: Sat, 31 Oct 2020 11:26:24 -0400 I think it is fine to reenable this again, now that UDP sockets will segment unexpected UDP GSO packets that may have looped. We previously added general software support in commit 83aa025f535f ("udp: add gso support

Re: [PATCH bpf-next V5 2/5] bpf: bpf_fib_lookup return MTU value as output when looked up

2020-10-31 Thread David Ahern
On 10/30/20 10:50 AM, Jesper Dangaard Brouer wrote: > The BPF-helpers for FIB lookup (bpf_xdp_fib_lookup and bpf_skb_fib_lookup) > can perform MTU check and return BPF_FIB_LKUP_RET_FRAG_NEEDED. The BPF-prog > don't know the MTU value that caused this rejection. > > If the BPF-prog wants to implem

Re: [PATCH iproute2-next v2 00/11] Add a tool for configuration of DCB

2020-10-31 Thread David Ahern
On 10/30/20 6:29 AM, Petr Machata wrote: > The Linux DCB interface allows configuration of a broad range of > hardware-specific attributes, such as TC scheduling, flow control, per-port > buffer configuration, TC rate, etc. > ... > The patchset proceeds as follows: > > - Many tools in iproute2

  1   2   >