Re: [PATCH net-next RFC] Dump SW SQ context as part of tx reporter

2019-05-09 Thread Jiri Pirko
Tue, May 07, 2019 at 02:58:32PM CEST, a...@mellanox.com wrote: > > >On 5/7/2019 3:41 PM, Jiri Pirko wrote: >> Mon, Apr 29, 2019 at 04:17:39PM CEST, a...@mellanox.com wrote: >>> TX reporter reports an error on two scenarios: >>> - TX timeout on a specific tx queue >>> - TX completion error on a spec

Re: [PATCH net] selinux: do not report error on connect(AF_UNSPEC)

2019-05-09 Thread Paolo Abeni
On Wed, 2019-05-08 at 17:17 -0400, Paul Moore wrote: > On Wed, May 8, 2019 at 2:55 PM Stephen Smalley wrote: > > On 5/8/19 2:27 PM, Marcelo Ricardo Leitner wrote: > > > On Wed, May 08, 2019 at 02:13:17PM -0400, Stephen Smalley wrote: > > > > On 5/8/19 2:12 PM, Stephen Smalley wrote: > > > > > On 5

[PATCH] rtl8150: switch to BIT macro

2019-05-09 Thread Oliver Neukum
A bit of housekeeping switching the driver to the BIT() macro. Signed-off-by: Oliver Neukum --- drivers/net/usb/rtl8150.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c index 59dbdbb5feff..1ed85fba1

[PATCH 3/3] aqc111: fix double endianness swap on BE

2019-05-09 Thread Oliver Neukum
If you are using a function that does a swap in place, you cannot just reuse the buffer on the assumption that it has not been changed. Signed-off-by: Oliver Neukum --- drivers/net/usb/aqc111.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/aqc111.c b/d

[PATCH 1/3] aqc111: fix endianness issue in aqc111_change_mtu

2019-05-09 Thread Oliver Neukum
If the MTU is large enough, the first write to the device is just repeated. On BE architectures, however, the first word of the command will be swapped a second time and garbage will be written. Avoid that. Signed-off-by: Oliver Neukum --- drivers/net/usb/aqc111.c | 2 ++ 1 file changed, 2 inser

[PATCH 2/3] aqc111: fix writing to the phy on BE

2019-05-09 Thread Oliver Neukum
When writing to the phy on BE architectures an internal data structure was directly given, leading to it being byte swapped in the wrong way for the CPU in 50% of all cases. A temporary buffer must be used. Signed-off-by: Oliver Neukum --- drivers/net/usb/aqc111.c | 23 +-- 1

Re: [PATCH net-next v4 1/6] net: xdp: refactor XDP attach

2019-05-09 Thread Björn Töpel
On Mon, 8 Apr 2019 at 22:23, Daniel Borkmann wrote: > > On 04/08/2019 07:05 PM, Toke Høiland-Jørgensen wrote: > > From: Björn Töpel > > > > Generic XDP and driver XDP cannot be enabled at the same time. However, > > they don't share any state; let's fix that. Here, dev->xdp_prog, is > > used for

[PATCH] e1000e: Work around hardware unit hang by disabling TSO

2019-05-09 Thread Juliana Rodrigueiro
When forwarding traffic to a client behind NAT, some e1000e devices become unstable, hanging and then being reset by the watchdog. Output from syslog: kernel: e1000e :00:19.0 eth0: Detected Hardware Unit Hang: kernel: TDH <5f> kernel: TDT <8d> kernel: next

Re: Question about seccomp / bpf

2019-05-09 Thread Eric Dumazet
On Wed, May 8, 2019 at 9:47 PM Alexei Starovoitov wrote: > > On Wed, May 08, 2019 at 04:17:29PM -0700, Eric Dumazet wrote: > > On Wed, May 8, 2019 at 4:09 PM Alexei Starovoitov > > wrote: > > > > > > On Wed, May 08, 2019 at 02:21:52PM -0700, Eric Dumazet wrote: > > > > Hi Alexei and Daniel > > >

