Re: [PATCH v3 1/7] Documentation: dynamic-debug: Add description of level bitmask

2020-06-09 Thread Joe Perches
On Wed, 2020-06-10 at 08:31 +0200, Greg Kroah-Hartman wrote: > On Tue, Jun 09, 2020 at 09:58:07AM -0700, Joe Perches wrote: > > On Tue, 2020-06-09 at 13:16 +0200, Greg Kroah-Hartman wrote: > > > What is wrong with the existing control of dynamic > > > debug messages that you want to add another typ

Re: [PATCH v3 1/7] Documentation: dynamic-debug: Add description of level bitmask

2020-06-09 Thread Greg Kroah-Hartman
On Tue, Jun 09, 2020 at 09:58:07AM -0700, Joe Perches wrote: > On Tue, 2020-06-09 at 13:16 +0200, Greg Kroah-Hartman wrote: > > What is wrong with the existing control of dynamic > > debug messages that you want to add another type of arbitrary grouping > > to it? > > There is no existing groupin

Re: [PATCH] net: mvneta: Fix Serdes configuration for 2.5Gbps modes

2020-06-09 Thread Sascha Hauer
Hi Andrew, +Cc Maxime Chevallier On Tue, Jun 09, 2020 at 03:28:48PM +0200, Andrew Lunn wrote: > On Tue, Jun 09, 2020 at 03:11:52PM +0200, Sascha Hauer wrote: > > The Marvell MVNETA Ethernet controller supports a 2.5Gbps SGMII mode > > called DRSGMII. Depending on the Port MAC Control Register0 Po

Re: [PATCH ethtool v1] netlink: add master/slave configuration support

2020-06-09 Thread Oleksij Rempel
On Tue, Jun 09, 2020 at 02:48:51PM -0700, Dan Williams wrote: > On Tue, Jun 9, 2020 at 12:57 PM David Miller wrote: > > > > From: "Williams, Dan J" > > Date: Tue, 9 Jun 2020 19:30:50 + > > > > > On Tue, 2020-06-09 at 11:36 -0700, David Miller wrote: > > >> From: Stephen Hemminger > > >> Date

KASAN: use-after-free Read in tipc_named_reinit

2020-06-09 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:cb8e59cc Merge git://git.kernel.org/pub/scm/linux/kernel/g.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=12eccfd210 kernel config: https://syzkaller.appspot.com/x/.config?x=a16ddbc78955e3a9 das

Re: [PATCH] Fix null pointer dereference in vector_user_bpf

2020-06-09 Thread Greg KH
On Tue, Jun 09, 2020 at 11:43:00PM -0400, Gaurav Singh wrote: > Signed-off-by: Gaurav Singh > > The bpf_prog is being checked for !NULL after uml_kmalloc but > later its used directly for example: > bpf_prog->filter = bpf and is also later returned upon success. > Fix this, do a NULL check and r

Re: [PATCH bpf] libbpf: Fix BTF-to-C conversion of noreturn function pointers

2020-06-09 Thread Andrii Nakryiko
On Tue, Jun 9, 2020 at 7:05 AM Jean-Philippe Brucker wrote: > > On Mon, Jun 08, 2020 at 04:50:37PM -0700, Andrii Nakryiko wrote: > > On Mon, Jun 8, 2020 at 8:23 AM Jean-Philippe Brucker > > wrote: > > > > > > When trying to convert the BTF for a function pointer marked "noreturn" > > > to C code,

[PATCH bpf] libbpf: handle GCC noreturn-turned-volatile quirk

2020-06-09 Thread Andrii Nakryiko
Handle a GCC quirk of emitting extra volatile modifier in DWARF (and subsequently preserved in BTF by pahole) for function pointers marked as __attribute__((noreturn)). This was the way to mark such functions before GCC 2.5 added noreturn attribute. Drop such func_proto modifiers, similarly to how

[PATCH 1/2] net/scm: Regularize compat handling of scm_detach_fds()

2020-06-09 Thread Kees Cook
Duplicate the cleanups from commit 2618d530dd8b ("net/scm: cleanup scm_detach_fds") into the compat code. Also moves the check added in commit 1f466e1f15cf ("net: cleanly handle kernel vs user buffers for ->msg_control") to before the compat call, even though it should be impossible for an in-kern

[PATCH 2/2] pidfd: Replace open-coded partial __scm_install_fd()

2020-06-09 Thread Kees Cook
The sock counting (sock_update_netprioidx() and sock_update_classid()) was missing from this implementation of fd installation, compared to SCM_RIGHTS. Use the new scm helper to get the work done, after adjusting it to return the installed fd and accept a NULL user pointer. Fixes: 8649c322f75c ("p

[PATCH 0/2] Use __scm_install_fd() more widely

2020-06-09 Thread Kees Cook
Hi, This extends the recent work hch did for scm_detach_fds(), and updates the compat path as well, fixing bugs in the process. Additionally, an effectively incomplete and open-coded __scm_install_fd() is fixed in pidfd_getfd(). Thanks! -Kees Kees Cook (2): net/scm: Regularize compat handling

[GIT PULL] virtio: features, fixes

2020-06-09 Thread Michael S. Tsirkin
There's a single commit here that I tweaked since linux-next - the change is in printk format string which I consider trivial enough not force wait for more testing. A couple of hashes are different from what's in linux-next though. I also upgraded the machine I used to sign the tag (didn't change

[PATCH RFC net-next 6/8] nexthop: Add primary_only argument to nexthop_for_each_fib6_nh

2020-06-09 Thread David Ahern
Follow on patch adds support for active-backup nexthops. Control planes needs to always analyze all legs of the nexthops, but datapath only wants to consider the primary. Signed-off-by: David Ahern --- include/net/nexthop.h | 2 +- net/ipv4/nexthop.c| 6 +++--- net/ipv6/ip6_fib.c| 4 +

[PATCH RFC net-next 8/8] selftests: Add active-backup nexthop tests

2020-06-09 Thread David Ahern
Signed-off-by: David Ahern --- tools/testing/selftests/net/fib_nexthops.sh | 334 +++- 1 file changed, 330 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/fib_nexthops.sh b/tools/testing/selftests/net/fib_nexthops.sh index dee567f7576a..4db390438885 100755

[PATCH RFC net-next 3/8] nexthop: Refactor nexthop_for_each_fib6_nh

2020-06-09 Thread David Ahern
Refactor nexthop_for_each_fib6_nh moving standalone and group processing into helpers. Prepatory patch for adding active-backup group. Signed-off-by: David Ahern --- net/ipv4/nexthop.c | 48 +++--- 1 file changed, 33 insertions(+), 15 deletions(-) diff --

[PATCH RFC net-next 2/8] nexthop: Refactor nexthop_select_path

2020-06-09 Thread David Ahern
Move the ipv{4,6}_good_nh calls to a separate helper. Signed-off-by: David Ahern --- net/ipv4/nexthop.c | 47 +++--- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c index 5ebc47d5ec56..7d0a170821f3 10

[PATCH RFC net-next 4/8] nexthop: Move nexthop_get_nhc_lookup to nexthop.c

2020-06-09 Thread David Ahern
nexthop_get_nhc_lookup is long enough for an inline and the a-b checks are going to make it worse. Move to nexthop.c and in the process refactor so that mpath code reuses single nh lookup. Prepatory patch for adding active-backup group. Signed-off-by: David Ahern --- include/net/nexthop.h | 29 +

[PATCH RFC net-next 7/8] nexthop: Add support for active-backup nexthop type

2020-06-09 Thread David Ahern
Add new active-backup group type. The intent is that the group describes a primary nexthop with a backup option if the primary is not available. Since nexthop code removes entries on carrier or admin down this really means the backup applies when the neighbor entry for the active becomes invalid. I

[PATCH RFC net-next 1/8] nexthop: Rename nexthop_free_mpath

2020-06-09 Thread David Ahern
nexthop_free_mpath really should be nexthop_free_group. Rename it. Signed-off-by: David Ahern --- net/ipv4/nexthop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c index 400a9f89ebdb..5ebc47d5ec56 100644 --- a/net/ipv4/nexthop.c ++

[PATCH RFC net-next 5/8] nexthop: Move nexthop_uses_dev to nexthop.c

2020-06-09 Thread David Ahern
nexthop_uses_dev is long enough for an inline and the a-b checks are going to make it worse. Move to nexthop.c and in the process refactor so that mpath code reuses single nh lookup. Prepatory patch for adding active-backup group. Signed-off-by: David Ahern --- include/net/nexthop.h | 25 +--

[PATCH RFC net-next 0/8] nexthop: Add support for active-backup nexthop type

2020-06-09 Thread David Ahern
This set adds support for a new nexthop group - active-backup. The intent is that the group describes a primary nexthop with a backup option if the primary is not available. Since nexthop code removes entries on carrier or admin down this really means the backup applies when the neighbor entry for

RE: [PATCH net,stable 1/1] net: ethernet: stmmac: free tx skb buffer in stmmac_resume()

2020-06-09 Thread Andy Duan
Giuseppe/Alexandre/Jose/David, can you give comment on the patch ? From: Andy Duan Sent: Friday, June 5, 2020 10:06 AM > Ping... > > From: Andy Duan Sent: Tuesday, June 2, 2020 3:58 > PM > > From: Fugang Duan > > > > When do suspend/resume test, there have WARN_ON() log dump from > > stmmac_xmi

[PATCH] Fix null pointer dereference in vector_user_bpf

2020-06-09 Thread Gaurav Singh
Signed-off-by: Gaurav Singh The bpf_prog is being checked for !NULL after uml_kmalloc but later its used directly for example: bpf_prog->filter = bpf and is also later returned upon success. Fix this, do a NULL check and return right away. --- arch/um/drivers/vector_user.c | 8 +--- 1 file

Re: [PATCH] Do not assign in if condition wg_noise_handshake_consume_initiation()

2020-06-09 Thread Jason A. Donenfeld
On Tue, Jun 9, 2020 at 9:21 AM Frank Werner-Krippendorf wrote: > > Fixes an error condition reported by checkpatch.pl which caused by > assigning a variable in an if condition in > wg_noise_handshake_consume_initiation(). > > Signed-off-by: Frank Werner-Krippendorf Thanks. Queued up in the wireg

Re: [PATCH RFC v6 02/11] vhost: use batched get_vq_desc version

2020-06-09 Thread Jason Wang
On 2020/6/8 下午8:52, Michael S. Tsirkin wrote: As testing shows no performance change, switch to that now. Signed-off-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez Link: https://lore.kernel.org/r/20200401183118.8334-3-epere...@redhat.com Signed-off-by: Michael S. Tsirkin --- drivers/

Re: [PATCH v3 0/7] Venus dynamic debug

2020-06-09 Thread jim . cromie
On Tue, Jun 9, 2020 at 4:23 PM Joe Perches wrote: > > On Tue, 2020-06-09 at 15:21 -0600, jim.cro...@gmail.com wrote: > > > > As Joe noted, there is a lot of ad-hockery to possibly clean up, > > but I dont grok how these levels should be distinguished from > > KERN_(WARN|INFO|DEBUG) constants. > >

[PATCH] xdp_rxq_info_user: Add null check after malloc

2020-06-09 Thread Gaurav Singh
Signed-off-by: Gaurav Singh The memset call is made right after malloc call which can return a NULL pointer upon failure causing a segmentation fault. Fix this by adding a null check right after malloc() and then do memset(). --- samples/bpf/xdp_rxq_info_user.c | 6 +++--- 1 file changed, 3 i

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-09 Thread Hangbin Liu
On Tue, Jun 09, 2020 at 10:31:19PM +0200, Toke Høiland-Jørgensen wrote: > > Oh, sorry for the typo, the numbers make me crazy, it should be only > > ingress i40e, egress veth. Here is the right description: > > > > Kernel 5.7 + my patch(ingress i40e, egress i40e) > > xdp_redirect_map: > > generic

Re: [PATCH v3 0/7] Venus dynamic debug

2020-06-09 Thread Joe Perches
On Tue, 2020-06-09 at 15:23 -0700, Joe Perches wrote: > These are just driver developer mechanisms to enable/disable > groups of formats via some test for < level or | bitmap duh: & bitmask > if (is_bitmask) > enable/disable(value|flag) obviously enable/disabl

[PATCH] e1000e: Squash an unused function warning

2020-06-09 Thread Palmer Dabbelt
From: Palmer Dabbelt e1000e_check_me is only used under CONFIG_PM_SLEEP but exists unconditionally, which triggers a warning. Signed-off-by: Palmer Dabbelt --- drivers/net/ethernet/intel/e1000e/netdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/intel/e1000e/net

Re: BUG: kernel NULL pointer dereference in __cgroup_bpf_run_filter_skb

2020-06-09 Thread Zefan Li
On 2020/6/10 4:50, Daniel Borkmann wrote: > [ +Zefan, + TJ ] > > On 6/3/20 12:17 AM, Alexei Starovoitov wrote: >> On Tue, Jun 2, 2020 at 2:46 PM Brenden Blanco wrote: >>> On Sat, May 30, 2020 at 12:51 AM Lu Fengqi wrote: I encountered a reproducible NULL pointer dereference using the m

Re: [PATCH] net: stmmac: Fix RX Coalesce IOC always true issue

2020-06-09 Thread biao huang
On Tue, 2020-06-09 at 14:20 +, Jose Abreu wrote: > From: Biao Huang > Date: Jun/09/2020, 10:41:33 (UTC+00:00) > > > - rx_q->rx_count_frames += priv->rx_coal_frames; > > - if (rx_q->rx_count_frames > priv->rx_coal_frames) > > + if (rx_q->rx_count_frames >= priv->r

Re: [PATCH net v3 2/3] esp: select CRYPTO_SEQIV

2020-06-09 Thread Herbert Xu
On Tue, Jun 09, 2020 at 05:54:01PM -0700, Eric Biggers wrote: > From: Eric Biggers > > Commit f23efcbcc523 ("crypto: ctr - no longer needs CRYPTO_SEQIV") made > CRYPTO_CTR stop selecting CRYPTO_SEQIV. This breaks IPsec for most > users since GCM and several other encryption algorithms require "s

Re: [PATCH net v3 3/3] esp, ah: modernize the crypto algorithm selections

2020-06-09 Thread Herbert Xu
On Tue, Jun 09, 2020 at 05:54:02PM -0700, Eric Biggers wrote: > From: Eric Biggers > > The crypto algorithms selected by the ESP and AH kconfig options are > out-of-date with the guidance of RFC 8221, which lists the legacy > algorithms MD5 and DES as "MUST NOT" be implemented, and some more > mo

Re: [PATCH net v3 1/3] esp, ah: consolidate the crypto algorithm selections

2020-06-09 Thread Herbert Xu
On Tue, Jun 09, 2020 at 05:54:00PM -0700, Eric Biggers wrote: > From: Eric Biggers > > Instead of duplicating the algorithm selections between INET_AH and > INET6_AH and between INET_ESP and INET6_ESP, create new tristates > XFRM_AH and XFRM_ESP that do the algorithm selections, and make these be

[PATCH net v3 3/3] esp, ah: modernize the crypto algorithm selections

2020-06-09 Thread Eric Biggers
From: Eric Biggers The crypto algorithms selected by the ESP and AH kconfig options are out-of-date with the guidance of RFC 8221, which lists the legacy algorithms MD5 and DES as "MUST NOT" be implemented, and some more modern algorithms like AES-GCM and HMAC-SHA256 as "MUST" be implemented. But

[PATCH net v3 2/3] esp: select CRYPTO_SEQIV

2020-06-09 Thread Eric Biggers
From: Eric Biggers Commit f23efcbcc523 ("crypto: ctr - no longer needs CRYPTO_SEQIV") made CRYPTO_CTR stop selecting CRYPTO_SEQIV. This breaks IPsec for most users since GCM and several other encryption algorithms require "seqiv" -- and RFC 8221 lists AES-GCM as "MUST" be implemented. Just make

[PATCH net v3 1/3] esp, ah: consolidate the crypto algorithm selections

2020-06-09 Thread Eric Biggers
From: Eric Biggers Instead of duplicating the algorithm selections between INET_AH and INET6_AH and between INET_ESP and INET6_ESP, create new tristates XFRM_AH and XFRM_ESP that do the algorithm selections, and make these be selected by the corresponding INET* options. Suggested-by: Herbert Xu

[PATCH net v3 0/3] esp, ah: improve crypto algorithm selections

2020-06-09 Thread Eric Biggers
This series consolidates and modernizes the lists of crypto algorithms that are selected by the IPsec kconfig options, and adds CRYPTO_SEQIV since it no longer gets selected automatically by other things. See previous discussion at https://lkml.kernel.org/netdev/20200604192322.22142-1-ebigg...@ker

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

2020-06-09 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net tree got a conflict in: net/ipv4/tcp.c between commit: d8ed45c5dcd4 ("mmap locking API: use coccinelle to convert mmap_sem rwsem call sites") from Linus' tree and commit: 3763a24c727e ("net-zerocopy: use vm_insert_pages() for tcp rcv zerocopy

[PATCH net] vxlan: Remove access to nexthop group struct

2020-06-09 Thread David Ahern
vxlan driver should be using helpers to access nexthop struct internals. Remove open check if whether nexthop is multipath in favor of the existing nexthop_is_multipath helper. Add a new helper, nexthop_has_v4, to cover the need to check has_v4 in a group. Fixes: 1274e1cc4226 ("vxlan: ecmp support

Re: [PATCH] net: flow_offload: remove indirect flow_block declarations leftover

2020-06-09 Thread David Miller
From: Pablo Neira Ayuso Date: Tue, 9 Jun 2020 23:47:44 +0200 > Remove function declarations that are not available in the tree anymore. > > Fixes: 709ffbe19b77 ("net: remove indirect block netdev event registration") > Reported-by: Jacob Keller > Signed-off-by: Pablo Neira Ayuso Applied, tha

Re: memory leak in ctnetlink_start

2020-06-09 Thread Pablo Neira Ayuso
On Tue, Jun 09, 2020 at 02:58:12PM -0700, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:7ae77150 Merge tag 'powerpc-5.8-1' of git://git.kernel.org.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=128a9df210 > kernel

Re: memory leak in nf_tables_parse_netdev_hooks (3)

2020-06-09 Thread Pablo Neira Ayuso
On Tue, Jun 09, 2020 at 02:58:12PM -0700, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:7ae77150 Merge tag 'powerpc-5.8-1' of git://git.kernel.org.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1741f5f210 > kernel

Re: [PATCH v3 0/7] Venus dynamic debug

2020-06-09 Thread Joe Perches
On Tue, 2020-06-09 at 15:21 -0600, jim.cro...@gmail.com wrote: > On Tue, Jun 9, 2020 at 10:49 AM Joe Perches wrote: > > (adding Jim Cromie and comments) > > On Tue, 2020-06-09 at 09:03 -0700, Randy Dunlap wrote: > > > On 6/9/20 4:13 AM, Matthew Wilcox wrote: > > > > On Tue, Jun 09, 2020 at 01:45:5

memory leak in nf_tables_parse_netdev_hooks (3)

2020-06-09 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:7ae77150 Merge tag 'powerpc-5.8-1' of git://git.kernel.org.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1741f5f210 kernel config: https://syzkaller.appspot.com/x/.config?x=9a1aa05456dfd557 das

Re: [(RFC) PATCH ] be2net: Allow a VF to use physical link state.

2020-06-09 Thread Jakub Kicinski
On Mon, 8 Jun 2020 17:00:59 -0700 David Wilder wrote: > Hyper-visors owning a PF are allowed by Emulex specification to provide > a VF with separate physical and/or logical link states. However, on > linux, a VF driver must chose one or the other. > > My scenario is a proprietary driver controlli

memory leak in ctnetlink_del_conntrack

2020-06-09 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:7ae77150 Merge tag 'powerpc-5.8-1' of git://git.kernel.org.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=10fcd90e10 kernel config: https://syzkaller.appspot.com/x/.config?x=9a1aa05456dfd557 das

memory leak in ctnetlink_start

2020-06-09 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:7ae77150 Merge tag 'powerpc-5.8-1' of git://git.kernel.org.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=128a9df210 kernel config: https://syzkaller.appspot.com/x/.config?x=9a1aa05456dfd557 das

Re: [PATCH ethtool v1] netlink: add master/slave configuration support

2020-06-09 Thread Dan Williams
On Tue, Jun 9, 2020 at 12:57 PM David Miller wrote: > > From: "Williams, Dan J" > Date: Tue, 9 Jun 2020 19:30:50 + > > > On Tue, 2020-06-09 at 11:36 -0700, David Miller wrote: > >> From: Stephen Hemminger > >> Date: Tue, 9 Jun 2020 10:19:35 -0700 > >> > >> > Yes, words do matter and convey a

[PATCH] net: flow_offload: remove indirect flow_block declarations leftover

2020-06-09 Thread Pablo Neira Ayuso
Remove function declarations that are not available in the tree anymore. Fixes: 709ffbe19b77 ("net: remove indirect block netdev event registration") Reported-by: Jacob Keller Signed-off-by: Pablo Neira Ayuso --- include/net/flow_offload.h | 24 1 file changed, 24 delet

Re: [PATCH ethtool v1] netlink: add master/slave configuration support

2020-06-09 Thread Kees Cook
On Tue, Jun 09, 2020 at 10:53:03PM +0200, Michal Kubecek wrote: > The same IMHO holds for your example with register states or names: > I believe it is highly beneficial to make them consistent with technical > documentation. There are even cases where we violate kernel coding style > (e.g. by usin

Re: [PATCH net] selftests/net: in rxtimestamp getopt_long needs terminating null entry

2020-06-09 Thread David Miller
From: Tanner Love Date: Tue, 9 Jun 2020 17:21:32 -0400 > From: tannerlove > > getopt_long requires the last element to be filled with zeros. > Otherwise, passing an unrecognized option can cause a segfault. > > Fixes: 16e781224198 ("selftests/net: Add a test to validate behavior of rx > time

Re: [PATCH net] net: mvneta: do not redirect frames during reconfiguration

2020-06-09 Thread David Miller
From: Lorenzo Bianconi Date: Tue, 9 Jun 2020 00:02:39 +0200 > Disable frames injection in mvneta_xdp_xmit routine during hw > re-configuration in order to avoid hardware hangs > > Fixes: b0a43db9087a ("net: mvneta: add XDP_TX support") > Signed-off-by: Lorenzo Bianconi Looking around, I wonde

[PATCH net-next 2/2] Crypto/chcr: Checking cra_refcnt before unregistering the algorithms

2020-06-09 Thread Ayush Sawal
This patch puts a check for algorithm unregister, to avoid removal of driver if the algorithm is under use. Signed-off-by: Ayush Sawal --- drivers/crypto/chelsio/chcr_algo.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/chelsio/chcr_algo.c

[PATCH net-next 1/2] Crypto/chcr: Calculate src and dst sg lengths separately for dma map

2020-06-09 Thread Ayush Sawal
This patch calculates src and dst sg lengths separately for dma mapping in case of aead operation. This fixes a panic which occurs due to the accessing of a zero length sg. Panic: [ 138.173225] kernel BUG at drivers/iommu/intel-iommu.c:1184! Signed-off-by: Ayush Sawal --- drivers/crypto/chelsi

[PATCH net-next 0/2] Fixing issues in dma mapping and driver removal

2020-06-09 Thread Ayush Sawal
Patch 1: This fixes the kernel panic which occurs due to the accessing of a zero length sg. Patch 2: Avoiding unregistering the algorithm if cra_refcnt is not 1. Ayush Sawal (2): Crypto/chcr: Calculate src and dst sg lengths separately for dma map Crypto/chcr: Checking cra_refcnt before unreg

Re: [PATCH v3 0/7] Venus dynamic debug

2020-06-09 Thread jim . cromie
On Tue, Jun 9, 2020 at 10:49 AM Joe Perches wrote: > > (adding Jim Cromie and comments) > thanks for bringing me in... > On Tue, 2020-06-09 at 09:03 -0700, Randy Dunlap wrote: > > On 6/9/20 4:13 AM, Matthew Wilcox wrote: > > > On Tue, Jun 09, 2020 at 01:45:57PM +0300, Stanimir Varbanov wrote: >

Re: KMSAN: uninit-value in slhc_compress (2)

2020-06-09 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:f0d5ec90 kmsan: apply __no_sanitize_memory to dotraplinkag.. git tree: https://github.com/google/kmsan.git master console output: https://syzkaller.appspot.com/x/log.txt?x=10495a3610 kernel config: https://syzkall

[PATCH net] selftests/net: in rxtimestamp getopt_long needs terminating null entry

2020-06-09 Thread Tanner Love
From: tannerlove getopt_long requires the last element to be filled with zeros. Otherwise, passing an unrecognized option can cause a segfault. Fixes: 16e781224198 ("selftests/net: Add a test to validate behavior of rx timestamps") Signed-off-by: Tanner Love Acked-by: Willem de Bruijn --- to

Re: [PATCH ethtool v1] netlink: add master/slave configuration support

2020-06-09 Thread Michal Kubecek
On Tue, Jun 09, 2020 at 01:29:42PM -0700, Kees Cook wrote: > On Tue, Jun 09, 2020 at 01:05:17PM -0700, David Miller wrote: > > From: Kees Cook > > Date: Tue, 9 Jun 2020 12:49:48 -0700 > > > > > Okay, for now, how about: > > > > > > - If we're dealing with an existing spec, match the language. >

Re: BUG: kernel NULL pointer dereference in __cgroup_bpf_run_filter_skb

2020-06-09 Thread Daniel Borkmann
[ +Zefan, + TJ ] On 6/3/20 12:17 AM, Alexei Starovoitov wrote: On Tue, Jun 2, 2020 at 2:46 PM Brenden Blanco wrote: On Sat, May 30, 2020 at 12:51 AM Lu Fengqi wrote: I encountered a reproducible NULL pointer dereference using the mainline kernel v5.7-rc7-44-g75caf310d16c(which also happened

Re: [PATCH ethtool v1] netlink: add master/slave configuration support

2020-06-09 Thread Michal Kubecek
On Tue, Jun 09, 2020 at 10:19:35AM -0700, Stephen Hemminger wrote: > On Sun, 07 Jun 2020 16:45:32 -0700 (PDT) > David Miller wrote: > > > From: Stephen Hemminger > > Date: Sun, 7 Jun 2020 15:30:19 -0700 > > > > > Open source projects have been working hard to remove the terms master > > > and

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-09 Thread Toke Høiland-Jørgensen
Hangbin Liu writes: > On Mon, Jun 08, 2020 at 05:32:54PM +0200, Toke Høiland-Jørgensen wrote: >> Hangbin Liu writes: >> >> > On Thu, Jun 04, 2020 at 06:02:54PM +0200, Toke Høiland-Jørgensen wrote: >> >> Hangbin Liu writes: >> >> >> >> > On Thu, Jun 04, 2020 at 02:37:23PM +0200, Toke Høilan

Re: [PATCH bpf 2/2] bpf, sockhash: Synchronize delete from bucket list on map free

2020-06-09 Thread John Fastabend
Alexei Starovoitov wrote: > On Tue, Jun 9, 2020 at 10:51 AM John Fastabend > wrote: > > > > Jakub Sitnicki wrote: > > > We can end up modifying the sockhash bucket list from two CPUs when a > > > sockhash is being destroyed (sock_hash_free) on one CPU, while a socket > > > that is in the sockhash

Re: [PATCH ethtool v1] netlink: add master/slave configuration support

2020-06-09 Thread Kees Cook
On Tue, Jun 09, 2020 at 01:05:17PM -0700, David Miller wrote: > From: Kees Cook > Date: Tue, 9 Jun 2020 12:49:48 -0700 > > > Okay, for now, how about: > > > > - If we're dealing with an existing spec, match the language. > > Yes. > > > - If we're dealing with a new spec, ask the authors to fix

Re: [PATCH] dccp: Fix possible memleak in dccp_init and dccp_fini

2020-06-09 Thread David Miller
From: Wang Hai Date: Tue, 9 Jun 2020 22:18:16 +0800 > There are some memory leaks in dccp_init() and dccp_fini(). > > In dccp_fini() and the error handling path in dccp_init(), free lhash2 > is missing. Add inet_hashinfo2_free_mod() to do it. > > If inet_hashinfo2_init_mod() failed in dccp_init

Re: [PATCH net 1/1] ionic: wait on queue start until after IFF_UP

2020-06-09 Thread David Miller
From: Shannon Nelson Date: Tue, 9 Jun 2020 13:11:28 -0700 > Yes, the link check is triggered by the periodic watchdog > ionic_watchdog_cb(), every 5 seconds. Thanks for explaining. Applied and queued up for v5.7 -stable, thank you.

Re: [PATCH v3] net: sched: export __netdev_watchdog_up()

2020-06-09 Thread David Miller
From: Valentin Longchamp Date: Tue, 9 Jun 2020 22:11:54 +0200 > Since the quiesce/activate rework, __netdev_watchdog_up() is directly > called in the ucc_geth driver. > > Unfortunately, this function is not available for modules and thus > ucc_geth cannot be built as a module anymore. Fix it by

[PATCH v3] net: sched: export __netdev_watchdog_up()

2020-06-09 Thread Valentin Longchamp
Since the quiesce/activate rework, __netdev_watchdog_up() is directly called in the ucc_geth driver. Unfortunately, this function is not available for modules and thus ucc_geth cannot be built as a module anymore. Fix it by exporting __netdev_watchdog_up(). Since the commit introducing the regres

Re: [PATCH net 1/1] ionic: wait on queue start until after IFF_UP

2020-06-09 Thread Shannon Nelson
On 6/9/20 1:06 PM, David Miller wrote: From: Shannon Nelson Date: Tue, 9 Jun 2020 12:51:17 -0700 On 6/9/20 12:47 PM, David Miller wrote: From: Shannon Nelson Date: Mon, 8 Jun 2020 20:41:43 -0700 The netif_running() test looks at __LINK_STATE_START which gets set before ndo_open() is calle

Re: [RFC PATCH bpf-next 0/2] bpf_redirect_map() tail call detection and xdp_do_redirect() avoidance

2020-06-09 Thread Toke Høiland-Jørgensen
Björn Töpel writes: > Is this a good idea? I have only measured for AF_XDP redirects, but > all XDP_REDIRECT targets should benefit. For AF_XDP the rxdrop > scenario went from 21.5 to 23.2 Mpps on my machine. I like it! I guess in the end the feasibility will depend on the quality tail call dete

Re: [PATCH net 1/1] ionic: wait on queue start until after IFF_UP

2020-06-09 Thread David Miller
From: Shannon Nelson Date: Tue, 9 Jun 2020 12:51:17 -0700 > On 6/9/20 12:47 PM, David Miller wrote: >> From: Shannon Nelson >> Date: Mon, 8 Jun 2020 20:41:43 -0700 >> >>> The netif_running() test looks at __LINK_STATE_START which >>> gets set before ndo_open() is called, there is a window of >>

Re: [PATCH ethtool v1] netlink: add master/slave configuration support

2020-06-09 Thread David Miller
From: Kees Cook Date: Tue, 9 Jun 2020 12:49:48 -0700 > Okay, for now, how about: > > - If we're dealing with an existing spec, match the language. Yes. > - If we're dealing with a new spec, ask the authors to fix their language. Please be more specific about "new", if it's a passed and ratifi

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-09 Thread David Miller
From: Cong Wang Date: Mon, 8 Jun 2020 14:53:01 -0700 > The dynamic key update for addr_list_lock still causes troubles, > for example the following race condition still exists: > > CPU 0:CPU 1: > (RCU read lock) (RTNL lock) > dev_mc_seq_show

Re: [PATCH net 1/1] ionic: wait on queue start until after IFF_UP

2020-06-09 Thread Shannon Nelson
On 6/9/20 12:47 PM, David Miller wrote: From: Shannon Nelson Date: Mon, 8 Jun 2020 20:41:43 -0700 The netif_running() test looks at __LINK_STATE_START which gets set before ndo_open() is called, there is a window of time between that and when the queues are actually ready to be run. If ionic

Re: [PATCH ethtool v1] netlink: add master/slave configuration support

2020-06-09 Thread Kees Cook
On Tue, Jun 09, 2020 at 12:34:37PM -0700, David Miller wrote: > From: Kees Cook > Date: Tue, 9 Jun 2020 12:29:54 -0700 > > > Given what I've seen from other communities and what I know of the kernel > > community, I don't think we're going to get consensus on some massive > > global search/replac

Re: [RFC PATCH bpf-next 2/2] i40e: avoid xdp_do_redirect() call when "redirect_tail_call" is set

2020-06-09 Thread Toke Høiland-Jørgensen
Björn Töpel writes: > From: Björn Töpel > > If an XDP program, where all the bpf_redirect_map() calls are tail > calls (as defined by the previous commit), the driver does not need to > explicitly call xdp_do_redirect(). > > The driver checks the active XDP program, and notifies the BPF helper >

Re: [PATCH net 1/1] ionic: wait on queue start until after IFF_UP

2020-06-09 Thread David Miller
From: Shannon Nelson Date: Mon, 8 Jun 2020 20:41:43 -0700 > The netif_running() test looks at __LINK_STATE_START which > gets set before ndo_open() is called, there is a window of > time between that and when the queues are actually ready to > be run. If ionic_check_link_status() notices that t

Re: [PATCH v2 2/2] net: sched: make the watchdog functions more coherent

2020-06-09 Thread David Miller
This is inappropriate to submit during the merge window as net-next is closed and only bug fixes should be submitted at this time. Your submission was perfect initially, just adding the necessary symbol export to fix the ucc_geth build when modular. Please don't tinker and add cleanups for a bu

Re: [PATCH v3 1/3] update UAPI header copies

2020-06-09 Thread Michal Kubecek
On Tue, Jun 09, 2020 at 10:47:16AM +0200, Oleksij Rempel wrote: > Update to net-dev: > dc0f3ed1973 ("net: phy: at803x: add cable diagnostics support for ATH9331 and > ATH8032") > > Signed-off-by: Oleksij Rempel > --- Please rebase this commit (and the whole series - but the other two patches do

Re: [PATCH ethtool v1] netlink: add master/slave configuration support

2020-06-09 Thread David Miller
From: "Williams, Dan J" Date: Tue, 9 Jun 2020 19:30:50 + > On Tue, 2020-06-09 at 11:36 -0700, David Miller wrote: >> From: Stephen Hemminger >> Date: Tue, 9 Jun 2020 10:19:35 -0700 >> >> > Yes, words do matter and convey a lot of implied connotation and >> > meaning. >> >> What is your lon

Re: [PATCH v3 2/3] netlink: add master/slave configuration support

2020-06-09 Thread Michal Kubecek
On Tue, Jun 09, 2020 at 10:47:17AM +0200, Oleksij Rempel wrote: > This UAPI is needed for BroadR-Reach 100BASE-T1 devices. Due to lack of > auto-negotiation support, we needed to be able to configure the > MASTER-SLAVE role of the port manually or from an application in user > space. > > The same

Re: [PATCH ethtool v1] netlink: add master/slave configuration support

2020-06-09 Thread David Miller
From: Kees Cook Date: Tue, 9 Jun 2020 12:29:54 -0700 > Given what I've seen from other communities and what I know of the kernel > community, I don't think we're going to get consensus on some massive > global search/replace any time soon. However, I think we can get started > on making this chan

Re: [PATCH ethtool v1] netlink: add master/slave configuration support

2020-06-09 Thread Williams, Dan J
On Tue, 2020-06-09 at 11:36 -0700, David Miller wrote: > From: Stephen Hemminger > Date: Tue, 9 Jun 2020 10:19:35 -0700 > > > Yes, words do matter and convey a lot of implied connotation and > > meaning. > > What is your long term plan? Will you change all of the UAPI for > bonding for example?

Re: [PATCH ethtool v1] netlink: add master/slave configuration support

2020-06-09 Thread Kees Cook
On Tue, Jun 09, 2020 at 11:36:33AM -0700, David Miller wrote: > From: Stephen Hemminger > Date: Tue, 9 Jun 2020 10:19:35 -0700 > > > Yes, words do matter and convey a lot of implied connotation and > > meaning. > > What is your long term plan? Will you change all of the UAPI for > bonding for e

Re: [PATCH bpf V2 0/2] bpf: adjust uapi for devmap prior to kernel release

2020-06-09 Thread Alexei Starovoitov
On Tue, Jun 09, 2020 at 03:31:41PM +0200, Jesper Dangaard Brouer wrote: > For special type maps (e.g. devmap and cpumap) the map-value data-layout is > a configuration interface. This is uapi that can only be tail extended. > Thus, new members (and thus features) can only be added to the end of thi

Re: [PATCH ethtool v1] netlink: add master/slave configuration support

2020-06-09 Thread Edward Cree
Disclaimer: *definitely* not speaking for my employer. On 09/06/2020 18:19, Stephen Hemminger wrote: > How many times have you or Linus argued about variable naming. > Yes, words do matter and convey a lot of implied connotation and meaning. Connotation, unlike denotation, is widely variable. I w

Re: [PATCH ethtool v1] netlink: add master/slave configuration support

2020-06-09 Thread David Miller
From: Stephen Hemminger Date: Tue, 9 Jun 2020 10:19:35 -0700 > Yes, words do matter and convey a lot of implied connotation and > meaning. What is your long term plan? Will you change all of the UAPI for bonding for example? Or will we have a partial solution to the problem?

Re: [PATCH ethtool v1] netlink: add master/slave configuration support

2020-06-09 Thread Andrew Lunn
Hi Stephen > A common example is that master/slave is unclear and would be clearer > as primary/secondary or active/backup or controller/worker. 802.3, cause 32.1.2, 2015 version: A 100BASE-T2 PHY can be configured either as a master PHY or as a slave PHY. The master-slave relationship bet

Re: [PATCH bpf] bpf: cgroup: allow multi-attach program to replace itself

2020-06-09 Thread Alexei Starovoitov
On Mon, Jun 8, 2020 at 9:22 AM Lorenz Bauer wrote: > > When using BPF_PROG_ATTACH to attach a program to a cgroup in > BPF_F_ALLOW_MULTI mode, it is not possible to replace a program > with itself. This is because the check for duplicate programs > doesn't take the replacement program into account

Re: [PATCH bpf] bpf: Reset data_meta before running programs attached to devmap entry

2020-06-09 Thread Alexei Starovoitov
On Mon, Jun 8, 2020 at 8:17 AM David Ahern wrote: > > This is a new context that does not handle metadata at the moment, so > mark data_meta invalid. > > Fixes: fbee97feed9b ("bpf: Add support to attach bpf program to a devmap > entry") > Signed-off-by: David Ahern Applied. Thanks

Re: [PATCH v3 1/7] Documentation: dynamic-debug: Add description of level bitmask

2020-06-09 Thread Edward Cree
On 09/06/2020 18:56, Joe Perches wrote: > These are _not_ netif_ control flags. Some are though. > For instance: > > $ git grep "MODULE_PARM.*\bdebug\b" drivers/net | head -10 > [...] > > These are all level/class output controls. TIL, thanks!  I should have looked deeperrather than assuming  they

Re: [PATCH bpf 2/2] bpf, sockhash: Synchronize delete from bucket list on map free

2020-06-09 Thread Alexei Starovoitov
On Tue, Jun 9, 2020 at 10:51 AM John Fastabend wrote: > > Jakub Sitnicki wrote: > > We can end up modifying the sockhash bucket list from two CPUs when a > > sockhash is being destroyed (sock_hash_free) on one CPU, while a socket > > that is in the sockhash is unlinking itself from it on another C

Re: [PATCH] bpf/sockmap: fix kernel panic at __tcp_bpf_recvmsg

2020-06-09 Thread Alexei Starovoitov
On Tue, Jun 9, 2020 at 2:04 AM Jakub Sitnicki wrote: > > On Fri, Jun 05, 2020 at 10:46 AM CEST, dihu wrote: > > When user application calls read() with MSG_PEEK flag to read data > > of bpf sockmap socket, kernel panic happens at > > __tcp_bpf_recvmsg+0x12c/0x350. sk_msg is not removed from ingres

Re: [PATCH v3 1/7] Documentation: dynamic-debug: Add description of level bitmask

2020-06-09 Thread Joe Perches
On Tue, 2020-06-09 at 18:42 +0100, Edward Cree wrote: > On 09/06/2020 17:58, Joe Perches wrote: > > On Tue, 2020-06-09 at 13:16 +0200, Greg Kroah-Hartman wrote: > > > What is wrong with the existing control of dynamic > > > debug messages that you want to add another type of arbitrary grouping > >

Re: [PATCH v3 1/7] Documentation: dynamic-debug: Add description of level bitmask

2020-06-09 Thread Edward Cree
On 09/06/2020 17:58, Joe Perches wrote: > On Tue, 2020-06-09 at 13:16 +0200, Greg Kroah-Hartman wrote: >> What is wrong with the existing control of dynamic >> debug messages that you want to add another type of arbitrary grouping >> to it? > There is no existing grouping mechanism. > > Many drive

[RFC PATCH bpf-next 0/2] bpf_redirect_map() tail call detection and xdp_do_redirect() avoidance

2020-06-09 Thread Björn Töpel
I hacked a quick PoC, based on the input from my earlier post [1]. Quick recap; For certain XDP programs, would it be possible to get rid of the xdp_do_redirect() call (and the per-cpu write/read), and instead perform the action directly from the BPF helper? If so, that would potentially make the

[RFC PATCH bpf-next 1/2] bpf, xdp: add naive bpf_redirect_map() tail call detection

2020-06-09 Thread Björn Töpel
From: Björn Töpel The bpf_redirect_map() BPF helper is used to redirect a packet to the endpoint referenced by a map element. Currently, there is no restrictment how the helper is called, e.g. ret = bpf_redirect_map(...); ... ret = bpf_redirect_map(...); ... // e.g. modify packet retur

[RFC PATCH bpf-next 2/2] i40e: avoid xdp_do_redirect() call when "redirect_tail_call" is set

2020-06-09 Thread Björn Töpel
From: Björn Töpel If an XDP program, where all the bpf_redirect_map() calls are tail calls (as defined by the previous commit), the driver does not need to explicitly call xdp_do_redirect(). The driver checks the active XDP program, and notifies the BPF helper indirectly via xdp_set_redirect_tai

  1   2   >