Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH 0/3] Introduce LSM-hook for socketpair(2)
From: David Herrmann @ 2018-05-04 14:29 UTC (permalink / raw)
  To: James Morris
  Cc: Paul Moore, linux-kernel, Tom Gundersen, Stephen Smalley, selinux,
	LSM, Eric Paris, Serge E. Hallyn, David S. Miller, netdev
In-Reply-To: <alpine.LRH.2.21.1804260502030.12534@namei.org>

Hey

On Wed, Apr 25, 2018 at 9:02 PM, James Morris <jmorris@namei.org> wrote:
> On Wed, 25 Apr 2018, Paul Moore wrote:
>
>> On Wed, Apr 25, 2018 at 2:44 PM, James Morris <jmorris@namei.org> wrote:
>> > On Mon, 23 Apr 2018, David Herrmann wrote:
>> >> This patch series tries to close this gap and makes both behave the
>> >> same. A new LSM-hook is added which allows LSMs to cache the correct
>> >> peer information on newly created socket-pairs.
>> >
>> > Looks okay to me.
>> >
>> > Once it's respun with the Smack backend and maybe the hook name change,
>> > I'll merge this unless DaveM wants it to go in via his networking tree.
>>
>> Note my objection to the hook placement in patch 2/3; I think we
>> should move the hook out of the AF_UNIX layer and up into the socket
>> layer.
>
> I vote for this as it maintains the intended abstraction of the socket
> API.

Sounds good, I changed it. I will send v2 shortly.

Thanks
David

^ permalink raw reply

* Re: [PATCH net-next v2 00/15] ARM: sun8i: r40: Add Ethernet support
From: Maxime Ripard @ 2018-05-04 15:03 UTC (permalink / raw)
  To: David Miller
  Cc: wens, mturquette, sboyd, peppe.cavallaro, robh+dt, mark.rutland,
	broonie, linux-arm-kernel, linux-clk, devicetree, netdev,
	clabbe.montjoie, icenowy
In-Reply-To: <20180503.144042.266645949281979304.davem@davemloft.net>

[-- Attachment #1: Type: text/plain, Size: 2461 bytes --]

On Thu, May 03, 2018 at 02:40:42PM -0400, David Miller wrote:
> From: Maxime Ripard <maxime.ripard@bootlin.com>
> Date: Thu, 3 May 2018 15:12:57 +0200
> 
> > Hi Dave,
> > 
> > On Wed, May 02, 2018 at 11:06:17AM -0400, David Miller wrote:
> >> From: Chen-Yu Tsai <wens@csie.org>
> >> Date: Wed, 2 May 2018 00:33:45 +0800
> >> 
> >> > I should've mentioned that patches 3 ~ 10, and only these, should go
> >> > through net-next. sunxi will handle the remaining clk, device tree, and
> >> > soc driver patches.
> >> 
> >> Ok, I just noticed this.
> >> 
> >> Why don't you just post those patches separately as a series on their
> >> own then, in order to avoid confusion?
> >> 
> >> Then you can adjust the patch series header posting to explain the
> >> non-net-next changes, where they got merged, and what they provide
> >> in order to faciliate the net-next changes.
> > 
> > I now that we usually have some feedback from non-net maintainers that
> > they actually prefer seeing the full picture (and I also tend to
> > prefer that as well) and having all the patches relevant to enable a
> > particular feature, even if it means getting multiple maintainers
> > involved.
> > 
> > Just to make sure we understood you fully, do you want Chen-Yu to
> > resend his serie following your comments, or was that just a general
> > remark for next time?
> 
> Yeah, good questions.
> 
> I think it can be argued either way.  For review having the complete
> context is important.
> 
> But from a maintainer's standpoint, when there is any ambiguity
> whatsoever about what patches go into this tree or that, it is really
> frowned upon and is quite error prone.
> 
> Also, that header posting is _SO_ important.  It explains the series.
> But for these 'partial apply' situations the header posting refers
> to patches not in the series.
> 
> This looks terrible in the logs, when, as I do, the header posting
> text is added to a marge commit for the series.  People will read it
> and say "where are all of these other changes mentioned in the text?
> was this series misapplied?"
> 
> That's why, maybe after the review is successful, I want the actual
> patch series standalone with appropriately updated header posting
> text.

Ok, thanks for the explanation, that makes sense :)

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply

* [PATCH net] net: phy: sfp: fix the BR,min computation
From: Antoine Tenart @ 2018-05-04 15:10 UTC (permalink / raw)
  To: davem, linux
  Cc: Antoine Tenart, netdev, linux-kernel, thomas.petazzoni,
	maxime.chevallier, gregory.clement, miquel.raynal, nadavh,
	stefanc, ymarkman, mw

In an SFP EEPROM values can be read to get information about a given SFP
module. One of those is the bitrate, which can be determined using a
nominal bitrate in addition with min and max values (in %). The SFP code
currently compute both BR,min and BR,max values thanks to this nominal
and min,max values.

This patch fixes the BR,min computation as the min value should be
subtracted to the nominal one, not added.

