Re: [PATCH net-next v1] l2tp: fix reading optional fields

2019-01-23 Thread Jacob Wen
On 1/23/19 10:51 AM, Eric Dumazet wrote: On 01/22/2019 06:30 PM, Jacob Wen wrote: Use pskb_may_pull() to make sure the optional fields are in skb linear parts. Signed-off-by: Jacob Wen --- v1: fix warning: ISO C90 forbids mixed declarations and code --- net/l2tp/l2tp_core.c | 12

[PATCH net-next v2] net: l2tp: fix reading optional fields of L2TPv3

2019-01-23 Thread Jacob Wen
Use pskb_may_pull() to make sure the optional fields are in skb linear parts, so we can safely read them later. It's easy to reproduce the issue with a net driver that supports paged skb data. Just create a L2TPv3 over IP tunnel and then generates some network traffic. Once reproduced, rx err in /

Re: [PATCH net-next 3/7] devlink: move devlink health reporter to use devlink msg API

2019-01-23 Thread Eran Ben Elisha
On 1/23/2019 4:42 PM, Jiri Pirko wrote: > Tue, Jan 22, 2019 at 04:57:20PM CET, era...@mellanox.com wrote: >> Move devlink reporter diagnose and dump operations to use the new msg API. >> Redefine the signature of diagnose and dump operations and move the mlx5e >> reporter to use it with the new f

Re: [PATCH net-next 2/7] net/mlx5e: Move driver to use devlink msg API

2019-01-23 Thread Eran Ben Elisha
On 1/23/2019 4:39 PM, Jiri Pirko wrote: > Tue, Jan 22, 2019 at 04:57:19PM CET, era...@mellanox.com wrote: >> As part of the devlink health reporter diagnose ops callback, the mlx5e TX >> reporter used devlink health buffers API. Which will soon be depracated. >> Modify the reporter to use the new

[PATCH net-next] mlxfw: Replace license text with SPDX identifiers and adjust copyrights

2019-01-23 Thread Shalom Toledo
Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxfw/mlxfw.h | 35 ++ .../net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 35 ++ .../net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c | 35 ++ .../net/ethernet/mellanox/mlx

Re: [PATCH net-next 1/7] devlink: Add devlink msg API