Re: Question about seccomp / bpf

2019-05-09 Thread Eric Dumazet
On Thu, May 9, 2019 at 3:52 AM Eric Dumazet wrote: > > On Wed, May 8, 2019 at 9:47 PM Alexei Starovoitov > wrote: > > > > On Wed, May 08, 2019 at 04:17:29PM -0700, Eric Dumazet wrote: > > > On Wed, May 8, 2019 at 4:09 PM Alexei Starovoitov > > > wrote: > > > > > > > > On Wed, May 08, 2019 at 02:

Re: [PATCH ipsec-next 0/6] xfrm: reduce xfrm_state_afinfo size

2019-05-09 Thread Steffen Klassert
On Fri, May 03, 2019 at 05:46:13PM +0200, Florian Westphal wrote: > xfrm_state_afinfo is a very large struct; its over 4kbyte on 64bit systems. > > The size comes from two arrays to store the l4 protocol type pointers > (esp, ah, ipcomp and so on). > > There are only a handful of those, so just u

Re: [PATCH net-next] sctp: remove unused cmd SCTP_CMD_GEN_INIT_ACK

2019-05-09 Thread Neil Horman
On Thu, May 09, 2019 at 02:28:00PM +0800, Xin Long wrote: > SCTP_CMD_GEN_INIT_ACK was introduced since very beginning, but never > got used. So remove it. > > Signed-off-by: Xin Long > --- > include/net/sctp/command.h | 1 - > net/sctp/sm_sideeffect.c | 11 --- > 2 files changed, 12 d

Re: [PATCH net V3 1/2] tuntap: fix dividing by zero in ebpf queue selection

2019-05-09 Thread Eric Dumazet
On 5/8/19 11:20 PM, Jason Wang wrote: > We need check if tun->numqueues is zero (e.g for the persist device) > before trying to use it for modular arithmetic. > > Reported-by: Eric Dumazet > Fixes: 96f84061620c6("tun: add eBPF based queue selection method") > Signed-off-by: Jason Wang > ---

Re: [PATCH bpf-next 1/2] bpf: Allow bpf_map_lookup_elem() on an xskmap

2019-05-09 Thread Björn Töpel
On Thu, 9 May 2019 at 01:07, Jonathan Lemon wrote: > > Currently, the AF_XDP code uses a separate map in order to > determine if an xsk is bound to a queue. Instead of doing this, > have bpf_map_lookup_elem() return a boolean indicating whether > there is a valid entry at the map index. > > Signe

Re: Question about seccomp / bpf

2019-05-09 Thread Daniel Borkmann
On 05/09/2019 12:58 PM, Eric Dumazet wrote: > On Thu, May 9, 2019 at 3:52 AM Eric Dumazet wrote: >> On Wed, May 8, 2019 at 9:47 PM Alexei Starovoitov >> wrote: >>> On Wed, May 08, 2019 at 04:17:29PM -0700, Eric Dumazet wrote: On Wed, May 8, 2019 at 4:09 PM Alexei Starovoitov wrote: >>>

Re: [PATCH v6 bpf-next 01/17] bpf: verifier: offer more accurate helper function arg and return type

2019-05-09 Thread Jiong Wang
Alexei Starovoitov writes: > On Wed, May 08, 2019 at 03:45:12PM +0100, Jiong Wang wrote: >> >> I might be misunderstanding your points, please just shout if I am wrong. >> >> Suppose the following BPF code: >> >> unsigned helper(unsigned long long, unsigned long long); >> unsigned long lo

Re: [PATCH net V2] tuntap: synchronize through tfiles array instead of tun->numqueues

2019-05-09 Thread Jason Wang
On 2019/5/9 下午1:34, Cong Wang wrote: On Tue, May 7, 2019 at 7:54 PM Jason Wang wrote: This is only true if you can make sure tfile[tun->numqueues] is not freed. Either my patch or SOCK_RCU_FREE can solve this, but for SOCK_RCU_FREE we need do extra careful audit to make sure it doesn't break