Fixes: 9962acf7fb8c ("sfp: add support for 1000Base-PX and 1000Base-BX10")
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
---
 drivers/net/phy/sfp-bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
index 0381da78d228..fd6c23f69c2f 100644
--- a/drivers/net/phy/sfp-bus.c
+++ b/drivers/net/phy/sfp-bus.c
@@ -125,7 +125,7 @@ void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
 	if (id->base.br_nominal) {
 		if (id->base.br_nominal != 255) {
 			br_nom = id->base.br_nominal * 100;
-			br_min = br_nom + id->base.br_nominal * id->ext.br_min;
+			br_min = br_nom - id->base.br_nominal * id->ext.br_min;
 			br_max = br_nom + id->base.br_nominal * id->ext.br_max;
 		} else if (id->ext.br_max) {
 			br_nom = 250 * id->ext.br_max;
-- 
2.17.0

^ permalink raw reply related

* 3c59x patches and the removal of an unused function
From: Sebastian Andrzej Siewior @ 2018-05-04 15:17 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, tglx

The first patch removes an unused function. The goal of remaining three
patches is to get rid of the local_irq_save() usage in the driver which
benefits -RT.

Sebastian

^ permalink raw reply

* [PATCH 1/4] net: u64_stats_sync: Remove functions without user
From: Sebastian Andrzej Siewior @ 2018-05-04 15:17 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, tglx, Anna-Maria Gleixner, Eric Dumazet,
	Sebastian Andrzej Siewior
In-Reply-To: <20180504151749.6966-1-bigeasy@linutronix.de>

From: Anna-Maria Gleixner <anna-maria@linutronix.de>

Commit 67db3e4bfbc9 ("tcp: no longer hold ehash lock while calling
tcp_get_info()") removes the only users of u64_stats_update_end/begin_raw()
without removing the function in header file.

Remove no longer used functions.

Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 include/linux/u64_stats_sync.h | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/include/linux/u64_stats_sync.h b/include/linux/u64_stats_sync.h
index 07ee0f84a46c..a27604f99ed0 100644
--- a/include/linux/u64_stats_sync.h
+++ b/include/linux/u64_stats_sync.h
@@ -112,20 +112,6 @@ u64_stats_update_end_irqrestore(struct u64_stats_sync *syncp,
 #endif
 }
 
-static inline void u64_stats_update_begin_raw(struct u64_stats_sync *syncp)
-{
-#if BITS_PER_LONG==32 && defined(CONFIG_SMP)
-	raw_write_seqcount_begin(&syncp->seq);
-#endif
-}
-
-static inline void u64_stats_update_end_raw(struct u64_stats_sync *syncp)
-{
-#if BITS_PER_LONG==32 && defined(CONFIG_SMP)
-	raw_write_seqcount_end(&syncp->seq);
-#endif
-}
-
 static inline unsigned int __u64_stats_fetch_begin(const struct u64_stats_sync *syncp)
 {
 #if BITS_PER_LONG==32 && defined(CONFIG_SMP)
-- 
2.17.0

^ permalink raw reply related

* [PATCH 2/4] net: 3com: 3c59x: Move boomerang/vortex conditional into function
From: Sebastian Andrzej Siewior @ 2018-05-04 15:17 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, tglx, Anna-Maria Gleixner, Steffen Klassert,
	Sebastian Andrzej Siewior
In-Reply-To: <20180504151749.6966-1-bigeasy@linutronix.de>

From: Anna-Maria Gleixner <anna-maria@linutronix.de>

If vp->full_bus_master_tx is set, vp->full_bus_master_rx is set as well
(see vortex_probe1()). Therefore the conditionals for the decision if
boomerang or vortex ISR is executed have the same result. Instead of
repeating the explicit conditional execution of the boomerang/vortex ISR,
move it into an own function.

No functional change.

Cc: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/net/ethernet/3com/3c59x.c | 34 ++++++++++++++++++-------------
 1 file changed, 20 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c
index 36c8950dbd2d..0cfdb07f3e59 100644
--- a/drivers/net/ethernet/3com/3c59x.c
+++ b/drivers/net/ethernet/3com/3c59x.c
@@ -765,8 +765,9 @@ static netdev_tx_t boomerang_start_xmit(struct sk_buff *skb,
 					struct net_device *dev);
 static int vortex_rx(struct net_device *dev);
 static int boomerang_rx(struct net_device *dev);
-static irqreturn_t vortex_interrupt(int irq, void *dev_id);
-static irqreturn_t boomerang_interrupt(int irq, void *dev_id);
+static irqreturn_t vortex_boomerang_interrupt(int irq, void *dev_id);
+static irqreturn_t _vortex_interrupt(int irq, struct net_device *dev);
+static irqreturn_t _boomerang_interrupt(int irq, struct net_device *dev);
 static int vortex_close(struct net_device *dev);
 static void dump_tx_ring(struct net_device *dev);
 static void update_stats(void __iomem *ioaddr, struct net_device *dev);
@@ -838,10 +839,9 @@ MODULE_PARM_DESC(use_mmio, "3c59x: use memory-mapped PCI I/O resource (0-1)");
 #ifdef CONFIG_NET_POLL_CONTROLLER
 static void poll_vortex(struct net_device *dev)
 {
-	struct vortex_private *vp = netdev_priv(dev);
 	unsigned long flags;
 	local_irq_save(flags);
-	(vp->full_bus_master_rx ? boomerang_interrupt:vortex_interrupt)(dev->irq,dev);
+	vortex_boomerang_interrupt(dev->irq, dev);
 	local_irq_restore(flags);
 }
 #endif
@@ -1729,8 +1729,7 @@ vortex_open(struct net_device *dev)
 	dma_addr_t dma;
 
 	/* Use the now-standard shared IRQ implementation. */
-	if ((retval = request_irq(dev->irq, vp->full_bus_master_rx ?
-				boomerang_interrupt : vortex_interrupt, IRQF_SHARED, dev->name, dev))) {
+	if ((retval = request_irq(dev->irq, vortex_boomerang_interrupt, IRQF_SHARED, dev->name, dev))) {
 		pr_err("%s: Could not reserve IRQ %d\n", dev->name, dev->irq);
 		goto err;
 	}
@@ -1911,10 +1910,7 @@ static void vortex_tx_timeout(struct net_device *dev)
 			 */
 			unsigned long flags;
 			local_irq_save(flags);
-			if (vp->full_bus_master_tx)
-				boomerang_interrupt(dev->irq, dev);
-			else
-				vortex_interrupt(dev->irq, dev);
+			vortex_boomerang_interrupt(dev->irq, dev);
 			local_irq_restore(flags);
 		}
 	}
@@ -2267,9 +2263,8 @@ boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev)
  */
 
 static irqreturn_t
-vortex_interrupt(int irq, void *dev_id)
+_vortex_interrupt(int irq, struct net_device *dev)
 {
-	struct net_device *dev = dev_id;
 	struct vortex_private *vp = netdev_priv(dev);
 	void __iomem *ioaddr;
 	int status;
@@ -2386,9 +2381,8 @@ vortex_interrupt(int irq, void *dev_id)
  */
 
 static irqreturn_t
-boomerang_interrupt(int irq, void *dev_id)
+_boomerang_interrupt(int irq, struct net_device *dev)
 {
-	struct net_device *dev = dev_id;
 	struct vortex_private *vp = netdev_priv(dev);
 	void __iomem *ioaddr;
 	int status;
@@ -2526,6 +2520,18 @@ boomerang_interrupt(int irq, void *dev_id)
 	return IRQ_RETVAL(handled);
 }
 
+static irqreturn_t
+vortex_boomerang_interrupt(int irq, void *dev_id)
+{
+	struct net_device *dev = dev_id;
+	struct vortex_private *vp = netdev_priv(dev);
+
+	if (vp->full_bus_master_rx)
+		return _boomerang_interrupt(dev->irq, dev);
+	else
+		return _vortex_interrupt(dev->irq, dev);
+}
+
 static int vortex_rx(struct net_device *dev)
 {
 	struct vortex_private *vp = netdev_priv(dev);
-- 
2.17.0

^ permalink raw reply related

* [PATCH 3/4] net: 3com: 3c59x: Pull locking out of ISR
From: Sebastian Andrzej Siewior @ 2018-05-04 15:17 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, tglx, Anna-Maria Gleixner, Steffen Klassert,
	Sebastian Andrzej Siewior
In-Reply-To: <20180504151749.6966-1-bigeasy@linutronix.de>

From: Anna-Maria Gleixner <anna-maria@linutronix.de>

Locking is done in the same way in _vortex_interrupt() and
_boomerang_interrupt(). To prevent duplication, move the locking into the
calling vortex_boomerang_interrupt() function.

No functional change.

Cc: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/net/ethernet/3com/3c59x.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c
index 0cfdb07f3e59..fdafe25da153 100644
--- a/drivers/net/ethernet/3com/3c59x.c
+++ b/drivers/net/ethernet/3com/3c59x.c
@@ -2273,7 +2273,6 @@ _vortex_interrupt(int irq, struct net_device *dev)
 	unsigned int bytes_compl = 0, pkts_compl = 0;
 
 	ioaddr = vp->ioaddr;
-	spin_lock(&vp->lock);
 
 	status = ioread16(ioaddr + EL3_STATUS);
 
@@ -2371,7 +2370,6 @@ _vortex_interrupt(int irq, struct net_device *dev)
 		pr_debug("%s: exiting interrupt, status %4.4x.\n",
 			   dev->name, status);
 handler_exit:
-	spin_unlock(&vp->lock);
 	return IRQ_RETVAL(handled);
 }
 
@@ -2392,12 +2390,6 @@ _boomerang_interrupt(int irq, struct net_device *dev)
 
 	ioaddr = vp->ioaddr;
 
-
-	/*
-	 * It seems dopey to put the spinlock this early, but we could race against vortex_tx_timeout
-	 * and boomerang_start_xmit
-	 */
-	spin_lock(&vp->lock);
 	vp->handling_irq = 1;
 
 	status = ioread16(ioaddr + EL3_STATUS);
@@ -2516,7 +2508,6 @@ _boomerang_interrupt(int irq, struct net_device *dev)
 			   dev->name, status);
 handler_exit:
 	vp->handling_irq = 0;
-	spin_unlock(&vp->lock);
 	return IRQ_RETVAL(handled);
 }
 
@@ -2525,11 +2516,18 @@ vortex_boomerang_interrupt(int irq, void *dev_id)
 {
 	struct net_device *dev = dev_id;
 	struct vortex_private *vp = netdev_priv(dev);
+	irqreturn_t ret;
+
+	spin_lock(&vp->lock);
 
 	if (vp->full_bus_master_rx)
-		return _boomerang_interrupt(dev->irq, dev);
+		ret = _boomerang_interrupt(dev->irq, dev);
 	else
-		return _vortex_interrupt(dev->irq, dev);
+		ret = _vortex_interrupt(dev->irq, dev);
+
+	spin_unlock(&vp->lock);
+
+	return ret;
 }
 
 static int vortex_rx(struct net_device *dev)
-- 
2.17.0

^ permalink raw reply related

* [PATCH 4/4] net: 3com: 3c59x: irq save variant of ISR
From: Sebastian Andrzej Siewior @ 2018-05-04 15:17 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, tglx, Anna-Maria Gleixner, Steffen Klassert,
	Sebastian Andrzej Siewior
In-Reply-To: <20180504151749.6966-1-bigeasy@linutronix.de>

From: Anna-Maria Gleixner <anna-maria@linutronix.de>

When vortex_boomerang_interrupt() is invoked from vortex_tx_timeout() or
poll_vortex() interrupts must be disabled. This detaches the interrupt
disable logic from locking which requires patching for PREEMPT_RT.

The advantage of avoiding spin_lock_irqsave() in the interrupt handler is
minimal, but converting it removes all the extra code for callers which
come not from interrupt context.

Cc: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/net/ethernet/3com/3c59x.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c
index fdafe25da153..cabbe227bb98 100644
--- a/drivers/net/ethernet/3com/3c59x.c
+++ b/drivers/net/ethernet/3com/3c59x.c
@@ -839,10 +839,7 @@ MODULE_PARM_DESC(use_mmio, "3c59x: use memory-mapped PCI I/O resource (0-1)");
 #ifdef CONFIG_NET_POLL_CONTROLLER
 static void poll_vortex(struct net_device *dev)
 {
-	unsigned long flags;
-	local_irq_save(flags);
 	vortex_boomerang_interrupt(dev->irq, dev);
-	local_irq_restore(flags);
 }
 #endif
 
@@ -1904,15 +1901,7 @@ static void vortex_tx_timeout(struct net_device *dev)
 		pr_err("%s: Interrupt posted but not delivered --"
 			   " IRQ blocked by another device?\n", dev->name);
 		/* Bad idea here.. but we might as well handle a few events. */
-		{
-			/*
-			 * Block interrupts because vortex_interrupt does a bare spin_lock()
-			 */
-			unsigned long flags;
-			local_irq_save(flags);
-			vortex_boomerang_interrupt(dev->irq, dev);
-			local_irq_restore(flags);
-		}
+		vortex_boomerang_interrupt(dev->irq, dev);
 	}
 
 	if (vortex_debug > 0)
