Re: [PATCH v2 1/2] net, can, ifi: fix "write buffer full" error

2018-02-08 Thread Marc Kleine-Budde
On 02/08/2018 07:47 AM, Heiko Schocher wrote: > the driver reads in the ISR first the IRQpending register, > and clears after that in a write *all* bits in it. > > It could happen that the isr register raise bits between > this 2 register accesses, which leads in lost bits ... > > In case it

Re: [PATCH] can: m_can: change comparison to bitshift when dealing with a mask

2018-02-08 Thread Marc Kleine-Budde
On 02/06/2018 09:52 AM, Wolfram Sang wrote: > Due to a typo, the mask was destroyed by a comparison instead of a bit > shift. > > Reported-by: Geert Uytterhoeven > Signed-off-by: Wolfram Sang > --- > Only build tested. Applied to can.

Re: [PATCH] can: m_can: change comparison to bitshift when dealing with a mask

2018-02-08 Thread Marc Kleine-Budde
On 02/06/2018 09:52 AM, Wolfram Sang wrote: > Due to a typo, the mask was destroyed by a comparison instead of a bit > shift. > > Reported-by: Geert Uytterhoeven > Signed-off-by: Wolfram Sang Applied to can. tnx, Marc -- Pengutronix

USB rndis_host - slow download transfers, RX errors

