Re: [B.A.T.M.A.N.] [PATCH net] net: batman-adv: Fix possible memleaks when fail to register_netdevice

2017-04-25 Thread Sven Eckelmann
On Mittwoch, 26. April 2017 08:41:30 CEST Gao Feng wrote: > On Dienstag, 25. April 2017 20:03:20 CEST gfree.w...@foxmail.com wrote: > > From: Gao Feng > > > > Because the func batadv_softif_init_late allocate some resources and > > it would be invoked in register_netdevice. So

Re: [Patch net 3/3] team: use a larger struct for mac address

2017-04-25 Thread Jiri Pirko
Wed, Apr 26, 2017 at 07:03:23AM CEST, xiyou.wangc...@gmail.com wrote: >IPv6 tunnels use sizeof(struct in6_addr) as dev->addr_len, >but in many places especially bonding, we use struct sockaddr >to copy and set mac addr, this could lead to stack out-of-bounds >access. > >Fix it by using a larger

Re: hmmm...

2017-04-25 Thread Alexei Starovoitov
On 4/25/17 8:38 PM, David Miller wrote: From: Alexei Starovoitov Date: Tue, 25 Apr 2017 19:56:06 -0700 On 4/25/17 6:52 PM, David Miller wrote: Alexei, I found something strange on my computer :-) [davem@localhost binutils]$ ./objdump -d x.o No way! :) I thought it will take

Re: IGMP on IPv6

2017-04-25 Thread Cong Wang
On Tue, Apr 25, 2017 at 9:16 AM, Murali Karicheri wrote: > On 04/18/2017 06:37 PM, Cong Wang wrote: >> Did you assign IPv4 and IPv6 addresses to the HSR master device? > > No. I just used IPv4. From the trace mld_ifc_timer_expire() -> mld_sendpack() > -> ip6_output() > do

Re: [PATCH net-next 3/3] samples/bpf: check before defining offsetof

2017-04-25 Thread Alexander Alemayhu
On Tue, Apr 25, 2017 at 02:27:16PM +, David Laight wrote: > > Isn't the correct fix to include stddef.h ? > If you think it's the correct fix, please send a patch to netdev. Thanks. -- Mit freundlichen Grüßen Alexander Alemayhu

[Patch net 0/3] net: fix a stack out-of-bound access

2017-04-25 Thread Cong Wang
This patchset fixes the following kernel bug reported by Andrey: BUG: KASAN: stack-out-of-bounds in bond_enslave+0xe0a/0x4ef0 at addr 8800666b7792 Write of size 16 by task a.out/3894 page:ea000199adc0 count:0 mapcount:0 mapping: (null) index:0x0 flags: 0x100()

[Patch net 3/3] team: use a larger struct for mac address

2017-04-25 Thread Cong Wang
IPv6 tunnels use sizeof(struct in6_addr) as dev->addr_len, but in many places especially bonding, we use struct sockaddr to copy and set mac addr, this could lead to stack out-of-bounds access. Fix it by using a larger address storage. Reported-by: Andrey Konovalov Cc:

[Patch net 1/3] net: check mac address length for dev_set_mac_address()

2017-04-25 Thread Cong Wang
dev_set_mac_address() accepts a struct sockaddr pointer as input but we have various types of mac addresse whose lengths are up to MAX_ADDR_LEN, this is confusing. Make it void like ->ndo_set_mac_address() and let callers check its length before calling it. It is too late to fix dev_ifsioc() due

[Patch net 2/3] bonding: use a larger struct for mac address

2017-04-25 Thread Cong Wang
IPv6 tunnels use sizeof(struct in6_addr) as dev->addr_len, but in many places especially bonding, we use struct sockaddr to copy and set mac addr, this could lead to stack out-of-bounds access. Fix it by using a larger address storage. Reported-by: Andrey Konovalov Cc:

Multiple Txqs with One Qdisc

2017-04-25 Thread Michael Ma
Hi - As I mentioned in a previous thread, we're implementing a qdisc similar to mqprio which can associate multiple txqs to one qdisc, so that we can work around the root qdisc bottleneck. I think this should be in general fine since without MQ, root qdisc is associated with multiple txqs anyway.

Re: Corrupted SKB

2017-04-25 Thread Michael Ma
2017-04-18 21:46 GMT-07:00 Michael Ma : > 2017-04-18 16:12 GMT-07:00 Cong Wang : >> On Mon, Apr 17, 2017 at 5:39 PM, Michael Ma wrote: >>> Hi - >>> >>> We've implemented a "glue" qdisc similar to mqprio which can associate >>> one

[no subject]

2017-04-25 Thread prasad padiyar
subscribe linux-netdev

Re: llvm-objdump...

2017-04-25 Thread Alexei Starovoitov
On 4/25/17 10:13 AM, David Miller wrote: I think there are some endianness issues ;-) davem@patience:~/src/GIT/net-next/tools/testing/selftests/bpf$ llvm-objdump -S x.o nice host name ;) x.o:file format ELF64-BPF Disassembly of section test1: process: 0: b7 00 00 00 00

Re: more test_progs...