@@ -2516,16 +2505,17 @@ vortex_boomerang_interrupt(int irq, void *dev_id)
 {
 	struct net_device *dev = dev_id;
 	struct vortex_private *vp = netdev_priv(dev);
+	unsigned long flags;
 	irqreturn_t ret;
 
-	spin_lock(&vp->lock);
+	spin_lock_irqsave(&vp->lock, flags);
 
 	if (vp->full_bus_master_rx)
 		ret = _boomerang_interrupt(dev->irq, dev);
 	else
 		ret = _vortex_interrupt(dev->irq, dev);
 
-	spin_unlock(&vp->lock);
+	spin_unlock_irqrestore(&vp->lock, flags);
 
 	return ret;
 }
-- 
2.17.0

^ permalink raw reply related

* [PATCH net-next] net: phy: sfp: handle cases where neither BR,min nor BR,max is given
From: Antoine Tenart @ 2018-05-04 15:21 UTC (permalink / raw)
  To: davem, linux
  Cc: Antoine Tenart, netdev, linux-kernel, thomas.petazzoni,
	maxime.chevallier, gregory.clement, miquel.raynal, nadavh,
	stefanc, ymarkman, mw

When computing the bitrate using values read from an SFP module EEPROM,
we use the nominal BR plus BR,min and BR,max to determine the
boundaries. But in some cases BR,min and BR,max aren't provided, which
led the SFP code to end up having the nominal value for both the minimum
and maximum bitrate values. When using a passive cable, the nominal
value should be used as the maximum one, and there is no minimum one
so we should use 0.

Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
---

