Re: [PATCH V3] net/mlx4: Get rid of page operation after dma_alloc_coherent

2019-01-02 Thread Christoph Hellwig
Btw, one other little request if you resend this: the mlx5 icm code touched here oddly enough uses the deprecated pci_map_sg/pci_unmap_sg instead of the preferred dma_map_sg/dma_unmap_sg despite otherwise using the generic DMA API. Can you throw in a little cleanup patch for that into your series?

RE: [PATCH] fsl/fman: Use GFP_ATOMIC in {memac,tgec}_add_hash_mac_address()

2019-01-02 Thread Madalin-cristian Bucur
> -Original Message- > From: Scott Wood > Sent: Friday, December 28, 2018 2:29 AM > To: Madalin-cristian Bucur > Cc: netdev@vger.kernel.org; linuxppc-...@lists.ozlabs.org > Subject: [PATCH] fsl/fman: Use GFP_ATOMIC in > {memac,tgec}_add_hash_mac_address() > > These functions are called f

Re: [PATCH V3] net: phy: tja11xx: Add TJA11xx PHY driver

2019-01-02 Thread Heiner Kallweit
On 03.01.2019 03:09, Marek Vasut wrote: > On 12/23/18 10:16 AM, Marek Vasut wrote: >> On 12/22/18 6:39 PM, Heiner Kallweit wrote: >>> On 22.12.2018 00:35, Marek Vasut wrote: Add driver for the NXP TJA1100 and TJA1101 PHYs. These PHYs are special BroadRReach 100BaseT1 PHYs used in automoti

[GIT] Networking

2019-01-02 Thread David Miller
Several fixes here. Basically split down the line between newly introduced regressions and long existing problems: 1) Double free in tipc_enable_bearer(), from Cong Wang. 2) Many fixes to nf_conncount, from Florian Westphal. 3) op->get_regs_len() can throw an error, check it, from Yunsheng Li

[PATCH iproute2-next 2/5] ip neigh: Convert do_show_or_flush to use rtnl_neighdump_req

2019-01-02 Thread David Ahern
From: David Ahern Add ipneigh_dump_filter to add filter attributes to the neighbor dump request and update do_show_or_flush to use rtnl_neighdump_req. Signed-off-by: David Ahern --- ip/ipneigh.c | 42 ++ 1 file changed, 26 insertions(+), 16 deletions(-)

[PATCH iproute2-next 1/5] libnetlink: Add filter function to rtnl_neighdump_req

2019-01-02 Thread David Ahern
From: David Ahern Add filter function to rtnl_neighdump_req and a buffer to the request for the filter functions to append attributes. Signed-off-by: David Ahern --- include/libnetlink.h | 3 ++- lib/libnetlink.c | 12 +++- misc/arpd.c | 2 +- 3 files changed, 14 inserti

[PATCH iproute2-next 4/5] libnetlink: Add RTNL_HANDLE_F_STRICT_CHK flag

2019-01-02 Thread David Ahern
From: David Ahern Add RTNL_HANDLE_F_STRICT_CHK flag and set in rth flags to let know commands know if the kernel supports strict checking. Extracted from patch from Ido to fix filtering with strict checking enabled. Cc: Ido Schimmel Signed-off-by: David Ahern --- include/libnetlink.h | 1 +

[PATCH iproute2-next 3/5] bridge: Update fdb show to use rtnl_neighdump_req

2019-01-02 Thread David Ahern
From: David Ahern Add fdb_dump_filter to set filter attributes in dump request and convert fdb_show to use rtnl_neighdump_req. Signed-off-by: David Ahern --- bridge/fdb.c | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/bridge/fdb.c b/

[PATCH iproute2-next 5/5] bridge: fdb: Fix filtering with strict checking disabled

2019-01-02 Thread David Ahern
From: David Ahern Older kernels expect an ifinfomsg struct as the ancillary header, and after kernel commit bd961c9bc664 ("rtnetlink: fix rtnl_fdb_dump() for ndmsg header") can handle either ifinfomsg or ndmsg. Strict data checking only allows ndmsg. Use the new RTNL_HANDLE_F_STRICT_CHK flag to

[PATCH iproute2-next 0/5] ip bridge: Updates to neigh and fdb dumps

2019-01-02 Thread David Ahern
From: David Ahern First 3 patches fixup ip neigh and bridge fdb dumps to use rtnl_neighdump_req. Patch 4 adds a new flag for commands to know when strict checking is enabled. Patch 5 fixes fdb dumps to work on older kernels. David Ahern (5): libnetlink: Add filter function to rtnl_neighdump_

Re: [PATCH iproute2-next] bridge: fdb: Fix filtering with strict checking enabled / disabled

2019-01-02 Thread David Ahern
On 1/1/19 12:18 AM, Ido Schimmel wrote: > When strict checking is enabled the kernel expects to receive the > ifindex of the bridge device using 'NDA_MASTER', but iproute2 currently > uses 'IFLA_MASTER' which the kernel expects when strict checking is > disabled. Therefore, using iproute2 on curren

Re: [PATCH net] ipv6: Fix dump of specific table with strict checking

2019-01-02 Thread David Miller
From: David Ahern Date: Wed, 2 Jan 2019 18:26:13 -0800 > From: David Ahern > > Dump of a specific table with strict checking enabled is looping. The > problem is that the end of the table dump is not marked in the cb. When > dumping a specific table, cb args 0 and 1 are not used (they are the

Re: [PATCH net] ipv6: Consider sk_bound_dev_if when binding a socket to an address

2019-01-02 Thread David Miller
From: David Ahern Date: Wed, 2 Jan 2019 18:57:09 -0800 > From: David Ahern > > IPv6 does not consider if the socket is bound to a device when binding > to an address. The result is that a socket can be bound to eth0 and then > bound to the address of eth1. If the device is a VRF, the result is

Re: [PATCH] libceph: protect pending flags in ceph_con_keepalive()

2019-01-02 Thread Myungho Jung
On Wed, Jan 02, 2019 at 04:42:47PM +0100, Ilya Dryomov wrote: > On Thu, Dec 27, 2018 at 8:08 PM Myungho Jung wrote: > > > > con_flag_test_and_set() sets CON_FLAG_KEEPALIVE_PENDING and > > CON_FLAG_WRITE_PENDING flags without protection in ceph_con_keepalive(). > > It triggers WARN_ON() in clear_st

Re: Problem with queuing vlan tagged packets after migration from 3.16.0 to 4.9.0

2019-01-02 Thread Cong Wang
On Tue, Jan 1, 2019 at 11:46 AM Bartek Kois wrote: > > Hi > Yes it did work since I remember (like around 2.4.x) and it changed > since I moved from Debian 8 to 9. I would appreciate fixing that in the > future beacuse it is essential for queueing traffic on the routers, but > the question is why

[PATCH] vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel

2019-01-02 Thread Su Yanjun
Recently we run a network test over ipcomp virtual tunnel.We find that if a ipv4 packet needs fragment, then the peer can't receive it. We deep into the code and find that when packet need fragment the smaller fragment will be encapsulated by ipip not ipcomp. So when the ipip packet goes into xfrm

RE: [PATCH] net: tsn: add an netlink interface between kernel and application layer

2019-01-02 Thread Po Liu
Hi Vinicius, Thanks! As comments below. Br, Po Liu > -Original Message- > From: Vinicius Costa Gomes [mailto:vinicius.go...@intel.com] > Sent: 2019年1月3日 3:02 > To: Po Liu ; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org > Cc: da...@davemloft.net; haus...@cisco.com; nicolas.fe.

Re: [PULL] virtio, vhost: features, fixes, cleanups

2019-01-02 Thread pr-tracker-bot
The pull request you sent on Wed, 2 Jan 2019 16:23:23 -0500: > git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/d548e65904ae43b0637d200a2441fc94e0589c30 Thank you! -- Deet-doot-dot, I am a bot.

[PATCH net] ipv6: Consider sk_bound_dev_if when binding a socket to an address

2019-01-02 Thread David Ahern
From: David Ahern IPv6 does not consider if the socket is bound to a device when binding to an address. The result is that a socket can be bound to eth0 and then bound to the address of eth1. If the device is a VRF, the result is that a socket can only be bound to an address in the default VRF.

[PATCH net] ipv6: Fix dump of specific table with strict checking

2019-01-02 Thread David Ahern
From: David Ahern Dump of a specific table with strict checking enabled is looping. The problem is that the end of the table dump is not marked in the cb. When dumping a specific table, cb args 0 and 1 are not used (they are the hash index and entry with an hash table index when dumping all table

[PATCH 2/2] staging: rtl8188eu: Fix module loading from tasklet for WEP encryption

2019-01-02 Thread Larry Finger
Commit 2b2ea09e74a5 ("staging:r8188eu: Use lib80211 to decrypt WEP-frames") causes scheduling while atomic bugs followed by a hard freeze whenever the driver tries to connect to a WEP-encrypted network. Experimentation showed that the freezes were eliminated when module lib80211 was preloaded, whic

[PATCH 1/2] staging: rtl8188eu: Fix module loading from tasklet for CCMP encryption

2019-01-02 Thread Larry Finger
Commit 6bd082af7e36 ("staging:r8188eu: use lib80211 CCMP decrypt") causes scheduling while atomic bugs followed by a hard freeze whenever the driver tries to connect to a CCMP-encrypted network. Experimentation showed that the freezes were eliminated when module lib80211 was preloaded, which can be

[PATCH 0/2] Fixes for system freezes for r8188eu

2019-01-02 Thread Larry Finger
The driver issues "scheduling while atomic" messages and will freeze the system. These problems are due to attempting to dynamically load library encryption routines from a tasklet. The fixes are relatively simple. All that is needed is to replace indirect calls of the try_then_request_module() mac

Re: [PATCH V3] net: phy: tja11xx: Add TJA11xx PHY driver

2019-01-02 Thread Marek Vasut
On 12/23/18 10:16 AM, Marek Vasut wrote: > On 12/22/18 6:39 PM, Heiner Kallweit wrote: >> On 22.12.2018 00:35, Marek Vasut wrote: >>> Add driver for the NXP TJA1100 and TJA1101 PHYs. These PHYs are special >>> BroadRReach 100BaseT1 PHYs used in automotive. >>> >>> Signed-off-by: Marek Vasut >>> Cc

[PATCH 02/19] usbnet: smsc95xx: Stop propagation of in_pm

2019-01-02 Thread Marek Vasut
The information whether the SMSC95xx is in_pm or not can be derived from the usbdev->suspend_count. First thing called in smsc95xx_suspend() is usbnet_suspend(), which increments the usbdev->suspend_count and since then the driver only calls _nopm() functions and functions with in_pm set to 1. The

[PATCH 09/19] usbnet: smsc95xx: Connect to phydev

2019-01-02 Thread Marek Vasut
Add code to detect and connect to PHY. The internal PHY of the SMSC95xx is a regular SMSC LAN8700 and the driver only supports the internal PHY, so just use the SMSC PHY driver to configure the PHY. Note that the driver does a lot of extra configuration of the PHY, which is left in to avoid breakag

[PATCH 13/19] usbnet: smsc95xx: Replace smsc95xx_link_ok_nopm()

2019-01-02 Thread Marek Vasut
Replace the function with genphy_update_link(), since that's really all that it is. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn Cc: Florian Fainelli Cc: linux-...@vger.kernel.org To: netdev@vger.kernel.org --- drivers/net/usb/smsc95xx.c | 1

[PATCH 05/19] usbnet: smsc95xx: Remove smsc95xx_{read,write}_nopm()

2019-01-02 Thread Marek Vasut
These functions are now equal to smsc95xx_mdio_{read,write}(), deduplicate them. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn Cc: Florian Fainelli Cc: linux-...@vger.kernel.org To: netdev@vger.kernel.org --- drivers/net/usb/smsc95xx.c | 30 +

[PATCH 07/19] usbnet: smsc95xx: Split the reset function

2019-01-02 Thread Marek Vasut
The smsc95xx_reset() is called either during bind or later during the driver operation. However, the MII structure can be populated only once, when the smsc95xx_reset() is called from the drivers bind function. Split the reset function to allow filling the MII structure only once. This is done in

[PATCH 06/19] usbnet: smsc95xx: Remove __smsc95xx_mdio_{read,write}()

2019-01-02 Thread Marek Vasut
Inline those functions into smsc95xx_mdio_{read,write}() to get rid of the wrapper. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn Cc: Florian Fainelli Cc: linux-...@vger.kernel.org To: netdev@vger.kernel.org --- drivers/net/usb/smsc95xx.c | 1

[PATCH 14/19] usbnet: smsc95xx: Replace mii_nway_restart()

2019-01-02 Thread Marek Vasut
This is in fact genphy_restart_aneg(), just use the generic phydev function. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn Cc: Florian Fainelli Cc: linux-...@vger.kernel.org To: netdev@vger.kernel.org --- drivers/net/usb/smsc95xx.c | 5 -

[PATCH 12/19] usbnet: smsc95xx: Replace ad-hoc PHY functions with generic ones

2019-01-02 Thread Marek Vasut
Replace the ad-hoc reimplementation of genphy_soft_reset() and genphy_config_aneg() with the generic functions. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn Cc: Florian Fainelli Cc: linux-...@vger.kernel.org To: netdev@vger.kernel.org --- dr

[PATCH 11/19] usbnet: smsc95xx: Replace smsc95xx_mdio_write() with phy_write()

2019-01-02 Thread Marek Vasut
Just replace smsc95xx_mdio_write() with generic phy_write() to reduce usage of the ad-hoc accessors. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn Cc: Florian Fainelli Cc: linux-...@vger.kernel.org To: netdev@vger.kernel.org --- drivers/net/u

[PATCH 16/19] usbnet: smsc95xx: Replace mii_check_media()

2019-01-02 Thread Marek Vasut
The mii_check_media() is called to read out the PHY status registers and update the internal status reported by mii_ethtool_gset(), just replace it with phydev compatible phy_read_status(). Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn Cc: Flor

[PATCH 15/19] usbnet: smsc95xx: Replace mii_ethtool_gset()

2019-01-02 Thread Marek Vasut
Replace mii_ethtool_gset() with a phydev compatible function and update the code to match. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn Cc: Florian Fainelli Cc: linux-...@vger.kernel.org To: netdev@vger.kernel.org --- drivers/net/usb/smsc95x

[PATCH 08/19] usbnet: smsc95xx: Register MII bus

2019-01-02 Thread Marek Vasut
Register MII bus so that a phydev can attach to it. This works in parallel with the existing MII bus accessors within the driver, however the existing accessors will be removed in subsequent patch. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn

[PATCH 19/19] usbnet: smsc95xx: Use phy bit operations

2019-01-02 Thread Marek Vasut
Use bit operations provided by bit.h instead of reimplementing them. No functional change. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn Cc: Florian Fainelli Cc: linux-...@vger.kernel.org To: netdev@vger.kernel.org --- drivers/net/usb/smsc95x

[PATCH 18/19] usbnet: smsc95xx: Remove all of the carrier checking code

2019-01-02 Thread Marek Vasut
The carrier checking code is completely handled by the internal phydev state machine, remove it. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn Cc: Florian Fainelli Cc: linux-...@vger.kernel.org To: netdev@vger.kernel.org --- drivers/net/usb/s

[PATCH 17/19] usbnet: smsc95xx: Replace generic_mii_ioctl()

2019-01-02 Thread Marek Vasut
Replace generic_mii_ioctl() with phydev compatible phy_mii_ioctl(). Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn Cc: Florian Fainelli Cc: linux-...@vger.kernel.org To: netdev@vger.kernel.org --- drivers/net/usb/smsc95xx.c | 3 ++- 1 file cha

[PATCH 04/19] usbnet: smsc95xx: Remove __smsc95xx_{read,write}_reg()

2019-01-02 Thread Marek Vasut
Inline those functions into smsc95xx_{read,write}_reg() to get rid of the wrapper. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn Cc: Florian Fainelli Cc: linux-...@vger.kernel.org To: netdev@vger.kernel.org --- drivers/net/usb/smsc95xx.c | 32

[PATCH 10/19] usbnet: smsc95xx: Replace smsc95xx_mdio_read() with phy_read()

2019-01-02 Thread Marek Vasut
Just replace smsc95xx_mdio_read() with generic phy_read() to reduce usage of the ad-hoc accessors. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn Cc: Florian Fainelli Cc: linux-...@vger.kernel.org To: netdev@vger.kernel.org --- drivers/net/usb

[PATCH 03/19] usbnet: smsc95xx: Remove smsc95xx_{read,write}_reg_nopm()

2019-01-02 Thread Marek Vasut
These functions are now equal to smsc95xx_{read,write}_reg(), deduplicate them. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn Cc: Florian Fainelli Cc: linux-...@vger.kernel.org To: netdev@vger.kernel.org --- drivers/net/usb/smsc95xx.c | 78 ++

[PATCH 01/19] usbnet: smsc95xx: Fix memory leak in smsc95xx_bind

2019-01-02 Thread Marek Vasut
In case reading of PHY register fails in smsc95xx_bind(), the private data allocated earlier are not free()d. Free them before bailing out. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Nisar Sayed Cc: Woojung Huh Cc: Andrew Lunn Cc: Florian Fainelli Cc: linux-...@vger.kernel.org To: ne

[PATCH 00/19] usbnet: smsc95xx: Convert to phydev

2019-01-02 Thread Marek Vasut
This series first cleans up the in_pm variable and _nopm() functions, in preparations for conversion to phy_device instead of ad-hoc PHY configuration. This is followed by a registration of an MDIO bus, attaching a PHY device to it and conversion and cleanup of assorted functions to use the new PH

Re: pull-request: bpf 2019-01-02

2019-01-02 Thread David Miller
From: Alexei Starovoitov Date: Wed, 2 Jan 2019 16:11:07 -0800 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) prevent out of bounds speculation on pointer arithmetic, from Daniel. > > 2) typo fix, from Xiaozhou. > > Please consider pulli