2017-04-25 Thread Alexei Starovoitov
On 4/25/17 9:52 AM, David Miller wrote: 10: (15) if r3 == 0xdd86 goto pc+9 R0=imm2,min_value=2,max_value=2 R1=pkt(id=0,off=0,r=14) R2=pkt_end R3=inv R4=pkt(id=0,off=14,r=14) R5=inv56 R10=fp Hmmm, endianness looks wrong here. "-target bpf" defaults to the endianness of whatever cpu that llvm

Re: hmmm...

2017-04-25 Thread David Miller
From: Alexei Starovoitov Date: Tue, 25 Apr 2017 19:56:06 -0700 > On 4/25/17 6:52 PM, David Miller wrote: >> >> Alexei, I found something strange on my computer :-) >> >> [davem@localhost binutils]$ ./objdump -d x.o > > No way! :) I thought it will take weeks! > Ship it. Ship it.

[net-next] net: update comment for netif_dormant() function

2017-04-25 Thread Zhang Shengju
This patch updates the comment for netif_dormant() function to reflect the intended usage. Signed-off-by: Zhang Shengju --- include/linux/netdevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/netdevice.h

Re: xdp_redirect ifindex vs port. Was: best API for returning/setting egress port?

2017-04-25 Thread John Fastabend
On 17-04-25 05:26 PM, Alexei Starovoitov wrote: > On Tue, Apr 25, 2017 at 11:34:53AM +0200, Jesper Dangaard Brouer wrote: >>> Note the very first bpf patchset years ago contained the port table >>> abstraction. ovs has concept of vports as well. These two very >>> different projects needed port

Re: [PATCH net v2 0/3] net: hns: bug fix for HNS driver

2017-04-25 Thread lipeng (Y)
On 2017/4/25 0:24, David Miller wrote: From: Yankejian Date: Fri, 21 Apr 2017 15:44:41 +0800 From: lipeng This series adds support defered probe when mdio or mbigen module insmod behind HNS driver, and fixes a bug that a skb has been freed, but

Re: hmmm...

2017-04-25 Thread Alexei Starovoitov
On 4/25/17 6:52 PM, David Miller wrote: Alexei, I found something strange on my computer :-) [davem@localhost binutils]$ ./objdump -d x.o No way! :) I thought it will take weeks! Ship it. Ship it. Ship it. Cannot wait to pull. This is awesome. Thanks a ton! What is the mnemonic for 32-bit

Re: Bug and configuration MPLS error?

2017-04-25 Thread David Ahern
On 4/25/17 11:28 AM, Алексей Болдырев wrote: > 226 sysctl -w net.mpls.conf.lo.input=1 > 227 sysctl -w net.mpls.platform_labels=1048575 > 228 ip link add veth0 type veth peer name veth1 > 229 ip link add veth2 type veth peer name veth3 > 230 sysctl -w net.mpls.conf.veth0.input=1 > 231 sysctl -w

hmmm...

2017-04-25 Thread David Miller
Alexei, I found something strange on my computer :-) [davem@localhost binutils]$ ./objdump -d x.o x.o: file format elf64-bpf Disassembly of section test1: : 0: b7 00 00 00 00 00 00 02 mov r0, 2 8: 61 21 00 50 00 00 00 00 ldxwr2, [r1+80]

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

2017-04-25 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: include/uapi/linux/Kbuild between commit: 65017bab8a9e ("uapi: export all headers under uapi directories") from the kbuild tree and commit: 0b2e66448ba2 ("VSOCK: Add vsockmon device") from the net-next tree. I

Re: [PATCH v2 2/2] ARM: dts: Add the ethernet and ethernet PHY to the cygnus core DT.

