Re: [PATCH v2 10/19] ipv4: prevent bounds-check bypass via speculative execution

2018-01-12 Thread Greg KH
On Thu, Jan 11, 2018 at 04:47:18PM -0800, Dan Williams wrote: > Static analysis reports that 'offset' may be a user controlled value > that is used as a data dependency reading from a raw_frag_vec buffer. > In order to avoid potential leaks of kernel memory values, block > speculative execution of

[PATCH V2 net-next 06/11] net: hns3: refactor GL update function

2018-01-12 Thread Peng Li
From: Fuyun Liang The GL update function uses the max GL value between tx_int_gl and rx_int_gl to set both new tx_int_gl and new rx_int_gl. Therefore, User can not enable TX GL self-adaptive or RX GL self-adaptive individually. This patch refactors the code to update the TX GL and the RX GL sepa

[PATCH V2 net-next 07/11] net: hns3: remove unused GL setup function

2018-01-12 Thread Peng Li
From: Fuyun Liang Since the TX GL and the RX GL need to be set separately, hns3_set_vector_coalesc_gl() has been replaced with hns3_set_vector_coalesce_rx_gl() and hns3_set_vector_coalesce_tx_gl(). This patch removes hns3_set_vector_coalesc_gl(). Signed-off-by: Fuyun Liang Signed-off-by: Peng

[PATCH V2 net-next 10/11] net: hns3: add feature check when feature changed

2018-01-12 Thread Peng Li
From: Jian Shen Local variable "changed" was defined to indicates features changed, but was used only for feature NETIF_F_HW_VLAN_CTAG_RX. Add checking for other features. Fixes: 052ece6dc19c ("net: hns3: add ethtool related offload command") Signed-off-by: Jian Shen Signed-off-by: Peng Li ---

Re: [PATCHv2 net-next 2/2] openvswitch: add erspan version II support

2018-01-12 Thread Jiri Benc
On Thu, 11 Jan 2018 08:34:14 -0800, William Tu wrote: > I'd also prefer reverting ceaa001a170e since it's more clean but I > also hope to have this feature in 4.15. > How long does reverting take? Am I only able to submit the new patch > after the reverting is merged? Or I can submit revert and thi

Re: [patch net-next 5/5] mlxsw: spectrum: qdiscs: Support stats for PRIO qdisc

2018-01-12 Thread Jakub Kicinski
On Fri, 12 Jan 2018 00:39:26 + Yuval Mintz wrote: > > Hm. You you need this just because you didn't add the backlog > > pointer to destroy? AFAIK on destroy we are free to reset stats as > > well, thus simplifying your driver... Let me know if I > > misunderstand. > > This is meant exactl

Re: [PATCH V2] ipvlan: fix ipvlan MTU limits

2018-01-12 Thread Jiri Benc
On Thu, 11 Jan 2018 08:59:58 -0800, Mahesh Bandewar (महेश बंडेवार) wrote: > I guess the logic would be as simple as - if mtu_adj for a slave is > set to 0, then it's > following master otherwise not. By setting different mtu for a slave, you will > set this mtu_adj a positive number which would mea

Re: [PATCH net-next 0/2] sched: improve behaviour of offloaded RED stats

2018-01-12 Thread Jakub Kicinski
On Wed, Jan 10, 2018 at 9:38 PM, Jakub Kicinski wrote: > Hi! > > This set attempts to improve the kernel API for TC qdisc offloads. > The cumulative stats are handled nicely today, but the momentary > stats like backlog and qlen are behaving a little less cleanly. > > v1: > - reset the stats on d

RE: [patch net-next 5/5] mlxsw: spectrum: qdiscs: Support stats for PRIO qdisc

2018-01-12 Thread Yuval Mintz
> > > Hm. You you need this just because you didn't add the backlog > > > pointer to destroy? AFAIK on destroy we are free to reset stats as > > > well, thus simplifying your driver... Let me know if I > > > misunderstand. > > > > This is meant exactly for the scenario where qdisc didn't get > >

Re: [PATCH V2] ipvlan: fix ipvlan MTU limits

2018-01-12 Thread Jiri Benc
On Fri, 12 Jan 2018 09:34:13 +0100, Jiri Benc wrote: > I don't think this works currently. When someone (does not have to be > you, it can be a management software running in background) sets the > MTU to the current value, the magic behavior is lost without any way to > restore it (unless I'm miss

Re: [PATCH net-next] net: phy: Have __phy_modify return 0 on success

2018-01-12 Thread Geert Uytterhoeven
Hi Andrew, On Thu, Jan 11, 2018 at 9:55 PM, Andrew Lunn wrote: > __phy_modify would return the old value of the register before it was > modified. Thus on success, it does not return 0, but a positive value. > Thus functions using phy_modify, which is a wrapper around > __phy_modify, can start re

Re: [PATCH 03/32] fs: introduce new ->get_poll_head and ->poll_mask methods