2019-01-23 Thread Eran Ben Elisha
On 1/23/2019 4:31 PM, Jiri Pirko wrote: > Tue, Jan 22, 2019 at 04:57:18PM CET, era...@mellanox.com wrote: >> Devlink msg is a mechanism to pass descriptors between drivers and >> devlink, in json-like format. The API allows the driver to add objects, >> object pair, value array (nested attributes

Re: [PATCH 4/4] can: flexcan: fix NULL pointer exception during bringup

2019-01-23 Thread Uwe Kleine-König
Hello Sasha, On Wed, Jan 23, 2019 at 10:57:44PM +, Sasha Levin wrote: > [This is an automated email] Not sure if I only state the obvious that was just missed by your automation. > > This commit has been processed because it contains a "Fixes:" tag, > fixing commit: cbffaf7aa09e can: flexcan

Re: [PATCH net-next v3 0/4] net: phy: improve starting PHY

2019-01-23 Thread S-k, Shyam-sundar
On 1/23/2019 11:55 AM, Heiner Kallweit wrote: > This patch series improves few aspects of starting the PHY. > > v2: > - improve a warning in patch 4 > v3: > - extend commit message for patch 2 > > Heiner Kallweit (4): > net: phy: start state machine in phy_start only > net: phy: warn if phy_st

[PATCH] net: usb: asix: ax88772_bind return error when hw_reset fail

2019-01-23 Thread Zhang Run
The ax88772_bind() should return error code immediately when the PHY was not reset properly through ax88772a_hw_reset(). Otherwise, The asix_get_phyid() will block when get the PHY Identifier from the PHYSID1 MII registers through asix_mdio_read() due to the PHY isn't ready. Furthermore, it will

[PATCH v2 bpf-next] bpf: use the proper optlen when doing strncpy in bpf_getsockopt()

2019-01-23 Thread Yafang Shao
As strncpy(..., TCP_CA_NAME_MAX-1) is used in bpf_setsockopt(), this change will make it more consistent with the bpf_setsockopt() above. Acked-by: Martin KaFai Lau Acked-by: Lawrence Brakmo Signed-off-by: Yafang Shao --- net/core/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case

2019-01-23 Thread Atsushi Nemoto
On Wed, 23 Jan 2019 14:47:06 -0800, Dalon L Westergreen wrote: >> >if (inuse) { /* Tx FIFO is not empty */ >> > - ready = priv->tx_prod - priv->tx_cons - inuse - 1; >> > + ready = priv->tx_prod - priv->tx_cons - inuse; > dont think my last email went through.. > > I am not

Re: [PATCH bpf-next v2 13/16] ppc: bpf: implement jitting of JMP32

2019-01-23 Thread Sandipan Das
Hi Jiong, On 21/01/19 6:45 PM, Jiong Wang wrote: > This patch implements code-gen for new JMP32 instructions on ppc. > > For JMP32 | JSET, instruction encoding for PPC_RLWINM_DOT is added to check > the result of ANDing low 32-bit of operands. > > Cc: Naveen N. Rao > Cc: Sandipan Das > Signed-

Re: [PATCH net-next V4 5/5] vhost: access vq metadata through kernel virtual address

2019-01-23 Thread Michael S. Tsirkin
On Thu, Jan 24, 2019 at 12:11:28PM +0800, Jason Wang wrote: > > On 2019/1/24 下午12:07, Jason Wang wrote: > > > > On 2019/1/23 下午10:08, Michael S. Tsirkin wrote: > > > On Wed, Jan 23, 2019 at 05:55:57PM +0800, Jason Wang wrote: > > > > It was noticed that the copy_user() friends that was used to ac

Re: Does the kernel IPv6 module plan to implement Secure Neighbor Discovery?

2019-01-23 Thread Ttttabcd
> > Usually it requires someone motivated to step up and do the work. You > sound motivated. The easiest thing would be for you to step up and > write the implementation. > > Having looked at this once long ago my memory is that SeND only protects > against an attacker on a local lan. That is not a

Re: [PATCH net-next V4 5/5] vhost: access vq metadata through kernel virtual address

2019-01-23 Thread Michael S. Tsirkin
On Thu, Jan 24, 2019 at 12:07:54PM +0800, Jason Wang wrote: > > On 2019/1/23 下午10:08, Michael S. Tsirkin wrote: > > On Wed, Jan 23, 2019 at 05:55:57PM +0800, Jason Wang wrote: > > > It was noticed that the copy_user() friends that was used to access > > > virtqueue metdata tends to be very expensi

Re: [BUG] The genet is not working

2019-01-23 Thread Florian Fainelli
On 1/23/19 8:17 PM, Jaedon Shin wrote: > Hi, > > The genet of Broadcom MIPS 40nm platforms with internal PHY isn't working > after v4.20-rc1, but 28nm ARM platforms or external PHY is working. > > [1.064000] bcmgenet 1043.ethernet: configuring instance for internal > PHY > [1.0680

[PATCH v4 bpf-next 8/9] libbpf: introduce bpf_map_lookup_elem_flags()

2019-01-23 Thread Alexei Starovoitov
Introduce int bpf_map_lookup_elem_flags(int fd, const void *key, void *value, __u64 flags) helper to lookup array/hash/cgroup_local_storage elements with BPF_F_LOCK flag. Signed-off-by: Alexei Starovoitov --- tools/lib/bpf/bpf.c | 13 + tools/lib/bpf/bpf.h | 2 ++ tools/li

[PATCH v4 bpf-next 9/9] selftests/bpf: test for BPF_F_LOCK

2019-01-23 Thread Alexei Starovoitov
Add C based test that runs 4 bpf programs in parallel that update the same hash and array maps. And another 2 threads that read from these two maps via lookup(key, value, BPF_F_LOCK) api to make sure the user space sees consistent value in both hash and array elements while user space races with ke

[BUG] The genet is not working

2019-01-23 Thread Jaedon Shin
Hi, The genet of Broadcom MIPS 40nm platforms with internal PHY isn't working after v4.20-rc1, but 28nm ARM platforms or external PHY is working. [1.064000] bcmgenet 1043.ethernet: configuring instance for internal PHY [1.068000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [

[PATCH v4 bpf-next 6/9] bpf: introduce BPF_F_LOCK flag

2019-01-23 Thread Alexei Starovoitov
Introduce BPF_F_LOCK flag for map_lookup and map_update syscall commands and for map_update() helper function. In all these cases take a lock of existing element (which was provided in BTF description) before copying (in or out) the rest of map value. Implementation details that are part of uapi:

[PATCH v4 bpf-next 3/9] tools/bpf: sync include/uapi/linux/bpf.h

2019-01-23 Thread Alexei Starovoitov
sync bpf.h Signed-off-by: Alexei Starovoitov --- tools/include/uapi/linux/bpf.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 91c43884f295..30f9dfd40f13 100644 --- a/tools/include/uapi/linux/bpf.h +

[PATCH v4 bpf-next 0/9] introduce bpf_spin_lock

2019-01-23 Thread Alexei Starovoitov
Many algorithms need to read and modify several variables atomically. Until now it was hard to impossible to implement such algorithms in BPF. Hence introduce support for bpf_spin_lock. The api consists of 'struct bpf_spin_lock' that should be placed inside hash/array/cgroup_local_storage element

[PATCH v4 bpf-next 4/9] selftests/bpf: add bpf_spin_lock tests

2019-01-23 Thread Alexei Starovoitov
add bpf_spin_lock tests to test_verifier.c that don't require latest llvm with BTF support Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/test_verifier.c | 459 +++- 1 file changed, 458 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test

[PATCH v4 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-23 Thread Alexei Starovoitov
Introduce 'struct bpf_spin_lock' and bpf_spin_lock/unlock() helpers to let bpf program serialize access to other variables. Example: struct hash_elem { int cnt; struct bpf_spin_lock lock; }; struct hash_elem * val = bpf_map_lookup_elem(&hash_map, &key); if (val) { bpf_spin_lock(&val->l

[PATCH v4 bpf-next 2/9] bpf: add support for bpf_spin_lock to cgroup local storage

2019-01-23 Thread Alexei Starovoitov
Allow 'struct bpf_spin_lock' to reside inside cgroup local storage. Signed-off-by: Alexei Starovoitov --- kernel/bpf/local_storage.c | 2 ++ kernel/bpf/syscall.c | 3 ++- kernel/bpf/verifier.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/bpf/local_stora

[PATCH v4 bpf-next 7/9] tools/bpf: sync uapi/bpf.h

2019-01-23 Thread Alexei Starovoitov
add BPF_F_LOCK definition to tools/include/uapi/linux/bpf.h Signed-off-by: Alexei Starovoitov --- tools/include/uapi/linux/bpf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 30f9dfd40f13..c23eaa284a45 100644 --- a/tools

[PATCH v4 bpf-next 5/9] selftests/bpf: add bpf_spin_lock C test

2019-01-23 Thread Alexei Starovoitov
add bpf_spin_lock C based test that requires latest llvm with BTF support Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/bpf_helpers.h| 4 + tools/testing/selftests/bpf/test_progs.c | 43 +++- tools/testing/

Re: [PATCH net-next V4 5/5] vhost: access vq metadata through kernel virtual address

2019-01-23 Thread Jason Wang
On 2019/1/24 下午12:07, Jason Wang wrote: On 2019/1/23 下午10:08, Michael S. Tsirkin wrote: On Wed, Jan 23, 2019 at 05:55:57PM +0800, Jason Wang wrote: It was noticed that the copy_user() friends that was used to access virtqueue metdata tends to be very expensive for dataplane implementation li

Re: [PATCH net-next V4 5/5] vhost: access vq metadata through kernel virtual address

2019-01-23 Thread Jason Wang
On 2019/1/23 下午10:08, Michael S. Tsirkin wrote: On Wed, Jan 23, 2019 at 05:55:57PM +0800, Jason Wang wrote: It was noticed that the copy_user() friends that was used to access virtqueue metdata tends to be very expensive for dataplane implementation like vhost since it involves lots of softwar

Re: [PATCH bpf-next 2/3] bpf: add BPF_PROG_TEST_RUN support for flow dissector

2019-01-23 Thread Alexei Starovoitov
On Tue, Jan 22, 2019 at 01:23:14PM -0800, Stanislav Fomichev wrote: > The input is packet data, the output is struct bpf_flow_key. This should > make it easy to test flow dissector programs without elaborate > setup. > > Signed-off-by: Stanislav Fomichev > --- > include/linux/bpf.h | 3 ++ > ne

Re: [PATCH bpf-next] selftests/bpf: suppress readelf stderr when probing for BTF support

2019-01-23 Thread Alexei Starovoitov
On Wed, Jan 23, 2019 at 07:15:07PM -0800, Stanislav Fomichev wrote: > On 01/23, Alexei Starovoitov wrote: > > On Wed, Jan 23, 2019 at 09:24:35AM -0800, Stanislav Fomichev wrote: > > > Before: > > > $ make -s -C tools/testing/selftests/bpf > > > readelf: Error: Missing knowledge of 32-bit reloc type

Re: [v2 PATCH] rhashtable: Still do rehash when we get EEXIST

2019-01-23 Thread Josh Elsasser
On Jan 23, 2019, at 7:08 PM, Herbert Xu wrote: > Thanks for catching this! > > Although I think we should fix this in a different way. The problem > here is that the shrink cannot proceed because there was a previous > rehash that is still incomplete. We should wait for its completion > and th

Re: [PATCH bpf-next] selftests/bpf: suppress readelf stderr when probing for BTF support

2019-01-23 Thread Stanislav Fomichev
On 01/23, Alexei Starovoitov wrote: > On Wed, Jan 23, 2019 at 09:24:35AM -0800, Stanislav Fomichev wrote: > > Before: > > $ make -s -C tools/testing/selftests/bpf > > readelf: Error: Missing knowledge of 32-bit reloc types used in DWARF > > sections of machine number 247 > > readelf: Warning: unabl

[v2 PATCH] rhashtable: Still do rehash when we get EEXIST

2019-01-23 Thread Herbert Xu
On Wed, Jan 23, 2019 at 01:17:58PM -0800, Josh Elsasser wrote: > When running workloads with large bursts of fragmented packets, we've seen > a few machines stuck returning -EEXIST from rht_shrink() and endlessly > rescheduling their hash table's deferred work, pegging a CPU core. > > Root cause i

[PATCH bpf-next] bpftool: feature probing, change default action

2019-01-23 Thread Prashant Bhole
When 'bpftool feature' is executed it shows incorrect help string. test# bpftool feature Usage: bpftool bpftool probe [COMPONENT] [macros [prefix PREFIX]] bpftool bpftool help COMPONENT := { kernel | dev NAME } Instead of fixing the help text by tweaking argv[] indices, this patch

Re: [PATCH] tipc: remove dead code in struct tipc_topsrv

2019-01-23 Thread Ying Xue
On 1/24/19 10:06 AM, Zhaolong Zhang wrote: > max_rcvbuf_size is no longer used since commit "414574a0af36". > > Signed-off-by: Zhaolong Zhang Acked-by: Ying Xue > --- > net/tipc/topsrv.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/net/tipc/topsrv.c b/net/tipc/topsrv.c > index

Re: [PATCH] netfilter: nat: Update comment of get_unique_tuple

2019-01-23 Thread YueHaibing
ping... On 2019/1/10 21:06, YueHaibing wrote: > Replace outdated __ip_conntrack_confirm in comment. > > Signed-off-by: YueHaibing > --- > net/netfilter/nf_nat_core.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_co

[PATCH] tipc: remove dead code in struct tipc_topsrv

2019-01-23 Thread Zhaolong Zhang
max_rcvbuf_size is no longer used since commit "414574a0af36". Signed-off-by: Zhaolong Zhang --- net/tipc/topsrv.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/tipc/topsrv.c b/net/tipc/topsrv.c index efb16f6..4b1c083 100644 --- a/net/tipc/topsrv.c +++ b/net/tipc/topsrv.c @@ -60,7 +6

[PATCH net 1/1] MAINTAINERS: Update cavium networking drivers

2019-01-23 Thread Sudarsana Reddy Kalluru
Following Marvell's acquisition of Cavium, we need to update all the Cavium drivers maintainer's entries to point to our new e-mail addresses. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ameen Rahman --- MAINTAINERS | 42 +- 1 file changed, 21 i

Re: [PATCH bpf-next] selftests/bpf: suppress readelf stderr when probing for BTF support

2019-01-23 Thread Alexei Starovoitov
On Wed, Jan 23, 2019 at 09:24:35AM -0800, Stanislav Fomichev wrote: > Before: > $ make -s -C tools/testing/selftests/bpf > readelf: Error: Missing knowledge of 32-bit reloc types used in DWARF > sections of machine number 247 > readelf: Warning: unable to apply unsupported reloc type 10 to section

Re: [PATCH net] ax25: fix possible use-after-free

2019-01-23 Thread Eric Dumazet
On Wed, Jan 23, 2019 at 5:12 PM Cong Wang wrote: > > On Wed, Jan 23, 2019 at 3:42 PM Eric Dumazet wrote: > > > > > > > > On 01/23/2019 03:25 PM, Cong Wang wrote: > > > On Tue, Jan 22, 2019 at 10:41 AM 'Eric Dumazet' via syzkaller > > > wrote: > > >> > > >> syzbot found that ax25 routes where not

Re: [PATCH bpf-next v5 00/12] bpf: dead code elimination

2019-01-23 Thread Alexei Starovoitov
On Tue, Jan 22, 2019 at 10:45:17PM -0800, Jakub Kicinski wrote: > Hi! > > This set adds support for complete removal of dead code. > > Patch 3 contains all the code removal logic, patches 2 and 4 > additionally optimize branches around and to dead code. > > Patches 6 and 7 allow offload JITs to

Re: [Patch iproute2] tc: add hit counter for matchall

2019-01-23 Thread Cong Wang
On Wed, Jan 23, 2019 at 12:47 PM Stephen Hemminger wrote: > > On Thu, 17 Jan 2019 13:18:55 -0800 > Cong Wang wrote: > > > > > + if (tb[TCA_MATCHALL_PCNT]) { > > + if (RTA_PAYLOAD(tb[TCA_MATCHALL_PCNT]) < sizeof(*pf)) { > > + print_string(PRINT_FP, NULL, "Broke

Re: [Patch iproute2] tc: add performance counters for basic filter

2019-01-23 Thread Cong Wang
On Wed, Jan 23, 2019 at 12:43 PM Stephen Hemminger wrote: > > On Tue, 22 Jan 2019 22:41:45 -0800 > Cong Wang wrote: > > > + if (tb[TCA_BASIC_PCNT]) { > > + if (RTA_PAYLOAD(tb[TCA_BASIC_PCNT]) < sizeof(*pf)) { > > + fprintf(f, "Broken perf counters\n"); > > +

Re: [PATCH net] ax25: fix possible use-after-free

2019-01-23 Thread Cong Wang
On Wed, Jan 23, 2019 at 3:42 PM Eric Dumazet wrote: > > > > On 01/23/2019 03:25 PM, Cong Wang wrote: > > On Tue, Jan 22, 2019 at 10:41 AM 'Eric Dumazet' via syzkaller > > wrote: > >> > >> syzbot found that ax25 routes where not properly protected > >> against concurrent use [1]. > >> > >> In this

Re: [PATCH net-next 03/10] net: macsec: move some definitions in a dedicated header

2019-01-23 Thread David Miller
From: Florian Fainelli Date: Wed, 23 Jan 2019 12:11:37 -0800 > On 1/23/19 7:56 AM, Antoine Tenart wrote: >> This patch moves some structure, type and identifier definitions into a >> MACsec specific header. This patch does not modify how the MACsec code >> is running and only move things around.

Re: [PATCH iproute2-next v2] devlink: Add health command support

2019-01-23 Thread David Ahern
On 1/23/19 4:27 AM, Aya Levin wrote: >>> @@ -1298,6 +1322,12 @@ static int dl_argv_parse(struct dl *dl, uint32_t >>> o_required, >>> return -EINVAL; >>> } >>> >>> + if ((o_required & DL_OPT_HEALTH_REPORTER_NAME) && >>> + !(o_found & DL_OPT_HEALTH_REPORTER_NAME)) { >>> +

Re: [PATCH bpf-next 2/3] selftests: bpf: break up test_verifier

2019-01-23 Thread Jakub Kicinski
On Wed, 23 Jan 2019 15:32:05 -0800, Alexei Starovoitov wrote: > On Mon, Jan 21, 2019 at 10:43:38AM -0800, Jakub Kicinski wrote: > > Break up the first 10 kLoC of test verifier test cases > > out into smaller files. Looks like git line counting > > gets a little flismy above 16 bit integers, so we

Re: [PATCH bpf-next v5 4/9] tools: bpftool: add probes for eBPF program types

2019-01-23 Thread Andrey Ignatov
Quentin Monnet [Thu, 2019-01-17 07:28 -0800]: > Introduce probes for supported BPF program types in libbpf, and call it > from bpftool to test what types are available on the system. The probe > simply consists in loading a very basic program of that type and see if > the verifier complains or not

Re: [PATCH net] ax25: fix possible use-after-free

2019-01-23 Thread Eric Dumazet
On 01/23/2019 03:25 PM, Cong Wang wrote: > On Tue, Jan 22, 2019 at 10:41 AM 'Eric Dumazet' via syzkaller > wrote: >> >> syzbot found that ax25 routes where not properly protected >> against concurrent use [1]. >> >> In this particular report the bug happened while >> copying ax25->digipeat. >>

Re: [PATCH bpf-next 2/3] selftests: bpf: break up test_verifier

2019-01-23 Thread Alexei Starovoitov
On Mon, Jan 21, 2019 at 10:43:38AM -0800, Jakub Kicinski wrote: > Break up the first 10 kLoC of test verifier test cases > out into smaller files. Looks like git line counting > gets a little flismy above 16 bit integers, so we need > two commits to break up test_verifier. > > Signed-off-by: Jaku

Re: [PATCH net] ax25: fix possible use-after-free

2019-01-23 Thread Cong Wang
On Tue, Jan 22, 2019 at 10:41 AM 'Eric Dumazet' via syzkaller wrote: > > syzbot found that ax25 routes where not properly protected > against concurrent use [1]. > > In this particular report the bug happened while > copying ax25->digipeat. > > Fix this problem by making sure we call ax25_get_rout

Re: [PATCH] net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case

2019-01-23 Thread Dalon L Westergreen
On Tue, 2019-01-22 at 11:20 -0600, Thor Thayer wrote: > On 1/21/19 2:29 AM, Atsushi Nemoto wrote: > > From: Tomonori Sakita > > > > If fill_level was not zero and status was not BUSY, > > result of "tx_prod - tx_cons - inuse" might be zero. > > Subtracting 1 unconditionally results invalid negati

Re: [PATCH] sfp: sfp_read: split-up request when hw rx buffer is too small.

2019-01-23 Thread Florian Fainelli
On 1/23/19 1:20 PM, René van Dorst wrote: > Without this patch sfp code retries to read the full struct sfp_eeprom_id > id out of the SFP eeprom. Sizeof(id) is 96 bytes. > My i2c hardware, Mediatek mt7621, has a rx buffer of 64 bytes. > So sfp_read gets -NOSUPPORTED back on his turn return -EAGAIN.

Re: Question: pause mode disabled for marvell 88e151x phy

2019-01-23 Thread Russell King - ARM Linux admin
On Sat, Jan 05, 2019 at 11:28:19AM +0800, Yunsheng Lin wrote: > On 2018/12/17 22:36, Russell King - ARM Linux wrote: > > I'll try to do further diagnosis over Christmas in case I've missed > > something, but I suspect it may be one of those "weird behaviour" issues > > where the safest action is to

Re: UBSAN: Undefined behaviour in net/ipv4/ip_output.c

2019-01-23 Thread Willem de Bruijn
On Mon, Jan 21, 2019 at 2:25 PM Kyungtae Kim wrote: > > I'm reporting a bug in linux-5.0-rc2: "UBSAN: Undefined behaviour in > net/ipv4/ip_output.c" > > kernel config: https://kt0755.github.io/etc/config-5.0-rc2 > repro: https://kt0755.github.io/etc/repro.b6a11.c Thanks for the report. That repr

Re: [PATCH] sfp: sfp_read: split-up request when hw rx buffer is too small.

2019-01-23 Thread Andrew Lunn
On Wed, Jan 23, 2019 at 10:20:46PM +0100, René van Dorst wrote: > Without this patch sfp code retries to read the full struct sfp_eeprom_id > id out of the SFP eeprom. Sizeof(id) is 96 bytes. > My i2c hardware, Mediatek mt7621, has a rx buffer of 64 bytes. > So sfp_read gets -NOSUPPORTED back on hi

[PATCH net] rhashtable: avoid reschedule loop after rapid growth and shrink

2019-01-23 Thread Josh Elsasser
When running workloads with large bursts of fragmented packets, we've seen a few machines stuck returning -EEXIST from rht_shrink() and endlessly rescheduling their hash table's deferred work, pegging a CPU core. Root cause is commit da20420f83ea ("rhashtable: Add nested tables"), which stops igno

[PATCH] sfp: sfp_read: split-up request when hw rx buffer is too small.

2019-01-23 Thread René van Dorst
Without this patch sfp code retries to read the full struct sfp_eeprom_id id out of the SFP eeprom. Sizeof(id) is 96 bytes. My i2c hardware, Mediatek mt7621, has a rx buffer of 64 bytes. So sfp_read gets -NOSUPPORTED back on his turn return -EAGAIN. Same issue is with the SFP_EXT_STATUS data which

Re: [Patch nf-next] nf_conntrack: fix error path in nf_conntrack_pernet_init()

2019-01-23 Thread Florian Westphal
Cong Wang wrote: > When nf_ct_netns_get() fails, it should clean up itself, > its caller doesn't need to call nf_conntrack_fini_net(). Thanks a lot for fixing this!

[PATCH iproute2] f_flower: fix build with musl libc

2019-01-23 Thread Hans Dedecker
XATTR_SIZE_MAX requires the usage of linux/limits.h; let's include it Signed-off-by: Hans Dedecker --- tc/f_flower.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tc/f_flower.c b/tc/f_flower.c index c5636667..9659e894 100644 --- a/tc/f_flower.c +++ b/tc/f_flower.c @@ -14,6 +14,7 @@ #inclu

[Patch nf-next] nf_conntrack: fix error path in nf_conntrack_pernet_init()

2019-01-23 Thread Cong Wang
When nf_ct_netns_get() fails, it should clean up itself, its caller doesn't need to call nf_conntrack_fini_net(). nf_conntrack_init_net() is called after registering sysctl and proc, so its cleanup function should be called before unregistering sysctl and proc. Fixes: ba3fbe663635 ("netfilter: nf

[PATCH v5 4/4] Bluetooth: btusb: Use the cmd_timeout method to reset the Intel BT chip

2019-01-23 Thread Rajat Jain
If the platform provides it, use the reset gpio to reset the Intel BT chip, as part of cmd_timeout handling. This has been found helpful on Intel bluetooth controllers where the firmware gets stuck and the only way out is a hard reset pin provided by the platform. Signed-off-by: Rajat Jain --- v5

[PATCH v5 2/4] usb: assign ACPI companions for embedded USB devices

2019-01-23 Thread Rajat Jain
From: Dmitry Torokhov USB devices permanently connected to USB ports may be described in ACPI tables and share ACPI devices with ports they are connected to. See [1] for details. This will allow us to describe sideband resources for devices, such as, for example, hard reset line for BT USB contr

[PATCH v5 3/4] Bluetooth: Allow driver specific cmd timeout handling

2019-01-23 Thread Rajat Jain
Add a hook to allow the BT driver to do device or command specific handling in case of timeouts. This is to be used by Intel driver to reset the device after certain number of timeouts. Signed-off-by: Rajat Jain --- v5: Drop the quirk, and rename the hook function to cmd_timeout() v4: same as v1

[PATCH v5 1/4] usb: split code locating ACPI companion into port and device

2019-01-23 Thread Rajat Jain
From: Dmitry Torokhov In preparation for handling embedded USB devices let's split usb_acpi_find_companion() into usb_acpi_find_companion_for_device() and usb_acpi_find_companion_for_port(). Signed-off-by: Dmitry Torokhov Signed-off-by: Rajat Jain Acked-by: Greg Kroah-Hartman Tested-by: Sukum

Re: [Patch iproute2] tc: add hit counter for matchall

2019-01-23 Thread Stephen Hemminger
On Thu, 17 Jan 2019 13:18:55 -0800 Cong Wang wrote: > > + if (tb[TCA_MATCHALL_PCNT]) { > + if (RTA_PAYLOAD(tb[TCA_MATCHALL_PCNT]) < sizeof(*pf)) { > + print_string(PRINT_FP, NULL, "Broken perf counters\n", > NULL); This the wrong way to print an error mess

Re: KASAN: use-after-free Read in refcount_inc_not_zero_checked

2019-01-23 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:333478a7eb21 Merge branch 'for-rc' of git://git.kernel.org.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=14ec4628c0 kernel config: https://syzkaller.appspot.com/x/.config?x=505743

Re: [Patch iproute2] tc: add performance counters for basic filter

2019-01-23 Thread Stephen Hemminger
On Tue, 22 Jan 2019 22:41:45 -0800 Cong Wang wrote: > + if (tb[TCA_BASIC_PCNT]) { > + if (RTA_PAYLOAD(tb[TCA_BASIC_PCNT]) < sizeof(*pf)) { > + fprintf(f, "Broken perf counters\n"); > + return -1; Errors should go to stderr not f (which is

Re: [Intel-gfx] [PATCH 1/3] treewide: Lift switch variables out of switches

2019-01-23 Thread Kees Cook
On Thu, Jan 24, 2019 at 8:18 AM Matthew Wilcox wrote: > > On Wed, Jan 23, 2019 at 04:17:30PM +0200, Jani Nikula wrote: > > Can't have: > > > > switch (i) { > > int j; > > case 0: > > /* ... */ > > } > > > > because it can't be turned into: > > > >

[PATCH v2 net-next] lan743x: Provide Read/Write Access to on chip OTP

2019-01-23 Thread Bryan Whitehead
The LAN743x includes on chip One-Time-Programmable (OTP) memory. This patch extends the ethtool EEPROM read/write interface to access OTP memory space. The currently existing interface is limited, as it does not allow OTP read, and OTP writes are restricted to offset==0, length==512, and data[0]=

Re: [PATCH net-next 06/10] net: introduce a net_device_ops macsec helper

2019-01-23 Thread Florian Fainelli
On 1/23/19 7:56 AM, Antoine Tenart wrote: > This patch introduces a net_device_ops MACsec helper to allow net device > drivers to implement a MACsec offloading solution. > > Signed-off-by: Antoine Tenart > --- > include/linux/netdevice.h | 8 > 1 file changed, 8 insertions(+) > > diff

Re: [PATCH net-next 03/10] net: macsec: move some definitions in a dedicated header

2019-01-23 Thread Florian Fainelli
On 1/23/19 7:56 AM, Antoine Tenart wrote: > This patch moves some structure, type and identifier definitions into a > MACsec specific header. This patch does not modify how the MACsec code > is running and only move things around. This is a preparation for the > future MACsec hardware offloading su

[PATCH net-next 2/2] tcp_bbr: adapt cwnd based on ack aggregation estimation

2019-01-23 Thread Priyaranjan Jha
Aggregation effects are extremely common with wifi, cellular, and cable modem link technologies, ACK decimation in middleboxes, and LRO and GRO in receiving hosts. The aggregation can happen in either direction, data or ACKs, but in either case the aggregation effect is visible to the sender in the

[PATCH net-next 1/2] tcp_bbr: refactor bbr_target_cwnd() for general inflight provisioning

2019-01-23 Thread Priyaranjan Jha
Because bbr_target_cwnd() is really a general-purpose BBR helper for computing some volume of inflight data as a function of the estimated BDP, refactor it into following helper functions: - bbr_bdp() - bbr_quantization_budget() - bbr_inflight() Signed-off-by: Priyaranjan Jha Signed-off-by: Neal

[PATCH net-next 0/2] tcp_bbr: Improving TCP BBR performance for WiFi and cellular networks

2019-01-23 Thread Priyaranjan Jha
Ack aggregation is quite prevalent with wifi, cellular and cable modem link tchnologies, ACK decimation in middleboxes, and common offloading techniques such as TSO and GRO, at end hosts. Previously, BBR was often cwnd-limited in the presence of severe ACK aggregation, which resulted in low through

Re: general protection fault in nf_ct_gre_keymap_flush

2019-01-23 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:5b74ce505631 Add linux-next specific files for 20190123 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=1137e1b740 kernel config: https://syzkaller.appspot.com/x/.config?x

[PATCH net-next] r8169: factor out PHY init sequence adjusting 10M and ALDPS

2019-01-23 Thread Heiner Kallweit
Few chip versions use the same sequence to adjust 10M and ALDPS, so let's factor it out. This patch also fixes a (most likely) typo in rtl8168g_1_hw_phy_config. There bit 8 in reg 0x14 on page 0x0bcc was set and not cleared. According to the vendor driver this bit needs to be cleared in all cases.

[PATCH net-next] r8169: factor out disabling ALDPS

2019-01-23 Thread Heiner Kallweit
Chip versions from RTL8168g onward use the same sequence to disable ALDPS (Advanced Link-Down Power Saving). So let's factor this out. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 31 ++-- 1 file changed, 11 insertions(+), 20 deletions(-) dif

Re: [PATCH net-next 2/5] exthdrs: Registration of TLV handlers and parameters

2019-01-23 Thread David Miller
From: Tom Herbert Date: Tue, 22 Jan 2019 21:31:20 -0800 > Define a table that contains 256 entries, one for each TLV. Each entry > points to a structure that contains parameters and handler functions > for receiving and transmitting TLVs. The receive and transmit properties > can be managed indep

Re: [PATCH net-next] r8169: improve firmware handling

2019-01-23 Thread David Miller
From: Heiner Kallweit Date: Tue, 22 Jan 2019 22:23:41 +0100 > So far member rtl_fw has three states: > - IS_ERR(rtl_fw): firmware not loaded > - !rtl_fw: no firmware available > - other: firmware loaded > > This can be made simpler and clearer by adding the firmware name as > member fw_name to s

Re: [PATCH net] ax25: fix possible use-after-free

2019-01-23 Thread David Miller
From: Eric Dumazet Date: Tue, 22 Jan 2019 10:40:59 -0800 > syzbot found that ax25 routes where not properly protected > against concurrent use [1]. > > In this particular report the bug happened while > copying ax25->digipeat. > > Fix this problem by making sure we call ax25_get_route() > while

Re: [Intel-gfx] [PATCH 1/3] treewide: Lift switch variables out of switches

2019-01-23 Thread Matthew Wilcox
On Wed, Jan 23, 2019 at 04:17:30PM +0200, Jani Nikula wrote: > Can't have: > > switch (i) { > int j; > case 0: > /* ... */ > } > > because it can't be turned into: > > switch (i) { > int j = 0; /* not valid C */ > case 0: >

Re: [PATCH net] sfc: suppress duplicate nvmem partition types in efx_ef10_mtd_probe

2019-01-23 Thread David Miller
From: Edward Cree Date: Tue, 22 Jan 2019 19:02:17 + > Use a bitmap to keep track of which partition types we've already seen; > for duplicates, return -EEXIST from efx_ef10_mtd_probe_partition() and > thus skip adding that partition. > Duplicate partitions occur because of the A/B backup sc

Re: [PATCH V2 net-next 00/12] code optimizations & bugfixes for HNS3 driver

2019-01-23 Thread David Miller
From: Huazhong Tan Date: Wed, 23 Jan 2019 07:39:26 +0800 > This patchset includes bugfixes and code optimizations for the HNS3 > ethernet controller driver > > Change log: > V1->V2: fixes comment from Eric Dumazet Series applied.

Re: [Intel-gfx] [PATCH 1/3] treewide: Lift switch variables out of switches

2019-01-23 Thread Kees Cook
On Thu, Jan 24, 2019 at 4:44 AM Jani Nikula wrote: > > On Wed, 23 Jan 2019, Edwin Zimmerman wrote: > > On Wed, 23 Jan 2019, Jani Nikula wrote: > >> On Wed, 23 Jan 2019, Greg KH wrote: > >> > On Wed, Jan 23, 2019 at 03:03:47AM -0800, Kees Cook wrote: > >> >> Variables declared in a switch statem

Re: [PATCH] net: core: dev: Initialise napi state correctly

2019-01-23 Thread Eric Dumazet
On 01/23/2019 10:49 AM, David McKay wrote: > On Fri, 18 Jan 2019 at 17:15, Eric Dumazet wrote: >> >> >> >> On 01/18/2019 04:46 AM, Dave McKay wrote: >>> The state member of the napi_struct is not initialised correctly, it >>> sets the SCHED bit without initialising the state to zero first. This

[GIT PULL] Hyper-V hv_netvsc commits for 5.0

2019-01-23 Thread Sasha Levin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 The following changes since commit bfeffd155283772bbe78c6a05dec7c0128ee500c: Linux 5.0-rc1 (2019-01-06 17:08:20 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git tags/hyperv-fixes-si

Re: [PATCH net-next] net/mlx4: Mark expected switch fall-through

2019-01-23 Thread Gustavo A. R. Silva
On 1/23/19 11:08 AM, David Miller wrote: > From: "Gustavo A. R. Silva" > Date: Wed, 23 Jan 2019 02:05:11 -0600 > >> In preparation to enabling -Wimplicit-fallthrough, mark switch cases >> where we are expecting to fall through. >> >> This patch fixes the following warning: >> >> drivers/net/et

Re: [PATCH net-next] Bluetooth: Mark expected switch fall-throughs

2019-01-23 Thread Gustavo A. R. Silva
On 1/23/19 11:46 AM, Marcel Holtmann wrote: > Hi Gustavo, > >> In preparation to enabling -Wimplicit-fallthrough, mark switch cases >> where we are expecting to fall through. >> >> This patch fixes the following warnings: >> >> net/bluetooth/rfcomm/core.c:479:6: warning: this statement may fall

Re: [PATCH v3 bpf-next] bpf: allow BPF programs access skb_shared_info->gso_segs field

2019-01-23 Thread Martin Lau
On Wed, Jan 23, 2019 at 09:22:27AM -0800, Eric Dumazet wrote: > This adds the ability to read gso_segs from a BPF program. Acked-by: Martin KaFai Lau

Re: [PATCH net-next] Bluetooth: Mark expected switch fall-throughs

2019-01-23 Thread Marcel Holtmann
Hi Gustavo, > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > This patch fixes the following warnings: > > net/bluetooth/rfcomm/core.c:479:6: warning: this statement may fall through > [-Wimplicit-fallthrough=] > net/bluetooth/l

Re: [PATCH net-next] intel: Mark expected switch fall-throughs

2019-01-23 Thread Jeff Kirsher
On Wed, 2019-01-23 at 11:11 -0600, Gustavo A. R. Silva wrote: > Hi Jeffrey, > > On 1/23/19 11:04 AM, Jeff Kirsher wrote: > > On Wed, 2019-01-23 at 01:48 -0600, Gustavo A. R. Silva wrote: > > > In preparation to enabling -Wimplicit-fallthrough, mark switch > > > cases > > > where we are expecting t

Re: [PATCH net-next] intel: Mark expected switch fall-throughs

2019-01-23 Thread Gustavo A. R. Silva
Hi Jeffrey, On 1/23/19 11:04 AM, Jeff Kirsher wrote: > On Wed, 2019-01-23 at 01:48 -0600, Gustavo A. R. Silva wrote: >> In preparation to enabling -Wimplicit-fallthrough, mark switch cases >> where we are expecting to fall through. >> >> This patch fixes the following warnings: >> >> drivers/net/e

Re: [PATCH net-next 0/4] mlxsw: Add VXLAN support for Spectrum-2

2019-01-23 Thread David Miller
From: Ido Schimmel Date: Wed, 23 Jan 2019 14:32:53 + > This patchset adds support for VXLAN tunneling on the Spectrum-2 ASIC. > Spectrum-1 and Spectrum-2 are largely backward compatible in this area, > so not too many changes are required. > > Patches #1-#2 expose a function and perform smal

Re: [PATCH v2 net] ravb: expand rx descriptor data to accommodate hw checksum

2019-01-23 Thread David Miller
From: Simon Horman Date: Wed, 23 Jan 2019 12:14:52 +0100 > EtherAVB may provide a checksum of packet data appended to packet data. In > order to allow this checksum to be received by the host descriptor data > needs to be enlarged by 2 bytes to accommodate the checksum. > > In the case of MTU-si

[PATCH bpf-next] selftests/bpf: suppress readelf stderr when probing for BTF support

2019-01-23 Thread Stanislav Fomichev
Before: $ make -s -C tools/testing/selftests/bpf readelf: Error: Missing knowledge of 32-bit reloc types used in DWARF sections of machine number 247 readelf: Warning: unable to apply unsupported reloc type 10 to section .debug_info readelf: Warning: unable to apply unsupported reloc type 1 to sect

Re: [PATCH net-next V4 0/5] vhost: accelerate metadata access through vmap()

2019-01-23 Thread David Miller
From: "Michael S. Tsirkin" Date: Wed, 23 Jan 2019 08:58:07 -0500 > On Wed, Jan 23, 2019 at 05:55:52PM +0800, Jason Wang wrote: >> This series tries to access virtqueue metadata through kernel virtual >> address instead of copy_user() friends since they had too much >> overheads like checks, spec

[PATCH v3 bpf-next] bpf: allow BPF programs access skb_shared_info->gso_segs field

2019-01-23 Thread Eric Dumazet
This adds the ability to read gso_segs from a BPF program. v3: Use BPF_REG_AX instead of BPF_REG_TMP for the temporary register, as suggested by Martin. v2: refined Eddie Hao patch to address Alexei feedback. Signed-off-by: Eric Dumazet Cc: Eddie Hao Cc: Martin KaFai Lau --- include/uapi

happy new year,,,,,,

2019-01-23 Thread law
Good afternoon, Do your receive my previous email? Best regards, Robert

  1   2   3   >