linux-next test error: WARNING in remove_proc_entry

2019-05-13 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:04c4b677 Add linux-next specific files for 20190513 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=10a413c8a0 kernel config: https://syzkaller.appspot.com/x/.config?x=b8e08a763b62ad3a

Re: net: phy: realtek: regression, kernel null pointer dereference

2019-05-13 Thread Serge Semin
Hello Heiner and net-folks, On Sat, May 11, 2019 at 04:56:56PM +0200, Heiner Kallweit wrote: > On 11.05.2019 16:46, Vicente Bergas wrote: > > On Friday, May 10, 2019 10:28:06 PM CEST, Heiner Kallweit wrote: > >> On 10.05.2019 17:05, Vicente Bergas wrote: > >>> Hello, > >>> there is a regression on

[PATCH net v2] net: mvpp2: cls: Add missing NETIF_F_NTUPLE flag

2019-05-13 Thread Maxime Chevallier
Now that the mvpp2 driver supports classification offloading, we must add the NETIF_F_NTUPLE to the features list. Since the current code doesn't allow disabling the feature, we don't set the flag in dev->hw_features. Fixes: 90b509b39ac9 ("net: mvpp2: cls: Add Classification offload support") Rep

Re: [PATCH net-next] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread Michal Kubecek
On Mon, May 13, 2019 at 09:33:13AM +0800, Weilong Chen wrote: > The remote host answers to an ICMP timestamp request. > This allows an attacker to know the time and date on your host. Why is that a problem? If it is, does it also mean that it is a security problem to have your time in sync (becaus

Re: [EXT] Re: [PATCH net 2/3] of_net: add property "nvmem-mac-address" for of_get_mac_addr()

2019-05-13 Thread Petr Štetiar
Andy Duan [2019-05-13 03:31:59]: > From: Andrew Lunn Sent: Saturday, May 11, 2019 2:18 AM > > On Fri, May 10, 2019 at 08:24:03AM +, Andy Duan wrote: > > > If MAC address read from nvmem cell and it is valid mac address, > > > .of_get_mac_addr_nvmem() add new property "nvmem-mac-address" in >

Re: NVMEM address DT post processing [Was: Re: [PATCH net 0/3] add property "nvmem_macaddr_swap" to swap macaddr bytes order]

2019-05-13 Thread Srinivas Kandagatla
On 11/05/2019 15:44, Petr Štetiar wrote: }; +Another example where we've MAC address for eth1 stored in the NOR EEPROM as +following sequence of bytes (output of hexdump -C /dev/mtdX): + + 0180 66 61 63 5f 6d 61 63 20 3d 20 44 34 3a 45 45 3a |fac_mac = D4:EE:| + 0190 3

RE: [EXT] Re: [PATCH net 2/3] of_net: add property "nvmem-mac-address" for of_get_mac_addr()

2019-05-13 Thread Andy Duan
From: Petr Štetiar Sent: Monday, May 13, 2019 4:00 PM > Andy Duan [2019-05-13 03:31:59]: > > > From: Andrew Lunn Sent: Saturday, May 11, 2019 2:18 > > AM > > > On Fri, May 10, 2019 at 08:24:03AM +, Andy Duan wrote: > > > > If MAC address read from nvmem cell and it is valid mac address, > >

RE: stmmac / meson8b-dwmac

2019-05-13 Thread Jose Abreu
From: Simon Huelck Date: Sat, May 11, 2019 at 15:53:34 > ethtool -S gave me some counts for mmc_rx_fifo_overflow, which i didnt > recognize before. Flow Control can prevent this to happen. Please check if your DT FIFO bindings are >= 4096. > Do we have new ideas / new direction to dig for ? G

Re: NVMEM address DT post processing [Was: Re: [PATCH net 0/3] add property "nvmem_macaddr_swap" to swap macaddr bytes order]

2019-05-13 Thread Petr Štetiar
Srinivas Kandagatla [2019-05-13 09:25:55]: Hi, > My initial idea was to add compatible strings to the cell so that most of > the encoding information can be derived from it. For example if the encoding > representing in your example is pretty standard or vendor specific we could > just do with a

Re: [PATCH net] netfilter: nf_queue:fix reinject verdict handling

2019-05-13 Thread Pablo Neira Ayuso
Hi Jagdish, On Thu, May 09, 2019 at 12:01:14AM +0530, Jagdish Motwani wrote: > From: Jagdish Motwani > > In case of more than 1 nf_queues, hooks between them are being executed > more than once. This refers to NF_REPEAT, correct? I think this broke with 960632ece6949. If so, it would be good t

Re: NVMEM address DT post processing [Was: Re: [PATCH net 0/3] add property "nvmem_macaddr_swap" to swap macaddr bytes order]

2019-05-13 Thread Petr Štetiar
Maxime Ripard [2019-05-12 14:19:10]: > > @@ -29,6 +31,19 @@ Optional properties: > > bits: Is pair of bit location and number of bits, which specifies offset > > in bit and number of bits within the address range specified by reg > > property. > > Offset takes values from 0-7.

Re: [PATCH bpf-next 1/2] bpf: Allow bpf_map_lookup_elem() on an xskmap

2019-05-13 Thread Björn Töpel
On Thu, 9 May 2019 at 20:36, Alexei Starovoitov wrote: > > On 5/9/19 9:12 AM, Jonathan Lemon wrote: > > On 9 May 2019, at 4:48, Björn Töpel wrote: > > > >> On Thu, 9 May 2019 at 01:07, Jonathan Lemon > >> wrote: > >>> > >>> Currently, the AF_XDP code uses a separate map in order to > >>> determin

