Re: [PATCH 0/3] Check gso_size of packets when forwarding

2018-01-18 Thread Pravin Shelar
On Thu, Jan 18, 2018 at 5:28 PM, Daniel Axtens wrote: > Pravin Shelar writes: > >> On Thu, Jan 18, 2018 at 5:08 AM, Daniel Axtens wrote: >>> Pravin Shelar writes: >>> On Mon, Jan 15, 2018 at 6:09 PM, Daniel Axtens

[PATCH V2 net-next 1/4] net: hns3: add support for get_regs

2018-01-18 Thread Peng Li
From: Fuyun Liang This patch adds get_regs support for ethtool cmd. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 3 +-

[PATCH V2 net-next 2/4] net: hns3: add manager table initialization for hardware

2018-01-18 Thread Peng Li
From: Fuyun Liang The manager table is empty by default. If it is not initialized, the management pkgs like LLDP will be dropped by hardware. Default entries need to be added to manager table. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li

[PATCH V2 net-next 0/4] add some features to hns3 driver

2018-01-18 Thread Peng Li
This patchset adds some features to hns3 driver, include the support for ethtool command -d, -p and support for manager table. [Patch 1/4] adds support for ethtool command -d, its ops is get_regs. driver will send command to command queue, and get regs number and regs value from command queue.

[PATCH V2 net-next 4/4] net: hns3: add net status led support for fiber port

2018-01-18 Thread Peng Li
From: Jian Shen Check the net status per second, include port speed, total rx/tx packets and link status. Updating the led status for fiber port. Signed-off-by: Jian Shen Signed-off-by: Peng Li ---

[PATCH V2 net-next 3/4] net: hns3: add ethtool -p support for fiber port

2018-01-18 Thread Peng Li
From: Jian Shen Add led location support for fiber port. The led will keep blinking when locating. Signed-off-by: Jian Shen Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 2 +

Re: [PATCH 0/3] Check gso_size of packets when forwarding

2018-01-18 Thread Daniel Axtens
Daniel Axtens writes: > Pravin Shelar writes: > >> On Thu, Jan 18, 2018 at 5:08 AM, Daniel Axtens wrote: >>> Pravin Shelar writes: >>> On Mon, Jan 15, 2018 at 6:09 PM, Daniel Axtens wrote: > When

Re: [RFC PATCH] e1000e: Remove Other from EIAC.

