Re: [PATCH] ath11k: Fix some resource leaks in error path in 'ath11k_thermal_register()'

2020-05-18 Thread Kalle Valo
Christophe JAILLET wrote: > If 'thermal_cooling_device_register()' fails, we must undo what has been > allocated so far. So we must go to 'err_thermal_destroy' instead of > returning directly > > In case of error in 'ath11k_thermal_register()', the previous > 'thermal_cooling_device_register()'

Re: [PATCH v2 bpf-next 2/7] bpf: move to generic BTF show support, apply it to seq files/strings

2020-05-18 Thread Yonghong Song
On 5/18/20 2:46 AM, Alan Maguire wrote: On Wed, 13 May 2020, Yonghong Song wrote: +struct btf_show { + u64 flags; + void *target; /* target of show operation (seq file, buffer) */ + void (*showfn)(struct btf_show *show, const char *fmt, ...); + const struct btf *b

Re: [PATCH v5 bpf-next 00/11] net: Add support for XDP in egress path

2020-05-18 Thread John Fastabend
David Ahern wrote: > On 5/18/20 12:10 PM, John Fastabend wrote: > >> > >> host ingress to VM is one use case; VM to VM on the same host is another. > > > > But host ingress to VM would still work with tail calls because the XDP > > packet came from another XDP program. At least that is how I under

Re: [PATCH V2] ifcvf: move IRQ request/free to status change handlers

2020-05-18 Thread Jason Wang
On 2020/5/19 上午9:51, Cindy Lu wrote: Hi ,Jason It works ok in the latest version of qemu vdpa code , So I think the patch is ok. Thanks Cindy Thanks for the testing, (btw, we'd better not do top posting when discuss in the community). So, Acked-by: Jason Wang On Wed, May 13, 2020 at

Re: clean up and streamline probe_kernel_* and friends v2

2020-05-18 Thread Christoph Hellwig
On Thu, May 14, 2020 at 01:04:38AM +0200, Daniel Borkmann wrote: > Aside from comments on list, the series looks reasonable to me. For BPF > the bpf_probe_read() helper would be slightly penalized for probing user > memory given we now test on copy_from_kernel_nofault() first and if that > fails on

Re: [PATCH 10/18] maccess: unify the probe kernel arch hooks

2020-05-18 Thread Christoph Hellwig
On Thu, May 14, 2020 at 10:13:18AM +0900, Masami Hiramatsu wrote: > > + bool strict) > > { > > long ret; > > mm_segment_t old_fs = get_fs(); > > > > + if (!probe_kernel_read_allowed(dst, src, size, strict)) > > + return -EFAULT; > > Could you make this return -ERAN

Re: [PATCH net-next 0/4] bnxt_en: Add new "enable_hot_fw_reset" generic devlink parameter

2020-05-18 Thread Vasundhara Volam
On Tue, May 19, 2020 at 10:57 AM Jiri Pirko wrote: > > Tue, May 19, 2020 at 06:31:27AM CEST, vasundhara-v.vo...@broadcom.com wrote: > >On Mon, May 18, 2020 at 4:31 PM Jiri Pirko wrote: > >> > >> Mon, May 18, 2020 at 10:27:15AM CEST, vasundhara-v.vo...@broadcom.com > >> wrote: > >> >This patchset

[PATCH bpf] bpf: prevent mmap()'ing read-only maps as writable

2020-05-18 Thread Andrii Nakryiko
As discussed in [0], it's dangerous to allow mapping BPF map, that's meant to be frozen and is read-only on BPF program side, because that allows user-space to actually store a writable view to the page even after it is frozen. This is exacerbated by BPF verifier making a strong assumption that con

Re: [bpf-next PATCH 1/4] bpf: verifier track null pointer branch_taken with JNE and JEQ

2020-05-18 Thread John Fastabend
Andrii Nakryiko wrote: > On Mon, May 18, 2020 at 1:05 PM John Fastabend > wrote: > > > > Current verifier when considering which branch may be taken on a > > conditional test with pointer returns -1 meaning either branch may > > be taken. But, we track if pointers can be NULL by using dedicated >

Re: [PATCH net-next 0/4] bnxt_en: Add new "enable_hot_fw_reset" generic devlink parameter

2020-05-18 Thread Jiri Pirko
Tue, May 19, 2020 at 06:31:27AM CEST, vasundhara-v.vo...@broadcom.com wrote: >On Mon, May 18, 2020 at 4:31 PM Jiri Pirko wrote: >> >> Mon, May 18, 2020 at 10:27:15AM CEST, vasundhara-v.vo...@broadcom.com wrote: >> >This patchset adds support for a "enable_hot_fw_reset" generic devlink >> >paramete

Re: [PATCH net-next 0/4] bnxt_en: Add new "enable_hot_fw_reset" generic devlink parameter

2020-05-18 Thread Jiri Pirko
Tue, May 19, 2020 at 01:43:09AM CEST, k...@kernel.org wrote: >On Mon, 18 May 2020 13:01:52 +0200 Jiri Pirko wrote: >> Mon, May 18, 2020 at 10:27:15AM CEST, vasundhara-v.vo...@broadcom.com wrote: >> >This patchset adds support for a "enable_hot_fw_reset" generic devlink >> >parameter and use it in b

Re: [RFC v2] current devlink extension plan for NICs

2020-05-18 Thread Jiri Pirko
Mon, May 18, 2020 at 11:05:45PM CEST, jacob.e.kel...@intel.com wrote: > > >On 5/17/2020 11:52 PM, Jiri Pirko wrote: >> Fri, May 15, 2020 at 11:36:19PM CEST, jacob.e.kel...@intel.com wrote: >>> >>> >>> On 5/15/2020 2:30 AM, Jiri Pirko wrote: Fri, May 15, 2020 at 01:52:54AM CEST, jacob.e.kel...@

RE: [RFC v2] current devlink extension plan for NICs

2020-05-18 Thread Parav Pandit
Hi Jake, > From: netdev-ow...@vger.kernel.org On > Behalf Of Jacob Keller > > > On 5/17/2020 11:52 PM, Jiri Pirko wrote: > > Fri, May 15, 2020 at 11:36:19PM CEST, jacob.e.kel...@intel.com wrote: > >> > >> > >> On 5/15/2020 2:30 AM, Jiri Pirko wrote: > >>> Fri, May 15, 2020 at 01:52:54AM CEST, j

Re: NET: r8168/r8169 identifying fix

2020-05-18 Thread Lauri Jakku
Hi, On 3.5.2020 16.54, Lauri Jakku wrote: Hi, On 3.5.2020 11.33, Heiner Kallweit wrote: On 03.05.2020 04:28, Lauri Jakku wrote: Hi, On 3.5.2020 4.34, Lauri Jakku wrote: Hi, On 3.5.2020 3.11, Lauri Jakku wrote: On 3.5.2020 2.15, Heiner Kallweit wrote: On 03.05.2020 00:42, Lauri Jakku wro

Re: [bpf-next PATCH 3/4] bpf: selftests, verifier case for non null pointer map value branch

2020-05-18 Thread Andrii Nakryiko
On Mon, May 18, 2020 at 1:07 PM John Fastabend wrote: > > When we have pointer type that is known to be non-null we only follow > the non-null branch. This adds tests to cover the map_value pointer > returned from a map lookup. To force an error if both branches are > followed we do an ALU op on R

Re: [bpf-next PATCH 4/4] bpf: selftests, add printk to test_sk_lookup_kern to encode null ptr check

2020-05-18 Thread Andrii Nakryiko
On Mon, May 18, 2020 at 1:05 PM John Fastabend wrote: > > Adding a printk to test_sk_lookup_kern created the reported failure > where a pointer type is checked twice for NULL. Lets add it to the > progs test test_sk_lookup_kern.c so we test the case from C all the > way into the verifier. > > We a

Re: [bpf-next PATCH 2/4] bpf: selftests, verifier case for non null pointer check branch taken

2020-05-18 Thread Andrii Nakryiko
On Mon, May 18, 2020 at 1:06 PM John Fastabend wrote: > > When we have pointer type that is known to be non-null we only follow > the non-null branch. This adds tests to cover this case for reference > tracking. > > Signed-off-by: John Fastabend > --- > .../testing/selftests/bpf/verifier/ref_tra

Re: [bpf-next PATCH 0/4] verifier, improve ptr is_branch_taken logic

2020-05-18 Thread Andrii Nakryiko
On Mon, May 18, 2020 at 1:05 PM John Fastabend wrote: > > Verifier logic to track pointer is_branch_taken logic to prune paths > that can not be taken. For many types we track if the pointer is null I re-read first sentence many times, still not sure what it is saying. Do you mind rephrasing it a

Re: [bpf-next PATCH 1/4] bpf: verifier track null pointer branch_taken with JNE and JEQ

2020-05-18 Thread Andrii Nakryiko
On Mon, May 18, 2020 at 1:05 PM John Fastabend wrote: > > Current verifier when considering which branch may be taken on a > conditional test with pointer returns -1 meaning either branch may > be taken. But, we track if pointers can be NULL by using dedicated > types for valid pointers (pointers

Re: [PATCH bpf-next] tools: bpftool: make capability check account for new BPF caps

2020-05-18 Thread Andrii Nakryiko
On Mon, May 18, 2020 at 6:03 PM Quentin Monnet wrote: > > 2020-05-18 17:07 UTC-0700 ~ Andrii Nakryiko > > On Fri, May 15, 2020 at 5:52 PM Quentin Monnet > > wrote: > >> > >> Following the introduction of CAP_BPF, and the switch from CAP_SYS_ADMIN > >> to other capabilities for various BPF featu

Re: [PATCH net-next 0/4] bnxt_en: Add new "enable_hot_fw_reset" generic devlink parameter

2020-05-18 Thread Vasundhara Volam
On Mon, May 18, 2020 at 4:31 PM Jiri Pirko wrote: > > Mon, May 18, 2020 at 10:27:15AM CEST, vasundhara-v.vo...@broadcom.com wrote: > >This patchset adds support for a "enable_hot_fw_reset" generic devlink > >parameter and use it in bnxt_en driver. > > > >Also, firmware spec. is updated to 1.10.1.4

Re: [PATCH net-next 6/6] selftests: net: add fdb nexthop tests

2020-05-18 Thread David Ahern
On 5/18/20 8:14 PM, Roopa Prabhu wrote: > diff --git a/tools/testing/selftests/net/fib_nexthops.sh > b/tools/testing/selftests/net/fib_nexthops.sh > index 50d822f..eb4c270 100755 > --- a/tools/testing/selftests/net/fib_nexthops.sh > +++ b/tools/testing/selftests/net/fib_nexthops.sh > @@ -19,8 +19,

Re: [PATCH net-next 3/6] vxlan: ecmp support for mac fdb entries

2020-05-18 Thread David Ahern
On 5/18/20 8:14 PM, Roopa Prabhu wrote: > diff --git a/include/net/nexthop.h b/include/net/nexthop.h > index 04dafc6..d929c98 100644 > --- a/include/net/nexthop.h > +++ b/include/net/nexthop.h > @@ -331,6 +331,8 @@ static inline struct fib_nh_common > *nexthop_path_fdb_result(struct nexthop *nh, >

Re: [PATCH net-next 2/6] nexthop: support for fdb ecmp nexthops

2020-05-18 Thread David Ahern
On 5/18/20 8:14 PM, Roopa Prabhu wrote: > diff --git a/net/core/neighbour.c b/net/core/neighbour.c > index b607ea6..37e4dba 100644 > --- a/net/core/neighbour.c > +++ b/net/core/neighbour.c > @@ -1771,6 +1771,7 @@ static struct neigh_table *neigh_find_table(int family) > } > > const struct nla_

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

2020-05-18 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the ipsec-next tree got a conflict in: net/ipv6/af_inet6.c between commit: 3986912f6a9a ("ipv6: move SIOCADDRT and SIOCDELRT handling into ->compat_ioctl") from the net-next tree and commit: 0146dca70b87 ("xfrm: add support for UDPv6 encapsulation of

Re: [PATCH net-next 1/6] nexthop: dereference nh only once in nexthop_select_path

2020-05-18 Thread David Ahern
On 5/18/20 8:14 PM, Roopa Prabhu wrote: > From: Nikolay Aleksandrov > > the ->nh pointer might become suddenly null while we're selecting the > path and we may dereference it. Dereference it only once in the > beginning and use that if it's not null, we rely on the refcounting and > rcu to protec

Re: Maintainers / Kernel Summit 2020 planning kick-off

2020-05-18 Thread Frank Rowand
+ ksummit-disc...@lists.linuxfoundation.org On 5/15/20 11:39 AM, Theodore Y. Ts'o wrote: > [ Feel free to forward this to other Linux kernel mailing lists as > appropriate -- Ted ] Hi Ted, Can you please add ksummit-disc...@lists.linuxfoundation.org to future related emails? Thanks, Frank >

[no subject]

2020-05-18 Thread Bhakti Sagar
unsubscribe

[PATCH net-next 6/6] selftests: net: add fdb nexthop tests

2020-05-18 Thread Roopa Prabhu
From: Roopa Prabhu This commit adds ipv4 and ipv6 fdb api tests to fib_nexthops.sh. Signed-off-by: Roopa Prabhu --- tools/testing/selftests/net/fib_nexthops.sh | 140 +++- 1 file changed, 138 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/fib_ne

[PATCH net-next 5/6] vxlan: support for nexthop notifiers

2020-05-18 Thread Roopa Prabhu
From: Roopa Prabhu vxlan driver registers for nexthop add/del notifiers to cleanup fdb entries pointing to such nexthops. Signed-off-by: Roopa Prabhu --- drivers/net/vxlan.c | 33 + 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/drivers/net/vxlan

[PATCH net-next 2/6] nexthop: support for fdb ecmp nexthops

2020-05-18 Thread Roopa Prabhu
From: Roopa Prabhu This patch introduces ecmp nexthops and nexthop groups for mac fdb entries. In subsequent patches this is used by the vxlan driver fdb entries. The use case is E-VPN multihoming [1,2,3] which requires bridged vxlan traffic to be load balanced to remote switches (vteps) belongin

[PATCH net-next 0/6] Support for fdb ECMP nexthop groups

2020-05-18 Thread Roopa Prabhu
From: Roopa Prabhu This series introduces ecmp nexthops and nexthop groups for mac fdb entries. In subsequent patches this is used by the vxlan driver fdb entries. The use case is E-VPN multihoming [1,2,3] which requires bridged vxlan traffic to be load balanced to remote switches (vteps) belongi

[PATCH net-next 3/6] vxlan: ecmp support for mac fdb entries

2020-05-18 Thread Roopa Prabhu
From: Roopa Prabhu Todays vxlan mac fdb entries can point to multiple remote ips (rdsts) with the sole purpose of replicating broadcast-multicast and unknown unicast packets to those remote ips. E-VPN multihoming [1,2,3] requires bridged vxlan traffic to be load balanced to remote switches (vtep

[PATCH net-next 1/6] nexthop: dereference nh only once in nexthop_select_path

2020-05-18 Thread Roopa Prabhu
From: Nikolay Aleksandrov the ->nh pointer might become suddenly null while we're selecting the path and we may dereference it. Dereference it only once in the beginning and use that if it's not null, we rely on the refcounting and rcu to protect against use-after-free. (This is needed for later

[PATCH net-next 4/6] nexthop: add support for notifiers

2020-05-18 Thread Roopa Prabhu
From: Roopa Prabhu This patch adds nexthop add/del notifiers. To be used by vxlan driver in a later patch. Could possibly be used by switchdev drivers in the future. Signed-off-by: Roopa Prabhu --- include/net/netns/nexthop.h | 1 + include/net/nexthop.h | 12 net/ipv4/next

Re: [PATCH V2] ifcvf: move IRQ request/free to status change handlers

2020-05-18 Thread Cindy Lu
Hi ,Jason It works ok in the latest version of qemu vdpa code , So I think the patch is ok. Thanks Cindy On Wed, May 13, 2020 at 3:18 PM Jason Wang wrote: > > > On 2020/5/13 下午12:42, Zhu, Lingshan wrote: > > > > > > On 5/13/2020 12:12 PM, Jason Wang wrote: > >> > >> On 2020/5/12 下午4:00, Zhu Lingsh

Re: [PATCH bpf-next] selftest/bpf: make bpf_iter selftest compilable against old vmlinux.h

2020-05-18 Thread Yonghong Song
On 5/18/20 4:45 PM, Andrii Nakryiko wrote: It's good to be able to compile bpf_iter selftest even on systems that don't have the very latest vmlinux.h, e.g., for libbpf tests against older kernels in Travis CI. To that extent, re-define bpf_iter_meta and corresponding bpf_iter context structs

Re: UBSAN: array-index-out-of-bounds in kernel/bpf/arraymap.c:177

2020-05-18 Thread Yonghong Song
On 5/18/20 6:30 PM, Andrii Nakryiko wrote: On Mon, May 18, 2020 at 6:00 PM Yonghong Song wrote: On 5/18/20 5:25 PM, Andrii Nakryiko wrote: On Mon, May 18, 2020 at 5:09 PM Qian Cai wrote: On Mon, May 18, 2020 at 7:55 PM Andrii Nakryiko wrote: On Sun, May 17, 2020 at 7:45 PM Qian Cai

RE: [net-next v5 4/9] igc: Use netdev log helpers in igc_ethtool.c

2020-05-18 Thread Kirsher, Jeffrey T
> -Original Message- > From: Joe Perches > Sent: Monday, May 18, 2020 18:22 > To: Kirsher, Jeffrey T ; da...@davemloft.net > Cc: Guedes, Andre ; netdev@vger.kernel.org; > nhor...@redhat.com; sassm...@redhat.com; Brown, Aaron F > > Subject: Re: [net-next v5 4/9] igc: Use netdev log helpers

Re: [PATCH v2 12/15] ath10k: use new module_firmware_crashed()

2020-05-18 Thread Brian Norris
On Sat, May 16, 2020 at 6:51 AM Johannes Berg wrote: > In addition, look what we have in iwl_trans_pcie_removal_wk(). If we > detect that the device is really wedged enough that the only way we can > still try to recover is by completely unbinding the driver from it, then > we give userspace a uev

Re: UBSAN: array-index-out-of-bounds in kernel/bpf/arraymap.c:177

2020-05-18 Thread Andrii Nakryiko
On Mon, May 18, 2020 at 6:00 PM Yonghong Song wrote: > > > > On 5/18/20 5:25 PM, Andrii Nakryiko wrote: > > On Mon, May 18, 2020 at 5:09 PM Qian Cai wrote: > >> > >> On Mon, May 18, 2020 at 7:55 PM Andrii Nakryiko > >> wrote: > >>> > >>> On Sun, May 17, 2020 at 7:45 PM Qian Cai wrote: > >

Re: [net-next v5 4/9] igc: Use netdev log helpers in igc_ethtool.c

2020-05-18 Thread Joe Perches
On Mon, 2020-05-18 at 18:03 -0700, Jeff Kirsher wrote: > This patch converts all dev_* calls to netdev_*. [] > diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c > b/drivers/net/ethernet/intel/igc/igc_ethtool.c [] > @@ -1904,7 +1905,7 @@ static void igc_diag_test(struct net_device *netdev,

[PATCH] net: bmac: Fix read of MAC address from ROM

2020-05-18 Thread Jeremy Kerr
In bmac_get_station_address, We're reading two bytes at a time from ROM, but we do that six times, resulting in 12 bytes of read & writes. This means we will write off the end of the six-byte destination buffer. This change fixes the for-loop to only read/write six bytes. Based on a proposed fix

[net-next v5 3/9] igc: add support to eeprom, registers and link self-tests

2020-05-18 Thread Jeff Kirsher
From: Vitaly Lifshits Introduced igc_diag.c and igc_diag.h, these files have the diagnostics functionality of igc driver. For the time being these files are being used by ethtool self-test callbacks. Which mean that eeprom, registers and link self-tests for ethtool were implemented. Signed-off-b

[net-next v5 2/9] igc: Use netdev log helpers in igc_main.c

2020-05-18 Thread Jeff Kirsher
From: Andre Guedes In igc_main.c we print log messages using both dev_* and netdev_* helpers, generating inconsistent output. Since this is a network device driver, we should preferably use netdev_* helpers because they append the interface name to the message, helping making sense out of the log

[net-next v5 5/9] igc: Use netdev log helpers in igc_ptp.c

2020-05-18 Thread Jeff Kirsher
From: Andre Guedes In igc_ptp.c we print log messages using dev_* helpers, generating inconsistent output with the rest of the driver. Since this is a network device driver, we should preferably use netdev_* helpers because they append the interface name to the message, helping making sense out o

[net-next v5 8/9] igc: Remove unneeded definition

2020-05-18 Thread Jeff Kirsher
From: Sasha Neftin PHY_FORCE_LIMIT definition not in use and could be removed i225 parts support auto negotiation mechanism Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_defines.h | 1 - 1 file changed, 1 deletion(-) di

[net-next v5 6/9] igc: Use netdev log helpers in igc_dump.c

2020-05-18 Thread Jeff Kirsher
From: Andre Guedes In igc_dump.c we print log messages using dev_* and pr_* helpers, generating inconsistent output with the rest of the driver. Since this is a network device driver, we should preferably use netdev_* helpers because they append the interface name to the message, helping making s

[net-next v5 7/9] igc: Use netdev log helpers in igc_base.c

2020-05-18 Thread Jeff Kirsher
From: Andre Guedes This patch coverts one pr_debug() call to hw_dbg() in order to keep log output aligned with the rest of the driver. hw_dbg() is actually a macro defined in igc_hw.h that expands to netdev_dbg(). Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher

[net-next v5 4/9] igc: Use netdev log helpers in igc_ethtool.c

2020-05-18 Thread Jeff Kirsher
From: Andre Guedes In igc_ethtool.c we print log messages using dev_* helpers, generating inconsistent output with the rest of the driver. Since this is a network device driver, we should preferably use netdev_* helpers because they append the interface name to the message, helping making sense t

Re: [PATCH v2 12/15] ath10k: use new module_firmware_crashed()

2020-05-18 Thread Luis Chamberlain
On Mon, May 18, 2020 at 03:16:45PM -0700, Jakub Kicinski wrote: > On Mon, 18 May 2020 21:22:02 + Luis Chamberlain wrote: > > Indeed my issue with devlink is that it did not seem generic enough for > > all devices which use firmware and for which firmware can crash. Support > > should not have t

[net-next v5 0/9][pull request] 1GbE Intel Wired LAN Driver Updates 2020-05-18

2020-05-18 Thread Jeff Kirsher
This series contains updates to igc driver only. Sasha adds ECN support for TSO by adding the NETIF_F_TSO_ECN flag, which aligns with other Intel drivers. Also cleaned up defines that are not supported or used in the igc driver. Andre does most of the changes with updating the log messages for i

[net-next v5 9/9] igc: Remove unneeded register

2020-05-18 Thread Jeff Kirsher
From: Sasha Neftin Flow control status register not applicable for i225 parts so clean up the unneeded define. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_regs.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drive

[net-next v5 1/9] igc: Add ECN support for TSO

2020-05-18 Thread Jeff Kirsher
From: Sasha Neftin Align with other Intel drivers and add ECN support for TSO. Add NETIF_F_TSO_ECN flag Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/ne

Re: [PATCH bpf-next] tools: bpftool: make capability check account for new BPF caps

2020-05-18 Thread Quentin Monnet
2020-05-18 17:07 UTC-0700 ~ Andrii Nakryiko > On Fri, May 15, 2020 at 5:52 PM Quentin Monnet wrote: >> >> Following the introduction of CAP_BPF, and the switch from CAP_SYS_ADMIN >> to other capabilities for various BPF features, update the capability >> checks (and potentially, drops) in bpftool

Re: UBSAN: array-index-out-of-bounds in kernel/bpf/arraymap.c:177

2020-05-18 Thread Yonghong Song
On 5/18/20 5:25 PM, Andrii Nakryiko wrote: On Mon, May 18, 2020 at 5:09 PM Qian Cai wrote: On Mon, May 18, 2020 at 7:55 PM Andrii Nakryiko wrote: On Sun, May 17, 2020 at 7:45 PM Qian Cai wrote: With Clang 9.0.1, return array->value + array->elem_size * (index & array->index_mask); b

Re: [PATCH] net: bmac: Fix stack corruption panic in bmac_probe()

2020-05-18 Thread Jeremy Kerr
Hi Stan, > The new kernel compiled and booted with no errors, with these > STACKPROTECTOR options in .config (the last two revealed the bug): > > CONFIG_HAVE_STACKPROTECTOR=y > CONFIG_CC_HAS_STACKPROTECTOR_NONE=y > CONFIG_STACKPROTECTOR=y > CONFIG_STACKPROTECTOR_STRONG=y Brilliant, thanks for te

Re: [PATCH net-next] r8169: make rtl_rx better readable

2020-05-18 Thread David Miller
From: Heiner Kallweit Date: Mon, 18 May 2020 22:14:21 +0200 > Avoid the goto from the rx error handling branch into the else branch, > and in general avoid having the main rx work in the else branch. > In addition ensure proper reverse xmas tree order of variables in the > for loop. > > No funct

Re: [PATCH v2 net-next] r8169: work around an irq coalescing related tx timeout

2020-05-18 Thread David Miller
From: Heiner Kallweit Date: Mon, 18 May 2020 22:47:16 +0200 > In [0] a user reported reproducible tx timeouts on RTL8168f except > PktCntrDisable is set and irq coalescing is enabled. > Realtek told me that they are not aware of any related hw issue on > this chip version, therefore root cause is

Re: [PATCH net-next] r8169: improve rtl8169_mark_to_asic

2020-05-18 Thread David Miller
From: Heiner Kallweit Date: Mon, 18 May 2020 22:22:09 +0200 > Let the compiler decide about inlining, and as confirmed by Eric it's > better to use WRITE_ONCE here to ensure that the descriptor ownership > is transferred to NIC immediately. > > Signed-off-by: Heiner Kallweit Applied.

Re: [PATCH v1] net: seeq: Use %pM format specifier for MAC addresses

2020-05-18 Thread David Miller
From: Andy Shevchenko Date: Mon, 18 May 2020 22:21:28 +0300 > Convert to %pM instead of using custom code. > > Signed-off-by: Andy Shevchenko Applied.

Re: [PATCH v1] cxgb4: Use %pM format specifier for MAC addresses

2020-05-18 Thread David Miller
From: Andy Shevchenko Date: Mon, 18 May 2020 22:18:31 +0300 > Convert to %pM instead of using custom code. > > Signed-off-by: Andy Shevchenko Applied.

Re: [PATCH 4/4] ipv6: symbol_get to access a sit symbol

2020-05-18 Thread David Miller
From: Christoph Hellwig Date: Mon, 18 May 2020 08:30:43 +0200 > I'll look into implenenting the tunnel_ctl method just for kernel > callers (plus maybe a generic helper for the ioctl), and we'll see if > you like that better. Ok, thank you.

Re: move the SIOCDELRT and SIOCADDRT compat_ioctl handlers v3

2020-05-18 Thread David Miller
From: Christoph Hellwig Date: Mon, 18 May 2020 08:28:04 +0200 > this series moves the compat_ioctl handlers into the protocol handlers, > avoiding the need to override the address space limited as in the current > handler. > > Changes since v3: > - moar variable reordering > > Changes since v1

Re: [PATCH net 1/1] net sched: fix reporting the first-time use timestamp

2020-05-18 Thread David Miller
From: Roman Mashak Date: Sun, 17 May 2020 08:46:31 -0400 > When a new action is installed, firstuse field of 'tcf_t' is explicitly set > to 0. Value of zero means "new action, not yet used"; as a packet hits the > action, 'firstuse' is stamped with the current jiffies value. > > tcf_tm_dump() sh

Re: [PATCH] net/tls: fix encryption error checking

2020-05-18 Thread Jakub Kicinski
On Tue, 19 May 2020 02:55:16 +0300 Vadim Fedorenko wrote: > On 19.05.2020 02:23, Jakub Kicinski wrote: > > On Tue, 19 May 2020 02:05:29 +0300 Vadim Fedorenko wrote: > >> On 19.05.2020 01:30, Jakub Kicinski wrote: > tls_push_record can return -EAGAIN because of tcp layer. In that > cas

Re: UBSAN: array-index-out-of-bounds in kernel/bpf/arraymap.c:177

2020-05-18 Thread Andrii Nakryiko
On Mon, May 18, 2020 at 5:09 PM Qian Cai wrote: > > On Mon, May 18, 2020 at 7:55 PM Andrii Nakryiko > wrote: > > > > On Sun, May 17, 2020 at 7:45 PM Qian Cai wrote: > > > > > > With Clang 9.0.1, > > > > > > return array->value + array->elem_size * (index & array->index_mask); > > > > > > but arr

Re: [PATCH bpf-next] bpf: fix too large copy from user in bpf_test_init

2020-05-18 Thread Andrii Nakryiko
On Mon, May 18, 2020 at 6:08 AM Jesper Dangaard Brouer wrote: > > Commit bc56c919fce7 ("bpf: Add xdp.frame_sz in bpf_prog_test_run_xdp().") > recently changed bpf_prog_test_run_xdp() to use larger frames for XDP in > order to test tail growing frames (via bpf_xdp_adjust_tail) and to have > memory

[PATCH net] net: inet_csk: Fix so_reuseport bind-address cache in tb->fast*

2020-05-18 Thread Martin KaFai Lau
The commit 637bc8bbe6c0 ("inet: reset tb->fastreuseport when adding a reuseport sk") added a bind-address cache in tb->fast*. The tb->fast* caches the address of a sk which has successfully been binded with SO_REUSEPORT ON. The idea is to avoid the expensive conflict search in inet_csk_bind_conf

Re: UBSAN: array-index-out-of-bounds in kernel/bpf/arraymap.c:177

2020-05-18 Thread Qian Cai
On Mon, May 18, 2020 at 7:55 PM Andrii Nakryiko wrote: > > On Sun, May 17, 2020 at 7:45 PM Qian Cai wrote: > > > > With Clang 9.0.1, > > > > return array->value + array->elem_size * (index & array->index_mask); > > > > but array->value is, > > > > char value[0] __aligned(8); > > This, and ptrs an

Re: [PATCH bpf-next] tools: bpftool: make capability check account for new BPF caps

2020-05-18 Thread Andrii Nakryiko
On Fri, May 15, 2020 at 5:52 PM Quentin Monnet wrote: > > Following the introduction of CAP_BPF, and the switch from CAP_SYS_ADMIN > to other capabilities for various BPF features, update the capability > checks (and potentially, drops) in bpftool for feature probes. Because > bpftool and/or the s

Re: [PATCH v5 bpf-next 00/11] net: Add support for XDP in egress path

2020-05-18 Thread David Ahern
On 5/18/20 3:06 PM, Daniel Borkmann wrote: > So given we neither call this hook on the skb path, nor XDP_TX nor > AF_XDP's TX > path, I was wondering also wrt the discussion with John if it makes > sense to > make this hook a property of the devmap _itself_, for example, to have a > default > BPF p

Re: UBSAN: array-index-out-of-bounds in kernel/bpf/arraymap.c:177

2020-05-18 Thread Andrii Nakryiko
On Sun, May 17, 2020 at 7:45 PM Qian Cai wrote: > > With Clang 9.0.1, > > return array->value + array->elem_size * (index & array->index_mask); > > but array->value is, > > char value[0] __aligned(8); This, and ptrs and pptrs, should be flexible arrays. But they are in a union, and unions don't s

Re: [PATCH] net/tls: fix encryption error checking

2020-05-18 Thread Vadim Fedorenko
On 19.05.2020 02:23, Jakub Kicinski wrote: On Tue, 19 May 2020 02:05:29 +0300 Vadim Fedorenko wrote: On 19.05.2020 01:30, Jakub Kicinski wrote: tls_push_record can return -EAGAIN because of tcp layer. In that case open_rec is already in the tx_record list and should not be freed. Also the recor

Re: [PATCH net-next] net: phy: simplify phy_link_change arguments

2020-05-18 Thread David Miller
From: Doug Berger Date: Mon, 18 May 2020 15:23:59 -0700 > This function was introduced to allow for different handling of > link up and link down events particularly with regard to the > netif_carrier. The third argument do_carrier allowed the flag to > be left unchanged. > > Since then the phyl

Re: [PATCH net-next 2/2] qed: Add XRC to RoCE

2020-05-18 Thread David Miller
From: Yuval Basson Date: Tue, 19 May 2020 01:21:00 +0300 > --- a/drivers/net/ethernet/qlogic/qed/qed_rdma.c > +++ b/drivers/net/ethernet/qlogic/qed/qed_rdma.c > @@ -212,6 +212,15 @@ static int qed_rdma_alloc(struct qed_hwfn *p_hwfn) > goto free_rdma_port; > } > > + /* Al

Re: [PATCH v5 bpf-next 00/11] net: Add support for XDP in egress path

2020-05-18 Thread David Ahern
On 5/18/20 12:10 PM, John Fastabend wrote: >> >> host ingress to VM is one use case; VM to VM on the same host is another. > > But host ingress to VM would still work with tail calls because the XDP > packet came from another XDP program. At least that is how I understand > it. > > VM to VM case,

Re: [net-next v4 0/9][pull request] 1GbE Intel Wired LAN Driver Updates 2020-05-18

2020-05-18 Thread David Miller
From: Jeff Kirsher Date: Mon, 18 May 2020 15:16:48 -0700 > v4: Updated the patch description for patch 2, which referred to changes > that no longer existed in the patch Jeff, please.Patches #4 thru #7 are the same exact change and have the same exact problem in the commit message. Plea

Re: [PATCH bpf-next] selftests/bpf: add general instructions for test execution

2020-05-18 Thread Andrii Nakryiko
On Mon, May 18, 2020 at 4:24 AM Alan Maguire wrote: > > Getting a clean BPF selftests run involves ensuring latest trunk LLVM/clang > are used, pahole is recent (>=1.16) and config matches the specified > config file as closely as possible. Document all of this in the general > README.rst file.

[PATCH bpf-next] selftest/bpf: make bpf_iter selftest compilable against old vmlinux.h

2020-05-18 Thread Andrii Nakryiko
It's good to be able to compile bpf_iter selftest even on systems that don't have the very latest vmlinux.h, e.g., for libbpf tests against older kernels in Travis CI. To that extent, re-define bpf_iter_meta and corresponding bpf_iter context structs in each selftest. To avoid type clashes with vml

Re: [PATCH net-next 0/4] bnxt_en: Add new "enable_hot_fw_reset" generic devlink parameter

2020-05-18 Thread Jakub Kicinski
On Mon, 18 May 2020 13:01:52 +0200 Jiri Pirko wrote: > Mon, May 18, 2020 at 10:27:15AM CEST, vasundhara-v.vo...@broadcom.com wrote: > >This patchset adds support for a "enable_hot_fw_reset" generic devlink > >parameter and use it in bnxt_en driver. > > > >Also, firmware spec. is updated to 1.10.1.4

Re: [PATCH v5 bpf-next 00/11] net: Add support for XDP in egress path

2020-05-18 Thread David Ahern
On 5/18/20 12:00 PM, Toke Høiland-Jørgensen wrote: > I meant 'less powerful' in the obvious sense: it only sees a subset of > the packets going out of the interface. And so I worry that it will (a) > make an already hard to use set of APIs even more confusing, and (b) > turn out to not be enough so

Re: [PATCH net] cxgb4/chcr: Enable ktls settings at run time

2020-05-18 Thread Jakub Kicinski
On Mon, 18 May 2020 14:29:18 +0530 Rohit Maheshwari wrote: > for_each_port(adap, i) { > netdev = adap->port[i]; > - netdev->features |= NETIF_F_HW_TLS_TX; > netdev->hw_features |= NETIF_F_HW_TLS_TX; > netdev->tlsdev_ops = &chcr_ktls_ops; >

Re: [PATCH] net/tls: fix encryption error checking

2020-05-18 Thread Jakub Kicinski
On Tue, 19 May 2020 02:05:29 +0300 Vadim Fedorenko wrote: > On 19.05.2020 01:30, Jakub Kicinski wrote: > > > tls_push_record can return -EAGAIN because of tcp layer. In that > > > case open_rec is already in the tx_record list and should not be > > > freed. > > > Also the record size can be more th

[PATCH net-next 1/2] qed: changes to ILT to support XRC

2020-05-18 Thread Yuval Basson
First ILT page for TSDM client is allocated for XRC-SRQ's. For regular SRQ's skip first ILT page that is reserved for XRC-SRQ's. Signed-off-by: Yuval Bason --- drivers/net/ethernet/qlogic/qed/qed_cxt.c | 60 +- drivers/net/ethernet/qlogic/qed/qed_cxt.h | 10 - d

[PATCH net-next 2/2] qed: Add XRC to RoCE

2020-05-18 Thread Yuval Basson
Add support for XRC-SRQ's and XRC-QP's for upper layer driver. We maintain separate bitmaps for resource management for srq and xrc-srq, However, the range in FW is one, The xrc-srq's are first and then the srq's follow. Therefore we maintain a srq-id offset. Signed-off-by: Michal Kalderon Signe

[PATCH net-next 0/2] qed: Add xrc core support for RoCE

2020-05-18 Thread Yuval Basson
This patch adds support for configuring XRC and provides the necessary APIs for rdma upper layer driver (qedr) to enable the XRC feature. Yuval Bason (2): qed: changes to ILT to support XRC. qed: Add XRC to RoCE. drivers/net/ethernet/qlogic/qed/qed_cxt.c | 62 +++-- drivers/net/eth

Re: [next-queue RFC 0/4] ethtool: Add support for frame preemption

2020-05-18 Thread Jakub Kicinski
On Mon, 18 May 2020 16:05:08 -0700 Vinicius Costa Gomes wrote: > Jakub Kicinski writes: > >> That was the (only?) strong argument in favor of having frame preemption > >> in the TC side when this was last discussed. > >> > >> We can have a hybrid solution, we can move the express/preemptible per

Re: [PATCH] net/tls: fix encryption error checking

2020-05-18 Thread Vadim Fedorenko
On 19.05.2020 01:30, Jakub Kicinski wrote: > tls_push_record can return -EAGAIN because of tcp layer. In that > case open_rec is already in the tx_record list and should not be > freed. > Also the record size can be more than the size requested to write > in tls_sw_do_sendpage(). That leads to

Re: [next-queue RFC 0/4] ethtool: Add support for frame preemption

2020-05-18 Thread Vinicius Costa Gomes
Jakub Kicinski writes: >> That was the (only?) strong argument in favor of having frame preemption >> in the TC side when this was last discussed. >> >> We can have a hybrid solution, we can move the express/preemptible per >> queue map to mqprio/taprio/whatever. And have the more specific >> co

Re: [PATCH net] net/tls(TLS_SW): Fix integrity issue with non-blocking sw KTLS request

2020-05-18 Thread Jakub Kicinski
On Sun, 17 May 2020 16:26:36 + Pooja Trivedi wrote: > In pure sw ktls(AES-NI), -EAGAIN from tcp layer (do_tcp_sendpages for > encrypted record) gets treated as error, subtracts the offset, and > returns to application. Because of this, application sends data from > subtracted offset, which lead

[PATCH bpf-next v2 3/4] bpf, bpftool: enable get{peer,sock}name attach types

2020-05-18 Thread Daniel Borkmann
Make bpftool aware and add the new get{peer,sock}name attach types to its cli, documentation and bash completion to allow attachment/detachment of sock_addr programs there. Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Andrey Ignatov --- .../bpf/bpftool/Documentation/bpfto

[PATCH bpf-next v2 0/4] Add get{peer,sock}name cgroup attach types

2020-05-18 Thread Daniel Borkmann
Trivial patch to add get{peer,sock}name cgroup attach types to the BPF sock_addr programs in order to enable rewriting sockaddr structs from both calls along with libbpf and bpftool support as well as selftests. Thanks! v1 -> v2: - use __u16 for ports in start_server_with_port() signature and i

[PATCH bpf-next v2 1/4] bpf: add get{peer,sock}name attach types for sock_addr

2020-05-18 Thread Daniel Borkmann
As stated in 983695fa6765 ("bpf: fix unconnected udp hooks"), the objective for the existing cgroup connect/sendmsg/recvmsg/bind BPF hooks is to be transparent to applications. In Cilium we make use of these hooks [0] in order to enable E-W load balancing for existing Kubernetes service types for a

[PATCH bpf-next v2 4/4] bpf, testing: add get{peer,sock}name selftests to test_progs

2020-05-18 Thread Daniel Borkmann
Extend the existing connect_force_port test to assert get{peer,sock}name programs as well. The workflow for e.g. IPv4 is as follows: i) server binds to concrete port, ii) client calls getsockname() on server fd which exposes 1.2.3.4:6 to client, iii) client connects to service address 1.2.3.4:

[PATCH bpf-next v2 2/4] bpf, libbpf: enable get{peer,sock}name attach types

2020-05-18 Thread Daniel Borkmann
Trivial patch to add the new get{peer,sock}name attach types to the section definitions in order to hook them up to sock_addr cgroup program type. Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Andrey Ignatov --- tools/lib/bpf/libbpf.c | 8 1 file changed, 8 insert

Re: [PATCH] net/tls: fix encryption error checking

2020-05-18 Thread Jakub Kicinski
On Sun, 17 May 2020 02:48:39 +0300 Vadim Fedorenko wrote: > tls_push_record can return -EAGAIN because of tcp layer. In that > case open_rec is already in the tx_record list and should not be > freed. > Also the record size can be more than the size requested to write > in tls_sw_do_sendpage(). Tha

Re: [PATCH bpf-next 4/4] bpf, testing: add get{peer,sock}name selftests to test_progs

2020-05-18 Thread Daniel Borkmann
On 5/19/20 12:17 AM, Andrey Ignatov wrote: Daniel Borkmann [Mon, 2020-05-18 08:35 -0700]: Extend the existing connect_force_port test to assert get{peer,sock}name programs as well. The workflow for e.g. IPv4 is as follows: i) server binds to concrete port, ii) client calls getsockname() on ser

[PATCH net-next] net: phy: simplify phy_link_change arguments

2020-05-18 Thread Doug Berger
This function was introduced to allow for different handling of link up and link down events particularly with regard to the netif_carrier. The third argument do_carrier allowed the flag to be left unchanged. Since then the phylink has introduced an implementation that completely ignores the third

Re: [next-queue RFC 0/4] ethtool: Add support for frame preemption

2020-05-18 Thread Jakub Kicinski
On Mon, 18 May 2020 15:06:26 -0700 Vinicius Costa Gomes wrote: > Jakub Kicinski writes: > > > > Please take a look at the example from the cover letter: > > > > $ ethtool $ sudo ./ethtool --show-frame-preemption > > enp3s0 Frame preemption settings for enp3s0: > > support: supported > > ac

  1   2   3   4   >