Re: [PATCH net 0/3] add property "nvmem_macaddr_swap" to swap macaddr bytes order

2019-05-13 Thread ynezz
Andy Duan [2019-05-13 03:38:32]: > From: Maxime Ripard Sent: Friday, May 10, 2019 > 7:32 PM > > > > It looks to me that it should be abstracted away by the nvmem interface and > > done at the provider level, not the customer. > > > If to implement add above features like Petr Štetiar describe

[PATCH] of_net: Fix missing of_find_device_by_node ref count drop

2019-05-13 Thread Petr Štetiar
of_find_device_by_node takes a reference to the embedded struct device which needs to be dropped after use. Fixes: d01f449c008a ("of_net: add NVMEM support to of_get_mac_address") Reported-by: kbuild test robot Reported-by: Julia Lawall Signed-off-by: Petr Štetiar --- drivers/of/of_net.c | 5 +

Re: [PATCH v3] net: netfilter: Fix rpfilter dropping vrf packets by mistake

2019-05-13 Thread Pablo Neira Ayuso
On Thu, Apr 25, 2019 at 09:43:53PM +0800, linmiaohe wrote: > From: Miaohe Lin > > When firewalld is enabled with ipv4/ipv6 rpfilter, vrf > ipv4/ipv6 packets will be dropped because in device is > vrf but out device is an enslaved device. So failed with > the check of the rpfilter. > > Signed-off

[PATCH 11/13] netfilter: ebtables: CONFIG_COMPAT: reject trailing data after last rule

2019-05-13 Thread Pablo Neira Ayuso
From: Florian Westphal If userspace provides a rule blob with trailing data after last target, we trigger a splat, then convert ruleset to 64bit format (with trailing data), then pass that to do_replace_finish() which then returns -EINVAL. Erroring out right away avoids the splat plus unneeded t

[PATCH 06/13] netfilter: nf_tables: fix base chain stat rcu_dereference usage

2019-05-13 Thread Pablo Neira Ayuso
From: Florian Westphal Following splat gets triggered when nfnetlink monitor is running while xtables-nft selftests are running: net/netfilter/nf_tables_api.c:1272 suspicious rcu_dereference_check() usage! other info that might help us debug this: 1 lock held by xtables-nft-mul/27006: #0:

[PATCH 09/13] netfilter: nf_conntrack_h323: Remove deprecated config check

2019-05-13 Thread Pablo Neira Ayuso
From: Subash Abhinov Kasiviswanathan CONFIG_NF_CONNTRACK_IPV6 has been deprecated so replace it with a check for IPV6 instead. Use nf_ip6_route6() instead of v6ops->route() and keep the IS_MODULE() in nf_ipv6_ops as mentioned by Florian so that direct calls are used when IPV6 is builtin and indi

[PATCH 02/13] netfilter: nft_flow_offload: add entry to flowtable after confirmation

2019-05-13 Thread Pablo Neira Ayuso
This is fixing flow offload for UDP traffic where packets only follow one single direction. The flow_offload_fixup_tcp() mechanism works fine in case that the offloaded entry remains in SYN_RECV state, given sequence tracking is reset and that conntrack handles syn+ack packets as a retransmission,

[PATCH 10/13] netfilter: nf_flow_table: do not flow offload deleted conntrack entries

2019-05-13 Thread Pablo Neira Ayuso
From: Taehee Yoo Conntrack entries can be deleted by the masquerade module. In that case, flow offload should be deleted too, but GC and data-path of flow offload do not check for conntrack status bits, hence flow offload entries will be removed only by the timeout. Update garbage collector and

[PATCH 01/13] netfilter: nf_tables: delay chain policy update until transaction is complete

2019-05-13 Thread Pablo Neira Ayuso
From: Florian Westphal When we process a long ruleset of the form chain input { type filter hook input priority filter; policy drop; ... } Then the base chain gets registered early on, we then continue to process/validate the next messages coming in the same transaction. Problem is that

[PATCH 13/13] netfilter: nf_tables: correct NFT_LOGLEVEL_MAX value

2019-05-13 Thread Pablo Neira Ayuso
From: Florian Westphal should be same as NFT_LOGLEVEL_AUDIT, so use -, not +. Fixes: 7eced5ab5a73 ("netfilter: nf_tables: add NFT_LOGLEVEL_* enumeration and use it") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- include/uapi/linux/netfilter/nf_tables.h | 2 +- 1 file c

[PATCH 05/13] netfilter: nf_conntrack_h323: restore boundary check correctness

2019-05-13 Thread Pablo Neira Ayuso
From: Jakub Jankowski Since commit bc7d811ace4a ("netfilter: nf_ct_h323: Convert CHECK_BOUND macro to function"), NAT traversal for H.323 doesn't work, failing to parse H323-UserInformation. nf_h323_error_boundary() compares contents of the bitstring, not the addresses, preventing valid H.323 pac

[PATCH 04/13] netfilter: nf_flow_table: check ttl value in flow offload data path

2019-05-13 Thread Pablo Neira Ayuso
From: Taehee Yoo nf_flow_offload_ip_hook() and nf_flow_offload_ipv6_hook() do not check ttl value. So, ttl value overflow may occur. Fixes: 97add9f0d66d ("netfilter: flow table support for IPv4") Fixes: 0995210753a2 ("netfilter: flow table support for IPv6") Signed-off-by: Taehee Yoo Signed-off

[PATCH 03/13] netfilter: nf_flow_table: fix netdev refcnt leak

2019-05-13 Thread Pablo Neira Ayuso
From: Taehee Yoo flow_offload_alloc() calls nf_route() to get a dst_entry. Internally, nf_route() calls ip_route_output_key() that allocates a dst_entry and holds it. So, a dst_entry should be released by dst_release() if nf_route() is successful. Otherwise, netns exit routine cannot be finished

[PATCH 00/13] Netfilter fixes for net

2019-05-13 Thread Pablo Neira Ayuso
Hi David, The following patchset contains Netfilter fixes for net: 1) Postpone chain policy update to drop after transaction is complete, from Florian Westphal. 2) Add entry to flowtable after confirmation to fix UDP flows with packets going in one single direction. 3) Reference count lea

[PATCH 08/13] netfilter: ctnetlink: Resolve conntrack L3-protocol flush regression

2019-05-13 Thread Pablo Neira Ayuso
From: Kristian Evensen Commit 59c08c69c278 ("netfilter: ctnetlink: Support L3 protocol-filter on flush") introduced a user-space regression when flushing connection track entries. Before this commit, the nfgen_family field was not used by the kernel and all entries were removed. Since this commit

[PATCH 12/13] netfilter: nf_tables: remove NFT_CT_TIMEOUT

2019-05-13 Thread Pablo Neira Ayuso
Never used anywhere in the code. Fixes: 7e0b2b57f01d ("netfilter: nft_ct: add ct timeout support") Reported-by: Stéphane Veyret Signed-off-by: Pablo Neira Ayuso --- include/uapi/linux/netfilter/nf_tables.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/uapi/linux/netfilter/nf_tabl

[PATCH 07/13] netfilter: nf_flow_table: fix missing error check for rhashtable_insert_fast

2019-05-13 Thread Pablo Neira Ayuso
From: Taehee Yoo rhashtable_insert_fast() may return an error value when memory allocation fails, but flow_offload_add() does not check for errors. This patch just adds missing error checking. Fixes: ac2a5e23 ("netfilter: add generic flow table infrastructure") Signed-off-by: Taehee Yoo Sig

Re: NVMEM address DT post processing [Was: Re: [PATCH net 0/3] add property "nvmem_macaddr_swap" to swap macaddr bytes order]

2019-05-13 Thread Srinivas Kandagatla
On 13/05/2019 10:07, Petr Štetiar wrote: Srinivas Kandagatla [2019-05-13 09:25:55]: Hi, My initial idea was to add compatible strings to the cell so that most of the encoding information can be derived from it. For example if the encoding representing in your example is pretty standard or

Re: net: phy: realtek: regression, kernel null pointer dereference

2019-05-13 Thread Serge Semin
Hello Vincente, On Sat, May 11, 2019 at 05:06:04PM +0200, Vicente Bergas wrote: > On Saturday, May 11, 2019 4:56:56 PM CEST, Heiner Kallweit wrote: > > On 11.05.2019 16:46, Vicente Bergas wrote: > > > On Friday, May 10, 2019 10:28:06 PM CEST, Heiner Kallweit wrote: > > > > On 10.05.2019 17:05, Vic

Re: [PATCH v2 1/2] net: phy: realtek: Add rtl8211e rx/tx delays config

2019-05-13 Thread Serge Semin
Hello Guenter, On Sun, May 12, 2019 at 10:41:32PM -0700, Guenter Roeck wrote: > Hi, > > On Sat, Apr 27, 2019 at 12:21:11AM +0300, Serge Semin wrote: > > There are two chip pins named TXDLY and RXDLY which actually adds the 2ns > > delays to TXC and RXC for TXD/RXD latching. Alas this is the only

Re: [PATCH net] netfilter: nf_queue:fix reinject verdict handling

2019-05-13 Thread Pablo Neira Ayuso
On Mon, May 13, 2019 at 10:36:51AM +, Jagdish Motwani wrote: > Hi Pablo, > > The case I am referring to is : If there are more than 1 hooks > returning NF_QUEUE verdict. When the first queue reinjects the > packet, 'nf_reinject' starts traversing hooks with hook_index (i). > However if it ag

RE: [PATCH net] netfilter: nf_queue:fix reinject verdict handling

2019-05-13 Thread Jagdish Motwani
Hi Pablo, The case I am referring to is : If there are more than 1 hooks returning NF_QUEUE verdict. When the first queue reinjects the packet, 'nf_reinject' starts traversing hooks with hook_index (i). However if it again receives a NF_QUEUE verdict (by some other netfilter hook), it queue wi

Re: net: phy: realtek: regression, kernel null pointer dereference

2019-05-13 Thread Serge Semin
On Mon, May 13, 2019 at 01:29:42PM +0300, Serge Semin wrote: > Hello Vincente, > > On Sat, May 11, 2019 at 05:06:04PM +0200, Vicente Bergas wrote: > > On Saturday, May 11, 2019 4:56:56 PM CEST, Heiner Kallweit wrote: > > > On 11.05.2019 16:46, Vicente Bergas wrote: > > > > On Friday, May 10, 2019

[PATCH net] net: seeq: fix crash caused by not set dev.parent

2019-05-13 Thread Thomas Bogendoerfer
The old MIPS implementation of dma_cache_sync() didn't use the dev argument, but commit c9eb6172c328 ("dma-mapping: turn dma_cache_sync into a dma_map_ops method") changed that, so we now need to set dev.parent. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/seeq/sgiseeq.c | 1 + 1

Re: NVMEM address DT post processing [Was: Re: [PATCH net 0/3] add property "nvmem_macaddr_swap" to swap macaddr bytes order]

2019-05-13 Thread Petr Štetiar
Srinivas Kandagatla [2019-05-13 11:06:48]: > On 13/05/2019 10:07, Petr Štetiar wrote: > > Srinivas Kandagatla [2019-05-13 09:25:55]: > > > > > My initial idea was to add compatible strings to the cell so that most of > > > the encoding information can be derived from it. For example if the > >

Re: [PATCH net-next] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread Weilong Chen
On 2019/5/13 15:49, Michal Kubecek wrote: On Mon, May 13, 2019 at 09:33:13AM +0800, Weilong Chen wrote: The remote host answers to an ICMP timestamp request. This allows an attacker to know the time and date on your host. Why is that a problem? If it is, does it also mean that it is a securi

Re: [PATCH net-next] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread Michal Kubecek
On Mon, May 13, 2019 at 07:38:37PM +0800, Weilong Chen wrote: > > On 2019/5/13 15:49, Michal Kubecek wrote: > > On Mon, May 13, 2019 at 09:33:13AM +0800, Weilong Chen wrote: > > > The remote host answers to an ICMP timestamp request. > > > This allows an attacker to know the time and date on your

Re: [PATCH net-next] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread Weilong Chen
On 2019/5/13 19:49, Michal Kubecek wrote: On Mon, May 13, 2019 at 07:38:37PM +0800, Weilong Chen wrote: On 2019/5/13 15:49, Michal Kubecek wrote: On Mon, May 13, 2019 at 09:33:13AM +0800, Weilong Chen wrote: The remote host answers to an ICMP timestamp request. This allows an attacker to know

[PATCH] e1000e: Disable runtime PM on SPT+

2019-05-13 Thread Julian Wollrath
459d69c407f9 disabled runtime PM for CNP+ chips. This broke my I219-LM on a SPT chip. So disable runtime PM also for SPT. Signed-off-by: Julian Wollrath --- drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/e

Re: [PATCH net-next] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread Michal Kubecek
On Mon, May 13, 2019 at 08:06:37PM +0800, Weilong Chen wrote: > On 2019/5/13 19:49, Michal Kubecek wrote: > > One idea is that there may be applications using current time as a seed > > for random number generator - but then such application is the real > > problem, not having correct time. > > >

Re: [PATCH] ravb: implement MTU change while device is up

2019-05-13 Thread Simon Horman
On Thu, May 09, 2019 at 05:32:21PM +0200, Ulrich Hecht wrote: > > > On May 9, 2019 at 12:10 PM Simon Horman wrote: > > > > > > On Thu, May 09, 2019 at 08:57:44AM +0200, Ulrich Hecht wrote: > > > > > > > On May 8, 2019 at 6:52 PM Niklas Söderlund > > > > wrote: > > > > > > > > > > > > Hi Se

Re: [PATCH net-next] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread Florian Westphal
Weilong Chen wrote: > On 2019/5/13 15:49, Michal Kubecek wrote: > > On Mon, May 13, 2019 at 09:33:13AM +0800, Weilong Chen wrote: > > > The remote host answers to an ICMP timestamp request. > > > This allows an attacker to know the time and date on your host. > > > > Why is that a problem? If it

Re: net: phy: realtek: regression, kernel null pointer dereference

2019-05-13 Thread Vicente Bergas
On Monday, May 13, 2019 12:51:05 PM CEST, Serge Semin wrote: On Mon, May 13, 2019 at 01:29:42PM +0300, Serge Semin wrote: Hello Vincente, On Sat, May 11, 2019 at 05:06:04PM +0200, Vicente Bergas wrote: ... Hmm, just figured out, that in the datasheet RXDLY/TXDLY pins are actually grounded, s

Re: [PATCH net-next] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread Weilong Chen
On 2019/5/13 20:11, Michal Kubecek wrote: On Mon, May 13, 2019 at 08:06:37PM +0800, Weilong Chen wrote: On 2019/5/13 19:49, Michal Kubecek wrote: One idea is that there may be applications using current time as a seed for random number generator - but then such application is the real problem,

Re: [PATCH net-next] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread Michal Kubecek
On Mon, May 13, 2019 at 08:26:18PM +0800, Weilong Chen wrote: > On 2019/5/13 20:11, Michal Kubecek wrote: > > On Mon, May 13, 2019 at 08:06:37PM +0800, Weilong Chen wrote: > > > On 2019/5/13 19:49, Michal Kubecek wrote: > > > > One idea is that there may be applications using current time as a seed

Re: net: phy: realtek: regression, kernel null pointer dereference

2019-05-13 Thread Serge Semin
Hello, On Mon, May 13, 2019 at 02:19:17PM +0200, Vicente Bergas wrote: > On Monday, May 13, 2019 12:51:05 PM CEST, Serge Semin wrote: > > On Mon, May 13, 2019 at 01:29:42PM +0300, Serge Semin wrote: > > > Hello Vincente, > > > > > > On Sat, May 11, 2019 at 05:06:04PM +0200, Vicente Bergas wrote:

Re: [PATCH net] net: phy: realtek: Replace phy functions with non-locked version in rtl8211e_config_init()

2019-05-13 Thread Andrew Lunn
On Mon, May 13, 2019 at 03:41:45PM +0900, Kunihiko Hayashi wrote: > After calling phy_select_page() and until calling phy_restore_page(), > the mutex 'mdio_lock' is already locked, so the driver should use > non-locked version of phy functions. Or there will be a deadlock with > 'mdio_lock'. > > T

Re: net: phy: realtek: regression, kernel null pointer dereference

2019-05-13 Thread Andrew Lunn
> Ahh, I see. Then using lock-less version of the access methods must fix the > problem. You could try something like this: Kunihiko Hayash is way ahead of you. Andrew

Re: [RFC PATCH net-next 3/3] flow_offload: support CVLAN match

2019-05-13 Thread Jianbo Liu
The 05/03/2019 16:08, Edward Cree wrote: > Plumb it through from the flow_dissector. > > Signed-off-by: Edward Cree > --- > include/net/flow_offload.h | 2 ++ > net/core/flow_offload.c| 7 +++ > 2 files changed, 9 insertions(+) > > diff --git a/include/net/flow_offload.h b/include/net/f

Re: [PATCH] of_net: Fix missing of_find_device_by_node ref count drop

2019-05-13 Thread Andrew Lunn
On Mon, May 13, 2019 at 11:41:39AM +0200, Petr Štetiar wrote: > of_find_device_by_node takes a reference to the embedded struct device > which needs to be dropped after use. > > Fixes: d01f449c008a ("of_net: add NVMEM support to of_get_mac_address") > Reported-by: kbuild test robot > Reported-by:

Re: net: phy: realtek: regression, kernel null pointer dereference

2019-05-13 Thread Serge Semin
On Mon, May 13, 2019 at 02:51:03PM +0200, Andrew Lunn wrote: > > Ahh, I see. Then using lock-less version of the access methods must fix the > > problem. You could try something like this: > > Kunihiko Hayash is way ahead of you. > >Andrew I wouldn't say that five hours is "way ahead". B

[PATCH net] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-13 Thread Sabrina Dubroca
Currently, nla_put_iflink() doesn't put the IFLA_LINK attribute when iflink == ifindex. In some cases, a device can be created in a different netns with the same ifindex as its parent. That device will not dump its IFLA_LINK attribute, which can confuse some userspace software that expects it. For

[PATCH] net: ethernet: stmmac: dwmac-sun8i: enable support of unicast filtering

2019-05-13 Thread Corentin Labbe
When adding more MAC address to a dwmac-sun8i interface, the device goes directly in promiscuous mode. This is due to IFF_UNICAST_FLT missing flag. So since the hardware support unicast filtering, let's add IFF_UNICAST_FLT. Fixes: 9f93ac8d4085 ("net-next: stmmac: Add dwmac-sun8i") Signed-off-by:

[PATCH net-next v2] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread Weilong Chen
The remote host answers to an ICMP timestamp request. This allows an attacker to know the time and date on your host. This path is an another way contrast to iptables rules: iptables -A input -p icmp --icmp-type timestamp-request -j DROP iptables -A output -p icmp --icmp-type timestamp-reply -j DR

[PATCH] net: ethernet: ti: netcp_ethss: fix build

2019-05-13 Thread Grygorii Strashko
Fix reported build fail: ERROR: "cpsw_ale_flush_multicast" [drivers/net/ethernet/ti/keystone_netcp_ethss.ko] undefined! ERROR: "cpsw_ale_create" [drivers/net/ethernet/ti/keystone_netcp_ethss.ko] undefined! ERROR: "cpsw_ale_add_vlan" [drivers/net/ethernet/ti/keystone_netcp_ethss.ko] undefined! F

Re: [PATCH net] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-13 Thread Nicolas Dichtel
Le 13/05/2019 à 15:01, Sabrina Dubroca a écrit : > Currently, nla_put_iflink() doesn't put the IFLA_LINK attribute when > iflink == ifindex. > > In some cases, a device can be created in a different netns with the > same ifindex as its parent. That device will not dump its IFLA_LINK > attribute, w

selftests: bpf: test_sock: WARNING: workqueue.c:3030 __flush_work+0x3fc/0x470

2019-05-13 Thread Naresh Kamboju
Do you see kernel WARNING while running bpf: test_sock test case ? This kernel warning is popping up continuously for ~725 times on all devices ( arm64, arm, x86_64 and i386). selftests: bpf: test_sock Test case: bind4 load with invalid access: src_ip6 .. [PASS] Test case: bind4 load with invalid

Re: [PATCH v3] net: netfilter: Fix rpfilter dropping vrf packets by mistake

2019-05-13 Thread linmiaohe
On 2019/5/13 17:42, Pablo Neira Ayuso wrote: > On Thu, Apr 25, 2019 at 09:43:53PM +0800, linmiaohe wrote: >> From: Miaohe Lin >> >> When firewalld is enabled with ipv4/ipv6 rpfilter, vrf >> ipv4/ipv6 packets will be dropped because in device is >> vrf but out device is an enslaved device. So fa

Re: [RFC PATCH net-next 3/3] flow_offload: support CVLAN match

2019-05-13 Thread Edward Cree
On 13/05/2019 13:54, Jianbo Liu wrote: > Could you please push to 5.1 and 5.0-stable? The original patch brought a bug > in mlx5_core driver. Need your patch to fix. > > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > @@ -1615,7 +1615,

Re: net: phy: realtek: regression, kernel null pointer dereference

2019-05-13 Thread Vicente Bergas
On Monday, May 13, 2019 3:01:33 PM CEST, Serge Semin wrote: On Mon, May 13, 2019 at 02:51:03PM +0200, Andrew Lunn wrote: Ahh, I see. Then using lock-less version of the access methods must fix the problem. You could try something like this: Kunihiko Hayash is way ahead of you. Andre

[PATCH] iwlwifi: trans: fix killer series loadded incorrect firmware

2019-05-13 Thread Cyrus Lien
Killer series loadded IWL_22000_HR_B_FW_PRE prefixed firmware instead IWL_CC_A_FW_PRE prefixed firmware. Add killer series to the check logic as iwl_ax200_cfg_cc. Signed-off-by: Cyrus Lien --- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(

Re: [PATCH net] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-13 Thread Sabrina Dubroca
2019-05-13, 15:17:33 +0200, Nicolas Dichtel wrote: > Le 13/05/2019 à 15:01, Sabrina Dubroca a écrit : > > Currently, nla_put_iflink() doesn't put the IFLA_LINK attribute when > > iflink == ifindex. > > > > In some cases, a device can be created in a different netns with the > > same ifindex as its

[PATCH net v2] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-13 Thread Sabrina Dubroca
Currently, nla_put_iflink() doesn't put the IFLA_LINK attribute when iflink == ifindex. In some cases, a device can be created in a different netns with the same ifindex as its parent. That device will not dump its IFLA_LINK attribute, which can confuse some userspace software that expects it. For

bpf VM_FLUSH_RESET_PERMS breaks sparc64 boot

2019-05-13 Thread Meelis Roos
I tested yesterdays 5.2 devel git and it failed to boot on my Sun Fire V445 (4x UltraSparc III). Init is started and it hangs there: [ 38.414436] Run /sbin/init as init process [ 38.530711] random: fast init done [ 39.580678] systemd[1]: Inserted module 'autofs4' [ 39.721577] systemd[1]:

Re: [PATCH net-next v2] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread Florian Westphal
Weilong Chen wrote: > The remote host answers to an ICMP timestamp request. > This allows an attacker to know the time and date on your host. No, it does not, I already told you so in V1 :-/ If you really think that its a problem that one can discover milliseconds-since-midnight please just chan

[bpf PATCH 0/3] sockmap fixes

2019-05-13 Thread John Fastabend
A couple fixes for sockmap code. Previously this was bundled with a tls fix for unhash() path however, that is becoming a larger fix so push these on their own. --- John Fastabend (3): bpf: sockmap, only stop/flush strp if it was enabled at some point bpf: sockmap remove duplicate que

[bpf PATCH 1/3] bpf: sockmap, only stop/flush strp if it was enabled at some point

2019-05-13 Thread John Fastabend
If we try to call strp_done on a parser that has never been initialized, because the sockmap user is only using TX side for example we get the following error. [ 883.422081] WARNING: CPU: 1 PID: 208 at kernel/workqueue.c:3030 __flush_work+0x1ca/0x1e0 ... [ 883.422095] Workqueue: events s

[bpf PATCH 2/3] bpf: sockmap remove duplicate queue free

2019-05-13 Thread John Fastabend
In tcp bpf remove we free the cork list and purge the ingress msg list. However we do this before the ref count reaches zero so it could be possible some other access is in progress. In this case (tcp close and/or tcp_unhash) we happen to also hold the sock lock so no path exists but lets fix it ot

[bpf PATCH 3/3] bpf: sockmap fix msg->sg.size account on ingress skb

2019-05-13 Thread John Fastabend
When converting a skb to msg->sg we forget to set the size after the latest ktls/tls code conversion. This patch can be reached by doing a redir into ingress path from BPF skb sock recv hook. Then trying to read the size fails. Fix this by setting the size. Fixes: 604326b41a6fb ("bpf, sockmap: co

Re: [PATCH net v2] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-13 Thread Nicolas Dichtel
Le 13/05/2019 à 15:47, Sabrina Dubroca a écrit : > Currently, nla_put_iflink() doesn't put the IFLA_LINK attribute when > iflink == ifindex. > > In some cases, a device can be created in a different netns with the > same ifindex as its parent. That device will not dump its IFLA_LINK > attribute, w

Re: [PATCH bpf-next v2 04/16] xsk: Extend channels to support combined XSK/non-XSK traffic

2019-05-13 Thread Maxim Mikityanskiy
On 2019-05-08 16:06, Magnus Karlsson wrote: > On Tue, May 7, 2019 at 4:19 PM Maxim Mikityanskiy > wrote: >> >> On 2019-05-06 17:23, Magnus Karlsson wrote: >>> On Mon, May 6, 2019 at 3:46 PM Maxim Mikityanskiy >>> wrote: On 2019-05-04 20:26, Björn Töpel wrote: > On Tue, 30 Apr 2019

[RFC] inet6_validate_link_af improvements

2019-05-13 Thread Maxim Mikityanskiy
A recent bug in systemd [1] triggered the following kernel warning: A link change request failed with some changes committed already. Interface eth1 may have been left with an inconsistent configuration, please check. do_setlink() performs multiple configuration updates, and if any of them

[RFC 1] Validate required parameters in inet6_validate_link_af

2019-05-13 Thread Maxim Mikityanskiy
inet6_set_link_af requires that at least one of IFLA_INET6_TOKEN or IFLA_INET6_ADDR_GET_MODE is passed. If none of them is passed, it returns -EINVAL, which may cause do_setlink() to fail in the middle of processing other commands and give the following warning message: A link change request fai

[RFC 2] Validate required parameters in inet6_validate_link_af

2019-05-13 Thread Maxim Mikityanskiy
inet6_set_link_af requires that at least one of IFLA_INET6_TOKEN or IFLA_INET6_ADDR_GET_MODE is passed. If none of them is passed, it returns -EINVAL, which may cause do_setlink() to fail in the middle of processing other commands and give the following warning message: A link change request fai

Re: [PATCH net v2] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-13 Thread David Ahern
On 5/13/19 7:47 AM, Sabrina Dubroca wrote: > Currently, nla_put_iflink() doesn't put the IFLA_LINK attribute when > iflink == ifindex. > > In some cases, a device can be created in a different netns with the > same ifindex as its parent. That device will not dump its IFLA_LINK > attribute, which c

Re: [PATCH net v2] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-13 Thread Sabrina Dubroca
2019-05-13, 16:50:51 +0200, Nicolas Dichtel wrote: > Le 13/05/2019 à 15:47, Sabrina Dubroca a écrit : > > Currently, nla_put_iflink() doesn't put the IFLA_LINK attribute when > > iflink == ifindex. > > > > In some cases, a device can be created in a different netns with the > > same ifindex as its

Re: [PATCH net v2] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-13 Thread Nicolas Dichtel
Le 13/05/2019 à 17:08, Sabrina Dubroca a écrit : > 2019-05-13, 16:50:51 +0200, Nicolas Dichtel wrote: >> Le 13/05/2019 à 15:47, Sabrina Dubroca a écrit : >>> Currently, nla_put_iflink() doesn't put the IFLA_LINK attribute when >>> iflink == ifindex. >>> >>> In some cases, a device can be created in

Re: [PATCH net v2] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-13 Thread Nicolas Dichtel
Le 13/05/2019 à 17:07, David Ahern a écrit : > On 5/13/19 7:47 AM, Sabrina Dubroca wrote: >> Currently, nla_put_iflink() doesn't put the IFLA_LINK attribute when >> iflink == ifindex. >> >> In some cases, a device can be created in a different netns with the >> same ifindex as its parent. That devi

Re: [PATCH v4 2/2] dt-bindings: net: bluetooth: Add device property firmware-name for QCA6174

2019-05-13 Thread Rob Herring
On Sun, 12 May 2019 11:19:45 +0800, Rocky Liao wrote: > This patch adds an optional device property "firmware-name" to allow the > driver to load customized nvm firmware file based on this property. > > Signed-off-by: Rocky Liao > --- > Changes in v4: > * rebased the code base and merge with la

Re: [PATCH RFC net-next] netlink: Add support for timestamping messages

2019-05-13 Thread Willem de Bruijn
On Thu, May 9, 2019 at 11:57 AM David Ahern wrote: > > From: David Ahern > > Add support for timestamping netlink messages. If a socket wants a > timestamp, it is added when the skb clone is queued to the socket. > > Allow userspace to know the actual time an event happened. In a > busy system th

Re: [PATCH] net: ethernet: stmmac: dwmac-sun8i: enable support of unicast filtering

2019-05-13 Thread Sergei Shtylyov
Hello! On 05/13/2019 04:06 PM, Corentin Labbe wrote: > When adding more MAC address to a dwmac-sun8i interface, the device goes Addresses? > directly in promiscuous mode. > This is due to IFF_UNICAST_FLT missing flag. > > So since the hardware support unicast filtering, let's add IFF_UNICAS

Re: [PATCH net v2] net: mvpp2: cls: Add missing NETIF_F_NTUPLE flag

2019-05-13 Thread David Miller
From: Maxime Chevallier Date: Mon, 13 May 2019 09:30:33 +0200 > Now that the mvpp2 driver supports classification offloading, we must > add the NETIF_F_NTUPLE to the features list. > > Since the current code doesn't allow disabling the feature, we don't set > the flag in dev->hw_features. > > F

Re: [PATCH] of_net: Fix missing of_find_device_by_node ref count drop

2019-05-13 Thread David Miller
From: Petr Štetiar Date: Mon, 13 May 2019 11:41:39 +0200 > of_find_device_by_node takes a reference to the embedded struct device > which needs to be dropped after use. > > Fixes: d01f449c008a ("of_net: add NVMEM support to of_get_mac_address") > Reported-by: kbuild test robot > Reported-by: Ju

Re: [PATCH 00/13] Netfilter fixes for net

2019-05-13 Thread David Miller
From: Pablo Neira Ayuso Date: Mon, 13 May 2019 11:56:17 +0200 > The following patchset contains Netfilter fixes for net: ... > This batch comes with a conflict that can be fixed with this patch: Thanks for this. > You can pull these changes from: > > git://git.kernel.org/pub/scm/linux/kerne

getneigh: add nondump to retrieve single entry

2019-05-13 Thread mcmahon
From: Leonard Zgrablic Currently there is only a dump version of RTM_GETNEIGH for PF_UNSPEC in RTNETLINK that dumps neighbor entries, no non-dump version that can be used to retrieve a single neighbor entry. Add support for the non-dump (doit) version of RTM_GETNEIGH for PF_UNSPEC so that a sing

Re: [PATCH net] net: seeq: fix crash caused by not set dev.parent

2019-05-13 Thread David Miller
From: Thomas Bogendoerfer Date: Mon, 13 May 2019 13:15:17 +0200 > The old MIPS implementation of dma_cache_sync() didn't use the dev argument, > but commit c9eb6172c328 ("dma-mapping: turn dma_cache_sync into a > dma_map_ops method") changed that, so we now need to set dev.parent. > > Signed-off

Re: [PATCH net-next] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread David Miller
From: Michal Kubecek Date: Mon, 13 May 2019 14:11:45 +0200 > I'm sorry but I cannot agree with that. Seeding PRNG with current time > is known to be a bad practice and if some application does it, the > solution is to fix the application, not obfuscating system time. +1 +1 +1

Re: [PATCH net-next] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread David Miller
From: Weilong Chen Date: Mon, 13 May 2019 20:06:37 +0800 > So, the 'time' may become sensitive information. The OS should not > leak it out. The current time of day is a globally synchronized value everyone on the planet has access to. I don't buy this line of reasoning at all, time is not sens

Re: [PATCH net] net: phy: realtek: Replace phy functions with non-locked version in rtl8211e_config_init()

2019-05-13 Thread David Miller
From: Andrew Lunn Date: Mon, 13 May 2019 14:50:02 +0200 > On Mon, May 13, 2019 at 03:41:45PM +0900, Kunihiko Hayashi wrote: >> After calling phy_select_page() and until calling phy_restore_page(), >> the mutex 'mdio_lock' is already locked, so the driver should use >> non-locked version of phy fu

Re: [PATCH net] net: meson: fixup g12a glue ephy id

2019-05-13 Thread David Miller
From: Jerome Brunet Date: Sun, 12 May 2019 23:12:37 +0200 > The phy id chosen by Amlogic is incorrectly set in the mdio mux and > does not match the phy driver. > > It was not detected before because DT forces the use the correct driver > for the internal PHY. > > Fixes: 7090425104db ("net: phy

Re: [PATCH net-next v2] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread David Miller
From: Weilong Chen Date: Mon, 13 May 2019 21:28:57 +0800 > The remote host answers to an ICMP timestamp request. > This allows an attacker to know the time and date on your host. > > This path is an another way contrast to iptables rules: > iptables -A input -p icmp --icmp-type timestamp-request

Re: [PATCH net v2] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-13 Thread David Miller
From: Nicolas Dichtel Date: Mon, 13 May 2019 16:50:51 +0200 > Le 13/05/2019 à 15:47, Sabrina Dubroca a écrit : >> Currently, nla_put_iflink() doesn't put the IFLA_LINK attribute when >> iflink == ifindex. >> >> In some cases, a device can be created in a different netns with the >> same ifindex

Re: getneigh: add nondump to retrieve single entry

2019-05-13 Thread Stephen Hemminger
Functionally this patch looks fine, but it has several style things that need to be fixed. The Subject line of the mail should be: [PATCH net-next] getneigh: add nondump to retrieve single entry Also, your timing is wrong. net-next is still closed. Since there are multiple style errors, learn t

Re: [RFC] inet6_validate_link_af improvements

2019-05-13 Thread David Miller
From: Maxim Mikityanskiy Date: Mon, 13 May 2019 15:05:28 + > A recent bug in systemd [1] triggered the following kernel warning: > > A link change request failed with some changes committed already. > Interface eth1 may have been left with an inconsistent configuration, > please check.

Re: [PATCH v3 bpf] libbpf: detect supported kernel BTF features and sanitize BTF

2019-05-13 Thread Andrii Nakryiko
On Sun, May 12, 2019 at 4:52 PM Daniel Borkmann wrote: > > On 05/12/2019 03:09 AM, Stanislav Fomichev wrote: > > On 05/11, Andrii Nakryiko wrote: > >> On Fri, May 10, 2019 at 3:00 PM Stanislav Fomichev > >> wrote: > >>> On 05/10, Andrii Nakryiko wrote: > On Fri, May 10, 2019 at 2:36 PM Stan

[PATCH net] flow_dissector: disable preemption around BPF calls

2019-05-13 Thread Eric Dumazet
Various things in eBPF really require us to disable preemption before running an eBPF program. syzbot reported : BUG: assuming atomic context at net/core/flow_dissector.c:737 in_atomic(): 0, irqs_disabled(): 0, pid: 24710, name: syz-executor.3 2 locks held by syz-executor.3/24710: #0: e8

Re: [PATCH] bonding: fix arp_validate toggling in active-backup mode

2019-05-13 Thread Jay Vosburgh
Jarod Wilson wrote: >On 5/10/19 6:53 PM, Jay Vosburgh wrote: >> Jarod Wilson wrote: >> >>> There's currently a problem with toggling arp_validate on and off with an >>> active-backup bond. At the moment, you can start up a bond, like so: >>> >>> modprobe bonding mode=1 arp_interval=100 arp_valid

Re: [PATCH] bonding: fix arp_validate toggling in active-backup mode

2019-05-13 Thread David Miller
From: Jay Vosburgh Date: Mon, 13 May 2019 09:43:30 -0700 > That would be my preference, as the 29c4948293bf commit looks to > be the change actually being fixed. Sorry I pushed the original commit message out :-( But isn't the Fixes: tag he choose the one where the logic actually causes p

  1   2   >