Re: [PATCH net] selinux: do not report error on connect(AF_UNSPEC)

2019-05-09 Thread Paul Moore
On Thu, May 9, 2019 at 4:40 AM Paolo Abeni wrote: > On Wed, 2019-05-08 at 17:17 -0400, Paul Moore wrote: > > On Wed, May 8, 2019 at 2:55 PM Stephen Smalley wrote: > > > On 5/8/19 2:27 PM, Marcelo Ricardo Leitner wrote: > > > > On Wed, May 08, 2019 at 02:13:17PM -0400, Stephen Smalley wrote: > > >

Re: [PATCH net] vlan: disable SIOCSHWTSTAMP in container

2019-05-09 Thread Richard Cochran
On Thu, May 09, 2019 at 02:55:07PM +0800, Hangbin Liu wrote: > With NET_ADMIN enabled in container, a normal user could be mapped to > root and is able to change the real device's rx filter via ioctl on > vlan, which would affect the other ptp process on host. Fix it by > disabling SIOCSHWTSTAMP in

Re: [PATCH net] macvlan: disable SIOCSHWTSTAMP in container

2019-05-09 Thread Richard Cochran
On Thu, May 09, 2019 at 02:54:08PM +0800, Hangbin Liu wrote: > Miroslav pointed that with NET_ADMIN enabled in container, a normal user > could be mapped to root and is able to change the real device's rx > filter via ioctl on macvlan, which would affect the other ptp process on > host. Fix it by d

Re: [RFC 1/3] mdio-bitbang: add SMI0 mode support

2019-05-09 Thread Andrew Lunn
On Wed, May 08, 2019 at 11:13:28PM +0200, Michael Grzeschik wrote: > Some microchip phys support the Serial Management Interface Protocol > (SMI) for the configuration of the extended register set. We add > MII_ADDR_SMI0 as an availabe interface to the mdiobb write and read > functions, as this int

Re: [RFC 2/3] ksz: Add Microchip KSZ8873 SMI-DSA driver

2019-05-09 Thread Andrew Lunn
On Wed, May 08, 2019 at 11:13:29PM +0200, Michael Grzeschik wrote: > Cc: tristram...@microchip.com > Signed-off-by: Michael Grzeschik > --- > drivers/net/dsa/microchip/Kconfig | 16 + > drivers/net/dsa/microchip/Makefile |2 + > drivers/net/dsa/microchip/ksz8863.c | 1026

From Michelle

2019-05-09 Thread Michelle Goodman
Doufám, že jsi v pořádku ? Jak jsem řekl, jmenuji se Michelle a americká občanka, narodil jsem se v Bowling Green, Kentucky, ale původně z Charlotte, Severní Karolína považuje Portland Oregon, absolvoval jsem Parkrose Senior High School, Portland Oregon. V současné době sloužím v Libyi pro misi na

Re: [PATCH] rtl8150: switch to BIT macro

2019-05-09 Thread Petko Manolov
On 19-05-09 11:01:06, Oliver Neukum wrote: > A bit of housekeeping switching the driver to the BIT() > macro. Looks good. I hope you've at least compiled the driver? :) Acked-by: Petko Manolov cheers, Petko > Signed-off-by: Oliver Neukum > --- > drivers/net/usb/rtl8150.c | 20 ++--

Re: [RFC PATCH net-next 2/3] flow_offload: restore ability to collect separate stats per action

2019-05-09 Thread Jamal Hadi Salim
On 2019-05-08 1:07 p.m., Edward Cree wrote: On 08/05/2019 15:02, Jamal Hadi Salim wrote: The lazy thing most people have done is essentially assume that there is a stat per filter rule... I wouldnt call it the 'the right thing' Yup, that's why I'm trying to not do that ;-) Thank you ;-> Y

[PATCH RFC net-next] netlink: Add support for timestamping messages