2018-01-18 Thread Benjamin Poirier
On 2018/01/18 18:42, Shrikrishna Khare wrote: > > > On Thu, 18 Jan 2018, Benjamin Poirier wrote: > > > On 2018/01/18 15:50, Benjamin Poirier wrote: > > > It was reported that emulated e1000e devices in vmware esxi 6.5 Build > > > 7526125 do not link up after commit 4aea7a5c5e94 ("e1000e: Avoid

Re: [PATCH iproute2] devlink: Ignore unknown attributes

2018-01-18 Thread David Ahern
On 1/17/18 5:28 AM, Arkadi Sharshevsky wrote: > In case of extending the UAPI old packages would break. > > Signed-off-by: Arkadi Sharshevsky > --- > devlink/devlink.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/devlink/devlink.c

Re: iscsi target regression due to "tcp: remove prequeue support" patch

2018-01-18 Thread Mike Christie
On 01/18/2018 09:10 AM, Florian Westphal wrote: >> It would indicate users providing their own ->sk_data_ready() callback >> must be responsible for waking up a kthread context blocked on >> sock_recvmsg(..., MSG_WAITALL), when a second ->sk_data_ready() is >> received before the first

[PATCH net] net: qdisc_pkt_len_init() should be more robust

2018-01-18 Thread Eric Dumazet
From: Eric Dumazet Without proper validation of DODGY packets, we might very well feed qdisc_pkt_len_init() with invalid GSO packets. tcp_hdrlen() might access out-of-bound data, so let's use skb_header_pointer() and proper checks. Whole story is described in commit

Re: [PATCH-next] flow_netlink: Remove unneeded semicolons

2018-01-18 Thread Christopher Díaz Riveros
El jue, 18-01-2018 a las 16:25 -0500, David Miller escribió: > From: Christopher Díaz Riveros > Date: Wed, 17 Jan 2018 16:10:28 -0500 > > > Trivial fix removes unneeded semicolons after if blocks. > > > > This issue was detected by using the Coccinelle software. > > > >

Re: [RFC][PATCH] get rid of the use of set_fs() (by way of kernel_recvmsg()) in sunrpc

2018-01-18 Thread Al Viro
On Thu, Jan 18, 2018 at 07:31:56PM +, Al Viro wrote: > * SIOCADDRT/SIOCDELRT in compat ioctls To bring back a question I'd asked back in October - what do we do about SIOC...RT compat? To recap: * AF_INET sockets expect struct rtentry; it differs between 32bit and 64bit, so

Re: [RFC PATCH] e1000e: Remove Other from EIAC.

2018-01-18 Thread Shrikrishna Khare
On Thu, 18 Jan 2018, Benjamin Poirier wrote: > On 2018/01/18 15:50, Benjamin Poirier wrote: > > It was reported that emulated e1000e devices in vmware esxi 6.5 Build > > 7526125 do not link up after commit 4aea7a5c5e94 ("e1000e: Avoid receiver > > overrun interrupt bursts", v4.15-rc1). Some

Re: [PATCH net-next 3/5] net: hns3: add ethtool -p support for phy device

2018-01-18 Thread lipeng (Y)
On 2018/1/18 22:25, Andrew Lunn wrote: +static int hclge_set_led_status_phy(struct phy_device *phydev, int value) +{ + int ret, cur_page; + + mutex_lock(>lock); + + ret = phy_read(phydev, HCLGE_PHY_PAGE_REG); + if (ret < 0) + goto out; + else +

[GIT] Networking

2018-01-18 Thread David Miller
Merge tag 'linux-can-fixes-for-4.15-20180118' of ssh://gitolite.kernel.org/.../mkl/linux-can Eric Dumazet (2): bpf: fix divides by zero flow_dissector: properly cap thoff field Guenter Roeck (1): bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets Ido Schimmel (1):

Re: [PATCH net v2] ibmvnic: Fix IPv6 packet descriptors

2018-01-18 Thread David Miller
From: Thomas Falcon Date: Thu, 18 Jan 2018 19:29:48 -0600 > Packet descriptor generation for IPv6 is broken. > Properly set L3 and L4 protocol flags for IPv6 descriptors. > > Signed-off-by: Thomas Falcon > --- > Changes in v2: > -keep

Re: [PATCH net] ibmvnic: Fix IP offload control buffer

2018-01-18 Thread David Miller
From: Thomas Falcon Date: Thu, 18 Jan 2018 19:05:01 -0600 > Set some missing fields in the IP control offload buffer. This buffer is > used to enable checksum and TCP segmentation offload in the VNIC server. > The buffer length field and the checksum offloading bits

Re: pull-request: can 2018-01-18

2018-01-18 Thread David Miller
From: Marc Kleine-Budde Date: Thu, 18 Jan 2018 11:15:05 +0100 > this is a pull reqeust of two patches for net/master: > > The syzkaller project triggered two WARN_ONCE() in the af_can code from > userspace and we decided to replace it by a pr_warn_once(). Pulled, thanks

Re: [PATCH net] ipv6: don't let tb6_root node share routes with other node

2018-01-18 Thread David Miller
From: Wei Wang Date: Thu, 18 Jan 2018 10:40:03 -0800 > From: Wei Wang > > After commit 4512c43eac7e, if we add a route to the subtree of tb6_root > which does not have any route attached to it yet, the current code will > let tb6_root and the node in the

Re: [patch 1/1] net/sched/sch_prio.c: work around gcc-4.4.4 union initializer issues

2018-01-18 Thread David Miller
From: a...@linux-foundation.org Date: Thu, 18 Jan 2018 16:30:49 -0800 > From: Andrew Morton > Subject: net/sched/sch_prio.c: work around gcc-4.4.4 union initializer issues > > gcc-4.4.4 has problems witn anon union initializers. Work around this. > >

Re: [PATCH net v2] ip6_gre: init dev->mtu and dev->hard_header_len correctly

2018-01-18 Thread David Miller
From: Alexey Kodanev Date: Thu, 18 Jan 2018 20:51:12 +0300 > Commit b05229f44228 ("gre6: Cleanup GREv6 transmit path, > call common GRE functions") moved dev->mtu initialization > from ip6gre_tunnel_setup() to ip6gre_tunnel_init(), as a > result, the previously set

Re: [patch net] mlxsw: spectrum_router: Free LPM tree upon failure

2018-01-18 Thread David Miller
From: Jiri Pirko Date: Thu, 18 Jan 2018 15:42:10 +0100 > From: Ido Schimmel > > When a new LPM tree is created, we try to replace the trees in the > existing virtual routers with it. If we fail, the tree needs to be > freed. > > Currently, this does not

Re: [PATCH] bridge: return boolean instead of integer in br_multicast_is_router

2018-01-18 Thread Gustavo A. R. Silva
Quoting Stephen Hemminger : On Thu, 18 Jan 2018 17:37:45 -0600 "Gustavo A. R. Silva" wrote: Return statements in functions returning bool should use true/false instead of 1/0. This issue was detected with the help of Coccinelle.

[PATCH net v2] ibmvnic: Fix IPv6 packet descriptors

2018-01-18 Thread Thomas Falcon
Packet descriptor generation for IPv6 is broken. Properly set L3 and L4 protocol flags for IPv6 descriptors. Signed-off-by: Thomas Falcon --- Changes in v2: -keep declarations in reverse xmas tree format -Fix whitespace errors drivers/net/ethernet/ibm/ibmvnic.c |

Re: [PATCH 0/3] Check gso_size of packets when forwarding

2018-01-18 Thread Daniel Axtens
Pravin Shelar writes: > On Thu, Jan 18, 2018 at 5:08 AM, Daniel Axtens wrote: >> Pravin Shelar writes: >> >>> On Mon, Jan 15, 2018 at 6:09 PM, Daniel Axtens wrote: When regular packets are forwarded, we validate their

Re: net: r8169: a question of memory barrier in the r8169 driver

2018-01-18 Thread Jia-Ju Bai
On 2018/1/19 9:11, Francois Romieu wrote: Jia-Ju Bai : [...] The function rtl8169_start_xmit reads tp->dirty_tx in TX_FRAGS_READY_FOR: if (unlikely(!TX_FRAGS_READY_FOR(tp, skb_shinfo(skb)->nr_frags))) { netif_err(tp, drv, dev, "BUG! Tx Ring full when

Re: net: r8169: a question of memory barrier in the r8169 driver

2018-01-18 Thread Francois Romieu
Jia-Ju Bai : [...] > The function rtl8169_start_xmit reads tp->dirty_tx in TX_FRAGS_READY_FOR: > if (unlikely(!TX_FRAGS_READY_FOR(tp, skb_shinfo(skb)->nr_frags))) { > netif_err(tp, drv, dev, "BUG! Tx Ring full when queue awake!\n"); > goto err_stop_0; >

Re: net: r8169: a question of memory barrier in the r8169 driver

2018-01-18 Thread Francois Romieu
Peter Zijlstra : [...] > There is only 1 variable afaict. Memory barriers need at least 2 in > order to be able to do _anything_. I don't get your point: why don't {cur_tx, dirty_tx} qualify as said two variables ? -- Ueimor

Re: [PATCH net] ibmvnic: Fix IPv6 packet descriptors

2018-01-18 Thread Thomas Falcon
On 01/18/2018 07:05 PM, Thomas Falcon wrote: > Packet descriptor generation for IPv6 is broken. > Properly set L3 and L4 protocol flags for IPv6 descriptors. > > Signed-off-by: Thomas Falcon Sorry! Forgot to check for formatting. Please ignore this patch. > --- >

[PATCH net] ibmvnic: Fix IP offload control buffer

2018-01-18 Thread Thomas Falcon
Set some missing fields in the IP control offload buffer. This buffer is used to enable checksum and TCP segmentation offload in the VNIC server. The buffer length field and the checksum offloading bits were not set properly, so fix that here. Signed-off-by: Thomas Falcon

[PATCH net] ibmvnic: Fix IPv6 packet descriptors

2018-01-18 Thread Thomas Falcon
Packet descriptor generation for IPv6 is broken. Properly set L3 and L4 protocol flags for IPv6 descriptors. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff

linux-next: manual merge of the net-next tree with the net tree

2018-01-18 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: kernel/bpf/verifier.c between commit: 6f16101e6a8b ("bpf: mark dst unknown on inconsistent {s, u}bounds adjustments") from the net tree and commit: f4d7e40a5b71 ("bpf: introduce function calls (verification)")

Re: KASAN: slab-out-of-bounds Read in __dev_queue_xmit

2018-01-18 Thread Eric Dumazet
On Thu, 2018-01-18 at 15:58 -0800, syzbot wrote: > Hello, > > syzbot hit the following crash on linux-next commit > 0e08c463db387a2adcb0243b15ab868a73f87807 > > So far this crash happened 6 times on linux-next, mmots, upstream. > C reproducer is attached. > syzkaller reproducer is attached. >

Re: [PATCH net] net: validate untrusted gso packets

2018-01-18 Thread Willem de Bruijn
>>> This implements subset of function for codes which was removed by the >>> commit >>> I mentioned below. >> >> No, as I explain above, it performs a different check. >> > > > [...] Clearly I was wrong, sorry. Thanks for pointing out that commit and 576a30eb6453 ("[NET]: Added GSO header

[PATCH] selftests: bpf: update .gitignore with missing generated files

2018-01-18 Thread Shuah Khan
Update .gitignore with missing generated files. Signed-off-by: Shuah Khan --- tools/testing/selftests/bpf/.gitignore | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tools/testing/selftests/bpf/.gitignore b/tools/testing/selftests/bpf/.gitignore index

Re: [PATCH iproute2 v2 0/9] ip/tunnel: Improve tunnel parameters printing

2018-01-18 Thread Stephen Hemminger
On Thu, 18 Jan 2018 16:04:27 +0200 Serhey Popovych wrote: > Continue improvements to tunnel modules. Final goal > is to make merge IP and IPv6 variants and make that > transition as transparent as possible. > > Everything within this series is open for your comments, >

Re: [PATCH iproute2] devlink: Ignore unknown attributes

2018-01-18 Thread Stephen Hemminger
On Wed, 17 Jan 2018 15:28:00 +0200 Arkadi Sharshevsky wrote: > In case of extending the UAPI old packages would break. > > Signed-off-by: Arkadi Sharshevsky Looks like good future proofing. Applied.

[patch 1/1] net/sched/sch_prio.c: work around gcc-4.4.4 union initializer issues

2018-01-18 Thread akpm
From: Andrew Morton Subject: net/sched/sch_prio.c: work around gcc-4.4.4 union initializer issues gcc-4.4.4 has problems witn anon union initializers. Work around this. net/sched/sch_prio.c: In function 'prio_dump_offload': net/sched/sch_prio.c:260: error: unknown

Re: [PATCH iproute2] iplink: Fix "alias" parameter length calculations

2018-01-18 Thread Stephen Hemminger
On Thu, 18 Jan 2018 16:24:40 +0200 Serhey Popovych wrote: > We need NEXT_ARG() to get *argv pointing to "alias" > parameter value. Overwise we get and check "alias" > string length. > > Fixes: f88becf35e08 ("iplink: Process "alias" parameter correctly") >

Re: [PATCH net] gso: validate gso_type if SKB_GSO_DODGY

2018-01-18 Thread Willem de Bruijn
> Okay, I'm working on a patch that adds explicit checks Sent: http://patchwork.ozlabs.org/patch/863237/ > > @@ -45,6 +45,9 @@ static struct sk_buff *sctp_gso_segment(struct sk_buff > *skb, > struct sk_buff *segs = ERR_PTR(-EINVAL); > struct sctphdr *sh; > > + if

Re: [PATCH] bridge: return boolean instead of integer in br_multicast_is_router

2018-01-18 Thread Stephen Hemminger
On Thu, 18 Jan 2018 17:37:45 -0600 "Gustavo A. R. Silva" wrote: > Return statements in functions returning bool should use > true/false instead of 1/0. > > This issue was detected with the help of Coccinelle. > > Signed-off-by: Gustavo A. R. Silva

[PATCH net v2] gso: validate gso_type if SKB_GSO_DODGY

2018-01-18 Thread Willem de Bruijn
From: Willem de Bruijn Validate gso_type during segmentation as SKB_GSO_DODGY sources may pass packets where the gso_type does not match the contents. Syzkaller was able to enter the SCTP gso handler with a packet of gso_type SKB_GSO_TCPV4. On entry of transport layer gso

[PATCH] bridge: return boolean instead of integer in br_multicast_is_router

2018-01-18 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true/false instead of 1/0. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- net/bridge/br_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] netfilter: return booleans instead of integers

2018-01-18 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true/false instead of 1/0. These issues were detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- net/netfilter/nf_conncount.c | 2 +- net/netfilter/xt_hashlimit.c | 2 +-

Re: [PATCH 2/3] net: is_skb_forwardable: validate length of GSO packet segments

2018-01-18 Thread Marcelo Ricardo Leitner
On Tue, Jan 16, 2018 at 01:09:19PM +1100, Daniel Axtens wrote: > is_skb_forwardable attempts to detect if a packet is too large to > be sent to the destination device. However, this test does not > consider GSO packets, and it is possible that a GSO packet, when > resegmented, will be larger than

[PATCH bpf-next v6 3/4] libbpf: add missing SPDX-License-Identifier

2018-01-18 Thread Eric Leblond
Signed-off-by: Eric Leblond Acked-by: Alexei Starovoitov --- tools/lib/bpf/bpf.c| 2 ++ tools/lib/bpf/bpf.h| 2 ++ tools/lib/bpf/libbpf.c | 2 ++ tools/lib/bpf/libbpf.h | 2 ++ 4 files changed, 8 insertions(+) diff --git a/tools/lib/bpf/bpf.c

[PATCH bpf-next v6 4/4] samples/bpf: use bpf_set_link_xdp_fd

2018-01-18 Thread Eric Leblond
Use bpf_set_link_xdp_fd instead of set_link_xdp_fd to remove some code duplication and benefit of netlink ext ack errors message. Signed-off-by: Eric Leblond --- samples/bpf/bpf_load.c | 102 samples/bpf/bpf_load.h |

Re: [PATCH net] ipv6: don't let tb6_root node share routes with other node

2018-01-18 Thread Martin KaFai Lau
On Thu, Jan 18, 2018 at 03:31:29PM -0800, Wei Wang wrote: > On Thu, Jan 18, 2018 at 2:47 PM, Martin KaFai Lau wrote: > > On Thu, Jan 18, 2018 at 10:40:03AM -0800, Wei Wang wrote: > >> From: Wei Wang > >> > >> After commit 4512c43eac7e, if we add a route to the

[PATCH bpf-next 0/4] libbpf: add XDP binding support

2018-01-18 Thread Eric Leblond
Hello, This patchset rebases the libbpf code on latest bpf-next code and addresses remarks by Daniel. Best regards, -- Eric Leblond

[PATCH bpf-next v6 2/4] libbpf: add error reporting in XDP

2018-01-18 Thread Eric Leblond
Parse netlink ext attribute to get the error message returned by the card. Code is partially take from libnl. Signed-off-by: Eric Leblond Acked-by: Alexei Starovoitov --- samples/bpf/Makefile | 2 +- tools/lib/bpf/Build| 2 +- tools/lib/bpf/bpf.c|

[PATCH bpf-next v6 1/4] libbpf: add function to setup XDP

2018-01-18 Thread Eric Leblond
Most of the code is taken from set_link_xdp_fd() in bpf_load.c and slightly modified to be library compliant. Signed-off-by: Eric Leblond Acked-by: Alexei Starovoitov --- tools/lib/bpf/bpf.c| 126 +

Re: [PATCH bpf-next v5 2/4] libbpf: add error reporting in XDP

2018-01-18 Thread Eric Leblond
Hi, Sorry for the delay, missed the mail. On Sat, 2018-01-06 at 22:16 +0100, Daniel Borkmann wrote: > On 01/04/2018 09:21 AM, Eric Leblond wrote: > > Parse netlink ext attribute to get the error message returned by > > the card. Code is partially take from libnl. > > > > Signed-off-by: Eric

[PATCH] smc: return boolean instead of integer in using_ipsec

2018-01-18 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true/false instead of 1/0. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- net/smc/smc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH bpf] bpf: fix 32-bit divide by zero

2018-01-18 Thread Daniel Borkmann
On 01/18/2018 11:40 PM, Alexei Starovoitov wrote: > On 1/18/18 2:30 PM, Eric Dumazet wrote: >> On Fri, 2018-01-12 at 18:59 -0800, Alexei Starovoitov wrote: >>> due to some JITs doing if (src_reg == 0) check in 64-bit mode >>> for div/mod opreations mask upper 32-bits of src register >>> before

Re: [PATCH net] ipv6: don't let tb6_root node share routes with other node

2018-01-18 Thread Wei Wang
On Thu, Jan 18, 2018 at 2:47 PM, Martin KaFai Lau wrote: > On Thu, Jan 18, 2018 at 10:40:03AM -0800, Wei Wang wrote: >> From: Wei Wang >> >> After commit 4512c43eac7e, if we add a route to the subtree of tb6_root >> which does not have any route attached to it

Re: [PATCH RFC net-next 1/6] sock: MSG_PEEK support for sk_error_queue

2018-01-18 Thread Willem de Bruijn
On Thu, Jan 18, 2018 at 6:20 PM, Sowmini Varadhan wrote: > On (01/18/18 18:09), Willem de Bruijn wrote: >> If that is true in general for PF_RDS, then it is a reasonable approach. >> How about treating it as a (follow-on) optimization path. Opportunistic >>

Re: [PATCH RFC net-next 1/6] sock: MSG_PEEK support for sk_error_queue

2018-01-18 Thread Sowmini Varadhan
On (01/18/18 18:09), Willem de Bruijn wrote: > If that is true in general for PF_RDS, then it is a reasonable approach. > How about treating it as a (follow-on) optimization path. Opportunistic > piggybacking of notifications on data reads is more widely applicable. sounds good. > > that's

[PATCH net-next v2] net: stmmac: Fix reception of Broadcom switches tags

2018-01-18 Thread Florian Fainelli
Broadcom tags inserted by Broadcom switches put a 4 byte header after the MAC SA and before the EtherType, which may look like some sort of 0 length LLC/SNAP packet (tcpdump and wireshark do think that way). With ACS enabled in stmmac the packets were truncated to 8 bytes on reception, whereas

[PATCH bpf-next 0/2] bpf: implement MAP_GET_NEXT_KEY command for LPM_TRIE map

2018-01-18 Thread Yonghong Song
This patch set implements MAP_GET_NEXT_KEY command for LPM_TRIE map. This command is really useful for key enumeration, and for key deletion if what keys in the trie are unknown. Patch #1 implements the functionality in the kernel and patch #2 adds a test case in tools/testing/selftests/bpf.

[PATCH bpf-next 1/2] bpf: implement MAP_GET_NEXT_KEY command for LPM_TRIE map

2018-01-18 Thread Yonghong Song
Current LPM_TRIE map type does not implement MAP_GET_NEXT_KEY command. This command is handy when users want to enumerate keys. Otherwise, a different map which supports key enumeration may be required to store the keys. If the map data is sparse and all map data are to be deleted without closing

Re: [PATCH RFC net-next 1/6] sock: MSG_PEEK support for sk_error_queue

2018-01-18 Thread Willem de Bruijn
On Thu, Jan 18, 2018 at 6:03 PM, Sowmini Varadhan wrote: > On (01/18/18 17:54), Willem de Bruijn wrote: >> > 2. If we have the option of passing completion-notification up as ancillary >> >data on the pollin/recvmsg channel itself (instead of MSG_ERRQUEUE) >> >>

[PATCH bpf-next 2/2] tools/bpf: add a testcase for MAP_GET_NEXT_KEY command of LPM_TRIE map

2018-01-18 Thread Yonghong Song
A test case is added in tools/testing/selftests/bpf/test_lpm_map.c for MAP_GET_NEXT_KEY command. A four node trie, which is described in kernel/bpf/lpm_trie.c, is built and the MAP_GET_NEXT_KEY results are checked. Signed-off-by: Yonghong Song ---

It's all about 14

2018-01-18 Thread Facebook Int'l
Hello , facebook is given out 14,000,000.USD (Fourteen Million Dollars) its all about 14 Please, respond with your Unique Code (FB/BF14-13M5250UD) using your registration email, to the Verification Department at; dustinmoskovitz.faceb...@gmail.com Dustin Moskovitz Facebook Team Copyright

Re: [PATCH RFC net-next 1/6] sock: MSG_PEEK support for sk_error_queue

2018-01-18 Thread Sowmini Varadhan
On (01/18/18 17:54), Willem de Bruijn wrote: > > 2. If we have the option of passing completion-notification up as ancillary > >data on the pollin/recvmsg channel itself (instead of MSG_ERRQUEUE) > > This assumes a somewhat symmetric workload, where there are enough recv > calls to reap the

Re: [PATCHv3 net-next 7/7] net: sched: cls_u32: add extack support

2018-01-18 Thread Alexander Aring
Hi, On Thu, Jan 18, 2018 at 11:51 AM, Jiri Pirko wrote: > Thu, Jan 18, 2018 at 05:20:55PM CET, ar...@mojatatu.com wrote: >>This patch adds extack support for the u32 classifier as example for >>delete and init callback. >> >>Cc: David Ahern >>Signed-off-by:

Re: [PATCH RFC net-next 1/6] sock: MSG_PEEK support for sk_error_queue

2018-01-18 Thread Willem de Bruijn
On Thu, Jan 18, 2018 at 12:12 PM, Sowmini Varadhan wrote: > On (01/18/18 08:53), Eric Dumazet wrote: >> >> The thing is : MSG_PEEK 'support' will also need SO_PEEK_OFF support. > > sure, I'll drop the MSG_PEEK idea (which I wasnt very thrilled > about anyway) > >> So

Re: [PATCH RFC net-next 5/6] rds: support for zcopy completion notification

2018-01-18 Thread Willem de Bruijn
>> This changes the semantics of these fields. Please add a new SO_EE_CODE flag, >> even if the semantics can be derived from the packet family (for now). > > sounds good, I'll take care of this (and other review comments) > for the next rev. > >> Even better would be if we can avoid the cookies

Re: [PATCH net] ipv6: don't let tb6_root node share routes with other node

2018-01-18 Thread Martin KaFai Lau
On Thu, Jan 18, 2018 at 10:40:03AM -0800, Wei Wang wrote: > From: Wei Wang > > After commit 4512c43eac7e, if we add a route to the subtree of tb6_root > which does not have any route attached to it yet, the current code will > let tb6_root and the node in the subtree share the

Re: [PATCH bpf] bpf: fix 32-bit divide by zero

2018-01-18 Thread Alexei Starovoitov
On 1/18/18 2:30 PM, Eric Dumazet wrote: On Fri, 2018-01-12 at 18:59 -0800, Alexei Starovoitov wrote: due to some JITs doing if (src_reg == 0) check in 64-bit mode for div/mod opreations mask upper 32-bits of src register before doing the check Is the plan to fix JIT, and if they can all be

Re: [PATCH bpf] bpf: fix 32-bit divide by zero

2018-01-18 Thread Eric Dumazet
On Fri, 2018-01-12 at 18:59 -0800, Alexei Starovoitov wrote: > due to some JITs doing if (src_reg == 0) check in 64-bit mode > for div/mod opreations mask upper 32-bits of src register > before doing the check > Is the plan to fix JIT, and if they can all be fixed, revert this patch ? x86 patch

[PATCH net v2 3/3] ibmvnic: Allocate and request vpd in init_resources

2018-01-18 Thread John Allen
In reset events in which our memory allocations need to be reallocated, VPD data is being freed, but never reallocated. This can cause issues if we later attempt to access that memory or reset and attempt to free the memory. This patch moves the allocation of the VPD data to init_resources so that

[PATCH net v2 2/3] ibmvnic: Revert to previous mtu when unsupported value requested

2018-01-18 Thread John Allen
If we request an unsupported mtu value, the vnic server will suggest a different value. Currently we take the suggested value without question and login with that value. However, the behavior doesn't seem completely sane as attempting to change the mtu to some specific value will change the mtu to

[PATCH net v2 1/3] ibmvnic: Modify buffer size and number of queues on failover

2018-01-18 Thread John Allen
Using newer backing devices can cause the required padding at the end of buffer as well as the number of queues to change after a failover. Since we currently assume that these values never change, after a failover to a backing device with different capabilities, we can get errors from the vnic

[PATCH net v2 0/3] ibmvnic: Reset behavior fixes

2018-01-18 Thread John Allen
This patchset fixes a number of issues related to ibmvnic reset uncovered from testing new Power9 machines with Everglades adapters and the new functionality to change mtu and other parameters in the driver. Changes since v1: -In patch 1/3, added the line to free the long term buffers before

Re: [pull request bpf-next 0/8] bpf: offload: array maps, reporting and test

2018-01-18 Thread Daniel Borkmann
On 01/18/2018 04:13 AM, Jakub Kicinski wrote: > Hi! > > This set bring in the rest of map offload code held up by urgent > fixes and improvements to the BPF arrays. > > The first 3 patches take care of array map offload, similarly to > hash maps the attribute validation is split out to a

[PATCHv4 net-next 2/2] openvswitch: add erspan version I and II support

2018-01-18 Thread William Tu
The patch adds support for openvswitch to configure erspan v1 and v2. The OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS attr is added to uapi as a nested attribute to support all ERSPAN v1 and v2's fields. Note taht Previous commit "openvswitch: Add erspan tunnel support." was reverted since it does not

[PATCHv4 net-next 1/2] net: erspan: use bitfield instead of mask and offset

2018-01-18 Thread William Tu
Originally the erspan fields are defined as a group into a __be16 field, and use mask and offset to access each field. This is more costly due to calling ntohs/htons. The patch changes it to use bitfields. Signed-off-by: William Tu --- include/net/erspan.h | 127

[PATCHv4 net-next 0/2] net: erspan: add support for openvswitch

2018-01-18 Thread William Tu
The first patch refactors the erspan header definitions. Originally, the erspan fields are defined as a group into a __be16 field, and use mask and offset to access each field. This is more costly due to calling ntohs/htons and error-prone. The first patch changes it to use bitfields. The

Re: [PATCH 0/3] Check gso_size of packets when forwarding

2018-01-18 Thread Pravin Shelar
On Thu, Jan 18, 2018 at 5:08 AM, Daniel Axtens wrote: > Pravin Shelar writes: > >> On Mon, Jan 15, 2018 at 6:09 PM, Daniel Axtens wrote: >>> When regular packets are forwarded, we validate their size against the >>> MTU of the destination

Re: [PATCH bpf-next 4/8] bpf: offload: report device information about offloaded maps

2018-01-18 Thread Alexei Starovoitov
On Wed, Jan 17, 2018 at 07:13:28PM -0800, Jakub Kicinski wrote: > Tell user space about device on which the map was created. > Unfortunate reality of user ABI makes sharing this code > with program offload difficult but the information is the > same. > > Signed-off-by: Jakub Kicinski

Re: [PATCH v2 00/19] prevent bounds-check bypass via speculative execution

2018-01-18 Thread Laurent Pinchart
Hi Will, On Thursday, 18 January 2018 19:05:47 EET Will Deacon wrote: > On Thu, Jan 18, 2018 at 08:58:08AM -0800, Dan Williams wrote: > > On Thu, Jan 18, 2018 at 5:18 AM, Will Deacon wrote: > >> On Thu, Jan 11, 2018 at 05:41:08PM -0800, Dan Williams wrote: > >>> On Thu, Jan 11, 2018 at 5:19 PM,

Re: [PATCH 27/38] sctp: Copy struct sctp_sock.autoclose to userspace using put_user()

2018-01-18 Thread Kees Cook
On Thu, Jan 18, 2018 at 1:31 PM, Laura Abbott wrote: > On 01/10/2018 06:02 PM, Kees Cook wrote: >> >> From: David Windsor >> >> The autoclose field can be copied with put_user(), so there is no need to >> use copy_to_user(). In both cases, hardened usercopy

Re: [PATCH 27/38] sctp: Copy struct sctp_sock.autoclose to userspace using put_user()

2018-01-18 Thread Laura Abbott
On 01/10/2018 06:02 PM, Kees Cook wrote: From: David Windsor The autoclose field can be copied with put_user(), so there is no need to use copy_to_user(). In both cases, hardened usercopy is being bypassed since the size is constant, and not open to runtime manipulation.

[PATCH net] rds: tcp: compute m_ack_seq as offset from ->write_seq

2018-01-18 Thread Sowmini Varadhan
rds-tcp uses m_ack_seq to track the tcp ack# that indicates that the peer has received a rds_message. The m_ack_seq is used in rds_tcp_is_acked() to figure out when it is safe to drop the rds_message from the RDS retransmit queue. The m_ack_seq must be calculated as an offset from the right edge

Re: [PATCH net] flow_dissector: properly cap thoff field

2018-01-18 Thread David Miller
From: Eric Dumazet Date: Wed, 17 Jan 2018 14:21:13 -0800 > From: Eric Dumazet > > syzbot reported yet another crash [1] that is caused by > insufficient validation of DODGY packets. > > Two bugs are happening here to trigger the crash. > > 1) Flow

Re: [PATCH-next] flow_netlink: Remove unneeded semicolons

2018-01-18 Thread David Miller
From: Christopher Díaz Riveros Date: Wed, 17 Jan 2018 16:10:28 -0500 > Trivial fix removes unneeded semicolons after if blocks. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Christopher Díaz Riveros Applied, thanks.

Re: [PATCH net] gso: validate gso_type if SKB_GSO_DODGY

2018-01-18 Thread Willem de Bruijn
> Aside from inet_gso_segment and ipv6_gso_segment, this only leaves the > new nsh_gso_segment. Unlke mpls, it has its own gso_type, so > > if (!skb_shinfo(skb)->gso_type & SKB_GSO_NSH) > goto out; This last point was incorrect. There is no such type for this protocol, so

Re: [PATCH v2] tools/bpftool: silence a static checker warning

2018-01-18 Thread Daniel Borkmann
On 01/18/2018 10:35 AM, Dan Carpenter wrote: > There is a static checker warning that "proglen" has an upper bound but > no lower bound. The allocation will just fail harmlessly so it's not a > big deal. > > Signed-off-by: Dan Carpenter Applied to bpf-next, thanks

Re: pull-request: wireless-drivers 2018-01-17

2018-01-18 Thread David Miller
From: Kalle Valo Date: Wed, 17 Jan 2018 16:30:21 +0200 > here are few more important fixes to the net tree for 4.15, I hope they > still make it. Please let me know if there are any problems. Pulled, thanks Kalle.

Re: [PATCH] net/mlx5e: Fix trailing semicolon

2018-01-18 Thread David Miller
From: Luis de Bethencourt Date: Wed, 17 Jan 2018 12:09:15 + > The trailing semicolon is an empty statement that does no operation. > Removing it since it doesn't do anything. > > Signed-off-by: Luis de Bethencourt Applied to net-next, thank you.

Re: [bpf-next PATCH] bpf: Sync kernel ABI header with tooling header

2018-01-18 Thread Daniel Borkmann
On 01/18/2018 05:49 PM, Jesper Dangaard Brouer wrote: > Update tools/include/uapi/linux/bpf.h to bring it in sync with > include/uapi/linux/bpf.h. The listed commits forgot to update it. > > Fixes: 02dd3291b2f0 ("bpf: finally expose xdp_rxq_info to XDP bpf-programs") > Fixes: f19397a5c656 ("bpf:

Re: [net] fm10k: mark PM functions as __maybe_unused

2018-01-18 Thread David Miller
From: David Miller Date: Thu, 18 Jan 2018 15:52:38 -0500 (EST) > From: Jeff Kirsher > Date: Wed, 17 Jan 2018 07:57:32 -0800 > >> From: Arnd Bergmann >> >> A cleanup of the PM code left an incorrect #ifdef in place, leading >>

Re: [PATCH net] gso: validate gso_type if SKB_GSO_DODGY

2018-01-18 Thread Willem de Bruijn
On Thu, Jan 18, 2018 at 4:14 AM, Jason Wang wrote: > > > On 2018年01月18日 14:04, Willem de Bruijn wrote: >> >> On Thu, Jan 18, 2018 at 12:20 AM, Willem de Bruijn >> wrote: >>> >>> On Wed, Jan 17, 2018 at 10:48 PM, Jason Wang

[PATCH] net: tcp: close sock if net namespace is exiting

2018-01-18 Thread Dan Streetman
When a tcp socket is closed, if it detects that its net namespace is exiting, close immediately and do not wait for FIN sequence. For normal sockets, a reference is taken to their net namespace, so it will never exit while the socket is open. However, kernel sockets do not take a reference to

Re: [bpf-next PATCH] bpf: add comments to BPF ld/ldx sizes

2018-01-18 Thread Daniel Borkmann
On 01/17/2018 12:05 PM, Jesper Dangaard Brouer wrote: > Doc BPF ld/ldx size defines as comments in code, as it makes in > faster to lookup in a programming/review setting, than looking up > the sizes in Documentation/networking/filter.txt. > > Signed-off-by: Jesper Dangaard Brouer

Re: [PATCH bpf-next] bpf: change fake_ip for bpf_trace_printk helper

2018-01-18 Thread Daniel Borkmann
On 01/17/2018 06:19 PM, Yonghong Song wrote: > Currently, for bpf_trace_printk helper, fake ip address 0x1 > is used with comments saying that fake ip will not be printed. > This is indeed true for 4.12 and earlier version, but for > 4.13 and later version, the ip address will be printed if > it

Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

2018-01-18 Thread Christian Brauner
On Thu, Jan 18, 2018 at 09:29:14PM +0100, Jiri Benc wrote: > On Thu, 18 Jan 2018 21:21:24 +0100, Christian Brauner wrote: > > In such scenarios setting a netns id property is > > not really wanted > > Why? I think that's what you should do if you want to avoid setns. Just > use netnsid. I don't

Re: [net] fm10k: mark PM functions as __maybe_unused

2018-01-18 Thread David Miller
From: Jeff Kirsher Date: Wed, 17 Jan 2018 07:57:32 -0800 > From: Arnd Bergmann > > A cleanup of the PM code left an incorrect #ifdef in place, leading > to a harmless build warning: > > drivers/net/ethernet/intel/fm10k/fm10k_pci.c:2502:12: error:

Re: [PATCHv3 net-next 2/2] openvswitch: add erspan version I and II support

2018-01-18 Thread William Tu
Hi Jiri, On Thu, Jan 18, 2018 at 2:13 AM, Jiri Benc wrote: > Looks much better. > > On Wed, 17 Jan 2018 09:32:51 -0800, William Tu wrote: >> + OVS_ERSPAN_OPT_IDX, /* be32 index */ > > Why don't you convert this to u32 while passing to/from user space? > >> +

  1   2   3   4   >