2018-02-08 Thread Tomasz Janowski, Ph.D.
Dear USB developers, Based on my google research, the problem I experience seems to happen with some newer smartphones. My test case is Samsung Galaxy S8 (SM-950U1). I am trying to use USB tethering and everything seems to work as expected (modules are loaded, Ethernet devices are up and running,

Re: [PATCH net-queue 3/3] e1000e: Avoid missed interrupts following ICR read.

2018-02-08 Thread Alexander Duyck
On Wed, Feb 7, 2018 at 10:47 PM, Benjamin Poirier wrote: > The 82574 specification update errata 12 states that interrupts may be > missed if ICR is read while INT_ASSERTED is not set. Avoid that problem by > setting all bits related to events that can trigger the Other

Re: [PATCH net-queue 2/3] e1000e: Fix queue interrupt re-raising in Other interrupt.

2018-02-08 Thread Alexander Duyck
On Wed, Feb 7, 2018 at 10:47 PM, Benjamin Poirier wrote: > restores the ICS write for rx/tx queue interrupts which was present before > commit 16ecba59bc33 ("e1000e: Do not read ICR in Other interrupt", > v4.5-rc1) but was not restored in commit 4aea7a5c5e94 ("e1000e: Avoid >

Re: [PATCH net-queue 1/3] Partial revert "e1000e: Avoid receiver overrun interrupt bursts"

2018-02-08 Thread Alexander Duyck
On Wed, Feb 7, 2018 at 10:47 PM, Benjamin Poirier wrote: > This partially reverts commit 4aea7a5c5e940c1723add439f4088844cd26196d. > > We keep the fix for the first part of the problem (1) described in the log > of that commit, that is to read ICR in the other interrupt

Re: [bpf-next V3 PATCH 1/5] bpf: Sync kernel ABI header with tooling header for bpf_common.h

2018-02-08 Thread Arnaldo Carvalho de Melo
Em Thu, Feb 08, 2018 at 12:48:12PM +0100, Jesper Dangaard Brouer escreveu: > I recently fixed up a lot of commits that forgot to keep the tooling > headers in sync. And then I forgot to do the same thing in commit > cb5f7334d479 ("bpf: add comments to BPF ld/ldx sizes"). Let correct > that before

Re: [iproute PATCH] ip-route: Propagate errors from parse_one_nh()

2018-02-08 Thread Phil Sutter
Hi, On Thu, Feb 08, 2018 at 02:26:05PM +0100, Élie Bouttier wrote: > On 24/01/2018 16:44, Stephen Hemminger wrote: > > On Wed, 24 Jan 2018 10:19:24 +0100 > > Phil Sutter wrote: > >> On Tue, Jan 23, 2018 at 02:44:42PM -0800, Stephen Hemminger wrote: > >>> The original commit

Re: possible deadlock in rtnl_lock (4)

2018-02-08 Thread Xin Long
On Thu, Feb 8, 2018 at 9:25 PM, Dmitry Vyukov wrote: > On Thu, Feb 8, 2018 at 10:54 AM, Xin Long wrote: >> On Thu, Feb 8, 2018 at 6:58 AM, syzbot >> wrote: >>> Hello, >>> >>> syzbot hit the

Re: [iproute PATCH] ip-route: Propagate errors from parse_one_nh()

2018-02-08 Thread Élie Bouttier
On 24/01/2018 16:44, Stephen Hemminger wrote: > On Wed, 24 Jan 2018 10:19:24 +0100 > Phil Sutter wrote: > >> Hi Stephen, >> >> On Tue, Jan 23, 2018 at 02:44:42PM -0800, Stephen Hemminger wrote: >>> On Tue, 23 Jan 2018 17:40:47 +0100 >>> Phil Sutter wrote: >>>

Re: possible deadlock in rtnl_lock (4)

2018-02-08 Thread Dmitry Vyukov
On Thu, Feb 8, 2018 at 10:54 AM, Xin Long wrote: > On Thu, Feb 8, 2018 at 6:58 AM, syzbot > wrote: >> Hello, >> >> syzbot hit the following crash on upstream commit >> a2e5790d841658485d642196dbb0927303d6c22f (Wed Feb 7

Re: selftests: net: reuseport_bpf failed intermittently

2018-02-08 Thread Naresh Kamboju
Hi Daniel, On 8 February 2018 at 18:07, Daniel Borkmann wrote: > On 02/08/2018 12:41 PM, Naresh Kamboju wrote: >> selftests/net/reuseport_bpf FAILED in full run on x86_64 and the >> independent test execution resulted as PASS. >> >> Test failed output log: >>

Re: net: phy: question about phy_is_internal for generic-phy

2018-02-08 Thread Andrew Lunn
On Thu, Feb 08, 2018 at 07:09:25PM +0900, Kunihiko Hayashi wrote: > Hello, > > Is there a way to specify "phy is internal" to generic phy driver, > that is, to make phy_is_internal() function available? > > I found "phy-is-integrated" DT property in >

Re: Regression for ip6-in-ip4 IPsec tunnel in 4.14.16

2018-02-08 Thread Yves-Alexis Perez
On Wed, 2018-02-07 at 20:46 +0100, Yves-Alexis Perez wrote: > Maybe. I tried with removing the MTU setting, and I get (on ping again) > > févr. 07 20:44:01 scapa kernel: mtu: 1266 > > which means I would get -EINVAL on standards kernels, which is not really good > either. Actually after

Re: selftests: net: reuseport_bpf failed intermittently

2018-02-08 Thread Daniel Borkmann
On 02/08/2018 12:41 PM, Naresh Kamboju wrote: > selftests/net/reuseport_bpf FAILED in full run on x86_64 and the > independent test execution resulted as PASS. > > Test failed output log: > - > Testing too many filters... > Testing filters on non-SO_REUSEPORT socket...

Re: [oss-drivers] [PATCH net 5/5] nfp: populate MODULE_VERSION

2018-02-08 Thread Simon Horman
On Wed, Feb 07, 2018 at 08:55:26PM -0800, Jakub Kicinski wrote: > DKMS and similar out-of-tree module replacement services use > module version to make sure the out-of-tree software is not > older than the module shipped with the kernel. We use the > kernel version in ethtool -i output, put it

Re: [oss-drivers] [PATCH net 4/5] nfp: limit the number of TSO segments

2018-02-08 Thread Simon Horman
On Wed, Feb 07, 2018 at 08:55:25PM -0800, Jakub Kicinski wrote: > Most FWs limit the number of TSO segments a frame can produce > to 64. This is for fairness and efficiency (of FW datapath) > reasons. If a frame with larger number of segments is submitted > the FW will drop it. > >

[RFC][PATCH bpf 2/2] bpf: powerpc64: add JIT support for multi-function programs

2018-02-08 Thread Sandipan Das
This adds support for bpf-to-bpf function calls for the powerpc64 JIT compiler. After a round of the usual JIT passes, the offsets to callee functions from __bpf_call_base are known. To update the target addresses for the branch instructions associated with each BPF_CALL, an extra pass is

[RFC][PATCH bpf 1/2] bpf: allow 64-bit offsets for bpf function calls

2018-02-08 Thread Sandipan Das
The imm field of a bpf_insn is a signed 32-bit integer. For JIT-ed bpf-to-bpf function calls, it stores the offset from __bpf_call_base to the start of the callee function. For some architectures, such as powerpc64, it was found that this offset may be as large as 64 bits because of which this

[bpf-next V3 PATCH 4/5] selftests/bpf: add selftest that use test_libbpf_open

2018-02-08 Thread Jesper Dangaard Brouer
This script test_libbpf.sh will be part of the 'make run_tests' invocation, but can also be invoked manually in this directory, and a verbose mode can be enabled via setting the environment variable $VERBOSE like: $ VERBOSE=yes ./test_libbpf.sh The script contains some tests that are commented

[bpf-next V3 PATCH 3/5] selftests/bpf: add test program for loading BPF ELF files

2018-02-08 Thread Jesper Dangaard Brouer
V2: Moved program into selftests/bpf from tools/libbpf This program can be used on its own for testing/debugging if a BPF ELF-object file can be loaded with libbpf (from tools/lib/bpf). If something is wrong with the ELF object, the program have a --debug mode that will display the ELF sections

[bpf-next V3 PATCH 5/5] tools/libbpf: handle issues with bpf ELF objects containing .eh_frames

2018-02-08 Thread Jesper Dangaard Brouer
V3: More generic skipping of relo-section (suggested by Daniel) If clang >= 4.0.1 is missing the option '-target bpf', it will cause llc/llvm to create two ELF sections for "Exception Frames", with section names '.eh_frame' and '.rel.eh_frame'. The BPF ELF loader library libbpf fails when

[bpf-next V3 PATCH 0/5] tools/libbpf improvements and selftests

2018-02-08 Thread Jesper Dangaard Brouer
While playing with using libbpf for the Suricata project, we had issues LLVM >= 4.0.1 generating ELF files that could not be loaded with libbpf (tools/lib/bpf/). During the troubleshooting phase, I wrote a test program and improved the debugging output in libbpf. I turned this into a selftests

[bpf-next V3 PATCH 2/5] tools/libbpf: improve the pr_debug statements to contain section numbers

2018-02-08 Thread Jesper Dangaard Brouer
While debugging a bpf ELF loading issue, I needed to correlate the ELF section number with the failed relocation section reference. Thus, add section numbers/index to the pr_debug. In debug mode, also print section that were skipped. This helped me identify that a section (.eh_frame) was

[bpf-next V3 PATCH 1/5] bpf: Sync kernel ABI header with tooling header for bpf_common.h

2018-02-08 Thread Jesper Dangaard Brouer
I recently fixed up a lot of commits that forgot to keep the tooling headers in sync. And then I forgot to do the same thing in commit cb5f7334d479 ("bpf: add comments to BPF ld/ldx sizes"). Let correct that before people notice ;-). Lawrence did partly fix/sync this for bpf.h in commit

Re: [PATCH net v2] netfilter: drop outermost socket lock in getsockopt()

2018-02-08 Thread Xin Long
On Thu, Feb 8, 2018 at 7:19 PM, Paolo Abeni wrote: > The Syzbot reported a possible deadlock in the netfilter area caused by > rtnl lock, xt lock and socket lock being acquired with a different order > on different code paths, leading to the following backtrace: > >

Re: [Patch net] ipt_CLUSTERIP: fix a race condition of proc file creation

2018-02-08 Thread Xin Long
On Thu, Feb 8, 2018 at 1:59 PM, Cong Wang wrote: > There is a race condition between clusterip_config_entry_put() > and clusterip_config_init(), after we release the spinlock in > clusterip_config_entry_put(), a new proc file with a same IP could > be created immediately

[PATCH v2] lockdep: Fix fs_reclaim warning.

2018-02-08 Thread Tetsuo Handa
>From 361d37a7d36978020dfb4c11ec1f4800937ccb68 Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Thu, 8 Feb 2018 10:35:35 +0900 Subject: [PATCH v2] lockdep: Fix fs_reclaim warning. Dave Jones reported fs_reclaim lockdep warnings.

selftests: net: reuseport_bpf failed intermittently

2018-02-08 Thread Naresh Kamboju
selftests/net/reuseport_bpf FAILED in full run on x86_64 and the independent test execution resulted as PASS. Test failed output log: - Testing too many filters... Testing filters on non-SO_REUSEPORT socket... ./reuseport_bpf : ebpf error: Operation not permitted One

[PATCH net v2] netfilter: drop outermost socket lock in getsockopt()

2018-02-08 Thread Paolo Abeni
The Syzbot reported a possible deadlock in the netfilter area caused by rtnl lock, xt lock and socket lock being acquired with a different order on different code paths, leading to the following backtrace: == WARNING: possible circular locking

Re: [PATCH bpf 0/6] nfp fix for calls, bpftool completions and doc fixes

2018-02-08 Thread Daniel Borkmann
On 02/08/2018 05:27 AM, Jakub Kicinski wrote: > Hi! > > First patch in this series fixes applying the relocation to immediate > load instructions in the NFP JIT. > > The remaining patches come from Quentin. Small addition to libbpf > makes sure it recognizes all standard section names.

Re: [PATCH net] netfilter: on setsockopt() acquire sock lock only in the required scope

2018-02-08 Thread Xin Long
On Thu, Feb 8, 2018 at 6:38 PM, Paolo Abeni wrote: > The Syzbot reported a possible deadlock in the netfilter area caused by > rtnl lock, xt lock and socket lock being acquired with a different order > on different code paths, leading to the following backtrace: > >

Re: [PATCH] ath9k: turn on btcoex_enable as default

2018-02-08 Thread Felix Fietkau
On 2018-02-08 06:28, Kai-Heng Feng wrote: > Without btcoex_enable, WiFi activies make both WiFi and Bluetooth > unstable if there's a bluetooth connection. > > Enable this option when bt_ant_diversity is disabled. > > BugLink: https://bugs.launchpad.net/bugs/1746164 > Signed-off-by: Kai-Heng

[PATCH iproute2-next] ip/tunnel: Minor cleanups

2018-02-08 Thread Serhey Popovych
Few minor changes to reduce diffs between ip and ipv6 tunnel code: 1) reduce intendation by one level when adding attributes in gre and gre6; reorder addattr*() calls to simplify diff 2) reorder local variables definition; change their type (e.g. for IFLA_LINK) to match ones