[PATCH iproute2] testsuite: add SPDX license id

2019-01-02 Thread Stephen Hemminger
Signed-off-by: Stephen Hemminger --- testsuite/lib/generic.sh | 1 + testsuite/tests/ip/link/add_type_xfrm.t | 1 + testsuite/tests/ip/link/new_link.t| 1 + testsuite/tests/ip/link/show_dev_wo_vf_rate.t | 1 + testsuite/tests/ip/netns/set_nsid.t |

[PATCH v3] netfilter: xt_connlimit: fix race in connection counting

2019-01-02 Thread Alakesh Haloi
commit b36e4523d4d5 ("netfilter: nf_conncount: fix garbage collection confirm race") An iptable rule like the following on a multicore systems will result in accepting more connections than set in the rule. iptables -A INPUT -p tcp -m tcp --syn --dport -m connlimit \ --connlim

Re: [PATCH v2] netlink: fixup regression in RTM_GETADDR

2019-01-02 Thread David Ahern
On 12/30/18 7:10 PM, ba...@gandi.net wrote: > From: Arthur Gautier > > This commit fixes a regression in AF_INET/RTM_GETADDR and > AF_INET6/RTM_GETADDR. > > Before this commit, the kernel would stop dumping addresses once the first > skb was full and end the stream with NLMSG_DONE(-EMSGSIZE). Th