2017-04-25 Thread Andrew Lunn
> + eth0: ethernet@18042000 { > + compatible = "brcm,amac"; > + reg = <0x18042000 0x1000>, > + <0x1811 0x1000>; > + reg-names = "amac_base", "idm_base"; > + interrupts = ; > +

[PATCH] ipv6: check raw payload size correctly in ioctl

2017-04-25 Thread Jamie Bainbridge
In situations where an skb is paged, the transport header pointer and tail pointer can be the same because the skb contents are in frags. This results in ioctl(SIOCINQ/FIONREAD) incorrectly returning a length of 0 when the length to receive is actually greater than zero. skb->len is already

Re: TCP fast open using experimental TCP option?

2017-04-25 Thread Tom Herbert
On Tue, Apr 25, 2017 at 5:13 PM, Eric Dumazet wrote: > On Tue, 2017-04-25 at 12:08 -0700, Tom Herbert wrote: >> Looks like TCP fast open was using experimental TCP option at some. Is >> this still needed? Technically this violates usage requirements of >> experimental

RE: [B.A.T.M.A.N.] [PATCH net] net: batman-adv: Fix possible memleaks when fail to register_netdevice

2017-04-25 Thread Gao Feng
> From: Sven Eckelmann [mailto:s...@narfation.org] > Sent: Tuesday, April 25, 2017 9:53 PM > On Dienstag, 25. April 2017 20:03:20 CEST gfree.w...@foxmail.com wrote: > > From: Gao Feng > > > > Because the func batadv_softif_init_late allocate some resources and > > it would be

[PATCH net-next] tcp: memset ca_priv data to 0 properly

2017-04-25 Thread Wei Wang
From: Wei Wang Always zero out ca_priv data in tcp_assign_congestion_control() so that ca_priv data is cleared out during socket creation. Also always zero out ca_priv data in tcp_reinit_congestion_control() so that when cc algorithm is changed, ca_priv data is cleared out as

Re: xdp_redirect ifindex vs port. Was: best API for returning/setting egress port?

2017-04-25 Thread Alexei Starovoitov
On Tue, Apr 25, 2017 at 11:34:53AM +0200, Jesper Dangaard Brouer wrote: > > Note the very first bpf patchset years ago contained the port table > > abstraction. ovs has concept of vports as well. These two very > > different projects needed port table to provide a layer of > > indirection between

Re: [PATCH net-next] virtio-net: on tx, only call napi_disable if tx napi is on

2017-04-25 Thread Jason Wang
On 2017年04月26日 03:59, Willem de Bruijn wrote: From: Willem de Bruijn As of tx napi, device down (`ip link set dev $dev down`) hangs unless tx napi is enabled. Else napi_enable is not called, so napi_disable will spin on test_and_set_bit NAPI_STATE_SCHED. Only call

Get back to me

2017-04-25 Thread Ashraf Basit
Good day. Did you receive the business proposal I sent to you yesterday? I was waiting for your reply but I am not sure if you receive the message. If for some reason you did not receive my previous email, I can resend the message to you. Please confirm as this is very urgent and important.

Re: TCP fast open using experimental TCP option?

2017-04-25 Thread Eric Dumazet
On Tue, 2017-04-25 at 12:08 -0700, Tom Herbert wrote: > Looks like TCP fast open was using experimental TCP option at some. Is > this still needed? Technically this violates usage requirements of > experimental options. Can this be removed now since there is now an > assigned option number for

Re: [PATCH RFC] ptr_ring: add ptr_ring_unconsume

2017-04-25 Thread Jason Wang
On 2017年04月25日 23:35, Michael S. Tsirkin wrote: On Tue, Apr 25, 2017 at 12:07:01PM +0800, Jason Wang wrote: On 2017年04月24日 20:00, Michael S. Tsirkin wrote: On Mon, Apr 24, 2017 at 07:54:18PM +0800, Jason Wang wrote: On 2017年04月24日 07:28, Michael S. Tsirkin wrote: On Tue, Apr 18, 2017 at

Re: [PATCH v2 2/2] ARM: dts: Add the ethernet and ethernet PHY to the cygnus core DT.

2017-04-25 Thread Florian Fainelli
On 04/25/2017 04:53 PM, Eric Anholt wrote: > Cygnus has a single AMAC controller connected to the B53 switch with 2 > PHYs. On the BCM911360_EP platform, those two PHYs are connected to > the external ethernet jacks. > > Signed-off-by: Eric Anholt > Reviewed-by: Florian

[PATCH v2 2/2] ARM: dts: Add the ethernet and ethernet PHY to the cygnus core DT.

2017-04-25 Thread Eric Anholt
Cygnus has a single AMAC controller connected to the B53 switch with 2 PHYs. On the BCM911360_EP platform, those two PHYs are connected to the external ethernet jacks. Signed-off-by: Eric Anholt Reviewed-by: Florian Fainelli --- v2: Call the node

[PATCH v2 1/2] net: dsa: b53: Add compatible strings for the Cygnus-family BCM11360.

2017-04-25 Thread Eric Anholt
Cygnus is a small family of SoCs, of which we currently have devicetree for BCM11360 and BCM58300. The 11360's B53 is mostly the same as 58xx, just requiring a tiny bit of setup that was previously missing. Signed-off-by: Eric Anholt Reviewed-by: Florian Fainelli

Re: [PATCH] IB/IPoIB: Check the headroom size

2017-04-25 Thread Or Gerlitz
On Tue, Apr 25, 2017 at 6:40 PM, Doug Ledford wrote: > On Tue, 2017-04-25 at 17:39 +0300, Or Gerlitz wrote: >> If got you right, Paolo's commit introduced a regression, so we (I >> guess you and Paolo) need to either solve it or we (community) >> should consider a revert,

[Patch net] ipv6: check skb->protocol before lookup for nexthop

2017-04-25 Thread Cong Wang
Andrey reported a out-of-bound access in ip6_tnl_xmit(), this is because we use an ipv4 dst in ip6_tnl_xmit() and cast an IPv4 neigh key as an IPv6 address: neigh = dst_neigh_lookup(skb_dst(skb), _hdr(skb)->daddr); if (!neigh) goto

Re: [PATCH net-next 01/10] tcp: add tp->tcp_mstamp field

2017-04-25 Thread Eric Dumazet
On Tue, Apr 25, 2017 at 2:27 PM, Yuchung Cheng wrote: >> + struct skb_mstamp tcp_mstamp; /* most recent packet received/sent */ > Eric: would this new stamp cover outgoing packet as well in the > future? in the patch series seem to cover only the incoming packets. This

Re: [PATCH net-next 01/10] tcp: add tp->tcp_mstamp field

2017-04-25 Thread Yuchung Cheng
On Tue, Apr 25, 2017 at 10:15 AM, Eric Dumazet wrote: > We want to use precise timestamps in TCP stack, but we do not > want to call possibly expensive kernel time services too often. > > tp->tcp_mstamp is guaranteed to be updated once per incoming packet. > > We will use it

Re: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-25 Thread Florian Fainelli
On 04/25/2017 01:26 PM, David Miller wrote: > From: Alexandre Belloni > Date: Tue, 25 Apr 2017 22:09:11 +0200 > >> Hi, >> >> On 25/04/2017 at 18:25:30 +0300, Alexander Kochetkov wrote: >>> Hello David! >>> 25 апр. 2017 г., в 17:36, David Miller

Re: [RFC 0/4] xdp: use netlink extended ACK reporting

2017-04-25 Thread Jakub Kicinski
On Tue, 25 Apr 2017 08:53:35 -0600, David Ahern wrote: > On 4/25/17 2:06 AM, Jakub Kicinski wrote: > > > Also - is anyone working on adding proper extack support to iproute2? > > The code I have right now is a bit of a hack... > > This is what I have done: >

Re: TCP fast open using experimental TCP option?

2017-04-25 Thread Yuchung Cheng
On Tue, Apr 25, 2017 at 12:08 PM, Tom Herbert wrote: > Looks like TCP fast open was using experimental TCP option at some. Is > this still needed? Technically this violates usage requirements of > experimental options. Can this be removed now since there is now an > assigned

Re: [RFC 0/4] xdp: use netlink extended ACK reporting

2017-04-25 Thread Jakub Kicinski
On Tue, 25 Apr 2017 11:05:27 +0200, Daniel Borkmann wrote: > > adding #defines for the most common configuration conflicts? > > Sharing the messages verbatim between drivers could make them easier > > to google. > > Makes sense, once more drivers adapt to this reporting, these > messages could

Re: [RFC 1/4] netlink: make extended ACK setting NULL-friendly

2017-04-25 Thread Jakub Kicinski
On Tue, 25 Apr 2017 10:13:34 +0200, Johannes Berg wrote: > On Tue, 2017-04-25 at 01:06 -0700, Jakub Kicinski wrote: > > > +#define NL_SET_ERR_MSG(extack, msg) do { \ > > + struct netlink_ext_ack *_extack = (extack); \ > > + static const char _msg[] = (msg); \ > > +

Re: more test_progs...

2017-04-25 Thread Daniel Borkmann
On 04/25/2017 06:52 PM, David Miller wrote: [...] Load eth->h_proto 10: (15) if r3 == 0xdd86 goto pc+9 R0=imm2,min_value=2,max_value=2 R1=pkt(id=0,off=0,r=14) R2=pkt_end R3=inv R4=pkt(id=0,off=14,r=14) R5=inv56 R10=fp Hmmm, endianness looks wrong here. "-target bpf" defaults to the

Re: [PATCH net-next] virtio-net: on tx, only call napi_disable if tx napi is on

2017-04-25 Thread Michael S. Tsirkin
On Tue, Apr 25, 2017 at 03:59:17PM -0400, Willem de Bruijn wrote: > From: Willem de Bruijn > > As of tx napi, device down (`ip link set dev $dev down`) hangs unless > tx napi is enabled. Else napi_enable is not called, so napi_disable > will spin on test_and_set_bit

Re: [PATCH v2] macsec: dynamically allocate space for sglist

2017-04-25 Thread Sabrina Dubroca
2017-04-25, 19:08:18 +0200, Jason A. Donenfeld wrote: > We call skb_cow_data, which is good anyway to ensure we can actually > modify the skb as such (another error from prior). Now that we have the > number of fragments required, we can safely allocate exactly that amount > of memory. > >

Re: [PATCH net-next v8 2/3] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-04-25 Thread Jamal Hadi Salim
On 17-04-25 12:04 PM, Jiri Pirko wrote: Tue, Apr 25, 2017 at 03:01:22PM CEST, j...@mojatatu.com wrote: On 17-04-25 08:13 AM, Jiri Pirko wrote: Tue, Apr 25, 2017 at 01:54:06PM CEST, j...@mojatatu.com wrote: +static inline bool tca_flags_valid(u32 act_flags) +{ + u32 invalid_flags_mask

Re: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-25 Thread David Miller
From: Alexandre Belloni Date: Tue, 25 Apr 2017 22:09:11 +0200 > Hi, > > On 25/04/2017 at 18:25:30 +0300, Alexander Kochetkov wrote: >> Hello David! >> >> > 25 апр. 2017 г., в 17:36, David Miller написал(а): >> > >> > So... what are

Re: [PATCH net-next] net: move xdp_prog field in RX cache lines

2017-04-25 Thread David Miller
From: Eric Dumazet Date: Tue, 25 Apr 2017 11:36:52 -0700 > From: Eric Dumazet > > (struct net_device, xdp_prog) field should be moved in RX cache lines, > reducing latencies when a single packet is received on idle host, > since netif_elide_gro()

Re: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-25 Thread Alexandre Belloni
Hi, On 25/04/2017 at 18:25:30 +0300, Alexander Kochetkov wrote: > Hello David! > > > 25 апр. 2017 г., в 17:36, David Miller написал(а): > > > > So... what are we doing here? > > > > My understanding is that this should fix the same problem that commit > >

[PATCH net-next] virtio-net: on tx, only call napi_disable if tx napi is on

2017-04-25 Thread Willem de Bruijn
From: Willem de Bruijn As of tx napi, device down (`ip link set dev $dev down`) hangs unless tx napi is enabled. Else napi_enable is not called, so napi_disable will spin on test_and_set_bit NAPI_STATE_SCHED. Only call napi_disable if tx napi is enabled. Fixes: 5a719c2552ca

[PATCH -stable 3.10,backport] net: ipv6: drop non loopback packets claiming to originate from ::1

2017-04-25 Thread Donatas Abraitis
commit 0aa8c13eb512823bc4d60397d666a6b6260bb965 upstream. We lack a saddr check for ::1. This causes security issues e.g. with acls permitting connections from ::1 because of assumption that these originate from local machine. Assuming a source address of ::1 is local seems reasonable. RFC4291

Re: [PATCH 5/7] IB/hfi1: use pcie_flr instead of duplicating it

2017-04-25 Thread Bjorn Helgaas
On Mon, Apr 24, 2017 at 04:35:07PM +0200, Christoph Hellwig wrote: > On Mon, Apr 24, 2017 at 02:16:31PM +, Byczkowski, Jakub wrote: > > Tested-by: Jakub Byczkowski > > Are you (and Doug) ok with queueing this up in the PCI tree? Applied this with Jakub's

Re: [RESEND PATCH 3/3] infiniband: hns: avoid gcc-7.0.1 warning for uninitialized data

2017-04-25 Thread Doug Ledford
On Fri, 2017-03-24 at 23:02 +0100, Arnd Bergmann wrote: > hns_roce_v1_cq_set_ci() calls roce_set_bit() on an uninitialized > field, > which will then change only a few of its bits, causing a warning with > the latest gcc: > > infiniband/hw/hns/hns_roce_hw_v1.c: In function >

TCP fast open using experimental TCP option?

2017-04-25 Thread Tom Herbert
Looks like TCP fast open was using experimental TCP option at some. Is this still needed? Technically this violates usage requirements of experimental options. Can this be removed now since there is now an assigned option number for TFO? case TCPOPT_EXP:

[PATCH v3] net: core: Prevent from dereferencing null pointer when releasing SKB

2017-04-25 Thread Myungho Jung
Added NULL check to make __dev_kfree_skb_irq consistent with kfree family of functions. Link: https://bugzilla.kernel.org/show_bug.cgi?id=195289 Signed-off-by: Myungho Jung --- Changes in v2: - Correct category in subject Changes in v3: - Fix typo in subject

Re: [PATCH] net: ipv6: check route protocol when deleting routes

2017-04-25 Thread David Ahern
On 4/24/17 3:48 AM, Lorenzo Colitti wrote: > For non-stable kernels, it seems that the proper fix would be: > > 1. Ensure that when an RA creates a route, it properly sets > rtm_protocol at time of route creation. > 2. When we dump routes to userspace, we don't overwrite the rtm_protocol. +1

[PATCH v6 5/5] virtio_net: check return value of skb_to_sgvec always

2017-04-25 Thread Jason A. Donenfeld
Signed-off-by: Jason A. Donenfeld --- drivers/net/virtio_net.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index f36584616e7d..1709fd0b4bf7 100644 --- a/drivers/net/virtio_net.c +++

[PATCH v6 2/5] ipsec: check return value of skb_to_sgvec always

2017-04-25 Thread Jason A. Donenfeld
Signed-off-by: Jason A. Donenfeld --- net/ipv4/ah4.c | 8 ++-- net/ipv4/esp4.c | 30 -- net/ipv6/ah6.c | 8 ++-- net/ipv6/esp6.c | 31 +-- 4 files changed, 53 insertions(+), 24 deletions(-) diff --git

[PATCH v6 1/5] skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow

2017-04-25 Thread Jason A. Donenfeld
This is a defense-in-depth measure in response to bugs like 4d6fa57b4dab ("macsec: avoid heap overflow in skb_to_sgvec"). While we're at it, we also limit the amount of recursion this function is allowed to do. Not actually providing a bounded base case is a future diaster that we can easily avoid

[PATCH v6 4/5] macsec: check return value of skb_to_sgvec always

2017-04-25 Thread Jason A. Donenfeld
Signed-off-by: Jason A. Donenfeld --- drivers/net/macsec.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c index dbab05afcdbe..d846f42b99ec 100644 --- a/drivers/net/macsec.c +++ b/drivers/net/macsec.c

[PATCH v6 3/5] rxrpc: check return value of skb_to_sgvec always

2017-04-25 Thread Jason A. Donenfeld
Signed-off-by: Jason A. Donenfeld --- net/rxrpc/rxkad.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c index 4374e7b9c7bf..dcf46c9c3ece 100644 --- a/net/rxrpc/rxkad.c +++ b/net/rxrpc/rxkad.c @@ -229,7 +229,9

Re: [Intel-wired-lan] [PATCH 1/2] e1000e: Don't return uninitialized stats

2017-04-25 Thread Benjamin Poirier
On 2017/04/25 10:54, Stephen Hemminger wrote: [...] > > > The call to memset was removed from the upstream kernel with: > > > --- > > > - > > > commit 5944701df90d9577658e2354cc27c4ceaeca30fe > > > Author: stephen

Re: [PATCH net-next v8 1/3] net sched actions: Use proper root attribute table for actions

2017-04-25 Thread Simon Horman
On Tue, Apr 25, 2017 at 07:54:05AM -0400, Jamal Hadi Salim wrote: > From: Jamal Hadi Salim > > Bug fix for an issue which has been around for about a decade. > We got away with it because the enumeration was larger than needed. > > Fixes: 7ba699c604ab ("[NET_SCHED]: Convert

[PATCH net-next] net: move xdp_prog field in RX cache lines

2017-04-25 Thread Eric Dumazet
From: Eric Dumazet (struct net_device, xdp_prog) field should be moved in RX cache lines, reducing latencies when a single packet is received on idle host, since netif_elide_gro() needs it. Signed-off-by: Eric Dumazet --- include/linux/netdevice.h |

[PATCH net-next] dt-bindings: mdio: Clarify binding document

2017-04-25 Thread Florian Fainelli
The described GPIO reset property is applicable to *all* child PHYs. If we have one reset line per PHY present on the MDIO bus, these automatically become properties of the child PHY nodes. Finally, indicate how the RESET pulse width must be defined, which is the maximum value of all individual

[PATCH v2 00/21] Introduce common scatterlist map function

2017-04-25 Thread Logan Gunthorpe
Changes since v1: * Rebased onto next-20170424 * Removed the _offset version of these functions per Christoph's suggestion * Added an SG_MAP_MUST_NOT_FAIL flag which will BUG_ON in future cases that can't gracefully fail. This removes a bunch of the noise added in v1 to a couple of the

[PATCH v2 07/21] crypto: shash, caam: Make use of the new sg_map helper function

2017-04-25 Thread Logan Gunthorpe
Very straightforward conversion to the new function in the caam driver and shash library. Signed-off-by: Logan Gunthorpe Cc: Herbert Xu Cc: "David S. Miller" --- crypto/shash.c| 9 ++---

[PATCH v2 03/21] libiscsi: Make use of new the sg_map helper function

2017-04-25 Thread Logan Gunthorpe
Convert the kmap and kmap_atomic uses to the sg_map function. We now store the flags for the kmap instead of a boolean to indicate atomicitiy. We use ISCSI_TCP_INTERNAL_ERR error type that was prepared earlier for this. Signed-off-by: Logan Gunthorpe Cc: Lee Duncan

[PATCH v2 18/21] mmc: tmio: Make use of the new sg_map helper function

2017-04-25 Thread Logan Gunthorpe
Straightforward conversion to sg_map helper. Seeing there is no cleare error path, SG_MAP_MUST_NOT_FAIL which may BUG_ON in certain cases in the future. Signed-off-by: Logan Gunthorpe Cc: Wolfram Sang Cc: Ulf Hansson

[PATCH v2 16/21] mmc: sdhci: Make use of the new sg_map helper function

2017-04-25 Thread Logan Gunthorpe
Straightforward conversion, except due to the lack of an error path we have to use SG_MAP_MUST_NOT_FAIL which may BUG_ON in certain cases in the future. Signed-off-by: Logan Gunthorpe Cc: Adrian Hunter Cc: Ulf Hansson ---

[PATCH v2 14/21] scsi: libfc, csiostor: Change to sg_copy_buffer in two drivers

2017-04-25 Thread Logan Gunthorpe
These two drivers appear to duplicate the functionality of sg_copy_buffer. So we clean them up to use the common code. This helps us remove a couple of instances that would otherwise be slightly tricky sg_map usages. Signed-off-by: Logan Gunthorpe Cc: Johannes Thumshirn

[PATCH v2 04/21] target: Make use of the new sg_map function at 16 call sites

2017-04-25 Thread Logan Gunthorpe
Fairly straightforward conversions in all spots. In a couple of cases any error gets propogated up should sg_map fail. In other cases a warning is issued if the kmap fails seeing there's no clear error path. This should not be an issue until someone tries to use unmappable memory in the sgl with

[PATCH v2 11/21] scsi: ipr, pmcraid, isci: Make use of the new sg_map helper

2017-04-25 Thread Logan Gunthorpe
Very straightforward conversion of three scsi drivers. Signed-off-by: Logan Gunthorpe Cc: Brian King Cc: Artur Paszkiewicz --- drivers/scsi/ipr.c | 27 ++- drivers/scsi/isci/request.c | 42

[PATCH v2 06/21] crypto: hifn_795x: Make use of the new sg_map helper function

2017-04-25 Thread Logan Gunthorpe
Conversion of a couple kmap_atomic instances to the sg_map helper function. However, it looks like there was a bug in the original code: the source scatter lists offset (t->offset) was passed to ablkcipher_get which added it to the destination address. This doesn't make a lot of sense, but

[PATCH v2 17/21] mmc: spi: Make use of the new sg_map helper function

2017-04-25 Thread Logan Gunthorpe
We use the sg_map helper but it's slightly more complicated as we only check for the error when the mapping actually gets used. Such that if the mapping failed but wasn't needed then no error occurs. Signed-off-by: Logan Gunthorpe Cc: Ulf Hansson ---

[PATCH v2 21/21] memstick: Make use of the new sg_map helper function

2017-04-25 Thread Logan Gunthorpe
Straightforward conversion, but we have to make use of SG_MAP_MUST_NOT_FAIL which may BUG_ON in certain cases in the future. Signed-off-by: Logan Gunthorpe Cc: Alex Dubov --- drivers/memstick/host/jmb38x_ms.c | 11 ++-

[PATCH v2 09/21] staging: unisys: visorbus: Make use of the new sg_map helper function

2017-04-25 Thread Logan Gunthorpe
Straightforward conversion to the new function. Signed-off-by: Logan Gunthorpe Acked-by: David Kershner --- drivers/staging/unisys/visorhba/visorhba_main.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git

[PATCH v2 15/21] xen-blkfront: Make use of the new sg_map helper function

2017-04-25 Thread Logan Gunthorpe
Straightforward conversion to the new helper, except due to the lack of error path, we have to use SG_MAP_MUST_NOT_FAIL which may BUG_ON in certain cases in the future. Signed-off-by: Logan Gunthorpe Cc: Boris Ostrovsky Cc: Juergen Gross

[PATCH v2 10/21] RDS: Make use of the new sg_map helper function

2017-04-25 Thread Logan Gunthorpe
Straightforward conversion except there's no error path, so we make use of SG_MAP_MUST_NOT_FAIL which may BUG_ON in certain cases in the future. Signed-off-by: Logan Gunthorpe Cc: Santosh Shilimkar Cc: "David S. Miller"

[PATCH v2 19/21] mmc: sdricoh_cs: Make use of the new sg_map helper function

2017-04-25 Thread Logan Gunthorpe
This is a straightforward conversion to the new function. Signed-off-by: Logan Gunthorpe Cc: Sascha Sommer Cc: Ulf Hansson --- drivers/mmc/host/sdricoh_cs.c | 14 +- 1 file changed, 9 insertions(+), 5

[PATCH v2 20/21] mmc: tifm_sd: Make use of the new sg_map helper function

2017-04-25 Thread Logan Gunthorpe
This conversion is a bit complicated. We modiy the read_fifo, write_fifo and copy_page functions to take a scatterlist instead of a page. Thus we can use sg_map instead of kmap_atomic. There's a bit of accounting that needed to be done for the offset for this to work. (Seeing sg_map takes care of

[PATCH v2 12/21] scsi: hisi_sas, mvsas, gdth: Make use of the new sg_map helper function

2017-04-25 Thread Logan Gunthorpe
Very straightforward conversion of three scsi drivers. Signed-off-by: Logan Gunthorpe Cc: Achim Leubner Cc: John Garry --- drivers/scsi/gdth.c| 9 +++-- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 14

[PATCH v2 13/21] scsi: arcmsr, ips, megaraid: Make use of the new sg_map helper function

2017-04-25 Thread Logan Gunthorpe
Very straightforward conversion of three scsi drivers Signed-off-by: Logan Gunthorpe Cc: Adaptec OEM Raid Solutions Cc: Kashyap Desai Cc: Sumit Saxena Cc: Shivasharan S

[PATCH v2 01/21] scatterlist: Introduce sg_map helper functions

2017-04-25 Thread Logan Gunthorpe
This patch introduces functions which kmap the pages inside an sgl. These functions replace a common pattern of kmap(sg_page(sg)) that is used in more than 50 places within the kernel. The motivation for this work is to eventually safely support sgls that contain io memory. In order for that to

[PATCH v2 05/21] drm/i915: Make use of the new sg_map helper function

2017-04-25 Thread Logan Gunthorpe
This is a single straightforward conversion from kmap to sg_map. We also create the i915_gem_object_unmap function to common up the unmap code. Signed-off-by: Logan Gunthorpe Acked-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_gem.c | 27

Re: [PATCH v4] {net,IB}/{rxe,usnic}: Utilize generic mac to eui32 function

2017-04-25 Thread Doug Ledford
On Mon, 2017-04-24 at 18:46 +0300, Yuval Shaia wrote: > On Tue, Mar 14, 2017 at 07:58:43PM +0200, Leon Romanovsky wrote: > > > > On Tue, Mar 14, 2017 at 04:01:57PM +0200, Yuval Shaia wrote: > > > > > > This logic seems to be duplicated in (at least) three separate > > > files. > > > Move it to

[PATCH v2 02/21] libiscsi: Add an internal error code

2017-04-25 Thread Logan Gunthorpe
This is a prep patch to add a new error code to libiscsi. We want to rework some kmap calls to be able to fail. When we do, we'd like to use this error code. This patch simply introduces ISCSI_TCP_INTERNAL_ERR and prints "Internal Error." when it gets hit. Signed-off-by: Logan Gunthorpe

[PATCH v2 08/21] dm-crypt: Make use of the new sg_map helper in 4 call sites

2017-04-25 Thread Logan Gunthorpe
Very straightforward conversion to the new function in all four spots. Signed-off-by: Logan Gunthorpe Cc: Alasdair Kergon Cc: Mike Snitzer --- drivers/md/dm-crypt.c | 39 ++- 1 file changed, 26

Re: [PATCH] ipv6: ensure message length for raw socket is at least sizeof(ipv6hdr)

2017-04-25 Thread Eric Dumazet
On Tue, Apr 25, 2017 at 10:55 AM, David Miller wrote: > From: Alexander Potapenko > Date: Tue, 25 Apr 2017 15:18:27 +0200 > >> rawv6_send_hdrinc() expects that the buffer copied from the userspace >> contains the IPv6 header, so if too few bytes are copied

Re: [PATCH] net/packet: check length in getsockopt() called with PACKET_HDRLEN

2017-04-25 Thread David Miller
From: Alexander Potapenko Date: Tue, 25 Apr 2017 18:51:46 +0200 > In the case getsockopt() is called with PACKET_HDRLEN and optlen < 4 > |val| remains uninitialized and the syscall may behave differently > depending on its value, and even copy garbage to userspace on certain >

Re: [PATCH v4 net] net: ipv6: regenerate host route if moved to gc list

2017-04-25 Thread David Miller
From: David Ahern Date: Tue, 25 Apr 2017 09:17:29 -0700 > Taking down the loopback device wreaks havoc on IPv6 routing. By > extension, taking down a VRF device wreaks havoc on its table. > > Dmitry and Andrey both reported heap out-of-bounds reports in the IPv6 > FIB

Re: [PATCHv2 net] bridge: move bridge multicast cleanup to ndo_uninit

2017-04-25 Thread David Miller
From: Xin Long Date: Tue, 25 Apr 2017 22:58:37 +0800 > During removing a bridge device, if the bridge is still up, a new mdb entry > still can be added in br_multicast_add_group() after all mdb entries are > removed in br_multicast_dev_del(). Like the path: > >

Re: [PATCH net] ipv6: fix source routing

2017-04-25 Thread David Miller
From: Sabrina Dubroca Date: Tue, 25 Apr 2017 15:56:50 +0200 > Commit a149e7c7ce81 ("ipv6: sr: add support for SRH injection through > setsockopt") introduced handling of IPV6_SRCRT_TYPE_4, but at the same > time restricted it to only IPV6_SRCRT_TYPE_0 and >

Re: [PATCH] ipv6: ensure message length for raw socket is at least sizeof(ipv6hdr)

2017-04-25 Thread David Miller
From: Alexander Potapenko Date: Tue, 25 Apr 2017 15:18:27 +0200 > rawv6_send_hdrinc() expects that the buffer copied from the userspace > contains the IPv6 header, so if too few bytes are copied parts of the > header may remain uninitialized. > > This bug has been detected

Re: [PATCH net-next 10/10] tcp: switch rcv_rtt_est and rcvq_space to high resolution timestamps

2017-04-25 Thread Neal Cardwell
On Tue, Apr 25, 2017 at 1:15 PM, Eric Dumazet wrote: > Some devices or distributions use HZ=100 or HZ=250 > > TCP receive buffer autotuning has poor behavior caused by this choice. > Since autotuning happens after 4 ms or 10 ms, short distance flows > get their receive buffer

Re: [PATCH net-next 09/10] tcp: remove ack_time from struct tcp_sacktag_state

2017-04-25 Thread Neal Cardwell
On Tue, Apr 25, 2017 at 1:15 PM, Eric Dumazet wrote: > It is no longer needed, everything uses tp->tcp_mstamp instead. > > Signed-off-by: Eric Dumazet > Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell

Re: [Intel-wired-lan] [PATCH 1/2] e1000e: Don't return uninitialized stats

2017-04-25 Thread Benjamin Poirier
On 2017/04/25 02:07, Jeff Kirsher wrote: [...] > > > > > > I don't see any memset in e1000e_get_stats64(). What kernel version > > > are > > > you looking at? > > > > The call to memset was removed from the upstream kernel with: > >

Re: [PATCH net-next 08/10] tcp: use tp->tcp_mstamp in tcp_clean_rtx_queue()

2017-04-25 Thread Neal Cardwell
On Tue, Apr 25, 2017 at 1:15 PM, Eric Dumazet wrote: > Following patch will remove ack_time from struct tcp_sacktag_state > > Same info is now found in tp->tcp_mstamp > > Signed-off-by: Eric Dumazet > Acked-by: Soheil Hassas Yeganeh

  1   2   3   4   >