2019-05-09 Thread David Ahern
From: David Ahern Add support for timestamping netlink messages. If a socket wants a timestamp, it is added when the skb clone is queued to the socket. Allow userspace to know the actual time an event happened. In a busy system there can be a long lag between when the event happened and when the

Re: [PATCH bpf v2] selftests: bpf: initialize bpf_object pointers where needed

2019-05-09 Thread Martin Lau
On Wed, May 08, 2019 at 05:49:32PM +0100, Lorenz Bauer wrote: > There are a few tests which call bpf_object__close on uninitialized > bpf_object*, which may segfault. Explicitly zero-initialise these pointers > to avoid this. Acked-by: Martin KaFai Lau

Re: [PATCH bpf-next 1/2] bpf: Allow bpf_map_lookup_elem() on an xskmap

2019-05-09 Thread Jonathan Lemon
On 9 May 2019, at 4:48, Björn Töpel wrote: On Thu, 9 May 2019 at 01:07, Jonathan Lemon wrote: Currently, the AF_XDP code uses a separate map in order to determine if an xsk is bound to a queue. Instead of doing this, have bpf_map_lookup_elem() return a boolean indicating whether there is a v

[question] rp_filter=1 ~implies arp_filter

2019-05-09 Thread Michal Soltys
Hi, This got me a bit surprised actually and I'm wondering if it's intended. While both options are somewhat similar in their function, they do different things after all (and for different protocols): - arp_filter - whether all interfaces should consider responding for arp request (which th

Re: [PATCH] ptp_qoriq: fix NULL access if ptp dt node missing

2019-05-09 Thread David Miller
From: "Y.b. Lu" Date: Thu, 9 May 2019 03:07:12 + > From: Claudiu Manoil > > Make sure ptp dt node exists before accessing it in case > of NULL pointer call trace. > > Signed-off-by: Claudiu Manoil > Signed-off-by: Yangbo Lu Applied, thanks.

Re: [PATCH net] macvlan: disable SIOCSHWTSTAMP in container

2019-05-09 Thread David Miller
From: Hangbin Liu Date: Thu, 9 May 2019 14:54:08 +0800 > Miroslav pointed that with NET_ADMIN enabled in container, a normal user > could be mapped to root and is able to change the real device's rx > filter via ioctl on macvlan, which would affect the other ptp process on > host. Fix it by disa

Re: [PATCH net] vlan: disable SIOCSHWTSTAMP in container

2019-05-09 Thread David Miller
From: Hangbin Liu Date: Thu, 9 May 2019 14:55:07 +0800 > With NET_ADMIN enabled in container, a normal user could be mapped to > root and is able to change the real device's rx filter via ioctl on > vlan, which would affect the other ptp process on host. Fix it by > disabling SIOCSHWTSTAMP in co

Re: [PATCH net] selinux: do not report error on connect(AF_UNSPEC)

2019-05-09 Thread David Miller
From: Paolo Abeni Date: Thu, 09 May 2019 10:40:40 +0200 > @DaveM: if it's ok for you, I'll send a revert for this on netdev and > I'll send a v2 via the selinux ML, please let me know! Sure.

Re: [PATCH 1/3] aqc111: fix endianness issue in aqc111_change_mtu

2019-05-09 Thread David Miller
From: Oliver Neukum Date: Thu, 9 May 2019 11:08:16 +0200 > If the MTU is large enough, the first write to the device > is just repeated. On BE architectures, however, the first > word of the command will be swapped a second time and garbage > will be written. Avoid that. > > Signed-off-by: Oliv

Re: [PATCH 3/3] aqc111: fix double endianness swap on BE

2019-05-09 Thread David Miller
From: Oliver Neukum Date: Thu, 9 May 2019 11:08:18 +0200 > If you are using a function that does a swap in place, > you cannot just reuse the buffer on the assumption that it has > not been changed. > > Signed-off-by: Oliver Neukum Applied and queued up for -stable.

Re: [PATCH 2/3] aqc111: fix writing to the phy on BE

2019-05-09 Thread David Miller
From: Oliver Neukum Date: Thu, 9 May 2019 11:08:17 +0200 > When writing to the phy on BE architectures an internal data structure > was directly given, leading to it being byte swapped in the wrong > way for the CPU in 50% of all cases. A temporary buffer must be used. > > Signed-off-by: Oliver

Re: [PATCH net-next] sctp: remove unused cmd SCTP_CMD_GEN_INIT_ACK

2019-05-09 Thread David Miller
From: Neil Horman Date: Thu, 9 May 2019 07:32:35 -0400 > This is definately a valid cleanup, but I wonder if it wouldn't be better to, > instead of removing it, to use it. We have 2 locations where we actually call > sctp_make_init_ack, and then have to check the return code and abort the > oper

Re: [PATCH net] net/tcp: use deferred jump label for TCP acked data hook

2019-05-09 Thread David Miller
From: Jakub Kicinski Date: Wed, 8 May 2019 16:46:14 -0700 > User space can flip the clean_acked_data_enabled static branch > on and off with TLS offload when CONFIG_TLS_DEVICE is enabled. > jump_label.h suggests we use the delayed version in this case. > > Deferred branches now also don't take

Re: [PATCH] rtl8150: switch to BIT macro

2019-05-09 Thread David Miller
From: Petko Manolov Date: Thu, 9 May 2019 17:34:41 +0300 > On 19-05-09 11:01:06, Oliver Neukum wrote: >> A bit of housekeeping switching the driver to the BIT() >> macro. > > Looks good. I hope you've at least compiled the driver? :) > > Acked-by: Petko Manolov net-next is closed for cleanup

Re: [PATCH] net: aquantia: fix undefined devm_hwmon_device_register_with_info reference

2019-05-09 Thread David Miller
From: Kefeng Wang Date: Thu, 9 May 2019 23:32:35 +0800 > drivers/net/ethernet/aquantia/atlantic/aq_drvinfo.o: In function > `aq_drvinfo_init': > aq_drvinfo.c:(.text+0xe8): undefined reference to > `devm_hwmon_device_register_with_info' > > Fix it by using #if IS_REACHABLE(CONFIG_HWMON). > > R

Re: [PATCH RFC net-next] netlink: Add support for timestamping messages

2019-05-09 Thread David Miller
From: David Ahern Date: Thu, 9 May 2019 08:55:42 -0700 > From: David Ahern > > Add support for timestamping netlink messages. If a socket wants a > timestamp, it is added when the skb clone is queued to the socket. > > Allow userspace to know the actual time an event happened. In a > busy sys

Re: [PATCH net] net/tcp: use deferred jump label for TCP acked data hook

2019-05-09 Thread Eric Dumazet
On Thu, May 9, 2019 at 9:46 AM David Miller wrote: > > From: Jakub Kicinski > Date: Wed, 8 May 2019 16:46:14 -0700 > > > User space can flip the clean_acked_data_enabled static branch > > on and off with TLS offload when CONFIG_TLS_DEVICE is enabled. > > jump_label.h suggests we use the delayed

Re: [PATCH v6 bpf-next 01/17] bpf: verifier: offer more accurate helper function arg and return type

2019-05-09 Thread Jiong Wang
Jiong Wang writes: > At the moment we have single backend hook "bpf_jit_hardware_zext", once a > backend enable it, verifier just insert zero extension for all identified > alu32 and narrow loads. > > Given verifier analysis info is not pushed down to JIT back-ends, verifier > needs more back-

Re: [PATCH net] net/tcp: use deferred jump label for TCP acked data hook

2019-05-09 Thread David Miller
From: Jakub Kicinski Date: Wed, 8 May 2019 16:46:14 -0700 > User space can flip the clean_acked_data_enabled static branch > on and off with TLS offload when CONFIG_TLS_DEVICE is enabled. > jump_label.h suggests we use the delayed version in this case. > > Deferred branches now also don't take

Re: [PATCH bpf-next 1/2] bpf: Allow bpf_map_lookup_elem() on an xskmap

2019-05-09 Thread Alexei Starovoitov
On 5/9/19 9:12 AM, Jonathan Lemon wrote: > On 9 May 2019, at 4:48, Björn Töpel wrote: > >> On Thu, 9 May 2019 at 01:07, Jonathan Lemon >> wrote: >>> >>> Currently, the AF_XDP code uses a separate map in order to >>> determine if an xsk is bound to a queue.  Instead of doing this, >>> have bpf_ma

net: micrel: confusion about phyids used in driver

2019-05-09 Thread Uwe Kleine-König
Hello, I have a board here that has a KSZ8051MLL (datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/ksz8051mll.pdf, phyid: 0x0022155x) assembled. The actual phyid is 0x00221556. When enabling the micrel driver it successfully binds and claims to have detected a "Micrel KSZ8031" because p

Re: [PATCH] samples: bpf: fix style in bpf_load

2019-05-09 Thread Alexei Starovoitov
On Mon, May 6, 2019 at 6:03 AM Daniel T. Lee wrote: > > This commit fixes style problem in samples/bpf/bpf_load.c > > Styles that have been changed are: > - Magic string use of 'DEBUGFS' > - Useless zero initialization of a global variable > - Minor style fix with whitespace > > Signed-off-by:

Re: net: micrel: confusion about phyids used in driver

2019-05-09 Thread Heiner Kallweit
On 09.05.2019 22:29, Uwe Kleine-König wrote: > Hello, > > I have a board here that has a KSZ8051MLL (datasheet: > http://ww1.microchip.com/downloads/en/DeviceDoc/ksz8051mll.pdf, phyid: > 0x0022155x) assembled. The actual phyid is 0x00221556. > I think the datasheets are the source of the confusio

Question about setting custom STAB

2019-05-09 Thread Robert McCabe
Awhile ago I submitted this iproute2 patch: https://patchwork.ozlabs.org/patch/784165/ And the corresponding kernel patch: https://patchwork.ozlabs.org/patch/783696/ To allow the setting of arbitrary qdisc size table so that the packet scheduler code in __qdisc_calculate_pkt_len charges the corre

Re: net: micrel: confusion about phyids used in driver

2019-05-09 Thread Andrew Lunn
On Thu, May 09, 2019 at 10:55:29PM +0200, Heiner Kallweit wrote: > On 09.05.2019 22:29, Uwe Kleine-König wrote: > > Hello, > > > > I have a board here that has a KSZ8051MLL (datasheet: > > http://ww1.microchip.com/downloads/en/DeviceDoc/ksz8051mll.pdf, phyid: > > 0x0022155x) assembled. The actual

Re: [PATCH bpf v2] selftests: bpf: initialize bpf_object pointers where needed

2019-05-09 Thread Alexei Starovoitov
On Thu, May 9, 2019 at 8:56 AM Martin Lau wrote: > > On Wed, May 08, 2019 at 05:49:32PM +0100, Lorenz Bauer wrote: > > There are a few tests which call bpf_object__close on uninitialized > > bpf_object*, which may segfault. Explicitly zero-initialise these pointers > > to avoid this. > Acked-by: M

Re: [PATCH bpf] nfp: bpf: fix static check error through tightening shift amount adjustment

2019-05-09 Thread Alexei Starovoitov
On Tue, May 7, 2019 at 9:42 AM Jiong Wang wrote: > > NFP shift instruction has something special. If shift direction is left > then shift amount of 1 to 31 is specified as 32 minus the amount to shift. > > But no need to do this for indirect shift which has shift amount be 0. Even > after we do th

pull-request: bpf 2019-05-09

2019-05-09 Thread Alexei Starovoitov
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) three small fixes from Gary, Jiong and Lorenz. Please consider pulling these changes from: git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git Thanks a lot! ---

[PATCH net 2/2] net/tls: handle errors from padding_length()

2019-05-09 Thread Jakub Kicinski
At the time padding_length() is called the record header is still part of the message. If malicious TLS 1.3 peer sends an all-zero record padding_length() will stop at the record header, and return full length of the data including the tail_size. Subsequent subtraction of prot->overhead_size from

[PATCH net 1/2] net/tls: remove set but not used variables

2019-05-09 Thread Jakub Kicinski
Commit 4504ab0e6eb8 ("net/tls: Inform user space about send buffer availability") made us report write_space regardless whether partial record push was successful or not. Remove the now unused return value to clean up the following W=1 warning: net/tls/tls_device.c: In function ‘tls_device_write

[PATCH net 0/2] net/tls: fix W=1 build warnings

2019-05-09 Thread Jakub Kicinski
Hi! This small series cleans up two outstanding W=1 build warnings in tls code. Both are set but not used variables. The first case looks fairly straightforward. In the second I think it's better to propagate the error code, even if not doing some does not lead to a crash with current code. Jak

[PATCH net] nfp: add missing kdoc

2019-05-09 Thread Jakub Kicinski
Add missing kdoc for app member. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe --- drivers/net/ethernet/netronome/nfp/ccm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/netronome/nfp/ccm.h b/drivers/net/ethernet/netronome/nfp/ccm.h index e2fe4b8679

Re: Question about seccomp / bpf

2019-05-09 Thread Alexei Starovoitov
On Thu, May 09, 2019 at 01:49:25PM +0200, Daniel Borkmann wrote: > On 05/09/2019 12:58 PM, Eric Dumazet wrote: > > On Thu, May 9, 2019 at 3:52 AM Eric Dumazet wrote: > >> On Wed, May 8, 2019 at 9:47 PM Alexei Starovoitov > >> wrote: > >>> On Wed, May 08, 2019 at 04:17:29PM -0700, Eric Dumazet wro

Re: pull-request: bpf 2019-05-09

2019-05-09 Thread David Miller
From: Alexei Starovoitov Date: Thu, 9 May 2019 16:04:31 -0700 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) three small fixes from Gary, Jiong and Lorenz. > > Please consider pulling these changes from: > > git://git.kernel.org/pub/s

Re: [PATCH net 0/2] net/tls: fix W=1 build warnings

2019-05-09 Thread David Miller
From: Jakub Kicinski Date: Thu, 9 May 2019 16:14:05 -0700 > This small series cleans up two outstanding W=1 build > warnings in tls code. Both are set but not used variables. > The first case looks fairly straightforward. In the second > I think it's better to propagate the error code, even if

Re: [PATCH net] nfp: add missing kdoc

2019-05-09 Thread David Miller
From: Jakub Kicinski Date: Thu, 9 May 2019 16:19:34 -0700 > Add missing kdoc for app member. > > Signed-off-by: Jakub Kicinski > Reviewed-by: Dirk van der Merwe Applied, thanks Jakub.

Re: Question about seccomp / bpf

2019-05-09 Thread Alexei Starovoitov
On Thu, May 09, 2019 at 04:50:12PM -0700, Eric Dumazet wrote: > On Thu, May 9, 2019 at 4:30 PM Alexei Starovoitov > wrote: > > > > On Thu, May 09, 2019 at 01:49:25PM +0200, Daniel Borkmann wrote: > > > On 05/09/2019 12:58 PM, Eric Dumazet wrote: > > > > On Thu, May 9, 2019 at 3:52 AM Eric Dumazet

Re: Question about seccomp / bpf

2019-05-09 Thread Eric Dumazet
On Thu, May 9, 2019 at 4:30 PM Alexei Starovoitov wrote: > > On Thu, May 09, 2019 at 01:49:25PM +0200, Daniel Borkmann wrote: > > On 05/09/2019 12:58 PM, Eric Dumazet wrote: > > > On Thu, May 9, 2019 at 3:52 AM Eric Dumazet wrote: > > >> On Wed, May 8, 2019 at 9:47 PM Alexei Starovoitov > > >> w

Re: Question about seccomp / bpf

2019-05-09 Thread Kees Cook
On Thu, May 9, 2019 at 4:30 PM Alexei Starovoitov wrote: > I'm not sure how that can work. seccomp's prctl accepts a list of insns. > There is no handle. > kernel can keep a hashtable of all progs ever loaded and do a search > in it before loading another one, but that's an ugly hack. > Another al

Re: [PATCH v6 bpf-next 01/17] bpf: verifier: offer more accurate helper function arg and return type

2019-05-09 Thread Alexei Starovoitov
On Thu, May 09, 2019 at 01:32:30PM +0100, Jiong Wang wrote: > > Alexei Starovoitov writes: > > > On Wed, May 08, 2019 at 03:45:12PM +0100, Jiong Wang wrote: > >> > >> I might be misunderstanding your points, please just shout if I am wrong. > >> > >> Suppose the following BPF code: > >> > >>

[PATCH net] net/ibmvnic: Update MAC address settings after adapter reset

2019-05-09 Thread Thomas Falcon
It was discovered in testing that the underlying hardware MAC address will revert to initial settings following a device reset, but the driver fails to resend the current OS MAC settings. This oversight can result in dropped packets should the scenario occur. Fix this by informing hardware of curre

[PATCH net] net/ibmvnic: Update carrier state after link state change

2019-05-09 Thread Thomas Falcon
Only set the device carrier state to on after receiving an up link state indication from the underlying adapter. Likewise, if a down link indication is receieved, update the carrier state accordingly. This fix ensures that accurate carrier state is reported by the driver following a link state upda

[PATCH bpf] libbpf: detect supported kernel BTF features and sanitize BTF

2019-05-09 Thread Andrii Nakryiko
Depending on used versions of libbpf, Clang, and kernel, it's possible to have valid BPF object files with valid BTF information, that still won't load successfully due to Clang emitting newer BTF features (e.g., BTF_KIND_FUNC, .BTF.ext's line_info/func_info, BTF_KIND_DATASEC, etc), that are not ye

[bpf PATCH v4 0/4] sockmap/ktls fixes

2019-05-09 Thread John Fastabend
Series of fixes for sockmap and ktls, see patches for descriptions. v2: fix build issue for CONFIG_TLS_DEVICE and fixup couple comments from Jakub v3: fix issue where release could call unhash resulting in a use after free. Now we detach the ulp pointer before calling into destroy or

[bpf PATCH v4 1/4] bpf: tls, implement unhash to avoid transition out of ESTABLISHED

2019-05-09 Thread John Fastabend
It is possible (via shutdown()) for TCP socks to go through TCP_CLOSE state via tcp_disconnect() without calling into close callback. This would allow a kTLS enabled socket to exist outside of ESTABLISHED state which is not supported. Solve this the same way we solved the sock{map|hash} case by ad

[bpf PATCH v4 2/4] bpf: sockmap, only stop/flush strp if it was enabled at some point

2019-05-09 Thread John Fastabend
If we try to call strp_done on a parser that has never been initialized, because the sockmap user is only using TX side for example we get the following error. [ 883.422081] WARNING: CPU: 1 PID: 208 at kernel/workqueue.c:3030 __flush_work+0x1ca/0x1e0 ... [ 883.422095] Workqueue: events s

[bpf PATCH v4 3/4] bpf: sockmap remove duplicate queue free

2019-05-09 Thread John Fastabend
In tcp bpf remove we free the cork list and purge the ingress msg list. However we do this before the ref count reaches zero so it could be possible some other access is in progress. In this case (tcp close and/or tcp_unhash) we happen to also hold the sock lock so no path exists but lets fix it ot

[bpf PATCH v4 4/4] bpf: sockmap fix msg->sg.size account on ingress skb

2019-05-09 Thread John Fastabend
When converting a skb to msg->sg we forget to set the size after the latest ktls/tls code conversion. This patch can be reached by doing a redir into ingress path from BPF skb sock recv hook. Then trying to read the size fails. Fix this by setting the size. Fixes: 604326b41a6fb ("bpf, sockmap: co