pull-request: bpf 2019-01-02

2019-01-02 Thread Alexei Starovoitov
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) prevent out of bounds speculation on pointer arithmetic, from Daniel. 2) typo fix, from Xiaozhou. Please consider pulling these changes from: git://git.kernel.org/pub/scm/linux/kernel/git

[PATCH v2] Bluetooth: Fix locking in bt_accept_enqueue() for BH context

2019-01-02 Thread Matthias Kaehlcke
With commit e16337622016 ("Bluetooth: Handle bt_accept_enqueue() socket atomically") lock_sock[_nested]() is used to acquire the socket lock before manipulating the socket. lock_sock[_nested]() may block, which is problematic since bt_accept_enqueue() can be called in bottom half context (e.g. from

Re: [PATCH bpf v3 0/9] bpf fix to prevent oob under speculation

2019-01-02 Thread Alexei Starovoitov
On Thu, Jan 03, 2019 at 12:58:26AM +0100, Daniel Borkmann wrote: > This set fixes an out of bounds case under speculative execution > by implementing masking of pointer alu into the verifier. For > details please see the individual patches. > > Thanks! > > v2 -> v3: > - 8/9: change states_equal

[PATCH v2] netfilter: xt_connlimit: fix race in connection counting

2019-01-02 Thread Alakesh Haloi
An iptable rule like the following on a multicore systems will result in accepting more connections than set in the rule. iptables -A INPUT -p tcp -m tcp --syn --dport -m connlimit \ --connlimit-above 2000 --connlimit-mask 0 -j DROP In check_hlist function, connections that are foun

[PATCH bpf v3 7/9] bpf: fix check_map_access smin_value test when pointer contains offset

2019-01-02 Thread Daniel Borkmann
In check_map_access() we probe actual bounds through __check_map_access() with offset of reg->smin_value + off for lower bound and offset of reg->umax_value + off for the upper bound. However, even though the reg->smin_value could have a negative value, the final result of the sum with off could be

[PATCH bpf v3 9/9] bpf: add various test cases to selftests

2019-01-02 Thread Daniel Borkmann
Add various map value pointer related test cases to test_verifier kselftest to reflect recent changes and improve test coverage. The tests include basic masking functionality, unprivileged behavior on pointer arithmetic which goes oob, mixed bounds tests, negative unknown scalar but resulting posit

[PATCH bpf v3 1/9] bpf: move {prev_,}insn_idx into verifier env

2019-01-02 Thread Daniel Borkmann
Move prev_insn_idx and insn_idx from the do_check() function into the verifier environment, so they can be read inside the various helper functions for handling the instructions. It's easier to put this into the environment rather than changing all call-sites only to pass it along. insn_idx is usef

[PATCH bpf v3 2/9] bpf: move tmp variable into ax register in interpreter

2019-01-02 Thread Daniel Borkmann
This change moves the on-stack 64 bit tmp variable in ___bpf_prog_run() into the hidden ax register. The latter is currently only used in JITs for constant blinding as a temporary scratch register, meaning the BPF interpreter will never see the use of ax. Therefore it is safe to use it for the case

[PATCH bpf v3 3/9] bpf: enable access to ax register also from verifier rewrite

2019-01-02 Thread Daniel Borkmann
Right now we are using BPF ax register in JIT for constant blinding as well as in interpreter as temporary variable. Verifier will not be able to use it simply because its use will get overridden from the former in bpf_jit_blind_insn(). However, it can be made to work in that blinding will be skipp

[PATCH bpf v3 4/9] bpf: restrict map value pointer arithmetic for unprivileged

2019-01-02 Thread Daniel Borkmann
Restrict map value pointer arithmetic for unprivileged users in that arithmetic itself must not go out of bounds as opposed to the actual access later on. Therefore after each adjust_ptr_min_max_vals() with a map value pointer as a destination it will simulate a check_map_access() of 1 byte on the

[PATCH bpf v3 5/9] bpf: restrict stack pointer arithmetic for unprivileged

2019-01-02 Thread Daniel Borkmann
Restrict stack pointer arithmetic for unprivileged users in that arithmetic itself must not go out of bounds as opposed to the actual access later on. Therefore after each adjust_ptr_min_max_vals() with a stack pointer as a destination we simulate a check_stack_access() of 1 byte on the destination

[PATCH bpf v3 8/9] bpf: prevent out of bounds speculation on pointer arithmetic

2019-01-02 Thread Daniel Borkmann
Jann reported that the original commit back in b2157399cc98 ("bpf: prevent out-of-bounds speculation") was not sufficient to stop CPU from speculating out of bounds memory access: While b2157399cc98 only focussed on masking array map access for unprivileged users for tail calls and data access such

[PATCH bpf v3 6/9] bpf: restrict unknown scalars of mixed signed bounds for unprivileged

2019-01-02 Thread Daniel Borkmann
For unknown scalars of mixed signed bounds, meaning their smin_value is negative and their smax_value is positive, we need to reject arithmetic with pointer to map value. For unprivileged the goal is to mask every map pointer arithmetic and this cannot reliably be done when it is unknown at verific

[PATCH bpf v3 0/9] bpf fix to prevent oob under speculation

2019-01-02 Thread Daniel Borkmann
This set fixes an out of bounds case under speculative execution by implementing masking of pointer alu into the verifier. For details please see the individual patches. Thanks! v2 -> v3: - 8/9: change states_equal condition into old->speculative && !cur->speculative, thanks Jakub! - 8/9:

Re: ixgbe / mdio dependancy error

2019-01-02 Thread Jeff Kirsher
On Wed, 2019-01-02 at 15:42 -0800, Florian Fainelli wrote: > On 1/2/19 3:30 PM, Steve Douthit wrote: > > > This is because PHYLIB=m which forces MDIO_BUS=m. If you have > > > IXGBE=y, > > > then PHYLIB and MDIO_BUS can't be modules. Working on a patch to > > > correct the issue. > > > > There wa

Re: ixgbe / mdio dependancy error

2019-01-02 Thread Florian Fainelli
On 1/2/19 3:30 PM, Steve Douthit wrote: >> This is because PHYLIB=m which forces MDIO_BUS=m. If you have IXGBE=y, >> then PHYLIB and MDIO_BUS can't be modules. Working on a patch to >> correct the issue. > > There was a review comment to select MDIO_DEVICE instead of PHYLIB. > PHYLIB seems corre

Re: ixgbe / mdio dependancy error

2019-01-02 Thread Jeff Kirsher
On Wed, 2019-01-02 at 23:30 +, Steve Douthit wrote: > > This is because PHYLIB=m which forces MDIO_BUS=m. If you have > > IXGBE=y, > > then PHYLIB and MDIO_BUS can't be modules. Working on a patch to > > correct the issue. > > There was a review comment to select MDIO_DEVICE instead of PHYLI

Re: [PATCH bpf v2 8/9] bpf: prevent out of bounds speculation on pointer arithmetic

2019-01-02 Thread Daniel Borkmann
On 01/02/2019 11:11 PM, Jakub Kicinski wrote: > On Wed, 2 Jan 2019 00:20:45 +0100, Daniel Borkmann wrote: >> Jann reported that the original commit back in b2157399cc98 >> ("bpf: prevent out-of-bounds speculation") was not sufficient >> to stop CPU from speculating out of bounds memory access: >>

Re: ixgbe / mdio dependancy error

2019-01-02 Thread Steve Douthit
> This is because PHYLIB=m which forces MDIO_BUS=m. If you have IXGBE=y, > then PHYLIB and MDIO_BUS can't be modules. Working on a patch to > correct the issue. There was a review comment to select MDIO_DEVICE instead of PHYLIB. PHYLIB seems correct to me now that I'm looking at this again thoug

Re: [PATCH RFC 0/4] barriers using data dependency

2019-01-02 Thread Michael S. Tsirkin
On Wed, Jan 02, 2019 at 04:36:40PM -0500, Alan Stern wrote: > On Wed, 2 Jan 2019, Michael S. Tsirkin wrote: > > > So as explained in Documentation/memory-barriers.txt e.g. > > a load followed by a store require a full memory barrier, > > to avoid store being ordered before the load. > > Similarly

Re: [PATCH RFC net-next 00/19] Devlink health reporting and recovery system

2019-01-02 Thread Jakub Kicinski
On Tue, 1 Jan 2019 09:58:30 +, Eran Ben Elisha wrote: > On 1/1/2019 3:47 AM, Jakub Kicinski wrote: > > The addition of "objdump" and its marshalling is a bit disappointing. > > It seemed to me when region snapshots were added that they would serve > > this exact purpose. Taking a region snapsh

Re: [PATCH] r8169: Add support for new Realtek Ethernet

2019-01-02 Thread Heiner Kallweit
On 02.01.2019 07:45, Kai-Heng Feng wrote: > There are two new Realtek Ethernet devices which are re-branded r8168h. > Add the IDs to to support them. > > Signed-off-by: Kai-Heng Feng > --- > drivers/net/ethernet/realtek/r8169.c | 2 ++ > 1 file changed, 2 insertions(+) > Reviewed-by: Heiner Kal

Re: [PATCH net-next] vrf: Add VRF_F_BYPASS_RCV_NF flag to vrf device

2019-01-02 Thread Florian Westphal
David Ahern wrote: > On 12/27/18 12:38 AM, we...@ucloud.cn wrote: > > nft add table firewall > > nft add chain firewall zones { type filter hook prerouting priority - 300 > > \; } > > nft add rule firewall zones counter ct zone set iif map { "eth1" : 1, > > "eth2" : 2 } > > nft add chain firewa

Re: [PATCH bpf v2 8/9] bpf: prevent out of bounds speculation on pointer arithmetic

2019-01-02 Thread Jakub Kicinski
On Wed, 2 Jan 2019 00:20:45 +0100, Daniel Borkmann wrote: > Jann reported that the original commit back in b2157399cc98 > ("bpf: prevent out-of-bounds speculation") was not sufficient > to stop CPU from speculating out of bounds memory access: > While b2157399cc98 only focussed on masking array ma

Re: [PATCH net-next] vrf: Add VRF_F_BYPASS_RCV_NF flag to vrf device

2019-01-02 Thread David Ahern
On 12/27/18 12:38 AM, we...@ucloud.cn wrote: > nft add table firewall > nft add chain firewall zones { type filter hook prerouting priority - 300 \; > } > nft add rule firewall zones counter ct zone set iif map { "eth1" : 1, "eth2" > : 2 } > nft add chain firewall rule-1000-ingress > nft add rul

RE: lan78xx: WARNING: irq 79 handler enabled interrupts

2019-01-02 Thread Woojung.Huh
Hi Stefan, Thanks for information and creating a ticket. Did quick check on a PC machine with 4.20 rc. However, not seeing same warning. Look need time to repro and get details on same build & target you are using. Regards, Woojung > -Original Message- > From: Stefan Wahren > Sent: Tue

Re: [PATCH RFC 0/4] barriers using data dependency

2019-01-02 Thread Alan Stern
On Wed, 2 Jan 2019, Michael S. Tsirkin wrote: > So as explained in Documentation/memory-barriers.txt e.g. > a load followed by a store require a full memory barrier, > to avoid store being ordered before the load. > Similarly load-load requires a read memory barrier. > > Thinking about it, we can

Re: [PATCH RFC 3/4] barriers: convert a control to a data dependency

2019-01-02 Thread Michael S. Tsirkin
On Wed, Jan 02, 2019 at 01:00:24PM -0800, Matthew Wilcox wrote: > On Wed, Jan 02, 2019 at 03:57:58PM -0500, Michael S. Tsirkin wrote: > > @@ -875,6 +893,8 @@ to the CPU containing it. See the section on > > "Multicopy atomicity" > > for more information. > > > > > > + > > + > > In summary:

[PULL] virtio, vhost: features, fixes, cleanups

2019-01-02 Thread Michael S. Tsirkin
The following changes since commit 7566ec393f4161572ba6f11ad5171fd5d59b0fbd: Linux 4.20-rc7 (2018-12-16 15:46:55 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to a691ffb46edd7cb12a17ff096

[patch] net, skbuff: do not prefer skb allocation fails early

2019-01-02 Thread David Rientjes
Commit dcda9b04713c ("mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic") replaced __GFP_REPEAT in alloc_skb_with_frags() with __GFP_RETRY_MAYFAIL when the allocation may directly reclaim. The previous behavior would require reclaim up to 1 << order pages for sk

Re: [PATCH RFC 3/4] barriers: convert a control to a data dependency

2019-01-02 Thread Matthew Wilcox
On Wed, Jan 02, 2019 at 03:57:58PM -0500, Michael S. Tsirkin wrote: > @@ -875,6 +893,8 @@ to the CPU containing it. See the section on "Multicopy > atomicity" > for more information. > > > + > + > In summary: > >(*) Control dependencies can order prior loads against later stores. Was

[PATCH RFC 2/4] include/linux/compiler.h: allow memory operands

2019-01-02 Thread Michael S. Tsirkin
We don't really care whether the variable is in-register or in-memory. Relax the constraint accordingly. Signed-off-by: Michael S. Tsirkin --- include/linux/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 1a

[PATCH RFC 3/4] barriers: convert a control to a data dependency

2019-01-02 Thread Michael S. Tsirkin
It's not uncommon to have two access two unrelated memory locations in a specific order. At the moment one has to use a memory barrier for this. However, if the first access was a read and the second used an address depending on the first one we would have a data dependency and no barrier would b

[PATCH RFC 1/4] include/linux/compiler*.h: fix OPTIMIZER_HIDE_VAR

2019-01-02 Thread Michael S. Tsirkin
Since commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") clang no longer reuses the OPTIMIZER_HIDE_VAR macro from compiler-gcc - instead it gets the version in include/linux/compiler.h. Unfortunately that version doesn't actually prevent compiler from optimizin

[PATCH RFC 4/4] virtio: use dependent_ptr_mb

2019-01-02 Thread Michael S. Tsirkin
Use dependent_ptr_mb which is - on some architectures - more light-weight than an rmb. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_ring.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 81

[PATCH RFC 0/4] barriers using data dependency

2019-01-02 Thread Michael S. Tsirkin
So as explained in Documentation/memory-barriers.txt e.g. a load followed by a store require a full memory barrier, to avoid store being ordered before the load. Similarly load-load requires a read memory barrier. Thinking about it, we can actually create a data dependency by mixing the first load

Re: [RFC PATCH V3 0/5] Hi:

2019-01-02 Thread Michael S. Tsirkin
On Sat, Dec 29, 2018 at 08:46:51PM +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 barriers or even hardware feature > toggling. Will review, thanks! One

[PATCH v2 4.14 5/5] netfilter: nf_conncount: don't skip eviction when age is negative

2019-01-02 Thread Mauricio Faria de Oliveira
From: Florian Westphal commit 4cd273bb91b3001f623f516ec726c49754571b1a upstream. (not in Linus's tree now, but in nf.git + linux-next.git already.) age is signed integer, so result can be negative when the timestamps have a large delta. In this case we want to discard the entry. Instead of us

[PATCH v2 4.14 4/5] netfilter: nf_conncount: fix garbage collection confirm race

2019-01-02 Thread Mauricio Faria de Oliveira
From: Florian Westphal commit b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452 upstream. Yi-Hung Wei and Justin Pettit found a race in the garbage collection scheme used by nf_conncount. When doing list walk, we lookup the tuple in the conntrack table. If the lookup fails we remove this tuple from our

[PATCH v2 4.14 1/5] netfilter: xt_connlimit: don't store address in the conn nodes

2019-01-02 Thread Mauricio Faria de Oliveira
From: Florian Westphal commit ce49480dba8666cba0106e8e31a942c9ce4c438a upstream. Only stored, never read. This is a leftover from commit 7d0848c8 ("netfilter: connlimit: use rbtree for per-host conntrack obj storage"), which added the rbtree node struct that stores the address instead. Sig

[PATCH v2 4.14 0/5] netfilter: xt_connlimit: backport upstream fixes for race in connection counting

2019-01-02 Thread Mauricio Faria de Oliveira
From: Ubuntu [changelog] - v2: include patch 5/5 (a very recent fix to patch 4/5) which is not yet in Linus's tree but it's in nf.git + linux-next.git, thus should make it shortly. Test results still consistent. Thanks Florian Westphal for reviewing and pointing that out.

[PATCH v2 4.14 3/5] netfilter: nf_conncount: Fix garbage collection with zones

2019-01-02 Thread Mauricio Faria de Oliveira
From: Yi-Hung Wei commit 21ba8847f857028dc83a0f341e16ecc616e34740 upstream. Currently, we use check_hlist() for garbage colleciton. However, we use the ‘zone’ from the counted entry to query the existence of existing entries in the hlist. This could be wrong when they are in different zones, and

[PATCH v2 4.14 2/5] netfilter: nf_conncount: expose connection list interface

2019-01-02 Thread Mauricio Faria de Oliveira
From: Pablo Neira Ayuso commit 5e5cbc7b23eaf13e18652c03efbad5be6995de6a upstream. This patch provides an interface to maintain the list of connections and the lookup function to obtain the number of connections in the list. Signed-off-by: Pablo Neira Ayuso [mfo: backport: refresh context line

Re: [GIT PULL] 9p updates for 4.21

2019-01-02 Thread pr-tracker-bot
The pull request you sent on Wed, 2 Jan 2019 04:54:39 +0100: > git://github.com/martinetd/linux tags/9p-for-4.21 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/85f78456f286da46fb054c7d45e4193cb757ac83 Thank you! -- Deet-doot-dot, I am a bot. https://korg.wiki.kernel

[PATCH] MAINTAINERS: Add entry for staging driver r8188eu

2019-01-02 Thread Larry Finger
This entry was missed when the driver was added. Signed-off-by: Larry Finger --- Greg, Because this driver is in staging, I am sending it to you. I hope that is OK. Larry --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f4855974f325..b02e

Re: [PATCH 4.14 0/4] netfilter: xt_connlimit: backport upstream fixes for race in connection counting

2019-01-02 Thread Mauricio Faria de Oliveira
Florian, On Wed, Jan 2, 2019 at 3:17 PM Florian Westphal wrote: > > Mauricio Faria de Oliveira wrote: > > Either way, the suggested mainline fix does actually fix the issue in 4.14 > > for at least one environment. So, it might well be the case that Alakesh's > > test environment has difference

ip netns exec hides mount points from child processes

2019-01-02 Thread Naja Melan
hi, I have been using network namespaces for a while, mostly with good results. Recently I ran into a problem where the cgroup mount points are missing for software that needs it (runc). I discovered that ip netns exec creates a mount namespace to bind mount network configuration files. I supp

[PATCH] ixgbe: remove magic constant in ixgbe_reset_hw_82599()

2019-01-02 Thread Jiri Kosina
From: Jiri Kosina ixgbe_reset_hw_82599() resets the value of hw->mac.num_rar_entries to pre-defined value of 128. Let's get rid of that hardcoded literal, and use IXGBE_82599_RAR_ENTRIES instead, the same way the normal initialization path does. Signed-off-by: Jiri Kosina --- drivers/net/et

Re: [RFC bpf-next v4 03/12] bpf: verifier: remove dead code

2019-01-02 Thread Jakub Kicinski
On Wed, 2 Jan 2019 18:57:01 +, Yonghong Song wrote: > Here prog->len is the length after dead insn removal. A little bit > comment will help review and other people later code inspection. Will do! > With that, you can add my Ack to patch 1-5. > Acked-by: Yonghong Song Thank you!

RE: [PATCH] net: tsn: add an netlink interface between kernel and application layer

2019-01-02 Thread Vinicius Costa Gomes
Hi Po Liu, PO LIU writes: > Hi Vinicius, > > Thank you very much for your feedback. > > I know the CBS is used to be most important part of AVB. And qdiscs is good > tool to configure qos. > > But as you know, the TSN family is a cluster of protocols and much extending > the AVB. The protocol

Re: [RFC bpf-next v4 03/12] bpf: verifier: remove dead code

2019-01-02 Thread Yonghong Song
On 1/2/19 10:31 AM, Jakub Kicinski wrote: > On Wed, 2 Jan 2019 05:25:49 +, Yonghong Song wrote: >> On 12/31/18 5:37 PM, Jakub Kicinski wrote: >>> Instead of overwriting dead code with jmp -1 instructions >>> remove it completely for root. Adjust verifier state and >>> line info appropriately

Re: [PATCH net] isdn: fix kernel-infoleak in capi_unlocked_ioctl

2019-01-02 Thread David Miller
From: Eric Dumazet Date: Wed, 2 Jan 2019 09:20:27 -0800 > Since capi_ioctl() copies 64 bytes after calling > capi20_get_manufacturer() we need to ensure to not leak > information to user. ... > Signed-off-by: Eric Dumazet > Reported-by: syzbot > Cc: Karsten Keil Applied and queued up for -st

  1   2   >