[PATCH net-next v2 2/4] qede: Simplify the usage of qede-flags.

2018-11-23 Thread Sudarsana Reddy Kalluru
The values represented by qede->flags is being used in mixed ways: 1. As 'value' at some places e.g., QEDE_FLAGS_IS_VF usage 2. As bit-mask(value) at some places e.g., QEDE_FLAGS_PTP_TX_IN_PRORGESS usage. This implementation pose problems in future when we want to add more flag values e.g.

[PATCH net-next v2 4/4] qed: Add support for MBI upgrade over MFW.

2018-11-23 Thread Sudarsana Reddy Kalluru
The patch adds driver support for MBI image update through MFW. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon --- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 6 drivers/net/ethernet/qlogic/qed/qed_main.c | 13 +++-- drivers/net/ethe

[PATCH net-next v2 3/4] qede: Update link status only when interface is ready.

2018-11-23 Thread Sudarsana Reddy Kalluru
In the case of internal reload (e.g., mtu change), there could be a race between link-up notification from mfw and the driver unload processing. In such case kernel assumes the link is up and starts using the queues which leads to the server crash. Send link notification to the kernel only when dr

[PATCH net-next v2 1/4] qed: Display port_id in the UFP debug messages.

2018-11-23 Thread Sudarsana Reddy Kalluru
MFW sends UFP notifications mostly during the device init phase and PFs might not be assigned with a name by this time. Hence capturing port-id in the debug messages would help in finding which PF the ufp notification was sent to. Also, fixed a minor scemantic issue in a debug print. Signed-off-b

[PATCH net-next v2 0/4] qed* enhancements series

2018-11-23 Thread Sudarsana Reddy Kalluru
From: Sudarsana Reddy Kalluru The patch series add few enhancements to qed/qede drivers. Changes from previous versions: --- v2: Use __set_bit()/__clear_bit() where data access doesn't need to be atomic. Please consider applying it to "net-next". Sudarsana Reddy

Re: consistency for statistics with XDP mode

2018-11-23 Thread David Miller
From: David Ahern Date: Thu, 22 Nov 2018 09:51:27 -0700 > I would like to see basic packets, bytes, and dropped counters tracked > for Rx and Tx via the standard netdev counters for all devices. This is > for ease in accounting as well as speed and simplicity for bumping > counters for virtual de

[GIT] Networking

2018-11-23 Thread David Miller
1) Need to take mutex in ath9k_add_interface(), from Dan Carpenter. 2) Fix mt76 build without CONFIG_LEDS_CLASS, from Arnd Bergmann. 3) Fix socket wmem accounting in SCTP, from Xin Long. 4) Fix failed resume crash in ena driver, from Arthur Kiyanovski. 5) qed driver passes bytes instead of bi

[PATCH iproute2-next] tc: fq: support ce_threshold attribute

2018-11-23 Thread Eric Dumazet
Kernel commit 48872c11b772 ("net_sched: sch_fq: add dctcp-like marking") added support for TCA_FQ_CE_THRESHOLD attribute. This patch adds iproute2 support for it. It also makes sure fq_print_xstats() can deal with smaller tc_fq_qd_stats structures given by older kernels. Usage : FQATTRS="ce_thr

Re: [PATCH] net: gemini: Fix copy/paste error

2018-11-23 Thread David Miller
From: Linus Walleij Date: Sat, 24 Nov 2018 00:16:34 +0100 > From: Andreas Fiedler > > The TX stats should be started with the tx_stats_syncp, > there seems to be a copy/paste error in the driver. > > Signed-off-by: Andreas Fiedler > Signed-off-by: Linus Walleij Applied.

Re: [PATCH net v3] net: phy: mscc: fix deadlock in vsc85xx_default_config

2018-11-23 Thread David Miller
From: Quentin Schulz Date: Fri, 23 Nov 2018 19:01:51 +0100 > The vsc85xx_default_config function called in the vsc85xx_config_init > function which is used by VSC8530, VSC8531, VSC8540 and VSC8541 PHYs > mistakenly calls phy_read and phy_write in-between phy_select_page and > phy_restore_page. >

Re: [PATCH] dt-bindings: dsa: Fix typo in "probed"

2018-11-23 Thread David Miller
From: Fabio Estevam Date: Fri, 23 Nov 2018 15:46:50 -0200 > The correct form is "can be probed", so fix the typo. > > Signed-off-by: Fabio Estevam Applied.

Re: [PATCH net] net: thunderx: set tso_hdrs pointer to NULL in nicvf_free_snd_queue

2018-11-23 Thread David Miller
From: Lorenzo Bianconi Date: Fri, 23 Nov 2018 18:28:01 +0100 > Reset snd_queue tso_hdrs pointer to NULL in nicvf_free_snd_queue routine > since it is used to check if tso dma descriptor queue has been previously > allocated. The issue can be triggered with the following reproducer: > > $ip link

Re: [PATCH net-next v3 1/4] enetc: Introduce basic PF and VF ENETC ethernet drivers