Hi Russell,

I'm not completely sure about this patch as this case is not really
specified in the specification. But the issue is there, and I've discuss
this with others. It seemed logical (at least to us :)) to use the
BR,nominal values as br_max and 0 as br_min when using a passive cable
which only provides BR,nominal as this would be the highest rate at
which the cable could work. And because it's passive, there should be no
issues using it at a lower rate.

I've tested this with one passive cable which only reports its
BR,nominal (which was 10300) while it could be used when using 1000baseX
or 2500baseX modes.

Thanks,
Antoine

 drivers/net/phy/sfp-bus.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
index fd6c23f69c2f..d437f4f5ed52 100644
--- a/drivers/net/phy/sfp-bus.c
+++ b/drivers/net/phy/sfp-bus.c
@@ -132,6 +132,13 @@ void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
 			br_max = br_nom + br_nom * id->ext.br_min / 100;
 			br_min = br_nom - br_nom * id->ext.br_min / 100;
 		}
+
+		/* When using passive cables, in case neither BR,min nor BR,max
+		 * are specified, set br_min to 0 as the nominal value is then
+		 * used as the maximum.
+		 */
+		if (br_min == br_max && id->base.sfp_ct_passive)
+			br_min = 0;
 	}
 
 	/* Set ethtool support from the compliance fields. */
