Re: [PATCH v1 iproute2-next 1/4] rdma: add helper rd_sendrecv_msg()

2019-03-07 Thread Leon Romanovsky
On Wed, Mar 06, 2019 at 03:50:13PM -0600, Steve Wise wrote: > > On 3/4/2019 8:13 AM, Steve Wise wrote: > > Hey Leon, adding this to rd_recv_msg(): > > > > @@ -693,10 +693,28 @@ int rd_recv_msg(struct rd *rd, mnl_cb_t callback, void > > *data, unsigned int seq) > > ret = mnl_cb_run(b

Re: [PATCH bpf-next v1] tools/bpftool: create map of maps

2019-03-07 Thread Alban Crequy
Thanks for the reviews, Jakub and Quentin! I will address it and resend a new version when bpf-next opens again. I'm also preparing some other patches on "bpftool map" about pinning and passing file descriptors to help applications that don't support map pinning directly. On Tue, Mar 5, 2019 at 6:

Re: [PATCH v3 bpf-next 0/3] bpf: add bpf_progenyof helper

2019-03-07 Thread Daniel Borkmann
On 03/05/2019 11:47 PM, Javier Honduvilla Coto wrote: > Hi all, > > This patch add the bpf_progenyof helper which receives a PID and returns > 1 if the process currently being executed is in the process hierarchy, > including itself or 0 if not. > > This is very useful in tracing programs when we

[PATCH] igc: remove unused igc_priv_flags_strings array

2019-03-07 Thread Arnd Bergmann
clang points out that the igc_priv_flags_strings[] array is never referenced, aside from being used for calculating its length: drivers/net/ethernet/intel/igc/igc_ethtool.c:9:19: error: variable 'igc_priv_flags_strings' is not needed and will not be emitted [-Werror,-Wunneeded-internal-decl

[PATCH] davinci_emac: always build in CONFIG_OF code

2019-03-07 Thread Arnd Bergmann
clang warns about what seems to be an unintended use of an obscure C language feature where a forward declaration of an array remains usable when the final definition is never seen: drivers/net/ethernet/ti/davinci_emac.c:1694:34: error: tentative array definition assumed to have one element [-Wer

[PATCH] isdn: isdnloop: fix pointer dereference bug

2019-03-07 Thread Arnd Bergmann
clang has spotted an ancient code bug and warns about it with: drivers/isdn/isdnloop/isdnloop.c:573:12: error: address of array 'card->rcard' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] This is an array of pointers, so we should check if a specific pointer exists in the ar

[PATCH] enic: fix build warning without CONFIG_CPUMASK_OFFSTACK

2019-03-07 Thread Arnd Bergmann
The enic driver relies on the CONFIG_CPUMASK_OFFSTACK feature to dynamically allocate a struct member, but this is normally intended for local variables. Building with clang, I get a warning for a few locations that check the address of the cpumask_var_t: drivers/net/ethernet/cisco/enic/enic_main

[PATCH] ethtool: reduce stack usage with clang

2019-03-07 Thread Arnd Bergmann
clang inlines the dev_ethtool() more aggressively than gcc does, leading to a larger amount of used stack space: net/core/ethtool.c:2536:24: error: stack frame size of 1216 bytes in function 'dev_ethtool' [-Werror,-Wframe-larger-than=] Marking the sub-functions that require the most stack space

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-07 Thread Jiri Pirko
Wed, Mar 06, 2019 at 06:56:38PM CET, jakub.kicin...@netronome.com wrote: >On Wed, 6 Mar 2019 13:20:37 +0100, Jiri Pirko wrote: >> Tue, Mar 05, 2019 at 06:15:34PM CET, jakub.kicin...@netronome.com wrote: >> >On Tue, 5 Mar 2019 12:06:01 +0100, Jiri Pirko wrote: >> >> >> >as ports. Can we invent a

Re: [PATCH] bpf: fix sysctl.c warning

2019-03-07 Thread Daniel Borkmann
On 03/04/2019 09:34 PM, Arnd Bergmann wrote: > When CONFIG_BPF_SYSCALL or CONFIG_SYSCTL is disabled, we get > a warning about an unused function: > > kernel/sysctl.c:3331:12: error: 'proc_dointvec_minmax_bpf_stats' defined but > not used [-Werror=unused-function] > static int proc_dointvec_minma

Re: [PATCH] ethtool: reduce stack usage with clang

2019-03-07 Thread Michal Kubecek
On Thu, Mar 07, 2019 at 10:33:35AM +0100, Arnd Bergmann wrote: > clang inlines the dev_ethtool() more aggressively than gcc does, leading > to a larger amount of used stack space: > > net/core/ethtool.c:2536:24: error: stack frame size of 1216 bytes in function > 'dev_ethtool' [-Werror,-Wframe-la

Re: [PATCH net 1/3] sctp: sctp_sock_migrate() returns error if sctp_bind_addr_dup() fails

2019-03-07 Thread Xin Long
On Thu, Mar 7, 2019 at 2:21 AM Neil Horman wrote: > > On Sun, Mar 03, 2019 at 05:54:53PM +0800, Xin Long wrote: > > It should fail to create the new sk if sctp_bind_addr_dup() fails > > when accepting or peeloff an association. > > > > Signed-off-by: Xin Long > > --- > > net/sctp/socket.c | 34 +

Re: [PATCH bpf] bpf: only test gso type on gso packets

2019-03-07 Thread Daniel Borkmann
On 03/06/2019 08:35 PM, Willem de Bruijn wrote: > From: Willem de Bruijn > > BPF can adjust gso only for tcp bytestreams. Fail on other gso types. > > But only on gso packets. It does not touch this field if !gso_size. > > Fixes: b90efd225874 ("bpf: only adjust gso_size on bytestream protocols"

Re: [PATCH][bpf-next] bpf: hbm: fix spelling mistake "deault" -> "default"

2019-03-07 Thread Daniel Borkmann
On 03/05/2019 06:31 PM, Colin King wrote: > From: Colin Ian King > > There are a couple of typos, fix these. > > Signed-off-by: Colin Ian King Applied, thanks!

Re: [PATCH net] xsk: fix potential crash in xsk_diag_put_umem()

2019-03-07 Thread Daniel Borkmann
On 03/05/2019 06:31 PM, Eric Dumazet wrote: > Fixes two typos in xsk_diag_put_umem() > > syzbot reported the following crash : > > kasan: CONFIG_KASAN_INLINE enabled > kasan: GPF could be caused by NULL-ptr deref or user memory access > general protection fault: [#1] PREEMPT SMP KASAN > CPU:

Re: [PATCH net-next (fix) 0/2] fix GSO bpf_lwt_ip_encap

2019-03-07 Thread Daniel Borkmann
On 03/05/2019 01:27 AM, Peter Oskolkov wrote: > This is a small fix and a test. Sent to net-next because > the offending patch is not in net yet. > > Peter Oskolkov (2): > net: fix GSO in bpf_lwt_push_ip_encap > selftests/bpf: test that GSO works in lwt_ip_encap > > net/core/lwt_bpf.c

[PATCH net] ravb: Decrease TxFIFO depth of Q3 and Q2 to one

2019-03-07 Thread Simon Horman
From: Masaru Nagai Hardware has the CBS (Credit Based Shaper) which affects only Q3 and Q2. When updating the CBS settings, even if the driver does so after waiting for Tx DMA finished, there is a possibility that frame data still remains in TxFIFO. To avoid this, decrease TxFIFO depth of Q3 and

Re: [PATCH bpf] selftests: bpf: test_progs: initialize duration in singal_pending test

2019-03-07 Thread Daniel Borkmann
On 03/07/2019 12:25 AM, Stanislav Fomichev wrote: > CHECK macro implicitly uses duration. We call CHECK() a couple of times > before duration is initialized from bpf_prog_test_run(). > Explicitly set duration to 0 to avoid compiler warnings. > > Fixes: 740f8a657221 ("selftests/bpf: make sure signa

Re: [PATCH bpf 1/2] selftests: bpf: fix compilation with out-of-tree $(OUTPUT)

2019-03-07 Thread Daniel Borkmann
On 03/06/2019 08:59 PM, Stanislav Fomichev wrote: > A bunch of related changes lumped together: > * Create prog_tests and verifier output directories; these don't exist with > out-of-tree $(OUTPUT) > * Add missing -I (via separate TEST_{PROGS,VERIFIER}_CFLAGS) for the main tree > ($(PWD) != $(O

[PATCH] peak_usb: fix clang build warning

2019-03-07 Thread Arnd Bergmann
Clang points out undefined behavior when building the pcan_usb_pro driver: drivers/net/can/usb/peak_usb/pcan_usb_pro.c:136:15: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs] Changing the function prototype to avoid arg

[PATCH bpf] bpf: Stop the psock parser before canceling its work

2019-03-07 Thread Jakub Sitnicki
We might have never enabled (started) the psock's parser, in which case it will not get stopped when destroying the psock. This leads to a warning when trying to cancel parser's work from psock's deferred destructor: [ 405.325769] WARNING: CPU: 1 PID: 3216 at net/strparser/strparser.c:526 strp_d

Re: [PATCH net 1/3] sctp: sctp_sock_migrate() returns error if sctp_bind_addr_dup() fails

2019-03-07 Thread Neil Horman
On Thu, Mar 07, 2019 at 06:06:21PM +0800, Xin Long wrote: > On Thu, Mar 7, 2019 at 2:21 AM Neil Horman wrote: > > > > On Sun, Mar 03, 2019 at 05:54:53PM +0800, Xin Long wrote: > > > It should fail to create the new sk if sctp_bind_addr_dup() fails > > > when accepting or peeloff an association. >

Re: [PATCH net 0/3] sctp: process the error returned from sctp_sock_migrate()

2019-03-07 Thread Neil Horman
On Sun, Mar 03, 2019 at 05:54:52PM +0800, Xin Long wrote: > This patchset is to process the errs returned by sctp_auth_init_hmacs() > and sctp_bind_addr_dup() from sctp_sock_migrate(). And also fix a panic > caused by new ep->auth_hmacs was not set due to net->sctp.auth_enable > changed by sysctl b

Re: [PATCH net 03/16] net/sched: act_csum: validate the control action inside init()

2019-03-07 Thread Davide Caratti
On Fri, 2019-03-01 at 16:04 -0800, Cong Wang wrote: > > On Fri, Mar 1, 2019 at 10:02 AM Davide Caratti wrote: > > > > if I well understand the question, you are worried about > > tcf_action_goto_chain_exec(), that can dereference 'oldchain' while we are > > overwriting the action. A call to tcf_c

Re: [PATCH v6 perf,bpf 08/15] perf, bpf: save btf in a rbtree in perf_env

2019-03-07 Thread Jiri Olsa
On Tue, Mar 05, 2019 at 11:13:52PM -0800, Song Liu wrote: SNIP > /* purge data in bpf_progs.infos tree */ > static void perf_env__purge_bpf(struct perf_env *env) > { > @@ -82,6 +133,19 @@ static void perf_env__purge_bpf(struct perf_env *env) > rb_erase_init(&node->rb_node, root);

Re: [PATCH v6 perf,bpf 06/15] perf, bpf: save bpf_prog_info in a rbtree in perf_env

2019-03-07 Thread Jiri Olsa
On Tue, Mar 05, 2019 at 11:13:50PM -0800, Song Liu wrote: > bpf_prog_info contains information necessary to annotate bpf programs. > This patch saves bpf_prog_info for bpf programs loaded in the system. > > Some big picture of the next few patches: > > To fully annotate BPF programs with source c

Re: [PATCH v6 perf,bpf 14/15] perf: introduce side band thread

2019-03-07 Thread Jiri Olsa
On Tue, Mar 05, 2019 at 11:13:58PM -0800, Song Liu wrote: SNIP > +void perf_evlist__stop_sb_thread(struct perf_evlist *evlist) > +{ > + if (!evlist) > + return; > + evlist->thread.done = 1; > + pthread_join(evlist->thread.th, NULL); > + perf_evlist__exit(evlist); > +

Re: [PATCH v6 perf,bpf 07/15] perf, bpf: save bpf_prog_info information as headers to perf.data

2019-03-07 Thread Jiri Olsa
On Tue, Mar 05, 2019 at 11:13:51PM -0800, Song Liu wrote: SNIP > +static int process_bpf_prog_info(struct feat_fd *ff, > + void *data __maybe_unused) > +{ > + struct bpf_prog_info_linear *info_linear; > + struct bpf_prog_info_node *info_node; > + struct pe

Re: [PATCH bpf] bpf: Stop the psock parser before canceling its work

2019-03-07 Thread Daniel Borkmann
On 03/07/2019 11:35 AM, Jakub Sitnicki wrote: > We might have never enabled (started) the psock's parser, in which case it > will not get stopped when destroying the psock. This leads to a warning > when trying to cancel parser's work from psock's deferred destructor: > > [ 405.325769] WARNING: C

Re: [PATCH net 03/16] net/sched: act_csum: validate the control action inside init()

2019-03-07 Thread Vlad Buslov
On Thu 07 Mar 2019 at 15:56, Davide Caratti wrote: > On Fri, 2019-03-01 at 16:04 -0800, Cong Wang wrote: >> > On Fri, Mar 1, 2019 at 10:02 AM Davide Caratti wrote: >> > >> > if I well understand the question, you are worried about >> > tcf_action_goto_chain_exec(), that can dereference 'oldchai

Re: [PATCH net-next 0/2] br_netfilter: enable in non-initial netns

2019-03-07 Thread Florian LAUNAY
Hi everyone, Can someone help move this topic forward ? This issue simply prevents any advanced use of docker in LXC. Thank you in advance! Florian LAUNAY On 07/11/2018 14:48, Christian Brauner wrote: Hey everyone, Over time I have seen multiple reports by users who want to run applications (

OK

2019-03-07 Thread AH ZA
Greetings, I humbly solicit for your partnership to transfer €15 million Euros into your personal or company’s account .I will offer you 30% of the total sum,60% will be for me while 10% will set aside for expenses that may be incurred on the process of transferring the fund. Contact me for more d

Re: [PATCH net 0/3] sctp: process the error returned from sctp_sock_migrate()

2019-03-07 Thread Marcelo Ricardo Leitner
On Mon, Mar 04, 2019 at 11:04:46AM -0800, David Miller wrote: > From: Xin Long > Date: Sun, 3 Mar 2019 17:54:52 +0800 > > > This patchset is to process the errs returned by sctp_auth_init_hmacs() > > and sctp_bind_addr_dup() from sctp_sock_migrate(). And also fix a panic > > caused by new ep->au

[PATCH] can: flexcan: bump FLEXCAN_TIMEOUT_US to 250

2019-03-07 Thread Rasmus Villemoes
While trying to add support for the Flexcan modules on the MPC8309, I'm hitting ETIMEDOUT in flexcan_chip_disable(). With this, probing succeeds. Checking the leftover value of timeout with a primitive pr_err("%s: timeout==%d\n", __func__, timeout); after the loop in chip_disable() typically sh

RE: AF_XDP design flaws

2019-03-07 Thread Maxim Mikityanskiy
> -Original Message- > From: Björn Töpel > Sent: 5 March, 2019 20:26 > To: Maxim Mikityanskiy > Cc: Jonathan Lemon ; John Fastabend > ; netdev@vger.kernel.org; Björn Töpel > ; Magnus Karlsson ; David > S. Miller ; Tariq Toukan ; Saeed > Mahameed ; Eran Ben Elisha > Subject: Re: AF_XDP de

Re: [PATCH] enic: fix build warning without CONFIG_CPUMASK_OFFSTACK

2019-03-07 Thread Nathan Chancellor
On Thu, Mar 07, 2019 at 10:33:02AM +0100, Arnd Bergmann wrote: > The enic driver relies on the CONFIG_CPUMASK_OFFSTACK feature to > dynamically allocate a struct member, but this is normally intended for > local variables. > > Building with clang, I get a warning for a few locations that check the

Re: [PATCH] davinci_emac: always build in CONFIG_OF code

2019-03-07 Thread Nathan Chancellor
On Thu, Mar 07, 2019 at 10:31:20AM +0100, Arnd Bergmann wrote: > clang warns about what seems to be an unintended use of an obscure C > language feature where a forward declaration of an array remains usable > when the final definition is never seen: > > drivers/net/ethernet/ti/davinci_emac.c:1694

Re: [PATCH] isdn: isdnloop: fix pointer dereference bug

2019-03-07 Thread Nathan Chancellor
On Thu, Mar 07, 2019 at 10:32:07AM +0100, Arnd Bergmann wrote: > clang has spotted an ancient code bug and warns about it with: > > drivers/isdn/isdnloop/isdnloop.c:573:12: error: address of array > 'card->rcard' will always evaluate to 'true' > [-Werror,-Wpointer-bool-conversion] > > This is a

Re: [PATCH] peak_usb: fix clang build warning

2019-03-07 Thread Nathan Chancellor
On Thu, Mar 07, 2019 at 11:31:55AM +0100, Arnd Bergmann wrote: > Clang points out undefined behavior when building the pcan_usb_pro driver: > > drivers/net/can/usb/peak_usb/pcan_usb_pro.c:136:15: error: passing an object > that undergoes default argument promotion to 'va_start' has undefined > b

Re: [RFC PATCH V2 5/5] vhost: access vq metadata through kernel virtual address

2019-03-07 Thread Michael S. Tsirkin
On Thu, Mar 07, 2019 at 10:45:57AM +0800, Jason Wang wrote: > > On 2019/3/7 上午12:31, Michael S. Tsirkin wrote: > > > +static void vhost_set_vmap_dirty(struct vhost_vmap *used) > > > +{ > > > + int i; > > > + > > > + for (i = 0; i < used->npages; i++) > > > + set_page_dirty_lock(used->pages

Re: [PATCH] peak_usb: fix clang build warning

2019-03-07 Thread Arnd Bergmann
On Thu, Mar 7, 2019 at 4:31 PM Nathan Chancellor wrote: > > On Thu, Mar 07, 2019 at 11:31:55AM +0100, Arnd Bergmann wrote: > > Clang points out undefined behavior when building the pcan_usb_pro driver: > > > > drivers/net/can/usb/peak_usb/pcan_usb_pro.c:136:15: error: passing an > > object that u

Re: [PATCH 1/2] ipmr: Make cache queue length configurable

2019-03-07 Thread Stephen Hemminger
On Thu, 7 Mar 2019 09:19:55 +1300 Brodie Greenfield wrote: > +ip_mr_cache_queue_length - INTEGER > + Limit the number of multicast packets we can have in the queue to be > + resolved. > + Bear in mind that when an unresolved multicast packet is received, > + there is an O(n) trav

Re: [PATCH RFC v2] mac80211: debugfs option to force TX status frames

2019-03-07 Thread Kalle Valo
Julius Niedworok writes: > At Technical University of Munich we use MAC 802.11 TX status frames to > perform several measurements in MAC 802.11 setups. > > With ath based drivers this was possible until commit d94a461d7a7df6 > ("ath9k: use ieee80211_tx_status_noskb where possible") as the driver

Re: [RFC PATCH V2 5/5] vhost: access vq metadata through kernel virtual address

2019-03-07 Thread Michael S. Tsirkin
On Wed, Mar 06, 2019 at 02:18:12AM -0500, Jason Wang wrote: > +static const struct mmu_notifier_ops vhost_mmu_notifier_ops = { > + .invalidate_range = vhost_invalidate_range, > +}; > + > void vhost_dev_init(struct vhost_dev *dev, > struct vhost_virtqueue **vqs, int nvqs, int

Re: [PATCH] enic: fix build warning without CONFIG_CPUMASK_OFFSTACK

2019-03-07 Thread Arnd Bergmann
On Thu, Mar 7, 2019 at 4:14 PM Nathan Chancellor wrote: > > A slightly less intrusive change would be using cpumask_available, which > was specifically introduced for this purpose in commit f7e30f01a9e2 > ("cpumask: Add helper cpumask_available()"). Ah nice, I wasn't aware of that function. I'll

[PATCH] [v2] enic: fix build warning without CONFIG_CPUMASK_OFFSTACK

2019-03-07 Thread Arnd Bergmann
The enic driver relies on the CONFIG_CPUMASK_OFFSTACK feature to dynamically allocate a struct member, but this is normally intended for local variables. Building with clang, I get a warning for a few locations that check the address of the cpumask_var_t: drivers/net/ethernet/cisco/enic/enic_main

[PATCH net 1/1] qede: Fix internal loopback failure with jumbo mtu configuration

2019-03-07 Thread Sudarsana Reddy Kalluru
Driver uses port-mtu as packet-size for the loopback traffic. This patch limits the max packet size to 1.5K to avoid data being split over multiple buffer descriptors (BDs) in cases where MTU > PAGE_SIZE. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior --- drivers/net/ethernet

Re: [PATCH] [v2] enic: fix build warning without CONFIG_CPUMASK_OFFSTACK

2019-03-07 Thread Nathan Chancellor
On Thu, Mar 07, 2019 at 04:52:24PM +0100, Arnd Bergmann wrote: > The enic driver relies on the CONFIG_CPUMASK_OFFSTACK feature to > dynamically allocate a struct member, but this is normally intended for > local variables. > > Building with clang, I get a warning for a few locations that check the

Re: [PATCH] ethtool: reduce stack usage with clang

2019-03-07 Thread Arnd Bergmann
On Thu, Mar 7, 2019 at 11:06 AM Michal Kubecek wrote: > > On Thu, Mar 07, 2019 at 10:33:35AM +0100, Arnd Bergmann wrote: > > @@ -2533,7 +2535,7 @@ static int ethtool_set_fecparam(struct net_device > > *dev, void __user *useraddr) > > > > /* The main entry point in this file. Called from net/co

[PATCH] [v2] ethtool: reduce stack usage with clang

2019-03-07 Thread Arnd Bergmann
clang inlines the dev_ethtool() more aggressively than gcc does, leading to a larger amount of used stack space: net/core/ethtool.c:2536:24: error: stack frame size of 1216 bytes in function 'dev_ethtool' [-Werror,-Wframe-larger-than=] Marking the sub-functions that require the most stack space

[PATCH] net: stmmac: Avoid sometimes uninitialized Clang warnings

2019-03-07 Thread Nathan Chancellor
When building with -Wsometimes-uninitialized, Clang warns: drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:495:3: warning: variable 'ns' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:495:3: warning: variable

Re: [PATCH v2] vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock

2019-03-07 Thread Stefan Hajnoczi
On Wed, Mar 06, 2019 at 12:13:53PM +0200, Adalbert Lazăr wrote: > Previous to commit 22b5c0b63f32 ("vsock/virtio: fix kernel panic > after device hot-unplug"), vsock_core_init() was called from > virtio_vsock_probe(). Now, virtio_transport_reset_no_sock() can be called > before vsock_core_init() ha

Re: [PATCH] [v2] ethtool: reduce stack usage with clang

2019-03-07 Thread Michal Kubecek
On Thu, Mar 07, 2019 at 04:58:35PM +0100, Arnd Bergmann wrote: > clang inlines the dev_ethtool() more aggressively than gcc does, leading > to a larger amount of used stack space: > > net/core/ethtool.c:2536:24: error: stack frame size of 1216 bytes in function > 'dev_ethtool' [-Werror,-Wframe-la

Re: [PATCH bpf] bpf: fix replace_map_fd_with_map_ptr's ldimm64 second imm field

2019-03-07 Thread Alexei Starovoitov
On Mon, Mar 04, 2019 at 09:08:53PM +0100, Daniel Borkmann wrote: > Non-zero imm value in the second part of the ldimm64 instruction for > BPF_PSEUDO_MAP_FD is invalid, and thus must be rejected. The map fd > only ever sits in the first instructions' imm field. None of the BPF > loaders known to us

Re: AF_XDP design flaws

2019-03-07 Thread Alexei Starovoitov
On Thu, Mar 07, 2019 at 03:09:33PM +, Maxim Mikityanskiy wrote: > > What I'm concerned of is a security hole this feature opens to the systems > not using AF_XDP. could you please explain the 'security hole' again because I still don't see one.

Re: [PATCH net 03/16] net/sched: act_csum: validate the control action inside init()

2019-03-07 Thread Davide Caratti
On Thu, 2019-03-07 at 14:51 +, Vlad Buslov wrote: [...] > On Thu 07 Mar 2019 at 15:56, Davide Caratti wrote: > > so, I think that the answer to your question: > > > > On Wed, 2019-02-27 at 17:50 -0800, Cong Wang wrote: > > > > > > + if (oldchain) > > > > > > + tcf_chain_

[PATCH] net: atm: Use IS_ENABLED in atm_dev_ioctl

2019-03-07 Thread Nathan Chancellor
When building with -Wsometimes-uninitialized, Clang warns: net/atm/resources.c:256:6: warning: variable 'number' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] net/atm/resources.c:212:7: warning: variable 'iobuf_len' is used uninitialized whenever 'if' conditio

Re: [PATCH] iwlwifi: fix 64-bit division

2019-03-07 Thread Kalle Valo
Arnd Bergmann wrote: > do_div() expects unsigned operands and otherwise triggers a warning like: > > drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c:465:2: error: > comparison of distinct pointer types ('typeof ((rtt_avg)) *' (aka 'long long > *') and 'uint64_t *' (aka 'unsigned long lo

Re: [PATCH v6 perf,bpf 07/15] perf, bpf: save bpf_prog_info information as headers to perf.data

2019-03-07 Thread Song Liu
> On Mar 7, 2019, at 6:05 AM, Jiri Olsa wrote: > > On Tue, Mar 05, 2019 at 11:13:51PM -0800, Song Liu wrote: > > SNIP > >> +static int process_bpf_prog_info(struct feat_fd *ff, >> + void *data __maybe_unused) >> +{ >> +struct bpf_prog_info_linear *info_linear;

Re: [PATCH v6 perf,bpf 06/15] perf, bpf: save bpf_prog_info in a rbtree in perf_env

2019-03-07 Thread Song Liu
> On Mar 7, 2019, at 6:05 AM, Jiri Olsa wrote: > > On Tue, Mar 05, 2019 at 11:13:50PM -0800, Song Liu wrote: >> bpf_prog_info contains information necessary to annotate bpf programs. >> This patch saves bpf_prog_info for bpf programs loaded in the system. >> >> Some big picture of the next fe

Re: [PATCH] igc: remove unused igc_priv_flags_strings array

2019-03-07 Thread David Miller
From: Arnd Bergmann Date: Thu, 7 Mar 2019 10:29:57 +0100 > clang points out that the igc_priv_flags_strings[] array is never > referenced, aside from being used for calculating its length: > > drivers/net/ethernet/intel/igc/igc_ethtool.c:9:19: error: variable > 'igc_priv_flags_strings' is not

Re: [PATCH] isdn: isdnloop: fix pointer dereference bug

2019-03-07 Thread David Miller
From: Arnd Bergmann Date: Thu, 7 Mar 2019 10:32:07 +0100 > clang has spotted an ancient code bug and warns about it with: > > drivers/isdn/isdnloop/isdnloop.c:573:12: error: address of array > 'card->rcard' will always evaluate to 'true' > [-Werror,-Wpointer-bool-conversion] > > This is an a

Re: [PATCH] davinci_emac: always build in CONFIG_OF code

2019-03-07 Thread David Miller
From: Arnd Bergmann Date: Thu, 7 Mar 2019 10:31:20 +0100 > clang warns about what seems to be an unintended use of an obscure C > language feature where a forward declaration of an array remains usable > when the final definition is never seen: > > drivers/net/ethernet/ti/davinci_emac.c:1694:34

Re: [PATCH net] ravb: Decrease TxFIFO depth of Q3 and Q2 to one

2019-03-07 Thread David Miller
From: Simon Horman Date: Thu, 7 Mar 2019 11:24:47 +0100 > From: Masaru Nagai > > Hardware has the CBS (Credit Based Shaper) which affects only Q3 > and Q2. When updating the CBS settings, even if the driver does so > after waiting for Tx DMA finished, there is a possibility that frame > data s

Re: [PATCH] igc: remove unused igc_priv_flags_strings array

2019-03-07 Thread Neftin, Sasha
On 3/7/2019 09:29, David Miller wrote: From: Arnd Bergmann Date: Thu, 7 Mar 2019 10:29:57 +0100 clang points out that the igc_priv_flags_strings[] array is never referenced, aside from being used for calculating its length: drivers/net/ethernet/intel/igc/igc_ethtool.c:9:19: error: variable

Re: [PATCH net] ravb: Decrease TxFIFO depth of Q3 and Q2 to one

2019-03-07 Thread Sergei Shtylyov
Hello! On 03/07/2019 01:24 PM, Simon Horman wrote: > From: Masaru Nagai > > Hardware has the CBS (Credit Based Shaper) which affects only Q3 > and Q2. When updating the CBS settings, We seem to only write the defaults into TCG, not update them below... Do we really use TX queues 2/3? I thou

Re: [PATCH] peak_usb: fix clang build warning

2019-03-07 Thread David Miller
From: Arnd Bergmann Date: Thu, 7 Mar 2019 11:31:55 +0100 > Clang points out undefined behavior when building the pcan_usb_pro driver: > > drivers/net/can/usb/peak_usb/pcan_usb_pro.c:136:15: error: passing an object > that undergoes default argument promotion to 'va_start' has undefined > beha

[PATCH net] net/hsr: fix possible crash in add_timer()

2019-03-07 Thread Eric Dumazet
syzbot found another add_timer() issue, this time in net/hsr [1] Let's use mod_timer() which is safe. [1] kernel BUG at kernel/time/timer.c:1136! invalid opcode: [#1] PREEMPT SMP KASAN CPU: 0 PID: 15909 Comm: syz-executor.3 Not tainted 5.0.0+ #97 Hardware name: Google Google Compute Engine/G

Re: [PATCH] [v2] enic: fix build warning without CONFIG_CPUMASK_OFFSTACK

2019-03-07 Thread David Miller
From: Arnd Bergmann Date: Thu, 7 Mar 2019 16:52:24 +0100 > The enic driver relies on the CONFIG_CPUMASK_OFFSTACK feature to > dynamically allocate a struct member, but this is normally intended for > local variables. > > Building with clang, I get a warning for a few locations that check the >

Re: [PATCH net 1/1] qede: Fix internal loopback failure with jumbo mtu configuration

2019-03-07 Thread David Miller
From: Sudarsana Reddy Kalluru Date: Thu, 7 Mar 2019 07:56:35 -0800 > Driver uses port-mtu as packet-size for the loopback traffic. This patch > limits the max packet size to 1.5K to avoid data being split over multiple > buffer descriptors (BDs) in cases where MTU > PAGE_SIZE. > > Signed-off-by:

Re: [PATCH] [v2] ethtool: reduce stack usage with clang

2019-03-07 Thread David Miller
From: Arnd Bergmann Date: Thu, 7 Mar 2019 16:58:35 +0100 > clang inlines the dev_ethtool() more aggressively than gcc does, leading > to a larger amount of used stack space: > > net/core/ethtool.c:2536:24: error: stack frame size of 1216 bytes in function > 'dev_ethtool' [-Werror,-Wframe-large

[PATCH 01/35] perf, bpf: Consider events with attr.bpf_event as side-band events

2019-03-07 Thread Arnaldo Carvalho de Melo
From: Song Liu Events with attr.bpf_event set should be considered as side-band events, as they carry information about BPF programs. Signed-off-by: Song Liu Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: kernel-t...@fb.com Cc: netdev@vger.

Re: [PATCH] net: stmmac: Avoid sometimes uninitialized Clang warnings

2019-03-07 Thread David Miller
From: Nathan Chancellor Date: Thu, 7 Mar 2019 09:21:01 -0700 > @@ -565,7 +565,7 @@ static int stmmac_hwtstamp_set(struct net_device *dev, > struct ifreq *ifr) > u32 ts_master_en = 0; > u32 ts_event_en = 0; > u32 value = 0; > - u32 sec_inc; > + u32 sec_inc = 0; >

Re: general protection fault in sctp_sched_rr_dequeue

2019-03-07 Thread Marcelo Ricardo Leitner
On Wed, Mar 06, 2019 at 07:03:10AM -0500, Neil Horman wrote: > On Wed, Mar 06, 2019 at 06:43:48PM +0800, Xin Long wrote: > > On Wed, Mar 6, 2019 at 9:42 AM syzbot > > wrote: > > > > > > Hello, > > > > > > syzbot found the following crash on: > > > > > > HEAD commit:63bdf4284c38 Merge branch 'l

Re: AF_XDP design flaws

2019-03-07 Thread Björn Töpel
On Thu, 7 Mar 2019 at 16:09, Maxim Mikityanskiy wrote: > [...] > > > Now, onto Max' concerns, from my perspective: > > > > 1. The kernel spins too much in napi mode. > > Not just too much, it will do it forever if the application simply doesn't > act. > > > Yes, the i40e driver does spin for thro

Re: [PATCH] net: atm: Use IS_ENABLED in atm_dev_ioctl

2019-03-07 Thread David Miller
From: Nathan Chancellor Date: Thu, 7 Mar 2019 09:57:42 -0700 > When building with -Wsometimes-uninitialized, Clang warns: > > net/atm/resources.c:256:6: warning: variable 'number' is used uninitialized > whenever 'if' condition is true [-Wsometimes-uninitialized] > net/atm/resources.c:212:7: w

Re: [PATCH] net: stmmac: Avoid sometimes uninitialized Clang warnings

2019-03-07 Thread Nick Desaulniers
On Thu, Mar 7, 2019 at 9:49 AM David Miller wrote: > > From: Nathan Chancellor > Date: Thu, 7 Mar 2019 09:21:01 -0700 > > > @@ -565,7 +565,7 @@ static int stmmac_hwtstamp_set(struct net_device *dev, > > struct ifreq *ifr) > > u32 ts_master_en = 0; > > u32 ts_event_en = 0; > >

Re: [RFC PATCH V2 5/5] vhost: access vq metadata through kernel virtual address

2019-03-07 Thread Michael S. Tsirkin
On Thu, Mar 07, 2019 at 10:47:22AM -0500, Michael S. Tsirkin wrote: > On Wed, Mar 06, 2019 at 02:18:12AM -0500, Jason Wang wrote: > > +static const struct mmu_notifier_ops vhost_mmu_notifier_ops = { > > + .invalidate_range = vhost_invalidate_range, > > +}; > > + > > void vhost_dev_init(struct vh

[PATCH v7 perf,bpf 00/15] perf annotation of BPF programs

2019-03-07 Thread Song Liu
Changes v6 to v7: 1. Fix minor issues suggested by Jiri. Changes v5 to v6: 1. Improve side band evlist interface; 2. Minor style fixes. Changes v4 to v5: 1. Rebase to latest bpf-next; 2. Add dependency of 94816add0005 from Arnaldo's tree; 3. More details in change logs; 4. Add perf_env__init() to

[PATCH v7 perf,bpf 05/15] perf: change prototype of perf_event__synthesize_bpf_events()

2019-03-07 Thread Song Liu
This patch changes the arguments of perf_event__synthesize_bpf_events() to include perf_session* instead of perf_tool*. perf_session will be used in the next patch. Signed-off-by: Song Liu --- tools/perf/builtin-record.c | 2 +- tools/perf/builtin-top.c| 2 +- tools/perf/util/bpf-event.c | 8

[PATCH v7 perf,bpf 03/15] bpf: bpftool: use bpf_program__get_prog_info_linear() in prog.c:do_dump()

2019-03-07 Thread Song Liu
This patches uses bpf_program__get_prog_info_linear() to simplify the logic in prog.c do_dump(). Cc: Daniel Borkmann Cc: Alexei Starovoitov Signed-off-by: Song Liu --- tools/bpf/bpftool/prog.c | 266 +-- 1 file changed, 59 insertions(+), 207 deletions(-) di

[PATCH v7 perf,bpf 01/15] perf, bpf: consider events with attr.bpf_event as side-band events

2019-03-07 Thread Song Liu
Events with bpf_event should be considered as side-band event, as they carry information about BPF programs. Fixes: 6ee52e2a3fe4 ("perf, bpf: Introduce PERF_RECORD_BPF_EVENT") Signed-off-by: Song Liu --- kernel/events/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/k

[PATCH v7 perf,bpf 06/15] perf, bpf: save bpf_prog_info in a rbtree in perf_env

2019-03-07 Thread Song Liu
bpf_prog_info contains information necessary to annotate bpf programs. This patch saves bpf_prog_info for bpf programs loaded in the system. Some big picture of the next few patches: To fully annotate BPF programs with source code mapping, 4 different information are needed: 1) PERF_RECORD_KS

[PATCH v7 perf,bpf 11/15] perf: add -lopcodes to feature-libbfd

2019-03-07 Thread Song Liu
Both libbfd and libopcodes are distributed with binutil-dev/devel. When libbfd presents, it is OK to assume libopcodes also presents. This has been a safe assumption for bpftool. This patch adds -lopcodes to perf/Makefile.config. libopcodes will be used in the next commit for bpf annotation. Sign

[PATCH v7 perf,bpf 12/15] perf, bpf: enable annotation of bpf program

2019-03-07 Thread Song Liu
This patch enables the annotation of bpf program. A new dso type DSO_BINARY_TYPE__BPF_PROG_INFO is introduced to for BPF programs. In symbol__disassemble(), DSO_BINARY_TYPE__BPF_PROG_INFO dso calls into a new function symbol__disassemble_bpf(), where annotation line information is filled based bpf

[PATCH v7 perf,bpf 04/15] perf, bpf: synthesize bpf events with bpf_program__get_prog_info_linear()

2019-03-07 Thread Song Liu
With bpf_program__get_prog_info_linear, we can simplify the logic that synthesizes bpf events. This patch doesn't change the behavior of the code. Signed-off-by: Song Liu --- tools/perf/util/bpf-event.c | 118 1 file changed, 40 insertions(+), 78 deletions(-

[PATCH v7 perf,bpf 07/15] perf, bpf: save bpf_prog_info information as headers to perf.data

2019-03-07 Thread Song Liu
This patch enables perf-record to save bpf_prog_info information as headers to perf.data. A new header type HEADER_BPF_PROG_INFO is introduced for this data. Signed-off-by: Song Liu --- tools/perf/util/header.c | 145 ++- tools/perf/util/header.h | 1 + 2 fi

[PATCH v7 perf,bpf 08/15] perf, bpf: save btf in a rbtree in perf_env

2019-03-07 Thread Song Liu
btf contains information necessary to annotate bpf programs. This patch saves btf for bpf programs loaded in the system. Signed-off-by: Song Liu --- tools/perf/util/bpf-event.c | 23 + tools/perf/util/bpf-event.h | 7 tools/perf/util/env.c | 65 +++

[PATCH v7 perf,bpf 02/15] bpf: libbpf: introduce bpf_program__get_prog_info_linear()

2019-03-07 Thread Song Liu
Currently, bpf_prog_info includes 9 arrays. The user has the option to fetch any combination of these arrays. However, this requires a lot of handling of these arrays. This work becomes more tricky when we need to store bpf_prog_info to a file, because these arrays are allocated independently. Thi

[PATCH v7 perf,bpf 14/15] perf: introduce side band thread

2019-03-07 Thread Song Liu
This patch introduces side band thread that captures extended information for events like PERF_RECORD_BPF_EVENT. This new thread uses its own evlist that uses ring buffer with very low watermark for lower latency. To use side band thread, we need to: 1. add side band event(s) by calling perf_evl

[PATCH v2] net: stmmac: Avoid sometimes uninitialized Clang warnings

2019-03-07 Thread Nathan Chancellor
When building with -Wsometimes-uninitialized, Clang warns: drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:495:3: warning: variable 'ns' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:495:3: warning: variable

[PATCH v7 perf,bpf 13/15] perf, bpf: process PERF_BPF_EVENT_PROG_LOAD for annotation

2019-03-07 Thread Song Liu
This patch adds processing of PERF_BPF_EVENT_PROG_LOAD, which sets proper DSO type/id/etc of memory regions mapped to BPF programs to DSO_BINARY_TYPE__BPF_PROG_INFO Signed-off-by: Song Liu --- tools/perf/util/bpf-event.c | 53 + 1 file changed, 53 insertions(+

[PATCH v7 perf,bpf 10/15] perf-top: add option --no-bpf-event

2019-03-07 Thread Song Liu
bpf events should be tracked by default for perf-top. This patch makes it on by default, and adds option to disable bpf events. Signed-off-by: Song Liu --- tools/perf/builtin-top.c | 3 +++ tools/perf/util/top.h| 1 + 2 files changed, 4 insertions(+) diff --git a/tools/perf/builtin-top.c b/

[PATCH v7 perf,bpf 09/15] perf, bpf: save btf information as headers to perf.data

2019-03-07 Thread Song Liu
This patch enables perf-record to save btf information as headers to perf.data A new header type HEADER_BPF_BTF is introduced for this data. Signed-off-by: Song Liu --- tools/perf/util/header.c | 107 ++- tools/perf/util/header.h | 1 + 2 files changed, 107

[PATCH v7 perf,bpf 15/15] perf, bpf: save bpf_prog_info and btf of short living bpf programs

2019-03-07 Thread Song Liu
To fully annotate BPF programs with source code mapping, 4 different information are needed: 1) PERF_RECORD_KSYMBOL 2) PERF_RECORD_BPF_EVENT 3) bpf_prog_info 4) btf This patch handles 3) and 4) for short living BPF programs. For timely process of these information, a dedicated even

[PATCH] net: atm: Add another IS_ENABLED(CONFIG_COMPAT) in atm_dev_ioctl

2019-03-07 Thread Nathan Chancellor
I removed compat's universal assignment to 0, which allows this if statement to fall through when compat is passed with a value other than 0. Fixes: f9d19a7494e5 ("net: atm: Use IS_ENABLED in atm_dev_ioctl") Signed-off-by: Nathan Chancellor --- Sorry for not paying more attention :( net/atm/re

Re: [PATCH v2] net: stmmac: Avoid sometimes uninitialized Clang warnings

2019-03-07 Thread Nick Desaulniers
On Thu, Mar 7, 2019 at 10:00 AM Nathan Chancellor wrote: > > When building with -Wsometimes-uninitialized, Clang warns: > > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:495:3: warning: variable > 'ns' is used uninitialized whenever 'if' condition is false > [-Wsometimes-uninitialized] > dri

KASAN: slab-out-of-bounds Read in tcp_sk_exit

2019-03-07 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:e15aa3b2b138 ucc_geth: Reset BQL queue when stopping device git tree: net console output: https://syzkaller.appspot.com/x/log.txt?x=149b240f40 kernel config: https://syzkaller.appspot.com/x/.config?x=4fceea9e2d99ac20 dashboar

general protection fault in __queue_work

2019-03-07 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:3717f613f48d Merge branch 'core-rcu-for-linus' of git://gi.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=156e100b20 kernel config: https://syzkaller.appspot.com/x/.config?x=73d88a42238825ad da

Re: [PATCH net 1/3] sctp: sctp_sock_migrate() returns error if sctp_bind_addr_dup() fails

2019-03-07 Thread Marcelo Ricardo Leitner
On Sun, Mar 03, 2019 at 05:54:53PM +0800, Xin Long wrote: > It should fail to create the new sk if sctp_bind_addr_dup() fails > when accepting or peeloff an association. > > Signed-off-by: Xin Long > --- > net/sctp/socket.c | 34 -- > 1 file changed, 24 insertions

  1   2   >