2018-11-23 Thread David Miller
From: Claudiu Manoil Date: Fri, 23 Nov 2018 12:46:00 +0200 > +static int enetc_poll(struct napi_struct *napi, int budget) > +{ > + struct enetc_int_vector > + *v = container_of(napi, struct enetc_int_vector, napi); > + bool complete = true; > + int work_done; > + int i

Re: [PATCH v2 net] phy: Micrel KSZ8061: link failure after cable connect

2018-11-23 Thread David Miller
From: "Onnasch, Alexander (EXT)" Date: Fri, 23 Nov 2018 09:36:11 + > With Micrel KSZ8061 PHY, the link may occasionally not come up after > Ethernet cable connect. The vendor's (Microchip, former Micrel) errata > sheet 8688A.pdf describes the problem and possible workarounds in > detail,

Re: [RFCv3 PATCH 1/6] uacce: Add documents for WarpDrive/uacce

2018-11-23 Thread Kenneth Lee
On Fri, Nov 23, 2018 at 11:05:04AM -0700, Jason Gunthorpe wrote: > Date: Fri, 23 Nov 2018 11:05:04 -0700 > From: Jason Gunthorpe > To: Kenneth Lee > CC: Leon Romanovsky , Kenneth Lee , > Tim Sell , linux-...@vger.kernel.org, Alexander > Shishkin , Zaibo Xu > , zhangfei@foxmail.com, linux..

Re: [PATCH v2 2/2] arm64/bpf: don't allocate BPF JIT programs in module memory

2018-11-23 Thread kbuild test robot
Hi Ard, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] [also build test ERROR on v4.20-rc3 next-20181123] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

[PATCH net-next v2 3/3] net: bridge: export supported boolopts

2018-11-23 Thread Nikolay Aleksandrov
Now that we have at least one bool option, we can export all of the supported bool options via optmask when dumping them. v2: new patch Signed-off-by: Nikolay Aleksandrov --- net/bridge/br.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bridge/br.c b/net/bridge/br.c in

[PATCH net-next v2 2/3] net: bridge: add no_linklocal_learn bool option

2018-11-23 Thread Nikolay Aleksandrov
Use the new boolopt API to add an option which disables learning from link-local packets. The default is kept as before and learning is enabled. This is a simple map from a boolopt bit to a bridge private flag that is tested before learning. v2: pass NULL for extack via sysfs Signed-off-by: Nikol

[PATCH net-next v2 1/3] net: bridge: add support for user-controlled bool options

2018-11-23 Thread Nikolay Aleksandrov
We have been adding many new bridge options, a big number of which are boolean but still take up netlink attribute ids and waste space in the skb. Recently we discussed learning from link-local packets[1] and decided yet another new boolean option will be needed, thus introducing this API to save s

[PATCH net-next v2 0/3] net: bridge: add an option to disabe linklocal learning

2018-11-23 Thread Nikolay Aleksandrov
Hi, This set adds a new bridge option which can control learning from link-local packets, by default learning is on to be consistent and avoid breaking users expectations. If the new no_linklocal_learn option is enabled then the bridge will stop learning from link-local packets. In order to save s

[PATCH 2/8] sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD

2018-11-23 Thread Deepa Dinamani
SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING options, the way they are currently defined, are not y2038 safe. Subsequent patches in the series add new y2038 safe versions of these options which provide 64 bit timestamps on all architectures uniformly. Hence, rename existing options with OLD tag

[PATCH 3/8] socket: Disentangle SOCK_RCVTSTAMPNS from SOCK_RCVTSTAMP

2018-11-23 Thread Deepa Dinamani
SOCK_RCVTSTAMPNS is never set alone. SOCK_RCVTSTAMP is always set along with SOCK_RCVTSTAMPNS. This leads to checking for two flag states whenever we need to check for SOCK_RCVTSTAMPS. Also SOCK_RCVTSTAMPS was the only flag that needed to be checked in order to verify if either of the two flags ar

[PATCH 4/8] arch: sparc: Override struct __kernel_old_timeval

2018-11-23 Thread Deepa Dinamani
struct __kernel_old_timeval is supposed to have the same layout as struct timeval. But, it was inadvarently missed that __kernel_suseconds has a different definition for sparc64. Provide an asm-specific override that fixes it. Reported-by: Arnd Bergmann Suggested-by: Arnd Bergmann Signed-off-by:

[PATCH 5/8] socket: Use old_timeval types for socket timestamps

2018-11-23 Thread Deepa Dinamani
As part of y2038 solution, all internal uses of struct timeval are replaced by struct __kernel_old_timeval and struct compat_timeval by struct old_timeval32. Make socket timestamps use these new types. This is mainly to be able to verify that the kernel build is y2038 safe when such non y2038 safe

[PATCH 6/8] socket: Add struct sock_timeval

2018-11-23 Thread Deepa Dinamani
The new type is meant to be used as a y2038 safe structure to be used as part of cmsg data. Presently the SO_TIMESTAMP socket option uses struct timeval for timestamps. This is not y2038 safe. Subsequent patches in the series add new y2038 safe socket option to be used in the place of SO_TIMESTAMP_

[PATCH 1/8] arch: Use asm-generic/socket.h when possible

2018-11-23 Thread Deepa Dinamani
Many architectures maintain an arch specific copy of the file even though there are no differences with the asm-generic one. Allow these architectures to use the generic one instead. Signed-off-by: Deepa Dinamani Cc: ch...@zankel.net Cc: fenghua...@intel.com Cc: t...@linutronix.de Cc: schwidef...