-- 
2.17.0

^ permalink raw reply related

* (unknown), 
From: Mark Henry @ 2018-05-04 15:21 UTC (permalink / raw)


Hello
My name is Gen Henry Mark, I am US military officer,i will like to get
acquainted with you, I read your profile and I really wish to indicate
my interest, please I'll be glad if you get back to me so that i can
contact you and tell you more about my self ,i wish to hear from you
soon.
Best regards,
Gen Henry Mark

^ permalink raw reply

* Re: [PATCH 2/4] net: 3com: 3c59x: Move boomerang/vortex conditional into function
From: Sebastian Andrzej Siewior @ 2018-05-04 15:22 UTC (permalink / raw)
  To: Steffen Klassert; +Cc: netdev, David S. Miller, tglx, Anna-Maria Gleixner
In-Reply-To: <20180504151749.6966-3-bigeasy@linutronix.de>

On 2018-05-04 17:17:47 [+0200], To netdev@vger.kernel.org wrote:
> From: Anna-Maria Gleixner <anna-maria@linutronix.de>
> 
> If vp->full_bus_master_tx is set, vp->full_bus_master_rx is set as well
> (see vortex_probe1()). Therefore the conditionals for the decision if
> boomerang or vortex ISR is executed have the same result. Instead of
> repeating the explicit conditional execution of the boomerang/vortex ISR,
> move it into an own function.
> 
> No functional change.
> 
> Cc: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>

Steffen, this email address is still listed in the MAINTAINERS file for
the driver and rejects emails.

Sebastian

^ permalink raw reply

* Re: [PATCH bpf-next] bpf, xskmap: fix crash in xsk_map_alloc error path handling
From: David Miller @ 2018-05-04 15:39 UTC (permalink / raw)
  To: daniel; +Cc: alexei.starovoitov, netdev, bjorn.topel
In-Reply-To: <20180504142753.10621-1-daniel@iogearbox.net>

From: Daniel Borkmann <daniel@iogearbox.net>
Date: Fri,  4 May 2018 16:27:53 +0200

> If bpf_map_precharge_memlock() did not fail, then we set err to zero.
> However, any subsequent failure from either alloc_percpu() or the
> bpf_map_area_alloc() will return ERR_PTR(0) which in find_and_alloc_map()
> will cause NULL pointer deref.
> 
> In devmap we have the convention that we return -EINVAL on page count
> overflow, so keep the same logic here and just set err to -ENOMEM
> after successful bpf_map_precharge_memlock().
> 
> Fixes: fbfc504a24f5 ("bpf: introduce new bpf AF_XDP map type BPF_MAP_TYPE_XSKMAP")
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply

* Re: [PATCH net-next] net/mlx4_en: optimizes get_fixed_ipv6_csum()
From: David Miller @ 2018-05-04 15:59 UTC (permalink / raw)
  To: eric.dumazet; +Cc: tariqt, saeedm, edumazet, netdev
In-Reply-To: <1a58a62c-8c5a-7c08-6d76-0030e45bda25@gmail.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 3 May 2018 19:10:29 -0700

> 
> 
> On 05/03/2018 06:52 PM, David Miller wrote:
>> From: Eric Dumazet <eric.dumazet@gmail.com>
>> Date: Thu, 3 May 2018 17:05:06 -0700
>> 
>>>
>>>
>>> On 05/02/2018 07:18 AM, Tariq Toukan wrote:
>>>>
>>>>
>>>> On 27/04/2018 1:56 AM, Saeed Mahameed wrote:
>>>
>>>>> LGTM,
>>>>>
>>>>> Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
>>>>>
>>>>
>>>> Acked-by: Tariq Toukan <tariqt@mellanox.com>
>>>>
>>>> Thanks Eric.
>>>
>>> Thanks guys. 
>>>
>>> I see this patch  ( http://patchwork.ozlabs.org/patch/901336/ ) in
>>> a state I do not know : "Awaiting Upstream"
>> 
>> THat means I expect to see this change from the upstream
>> maintainer, which in this case is Tariq.
>> 
> 
> I see, but it seems Tariq does not know that, otherwise he would
> not have sent an "Acked-by:"
> 
> I guess this will need an extra round-trip ...

No need to extra round-trip, I applied it directly ;)

