Re: Flaw in "random32: update the net random state on interrupt and activity"

2020-08-11 Thread Sedat Dilek
[ INSTRUCTIONS ] echo 1 > /proc/sys/kernel/sched_schedstats echo prandom_u32 >> /sys/kernel/debug/tracing/set_event echo traceon > /sys/kernel/debug/tracing/events/random/prandom_u32/trigger echo 1 > /sys/kernel/debug/tracing/events/enable /home/dileks/bin/perf record -e random:prandom_u32 -a -g

Re: [PATCH 0/3] Modernize tasklet callback API

2020-08-11 Thread Takashi Iwai
On Tue, 11 Aug 2020 23:33:13 +0200, Kees Cook wrote: > > On Mon, Aug 03, 2020 at 02:16:15PM +0530, Allen wrote: > > Here's the series re-based on top of 5.8 > > https://github.com/allenpais/tasklets/tree/V3 > > Great! > > > Let me know how you would want these to be reviewed. > > Was a Coccinel

[PATCH] brcm: Add 4356 based AP6356S NVRAM for the khadas VIM2

2020-08-11 Thread Jian-Hong Pan
Add a NVRAM file for the wireless module used in khadas VIM2. This source comes from khadas fenix project's commit 022fdc3a1333 ("hwpacks: wlan-firmware: add AP6356S firmware for mainline linux"). [1] [1]: https://github.com/khadas/fenix/commit/022fdc3a1333d2d16f84c2e59e4507c92a668a3d Suggested

Re: [DRAFT PATCH] random32: make prandom_u32() output unpredictable

2020-08-11 Thread Willy Tarreau
lly don't care a single second what kernel it's applied to: https://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/cleanups.git/log/?h=20200811-prandom-1 Willy

Re: [PATCH net] net: accept an empty mask in /sys/class/net/*/queues/rx-*/rps_cpus

2020-08-11 Thread David Ahern
On 8/11/20 9:19 PM, Maciej Żenczykowski wrote: > Before breakage, post fix: > > sfp6:~# echo 0 > /sys/class/net/lo/queues/rx-0/rps_cpus > > With breakage: > lpk17:~# echo 0 > /sys/class/net/lo/queues/rx-0/rps_cpus > -bash: echo: write error: Invalid argument > ah, so this is recent breakage wit

Re: [PATCH net] net: accept an empty mask in /sys/class/net/*/queues/rx-*/rps_cpus

2020-08-11 Thread David Ahern
On 8/11/20 9:16 PM, David Ahern wrote: > On 8/11/20 7:34 PM, Eric Dumazet wrote: >> We must accept an empty mask in store_rps_map(), or we are not able >> to disable RPS on a queue. > > 0 works. Is that not sufficient? > To re-phrase: echo 0 > /sys/class/net/*/queues/rx-*/rps_cpus works to

Re: [PATCH net] net: accept an empty mask in /sys/class/net/*/queues/rx-*/rps_cpus

2020-08-11 Thread David Ahern
On 8/11/20 7:34 PM, Eric Dumazet wrote: > We must accept an empty mask in store_rps_map(), or we are not able > to disable RPS on a queue. 0 works. Is that not sufficient?

[PATCH bpf] tools/bpftool: make skeleton code C++17-friendly by dropping typeof()

2020-08-11 Thread Andrii Nakryiko
Seems like C++17 standard mode doesn't recognize typeof() anymore. This can be tested by compiling test_cpp test with -std=c++17 or -std=c++1z options. The use of typeof in skeleton generated code is unnecessary, all types are well-known at the time of code generation, so remove all typeof()'s to m

Recall: [RFC PATCH bpf-next] bpf: add bpf_get_skb_hash helper function

2020-08-11 Thread Ramamurthy, Harshitha
Ramamurthy, Harshitha would like to recall the message, "[RFC PATCH bpf-next] bpf: add bpf_get_skb_hash helper function".

Re: [PATCH net] drivers/net/wan/x25_asy: Added needed_headroom and a skb->len check

2020-08-11 Thread Xie He
On Tue, Aug 11, 2020 at 10:32 AM David Miller wrote: > > Applied, thank you. Thank you!

[PATCH bpf] bpf: fix XDP FD-based attach/detach logic around XDP_FLAGS_UPDATE_IF_NOEXIST

2020-08-11 Thread Andrii Nakryiko
Enforce XDP_FLAGS_UPDATE_IF_NOEXIST only if new BPF program to be attached is non-NULL (i.e., we are not detaching a BPF program). Reported-by: Stanislav Fomichev Fixes: d4baa9368a5e ("bpf, xdp: Extract common XDP program attachment logic") Signed-off-by: Andrii Nakryiko --- net/core/dev.c | 8

Re: [PATCH net] Revert "vxlan: fix tos value before xmit"

2020-08-11 Thread Hangbin Liu
On Tue, Aug 11, 2020 at 05:02:23PM -0700, David Miller wrote: > From: Hangbin Liu > Date: Thu, 6 Aug 2020 10:52:41 +0800 > > > The rough steps are setting vxlan tunnel on OVS. set inner packet tos to > > 1011 1010 (0xba) and outer vxlan to 1100(0xfc). The outer packet's tos > > should be 0xf

Re: [PATCH net] drivers/net/wan/x25_asy: Added needed_headroom and a skb->len check