[PATCH 7/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-11-23 Thread Deepa Dinamani
Add SO_TIMESTAMP_NEW and SO_TIMESTAMPNS_NEW variants of socket timestamp options. These are the y2038 safe versions of the SO_TIMESTAMP_OLD and SO_TIMESTAMPNS_OLD for all architectures. Note that the format of scm_timestamping.ts[0] is not changed in this patch. Signed-off-by: Deepa Dinamani Cc:

[PATCH 8/8] socket: Add SO_TIMESTAMPING_NEW

2018-11-23 Thread Deepa Dinamani
Add SO_TIMESTAMPING_NEW variant of socket timestamp options. This is the y2038 safe versions of the SO_TIMESTAMPING_OLD for all architectures. Signed-off-by: Deepa Dinamani Cc: ch...@zankel.net Cc: fenghua...@intel.com Cc: r...@twiddle.net Cc: t...@linutronix.de Cc: ubr...@linux.ibm.com Cc: linux

[PATCH 0/8] net: y2038-safe socket timestamps

2018-11-23 Thread Deepa Dinamani
The series introduces new socket timestamps that are y2038 safe. The time data types used for the existing socket timestamp options: SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING are not y2038 safe. The series introduces SO_TIMESTAMP_NEW, SO_TIMESTAMPNS_NEW and SO_TIMESTAMPING_NEW to replace th

Re: [PATCH net-next 2/4] qede: Simplify the usage of qede-flags.

2018-11-23 Thread David Miller
From: Sudarsana Reddy Kalluru Date: Thu, 22 Nov 2018 22:44:49 -0800 > - edev->flags |= QEDE_FLAG_IS_VF; > + set_bit(QEDE_FLAGS_IS_VF, &edev->flags); ... > - edev->flags |= QEDE_TX_TIMESTAMPING_EN; > + set_bit(QEDE_FLAGS_TX_TIMESTAMPING_EN, &edev->fl

Re: [PATCH v2 net-next] ptp: Fix pass zero to ERR_PTR() in ptp_clock_register

2018-11-23 Thread David Miller
From: YueHaibing Date: Fri, 23 Nov 2018 09:54:55 +0800 > Fix smatch warning: > > drivers/ptp/ptp_clock.c:298 ptp_clock_register() warn: > passing zero to 'ERR_PTR' > > 'err' should be set while device_create_with_groups and > pps_register_source fails > > Fixes: 85a66e550195 ("ptp: create "pi

Re: [PATCH net-next 00/12] switchdev: Convert switchdev_port_obj_{add,del}() to notifiers

2018-11-23 Thread David Miller
From: Petr Machata Date: Thu, 22 Nov 2018 23:27:52 + > An offloading driver may need to have access to switchdev events on > ports that aren't directly under its control. An example is a VXLAN port > attached to a bridge offloaded by a driver. The driver needs to know > about VLANs configured

Re: [PATCH net-next 0/5] r8169: some functional improvements

2018-11-23 Thread David Miller
From: Heiner Kallweit Date: Thu, 22 Nov 2018 21:54:36 +0100 > This series includes a few functional improvements. Series applied.

Re: [PATCH V2 net-next 0/8] net: hns3: Adds support of debugfs to HNS3 driver

2018-11-23 Thread David Miller
From: Salil Mehta Date: Thu, 22 Nov 2018 14:09:40 + > This patchset adds support of debugfs to the HNS3 driver. > > Support has been added to query info related to below items: > 1. Queue related ("echo queue info [queue no] > cmd") > 2. Flow Director ("echo dump fd tcam > cmd") > 3. TC con

Re: [PATCH net-next] net: cavium: clean up return value check in cavium_ptp_probe

2018-11-23 Thread David Miller
From: YueHaibing Date: Thu, 22 Nov 2018 21:27:19 +0800 > ptp_clock_register never return NULL, so no need check this > in cavium_ptp_probe. > > Signed-off-by: YueHaibing Applied.

Re: [PATCH net-next] net: phy: vitesse: remove duplicate support for VSC8574

2018-11-23 Thread David Miller
From: Quentin Schulz Date: Thu, 22 Nov 2018 14:24:32 +0100 > A more featureful support for VSC8574 was recently added to the > Microsemi (mscc.c) driver. I checked that features supported in the > Vitesse driver are also supported in the Microsemi driver. > > Signed-off-by: Quentin Schulz Appl

Re: [PATCH v2] net: amd: add missing of_node_put()

2018-11-23 Thread David Miller
From: Yangtao Li Date: Thu, 22 Nov 2018 07:34:41 -0500 > of_find_node_by_path() acquires a reference to the node > returned by it and that reference needs to be dropped by its caller. > This place doesn't do that, so fix it. > > Signed-off-by: Yangtao Li Applied.

Re: [PATCH net-next 0/4] octeontx2-af: CGX LMAC link bringup and cleanups

2018-11-23 Thread David Miller
From: Linu Cherian Date: Thu, 22 Nov 2018 17:18:33 +0530 > From: Linu Cherian > > Patch 1: Code cleanup > Patch 2: Adds support for an unhandled hardware configuration > Patch 3: Preparatory patch for enabling cgx lmac links > Patch 4: Support for enabling cgx lmac links Series applied.

Re: [PATCH][V2] net: hinic: fix null pointer dereference on pointer hwdev

2018-11-23 Thread David Miller
From: Colin King Date: Thu, 22 Nov 2018 10:05:01 + > From: Colin Ian King > > Pointer hwdev is being dereferenced when declaring hwif , however, later > on hwdev is being null checked, hence we have dereference before null > check error. Fix this by assigning hwif and pdef only once hwdev h

Re: [PATCH net-next 00/10] net/smc: patches 2018-11-22

2018-11-23 Thread David Miller
From: Ursula Braun Date: Thu, 22 Nov 2018 10:26:33 +0100 > here are more patches for SMC: > * patches 1-3 and 7 are cleanups without functional change > * patches 4-6 and 8 are optimizations of existing code > * patches 9 and 10 introduce and exploit LLC message DELETE RKEY Series applied.

Re: [PATCH net] team: no need to do team_notify_peers or team_mcast_rejoin when disabling port

2018-11-23 Thread David Miller
From: Hangbin Liu Date: Thu, 22 Nov 2018 16:15:28 +0800 > team_notify_peers() will send ARP and NA to notify peers. team_mcast_rejoin() > will send multicast join group message to notify peers. We should do this when > enabling/changed to a new port. But it doesn't make sense to do it when a port

Re: [PATCH mac80211-next v4] mac80211-next: rtnetlink wifi simulation device

2018-11-23 Thread kbuild test robot
Hi Cody, Thank you for the patch! Yet something to improve: [auto build test ERROR on mac80211-next/master] url: https://github.com/0day-ci/linux/commits/Cody-Schuffelen/mac80211-next-rtnetlink-wifi-simulation-device/20181124-020949 base: https://git.kernel.org/pub/scm/linux/kernel/git/jbe

Re: [PATCH net-next] net: mvneta: remove redundant check for eee->tx_lpi_timer < 0

2018-11-23 Thread David Miller
From: YueHaibing Date: Thu, 22 Nov 2018 14:42:00 +0800 > fixes the smatch warning: > > drivers/net/ethernet/marvell/mvneta.c:4252 mvneta_ethtool_set_eee() warn: > unsigned 'eee->tx_lpi_timer' is never less than zero. > > Signed-off-by: YueHaibing Applied.

[PATCH bpf-next v2 4/4] libbpf: Document API and ABI conventions

2018-11-23 Thread Andrey Ignatov
Document API and ABI for libbpf: naming convention, symbol visibility, ABI versioning. This is just a starting point. Documentation can be significantly extended in the future to cover more topics. ABI versioning section touches only a few basic points with a link to more comprehensive documentat

[PATCH bpf-next v2 2/4] libbpf: Add version script for DSO

2018-11-23 Thread Andrey Ignatov
More and more projects use libbpf and one day it'll likely be packaged and distributed as DSO and that requires ABI versioning so that both compatible and incompatible changes to ABI can be introduced in a safe way in the future without breaking executables dynamically linked with a previous versio

[PATCH bpf-next v2 3/4] libbpf: Verify versioned symbols

2018-11-23 Thread Andrey Ignatov
Since ABI versioning info is kept separately from the code it's easy to forget to update it while adding a new API. Add simple verification that all global symbols exported with LIBBPF_API are versioned in libbpf.map version script. The idea is to check that number of global symbols in libbpf-in.

[PATCH bpf-next v2 0/4] libbpf: ABI versioning and documentation

2018-11-23 Thread Andrey Ignatov
This patch set adds ABI versioning and documentation to libbpf. Patch 1 renames btf_get_from_id to btf__get_from_id to follow naming convention. Patch 2 adds version script and has more details on ABI versioning. Patch 3 adds simple check that all global symbols are versioned. Patch 4 documents a

[PATCH bpf-next v2 1/4] libbpf: Name changing for btf_get_from_id

2018-11-23 Thread Andrey Ignatov
From: Martin KaFai Lau s/btf_get_from_id/btf__get_from_id/ to restore the API naming convention. Signed-off-by: Martin KaFai Lau Signed-off-by: Andrey Ignatov --- tools/bpf/bpftool/map.c| 4 ++-- tools/bpf/bpftool/prog.c | 2 +- tools/lib/bpf/btf.c

Re: [PATCH bpf-next 1/2] libbpf: Add version script for DSO

2018-11-23 Thread Andrey Ignatov
Daniel Borkmann [Thu, 2018-11-22 02:28 -0800]: > On 11/21/2018 11:22 PM, Alexei Starovoitov wrote: > > On 11/21/18 12:18 PM, Yonghong Song wrote: > >> On 11/21/18 9:40 AM, Andrey Ignatov wrote: > >>> More and more projects use libbpf and one day it'll likely be packaged > >>> and distributed as DS

[PATCH bpf-next] bpf: align map type names formatting.

2018-11-23 Thread David Calavera
Make the formatting for map_type_name array consistent. Signed-off-by: David Calavera --- tools/bpf/bpftool/map.c | 46 - 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c index b0ebbed7d1a6..c

[PATCH] tags: Fix DEFINE_PER_CPU expansion

2018-11-23 Thread Rustam Kovhaev
Building tags produces warning: ctags: Warning: kernel/bpf/local_storage.c:10: null expansion of name pattern "\1" Let's use the same fix as in commit <25528213fe9f75f4>, even though it violates the usual code style. Signed-off-by: Rustam Kovhaev --- kernel/bpf/local_storage.c | 3 +-- 1 file

Re: [PATCH] mm: Replace all open encodings for NUMA_NO_NODE

2018-11-23 Thread Andrew Morton
On Fri, 23 Nov 2018 15:24:16 +0530 Anshuman Khandual wrote: > At present there are multiple places where invalid node number is encoded > as -1. Even though implicitly understood it is always better to have macros > in there. Replace these open encodings for an invalid node number with the > glo

[PATCH] net: gemini: Fix copy/paste error

2018-11-23 Thread Linus Walleij
From: Andreas Fiedler The TX stats should be started with the tx_stats_syncp, there seems to be a copy/paste error in the driver. Signed-off-by: Andreas Fiedler Signed-off-by: Linus Walleij --- drivers/net/ethernet/cortina/gemini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

Re: [PATCH net] packet: copy user buffers before orphan or clone

2018-11-23 Thread Willem de Bruijn
On Fri, Nov 23, 2018 at 2:09 PM David Miller wrote: > > From: Willem de Bruijn > Date: Tue, 20 Nov 2018 13:00:18 -0500 > > > From: Willem de Bruijn > > > > tpacket_snd sends packets with user pages linked into skb frags. It > > notifies that pages can be reused when the skb is released by settin

Re: [PATCH v3 3/4] libbpf: add bpf_prog_test_run_xattr

2018-11-23 Thread Daniel Borkmann
On 11/22/2018 03:09 PM, Lorenz Bauer wrote: > Add a new function, which encourages safe usage of the test interface. > bpf_prog_test_run continues to work as before, but should be considered > unsafe. > > Signed-off-by: Lorenz Bauer Set looks good to me, thanks! Three small things below: > ---

[PATCH v4 0/2] bpf: permit JIT allocations to be served outside the module region

2018-11-23 Thread Ard Biesheuvel
On arm64, modules are allocated from a 128 MB window which is close to the core kernel, so that relative direct branches are guaranteed to be in range (except in some KASLR configurations). Also, module_alloc() is in charge of allocating KASAN shadow memory when running with KASAN enabled. This me

[PATCH v4 1/2] bpf: add __weak hook for allocating executable memory

2018-11-23 Thread Ard Biesheuvel
By default, BPF uses module_alloc() to allocate executable memory, but this is not necessary on all arches and potentially undesirable on some of them. So break out the module_alloc() and module_memfree() calls into __weak functions to allow them to be overridden in arch code. Signed-off-by: Ard

[PATCH v4 2/2] arm64/bpf: don't allocate BPF JIT programs in module memory

2018-11-23 Thread Ard Biesheuvel
The arm64 module region is a 128 MB region that is kept close to the core kernel, in order to ensure that relative branches are always in range. So using the same region for programs that do not have this restriction is wasteful, and preferably avoided. Now that the core BPF JIT code permits the a

Re: [PATCH v2 bpf-next 1/1] libbpf: make bpf_object__open default to UNSPEC

2018-11-23 Thread Daniel Borkmann
On 11/23/2018 09:58 PM, Nikita V. Shirokov wrote: > currently by default libbpf's bpf_object__open requires > bpf's program to specify version in a code because of two things: > 1) default prog type is set to KPROBE > 2) KPROBE requires (in kernel/bpf/syscall.c) version to be specified > > in thi

Re: [PATCH v2] samples: bpf: fix: error handling regarding kprobe_events

2018-11-23 Thread Daniel Borkmann
On 11/22/2018 11:14 PM, Daniel T. Lee wrote: > Currently, kprobe_events failure won't be handled properly. > Due to calling system() indirectly to write to kprobe_events, > it can't be identified whether an error is derived from kprobe or system. > > // buf = "echo '%c:%s %s' >> /s/k/d/t/kprob

Re: [PATCH bpf-next] bpf: Add BPF_MAP_TYPE_QUEUE and BPF_MAP_TYPE_QUEUE to bpftool-map

2018-11-23 Thread Daniel Borkmann
On 11/23/2018 06:48 PM, David Calavera wrote: > Hi, > > Sorry for the mistake, I'll send a new patch. Before doing that, I've > noticed that the array of map names in tools/bpf/bpftool/map.c is very > inconsistent in formatting, some lines use tabs to align the names, others > use spaces, and othe

Re: [PATCH v3 1/2] bpf: add __weak hook for allocating executable memory

2018-11-23 Thread Ard Biesheuvel
On Fri, 23 Nov 2018 at 22:07, Daniel Borkmann wrote: > > On 11/23/2018 10:41 AM, Ard Biesheuvel wrote: > > By default, BPF uses module_alloc() to allocate executable memory, > > but this is not necessary on all arches and potentially undesirable > > on some of them. > > > > So break out the module

Re: [PATCH v3 1/2] bpf: add __weak hook for allocating executable memory

2018-11-23 Thread Daniel Borkmann
On 11/23/2018 10:41 AM, Ard Biesheuvel wrote: > By default, BPF uses module_alloc() to allocate executable memory, > but this is not necessary on all arches and potentially undesirable > on some of them. > > So break out the module_alloc() and module_memfree() calls into __weak > functions to allo

[PATCH v2 bpf-next 1/1] libbpf: make bpf_object__open default to UNSPEC

2018-11-23 Thread Nikita V. Shirokov
currently by default libbpf's bpf_object__open requires bpf's program to specify version in a code because of two things: 1) default prog type is set to KPROBE 2) KPROBE requires (in kernel/bpf/syscall.c) version to be specified in this patch i'm changing default prog type to UNSPEC and also chan