^ permalink raw reply

* Re: [PATCH net-next] net/mlx4_en: optimizes get_fixed_ipv6_csum()
From: Eric Dumazet @ 2018-05-04 16:10 UTC (permalink / raw)
  To: David Miller, eric.dumazet; +Cc: tariqt, saeedm, edumazet, netdev
In-Reply-To: <20180504.115945.1508377407280334775.davem@davemloft.net>



On 05/04/2018 08:59 AM, David Miller wrote:

> 
> No need to extra round-trip, I applied it directly ;)
> 

Very nice, thanks David !

^ permalink raw reply

* Re: [PATCH v2 1/2] net: phy: broadcom: add support for BCM89610 PHY
From: David Miller @ 2018-05-04 16:46 UTC (permalink / raw)
  To: vbhadram; +Cc: andrew, f.fainelli, netdev, linux-tegra
In-Reply-To: <1525274038-13217-1-git-send-email-vbhadram@nvidia.com>

From: Bhadram Varka <vbhadram@nvidia.com>
Date: Wed, 2 May 2018 20:43:58 +0530

> It adds support for BCM89610 (Single-Port 10/100/1000BASE-T)
> transceiver which is used in P3310 Tegra186 platform.
> 
> Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>

Applied, thank you.

^ permalink raw reply

* [PATCH] selftests: net: use TEST_PROGS_EXTENDED
From: Anders Roxell @ 2018-05-04 16:47 UTC (permalink / raw)
  To: davem, shuah; +Cc: netdev, linux-kselftest, linux-kernel, Anders Roxell

When a script file that isn't generated uses the variable
TEST_GEN_PROGS_EXTENDED and a 'make -C tools/testing/selftests clean' is
performed the script file gets removed and git shows the file as
deleted. For script files that isn't generated TEST_PROGS_EXTENDED
should be used.

Fixes: 9faedd643fd9 ("selftests: net: add in_netns.sh TEST_GEN_PROGS_EXTENDED")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 tools/testing/selftests/net/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
index 44895de1a0c4..eee47a4bc675 100644
--- a/tools/testing/selftests/net/Makefile
+++ b/tools/testing/selftests/net/Makefile
@@ -7,7 +7,7 @@ CFLAGS += -I../../../../usr/include/
 TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh rtnetlink.sh
 TEST_PROGS += fib_tests.sh fib-onlink-tests.sh pmtu.sh udpgso.sh
 TEST_PROGS += udpgso_bench.sh
-TEST_GEN_PROGS_EXTENDED := in_netns.sh
+TEST_PROGS_EXTENDED := in_netns.sh
 TEST_GEN_FILES =  socket
 TEST_GEN_FILES += psock_fanout psock_tpacket msg_zerocopy
 TEST_GEN_FILES += tcp_mmap tcp_inq
-- 
2.11.0

^ permalink raw reply related

* Re: [PATCH v2 net-next] microchip_t1: Add driver for Microchip LAN87XX T1 PHYs
From: David Miller @ 2018-05-04 16:47 UTC (permalink / raw)
  To: Nisar.Sayed; +Cc: UNGLinuxDriver, netdev
In-Reply-To: <20180502153917.6916-1-Nisar.Sayed@microchip.com>

From: Nisar Sayed <Nisar.Sayed@microchip.com>
Date: Wed, 2 May 2018 21:09:17 +0530

> Add driver for Microchip LAN87XX T1 PHYs
> 
> This patch support driver for Microchp T1 PHYs.
> There will be followup patches to this driver to support T1 PHY
> features such as cable diagnostics, signal quality indicator(SQI),
> sleep and wakeup (TC10) support.
> 
> Signed-off-by: Nisar Sayed <Nisar.Sayed@microchip.com>
> ---
> v0 - v1:
> 	* Rename microchipT1phy.c file to microchip_t1.c
> 	* Remove microchipT1phy.h include file
> 	* Add SPDX license identifier
> 	* Remove remove probe and remove functions
> 	* Update LAN87XX_INTERRUPT_MASK write as suggested
> v1 - v2:
> 	* Update comments with C++ style
> 	* Update suggestion for naming and style

Applied, thanks.

^ permalink raw reply

* Re: [PATCH v2 net-next] net: dsa: mv88e6xxx: 88E6141/6341 SERDES support
From: David Miller @ 2018-05-04 16:49 UTC (permalink / raw)
  To: marek.behun; +Cc: netdev, andrew, gregkh, vivien.didelot, arkadis
In-Reply-To: <20180503142723.26244-1-marek.behun@nic.cz>

From: Marek Behún <marek.behun@nic.cz>
Date: Thu,  3 May 2018 16:27:23 +0200