[PATCH iproute2-next 2/3] gre/gre6: Unify gre_print_help()

2018-02-08 Thread Serhey Popovych
Reduce diff lines between gre and gre6 help printing code. Use @struct link_util ->id field to print correct link help: all callers now pass this data structure to gre_print_help(). Get rid of custom print_usage() and usage() functions and use gre_print_help() directly, return from function on

[PATCH iproute2-next 0/3] ip/tunnel: Unify tunnel help message print routines

2018-02-08 Thread Serhey Popovych
To show only relevant diffs of ip and ipv6 variants help message print routines needs to be unified and improved. Get rid of print_usage() and usage() wrappers: use single function to output help message. As side effect we return -1 from parse function instead of calling exit(2) in case of "...

[PATCH iproute2-next 1/3] vti/vti6: Unify vti_print_help()

2018-02-08 Thread Serhey Popovych
Reduce diff lines between vti and vti6 help printing code. Use @struct link_util ->id field to print correct link help: all callers now pass this data structure to vti_print_help(). Get rid of custom print_usage() and usage() functions and use vti_print_help() directly, return from function on

[PATCH iproute2-next 3/3] iptnl/ip6tnl: Unify iptunnel_print_help()

2018-02-08 Thread Serhey Popovych
Reduce diff lines between iptnl and ip6tnl help printing code. Use @struct link_util ->id field to print correct link help: all callers now pass this data structure to iptunnel_print_help(). Get rid of custom print_usage() and usage() functions and use iptunnel_print_help() directly, return from