Re: [PATCH v2] bpf: fix check of allowed specifiers in bpf_trace_printk

2018-11-23 Thread Daniel Borkmann
On 11/23/2018 05:43 PM, Martynas Pumputis wrote: > A format string consisting of "%p" or "%s" followed by an invalid > specifier (e.g. "%p%\n" or "%s%") could pass the check which > would make format_decode (lib/vsprintf.c) to warn. > > Reported-by: syzbot+1ec5c5ec949c4adaa...@syzkaller.appspotmai

Re: [PATCH bpf-next 1/2] libbpf: Add version script for DSO

2018-11-23 Thread Andrey Ignatov
Martin Lau [Fri, 2018-11-23 10:44 -0800]: > On Wed, Nov 21, 2018 at 02:22:14PM -0800, Alexei Starovoitov wrote: > > On 11/21/18 12:18 PM, Yonghong Song wrote: > > > > > > > > > On 11/21/18 9:40 AM, Andrey Ignatov wrote: > > >> More and more projects use libbpf and one day it'll likely be package

Re: [PATCH 1/3] bpf/verifier: Log instruction patching when verbose logging is enabled

2018-11-23 Thread Daniel Borkmann
On 11/23/2018 07:34 PM, Ben Hutchings wrote: > User-space does not have access to the patched eBPF code, but we > need to be able to test that patches are being applied. Therefore > log distinct messages for each case that requires patching. Thanks for the patches, Ben! Above is actually not the

Re: [PATCH net 2/2] virtio-net: fail XDP set if guest csum is negotiated

2018-11-23 Thread David Miller
From: Jason Wang Date: Thu, 22 Nov 2018 14:36:31 +0800 > We don't support partial csumed packet since its metadata will be lost > or incorrect during XDP processing. So fail the XDP set if guest_csum > feature is negotiated. > > Fixes: f600b6905015 ("virtio_net: Add XDP support") > Reported-by:

Re: [PATCH net 1/2] virtio-net: disable guest csum during XDP set

2018-11-23 Thread David Miller
From: Jason Wang Date: Thu, 22 Nov 2018 14:36:30 +0800 > We don't disable VIRTIO_NET_F_GUEST_CSUM if XDP was set. This means we > can receive partial csumed packets with metadata kept in the > vnet_hdr. This may have several side effects: > > - It could be overridden by header adjustment, thus i

Re: [net-next 0/6][pull request] Intel Wired LAN Driver Updates 2018-11-21

2018-11-23 Thread David Miller
From: Jeff Kirsher Date: Wed, 21 Nov 2018 11:54:17 -0800 > This series contains updates to all of the Intel LAN drivers and > documentation. > > Shannon Nelson updates the ixgbe kernel documentation to include IPsec > hardware offload. > > Joe Perches cleans up whitespace issues in the igb driv

Re: [PATCH net-next] net-gro: use ffs() to speedup napi_gro_flush()

2018-11-23 Thread David Miller
From: Eric Dumazet Date: Wed, 21 Nov 2018 11:39:28 -0800 > We very often have few flows/chains to look at, and we > might increase GRO_HASH_BUCKETS to 32 or 64 in the future. > > Signed-off-by: Eric Dumazet Applied.

Re: [PATCH net-next 0/3] tcp: take a bit more care of backlog stress

2018-11-23 Thread Eric Dumazet
On Fri, Nov 23, 2018 at 11:25 AM David Miller wrote: > My impression is that patch #2 needs some fixes in order to not > lose dupacks. So there will be a respin of this. > > Thanks. You are absolutely right, we will submit a v2 next week after TG holidays. Thanks.

Re: [PATCH net-next 0/3] tcp: take a bit more care of backlog stress

2018-11-23 Thread David Miller
From: Eric Dumazet Date: Wed, 21 Nov 2018 09:52:37 -0800 > While working on the SACK compression issue Jean-Louis Dupond > reported, we found that his linux box was suffering very hard > from tail drops on the socket backlog queue, because the opposite > TCP stack was ont implementing latest RFC

Re: [PATCH net] net/sched: act_police: add missing spinlock initialization

2018-11-23 Thread David Miller
From: Davide Caratti Date: Wed, 21 Nov 2018 18:23:53 +0100 > commit f2cbd4852820 ("net/sched: act_police: fix race condition on state > variables") introduces a new spinlock, but forgets its initialization. > Ensure that tcf_police_init() initializes 'tcfp_lock' every time a 'police' > action is

Re: [PATCH net v2] net: don't keep lonely packets forever in the gro hash

2018-11-23 Thread David Miller
From: Paolo Abeni Date: Wed, 21 Nov 2018 18:21:35 +0100 > Eric noted that with UDP GRO and NAPI timeout, we could keep a single > UDP packet inside the GRO hash forever, if the related NAPI instance > calls napi_gro_complete() at an higher frequency than the NAPI timeout. > Willem noted that even

Re: [PATCH net] net/ipv6: re-do dad when interface has IFF_NOARP flag change

2018-11-23 Thread David Miller
From: Hangbin Liu Date: Wed, 21 Nov 2018 21:52:33 +0800 > When we add a new IPv6 address, we should also join corresponding > solicited-node > multicast address, unless the interface has IFF_NOARP flag, as function > addrconf_join_solict() did. But if we remove IFF_NOARP flag later, we do > not

Re: [PATCH v3 0/3] dpaa_eth: add ethtool coalesce control

2018-11-23 Thread David Miller
From: Madalin Bucur Date: Wed, 21 Nov 2018 13:41:06 +0200 > Add control of the DPAA portal interrupt coalescing settings from > ethtool. > > changes from v2: read ithresh from HW, set previous values on failure > changes from v1: added range checking for the QMan APIs Series applied.

Re: [PATCH v3 00/02] ravb: Duplex handling update V3

2018-11-23 Thread David Miller
From: Magnus Damm Date: Wed, 21 Nov 2018 20:21:08 +0900 > ravb: Duplex handling update V3 > > [PATCH v3 01/02] ravb: Do not announce HDX as supported > [PATCH v3 02/02] ravb: Clean up duplex handling Series applied to net-next.

Re: [PATCH net-next] cxgb4: use new fw interface to get the VIN and smt index

2018-11-23 Thread David Miller
From: Ganesh Goudar Date: Wed, 21 Nov 2018 13:40:24 +0530 > From: Santosh Rastapur > > If the fw supports returning VIN/VIVLD in FW_VI_CMD save it > in port_info structure else retrieve these from viid and save > them in port_info structure. Do the same for smt_idx from > FW_VI_MAC_CMD > > Si

Re: [PATCH net-next] net: bcmgenet: remove HFB_CTRL access

2018-11-23 Thread David Miller
From: Doug Berger Date: Tue, 20 Nov 2018 15:17:01 -0800 > Commit c5a54bbcecec ("net: bcmgenet: abort suspend on error") > mistakenly introduced register accesses that should not occur > in bcmgenet_wol_power_up_cfg(). > > Fixes: c5a54bbcecec ("net: bcmgenet: abort suspend on error") > Signed-off

Re: [PATCH net] packet: copy user buffers before orphan or clone

2018-11-23 Thread David Miller
From: Willem de Bruijn Date: Tue, 20 Nov 2018 13:00:18 -0500 > From: Willem de Bruijn > > tpacket_snd sends packets with user pages linked into skb frags. It > notifies that pages can be reused when the skb is released by setting > skb->destructor to tpacket_destruct_skb. > > This can cause da

Re: [PATCH v1 net-next] ip6_tunnel: Adding support of mapping rules for MAP-E tunnel