2018-01-12 Thread Christoph Hellwig
On Thu, Jan 11, 2018 at 05:47:50PM +, Al Viro wrote: > Besides having two queues, note the one-time sync_serial_start_port() > there. Where would you map such things? First ->poll_mask()? ->get_poll_mask. These sorts of calls are the prime reason why the events argument is passed to it. >

Re: [PATCH v3 00/27] kill devm_ioremap_nocache

2018-01-12 Thread Yisheng Xie
Hi Christophe , On 2018/1/4 16:05, Christophe LEROY wrote: > > > Le 25/12/2017 à 02:34, Yisheng Xie a écrit : >> >> >> On 2017/12/24 17:05, christophe leroy wrote: >>> >>> >>> Le 23/12/2017 à 14:48, Greg KH a écrit : On Sat, Dec 23, 2017 at 06:55:25PM +0800, Yisheng Xie wrote: > Hi all,

[PATCH][next] ath10k: fix spelling mistake: "addrress" -> "address"

2018-01-12 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in warning message text. Signed-off-by: Colin Ian King --- drivers/net/wireless/ath/ath10k/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci

RE: [patch net-next 3/5] net: sch: prio: Add offload ability to PRIO qdisc

2018-01-12 Thread Nogah Frankel
> -Original Message- > From: Yuval Mintz > Sent: Friday, January 12, 2018 2:05 AM > To: Jakub Kicinski > Cc: Jiri Pirko ; netdev@vger.kernel.org; Nogah Frankel > ; da...@davemloft.net; Ido Schimmel > ; mlxsw ; j...@mojatatu.com; > xiyou.wangc...@gmail.com > Subject: RE: [patch net-next 3

RE: [patch net-next 5/5] mlxsw: spectrum: qdiscs: Support stats for PRIO qdisc

2018-01-12 Thread Nogah Frankel
> -Original Message- > From: Yuval Mintz > Sent: Friday, January 12, 2018 10:47 AM > To: Jakub Kicinski > Cc: Jiri Pirko ; netdev@vger.kernel.org; Nogah Frankel > ; da...@davemloft.net; Ido Schimmel > ; mlxsw ; j...@mojatatu.com; > xiyou.wangc...@gmail.com > Subject: RE: [patch net-next

Re: [patch net-next 5/5] mlxsw: spectrum: qdiscs: Support stats for PRIO qdisc

2018-01-12 Thread Jakub Kicinski
On Fri, 12 Jan 2018 09:29:22 + Nogah Frankel wrote: > > -Original Message- > > From: Yuval Mintz > > Sent: Friday, January 12, 2018 10:47 AM > > To: Jakub Kicinski > > Cc: Jiri Pirko ; netdev@vger.kernel.org; Nogah > > Frankel ; da...@davemloft.net; Ido Schimmel > > ; mlxsw ; j...@moj

Re: [patch net-next 3/5] net: sch: prio: Add offload ability to PRIO qdisc

2018-01-12 Thread Jakub Kicinski
On Fri, 12 Jan 2018 09:20:46 + Nogah Frankel wrote: > > > > > Could we please pass the full qstats on replace and destroy. > > > > > This simplifies the driver code and allows handling the qlen > > > > > as well as backlog. Please see the 2 patch series I sent > > > > > earlier yesterday.

Re: [PATCH v2 00/19] prevent bounds-check bypass via speculative execution

2018-01-12 Thread Russell King - ARM Linux
Do you think that the appropriate patches could be copied to the appropriate people please? On Thu, Jan 11, 2018 at 04:46:24PM -0800, Dan Williams wrote: > Changes since v1 [1]: > * fixup the ifence definition to use alternative_2 per recent AMD > changes in tip/x86/pti (Tom) > > * drop 'nospec

RE: [patch net-next 5/5] mlxsw: spectrum: qdiscs: Support stats for PRIO qdisc

2018-01-12 Thread Nogah Frankel
> > > > > > Hm. You you need this just because you didn't add the backlog > > > > > > pointer to destroy? AFAIK on destroy we are free to reset > > > > > > stats as well, thus simplifying your driver... Let me know > > > > > > if I misunderstand. > > > > The problem of doing it in destroy is whe

Re: linux-next: build failure after merge of the net-next tree

2018-01-12 Thread Daniel Borkmann
On 01/12/2018 05:21 AM, Alexei Starovoitov wrote: > On Thu, Jan 11, 2018 at 10:11:45PM -0500, David Miller wrote: >> From: Alexei Starovoitov >> Date: Wed, 10 Jan 2018 17:58:54 -0800 >> >>> On Thu, Jan 11, 2018 at 11:53:55AM +1100, Stephen Rothwell wrote: Hi all, After merging the n

[PATCH net-next 01/22] net: aquantia: Eliminate AQ_DIMOF, replace with ARRAY_SIZE

2018-01-12 Thread Igor Russkikh
Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 +- drivers/net/ethernet/aquantia/atlantic/aq_utils.h| 2 -- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c| 2 +- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c

[PATCH net-next 06/22] net: aquantia: Add const qualifiers for hardware ops tables

2018-01-12 Thread Igor Russkikh
Hardware operations and capabilities tables are constants and never changed. Declare these as constants. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 3 ++- drivers/net/ethernet/aquantia/atlantic/aq_main.c | 6 +++--- drivers/net/eth

[PATCH net-next 00/22] Aquantia atlantic driver major update 2018/01

2018-01-12 Thread Igor Russkikh
This patchset introduces a support for new Aquantia hardware: AQC11x family with updated hardware (B1) and firmware (2.x and 3.x branches). For that, a number of improvements in overall driver model were done: - Firmware specific ops tables - PCI module cleanup and simplification - Verified and

[PATCH net-next 03/22] net: aquantia: Cleanup hardware access modules

2018-01-12 Thread Igor Russkikh
Use direct aq_hw_s *self reference where possible Eliminate useless abstraction PHAL, duplicated structures definitions Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 22 +++-- drivers/net/ethernet/aquantia/atlantic/aq_nic.c| 6 +-- drivers/net/eth

[PATCH net-next 13/22] net: aquantia: Convert hw and caps structures to const static pointers

2018-01-12 Thread Igor Russkikh
This removes unnecessary structure copying, and prepares the driver for separate firmware ops table introduction. We also remove extra copy of capabilities structure (which is const actually) and also replace it with a const pointer in aq_nic_cfg. Signed-off-by: Igor Russkikh --- drivers/net/et

[PATCH net-next 22/22] net: aquantia: bump driver version to match aquantia internal numbering

2018-01-12 Thread Igor Russkikh
Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/ver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/ver.h b/drivers/net/ethernet/aquantia/atlantic/ver.h index 9009f26..a87699d 100644 --- a/drivers/net/ethe

[PATCH net-next 18/22] net: aquantia: Introduce support for new firmware on AQC cards

2018-01-12 Thread Igor Russkikh
This defines fw2x operations table and corresponding methods. Some of the functions are being shared with 1.x firmware Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/Makefile| 1 + drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 1 - .../aquantia/atlantic/hw

[PATCH net-next 10/22] net: aquantia: Eliminate aq_nic structure abstraction

2018-01-12 Thread Igor Russkikh
aq_nic_s was hidden in aq_nic_internal.h, that made it difficult to access nic fields and structures from other modules. This change moves aq_nic_s struct into aq_nic.h and thus makes it available to other driver modules, mainly pci module and hw related module. Signed-off-by: Igor Russkikh ---

[PATCH net-next 07/22] net: aquantia: Simplify dependencies between pci modules

2018-01-12 Thread Igor Russkikh
Eliminate useless passing of net_device_ops and ethtools_ops through deep chain of calls. Move all pci related code into aq_pci_func module. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_main.c | 97 - drivers/net/ethernet/aquantia/atlantic/aq_m

[PATCH net-next 21/22] net: aquantia: Fix internal stats calculation on rx

2018-01-12 Thread Igor Russkikh
skb len should be fetched before gro_receive - otherwise we may get wrong or even outdated skb data. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq

[PATCH net-next 17/22] net: aquantia: Introduce firmware ops callbacks

2018-01-12 Thread Igor Russkikh
New AQC cards will have an updated firmware with new binary interface. This patch extracts firmware specific operations into a separate table and prepares for the introduction of new fw 2.x and 3.x Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 27 ---

[PATCH net-next 19/22] net: aquantia: Introduce global AQC hardware reset sequence

2018-01-12 Thread Igor Russkikh
The detailed reset sequence ensures all HW components are in aligned state before NIC startup. It also supports cards with signed firmware (RBL) and checks if their FW is valid. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 1 + .../ethernet/aquantia/atl

[PATCH net-next 20/22] net: aquantia: Report correct mediatype via ethtool

2018-01-12 Thread Igor Russkikh
For devices with known capabilities of Fibre media type we now report that to ethtool. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_

[PATCH net-next 12/22] net: aquantia: Prepend hw access functions declarations with prefix

2018-01-12 Thread Igor Russkikh
Internal functions for registers and HW access were not prefixed. This introduce noise in global kernel symbols. Here we add explicit prefix 'hw_atl' to all the HW access layer functions. Alignment and styling were fixed as well. Signed-off-by: Igor Russkikh --- .../ethernet/aquantia/atlantic/hw

[PATCH net-next 15/22] net: aquantia: Remove create/destroy from hw ops

2018-01-12 Thread Igor Russkikh
These ops are not related to HW and are now implemented in pci module. Thus, remove these ops pointers and implementation. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 5 - .../ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 24 -

[PATCH net-next 14/22] net: aquantia: Cleanup pci functions module

2018-01-12 Thread Igor Russkikh
Driver contained a dead code of maintaining multiple pci port instances. That will never be used since for each pci function a separate NIC instance is created. Simplify this, making pci module only responsible for pci resource allocations. NIC initialization is also simplified accordingly Signed-

[PATCH net-next 04/22] net: aquantia: Introduce new device ids definitions

2018-01-12 Thread Igor Russkikh
Reorganize and remove duplicate speed and devid definitions Introduce explicit flow control configuration defines Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_cfg.h| 8 - drivers/net/ethernet/aquantia/atlantic/aq_common.h | 34 ++ driver

[PATCH net-next 16/22] net: aquantia: Change confusing no_ff_addr to more meaningful name

2018-01-12 Thread Igor Russkikh
The address to check if HW is not dead/hang could be stored in capabilities, since it is a constant. Change its name to better reflect the idea. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h| 2 +- drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.c

[PATCH net-next 08/22] net: aquantia: Add new aQuantia devices into pci table

2018-01-12 Thread Igor Russkikh
New set of devices has an upgraded hardware (B1). However this hardware interface is identical to B0. The difference will be in firmware which is incompatible with old one. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 17 + 1 file change

[PATCH net-next 02/22] net: aquantia: Cleanup status flags accesses

2018-01-12 Thread Igor Russkikh
Usage of aq_obj_s structure is noop, here we remove it replacing access to flags filed directly. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h| 2 +- drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.c | 6 +++--- drivers/net/ethernet/aquantia/

[PATCH net-next 09/22] net: aquantia: Introduce new AQC devices and capabilities

2018-01-12 Thread Igor Russkikh
A number of new AQC devices is going to be released. To support more flexible capabilities management a number of static caps instances is now declared. Devices now are mainly differs by supported speeds, but in future more parameters will be customized. A set of AQC100 devices is fibre, not twiste

[PATCH net-next 05/22] net: aquantia: Remove duplicate hardware descriptors declarations

2018-01-12 Thread Igor Russkikh
Signed-off-by: Igor Russkikh --- .../aquantia/atlantic/hw_atl/hw_atl_a0_internal.h | 31 -- .../aquantia/atlantic/hw_atl/hw_atl_b0_internal.h | 31 -- .../aquantia/atlantic/hw_atl/hw_atl_utils.h| 31 ++ 3 files changed, 31 inse

Re: MERGE net into net-next

2018-01-12 Thread Daniel Borkmann
On 01/12/2018 04:16 AM, David Miller wrote: > > Daniel please look at how I resolved the BPF conflicts and build > failures. > > The test_align.c one was pretty simple, but the one that fixes the > build failure due to overlap of the BPF call vs. JIT always on changes > is bit less trivial. Yeah

[iproute PATCH] tc: Optimize gact action lookup

2018-01-12 Thread Phil Sutter
When adding a filter with a gact action such as 'drop', tc first tries to open a shared object with equivalent name (m_drop.so in this case) before trying gact. Avoid this by matching the action name against those handled by gact prior to calling get_action_kind(). Cc: Jiri Pirko Cc: Jamal Hadi S

Re: [RFC bpf-next] bpf: add new jited info fields in bpf_dev_offload and bpf_prog_info

2018-01-12 Thread Daniel Borkmann
On 01/12/2018 03:17 AM, Jakub Kicinski wrote: > On Thu, 11 Jan 2018 16:47:47 -0800, Jakub Kicinski wrote: >> Hi! >> >> Jiong is working on dumping JITed NFP image via bpftool, Francois will be >> submitting support for NFP in binutils soon (whoop! :)). >> >> We would appreciate if you could weigh i

Re: WARNING in netlink_ack (2)

2018-01-12 Thread Xin Long
On Thu, Jan 11, 2018 at 1:31 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > cf1fb158230edce8a0482bfb2e59b9c390477fb6 > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is a

Re: [PATCH v2] bnx2x: disable GSO where gso_size is too big for hardware

2018-01-12 Thread Marcelo Ricardo Leitner
On Fri, Jan 12, 2018 at 10:59:05AM +1100, Daniel Axtens wrote: > If a bnx2x card is passed a GSO packet with a gso_size larger than > ~9700 bytes, it will cause a firmware error that will bring the card > down: Why not use netif_set_gso_max_size() instead? Some drivers are using it to avoid such l

Re: [PATCH v2] bnx2x: disable GSO where gso_size is too big for hardware

2018-01-12 Thread Marcelo Ricardo Leitner
On Fri, Jan 12, 2018 at 09:48:44AM -0200, Marcelo Ricardo Leitner wrote: > On Fri, Jan 12, 2018 at 10:59:05AM +1100, Daniel Axtens wrote: > > If a bnx2x card is passed a GSO packet with a gso_size larger than > > ~9700 bytes, it will cause a firmware error that will bring the card > > down: > > Wh

[PATCH net-next 1/2] net: netfilter: export xt_policy match_policy_in() as xt_policy_match_policy_in()

2018-01-12 Thread Eyal Birger
From: Eyal Birger Expose this functionality so it could be usable from a tc classifier. The rename of match_policy_out() is done for consistency though it is not exported. Signed-off-by: Eyal Birger --- include/net/netfilter/xt_policy.h | 12 net/netfilter/xt_policy.c | 1

[PATCH net-next 0/2] net: sched: Introduce em_policy ematch

2018-01-12 Thread Eyal Birger
From: Eyal Birger The following patchset introduces a new tc ematch for matching IPSec traffic from a tc context. This allows early classification as well as mirroning/redirecting IPSec traffic based on decapsulation criteria. The matching functionality is based on the netfilter xt_policy match

[PATCH net-next 2/2] net: sched: add xfrm policy ematch

2018-01-12 Thread Eyal Birger
From: Eyal Birger Allows classification based on the incoming IPSec policy used during decpsulation. This allows similar matching capabilities to those provided by netfilter xt_policy module, and uses the same data strcuture - but from a tc entry point. Signed-off-by: Eyal Birger --- include/

Re: [patch net-next 0/5] mlxsw: Offload PRIO qdisc

2018-01-12 Thread Jamal Hadi Salim
On 18-01-11 05:20 AM, Jiri Pirko wrote: From: Jiri Pirko Add an offload support for PRIO qdisc for mlxsw driver. PRIO qdisc is being offloaded by using ndo_setup_tc. It has three commands, to set or tune the qdisc, to remove it and to get its stats. Like RED offloading, offloading this qdisc i

Re: [PATCH net-next 1/2] net: netfilter: export xt_policy match_policy_in() as xt_policy_match_policy_in()

2018-01-12 Thread Pablo Neira Ayuso
On Fri, Jan 12, 2018 at 02:57:24PM +0200, Eyal Birger wrote: > @@ -51,9 +52,9 @@ match_xfrm_state(const struct xfrm_state *x, const struct > xt_policy_elem *e, > MATCH(reqid, x->props.reqid); > } > > -static int > -match_policy_in(const struct sk_buff *skb, const struct xt_policy_i

Re: [PATCH net-next] net: phy: Have __phy_modify return 0 on success

2018-01-12 Thread Andrew Lunn
On Thu, Jan 11, 2018 at 05:29:22PM -0800, Florian Fainelli wrote: > On 01/11/2018 12:55 PM, Andrew Lunn wrote: > > __phy_modify would return the old value of the register before it was > > modified. Thus on success, it does not return 0, but a positive value. > > Thus functions using phy_modify, wh

Re: [PATCH net-next 1/2] net: netfilter: export xt_policy match_policy_in() as xt_policy_match_policy_in()

2018-01-12 Thread Eyal Birger
On Fri, Jan 12, 2018 at 3:41 PM, Pablo Neira Ayuso wrote: > On Fri, Jan 12, 2018 at 02:57:24PM +0200, Eyal Birger wrote: >> @@ -51,9 +52,9 @@ match_xfrm_state(const struct xfrm_state *x, const struct >> xt_policy_elem *e, >> MATCH(reqid, x->props.reqid); >> } >> >> -static int >> -m

Re: [PATCH net-next 1/2] net: netfilter: export xt_policy match_policy_in() as xt_policy_match_policy_in()

2018-01-12 Thread Pablo Neira Ayuso
On Fri, Jan 12, 2018 at 03:56:21PM +0200, Eyal Birger wrote: > On Fri, Jan 12, 2018 at 3:41 PM, Pablo Neira Ayuso > wrote: > > On Fri, Jan 12, 2018 at 02:57:24PM +0200, Eyal Birger wrote: > >> @@ -51,9 +52,9 @@ match_xfrm_state(const struct xfrm_state *x, const > >> struct xt_policy_elem *e, > >

[PATCH v2] net: phy: Have __phy_modify return 0 on success

2018-01-12 Thread Andrew Lunn
__phy_modify would return the old value of the register before it was modified. Thus on success, it does not return 0, but a positive value. Thus functions using phy_modify, which is a wrapper around __phy_modify, can start returning > 0 on success, rather than 0. As a result, breakage has been not

RE: DPAA Ethernet problems with mainstream Linux kernels

2018-01-12 Thread Madalin-cristian Bucur
> -Original Message- > From: Linuxppc-dev [mailto:linuxppc-dev- > bounces+madalin.bucur=nxp@lists.ozlabs.org] On Behalf Of Jamie Krueger > Sent: Wednesday, January 10, 2018 5:57 PM > To: linuxppc-...@lists.ozlabs.org > Subject: DPAA Ethernet problems with mainstream Linux kernels > > H

[PATCH] net/tls: Fix inverted error codes to avoid endless loop

2018-01-12 Thread r . hering
sendfile() calls can hang endless with using Kernel TLS if a socket error occurs. Socket error codes must be inverted by Kernel TLS before returning because they are stored with positive sign. If returned non-inverted they are interpreted as number of bytes sent, causing endless looping of the spl

Re: [PATCH v2 15/19] carl9170: prevent bounds-check bypass via speculative execution

2018-01-12 Thread Christian Lamparter
On Friday, January 12, 2018 1:47:46 AM CET Dan Williams wrote: > Static analysis reports that 'queue' may be a user controlled value that > is used as a data dependency to read from the 'ar9170_qmap' array. In > order to avoid potential leaks of kernel memory values, block > speculative execution o

Re: PATCH V5 4/4] selinux: Add SCTP support

2018-01-12 Thread Neil Horman
On Thu, Jan 11, 2018 at 11:31:06AM +, Richard Haines wrote: > The SELinux SCTP implementation is explained in: > Documentation/security/SELinux-sctp.rst > > Signed-off-by: Richard Haines > --- > V5 Change: Rework selinux_netlbl_socket_connect() and > selinux_netlbl_socket_connect_locked as re

Re: [PATCH net-next 00/22] Aquantia atlantic driver major update 2018/01

2018-01-12 Thread David Miller
Sorry, this is way too many patches to submit at one time. When a patch series gets beyond 10 or so patches it creates an unreasonable burdon for those who will be reviewing your work. So please keep your patch series down to about 10 or so patches, thank you. And please submit your changes more

Re: [PATCH 10/18] qla2xxx: prevent bounds-check bypass via speculative execution

2018-01-12 Thread James Bottomley
On Fri, 2018-01-12 at 08:27 +0100, Greg KH wrote: > On Thu, Jan 11, 2018 at 02:15:12PM -0800, Dan Williams wrote: > > > > On Sat, Jan 6, 2018 at 1:03 AM, Greg KH > > wrote: > > > > > > On Fri, Jan 05, 2018 at 05:10:48PM -0800, Dan Williams wrote: > > > > > > > > Static analysis reports that 'ha

Re: [PATCH V2 net-next 00/11] add some new features and fix some bugs

2018-01-12 Thread David Miller
From: Peng Li Date: Fri, 12 Jan 2018 16:23:06 +0800 > This patchset adds 3 ethtool features: get_channels, > get_coalesce and get_coalesce, and fix some bugs. Series applied, thank you.

[PATCH] net: Convert atomic_t net::count to refcount_t

2018-01-12 Thread Kirill Tkhai
Since net could be obtained from RCU lists, and there is a race with net destruction, the patch converts net::count to refcount_t. This provides sanity checks for the cases of incrementing counter of already dead net, when maybe_get_net() has to used instead of get_net(). Drivers: allyesconfig an

Re: pull request (net): ipsec 2018-01-11

2018-01-12 Thread David Miller
From: Steffen Klassert Date: Thu, 11 Jan 2018 12:37:35 +0100 > 1) Don't allow to change the encap type on state updates. >The encap type is set on state initialization and >should not change anymore. From Herbert Xu. > > 2) Skip dead policies when rehashing to fix a >slab-out-of-boun

RE: [PATCH 04/36] usercopy: Prepare for usercopy whitelisting

2018-01-12 Thread David Laight
From: Christopher Lameter > Sent: 10 January 2018 18:28 > On Tue, 9 Jan 2018, Kees Cook wrote: > > > +struct kmem_cache *kmem_cache_create_usercopy(const char *name, > > + size_t size, size_t align, slab_flags_t flags, > > + size_t useroffset, size_t usersize, >

Re: [pull request][net 00/11] Mellanox, mlx5 fixes 2018-01-11

2018-01-12 Thread David Miller
From: Saeed Mahameed Date: Fri, 12 Jan 2018 02:37:12 +0200 > The following series includes fixes to mlx5 core and netdev driver. > To highlight we have two critical fixes in this series: > 1st patch from Eran to address a fix for Host2BMC Breakage. > > 2nd patch from Saeed to address the RDMA IR

[patch net-next v8 01/14] net: sched: introduce support for multiple filter chain pointers registration

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko So far, there was possible only to register a single filter chain pointer to block->chain[0]. However, when the blocks will get shareable, we need to allow multiple filter chain pointers registration. Signed-off-by: Jiri Pirko --- v6->v7: - unsquashed shared block patch that wa

[patch net-next v8 11/14] mlxsw: spectrum_acl: Reshuffle code around mlxsw_sp_acl_ruleset_create/destroy

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko In order to prepare for follow-up changes, make the bind/unbind helpers very simple. That required move of ht insertion/removal and bind/unbind calls into mlxsw_sp_acl_ruleset_create/destroy. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 10

[patch net-next v8 14/14] mlxsw: spectrum_acl: Pass mlxsw_sp_port down to ruleset bind/unbind ops

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko No need to convert from mlxsw_sp_port to net_device and back again. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 6 +++-- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 4 ++-- .../ethernet/mellanox/mlxsw/spectrum_acl_tcam.c| 2

[patch net-next v8 05/14] net: sched: remove classid and q fields from tcf_proto

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Both are no longer used, so remove them. Signed-off-by: Jiri Pirko --- include/net/sch_generic.h | 2 -- net/sched/cls_api.c | 7 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index df97c3e..d

[patch net-next v8 10/14] net: sched: allow ingress and clsact qdiscs to share filter blocks

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Benefit from the previously introduced shared filter blocks infrastructure and allow ingress and clsact qdisc instances to share filter blocks. The block index is coming from userspace as qdisc option. Signed-off-by: Jiri Pirko --- v7->v8: - base this on the patch that introduc

[patch net-next v8 13/14] mlxsw: spectrum_acl: Implement TC block sharing

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Benefit from the prepared TC and in-driver ACL infrastructure and introduce block sharing offload. For that, a new struct "block" is introduced in spectrum_acl in order to hold a list of specific block-port bindings. Signed-off-by: Jiri Pirko --- v7->v8: - rebased on top of cur

[patch net-next v8 12/14] mlxsw: spectrum_acl: Don't store netdev and ingress for ruleset unbind

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Instead, pass netdev and ingress flag to ruleset unbind op. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 9 -- .../ethernet/mellanox/mlxsw/spectrum_acl_tcam.c| 33 +++

[patch net-next v8 07/14] net: sched: use block index as a handle instead of qdisc when block is shared

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko As the tcm_ifindex 0 is invalid ifindex, reuse it to indicate that we work with block, instead of qdisc. So if tcm_ifindex is 0, tcm_parent is used to carry block_index. If the block is set to be shared between at least 2 qdiscs, it is forbidden to use the qdisc handle to add/de

[patch net-next v8 03/14] net: sched: avoid usage of tp->q in tcf_classify

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Use block index in the messages instead. Signed-off-by: Jiri Pirko --- net/sched/cls_api.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 9b45950..31e91dc 100644 --- a/net/sched/cls_api.c +++ b/net/sched

[patch net-next v8 09/14] net: sched: introduce ingress/egress block index attributes for qdisc

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Introduce two new attributes to be used for qdisc creation and dumping. One for ingress block, one for egress block. Introduce a set of ops that qdisc which supports block sharing would implement. Passing block indexes in qdisc change is not supported yet and it is checked and f

[patch net-next v8 08/14] net: sched: add rt netlink message type for block get

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Add simple block get operation which primary purpose is to check the block existence by block index. Signed-off-by: Jiri Pirko --- v6->v7: - new patch --- include/uapi/linux/rtnetlink.h | 6 net/sched/cls_api.c| 64 ++

[patch net-next v8 04/14] net: sched: introduce block mechanism to handle netif_keep_dst calls

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Couple of classifiers call netif_keep_dst directly on q->dev. That is not possible to do directly for shared blocke where multiple qdiscs are owning the block. So introduce a infrastructure to keep track of the block owners in list and use this list to implement block variant of

[patch net-next v8 06/14] net: sched: keep track of offloaded filters and check tc offload feature

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko During block bind, we need to check tc offload feature. If it is disabled yet still the block contains offloaded filters, forbid the bind. Also forbid to register callback for a block that already contains offloaded filters, as the play back is not supported now. For keeping trac

[patch net-next v8 02/14] net: sched: introduce shared filter blocks infrastructure

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Allow qdiscs to share filter blocks among them. Each qdisc type has to use block get/put extended modifications that enable sharing. Shared blocks are tracked within each net namespace and identified by u32 index. This index is passed from user during the qdisc creation. If user

[patch iproute2 net-next v8 1/3] include: update rtnetlink header according to kernel

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- include/uapi/linux/rtnetlink.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index 13bf56f..7409196 100644 --- a/include/uapi/linux/rtnetlink.h +++ b/include/

[patch iproute2 net-next v8 3/3] tc: implement ingress/egress block index attributes for qdiscs

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- tc/tc_qdisc.c | 36 1 file changed, 36 insertions(+) diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c index 70279b9..8dd3e7e 100644 --- a/tc/tc_qdisc.c +++ b/tc/tc_qdisc.c @@ -31,6 +31,7 @@ static int usage(void)

[patch iproute2 net-next v8 2/3] tc: introduce support for block-handle for filter operations

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- tc/tc_filter.c | 127 + 1 file changed, 110 insertions(+), 17 deletions(-) diff --git a/tc/tc_filter.c b/tc/tc_filter.c index 545cc3a..67a0577 100644 --- a/tc/tc_filter.c +++ b/tc/tc_filter.c

[patch net-next v8 00/14] net: sched: allow qdiscs to share filter block instances

2018-01-12 Thread Jiri Pirko
From: Jiri Pirko Currently the filters added to qdiscs are independent. So for example if you have 2 netdevices and you create ingress qdisc on both and you want to add identical filter rules both, you need to add them twice. This patchset makes this easier and mainly saves resources allowing to

[PATCH] netfilter: nf_tables: flow_offload depends on flow_table

2018-01-12 Thread Arnd Bergmann
Without CONFIG_NF_FLOW_TABLE, the new nft_flow_offload module produces a link error: net/netfilter/nft_flow_offload.o: In function `nft_flow_offload_iterate_cleanup': nft_flow_offload.c:(.text+0xb0): undefined reference to `nf_flow_table_iterate' net/netfilter/nft_flow_offload.o: In function `flo

Re: [PATCH] net: Convert atomic_t net::count to refcount_t

2018-01-12 Thread Eric Dumazet
On Fri, 2018-01-12 at 18:28 +0300, Kirill Tkhai wrote: > Since net could be obtained from RCU lists, > and there is a race with net destruction, > the patch converts net::count to refcount_t. > > This provides sanity checks for the cases of > incrementing counter of already dead net, > when maybe_

RE: [PATCH 04/36] usercopy: Prepare for usercopy whitelisting

2018-01-12 Thread Christopher Lameter
On Fri, 12 Jan 2018, David Laight wrote: > > Hmmm... At some point we should switch kmem_cache_create to pass a struct > > containing all the parameters. Otherwise the API will blow up with > > additional functions. > > Or add an extra function to 'configure' the kmem_cache with the > extra parame

Re: linux-next: build failure after merge of the net-next tree

2018-01-12 Thread Alexei Starovoitov
On Fri, Jan 12, 2018 at 11:45:42AM +0100, Daniel Borkmann wrote: > On 01/12/2018 05:21 AM, Alexei Starovoitov wrote: > > On Thu, Jan 11, 2018 at 10:11:45PM -0500, David Miller wrote: > >> From: Alexei Starovoitov > >> Date: Wed, 10 Jan 2018 17:58:54 -0800 > >> > >>> On Thu, Jan 11, 2018 at 11:53:5

Re: [PATCH] net: Convert atomic_t net::count to refcount_t

2018-01-12 Thread Kirill Tkhai
On 12.01.2018 18:53, Eric Dumazet wrote: > On Fri, 2018-01-12 at 18:28 +0300, Kirill Tkhai wrote: >> Since net could be obtained from RCU lists, >> and there is a race with net destruction, >> the patch converts net::count to refcount_t. >> >> This provides sanity checks for the cases of >> increme

Re: WARNING in netlink_ack (2)

2018-01-12 Thread David Ahern
On 1/12/18 4:34 AM, Xin Long wrote: >> audit: type=1400 audit(1515595879.379:7): avc: denied { map } for >> pid=3498 comm="syzkaller002174" path="/root/syzkaller002174137" dev="sda1" >> ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 >> tcontext=unconfined_u:object_r:user_home_t:

[patch net-next] mlxsw: spectrum_router: Add support for IPv6 non-equal-cost multipath

2018-01-12 Thread Jiri Pirko
From: Ido Schimmel Since commit eb789980d0aa ("mlxsw: spectrum_router: Populate adjacency entries according to weights") the driver includes support for non-equal-cost multipath, but IPv4 nexthops were the only user. Now that the kernel supports weighted IPv6 nexthops, we can extend the driver t

[PATCH 4.4-stable 5/6] bpf: adjust insn_aux_data when patching insns

2018-01-12 Thread Jiri Slaby
From: Alexei Starovoitov commit 8041902dae5299c1f194ba42d14383f734631009 upstream. convert_ctx_accesses() replaces single bpf instruction with a set of instructions. Adjust corresponding insn_aux_data while patching. It's needed to make sure subsequent 'for(all insn)' loops have matching insn an

[PATCH 4.4-stable 3/6] bpf: move fixup_bpf_calls() function

2018-01-12 Thread Jiri Slaby
From: Alexei Starovoitov commit e245c5c6a5656e4d61aa7bb08e9694fd6e5b2b9d upstream. no functional change. move fixup_bpf_calls() to verifier.c it's being refactored in the next patch Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller Signed-off-by: Jiri

[PATCH 4.4-stable 4/6] bpf: refactor fixup_bpf_calls()

2018-01-12 Thread Jiri Slaby
From: Alexei Starovoitov commit 79741b3bdec01a8628368fbcfccc7d189ed606cb upstream. reduce indent and make it iterate over instructions similar to convert_ctx_accesses(). Also convert hard BUG_ON into soft verifier error. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-b

[PATCH 4.4-stable 6/6] bpf: prevent out-of-bounds speculation

2018-01-12 Thread Jiri Slaby
From: Alexei Starovoitov commit b2157399cc9898260d6031c5bfe45fe137c1fbe7 upstream. Under speculation, CPUs may mis-predict branches in bounds checks. Thus, memory accesses under a bounds check may be speculated even if the bounds check fails, providing a primitive for building a side channel. T

[PATCH 4.4-stable 0/6] bpf: prevent out-of-bounds speculation

2018-01-12 Thread Jiri Slaby
Hi, this is a backport of these patches which I did for our kernels: c237ee5eb33b bpf: add bpf_patch_insn_single helper 3df126f35f88 bpf: don't (ab)use instructions to store state e245c5c6a565 bpf: move fixup_bpf_calls() function 79741b3bdec0 bpf: refactor fixup_bpf_calls() 8041902dae52 bpf: adjus

[PATCH 4.4-stable 1/6] bpf: add bpf_patch_insn_single helper

2018-01-12 Thread Jiri Slaby
From: Daniel Borkmann commit c237ee5eb33bf19fe0591c04ff8db19da7323a83 upstream. Move the functionality to patch instructions out of the verifier code and into the core as the new bpf_patch_insn_single() helper will be needed later on for blinding as well. No changes in functionality. Signed-off

  1   2   3   >