[PATCH net] netfilter: on setsockopt() acquire sock lock only in the required scope

2018-02-08 Thread Paolo Abeni
The Syzbot reported a possible deadlock in the netfilter area caused by rtnl lock, xt lock and socket lock being acquired with a different order on different code paths, leading to the following backtrace: == WARNING: possible circular locking

RE: [RFC crypto v3 8/9] chtls: Register the ULP

2018-02-08 Thread Vakul Garg
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org [mailto:linux-crypto- > ow...@vger.kernel.org] On Behalf Of Atul Gupta > Sent: Thursday, February 8, 2018 3:56 PM > To: Dave Watson > Cc: s...@queasysnail.net; herb...@gondor.apana.org.au; linux- >

RE: [RFC crypto v3 8/9] chtls: Register the ULP

2018-02-08 Thread Atul Gupta
I thought about this and approach below can avoid new ulp type: 1. Register Inline TLS driver to net TLS 2. enable ethtool -K tls-hw-record-offload on 3. Issue " setsockopt(fd, SOL_TCP, TCP_ULP, "tls", sizeof("tls")) " after Bind, this will enable user fetch net_device corresponding to ipaadr

net: phy: question about phy_is_internal for generic-phy

2018-02-08 Thread Kunihiko Hayashi
Hello, Is there a way to specify "phy is internal" to generic phy driver, that is, to make phy_is_internal() function available? I found "phy-is-integrated" DT property in Documentation/devicetree/bindings/net/phy.txt, however, it seems that the property is no effect for generic phy. And I think