2018-11-23 Thread David Miller
From: Felix Jia Date: Tue, 20 Nov 2018 14:53:24 +1300 > +struct ip6_tnl_rule { > + u8 version; > + struct in6_addr ipv6_subnet; > + u8 ipv6_prefixlen; > + struct in_addr ipv4_subnet; > + u8 ipv4_prefixlen; > + u8 ea_length; > + u8 psid_offset; Please arrange the membe

Re: [PATCH bpf-next 1/2] libbpf: Add version script for DSO

2018-11-23 Thread Martin Lau
On Wed, Nov 21, 2018 at 02:22:14PM -0800, Alexei Starovoitov wrote: > On 11/21/18 12:18 PM, Yonghong Song wrote: > > > > > > On 11/21/18 9:40 AM, Andrey Ignatov wrote: > >> More and more projects use libbpf and one day it'll likely be packaged > >> and distributed as DSO and that requires ABI ver

[PATCH net] net: phy: add workaround for issue where PHY driver doesn't bind to the device

2018-11-23 Thread Heiner Kallweit
After switching the r8169 driver to use phylib some user reported that their network is broken. This was caused by the genphy PHY driver being used instead of the dedicated PHY driver for the RTL8211B. Users reported that loading the Realtek PHY driver module upfront fixes the issue. See also this

[PATCH 2/3] selftests/bpf: Add the ability to test for a log message on success

2018-11-23 Thread Ben Hutchings
This is needed to test that code is being patched when it should be. Signed-off-by: Ben Hutchings --- tools/testing/selftests/bpf/test_verifier.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests

[PATCH 3/3] selftests/bpf: Add test case for defence against SSB exploitation

2018-11-23 Thread Ben Hutchings
Test that the defence added by commit af86ca4e3088 "bpf: Prevent memory disambiguation attack" is actually being applied. Signed-off-by: Ben Hutchings --- tools/testing/selftests/bpf/test_verifier.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tools/testing/selftests/bpf/

[PATCH 1/3] bpf/verifier: Log instruction patching when verbose logging is enabled

2018-11-23 Thread Ben Hutchings
User-space does not have access to the patched eBPF code, but we need to be able to test that patches are being applied. Therefore log distinct messages for each case that requires patching. Signed-off-by: Ben Hutchings --- kernel/bpf/verifier.c | 13 + 1 file changed, 13 insertions

[PATCH 0/3] bpf: Test defence against SSB exploitation

2018-11-23 Thread Ben Hutchings
This series adds log messages for all patching done by the verifier, and a test case to verify that the patch to defend against SSB exploitation is applied where needed. Ben. Ben Hutchings (3): bpf/verifier: Log instruction patching when verbose logging is enabled selftests/bpf: Add the abili

Re: [RFCv3 PATCH 1/6] uacce: Add documents for WarpDrive/uacce

2018-11-23 Thread Jason Gunthorpe
On Fri, Nov 23, 2018 at 04:02:42PM +0800, Kenneth Lee wrote: > It is already part of Jean's patchset. And that's why I built my solution on > VFIO in the first place. But I think the concept of SVA and PASID is not > compatible with the original VFIO concept space. You would not share your > whol

Re: [PATCH net v3] net: phy: mscc: fix deadlock in vsc85xx_default_config

2018-11-23 Thread Andrew Lunn
On Fri, Nov 23, 2018 at 07:01:51PM +0100, Quentin Schulz wrote: > The vsc85xx_default_config function called in the vsc85xx_config_init > function which is used by VSC8530, VSC8531, VSC8540 and VSC8541 PHYs > mistakenly calls phy_read and phy_write in-between phy_select_page and > phy_restore_page.

Re: [PATCH] dt-bindings: dsa: Fix typo in "probed"

2018-11-23 Thread Andrew Lunn
On Fri, Nov 23, 2018 at 03:46:50PM -0200, Fabio Estevam wrote: > The correct form is "can be probed", so fix the typo. > > Signed-off-by: Fabio Estevam Reviewed-by: Andrew Lunn Andrew

[PATCH net v3] net: phy: mscc: fix deadlock in vsc85xx_default_config

2018-11-23 Thread Quentin Schulz
The vsc85xx_default_config function called in the vsc85xx_config_init function which is used by VSC8530, VSC8531, VSC8540 and VSC8541 PHYs mistakenly calls phy_read and phy_write in-between phy_select_page and phy_restore_page. phy_select_page and phy_restore_page actually take and release the MDI

Re: [PATCH net v2] net: phy: mscc: fix deadlock in vsc85xx_default_config

2018-11-23 Thread Quentin Schulz
Hi Andrew, On Fri, Nov 23, 2018 at 04:08:06PM +0100, Andrew Lunn wrote: > On Fri, Nov 23, 2018 at 09:16:36AM +0100, Quentin Schulz wrote: > > The vsc85xx_default_config function called in the vsc85xx_config_init > > function which is used by VSC8530, VSC8531, VSC8540 and VSC8541 PHYs > > mistakenl

[PATCH] dt-bindings: dsa: Fix typo in "probed"

2018-11-23 Thread Fabio Estevam
The correct form is "can be probed", so fix the typo. Signed-off-by: Fabio Estevam --- Documentation/devicetree/bindings/net/dsa/dsa.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.txt b/Documentation/devicetree/bindings/net/

[PATCH net] net: thunderx: set tso_hdrs pointer to NULL in nicvf_free_snd_queue

2018-11-23 Thread Lorenzo Bianconi
Reset snd_queue tso_hdrs pointer to NULL in nicvf_free_snd_queue routine since it is used to check if tso dma descriptor queue has been previously allocated. The issue can be triggered with the following reproducer: $ip link set dev enP2p1s0v0 xdpdrv obj xdp_dummy.o $ip link set dev enP2p1s0v0 xdp

Fw: [Bug 201773] New: IP_FREEBIND doesn’t counteract global

2018-11-23 Thread Stephen Hemminger
Could be a bug, or just how it works? Begin forwarded message: Date: Thu, 22 Nov 2018 22:51:12 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 201773] New: IP_FREEBIND doesn’t counteract global https://bugzilla.kernel.org/show_bug.cgi?id=201773

[PATCH net-next 6/8] dpaa2-eth: Add support for XDP_TX

2018-11-23 Thread Ioana Ciocoi Radulescu
Send frames back on the same port for XDP_TX action. Since the frame buffers have been allocated by us, we can recycle them directly into the Rx buffer pool instead of requesting a confirmation frame upon transmission complete. Signed-off-by: Ioana Radulescu --- drivers/net/ethernet/freescale/dp

[PATCH net-next 0/8] dpaa2-eth: Introduce XDP support

2018-11-23 Thread Ioana Ciocoi Radulescu
Add support for XDP programs. Only XDP_PASS, XDP_DROP and XDP_TX actions are supported for now. Frame header changes are also allowed. Ioana Radulescu (8): dpaa2-eth: Add basic XDP support dpaa2-eth: Allow XDP header adjustments dpaa2-eth: Move function dpaa2-eth: Release buffers back to p

[PATCH net-next 1/8] dpaa2-eth: Add basic XDP support

2018-11-23 Thread Ioana Ciocoi Radulescu
We keep one XDP program reference per channel. The only actions supported for now are XDP_DROP and XDP_PASS. Until now we didn't enforce a maximum size for Rx frames based on MTU value. Change that, since for XDP mode we must ensure no scatter-gather frames can be received. Signed-off-by: Ioana R

[PATCH net-next 7/8] dpaa2-eth: Cleanup channel stats

2018-11-23 Thread Ioana Ciocoi Radulescu
Remove one unused counter. Move the Tx portal busy counter to the channel stats, since it logically belongs here. Reorder fields in channel stats structure to match the ethtool strings order and make it easier to print them with ethtool -S. Signed-off-by: Ioana Radulescu --- drivers/net/etherne

  1   2   >