> The 88E6141/6341 switches (also known as Topaz) have 1 SGMII lane,
> which can be configured the same way as the SERDES lane on 88E6390.
> 
> Signed-off-by: Marek Behun <marek.behun@nic.cz>

This patch doesn't apply cleanly to net-next, please respin.

Thank you.

^ permalink raw reply

* Re: [PATCH net] openvswitch: Don't swap table in nlattr_set() after OVS_ATTR_NESTED is found
From: David Miller @ 2018-05-04 16:51 UTC (permalink / raw)
  To: sbrivio-H+wXaHxf7aLQT0dZR+AlfA
  Cc: dev-yBygre7rU0TnMu66kgdUjQ, sd-y1jBWg8GRStKuXlAQpz2QA,
	netdev-u79uwXL29TY76Z2rM5mHXA, jesse-l0M0P4e3n4LQT0dZR+AlfA,
	liuhangbin-Re5JQEeQqe8AvxtiuMwx3w
In-Reply-To: <44f4cc7dd6ceb5aac6045e59ff49dce70dd53e74.1525363636.git.sbrivio-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

From: Stefano Brivio <sbrivio-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Date: Thu,  3 May 2018 18:13:25 +0200

> If an OVS_ATTR_NESTED attribute type is found while walking
> through netlink attributes, we call nlattr_set() recursively
> passing the length table for the following nested attributes, if
> different from the current one.
> 
> However, once we're done with those sub-nested attributes, we
> should continue walking through attributes using the current
> table, instead of using the one related to the sub-nested
> attributes.
> 
> For example, given this sequence:
> 
> 1  OVS_KEY_ATTR_PRIORITY
> 2  OVS_KEY_ATTR_TUNNEL
> 3	OVS_TUNNEL_KEY_ATTR_ID
> 4	OVS_TUNNEL_KEY_ATTR_IPV4_SRC
> 5	OVS_TUNNEL_KEY_ATTR_IPV4_DST
> 6	OVS_TUNNEL_KEY_ATTR_TTL
> 7	OVS_TUNNEL_KEY_ATTR_TP_SRC
> 8	OVS_TUNNEL_KEY_ATTR_TP_DST
> 9  OVS_KEY_ATTR_IN_PORT
> 10 OVS_KEY_ATTR_SKB_MARK
> 11 OVS_KEY_ATTR_MPLS
> 
> we switch to the 'ovs_tunnel_key_lens' table on attribute #3,
> and we don't switch back to 'ovs_key_lens' while setting
> attributes #9 to #11 in the sequence. As OVS_KEY_ATTR_MPLS
> evaluates to 21, and the array size of 'ovs_tunnel_key_lens' is
> 15, we also get this kind of KASan splat while accessing the
> wrong table:
 ...
> Reported-by: Hangbin Liu <liuhangbin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Fixes: 982b52700482 ("openvswitch: Fix mask generation for nested attributes.")
> Signed-off-by: Stefano Brivio <sbrivio-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Reviewed-by: Sabrina Dubroca <sd-y1jBWg8GRStKuXlAQpz2QA@public.gmane.org>

Looks good, applied and queued up for -stable.

Thanks.

^ permalink raw reply

* Re: [PATCH net-next] net: hns3: Add support of hardware rx-vlan-offload to HNS3 VF driver
From: David Miller @ 2018-05-04 16:53 UTC (permalink / raw)
  To: salil.mehta
  Cc: yisen.zhuang, lipeng321, mehta.salil, netdev, linux-kernel,
	linuxarm, linyunsheng
In-Reply-To: <20180503162811.12440-1-salil.mehta@huawei.com>

From: Salil Mehta <salil.mehta@huawei.com>
Date: Thu, 3 May 2018 17:28:11 +0100

> From: Yunsheng Lin <linyunsheng@huawei.com>
> 
> This patch adds support of hardware rx-vlan-offload to VF driver.
> VF uses mailbox to convey PF to configure the hardware.
> 
> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
> Signed-off-by: Peng Li <lipeng321@huawei.com>
> Signed-off-by: Salil Mehta <salil.mehta@huawei.com>

Applied.

^ permalink raw reply

* Re: [PATCH] atm: zatm: Fix potential Spectre v1
From: David Miller @ 2018-05-04 16:54 UTC (permalink / raw)
  To: gustavo; +Cc: 3chas3, linux-atm-general, netdev, linux-kernel
In-Reply-To: <20180503181712.GA7443@embeddedor.com>

From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Date: Thu, 3 May 2018 13:17:12 -0500