Re: possible deadlock in rtnl_lock (4)

2018-02-08 Thread Xin Long
On Thu, Feb 8, 2018 at 6:58 AM, syzbot wrote: > Hello, > > syzbot hit the following crash on upstream commit > a2e5790d841658485d642196dbb0927303d6c22f (Wed Feb 7 06:15:42 2018 +) > Merge branch 'akpm' (patches from Andrew) > > So far

Re: [suricata PATCH 1/3] suricata/ebpf: take clang -target bpf include issue of stdint.h into account

2018-02-08 Thread Jesper Dangaard Brouer
On Thu, 08 Feb 2018 00:52:09 +0100 Eric Leblond wrote: > Hi, > > On Wed, 2018-02-07 at 23:21 +0100, Jesper Dangaard Brouer wrote: > > From: Jesper Dangaard Brouer > > > > This patch prepares code before enabling the clang -target bpf. > > > > The

Re: [PATCH net-queue 1/3] Partial revert "e1000e: Avoid receiver overrun interrupt bursts"

2018-02-08 Thread Benjamin Poirier
I forgot to mark it as such but this is v2 of the series originally submitted in this thread: https://lkml.org/lkml/2018/1/26/93 Changes since v1: * series rebased to apply over "e1000e: Remove Other from EIAC." http://patchwork.ozlabs.org/patch/867833/ This essentially removes patch 3/3 from

Re: [Patch net] ipt_CLUSTERIP: fix a refcount bug in clusterip_config_find_get()

2018-02-08 Thread Florian Westphal
Cong Wang wrote: > In clusterip_config_find_get() we hold RCU read lock so it could > run concurrently with clusterip_config_entry_put(), as a result, > the refcnt could go back to 1 from 0, which leads to a double > list_del()... Just replace refcount_inc() with >

<    1   2