2020-08-11 Thread Xie He
On Tue, Aug 11, 2020 at 3:50 AM Willem de Bruijn wrote: > > > I became interested in X.25 when I was trying different address > > families that Linux supported. I tried AF_X25 sockets. And then I > > tried to use the X.25 link layer directly through AF_PACKET. I believe > > both AF_X25 sockets and

Re: [PATCH v4 bpf-next 3/9] bpf, xdp: extract common XDP program attachment logic

2020-08-11 Thread Andrii Nakryiko
On Tue, Aug 11, 2020 at 11:14 AM wrote: > > On 07/21, Andrii Nakryiko wrote: > > Further refactor XDP attachment code. dev_change_xdp_fd() is split into > > two > > parts: getting bpf_progs from FDs and attachment logic, working with > > bpf_progs. This makes attachment logic a bit more straightf

Re: VDPA Debug/Statistics

2020-08-11 Thread Jason Wang
On 2020/8/11 下午7:58, Eli Cohen wrote: On Tue, Aug 11, 2020 at 11:26:20AM +, Eli Cohen wrote: Hi All Currently, the only statistics we get for a VDPA instance comes from the virtio_net device instance. Since VDPA involves hardware acceleration, there can be quite a lot of information tha

Re: KASAN: global-out-of-bounds Read in precalculate_color

2020-08-11 Thread syzbot
syzbot suspects this issue was fixed by commit: commit dfd402a4c4baae42398ce9180ff424d589b8bffc Author: Marco Elver Date: Thu Nov 14 18:02:54 2019 + kcsan: Add Kernel Concurrency Sanitizer infrastructure bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=13eb65d690 start

BUG: mlx5 refcount_t: underflow; use-after-free. (5.7)

2020-08-11 Thread Stephen Hemminger
There appears to be a reference count bug in mlx5 device on hotplug remove. This is reproducible in Debian testing (5.7.0-2-amd64) which is a recent kernel. Environment Windows Server 2019 (Hyper-V) with Linux guest. Remove the SR-IOV option from virtual NIC using GUI and hit apply. This causes ho

Re: [PATCH] net: openvswitch: introduce common code for flushing flows

2020-08-11 Thread Cong Wang
On Mon, Aug 10, 2020 at 6:14 PM wrote: > > From: Tonghao Zhang > > To avoid some issues, for example RCU usage warning, we should > flush the flows under ovs_lock. This patch refactors > table_instance_destroy and introduces table_instance_flow_flush > which can be invoked by __dp_destroy or ovs_

Re: [ovs-discuss] Double free in recent kernels after memleak fix

2020-08-11 Thread Cong Wang
On Mon, Aug 10, 2020 at 10:59 PM Tonghao Zhang wrote: > > On Tue, Aug 11, 2020 at 12:08 PM Cong Wang wrote: > > > > On Mon, Aug 10, 2020 at 8:27 PM Tonghao Zhang > > wrote: > > > > > > On Tue, Aug 11, 2020 at 10:24 AM Cong Wang > > > wrote: > > > > > > > > On Mon, Aug 10, 2020 at 6:16 PM Tong

Re: [PATCH net] Revert "vxlan: fix tos value before xmit"

2020-08-11 Thread David Miller
From: Hangbin Liu Date: Thu, 6 Aug 2020 10:52:41 +0800 > The rough steps are setting vxlan tunnel on OVS. set inner packet tos to > 1011 1010 (0xba) and outer vxlan to 1100(0xfc). The outer packet's tos > should be 0xfe at latest as it inherit the inner ECN bit. But with RT_TOS(tos) > We act

Re: [PATCH net-next 1/1] net/sched: Introduce skb hash classifier

2020-08-11 Thread Cong Wang
On Sun, Aug 9, 2020 at 4:41 PM Jamal Hadi Salim wrote: > > Interesting idea. Note: my experience is that typical setup is > to have only one of those (from offload perspective). Ariel, > are your use cases requiring say both fields? > > From policy perspective, i think above will get more complex

Re: [PATCH] net: Fix potential memory leak in proto_register()

2020-08-11 Thread David Miller
From: Cong Wang Date: Tue, 11 Aug 2020 16:02:51 -0700 >> @@ -3406,6 +3406,16 @@ static void sock_inuse_add(struct net *net, int val) >> } >> #endif >> >> +static void tw_prot_cleanup(struct timewait_sock_ops *twsk_prot) >> +{ >> + if (!twsk_prot) >> + return; >> + kfre

Re: [PATCH] net: Fix potential memory leak in proto_register()

2020-08-11 Thread Cong Wang
On Mon, Aug 10, 2020 at 5:19 AM Miaohe Lin wrote: > > If we failed to assign proto idx, we free the twsk_slab_name but forget to > free the twsk_slab. Add a helper function tw_prot_cleanup() to free these > together and also use this helper function in proto_unregister(). > > Fixes: b45ce32135d1 (

Re: [PATCH net v4 0/2] net: initialize fastreuse on inet_inherit_port

2020-08-11 Thread David Miller
From: Tim Froidcoeur Date: Tue, 11 Aug 2020 20:33:22 +0200 > In the case of TPROXY, bind_conflict optimizations for SO_REUSEADDR or > SO_REUSEPORT are broken, possibly resulting in O(n) instead of O(1) bind > behaviour or in the incorrect reuse of a bind. > > the kernel keeps track for each bind

Re: [PATCH net] net: phy: marvell10g: fix null pointer dereference

2020-08-11 Thread David Miller
From: Marek Behún Date: Mon, 10 Aug 2020 17:01:58 +0200 > Commit c3e302edca24 ("net: phy: marvell10g: fix temperature sensor on 2110") > added a check for PHY ID via phydev->drv->phy_id in a function which is > called by devres at a time when phydev->drv is already set to null by > phy_remove fun

Re: [PATCH] net: Fix potential memory leak in proto_register()

2020-08-11 Thread David Miller
From: Miaohe Lin Date: Mon, 10 Aug 2020 08:16:58 -0400 > If we failed to assign proto idx, we free the twsk_slab_name but forget to > free the twsk_slab. Add a helper function tw_prot_cleanup() to free these > together and also use this helper function in proto_unregister(). > > Fixes: b45ce3213

[bpf PATCH v3 4/5] bpf, selftests: Add tests for sock_ops load with r9, r8.r7 registers

2020-08-11 Thread John Fastabend
Loads in sock_ops case when using high registers requires extra logic to ensure the correct temporary value is used. We need to ensure the temp register does not use either the src_reg or dst_reg. Lets add an asm test to force the logic is triggered. The xlated code is here, 30: (7b) *(u64 *)(r

[bpf PATCH v3 5/5] bpf, selftests: Add tests to sock_ops for loading sk

2020-08-11 Thread John Fastabend
Add tests to directly accesse sock_ops sk field. Then use it to ensure a bad pointer access will fault if something goes wrong. We do three tests: The first test ensures when we read sock_ops sk pointer into the same register that we don't fault as described earlier. Here r9 is chosen as the temp

[bpf PATCH v3 1/5] bpf: sock_ops ctx access may stomp registers in corner case

2020-08-11 Thread John Fastabend
I had a sockmap program that after doing some refactoring started spewing this splat at me: [18610.807284] BUG: unable to handle kernel NULL pointer dereference at 0001 [...] [18610.807359] Call Trace: [18610.807370] ? 0xc114d0d5 [18610.807382] __cgroup_bpf_run_filter_sock_o

[bpf PATCH v3 3/5] bpf, selftests: Add tests for ctx access in sock_ops with single register

2020-08-11 Thread John Fastabend
To verify fix ("bpf: sock_ops ctx access may stomp registers in corner case") we want to force compiler to generate the following code when accessing a field with BPF_TCP_SOCK_GET_COMMON, r1 = *(u32 *)(r1 + 96) // r1 is skops ptr Rather than depend on clang to do this we add the test with in

[bpf PATCH v3 2/5] bpf: sock_ops sk access may stomp registers when dst_reg = src_reg

2020-08-11 Thread John Fastabend
Similar to patch ("bpf: sock_ops ctx access may stomp registers") if the src_reg = dst_reg when reading the sk field of a sock_ops struct we generate xlated code, 53: (61) r9 = *(u32 *)(r9 +28) 54: (15) if r9 == 0x0 goto pc+3 56: (79) r9 = *(u64 *)(r9 +0) This stomps on the r9 reg to do the

[bpf PATCH v3 0/5] Fix sock_ops field read splat

2020-08-11 Thread John Fastabend
Doing some refactoring resulted in a kernel splat when reading sock_ops fields. Patch 1, has the details and proposed fix for sock_ops sk field access. Patch 2, has the details and proposed fix for reading sock_ops->sk field Patch 3, Gives a reproducer and test to verify the fix. I used the netc

Re: [GIT PULL] virtio: features, fixes

2020-08-11 Thread pr-tracker-bot
The pull request you sent on Tue, 11 Aug 2020 04:56:13 -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/57b077939287835b9396a1c3b40d35609cf2fcb8 Thank you! -- Deet-doot-dot, I am a b

Re: [PATCH 0/3] Modernize tasklet callback API

2020-08-11 Thread Kees Cook
On Mon, Aug 03, 2020 at 02:16:15PM +0530, Allen wrote: > Here's the series re-based on top of 5.8 > https://github.com/allenpais/tasklets/tree/V3 Great! > Let me know how you would want these to be reviewed. Was a Coccinelle script used for any of these conversions? I wonder if it'd be easier to

Re: [PATCH ethtool 3/7] ioctl: get rid of signed/unsigned comparison warnings

2020-08-11 Thread Michal Kubecek
On Mon, Aug 10, 2020 at 04:19:24PM +0200, Andrew Lunn wrote: > > - while (arg_num < ctx->argc) { > > + while (arg_num < (unsigned int)ctx->argc) { > > Did you try changing ctx->argc to an unsigned int? I guess there would > be less casts that way, and it is a more logical type for this. > >

Re: [PATCH ethtool 1/7] netlink: get rid of signed/unsigned comparison warnings

2020-08-11 Thread Michal Kubecek
On Mon, Aug 10, 2020 at 04:11:22PM +0200, Andrew Lunn wrote: > On Sun, Aug 09, 2020 at 11:24:19PM +0200, Michal Kubecek wrote: > > Get rid of compiler warnings about comparison between signed and > > unsigned integer values in netlink code. > > > > Signed-off-by: Michal Kubecek > > --- > > netli

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

2020-08-11 Thread Andrew Lunn
On Tue, Aug 11, 2020 at 07:53:35PM +, Asmaa Mnebhi wrote: > Hi Andrew, > > Thanks again for your feedback. > > > > + /* Finally check if this interrupt is from PHY device. > > > + * Return if it is not. > > > + */ > > > + val = readl(priv->gpio_io + > > > + MLXBF_GIGE_GPIO_C

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

2020-08-11 Thread Asmaa Mnebhi
Hi Andrew, Thanks again for your feedback. > > + /* Finally check if this interrupt is from PHY device. > > +* Return if it is not. > > +*/ > > + val = readl(priv->gpio_io + > > + MLXBF_GIGE_GPIO_CAUSE_OR_CAUSE_EVTEN0); > > + if (!(val & priv->phy_int_gpio_mask)) >

[PATCH 1/3] selftests: Add VRF icmp error route lookup test

2020-08-11 Thread Mathieu Desnoyers
From: Michael Jeanson The objective is to check that the incoming vrf routing table is selected to send an ICMP error back to the source when the ttl of a packet reaches 1 while it is forwarded between different vrfs. The first test sends a ping with a ttl of 1 from h1 to h2 and parses the outpu

[PATCH 3/3] ipv6/icmp: l3mdev: Perform icmp error route lookup on source device routing table

2020-08-11 Thread Mathieu Desnoyers
As per RFC4443, the destination address field for ICMPv6 error messages is copied from the source address field of the invoking packet. In configurations with Virtual Routing and Forwarding tables, looking up which routing table to use for sending ICMPv6 error messages is currently done by using t

[PATCH 2/3] ipv4/icmp: l3mdev: Perform icmp error route lookup on source device routing table

2020-08-11 Thread Mathieu Desnoyers
As per RFC792, ICMP errors should be sent to the source host. However, in configurations with Virtual Routing and Forwarding tables, looking up which routing table to use is currently done by using the destination net_device. commit 9d1a6c4ea43e ("net: icmp_route_lookup should use rt dev to deter

Re: [PATCH] selftests: Add VRF icmp error route lookup test

2020-08-11 Thread Mathieu Desnoyers
- On Aug 11, 2020, at 3:14 PM, David Ahern dsah...@gmail.com wrote: > On 8/11/20 1:11 PM, Mathieu Desnoyers wrote: >> One thing I am missing before this series can be considered for upstreaming >> is an Acked-by of the 2 fixes for ipv4 and ipv6 from you, as maintainer >> of l3mdev, if you thin

Re: [PATCH] selftests: Add VRF icmp error route lookup test

2020-08-11 Thread David Ahern
On 8/11/20 1:11 PM, Mathieu Desnoyers wrote: > One thing I am missing before this series can be considered for upstreaming > is an Acked-by of the 2 fixes for ipv4 and ipv6 from you, as maintainer > of l3mdev, if you think the approach I am taking with those fixes makes sense. Send the set, and I

Re: [PATCH] selftests: Add VRF icmp error route lookup test

2020-08-11 Thread Mathieu Desnoyers
- On Aug 11, 2020, at 2:57 PM, David Ahern dsah...@gmail.com wrote: > On 8/11/20 11:28 AM, David Miller wrote: >> From: Michael Jeanson >> Date: Thu, 6 Aug 2020 14:51:21 -0400 >> >>> The objective is to check that the incoming vrf routing table is selected >>> to send an ICMP error back to

Re: [PATCH] selftests: Add VRF icmp error route lookup test

2020-08-11 Thread David Ahern
On 8/11/20 11:28 AM, David Miller wrote: > From: Michael Jeanson > Date: Thu, 6 Aug 2020 14:51:21 -0400 > >> The objective is to check that the incoming vrf routing table is selected >> to send an ICMP error back to the source when the ttl of a packet reaches 1 >> while it is forwarded between d

[PATCH net v4 1/2] net: refactor bind_bucket fastreuse into helper

2020-08-11 Thread Tim Froidcoeur
Refactor the fastreuse update code in inet_csk_get_port into a small helper function that can be called from other places. Acked-by: Matthieu Baerts Signed-off-by: Tim Froidcoeur --- include/net/inet_connection_sock.h | 4 ++ net/ipv4/inet_connection_sock.c| 97

[PATCH net v4 2/2] net: initialize fastreuse on inet_inherit_port

2020-08-11 Thread Tim Froidcoeur
In the case of TPROXY, bind_conflict optimizations for SO_REUSEADDR or SO_REUSEPORT are broken, possibly resulting in O(n) instead of O(1) bind behaviour or in the incorrect reuse of a bind. the kernel keeps track for each bind_bucket if all sockets in the bind_bucket support SO_REUSEADDR or SO_RE

[PATCH net v4 0/2] net: initialize fastreuse on inet_inherit_port

2020-08-11 Thread Tim Froidcoeur
In the case of TPROXY, bind_conflict optimizations for SO_REUSEADDR or SO_REUSEPORT are broken, possibly resulting in O(n) instead of O(1) bind behaviour or in the incorrect reuse of a bind. the kernel keeps track for each bind_bucket if all sockets in the bind_bucket support SO_REUSEADDR or SO_RE

Re: [PATCH net] net: qcom/emac: add missed clk_disable_unprepare in error path of emac_clks_phase1_init

2020-08-11 Thread David Miller
From: Wang Hai Date: Mon, 10 Aug 2020 10:57:05 +0800 > Fix the missing clk_disable_unprepare() before return > from emac_clks_phase1_init() in the error handling case. > > Fixes: b9b17debc69d ("net: emac: emac gigabit ethernet controller driver") > Reported-by: Hulk Robot > Signed-off-by: Wang

Re: [PATCH] ionic_lif: Use devm_kcalloc() in ionic_qcq_alloc()

2020-08-11 Thread David Miller
From: Xu Wang Date: Mon, 10 Aug 2020 02:38:07 + > A multiplication for the size determination of a memory allocation > indicated that an array data structure should be processed. > Thus use the corresponding function "devm_kcalloc". > > Signed-off-by: Xu Wang Applied, thanks.

Re: [PATCH] net/nfc/rawsock.c: add CAP_NET_RAW check.

2020-08-11 Thread David Miller
From: Qingyu Li Date: Mon, 10 Aug 2020 09:51:00 +0800 > When creating a raw AF_NFC socket, CAP_NET_RAW needs to be checked first. > > Signed-off-by: Qingyu Li Applied and queued up for -stable, thank you.

Re: [PATCH net-next v2] hinic: fix strncpy output truncated compile warnings

2020-08-11 Thread David Miller
From: Luo bin Date: Sun, 9 Aug 2020 11:53:49 +0800 > fix the compile warnings of 'strncpy' output truncated before > terminating nul copying N bytes from a string of the same length > > Signed-off-by: Luo bin > Reported-by: kernel test robot Applied.

Mis saludos a ti

2020-08-11 Thread Laura J. Richardson
Hola querido amigo, Soy Laura J. Richardson de los Estados Unidos. Por favor, me gustaría comunicarme con usted. estaré esperando tu respuesta. Laura

Re: [PATCH net] drivers/net/wan/x25_asy: Added needed_headroom and a skb->len check

2020-08-11 Thread David Miller
From: Xie He Date: Sat, 8 Aug 2020 19:35:48 -0700 > 1. Added a skb->len check > > This driver expects upper layers to include a pseudo header of 1 byte > when passing down a skb for transmission. This driver will read this > 1-byte header. This patch added a skb->len check before reading the >

KASAN: wild-memory-access Read in do_ebt_set_ctl

2020-08-11 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:86cfccb6 Merge tag 'dlm-5.9' of git://git.kernel.org/pub/s.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1419de8a90 kernel config: https://syzkaller.appspot.com/x/.config?x=bcf489e08c9b8c5e das

Re: [PATCH] selftests: Add VRF icmp error route lookup test

2020-08-11 Thread David Miller
From: Michael Jeanson Date: Thu, 6 Aug 2020 14:51:21 -0400 > The objective is to check that the incoming vrf routing table is selected > to send an ICMP error back to the source when the ttl of a packet reaches 1 > while it is forwarded between different vrfs. > > The first test sends a ping wi

Re: [PATCH net v3 0/2] net: initialize fastreuse on inet_inherit_port

2020-08-11 Thread David Miller
These patches do not apply cleanly to the current net tree.

Re: [PATCH net 0/2] vsock: fix null pointer dereference and cleanup in vsock_poll()

2020-08-11 Thread David Miller
From: Stefano Garzarella Date: Tue, 11 Aug 2020 11:55:02 +0200 > The first patch fixes a potential null pointer dereference in vsock_poll() > reported by syzbot. > The second patch is a simple cleanup in the same block code. I put this later, > to make it easier to backport the first patch in the

Re: [PATCH] net: openvswitch: introduce common code for flushing flows

2020-08-11 Thread David Miller
From: xiangxia.m@gmail.com Date: Tue, 11 Aug 2020 09:10:01 +0800 > diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c > index 42f8cc70bb2c..5fec47e62615 100644 > --- a/net/openvswitch/datapath.c > +++ b/net/openvswitch/datapath.c > @@ -1756,6 +1756,9 @@ static int ovs_dp_cmd_

Re: [PATCH] net/tls: Fix kmap usage

2020-08-11 Thread David Miller
From: ira.we...@intel.com Date: Mon, 10 Aug 2020 17:02:58 -0700 > From: Ira Weiny > > When MSG_OOB is specified to tls_device_sendpage() the mapped page is > never unmapped. > > Hold off mapping the page until after the flags are checked and the page > is actually needed. > > Signed-off-by: Ir

memory leak in nf_tables_addchain

2020-08-11 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:449dc8c9 Merge tag 'for-v5.9' of git://git.kernel.org/pub/.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=14f8700690 kernel config: https://syzkaller.appspot.com/x/.config?x=4810fa4a53b3aa2c das

memory leak in do_seccomp

2020-08-11 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:449dc8c9 Merge tag 'for-v5.9' of git://git.kernel.org/pub/.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=15d816c290 kernel config: https://syzkaller.appspot.com/x/.config?x=4810fa4a53b3aa2c das

inconsistent lock state in sco_conn_del

2020-08-11 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:f80535b9 Add linux-next specific files for 20200810 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=152ffd8a90 kernel config: https://syzkaller.appspot.com/x/.config?x=2055bd0d83d5ee16 dashboard

KASAN: use-after-free Read in rtl_fw_do_work

2020-08-11 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:449dc8c9 Merge tag 'for-v5.9' of git://git.kernel.org/pub/.. git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing console output: https://syzkaller.appspot.com/x/log.txt?x=16cd1a2690 kernel conf

KASAN: use-after-free Read in ovs_ct_exit

2020-08-11 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:1c3b63f1 net/tls: allow MSG_CMSG_COMPAT in sendmsg git tree: bpf console output: https://syzkaller.appspot.com/x/log.txt?x=105b73fa90 kernel config: https://syzkaller.appspot.com/x/.config?x=7bb894f55faf8242 dashboard link: ht

general protection fault in ip6t_do_table (2)

2020-08-11 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:00e4db51 Merge tag 'perf-tools-2020-08-10' of git://git.ke.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1224746e90 kernel config: https://syzkaller.appspot.com/x/.config?x=64a3282e09356140 das

KASAN: slab-out-of-bounds Read in lock_sock_nested

2020-08-11 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:bfdd5aaa Merge tag 'Smack-for-5.9' of git://github.com/csc.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=167b4d3a90 kernel config: https://syzkaller.appspot.com/x/.config?x=7bb894f55faf8242 das

Re: [PATCH iproute2-rc] rdma: Fix owner name for the kernel resources

2020-08-11 Thread Leon Romanovsky
On Tue, Aug 11, 2020 at 08:54:17AM -0700, Stephen Hemminger wrote: > On Tue, 11 Aug 2020 09:33:04 +0300 > Leon Romanovsky wrote: > > > + print_color_string(PRINT_ANY, COLOR_NONE, "comm", "comm %s ", tmp); > > If you don't want color then just print_string will do the same thing. > > print_

Re: [PATCH AUTOSEL 5.7 03/60] net: mscc: ocelot: fix encoding destination ports into multicast IPv4 address

2020-08-11 Thread Sasha Levin
On Tue, Aug 11, 2020 at 12:01:08AM +0300, Vladimir Oltean wrote: Hi Sasha, On Mon, Aug 10, 2020 at 03:09:31PM -0400, Sasha Levin wrote: From: Vladimir Oltean [ Upstream commit 0897ecf7532577bda3dbcb043ce046a96948889d ] The ocelot hardware designers have made some hacks to support multicast I

Re: VDPA Debug/Statistics

2020-08-11 Thread Roopa Prabhu
On 8/11/20 5:44 AM, Michael S. Tsirkin wrote: External email: Use caution opening links or attachments On Tue, Aug 11, 2020 at 11:58:23AM +, Eli Cohen wrote: On Tue, Aug 11, 2020 at 11:26:20AM +, Eli Cohen wrote: Hi All Currently, the only statistics we get for a VDPA instance come

Re: [RFC] bpf: verifier check for dead branch

2020-08-11 Thread Yonghong Song
On 8/11/20 12:14 AM, Jiri Olsa wrote: On Mon, Aug 10, 2020 at 10:16:12AM -0700, Yonghong Song wrote: SNIP Thanks for the test case. I can reproduce the issue. The following is why this happens in llvm. the pseudo IR code looks like data = skb->data data_end = skb->data_end comp

Re: [PATCH] net/tls: Fix kmap usage

2020-08-11 Thread Jakub Kicinski
On Mon, 10 Aug 2020 17:02:58 -0700 ira.we...@intel.com wrote: > From: Ira Weiny > > When MSG_OOB is specified to tls_device_sendpage() the mapped page is > never unmapped. Nice catch! > Hold off mapping the page until after the flags are checked and the page > is actually needed. We could take

Re: [PATCH iproute2-rc] rdma: Fix owner name for the kernel resources

2020-08-11 Thread Stephen Hemminger
On Tue, 11 Aug 2020 09:33:04 +0300 Leon Romanovsky wrote: > + print_color_string(PRINT_ANY, COLOR_NONE, "comm", "comm %s ", tmp); If you don't want color then just print_string will do the same thing. print_string(PRINT_ANY, "comm", "comm %s ", tmp);

Re: [PATCH] net: eliminate meaningless memcpy to data in pskb_carve_inside_nonlinear()

2020-08-11 Thread Eric Dumazet
On 8/11/20 5:10 AM, linmiaohe wrote: > Eric Dumazet wrote: >> On 8/10/20 5:28 AM, Miaohe Lin wrote: >>> The skb_shared_info part of the data is assigned in the following >>> loop. It is meaningless to do a memcpy here. >>> >> >> Reminder : net-next is CLOSED. >> > > Thanks for your remind. I

Re: [PATCH v2 4.19] tcp: fix TCP socks unreleased in BBR mode

2020-08-11 Thread Eric Dumazet
On 8/11/20 3:37 AM, Jason Xing wrote: > Hi everyone, > > Could anyone take a look at this issue? I believe it is of high-importance. > Though Eric gave the proper patch a few months ago, the stable branch > still hasn't applied or merged this fix. It seems this patch was > forgotten :( Sure,

Re: [PATCH RFC russell-king 3/4] net: phy: marvell10g: change MACTYPE according to phydev->interface

2020-08-11 Thread Russell King - ARM Linux admin
On Tue, Aug 11, 2020 at 12:06:44AM +0200, Marek Behún wrote: > RollBall SFPs contain Marvell 88X3310 PHY, but they have configuration > pins strapped so that MACTYPE is configured in XFI with Rate Matching > mode. > > When these SFPs are inserted into a device which only supports lower > speeds on

Re: [PATCH RFC russell-king 2/4] net: phy: sfp: add support for multigig RollBall modules

2020-08-11 Thread Russell King - ARM Linux admin
On Tue, Aug 11, 2020 at 12:06:43AM +0200, Marek Behún wrote: > This adds support for multigig copper SFP modules from RollBall/Hilink. > These modules have a specific way to access clause 45 registers of the > internal PHY. > > We also need to wait at least 25 seconds after deasserting TX disable

Re: [PATCH RFC russell-king 0/4] Support for RollBall 10G copper SFP modules

2020-08-11 Thread Russell King - ARM Linux admin
On Tue, Aug 11, 2020 at 12:06:41AM +0200, Marek Behún wrote: > Hi Russell, > > this series should apply on linux-arm git repository, on branch > clearfog. > > Some internet providers are already starting to offer 2.5G copper > connectivity to their users. On Turris Omnia the SFP port is capable >

[PATCH] rndis_wlan: tighten check of rndis_query_oid return

2020-08-11 Thread trix
From: Tom Rix clang static analysis reports this problem rndis_wlan.c:3147:25: warning: Assigned value is garbage or undefined wiphy->max_num_pmkids = le32_to_cpu(caps.num_pmkids); ^ The setting of caps happens h

Re: [PATCH bpf] selftests/bpf: fix v4_to_v6 in sk_lookup

2020-08-11 Thread Daniel Borkmann
On 8/8/20 12:38 AM, Stanislav Fomichev wrote: I'm getting some garbage in bytes 8 and 9 when doing conversion from sockaddr_in to sockaddr_in6 (leftover from AF_INET?). Let's explicitly clear the higher bytes. Signed-off-by: Stanislav Fomichev Applied, thanks!

Re: [PATCH net] nfp: update maintainer

2020-08-11 Thread Simon Horman
On Mon, Aug 10, 2020 at 12:11:42PM -0700, David Miller wrote: > From: Jakub Kicinski > Date: Mon, 10 Aug 2020 10:32:04 -0700 > > > I'm not doing much work on the NFP driver any more. > > > > Signed-off-by: Jakub Kicinski > > Applied. Thanks, for the record I'm happy to take this over on beha

Re: [PATCH bpf-next v2] bpf: fix segmentation fault of test_progs

2020-08-11 Thread Daniel Borkmann
On 8/10/20 5:39 PM, Jianlin Lv wrote: test_progs reports the segmentation fault as below $ sudo ./test_progs -t mmap --verbose test_mmap:PASS:skel_open_and_load 0 nsec .. test_mmap:PASS:adv_mmap1 0 nsec test_mmap:PASS:adv_mmap2 0 nsec test_mmap:PASS:adv_mmap3 0 nsec test_mmap:PASS:adv_mmap4

Re: [Linux-kernel-mentees] [PATCH net-next v2] ipvs: Fix uninit-value in do_ip_vs_set_ctl()

2020-08-11 Thread Simon Horman
On Tue, Aug 11, 2020 at 01:29:04PM +0300, Julian Anastasov wrote: > > Hello, > > On Tue, 11 Aug 2020, Peilin Ye wrote: > > > do_ip_vs_set_ctl() is referencing uninitialized stack value when `len` is > > zero. Fix it. > > > > Reported-by: syzbot+23b5f9e7caf61d9a3...@syzkaller.appspotmail.c

Re: VDPA Debug/Statistics

2020-08-11 Thread Michael S. Tsirkin
On Tue, Aug 11, 2020 at 11:58:23AM +, Eli Cohen wrote: > On Tue, Aug 11, 2020 at 11:26:20AM +, Eli Cohen wrote: > > Hi All > > > > Currently, the only statistics we get for a VDPA instance comes from the > > virtio_net device instance. Since VDPA involves hardware acceleration, > > there

Re: [PATCH 0/3] Modernize tasklet callback API

2020-08-11 Thread Allen
Kees, > > > > Here's the series re-based on top of 5.8 > https://github.com/allenpais/tasklets/tree/V3 > > Let me know how you would want these to be reviewed. > I see the first set of infrastructure patches for tasklets have landed in Linus's tree. Good time to send out the ~200 patches? - Al

Re: [PATCH] net: eliminate meaningless memcpy to data in pskb_carve_inside_nonlinear()

2020-08-11 Thread linmiaohe
Eric Dumazet wrote: > On 8/10/20 5:28 AM, Miaohe Lin wrote: >> The skb_shared_info part of the data is assigned in the following >> loop. It is meaningless to do a memcpy here. >> > >Reminder : net-next is CLOSED. > Thanks for your remind. I would wait for it open. >This is not correct. We sti

Re: possible deadlock in dev_mc_unsync

2020-08-11 Thread syzbot
syzbot suspects this issue was fixed by commit: commit be74294ffa24f5fbc0d6643842e3e095447e17a2 Author: Cong Wang Date: Fri Jun 26 18:24:22 2020 + net: get rid of lockdep_set_class_and_subclass() bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=110b0fc290 start commit:

RE: VDPA Debug/Statistics

2020-08-11 Thread Eli Cohen
On Tue, Aug 11, 2020 at 11:26:20AM +, Eli Cohen wrote: > Hi All > > Currently, the only statistics we get for a VDPA instance comes from the > virtio_net device instance. Since VDPA involves hardware acceleration, there > can be quite a lot of information that can be fetched from the underly

Re: [PATCH] net: eliminate meaningless memcpy to data in pskb_carve_inside_nonlinear()

2020-08-11 Thread linmiaohe
Florian Westphal wrote: >Miaohe Lin wrote: >> The skb_shared_info part of the data is assigned in the following loop. > >Where? > It's at the below for (i = 0; i < nfrags; i++) loop. But I missed something as Eric Dumazet pointed out. Sorry about it.

Re: VDPA Debug/Statistics

2020-08-11 Thread Michael S. Tsirkin
On Tue, Aug 11, 2020 at 11:26:20AM +, Eli Cohen wrote: > Hi All > > Currently, the only statistics we get for a VDPA instance comes from the > virtio_net device instance. Since VDPA involves hardware acceleration, there > can be quite a lot of information that can be fetched from the underly

VDPA Debug/Statistics

2020-08-11 Thread Eli Cohen
Hi All Currently, the only statistics we get for a VDPA instance comes from the virtio_net device instance. Since VDPA involves hardware acceleration, there can be quite a lot of information that can be fetched from the underlying device. Currently there is no generic method to fetch this infor

Re: [DRAFT PATCH] random32: make prandom_u32() output unpredictable

2020-08-11 Thread Sedat Dilek
In the previous discussion... "Flaw in "random32: update the net random state on interrupt and activity" ...someone referred to . Someone tested this? Feedback? - Sedat - [0] https://marc.info/?t=15965890352&r=1&w=2 [1] https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/log/?h

Re: [DRAFT PATCH] random32: make prandom_u32() output unpredictable

2020-08-11 Thread Sedat Dilek
[ CC netdev ML ] Hi Willy, in [1] you say: > I've applied it on top of George's patch rebased to mainline for simplicity. > I've used a separate per_cpu noise variable to keep the net_rand_state static > with its __latent_entropy. Can you share this "rebased to mainline" version of George's pat

Re: [PATCH net] drivers/net/wan/x25_asy: Added needed_headroom and a skb->len check

2020-08-11 Thread Willem de Bruijn
> > > 2) The code quality of this driver is actually very low, and I also > > > hope to improve it gradually. Actually this driver had been completely > > > broken for many years and no one had noticed this until I fixed it in > > > commit 8fdcabeac398 (drivers/net/wan/x25_asy: Fix to make it work)

Re: [PATCH v2 4.19] tcp: fix TCP socks unreleased in BBR mode

2020-08-11 Thread Jason Xing
Hi everyone, Could anyone take a look at this issue? I believe it is of high-importance. Though Eric gave the proper patch a few months ago, the stable branch still hasn't applied or merged this fix. It seems this patch was forgotten :( Thanks, Jason On Thu, Jun 4, 2020 at 9:47 PM Jason Xing wr

Re: [Linux-kernel-mentees] [PATCH net-next v2] ipvs: Fix uninit-value in do_ip_vs_set_ctl()

2020-08-11 Thread Julian Anastasov
Hello, On Tue, 11 Aug 2020, Peilin Ye wrote: > do_ip_vs_set_ctl() is referencing uninitialized stack value when `len` is > zero. Fix it. > > Reported-by: syzbot+23b5f9e7caf61d9a3...@syzkaller.appspotmail.com > Link: > https://syzkaller.appspot.com/bug?id=46ebfb92a8a812621a001ef04d90df

Re: [PATCH] vhost: vdpa: remove per device feature whitelist

2020-08-11 Thread Michael S. Tsirkin
On Mon, Jul 20, 2020 at 04:50:43PM +0800, Jason Wang wrote: > We used to have a per device feature whitelist to filter out the > unsupported virtio features. But this seems unnecessary since: > > - the main idea behind feature whitelist is to block control vq > feature until we finalize the cont

[PATCH net 2/2] vsock: small cleanup in vsock_poll()

2020-08-11 Thread Stefano Garzarella
This patch combines nested if statements in a single one to reduce the indentation in vsock_poll(). It also combines an if nested in the else branch. The behavior isn't changed. Signed-off-by: Stefano Garzarella --- net/vmw_vsock/af_vsock.c | 27 --- 1 file changed, 12 i

[PATCH net 0/2] vsock: fix null pointer dereference and cleanup in vsock_poll()

2020-08-11 Thread Stefano Garzarella
The first patch fixes a potential null pointer dereference in vsock_poll() reported by syzbot. The second patch is a simple cleanup in the same block code. I put this later, to make it easier to backport the first patch in the stable branches. Thanks, Stefano Stefano Garzarella (2): vsock: fix

[PATCH net 1/2] vsock: fix potential null pointer dereference in vsock_poll()

2020-08-11 Thread Stefano Garzarella
syzbot reported this issue where in the vsock_poll() we find the socket state at TCP_ESTABLISHED, but 'transport' is null: general protection fault, probably for non-canonical address 0xdc12: [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0090-0x0

  1   2   >