> pool can be indirectly controlled by user-space, hence leading to
> a potential exploitation of the Spectre variant 1 vulnerability.
> 
> This issue was detected with the help of Smatch:
> 
> drivers/atm/zatm.c:1462 zatm_ioctl() warn: potential spectre issue
> 'zatm_dev->pool_info' (local cap)
> 
> Fix this by sanitizing pool before using it to index
> zatm_dev->pool_info
> 
> Notice that given that speculation windows are large, the policy is
> to kill the speculation on the first load and not worry if it can be
> completed with a dependent load/store [1].
> 
> [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Applied and queued up for -stable.

^ permalink raw reply

* Re: [PATCH] net: atm: Fix potential Spectre v1
From: David Miller @ 2018-05-04 16:54 UTC (permalink / raw)
  To: gustavo; +Cc: netdev, linux-kernel
In-Reply-To: <20180503184558.GA9705@embeddedor.com>

From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Date: Thu, 3 May 2018 13:45:58 -0500

> ioc_data.dev_num can be controlled by user-space, hence leading to
> a potential exploitation of the Spectre variant 1 vulnerability.
> 
> This issue was detected with the help of Smatch:
> net/atm/lec.c:702 lec_vcc_attach() warn: potential spectre issue
> 'dev_lec'
> 
> Fix this by sanitizing ioc_data.dev_num before using it to index
> dev_lec. Also, notice that there is another instance in which array
> dev_lec is being indexed using ioc_data.dev_num at line 705:
> lec_vcc_added(netdev_priv(dev_lec[ioc_data.dev_num]),
> 
> Notice that given that speculation windows are large, the policy is
> to kill the speculation on the first load and not worry if it can be
> completed with a dependent load/store [1].
> 
> [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: [PATCH net] nsh: fix infinite loop
From: David Miller @ 2018-05-04 16:55 UTC (permalink / raw)
  To: edumazet; +Cc: netdev, eric.dumazet, jbenc
In-Reply-To: <20180503203754.60611-1-edumazet@google.com>

From: Eric Dumazet <edumazet@google.com>
Date: Thu,  3 May 2018 13:37:54 -0700

> syzbot caught an infinite recursion in nsh_gso_segment().
> 
> Problem here is that we need to make sure the NSH header is of
> reasonable length.
 ...
> Fixes: c411ed854584 ("nsh: add GSO support")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Jiri Benc <jbenc@redhat.com>
> Reported-by: syzbot <syzkaller@googlegroups.com>

Applied and queued up for -stable, thanks Eric.

^ permalink raw reply

* Re: [PATCH] net: ethernet: sun: niu set correct packet size in skb
From: David Miller @ 2018-05-04 16:56 UTC (permalink / raw)
  To: rob; +Cc: netdev
In-Reply-To: <60bfe424f5c1427633fc67443d9c538c@taglang.io>

From: Rob Taglang <rob@taglang.io>
Date: Thu, 03 May 2018 17:13:06 -0400

> Currently, skb->len and skb->data_len are set to the page size, not
> the packet size. This causes the frame check sequence to not be
> located at the "end" of the packet resulting in ethernet frame check
> errors. The driver does work currently, but stricter kernel facing
> networking solutions like OpenVSwitch will drop these packets as
> invalid.
> 
> These changes set the packet size correctly so that these errors no
> longer occur. The length does not include the frame check sequence, so
> that subtraction was removed.
> 
> Tested on Oracle/SUN Multithreaded 10-Gigabit Ethernet Network
> Controller [108e:abcd] and validated in wireshark.
> 
> Signed-off-by: Rob Taglang <rob@taglang.io>
> ---
>  drivers/net/ethernet/sun/niu.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/sun/niu.c
> b/drivers/net/ethernet/sun/niu.c
> index f081de4..88c1247 100644
> --- a/drivers/net/ethernet/sun/niu.c
> +++ b/drivers/net/ethernet/sun/niu.c
> @@ -3443,7 +3443,7 @@ static int niu_process_rx_pkt(struct napi_struct
> *napi, struct niu *np,

Still corrupted.  Your email client is chopping up long lines.

Please, send a test patch to yourself and make sure you can apply the
patch that arrives in that test email.

Thank you.

^ permalink raw reply

* Re: [PATCH net] tg3: Fix vunmap() BUG_ON() triggered from tg3_free_consistent().
From: David Miller @ 2018-05-04 16:57 UTC (permalink / raw)
  To: michael.chan; +Cc: netdev, siva.kallam, zumeng.chen
In-Reply-To: <1525392267-5129-1-git-send-email-michael.chan@broadcom.com>

From: Michael Chan <michael.chan@broadcom.com>
Date: Thu,  3 May 2018 20:04:27 -0400

> tg3_free_consistent() calls dma_free_coherent() to free tp->hw_stats
> under spinlock and can trigger BUG_ON() in vunmap() because vunmap()
> may sleep.  Fix it by removing the spinlock and relying on the
> TG3_FLAG_INIT_COMPLETE flag to prevent race conditions between
> tg3_get_stats64() and tg3_free_consistent().  TG3_FLAG_INIT_COMPLETE
> is always cleared under tp->lock before tg3_free_consistent()
> and therefore tg3_get_stats64() can safely access tp->hw_stats
> under tp->lock if TG3_FLAG_INIT_COMPLETE is set.
> 
> Fixes: f5992b72ebe0 ("tg3: Fix race condition in tg3_get_stats64().")
> Reported-by: Zumeng Chen <zumeng.chen@gmail.com>
> Signed-off-by: Michael Chan <michael.chan@broadcom.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox