* [PATCH 46/47] staging: irda: remove bfin_sir driver
From: Arnd Bergmann @ 2018-03-14 15:35 UTC (permalink / raw)
To: linux-kernel
Cc: devel, Samuel Ortiz, Arnd Bergmann, Greg Kroah-Hartman, netdev,
David S. Miller
In-Reply-To: <20180314153603.3127932-1-arnd@arndb.de>
The blackfin architecture is getting removed, so this
driver is now obsolete.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/staging/irda/drivers/Kconfig | 45 --
drivers/staging/irda/drivers/Makefile | 1 -
drivers/staging/irda/drivers/bfin_sir.c | 819 --------------------------------
drivers/staging/irda/drivers/bfin_sir.h | 93 ----
4 files changed, 958 deletions(-)
delete mode 100644 drivers/staging/irda/drivers/bfin_sir.c
delete mode 100644 drivers/staging/irda/drivers/bfin_sir.h
diff --git a/drivers/staging/irda/drivers/Kconfig b/drivers/staging/irda/drivers/Kconfig
index e070e1222733..71ac76c5295a 100644
--- a/drivers/staging/irda/drivers/Kconfig
+++ b/drivers/staging/irda/drivers/Kconfig
@@ -17,51 +17,6 @@ config IRTTY_SIR
If unsure, say Y.
-config BFIN_SIR
- tristate "Blackfin SIR on UART"
- depends on BLACKFIN && IRDA
- default n
- help
- Say Y here if your want to enable SIR function on Blackfin UART
- devices.
-
- To activate this driver you can start irattach like:
- "irattach irda0 -s"
-
- Saying M, it will be built as a module named bfin_sir.
-
- Note that you need to turn off one of the serial drivers for SIR
- to use that UART.
-
-config BFIN_SIR0
- bool "Blackfin SIR on UART0"
- depends on BFIN_SIR && !SERIAL_BFIN_UART0
-
-config BFIN_SIR1
- bool "Blackfin SIR on UART1"
- depends on BFIN_SIR && !SERIAL_BFIN_UART1 && (!BF531 && !BF532 && !BF533 && !BF561)
-
-config BFIN_SIR2
- bool "Blackfin SIR on UART2"
- depends on BFIN_SIR && !SERIAL_BFIN_UART2 && (BF54x || BF538 || BF539)
-
-config BFIN_SIR3
- bool "Blackfin SIR on UART3"
- depends on BFIN_SIR && !SERIAL_BFIN_UART3 && (BF54x)
-
-choice
- prompt "SIR Mode"
- depends on BFIN_SIR
- default SIR_BFIN_DMA
-
-config SIR_BFIN_DMA
- bool "DMA mode"
- depends on !DMA_UNCACHED_NONE
-
-config SIR_BFIN_PIO
- bool "PIO mode"
-endchoice
-
config SH_SIR
tristate "SuperH SIR on UART"
depends on IRDA && SUPERH && \
diff --git a/drivers/staging/irda/drivers/Makefile b/drivers/staging/irda/drivers/Makefile
index e2901b135528..d5307ed2d9b4 100644
--- a/drivers/staging/irda/drivers/Makefile
+++ b/drivers/staging/irda/drivers/Makefile
@@ -23,7 +23,6 @@ obj-$(CONFIG_MCS_FIR) += mcs7780.o
obj-$(CONFIG_AU1000_FIR) += au1k_ir.o
# SIR drivers
obj-$(CONFIG_IRTTY_SIR) += irtty-sir.o sir-dev.o
-obj-$(CONFIG_BFIN_SIR) += bfin_sir.o
obj-$(CONFIG_SH_SIR) += sh_sir.o
# dongle drivers for SIR drivers
obj-$(CONFIG_ESI_DONGLE) += esi-sir.o
diff --git a/drivers/staging/irda/drivers/bfin_sir.c b/drivers/staging/irda/drivers/bfin_sir.c
deleted file mode 100644
index 59e409b68349..000000000000
diff --git a/drivers/staging/irda/drivers/bfin_sir.h b/drivers/staging/irda/drivers/bfin_sir.h
deleted file mode 100644
index d47cf14bb4a5..000000000000
--
2.9.0
^ permalink raw reply related
* [PATCH 30/47] can: remove bfin_can driver
From: Arnd Bergmann @ 2018-03-14 15:35 UTC (permalink / raw)
To: linux-kernel
Cc: Arnd Bergmann, Wolfgang Grandegger, Marc Kleine-Budde, linux-can,
netdev
In-Reply-To: <20180314153603.3127932-1-arnd@arndb.de>
The blackfin architecture is getting removed, so this one is now obsolete.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/can/Kconfig | 9 -
drivers/net/can/Makefile | 1 -
drivers/net/can/bfin_can.c | 784 ---------------------------------------------
3 files changed, 794 deletions(-)
delete mode 100644 drivers/net/can/bfin_can.c
diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig
index ac4ff394bc56..2cb75988b328 100644
--- a/drivers/net/can/Kconfig
+++ b/drivers/net/can/Kconfig
@@ -88,15 +88,6 @@ config CAN_AT91
This is a driver for the SoC CAN controller in Atmel's AT91SAM9263
and AT91SAM9X5 processors.
-config CAN_BFIN
- depends on BF534 || BF536 || BF537 || BF538 || BF539 || BF54x
- tristate "Analog Devices Blackfin on-chip CAN"
- ---help---
- Driver for the Analog Devices Blackfin on-chip CAN controllers
-
- To compile this driver as a module, choose M here: the
- module will be called bfin_can.
-
config CAN_FLEXCAN
tristate "Support for Freescale FLEXCAN based chips"
depends on ARM || PPC
diff --git a/drivers/net/can/Makefile b/drivers/net/can/Makefile
index 02b8ed794564..44922bf29b6a 100644
--- a/drivers/net/can/Makefile
+++ b/drivers/net/can/Makefile
@@ -19,7 +19,6 @@ obj-y += usb/
obj-y += softing/
obj-$(CONFIG_CAN_AT91) += at91_can.o
-obj-$(CONFIG_CAN_BFIN) += bfin_can.o
obj-$(CONFIG_CAN_CC770) += cc770/
obj-$(CONFIG_CAN_C_CAN) += c_can/
obj-$(CONFIG_CAN_FLEXCAN) += flexcan.o
diff --git a/drivers/net/can/bfin_can.c b/drivers/net/can/bfin_can.c
deleted file mode 100644
index 1deb8ff90a89..000000000000
--
2.9.0
^ permalink raw reply related
* [PATCH 06/47] net: smsc: remove m32r specific smc91x configuration
From: Arnd Bergmann @ 2018-03-14 15:35 UTC (permalink / raw)
To: linux-kernel
Cc: Arnd Bergmann, Nicolas Pitre, Finn Thain, David S. Miller, netdev
In-Reply-To: <20180314153603.3127932-1-arnd@arndb.de>
The m32r architecture is getting removed, so this part can be
cleaned up as well.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/ethernet/smsc/Kconfig | 4 ++--
drivers/net/ethernet/smsc/smc91x.h | 26 --------------------------
2 files changed, 2 insertions(+), 28 deletions(-)
diff --git a/drivers/net/ethernet/smsc/Kconfig b/drivers/net/ethernet/smsc/Kconfig
index 4c2f612e4414..1c2b6663f7ce 100644
--- a/drivers/net/ethernet/smsc/Kconfig
+++ b/drivers/net/ethernet/smsc/Kconfig
@@ -37,8 +37,8 @@ config SMC91X
select CRC32
select MII
depends on !OF || GPIOLIB
- depends on ARM || ARM64 || ATARI_ETHERNAT || BLACKFIN || COLDFIRE || \
- M32R || MIPS || MN10300 || NIOS2 || SUPERH || XTENSA || H8300
+ depends on ARM || ARM64 || ATARI_ETHERNAT || COLDFIRE || \
+ MIPS || NIOS2 || SUPERH || XTENSA || H8300
---help---
This is a driver for SMC's 91x series of Ethernet chipsets,
including the SMC91C94 and the SMC91C111. Say Y if you want it
diff --git a/drivers/net/ethernet/smsc/smc91x.h b/drivers/net/ethernet/smsc/smc91x.h
index 08b17adf0a65..b337ee97e0c0 100644
--- a/drivers/net/ethernet/smsc/smc91x.h
+++ b/drivers/net/ethernet/smsc/smc91x.h
@@ -144,32 +144,6 @@ static inline void _SMC_outw_align4(u16 val, void __iomem *ioaddr, int reg,
#define SMC_IRQ_FLAGS (0)
-#elif defined(CONFIG_M32R)
-
-#define SMC_CAN_USE_8BIT 0
-#define SMC_CAN_USE_16BIT 1
-#define SMC_CAN_USE_32BIT 0
-
-#define SMC_inb(a, r) inb(((u32)a) + (r))
-#define SMC_inw(a, r) inw(((u32)a) + (r))
-#define SMC_outb(v, a, r) outb(v, ((u32)a) + (r))
-#define SMC_outw(lp, v, a, r) outw(v, ((u32)a) + (r))
-#define SMC_insw(a, r, p, l) insw(((u32)a) + (r), p, l)
-#define SMC_outsw(a, r, p, l) outsw(((u32)a) + (r), p, l)
-
-#define SMC_IRQ_FLAGS (0)
-
-#define RPC_LSA_DEFAULT RPC_LED_TX_RX
-#define RPC_LSB_DEFAULT RPC_LED_100_10
-
-#elif defined(CONFIG_MN10300)
-
-/*
- * MN10300/AM33 configuration
- */
-
-#include <unit/smc91111.h>
-
#elif defined(CONFIG_ATARI)
#define SMC_CAN_USE_8BIT 1
--
2.9.0
^ permalink raw reply related
* [PATCH 05/47] net: remove cris etrax ethernet driver
From: Arnd Bergmann @ 2018-03-14 15:35 UTC (permalink / raw)
To: linux-kernel
Cc: Arnd Bergmann, David S. Miller, Greg Kroah-Hartman,
Florian Fainelli, Quentin Monnet, Daniel Borkmann, Jakub Kicinski,
Amir Levy, Gerard Garcia, netdev
In-Reply-To: <20180314153603.3127932-1-arnd@arndb.de>
The cris architecture is getting removed, so we don't need the
ethernet driver any more either.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/Makefile | 1 -
drivers/net/cris/Makefile | 1 -
drivers/net/cris/eth_v10.c | 1742 --------------------------------------------
3 files changed, 1744 deletions(-)
delete mode 100644 drivers/net/cris/Makefile
delete mode 100644 drivers/net/cris/eth_v10.c
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 04c3b747812c..91e67e375dd4 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -40,7 +40,6 @@ obj-$(CONFIG_ARCNET) += arcnet/
obj-$(CONFIG_DEV_APPLETALK) += appletalk/
obj-$(CONFIG_CAIF) += caif/
obj-$(CONFIG_CAN) += can/
-obj-$(CONFIG_ETRAX_ETHERNET) += cris/
obj-$(CONFIG_NET_DSA) += dsa/
obj-$(CONFIG_ETHERNET) += ethernet/
obj-$(CONFIG_FDDI) += fddi/
diff --git a/drivers/net/cris/Makefile b/drivers/net/cris/Makefile
deleted file mode 100644
index b4e8932227b6..000000000000
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c
deleted file mode 100644
index 8b1a859f5140..000000000000
--
2.9.0
^ permalink raw reply related
* [PATCH 04/47] net: 8390: remove m32r specific bits
From: Arnd Bergmann @ 2018-03-14 15:35 UTC (permalink / raw)
To: linux-kernel
Cc: Arnd Bergmann, David S. Miller, Randy Dunlap, David Howells,
Finn Thain, netdev
In-Reply-To: <20180314153603.3127932-1-arnd@arndb.de>
The m32r architecture is getting removed, so we can kill off the
architecture specific hacks in this driver.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/ethernet/8390/Kconfig | 3 +--
drivers/net/ethernet/8390/ne.c | 23 ++---------------------
2 files changed, 3 insertions(+), 23 deletions(-)
diff --git a/drivers/net/ethernet/8390/Kconfig b/drivers/net/ethernet/8390/Kconfig
index fdc673484add..9fee7c83ef9f 100644
--- a/drivers/net/ethernet/8390/Kconfig
+++ b/drivers/net/ethernet/8390/Kconfig
@@ -87,8 +87,7 @@ config MCF8390
config NE2000
tristate "NE2000/NE1000 support"
- depends on (ISA || (Q40 && m) || M32R || MACH_TX49XX || \
- ATARI_ETHERNEC)
+ depends on (ISA || (Q40 && m) || MACH_TX49XX || ATARI_ETHERNEC)
select CRC32
---help---
If you have a network (Ethernet) card of this type, say Y here.
diff --git a/drivers/net/ethernet/8390/ne.c b/drivers/net/ethernet/8390/ne.c
index 4cdff6e6af89..44a084b41bf0 100644
--- a/drivers/net/ethernet/8390/ne.c
+++ b/drivers/net/ethernet/8390/ne.c
@@ -99,7 +99,7 @@ MODULE_LICENSE("GPL");
that the ne2k probe is the last 8390 based probe to take place (as it
is at boot) and so the probe will get confused by any other 8390 cards.
ISA device autoprobes on a running machine are not recommended anyway. */
-#if !defined(MODULE) && (defined(CONFIG_ISA) || defined(CONFIG_M32R))
+#if !defined(MODULE) && defined(CONFIG_ISA)
/* Do we need a portlist for the ISA auto-probe ? */
#define NEEDS_PORTLIST
#endif
@@ -164,12 +164,7 @@ bad_clone_list[] __initdata = {
#define NESM_START_PG 0x40 /* First page of TX buffer */
#define NESM_STOP_PG 0x80 /* Last page +1 of RX ring */
-#if defined(CONFIG_PLAT_MAPPI)
-# define DCR_VAL 0x4b
-#elif defined(CONFIG_PLAT_OAKS32R) || \
- defined(CONFIG_MACH_TX49XX)
-# define DCR_VAL 0x48 /* 8-bit mode */
-#elif defined(CONFIG_ATARI) /* 8-bit mode on Atari, normal on Q40 */
+#if defined(CONFIG_ATARI) /* 8-bit mode on Atari, normal on Q40 */
# define DCR_VAL (MACH_IS_ATARI ? 0x48 : 0x49)
#else
# define DCR_VAL 0x49
@@ -422,12 +417,7 @@ static int __init ne_probe1(struct net_device *dev, unsigned long ioaddr)
stop_page = NE1SM_STOP_PG;
}
-#if defined(CONFIG_PLAT_MAPPI) || defined(CONFIG_PLAT_OAKS32R)
- neX000 = ((SA_prom[14] == 0x57 && SA_prom[15] == 0x57)
- || (SA_prom[14] == 0x42 && SA_prom[15] == 0x42));
-#else
neX000 = (SA_prom[14] == 0x57 && SA_prom[15] == 0x57);
-#endif
ctron = (SA_prom[0] == 0x00 && SA_prom[1] == 0x00 && SA_prom[2] == 0x1d);
copam = (SA_prom[14] == 0x49 && SA_prom[15] == 0x00);
@@ -508,18 +498,9 @@ static int __init ne_probe1(struct net_device *dev, unsigned long ioaddr)
dev->base_addr = ioaddr;
-#ifdef CONFIG_PLAT_MAPPI
- outb_p(E8390_NODMA + E8390_PAGE1 + E8390_STOP,
- ioaddr + E8390_CMD); /* 0x61 */
- for (i = 0; i < ETH_ALEN; i++) {
- dev->dev_addr[i] = SA_prom[i]
- = inb_p(ioaddr + EN1_PHYS_SHIFT(i));
- }
-#else
for (i = 0; i < ETH_ALEN; i++) {
dev->dev_addr[i] = SA_prom[i];
}
-#endif
pr_cont("%pM\n", dev->dev_addr);
--
2.9.0
^ permalink raw reply related
* [PATCH 03/47] net: adi: remove blackfin ethernet drivers
From: Arnd Bergmann @ 2018-03-14 15:35 UTC (permalink / raw)
To: linux-kernel
Cc: Arnd Bergmann, David S. Miller, Kunihiko Hayashi, Aviad Krawczyk,
Linus Walleij, Greg Kroah-Hartman, Philippe Ombredanne, netdev
In-Reply-To: <20180314153603.3127932-1-arnd@arndb.de>
The blackfin architecture is getting removed, so the bfin_mac driver
is now obsolete.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/ethernet/Kconfig | 1 -
drivers/net/ethernet/Makefile | 1 -
drivers/net/ethernet/adi/Kconfig | 66 --
drivers/net/ethernet/adi/Makefile | 5 -
drivers/net/ethernet/adi/bfin_mac.c | 1881 -----------------------------------
drivers/net/ethernet/adi/bfin_mac.h | 104 --
include/linux/bfin_mac.h | 30 -
7 files changed, 2088 deletions(-)
delete mode 100644 drivers/net/ethernet/adi/Kconfig
delete mode 100644 drivers/net/ethernet/adi/Makefile
delete mode 100644 drivers/net/ethernet/adi/bfin_mac.c
delete mode 100644 drivers/net/ethernet/adi/bfin_mac.h
delete mode 100644 include/linux/bfin_mac.h
diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
index 92be1ad3df59..074d760a568b 100644
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
@@ -34,7 +34,6 @@ source "drivers/net/ethernet/arc/Kconfig"
source "drivers/net/ethernet/atheros/Kconfig"
source "drivers/net/ethernet/aurora/Kconfig"
source "drivers/net/ethernet/cadence/Kconfig"
-source "drivers/net/ethernet/adi/Kconfig"
source "drivers/net/ethernet/broadcom/Kconfig"
source "drivers/net/ethernet/brocade/Kconfig"
source "drivers/net/ethernet/calxeda/Kconfig"
diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
index edef6069dd4b..135dae67d671 100644
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
@@ -21,7 +21,6 @@ obj-$(CONFIG_NET_VENDOR_ARC) += arc/
obj-$(CONFIG_NET_VENDOR_ATHEROS) += atheros/
obj-$(CONFIG_NET_VENDOR_AURORA) += aurora/
obj-$(CONFIG_NET_CADENCE) += cadence/
-obj-$(CONFIG_NET_BFIN) += adi/
obj-$(CONFIG_NET_VENDOR_BROADCOM) += broadcom/
obj-$(CONFIG_NET_VENDOR_BROCADE) += brocade/
obj-$(CONFIG_NET_CALXEDA_XGMAC) += calxeda/
diff --git a/drivers/net/ethernet/adi/Kconfig b/drivers/net/ethernet/adi/Kconfig
deleted file mode 100644
index 98cc8f535021..000000000000
diff --git a/drivers/net/ethernet/adi/Makefile b/drivers/net/ethernet/adi/Makefile
deleted file mode 100644
index b1fbe195d0e8..000000000000
diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c
deleted file mode 100644
index 7120f2b9c6ef..000000000000
diff --git a/drivers/net/ethernet/adi/bfin_mac.h b/drivers/net/ethernet/adi/bfin_mac.h
deleted file mode 100644
index 4ad5b9be3f84..000000000000
diff --git a/include/linux/bfin_mac.h b/include/linux/bfin_mac.h
deleted file mode 100644
index a69554ef8476..000000000000
--
2.9.0
^ permalink raw reply related
* [PATCH 02/47] net: tile: remove ethernet drivers
From: Arnd Bergmann @ 2018-03-14 15:35 UTC (permalink / raw)
To: linux-kernel
Cc: Arnd Bergmann, David S. Miller, Kunihiko Hayashi, Zhao Chen,
Jassi Brar, Linus Walleij, Aviad Krawczyk, Greg Kroah-Hartman,
netdev
In-Reply-To: <20180314153603.3127932-1-arnd@arndb.de>
The tile architecture is obsolete and getting removed. From all
I can tell, later ARM based products use a different ethernet driver,
so we should remove this one as well.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/ethernet/Kconfig | 1 -
drivers/net/ethernet/Makefile | 1 -
drivers/net/ethernet/tile/Kconfig | 18 -
drivers/net/ethernet/tile/Makefile | 11 -
drivers/net/ethernet/tile/tilegx.c | 2279 ---------------------------------
drivers/net/ethernet/tile/tilepro.c | 2397 -----------------------------------
6 files changed, 4707 deletions(-)
delete mode 100644 drivers/net/ethernet/tile/Kconfig
delete mode 100644 drivers/net/ethernet/tile/Makefile
delete mode 100644 drivers/net/ethernet/tile/tilegx.c
delete mode 100644 drivers/net/ethernet/tile/tilepro.c
diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
index b6cf4b6962f5..92be1ad3df59 100644
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
@@ -176,7 +176,6 @@ source "drivers/net/ethernet/stmicro/Kconfig"
source "drivers/net/ethernet/sun/Kconfig"
source "drivers/net/ethernet/tehuti/Kconfig"
source "drivers/net/ethernet/ti/Kconfig"
-source "drivers/net/ethernet/tile/Kconfig"
source "drivers/net/ethernet/toshiba/Kconfig"
source "drivers/net/ethernet/tundra/Kconfig"
source "drivers/net/ethernet/via/Kconfig"
diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
index 3cdf01e96e0b..edef6069dd4b 100644
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
@@ -88,7 +88,6 @@ obj-$(CONFIG_NET_VENDOR_STMICRO) += stmicro/
obj-$(CONFIG_NET_VENDOR_SUN) += sun/
obj-$(CONFIG_NET_VENDOR_TEHUTI) += tehuti/
obj-$(CONFIG_NET_VENDOR_TI) += ti/
-obj-$(CONFIG_TILE_NET) += tile/
obj-$(CONFIG_NET_VENDOR_TOSHIBA) += toshiba/
obj-$(CONFIG_NET_VENDOR_TUNDRA) += tundra/
obj-$(CONFIG_NET_VENDOR_VIA) += via/
diff --git a/drivers/net/ethernet/tile/Kconfig b/drivers/net/ethernet/tile/Kconfig
deleted file mode 100644
index bdfeaf3d4fce..000000000000
diff --git a/drivers/net/ethernet/tile/Makefile b/drivers/net/ethernet/tile/Makefile
deleted file mode 100644
index 3d0ae1f07fc9..000000000000
diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c
deleted file mode 100644
index b3e5816a4678..000000000000
diff --git a/drivers/net/ethernet/tile/tilepro.c b/drivers/net/ethernet/tile/tilepro.c
deleted file mode 100644
index 56d06282fbde..000000000000
--
2.9.0
^ permalink raw reply related
* [PATCH 00/47] arch-removal: device drivers
From: Arnd Bergmann @ 2018-03-14 15:35 UTC (permalink / raw)
To: linux-kernel
Cc: ulf.hansson, linux-usb, wsa, linux-iio, viresh.kumar,
linus.walleij, alexandre.belloni, linux-ide, netdev, linux-mtd,
linux-i2c, linux-rtc, lars, herbert, corbet, linux-doc, stern,
linux-serial, jslaby, linux-mmc, shli, wg, linux-crypto,
alsa-devel, linux-pwm, linux-watchdog, Arnd Bergmann,
b.zolnierkie, linux-input, linux-can, linux-raid, boris.brezillon,
broonie, bp, linux-fbdev
Hi driver maintainers,
I just posted one series with the removal of eight architectures,
see https://lkml.org/lkml/2018/3/14/505 for details, or
https://lwn.net/Articles/748074/ for more background.
These are the device drivers that go along with them. I have already
picked up the drivers for arch/metag/ into my tree, they were reviewed
earlier.
Please let me know if you have any concerns with the patch, or if you
prefer to pick up the patches in your respective trees. I created
the patches with 'git format-patch -D', so they will not apply without
manually removing those files.
For anything else, I'd keep the removal patches in my asm-generic tree
and will send a pull request for 4.17 along with the actual arch removal.
Arnd
Arnd Bergmann
edac: remove tile driver
net: tile: remove ethernet drivers
net: adi: remove blackfin ethernet drivers
net: 8390: remove m32r specific bits
net: remove cris etrax ethernet driver
net: smsc: remove m32r specific smc91x configuration
raid: remove tile specific raid6 implementation
rtc: remove tile driver
rtc: remove bfin driver
char: remove obsolete ds1302 rtc driver
char: remove tile-srom.c
char: remove blackfin OTP driver
pcmcia: remove m32r drivers
pcmcia: remove blackfin driver
ASoC: remove blackfin drivers
video/logo: remove obsolete logo files
fbdev: remove blackfin drivers
fbdev: s1d13xxxfb: remove m32r specific hacks
crypto: remove blackfin CRC driver
media: platform: remove blackfin capture driver
media: platform: remove m32r specific arv driver
cpufreq: remove blackfin driver
cpufreq: remove cris specific drivers
gpio: remove etraxfs driver
pinctrl: remove adi2/blackfin drivers
ata: remove bf54x driver
input: keyboard: remove bf54x driver
input: misc: remove blackfin rotary driver
mmc: remove bfin_sdh driver
can: remove bfin_can driver
watchdog: remove bfin_wdt driver
mtd: maps: remove bfin-async-flash driver
mtd: nand: remove bf5xx_nand driver
spi: remove blackfin related host drivers
i2c: remove bfin-twi driver
pwm: remobe pwm-bfin driver
usb: host: remove tilegx platform glue
usb: musb: remove blackfin port
usb: isp1362: remove blackfin arch glue
serial: remove cris/etrax uart drivers
serial: remove blackfin drivers
serial: remove m32r_sio driver
serial: remove tile uart driver
tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers
tty: hvc: remove tile driver
staging: irda: remove bfin_sir driver
staging: iio: remove iio-trig-bfin-timer driver
.../devicetree/bindings/gpio/gpio-etraxfs.txt | 22 -
.../bindings/serial/axis,etraxfs-uart.txt | 22 -
Documentation/watchdog/watchdog-parameters.txt | 5 -
MAINTAINERS | 8 -
drivers/ata/Kconfig | 9 -
drivers/ata/Makefile | 1 -
drivers/ata/pata_bf54x.c | 1703 --------
drivers/char/Kconfig | 48 -
drivers/char/Makefile | 3 -
drivers/char/bfin-otp.c | 237 --
drivers/char/ds1302.c | 357 --
drivers/char/tile-srom.c | 475 ---
drivers/cpufreq/Makefile | 3 -
drivers/cpufreq/blackfin-cpufreq.c | 217 -
drivers/cpufreq/cris-artpec3-cpufreq.c | 93 -
drivers/cpufreq/cris-etraxfs-cpufreq.c | 92 -
drivers/crypto/Kconfig | 7 -
drivers/crypto/Makefile | 1 -
drivers/crypto/bfin_crc.c | 753 ----
drivers/crypto/bfin_crc.h | 124 -
drivers/edac/Kconfig | 8 -
drivers/edac/Makefile | 2 -
drivers/edac/tile_edac.c | 265 --
drivers/gpio/Kconfig | 9 -
drivers/gpio/Makefile | 1 -
drivers/gpio/gpio-etraxfs.c | 475 ---
drivers/i2c/busses/Kconfig | 18 -
drivers/i2c/busses/Makefile | 1 -
drivers/i2c/busses/i2c-bfin-twi.c | 737 ----
drivers/input/keyboard/Kconfig | 9 -
drivers/input/keyboard/Makefile | 1 -
drivers/input/keyboard/bf54x-keys.c | 396 --
drivers/input/misc/Kconfig | 9 -
drivers/input/misc/Makefile | 1 -
drivers/input/misc/bfin_rotary.c | 294 --
drivers/media/platform/Kconfig | 22 -
drivers/media/platform/Makefile | 4 -
drivers/media/platform/arv.c | 884 ----
drivers/media/platform/blackfin/Kconfig | 16 -
drivers/media/platform/blackfin/Makefile | 2 -
drivers/media/platform/blackfin/bfin_capture.c | 983 -----
drivers/media/platform/blackfin/ppi.c | 361 --
drivers/mmc/host/Kconfig | 19 -
drivers/mmc/host/Makefile | 1 -
drivers/mmc/host/bfin_sdh.c | 679 ----
drivers/mtd/maps/Kconfig | 10 -
drivers/mtd/maps/Makefile | 1 -
drivers/mtd/maps/bfin-async-flash.c | 196 -
drivers/mtd/nand/raw/Kconfig | 32 -
drivers/mtd/nand/raw/Makefile | 1 -
drivers/mtd/nand/raw/bf5xx_nand.c | 861 ----
drivers/net/Makefile | 1 -
drivers/net/can/Kconfig | 9 -
drivers/net/can/Makefile | 1 -
drivers/net/can/bfin_can.c | 784 ----
drivers/net/cris/Makefile | 1 -
drivers/net/cris/eth_v10.c | 1742 --------
drivers/net/ethernet/8390/Kconfig | 3 +-
drivers/net/ethernet/8390/ne.c | 23 +-
drivers/net/ethernet/Kconfig | 2 -
drivers/net/ethernet/Makefile | 2 -
drivers/net/ethernet/adi/Kconfig | 66 -
drivers/net/ethernet/adi/Makefile | 5 -
drivers/net/ethernet/adi/bfin_mac.c | 1881 ---------
drivers/net/ethernet/adi/bfin_mac.h | 104 -
drivers/net/ethernet/smsc/Kconfig | 4 +-
drivers/net/ethernet/smsc/smc91x.h | 26 -
drivers/net/ethernet/tile/Kconfig | 18 -
drivers/net/ethernet/tile/Makefile | 11 -
drivers/net/ethernet/tile/tilegx.c | 2279 -----------
drivers/net/ethernet/tile/tilepro.c | 2397 -----------
drivers/pcmcia/Kconfig | 26 -
drivers/pcmcia/Makefile | 3 -
drivers/pcmcia/bfin_cf_pcmcia.c | 316 --
drivers/pcmcia/m32r_cfc.c | 786 ----
drivers/pcmcia/m32r_cfc.h | 88 -
drivers/pcmcia/m32r_pcc.c | 763 ----
drivers/pcmcia/m32r_pcc.h | 66 -
drivers/pinctrl/Kconfig | 19 -
drivers/pinctrl/Makefile | 3 -
drivers/pinctrl/pinctrl-adi2-bf54x.c | 588 ---
drivers/pinctrl/pinctrl-adi2-bf60x.c | 517 ---
drivers/pinctrl/pinctrl-adi2.c | 1114 -----
drivers/pinctrl/pinctrl-adi2.h | 75 -
drivers/pwm/Kconfig | 9 -
drivers/pwm/Makefile | 1 -
drivers/pwm/pwm-bfin.c | 157 -
drivers/rtc/Kconfig | 17 -
drivers/rtc/Makefile | 2 -
drivers/rtc/rtc-bfin.c | 448 ---
drivers/rtc/rtc-tile.c | 143 -
drivers/spi/Kconfig | 19 -
drivers/spi/Makefile | 3 -
drivers/spi/spi-adi-v3.c | 984 -----
drivers/spi/spi-bfin-sport.c | 919 -----
drivers/spi/spi-bfin5xx.c | 1462 -------
drivers/staging/iio/Kconfig | 1 -
drivers/staging/iio/Makefile | 1 -
drivers/staging/iio/trigger/Kconfig | 19 -
drivers/staging/iio/trigger/Makefile | 5 -
drivers/staging/iio/trigger/iio-trig-bfin-timer.c | 292 --
drivers/staging/iio/trigger/iio-trig-bfin-timer.h | 25 -
drivers/staging/irda/drivers/Kconfig | 45 -
drivers/staging/irda/drivers/Makefile | 1 -
drivers/staging/irda/drivers/bfin_sir.c | 819 ----
drivers/staging/irda/drivers/bfin_sir.h | 93 -
drivers/tty/Kconfig | 13 -
drivers/tty/Makefile | 1 -
drivers/tty/bfin_jtag_comm.c | 353 --
drivers/tty/hvc/Kconfig | 9 -
drivers/tty/hvc/Makefile | 2 -
drivers/tty/hvc/hvc_bfin_jtag.c | 104 -
drivers/tty/hvc/hvc_tile.c | 196 -
drivers/tty/serial/Kconfig | 198 -
drivers/tty/serial/Makefile | 6 -
drivers/tty/serial/bfin_sport_uart.c | 937 -----
drivers/tty/serial/bfin_sport_uart.h | 86 -
drivers/tty/serial/bfin_uart.c | 1551 -------
drivers/tty/serial/crisv10.c | 4248 --------------------
drivers/tty/serial/crisv10.h | 133 -
drivers/tty/serial/etraxfs-uart.c | 960 -----
drivers/tty/serial/m32r_sio.c | 1053 -----
drivers/tty/serial/m32r_sio_reg.h | 150 -
drivers/tty/serial/tilegx.c | 689 ----
drivers/usb/host/Kconfig | 1 +
drivers/usb/host/ehci-hcd.c | 5 -
drivers/usb/host/ehci-tilegx.c | 207 -
drivers/usb/host/isp1362.h | 44 -
drivers/usb/host/ohci-hcd.c | 18 -
drivers/usb/host/ohci-tilegx.c | 196 -
drivers/usb/musb/Kconfig | 10 +-
drivers/usb/musb/Makefile | 1 -
drivers/usb/musb/blackfin.c | 623 ---
drivers/usb/musb/blackfin.h | 81 -
drivers/usb/musb/musb_core.c | 5 -
drivers/usb/musb/musb_core.h | 30 -
drivers/usb/musb/musb_debugfs.c | 2 -
drivers/usb/musb/musb_dma.h | 11 -
drivers/usb/musb/musb_gadget.c | 35 -
drivers/usb/musb/musb_regs.h | 182 -
drivers/usb/musb/musbhsdma.c | 5 -
drivers/usb/musb/musbhsdma.h | 64 -
drivers/video/fbdev/Kconfig | 103 -
drivers/video/fbdev/Makefile | 5 -
drivers/video/fbdev/bf537-lq035.c | 891 ----
drivers/video/fbdev/bf54x-lq043fb.c | 764 ----
drivers/video/fbdev/bfin-lq035q1-fb.c | 864 ----
drivers/video/fbdev/bfin-t350mcqb-fb.c | 669 ---
drivers/video/fbdev/bfin_adv7393fb.c | 828 ----
drivers/video/fbdev/bfin_adv7393fb.h | 319 --
drivers/video/fbdev/s1d13xxxfb.c | 10 -
drivers/video/logo/Kconfig | 15 -
drivers/video/logo/Makefile | 3 -
drivers/video/logo/logo.c | 12 -
drivers/video/logo/logo_blackfin_clut224.ppm | 1127 ------
drivers/video/logo/logo_blackfin_vga16.ppm | 1127 ------
drivers/video/logo/logo_m32r_clut224.ppm | 1292 ------
drivers/watchdog/Kconfig | 17 -
drivers/watchdog/Makefile | 7 -
drivers/watchdog/bfin_wdt.c | 476 ---
include/linux/bfin_mac.h | 30 -
include/linux/linux_logo.h | 3 -
include/linux/platform_data/bfin_rotary.h | 117 -
include/linux/platform_data/pinctrl-adi2.h | 40 -
include/linux/raid/pq.h | 1 -
include/linux/usb/musb.h | 7 -
include/linux/usb/tilegx.h | 35 -
include/media/blackfin/bfin_capture.h | 39 -
include/media/blackfin/ppi.h | 94 -
lib/raid6/Makefile | 6 -
lib/raid6/algos.c | 3 -
lib/raid6/test/Makefile | 7 -
lib/raid6/tilegx.uc | 87 -
sound/soc/Kconfig | 1 -
sound/soc/Makefile | 1 -
sound/soc/blackfin/Kconfig | 205 -
sound/soc/blackfin/Makefile | 40 -
sound/soc/blackfin/bf5xx-ac97-pcm.c | 480 ---
sound/soc/blackfin/bf5xx-ac97.c | 388 --
sound/soc/blackfin/bf5xx-ac97.h | 57 -
sound/soc/blackfin/bf5xx-ad1836.c | 109 -
sound/soc/blackfin/bf5xx-ad193x.c | 131 -
sound/soc/blackfin/bf5xx-ad1980.c | 109 -
sound/soc/blackfin/bf5xx-ad73311.c | 212 -
sound/soc/blackfin/bf5xx-i2s-pcm.c | 373 --
sound/soc/blackfin/bf5xx-i2s-pcm.h | 17 -
sound/soc/blackfin/bf5xx-i2s.c | 391 --
sound/soc/blackfin/bf5xx-sport.c | 1102 -----
sound/soc/blackfin/bf5xx-sport.h | 174 -
sound/soc/blackfin/bf5xx-ssm2602.c | 126 -
sound/soc/blackfin/bf6xx-i2s.c | 239 --
sound/soc/blackfin/bf6xx-sport.c | 425 --
sound/soc/blackfin/bf6xx-sport.h | 82 -
sound/soc/blackfin/bfin-eval-adau1373.c | 173 -
sound/soc/blackfin/bfin-eval-adau1701.c | 113 -
sound/soc/blackfin/bfin-eval-adau1x61.c | 142 -
sound/soc/blackfin/bfin-eval-adau1x81.c | 129 -
sound/soc/blackfin/bfin-eval-adav80x.c | 145 -
198 files changed, 7 insertions(+), 56230 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-etraxfs.txt
delete mode 100644 Documentation/devicetree/bindings/serial/axis,etraxfs-uart.txt
delete mode 100644 drivers/ata/pata_bf54x.c
delete mode 100644 drivers/char/bfin-otp.c
delete mode 100644 drivers/char/ds1302.c
delete mode 100644 drivers/char/tile-srom.c
delete mode 100644 drivers/cpufreq/blackfin-cpufreq.c
delete mode 100644 drivers/cpufreq/cris-artpec3-cpufreq.c
delete mode 100644 drivers/cpufreq/cris-etraxfs-cpufreq.c
delete mode 100644 drivers/crypto/bfin_crc.c
delete mode 100644 drivers/crypto/bfin_crc.h
delete mode 100644 drivers/edac/tile_edac.c
delete mode 100644 drivers/gpio/gpio-etraxfs.c
delete mode 100644 drivers/i2c/busses/i2c-bfin-twi.c
delete mode 100644 drivers/input/keyboard/bf54x-keys.c
delete mode 100644 drivers/input/misc/bfin_rotary.c
delete mode 100644 drivers/media/platform/arv.c
delete mode 100644 drivers/media/platform/blackfin/Kconfig
delete mode 100644 drivers/media/platform/blackfin/Makefile
delete mode 100644 drivers/media/platform/blackfin/bfin_capture.c
delete mode 100644 drivers/media/platform/blackfin/ppi.c
delete mode 100644 drivers/mmc/host/bfin_sdh.c
delete mode 100644 drivers/mtd/maps/bfin-async-flash.c
delete mode 100644 drivers/mtd/nand/raw/bf5xx_nand.c
delete mode 100644 drivers/net/can/bfin_can.c
delete mode 100644 drivers/net/cris/Makefile
delete mode 100644 drivers/net/cris/eth_v10.c
delete mode 100644 drivers/net/ethernet/adi/Kconfig
delete mode 100644 drivers/net/ethernet/adi/Makefile
delete mode 100644 drivers/net/ethernet/adi/bfin_mac.c
delete mode 100644 drivers/net/ethernet/adi/bfin_mac.h
delete mode 100644 drivers/net/ethernet/tile/Kconfig
delete mode 100644 drivers/net/ethernet/tile/Makefile
delete mode 100644 drivers/net/ethernet/tile/tilegx.c
delete mode 100644 drivers/net/ethernet/tile/tilepro.c
delete mode 100644 drivers/pcmcia/bfin_cf_pcmcia.c
delete mode 100644 drivers/pcmcia/m32r_cfc.c
delete mode 100644 drivers/pcmcia/m32r_cfc.h
delete mode 100644 drivers/pcmcia/m32r_pcc.c
delete mode 100644 drivers/pcmcia/m32r_pcc.h
delete mode 100644 drivers/pinctrl/pinctrl-adi2-bf54x.c
delete mode 100644 drivers/pinctrl/pinctrl-adi2-bf60x.c
delete mode 100644 drivers/pinctrl/pinctrl-adi2.c
delete mode 100644 drivers/pinctrl/pinctrl-adi2.h
delete mode 100644 drivers/pwm/pwm-bfin.c
delete mode 100644 drivers/rtc/rtc-bfin.c
delete mode 100644 drivers/rtc/rtc-tile.c
delete mode 100644 drivers/spi/spi-adi-v3.c
delete mode 100644 drivers/spi/spi-bfin-sport.c
delete mode 100644 drivers/spi/spi-bfin5xx.c
delete mode 100644 drivers/staging/iio/trigger/Kconfig
delete mode 100644 drivers/staging/iio/trigger/Makefile
delete mode 100644 drivers/staging/iio/trigger/iio-trig-bfin-timer.c
delete mode 100644 drivers/staging/iio/trigger/iio-trig-bfin-timer.h
delete mode 100644 drivers/staging/irda/drivers/bfin_sir.c
delete mode 100644 drivers/staging/irda/drivers/bfin_sir.h
delete mode 100644 drivers/tty/bfin_jtag_comm.c
delete mode 100644 drivers/tty/hvc/hvc_bfin_jtag.c
delete mode 100644 drivers/tty/hvc/hvc_tile.c
delete mode 100644 drivers/tty/serial/bfin_sport_uart.c
delete mode 100644 drivers/tty/serial/bfin_sport_uart.h
delete mode 100644 drivers/tty/serial/bfin_uart.c
delete mode 100644 drivers/tty/serial/crisv10.c
delete mode 100644 drivers/tty/serial/crisv10.h
delete mode 100644 drivers/tty/serial/etraxfs-uart.c
delete mode 100644 drivers/tty/serial/m32r_sio.c
delete mode 100644 drivers/tty/serial/m32r_sio_reg.h
delete mode 100644 drivers/tty/serial/tilegx.c
delete mode 100644 drivers/usb/host/ehci-tilegx.c
delete mode 100644 drivers/usb/host/ohci-tilegx.c
delete mode 100644 drivers/usb/musb/blackfin.c
delete mode 100644 drivers/usb/musb/blackfin.h
delete mode 100644 drivers/video/fbdev/bf537-lq035.c
delete mode 100644 drivers/video/fbdev/bf54x-lq043fb.c
delete mode 100644 drivers/video/fbdev/bfin-lq035q1-fb.c
delete mode 100644 drivers/video/fbdev/bfin-t350mcqb-fb.c
delete mode 100644 drivers/video/fbdev/bfin_adv7393fb.c
delete mode 100644 drivers/video/fbdev/bfin_adv7393fb.h
delete mode 100644 drivers/video/logo/logo_blackfin_clut224.ppm
delete mode 100644 drivers/video/logo/logo_blackfin_vga16.ppm
delete mode 100644 drivers/video/logo/logo_m32r_clut224.ppm
delete mode 100644 drivers/watchdog/bfin_wdt.c
delete mode 100644 include/linux/bfin_mac.h
delete mode 100644 include/linux/platform_data/bfin_rotary.h
delete mode 100644 include/linux/platform_data/pinctrl-adi2.h
delete mode 100644 include/linux/usb/tilegx.h
delete mode 100644 include/media/blackfin/bfin_capture.h
delete mode 100644 include/media/blackfin/ppi.h
delete mode 100644 lib/raid6/tilegx.uc
delete mode 100644 sound/soc/blackfin/Kconfig
delete mode 100644 sound/soc/blackfin/Makefile
delete mode 100644 sound/soc/blackfin/bf5xx-ac97-pcm.c
delete mode 100644 sound/soc/blackfin/bf5xx-ac97.c
delete mode 100644 sound/soc/blackfin/bf5xx-ac97.h
delete mode 100644 sound/soc/blackfin/bf5xx-ad1836.c
delete mode 100644 sound/soc/blackfin/bf5xx-ad193x.c
delete mode 100644 sound/soc/blackfin/bf5xx-ad1980.c
delete mode 100644 sound/soc/blackfin/bf5xx-ad73311.c
delete mode 100644 sound/soc/blackfin/bf5xx-i2s-pcm.c
delete mode 100644 sound/soc/blackfin/bf5xx-i2s-pcm.h
delete mode 100644 sound/soc/blackfin/bf5xx-i2s.c
delete mode 100644 sound/soc/blackfin/bf5xx-sport.c
delete mode 100644 sound/soc/blackfin/bf5xx-sport.h
delete mode 100644 sound/soc/blackfin/bf5xx-ssm2602.c
delete mode 100644 sound/soc/blackfin/bf6xx-i2s.c
delete mode 100644 sound/soc/blackfin/bf6xx-sport.c
delete mode 100644 sound/soc/blackfin/bf6xx-sport.h
delete mode 100644 sound/soc/blackfin/bfin-eval-adau1373.c
delete mode 100644 sound/soc/blackfin/bfin-eval-adau1701.c
delete mode 100644 sound/soc/blackfin/bfin-eval-adau1x61.c
delete mode 100644 sound/soc/blackfin/bfin-eval-adau1x81.c
delete mode 100644 sound/soc/blackfin/bfin-eval-adav80x.c
--
Cc: linux@roeck-us.net
Cc: corbet@lwn.net
Cc: tj@kernel.org
Cc: gregkh@linuxfoundation.org
Cc: rjw@rjwysocki.net
Cc: viresh.kumar@linaro.org
Cc: herbert@gondor.apana.org.au
Cc: davem@davemloft.net
Cc: bp@alien8.de
Cc: mchehab@kernel.org
Cc: linus.walleij@linaro.org
Cc: wsa@the-dreams.de
Cc: dmitry.torokhov@gmail.com
Cc: ulf.hansson@linaro.org
Cc: boris.brezillon@bootlin.com
Cc: cyrille.pitchen@wedev4u.fr
Cc: wg@grandegger.com
Cc: mkl@pengutronix.de
Cc: alexandre.belloni@bootlin.com
Cc: broonie@kernel.org
Cc: jic23@kernel.org
Cc: lars@metafoo.de
Cc: jslaby@suse.com
Cc: stern@rowland.harvard.edu
Cc: b.zolnierkie@samsung.com
Cc: shli@kernel.org
Cc: linux-watchdog@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-ide@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: linux-crypto@vger.kernel.org
Cc: linux-edac@vger.kernel.org
Cc: linux-gpio@vger.kernel.org
Cc: linux-i2c@vger.kernel.org
Cc: linux-input@vger.kernel.org
Cc: linux-media@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Cc: linux-mtd@lists.infradead.org
Cc: netdev@vger.kernel.org
Cc: linux-can@vger.kernel.org
Cc: linux-pwm@vger.kernel.org
Cc: linux-rtc@vger.kernel.org
Cc: linux-spi@vger.kernel.org
Cc: linux-iio@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org
Cc: linux-raid@vger.kernel.org
Cc: alsa-devel@alsa-project.org
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply
* Re: [pci PATCH v6 5/5] pci-pf-stub: Add PF driver stub for PFs that function only to enable VFs
From: Alexander Duyck @ 2018-03-14 15:31 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Bjorn Helgaas, Duyck, Alexander H, linux-pci, virtio-dev, kvm,
Netdev, Daly, Dan, LKML, linux-nvme, Keith Busch, netanel,
Don Dutile, Maximilian Heyne, Wang, Liang-min, Rustad, Mark D,
David Woodhouse, dwmw
In-Reply-To: <20180314085601.GD28796@lst.de>
On Wed, Mar 14, 2018 at 1:56 AM, Christoph Hellwig <hch@lst.de> wrote:
>> +
>> +/**
>> + * pci_pf_stub_white_list - White list of devices to bind pci-pf-stub onto
>> + *
>> + * This table provides the list of IDs this driver is supposed to bind
>> + * onto. You could think of this as a list of "quirked" devices where we
>> + * are adding support for SR-IOV here since there are no other drivers
>> + * that they would be running under.
>> + *
>> + * Layout of the table below is as follows:
>> + * { Vendor ID, Device ID,
>> + * SubVendor ID, SubDevice ID,
>> + * Class, Class Mask,
>> + * private data (not used) }
>> + */
>
> No need to document the PCI device table format in a random driver.
I realize this probably isn't necessary, but I wanted to document it
to make it clear in terms of layout so that it is't confused with the
quirk structure layout since this has been referred to as a "quirk"
driver a few times.
> Otherwise looks fine:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* interdependencies with cxgb4 and iw_cxgb4
From: Steve Wise @ 2018-03-14 15:31 UTC (permalink / raw)
To: David Miller
Cc: 'Raju Rangoju', dledford, linux-rdma,
'Jason Gunthorpe', netdev, Potnuri Bharat Teja,
Ganesh Goudar, Rahul Lakkireddy
Hey Dave,
We've been discussing dependency issues between cxgb4 and the upper layer
drivers including iw_cxgb4 on linux-rdma [1], and I want to broaden this
discussion to include netdev and you, since this involves both linux-rdma
and netdev. (note the SRQ patch submission that triggered this discussion
was sent to linux-rdma, but it should have also included netdev. This was
an oversight and will be corrected on the next submission depending on how
chelsio decides to proceed)
In a nutshell, Chelsio has a few patch series to submit that require
enabling some feature in cxgb4 that is then used by iw_cxgb4. SRQ support is
one such series. The series as a whole spans both netdev and linux-rdma
maintainers. Because of the compile dependency between iw_cxgb4 and cxgb4
introduced by this series, the cxgb4 parts and iw_cxgb4 parts cannot be
split across maintainers. Further, if one maintainer merges the entire
series, then there are issues if commits are submitted to the other
maintainer that conflict.
This issue has also been dealt-with for Mellanox drivers, I believe. I take
it the solution for them was a k.o. signed repo, that they maintain, where
both linux-rdma and netdev take PRs from for commits that are needed in both
repos. Then these are reconciled when both repos are merged into Linus'
repo. (I hope my understanding of this is correct)
For Chelsio, this is perhaps a possibility, but I'm wondering if there is a
simpler solution? A few other option we've been discussing include:
1) submit the cxgb4-only changes to netdev in release cycle X, and then only
submit the iw_cxgb4 (or other upper drivers) changes that use them in
release cycle X+1. The pro of this is simplicity. The con is timeliness -
it takes 2 release cycles to get the feature upstream.
2) run the entire series through one maintainer's repo (with all
maintainers' ACK on the content and plan, of course), and ensuring no
conflicting commits are submitted for the rest of that release cycle. I'm
not really sure that this is feasible given anyone could create commits for
upstream drivers. So how could Chelsio really control this?
Do you have any suggestions on how we should proceed?
[1] https://www.spinics.net/lists/linux-rdma/msg61856.html
Thanks,
Steve.
^ permalink raw reply
* Re: [PATCH] brcmfmac: drop Inter-Access Point Protocol packets by default
From: Rafał Miłecki @ 2018-03-14 15:28 UTC (permalink / raw)
To: Kalle Valo
Cc: Arend van Spriel, Rafał Miłecki, Franky Lin,
Hante Meuleman, Chi-Hsien Lin, Wright Feng, Pieter-Paul Giesberts,
James Hughes, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
brcm80211-dev-list.pdl-dY08KVG/lbpWk0Htik3J/w,
brcm80211-dev-list-+wT8y+m8/X5BDgjK7y7TUQ,
netdev-u79uwXL29TY76Z2rM5mHXA, Linus Lüssing, Felix Fietkau,
bridge-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
In-Reply-To: <87o9jq66f3.fsf-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
On 2018-03-14 16:08, Kalle Valo wrote:
> Arend van Spriel <arend.vanspriel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> writes:
>
>> On 3/14/2018 3:24 PM, Kalle Valo wrote:
>>>> +config BRCMFMAC_IAPP
>>>> >+ bool "Partial support for obsoleted Inter-Access Point Protocol"
>>>> >+ depends on BRCMFMAC
>>>> >+ ---help---
>>>> >+ Most of Broadcom's firmwares can send 802.11f ADD frame every
>>>> >+ time new STA connects to the AP interface. Some recent ones
>>>> >+ can also disassociate STA when they receive such a frame.
>>>> >+
>>>> >+ It's important to understand this behavior can lead to a local
>>>> >+ DoS security issue. Attacker may trigger disassociation of any
>>>> >+ STA by sending a proper Ethernet frame to the wireless
>>>> >+ interface.
>>>> >+
>>>> >+ Moreover this feature may break AP interfaces in some specific
>>>> >+ setups. This applies e.g. to the bridge with hairpin mode
>>>> >+ enabled and IFLA_BRPORT_MCAST_TO_UCAST set. IAPP packet
>>>> >+ generated by a firmware will get passed back to the wireless
>>>> >+ interface and cause immediate disassociation of just-connected
>>>> >+ STA.
>>> Sorry for jumping late, but does it really make sense to have a
>>> Kconfig
>>> option for this? I don't think we should add a Kconfig option for
>>> every
>>> strange feature, there should be stronger reasons (size savings etc)
>>> before adding a Kconfig option.
>>>
>>> And in this case the size savings can't be much. Wouldn't a module
>>> parameter be simpler for a functionality change like this?
>>
>> Hi Kalle,
>>
>> Good to be wary about Kconfig option.
>
> I think Linus doesn't like pointless Kconfig options, me neither for
> that matter, so I try to make sure the justifications are really there
> before adding anything new.
>
>> So my reason for asking a Kconfig option is that this is directly in
>> the datapaths (tx and rx) so I prefer to disable/enable it compile
>> time rather then runtime.
>
> I'm no cpu profile expert but is really one (or two?) if checks of a
> cached variable in the datapath really measurable? My guess is that
> it's
> just noise in the results.
>
> But I'm not going to argue about it, if you think it's still needed I'm
> fine with that. Just mention in the commit log the justification the
> new
> Kconfig option.
I think you should be right and that's also why I put
skb->len - skb->mac_len != 6
as the first check in that function. That simple (quick?) check should
reject 99.9% of packets.
I could move skb_mac_header() call a bit further which should optimize
this function even more and maybe then we could switch to the module
parameter?
^ permalink raw reply
* Re: [pci PATCH v6 1/5] pci: Add pci_sriov_configure_simple for PFs that don't manage VF resources
From: Alexander Duyck @ 2018-03-14 15:28 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Bjorn Helgaas, Duyck, Alexander H, linux-pci, virtio-dev, kvm,
Netdev, Daly, Dan, LKML, linux-nvme, Keith Busch, netanel,
Don Dutile, Maximilian Heyne, Wang, Liang-min, Rustad, Mark D,
David Woodhouse, dwmw
In-Reply-To: <20180314085421.GA28796@lst.de>
On Wed, Mar 14, 2018 at 1:54 AM, Christoph Hellwig <hch@lst.de> wrote:
> On Tue, Mar 13, 2018 at 02:28:49PM -0700, Alexander Duyck wrote:
>> From: Alexander Duyck <alexander.h.duyck@intel.com>
>>
>> This patch adds a common configuration function called
>> pci_sriov_configure_simple that will allow for managing VFs on devices
>> where the PF is not capable of managing VF resources.
>>
>> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
>> ---
>>
>> v5: New patch replacing pci_sriov_configure_unmanaged with
>> pci_sriov_configure_simple
>> Dropped bits related to autoprobe changes
>> v6: Defined pci_sriov_configure_simple as NULL if IOV is disabled
>>
>> drivers/pci/iov.c | 32 ++++++++++++++++++++++++++++++++
>> include/linux/pci.h | 3 +++
>> 2 files changed, 35 insertions(+)
>>
>> diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
>> index 677924ae0350..bd7021491fdb 100644
>> --- a/drivers/pci/iov.c
>> +++ b/drivers/pci/iov.c
>> @@ -807,3 +807,35 @@ int pci_sriov_get_totalvfs(struct pci_dev *dev)
>> return dev->sriov->total_VFs;
>> }
>> EXPORT_SYMBOL_GPL(pci_sriov_get_totalvfs);
>> +
>> +/**
>> + * pci_sriov_configure_simple - helper to configure unmanaged SR-IOV
>> + * @dev: the PCI device
>> + * @nr_virtfn: number of virtual functions to enable, 0 to disable
>> + *
>> + * Used to provide generic enable/disable SR-IOV option for devices
>> + * that do not manage the VFs generated by their driver
>> + */
>> +int pci_sriov_configure_simple(struct pci_dev *dev, int nr_virtfn)
>> +{
>> + int err = -EINVAL;
>
> This assignment seems like it is never used..
It applies in the case where we are setting a number of VFs when VFs
are already allocated. It was needed since the last statement ended in
an if.
>> +
>> + might_sleep();
>> +
>> + if (!dev->is_physfn)
>> + return -ENODEV;
>> +
>> + if (pci_vfs_assigned(dev)) {
>> + pci_warn(dev,
>> + "Cannot modify SR-IOV while VFs are assigned\n");
>> + err = -EPERM;
>
> Why not:
>
> if (pci_vfs_assigned(dev)) {
> pci_warn(dev,
> "Cannot modify SR-IOV while VFs are assigned\n");
> return -EPERM;
> }
Symmetry. I had this as one of 3 blocks and just did it this way to be
consistent with the next two statements. I could probably just return
from each if block if that is preferred.
> Otherwise looks good:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
For v7 I can probably drop the err parameter and just return the
necessary error values directly.
^ permalink raw reply
* Re: [PATCH] brcmfmac: drop Inter-Access Point Protocol packets by default
From: Stephen Hemminger @ 2018-03-14 15:27 UTC (permalink / raw)
To: Kalle Valo
Cc: Arend van Spriel, Rafał Miłecki, Franky Lin,
Hante Meuleman, Chi-Hsien Lin, Wright Feng, Pieter-Paul Giesberts,
James Hughes, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
brcm80211-dev-list.pdl-dY08KVG/lbpWk0Htik3J/w,
brcm80211-dev-list-+wT8y+m8/X5BDgjK7y7TUQ,
netdev-u79uwXL29TY76Z2rM5mHXA, Linus Lüssing, Felix Fietkau,
bridge-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
Rafał Miłecki
In-Reply-To: <87o9jq66f3.fsf-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
On Wed, 14 Mar 2018 17:08:48 +0200
Kalle Valo <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> wrote:
> Arend van Spriel <arend.vanspriel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> writes:
>
> > On 3/14/2018 3:24 PM, Kalle Valo wrote:
> >>> +config BRCMFMAC_IAPP
> >>> >+ bool "Partial support for obsoleted Inter-Access Point Protocol"
> >>> >+ depends on BRCMFMAC
> >>> >+ ---help---
> >>> >+ Most of Broadcom's firmwares can send 802.11f ADD frame every
> >>> >+ time new STA connects to the AP interface. Some recent ones
> >>> >+ can also disassociate STA when they receive such a frame.
> >>> >+
> >>> >+ It's important to understand this behavior can lead to a local
> >>> >+ DoS security issue. Attacker may trigger disassociation of any
> >>> >+ STA by sending a proper Ethernet frame to the wireless
> >>> >+ interface.
> >>> >+
> >>> >+ Moreover this feature may break AP interfaces in some specific
> >>> >+ setups. This applies e.g. to the bridge with hairpin mode
> >>> >+ enabled and IFLA_BRPORT_MCAST_TO_UCAST set. IAPP packet
> >>> >+ generated by a firmware will get passed back to the wireless
> >>> >+ interface and cause immediate disassociation of just-connected
> >>> >+ STA.
> >> Sorry for jumping late, but does it really make sense to have a Kconfig
> >> option for this? I don't think we should add a Kconfig option for every
> >> strange feature, there should be stronger reasons (size savings etc)
> >> before adding a Kconfig option.
> >>
> >> And in this case the size savings can't be much. Wouldn't a module
> >> parameter be simpler for a functionality change like this?
> >
> > Hi Kalle,
> >
> > Good to be wary about Kconfig option.
>
> I think Linus doesn't like pointless Kconfig options, me neither for
> that matter, so I try to make sure the justifications are really there
> before adding anything new.
>
> > So my reason for asking a Kconfig option is that this is directly in
> > the datapaths (tx and rx) so I prefer to disable/enable it compile
> > time rather then runtime.
>
> I'm no cpu profile expert but is really one (or two?) if checks of a
> cached variable in the datapath really measurable? My guess is that it's
> just noise in the results.
>
> But I'm not going to argue about it, if you think it's still needed I'm
> fine with that. Just mention in the commit log the justification the new
> Kconfig option.
If you have to disable it a module parameter is not a complete disaster
^ permalink raw reply
* RE: [PATCH] lan78xx: Connect phy early
From: Woojung.Huh @ 2018-03-14 15:26 UTC (permalink / raw)
To: agraf; +Cc: UNGLinuxDriver, netdev, linux-usb, linux-kernel, tbogendoerfer,
phil
In-Reply-To: <20180314145456.69029-1-agraf@suse.de>
Hi Alexander,
Thanks for patch. We will look into it if there is any corner case
Such as plug in/out while operations.
Woojung
> -----Original Message-----
> From: Alexander Graf [mailto:agraf@suse.de]
> Sent: Wednesday, March 14, 2018 10:55 AM
> To: Woojung Huh - C21699 <Woojung.Huh@microchip.com>
> Cc: UNGLinuxDriver <UNGLinuxDriver@microchip.com>; netdev@vger.kernel.org; linux-
> usb@vger.kernel.org; linux-kernel@vger.kernel.org; Thomas Bogendoerfer
> <tbogendoerfer@suse.de>; Phil Elwell <phil@raspberrypi.org>
> Subject: [PATCH] lan78xx: Connect phy early
>
> When using wicked with a lan78xx device attached to the system, we
> end up with ethtool commands issued on the device before an ifup
> got issued. That lead to the following crash:
>
> Unable to handle kernel NULL pointer dereference at virtual address 0000039c
> pgd = ffff800035b30000
> [0000039c] *pgd=0000000000000000
> Internal error: Oops: 96000004 [#1] SMP
> Modules linked in: [...]
> Supported: Yes
> CPU: 3 PID: 638 Comm: wickedd Tainted: G E 4.12.14-0-default #1
> Hardware name: raspberrypi rpi/rpi, BIOS 2018.03-rc2 02/21/2018
> task: ffff800035e74180 task.stack: ffff800036718000
> PC is at phy_ethtool_ksettings_get+0x20/0x98
> LR is at lan78xx_get_link_ksettings+0x44/0x60 [lan78xx]
> pc : [<ffff0000086f7f30>] lr : [<ffff000000dcca84>] pstate: 20000005
> sp : ffff80003671bb20
> x29: ffff80003671bb20 x28: ffff800035e74180
> x27: ffff000008912000 x26: 000000000000001d
> x25: 0000000000000124 x24: ffff000008f74d00
> x23: 0000004000114809 x22: 0000000000000000
> x21: ffff80003671bbd0 x20: 0000000000000000
> x19: ffff80003671bbd0 x18: 000000000000040d
> x17: 0000000000000001 x16: 0000000000000000
> x15: 0000000000000000 x14: ffffffffffffffff
> x13: 0000000000000000 x12: 0000000000000020
> x11: 0101010101010101 x10: fefefefefefefeff
> x9 : 7f7f7f7f7f7f7f7f x8 : fefefeff31677364
> x7 : 0000000080808080 x6 : ffff80003671bc9c
> x5 : ffff80003671b9f8 x4 : ffff80002c296190
> x3 : 0000000000000000 x2 : 0000000000000000
> x1 : ffff80003671bbd0 x0 : ffff80003671bc00
> Process wickedd (pid: 638, stack limit = 0xffff800036718000)
> Call trace:
> Exception stack(0xffff80003671b9e0 to 0xffff80003671bb20)
> b9e0: ffff80003671bc00 ffff80003671bbd0 0000000000000000 0000000000000000
> ba00: ffff80002c296190 ffff80003671b9f8 ffff80003671bc9c 0000000080808080
> ba20: fefefeff31677364 7f7f7f7f7f7f7f7f fefefefefefefeff 0101010101010101
> ba40: 0000000000000020 0000000000000000 ffffffffffffffff 0000000000000000
> ba60: 0000000000000000 0000000000000001 000000000000040d ffff80003671bbd0
> ba80: 0000000000000000 ffff80003671bbd0 0000000000000000 0000004000114809
> baa0: ffff000008f74d00 0000000000000124 000000000000001d ffff000008912000
> bac0: ffff800035e74180 ffff80003671bb20 ffff000000dcca84 ffff80003671bb20
> bae0: ffff0000086f7f30 0000000020000005 ffff80002c296000 ffff800035223900
> bb00: 0000ffffffffffff 0000000000000000 ffff80003671bb20 ffff0000086f7f30
> [<ffff0000086f7f30>] phy_ethtool_ksettings_get+0x20/0x98
> [<ffff000000dcca84>] lan78xx_get_link_ksettings+0x44/0x60 [lan78xx]
> [<ffff0000087cbc40>] ethtool_get_settings+0x68/0x210
> [<ffff0000087cc0d4>] dev_ethtool+0x214/0x2180
> [<ffff0000087e5008>] dev_ioctl+0x400/0x630
> [<ffff00000879dd00>] sock_do_ioctl+0x70/0x88
> [<ffff00000879f5f8>] sock_ioctl+0x208/0x368
> [<ffff0000082cde10>] do_vfs_ioctl+0xb0/0x848
> [<ffff0000082ce634>] SyS_ioctl+0x8c/0xa8
> Exception stack(0xffff80003671bec0 to 0xffff80003671c000)
> bec0: 0000000000000009 0000000000008946 0000fffff4e841d0 0000aa0032687465
> bee0: 0000aaaafa2319d4 0000fffff4e841d4 0000000032687465 0000000032687465
> bf00: 000000000000001d 7f7fff7f7f7f7f7f 72606b622e71ff4c 7f7f7f7f7f7f7f7f
> bf20: 0101010101010101 0000000000000020 ffffffffffffffff 0000ffff7f510c68
> bf40: 0000ffff7f6a9d18 0000ffff7f44ce30 000000000000040d 0000ffff7f6f98f0
> bf60: 0000fffff4e842c0 0000000000000001 0000aaaafa2c2e00 0000ffff7f6ab000
> bf80: 0000fffff4e842c0 0000ffff7f62a000 0000aaaafa2b9f20 0000aaaafa2c2e00
> bfa0: 0000fffff4e84818 0000fffff4e841a0 0000ffff7f5ad0cc 0000fffff4e841a0
> bfc0: 0000ffff7f44ce3c 0000000080000000 0000000000000009 000000000000001d
> bfe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>
> The culprit is quite simple: The driver tries to access the phy left and right,
> but only actually has a working reference to it when the device is up.
>
> The fix thus is quite simple too: Get a reference to the phy on probe already
> and keep it even when the device is going down.
>
> With this patch applied, I can successfully run wicked on my system and bring
> the interface up and down as many times as I want, without getting NULL pointer
> dereferences in between.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
> drivers/net/usb/lan78xx.c | 21 ++++++++++-----------
> 1 file changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
> index 60a604cc7647..931cc124ab0c 100644
> --- a/drivers/net/usb/lan78xx.c
> +++ b/drivers/net/usb/lan78xx.c
> @@ -2082,8 +2082,6 @@ static int lan78xx_phy_init(struct lan78xx_net *dev)
>
> dev->fc_autoneg = phydev->autoneg;
>
> - phy_start(phydev);
> -
> netif_dbg(dev, ifup, dev->net, "phy initialised successfully");
>
> return 0;
> @@ -2512,9 +2510,7 @@ static int lan78xx_open(struct net_device *net)
> if (ret < 0)
> goto done;
>
> - ret = lan78xx_phy_init(dev);
> - if (ret < 0)
> - goto done;
> + phy_start(net->phydev);
>
> /* for Link Check */
> if (dev->urb_intr) {
> @@ -2575,13 +2571,7 @@ static int lan78xx_stop(struct net_device *net)
> if (timer_pending(&dev->stat_monitor))
> del_timer_sync(&dev->stat_monitor);
>
> - phy_unregister_fixup_for_uid(PHY_KSZ9031RNX, 0xfffffff0);
> - phy_unregister_fixup_for_uid(PHY_LAN8835, 0xfffffff0);
> -
> phy_stop(net->phydev);
> - phy_disconnect(net->phydev);
> -
> - net->phydev = NULL;
>
> clear_bit(EVENT_DEV_OPEN, &dev->flags);
> netif_stop_queue(net);
> @@ -3481,6 +3471,11 @@ static void lan78xx_disconnect(struct usb_interface *intf)
> net = dev->net;
> unregister_netdev(net);
>
> + phy_unregister_fixup_for_uid(PHY_KSZ9031RNX, 0xfffffff0);
> + phy_unregister_fixup_for_uid(PHY_LAN8835, 0xfffffff0);
> +
> + phy_disconnect(net->phydev);
> +
> cancel_delayed_work_sync(&dev->wq);
>
> usb_scuttle_anchored_urbs(&dev->deferred);
> @@ -3634,6 +3629,10 @@ static int lan78xx_probe(struct usb_interface *intf,
> pm_runtime_set_autosuspend_delay(&udev->dev,
> DEFAULT_AUTOSUSPEND_DELAY);
>
> + ret = lan78xx_phy_init(dev);
> + if (ret < 0)
> + return ret;
> +
> return 0;
>
> out3:
> --
> 2.12.3
^ permalink raw reply
* Re: [Intel-wired-lan] [PATCH 12/15] ice: Add stats and ethtool support
From: Stephen Hemminger @ 2018-03-14 15:13 UTC (permalink / raw)
To: Jesse Brandeburg
Cc: Eric Dumazet, davem, Venkataramanan, Anirudh, kubakici@wp.pl,
netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org
In-Reply-To: <20180313141414.00007d11@intel.com>
On Tue, 13 Mar 2018 14:14:14 -0700
Jesse Brandeburg <jesse.brandeburg@intel.com> wrote:
> Maybe it's just that I've been doing this too long, but I regularly
> (and many other customers/users do as well) depend on the ethtool stats
> being atomically updated w.r.t. each other. This means that if I'm
> getting the over rx_packets, as well as the per-queue rx_packets, and I
> read them all at once from the driver with ethtool, then I can check
> that things are working as expected.
Any application depending on this behavior is really fragile.
It is unportable to other devices (which I guess is to Intel's benefit)
and relying on guarantees not provided by current Linux network devices.
^ permalink raw reply
* Re: [PATCH] brcmfmac: drop Inter-Access Point Protocol packets by default
From: Kalle Valo @ 2018-03-14 15:08 UTC (permalink / raw)
To: Arend van Spriel
Cc: Rafał Miłecki, Franky Lin, Hante Meuleman,
Chi-Hsien Lin, Wright Feng, Pieter-Paul Giesberts, James Hughes,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
brcm80211-dev-list.pdl-dY08KVG/lbpWk0Htik3J/w,
brcm80211-dev-list-+wT8y+m8/X5BDgjK7y7TUQ,
netdev-u79uwXL29TY76Z2rM5mHXA, Linus Lüssing, Felix Fietkau,
bridge-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
Rafał Miłecki
In-Reply-To: <5AA93530.5040001-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Arend van Spriel <arend.vanspriel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> writes:
> On 3/14/2018 3:24 PM, Kalle Valo wrote:
>>> +config BRCMFMAC_IAPP
>>> >+ bool "Partial support for obsoleted Inter-Access Point Protocol"
>>> >+ depends on BRCMFMAC
>>> >+ ---help---
>>> >+ Most of Broadcom's firmwares can send 802.11f ADD frame every
>>> >+ time new STA connects to the AP interface. Some recent ones
>>> >+ can also disassociate STA when they receive such a frame.
>>> >+
>>> >+ It's important to understand this behavior can lead to a local
>>> >+ DoS security issue. Attacker may trigger disassociation of any
>>> >+ STA by sending a proper Ethernet frame to the wireless
>>> >+ interface.
>>> >+
>>> >+ Moreover this feature may break AP interfaces in some specific
>>> >+ setups. This applies e.g. to the bridge with hairpin mode
>>> >+ enabled and IFLA_BRPORT_MCAST_TO_UCAST set. IAPP packet
>>> >+ generated by a firmware will get passed back to the wireless
>>> >+ interface and cause immediate disassociation of just-connected
>>> >+ STA.
>> Sorry for jumping late, but does it really make sense to have a Kconfig
>> option for this? I don't think we should add a Kconfig option for every
>> strange feature, there should be stronger reasons (size savings etc)
>> before adding a Kconfig option.
>>
>> And in this case the size savings can't be much. Wouldn't a module
>> parameter be simpler for a functionality change like this?
>
> Hi Kalle,
>
> Good to be wary about Kconfig option.
I think Linus doesn't like pointless Kconfig options, me neither for
that matter, so I try to make sure the justifications are really there
before adding anything new.
> So my reason for asking a Kconfig option is that this is directly in
> the datapaths (tx and rx) so I prefer to disable/enable it compile
> time rather then runtime.
I'm no cpu profile expert but is really one (or two?) if checks of a
cached variable in the datapath really measurable? My guess is that it's
just noise in the results.
But I'm not going to argue about it, if you think it's still needed I'm
fine with that. Just mention in the commit log the justification the new
Kconfig option.
--
Kalle Valo
^ permalink raw reply
* Re: [PATCH] brcmfmac: drop Inter-Access Point Protocol packets by default
From: Stephen Hemminger @ 2018-03-14 15:08 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Kalle Valo, Arend van Spriel, Franky Lin, Hante Meuleman,
Chi-Hsien Lin, Wright Feng, Pieter-Paul Giesberts, James Hughes,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
brcm80211-dev-list.pdl-dY08KVG/lbpWk0Htik3J/w,
brcm80211-dev-list-+wT8y+m8/X5BDgjK7y7TUQ,
netdev-u79uwXL29TY76Z2rM5mHXA, Linus Lüssing, Felix Fietkau,
bridge-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
Rafał Miłecki
In-Reply-To: <20180314110119.13631-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Wed, 14 Mar 2018 12:01:19 +0100
Rafał Miłecki <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
> index 19048526b4af..db6987015fb1 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
> @@ -230,6 +230,34 @@ static void brcmf_netdev_set_multicast_list(struct net_device *ndev)
> schedule_work(&ifp->multicast_work);
> }
>
> +/**
> + * brcmf_skb_is_iapp - checks if skb is an IAPP packet
> + *
> + * @skb: skb to check
> + */
> +static bool brcmf_skb_is_iapp(struct sk_buff *skb)
> +{
> + const u8 iapp_l2_update_packet[6] __aligned(2) = {
> + 0x00, 0x01, 0xaf, 0x81, 0x01, 0x00,
> + };
> + unsigned char *eth_data = skb_mac_header(skb) + ETH_HLEN;
> +#if !defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS)
> + const u16 *a = (const u16 *)eth_data;
> + const u16 *b = (const u16 *)iapp_l2_update_packet;
> +#endif
> +
> + if (skb->len - skb->mac_len != 6 ||
> + !is_multicast_ether_addr(eth_hdr(skb)->h_dest))
> + return false;
> +
> +#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS)
> + return !(((*(const u32 *)eth_data) ^ (*(const u32 *)iapp_l2_update_packet)) |
> + ((*(const u16 *)(eth_data + 4)) ^ (*(const u16 *)(iapp_l2_update_packet + 4))));
> +#else
> + return !((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2]));
> +#endif
> +}
> +
> static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb,
> struct net_device *ndev)
> {
> @@ -250,6 +278,12 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb,
> goto done;
> }
>
> + if (!IS_ENABLED(CONFIG_BRCMFMAC_IAPP) && brcmf_skb_is_iapp(skb)) {
> + dev_kfree_skb(skb);
> + ret = -EINVAL;
> + goto done;
> + }
> +
The usual way to handle config options in kernel is either inline
stub function or #define
#ifdef CONFIG_BRFMMAC_IAPP
static bool brcmf_skb_is_app(...) {
real code
}
#else
#define brcmf_skb_is_app (false)
#endif
^ permalink raw reply
* Re: [v4.15.9] BUG: KASAN: slab-out-of-bounds in __dev_queue_xmit+0x2e5/0x14c0
From: Eric Dumazet @ 2018-03-14 15:04 UTC (permalink / raw)
To: Andrei Vagin, netdev
In-Reply-To: <20180314065504.GA17702@outlook.office365.com>
On 03/13/2018 11:55 PM, Andrei Vagin wrote:
> Hi,
>
> I got the following warning on the v4.15.9 kernel.
>
> :[ 4483.052174] ==================================================================
> :[ 4483.052659] BUG: KASAN: slab-out-of-bounds in __dev_queue_xmit+0x2e5/0x14c0
> :[ 4483.052937] Read of size 1 at addr ffff880067ef7bc0 by task objtool/26177
> :
> :[ 4483.053361] CPU: 0 PID: 26177 Comm: objtool Not tainted 4.15.9 #1
> :[ 4483.053603] Hardware name: Parallels Software International Inc. Parallels Virtual Platform/Parallels Virtual Platform, BIOS 6.12.26068.1232434 02/27/2017
> :[ 4483.054116] Call Trace:
> :[ 4483.054272] <IRQ>
> :[ 4483.054419] dump_stack+0xda/0x16f
> :[ 4483.054589] ? _atomic_dec_and_lock+0x101/0x101
> :[ 4483.054810] ? rcu_lockdep_current_cpu_online+0xba/0x120
> :[ 4483.055077] print_address_description+0x6a/0x270
> :[ 4483.055312] kasan_report+0x277/0x360
> :[ 4483.055491] ? __dev_queue_xmit+0x2e5/0x14c0
> :[ 4483.055688] __dev_queue_xmit+0x2e5/0x14c0
> :[ 4483.055892] ? do_raw_spin_unlock+0x147/0x220
> :[ 4483.056122] ? netdev_pick_tx+0x150/0x150
> :[ 4483.056369] ? mark_held_locks+0x52/0x90
> :[ 4483.056560] ? __lock_acquire+0x61b/0x2060
> :[ 4483.056771] ? match_held_lock+0x8d/0x420
> :[ 4483.056969] ? mark_lock+0x1c9/0xa30
> :[ 4483.057173] ? save_trace+0x1e0/0x1e0
> :[ 4483.057367] ? print_irqtrace_events+0x110/0x110
> :[ 4483.057602] ? nf_conntrack_alter_reply+0x2a0/0x2a0 [nf_conntrack]
> :[ 4483.057867] ? tcp_new+0x510/0x510 [nf_conntrack]
> :[ 4483.058101] ? debug_check_no_locks_freed+0x1b0/0x1b0
> :[ 4483.058360] ? kernel_text_address+0xec/0x100
> :[ 4483.058562] ? find_held_lock+0x6d/0xd0
> :[ 4483.058754] ? lock_downgrade+0x320/0x320
> :[ 4483.058959] ? lock_release+0x4d0/0x4d0
> :[ 4483.059184] ? nf_ct_get_tuple+0x98/0xd0 [nf_conntrack]
> :[ 4483.059422] ? rcu_lockdep_current_cpu_online+0xba/0x120
> :[ 4483.059655] ? mark_held_locks+0x52/0x90
> :[ 4483.059845] ? ip_finish_output2+0x83d/0xb10
> :[ 4483.060068] ip_finish_output2+0x93f/0xb10
> :[ 4483.060292] ? ip_copy_metadata+0x320/0x320
> :[ 4483.060485] ? save_trace+0x1e0/0x1e0
> :[ 4483.060659] ? rcu_is_watching+0x81/0xc0
> :[ 4483.060872] ? ipv4_nlattr_to_tuple+0x80/0x80 [nf_conntrack_ipv4]
> :[ 4483.061166] ? nf_ct_deliver_cached_events+0x1a3/0x450 [nf_conntrack]
> :[ 4483.061461] ? __local_bh_enable_ip+0x9a/0x110
> :[ 4483.061662] ? ipt_do_table+0x65c/0x7e0
> :[ 4483.061845] ? ipv4_mtu+0x1ac/0x220
> :[ 4483.062025] ? find_held_lock+0x6d/0xd0
> :[ 4483.062267] ? ip_finish_output+0x435/0x590
> :[ 4483.062462] ip_finish_output+0x435/0x590
> :[ 4483.062649] ? ip_fragment.constprop.45+0xf0/0xf0
> :[ 4483.062860] ? ipv4_nlattr_to_tuple+0x80/0x80 [nf_conntrack_ipv4]
> :[ 4483.063142] ? iptable_nat_ipv4_fn+0x20/0x20 [iptable_nat]
> :[ 4483.063393] ? iptable_nat_ipv4_local_fn+0x20/0x20 [iptable_nat]
> :[ 4483.063634] ? rcu_is_watching+0x81/0xc0
> :[ 4483.063829] ? nf_hook_slow+0xa4/0xe0
> :[ 4483.064031] ip_output+0x12a/0x450
> :[ 4483.064237] ? ip_mc_output+0xc30/0xc30
> :[ 4483.064435] ? ip_fragment.constprop.45+0xf0/0xf0
> :[ 4483.064644] ? tcp_make_synack+0x7b9/0x950
> :[ 4483.064849] ip_build_and_send_pkt+0x2f7/0x480
> :[ 4483.065086] ? ip_local_out+0x90/0x90
> :[ 4483.065283] ? __lockdep_init_map+0x98/0x2a0
> :[ 4483.065485] ? inet_bind_hash+0x130/0x130
> :[ 4483.065681] tcp_v4_send_synack+0x1b7/0x280
> :[ 4483.065878] ? tcp_v4_send_check+0x40/0x40
> :[ 4483.066094] ? ip_mc_output+0x4b0/0xc30
> :[ 4483.066344] ? inet_csk_reqsk_queue_hash_add+0x11b/0x170
> :[ 4483.066569] ? inet_csk_route_child_sock+0x430/0x430
> :[ 4483.066798] tcp_conn_request+0x152e/0x1a70
> :[ 4483.067017] ? tcp_event_data_recv+0x6a0/0x6a0
> :[ 4483.067259] ? __lock_acquire+0x61b/0x2060
> :[ 4483.067483] ? debug_check_no_locks_freed+0x1b0/0x1b0
> :[ 4483.067696] ? print_irqtrace_events+0x110/0x110
> :[ 4483.067902] ? __lock_acquire+0x61b/0x2060
> :[ 4483.068126] ? match_held_lock+0x8d/0x420
> :[ 4483.068376] ? match_held_lock+0x8d/0x420
> :[ 4483.068617] ? match_held_lock+0x8d/0x420
> :[ 4483.068868] ? save_trace+0x1e0/0x1e0
> :[ 4483.069132] ? save_trace+0x1e0/0x1e0
> :[ 4483.069383] ? save_trace+0x1e0/0x1e0
> :[ 4483.069615] ? find_held_lock+0x6d/0xd0
> :[ 4483.069888] ? __lock_is_held+0x71/0xc0
> :[ 4483.070181] ? tcp_rcv_state_process+0x507/0x1fb0
> :[ 4483.070557] tcp_rcv_state_process+0x507/0x1fb0
> :[ 4483.070824] ? rcu_is_watching+0x81/0xc0
> :[ 4483.071103] ? tcp_finish_connect+0x180/0x180
> :[ 4483.071394] ? sk_filter_trim_cap+0x30b/0x510
> :[ 4483.071658] ? sk_skb_is_valid_access+0xd0/0xd0
> :[ 4483.071933] ? tcp_parse_md5sig_option+0x6d/0x90
> :[ 4483.072231] ? tcp_v4_inbound_md5_hash+0xca/0x2a0
> :[ 4483.072530] ? tcp_v4_do_rcv+0x266/0x340
> :[ 4483.072763] tcp_v4_do_rcv+0x266/0x340
> :[ 4483.073018] tcp_v4_rcv+0x1255/0x1290
> :[ 4483.073324] ? tcp_v4_early_demux+0x3b0/0x3b0
> :[ 4483.073583] ? find_held_lock+0xb0/0xd0
> :[ 4483.073840] ip_local_deliver_finish+0x1c9/0x5f0
> :[ 4483.074137] ? ipv4_nlattr_to_tuple+0x80/0x80 [nf_conntrack_ipv4]
> :[ 4483.074425] ? inet_del_offload+0x40/0x40
> :[ 4483.074618] ? nf_hook_slow+0xa4/0xe0
> :[ 4483.074799] ip_local_deliver+0x324/0x410
> :[ 4483.075005] ? ip_call_ra_chain+0x390/0x390
> :[ 4483.075239] ? inet_del_offload+0x40/0x40
> :[ 4483.075460] ip_rcv_finish+0x587/0xbb0
> :[ 4483.075646] ? ip_local_deliver_finish+0x5f0/0x5f0
> :[ 4483.075860] ? find_held_lock+0x6d/0xd0
> :[ 4483.076067] ? ip_rcv+0x70b/0x940
> :[ 4483.076252] ? lock_downgrade+0x320/0x320
> :[ 4483.076556] ? tcp_v4_send_synack+0x280/0x280
> :[ 4483.076757] ? do_add_counters+0x2b0/0x2b0
> :[ 4483.076958] ? rcu_is_watching+0x81/0xc0
> :[ 4483.077179] ? iptable_nat_ipv4_out+0x20/0x20 [iptable_nat]
> :[ 4483.077424] ? nf_hook_slow+0xa4/0xe0
> :[ 4483.077606] ip_rcv+0x54d/0x940
> :[ 4483.077776] ? ip_local_deliver+0x410/0x410
> :[ 4483.077985] ? ip_local_deliver_finish+0x5f0/0x5f0
> :[ 4483.078229] ? match_held_lock+0x8d/0x420
> :[ 4483.078455] ? ip_local_deliver+0x410/0x410
> :[ 4483.078653] __netif_receive_skb_core+0x13d7/0x1a20
> :[ 4483.078884] ? enqueue_to_backlog+0x730/0x730
> :[ 4483.079110] ? __is_insn_slot_addr+0x17b/0x240
> :[ 4483.079332] ? lock_downgrade+0x320/0x320
> :[ 4483.079535] ? find_held_lock+0x6d/0xd0
> :[ 4483.079727] ? is_bpf_text_address+0x60/0xe0
> :[ 4483.079931] ? match_held_lock+0x8d/0x420
> :[ 4483.080138] ? lock_downgrade+0x320/0x320
> :[ 4483.080344] ? save_trace+0x1e0/0x1e0
> :[ 4483.080518] ? lock_release+0x4d0/0x4d0
> :[ 4483.080699] ? __free_insn_slot+0x3e0/0x3e0
> :[ 4483.080892] ? rcu_is_watching+0x81/0xc0
> :[ 4483.081104] ? rcutorture_record_progress+0x10/0x10
> :[ 4483.081339] ? page_fault+0x7b/0x80
> :[ 4483.081514] ? match_held_lock+0x8d/0x420
> :[ 4483.081705] ? save_trace+0x1e0/0x1e0
> :[ 4483.081882] ? find_held_lock+0x6d/0xd0
> :[ 4483.082093] ? inet_gro_receive+0x21e/0x7c0
> :[ 4483.082309] ? lock_downgrade+0x320/0x320
> :[ 4483.082504] ? lock_release+0x4d0/0x4d0
> :[ 4483.082695] ? find_held_lock+0x6d/0xd0
> :[ 4483.082887] ? lock_acquire+0x129/0x320
> :[ 4483.083090] ? lock_acquire+0x129/0x320
> :[ 4483.083293] ? netif_receive_skb_internal+0xb2/0x4b0
> :[ 4483.083519] ? lock_release+0x4d0/0x4d0
> :[ 4483.083703] ? rcu_is_watching+0x81/0xc0
> :[ 4483.083889] ? rcu_is_watching+0x81/0xc0
> :[ 4483.084097] ? rcutorture_record_progress+0x10/0x10
> :[ 4483.084335] ? save_trace+0x1e0/0x1e0
> :[ 4483.084518] ? netif_receive_skb_internal+0xfa/0x4b0
> :[ 4483.084729] netif_receive_skb_internal+0xfa/0x4b0
> :[ 4483.084962] ? dev_cpu_dead+0x500/0x500
> :[ 4483.085176] ? net_rx_action+0xbf0/0xbf0
> :[ 4483.085386] ? __lock_is_held+0x51/0xc0
> :[ 4483.085588] napi_gro_receive+0x262/0x2e0
> :[ 4483.085773] ? dev_gro_receive+0xfe0/0xfe0
> :[ 4483.085966] ? eth_type_trans+0x133/0x280
> :[ 4483.086180] ? eth_gro_receive+0x3d0/0x3d0
> :[ 4483.086411] e1000_clean_rx_irq+0x2fa/0x940 [e1000]
> :[ 4483.086654] ? e1000_clean_jumbo_rx_irq+0x1110/0x1110 [e1000]
> :[ 4483.086904] ? update_max_interval+0x40/0x40
> :[ 4483.087145] ? __lock_is_held+0x71/0xc0
> :[ 4483.087348] ? __calc_delta+0xf6/0x140
> :[ 4483.087529] ? update_min_vruntime+0x7d/0xb0
> :[ 4483.087731] ? e1000_clean_jumbo_rx_irq+0x1110/0x1110 [e1000]
> :[ 4483.087989] e1000_clean+0x65e/0x1190 [e1000]
> :[ 4483.088252] ? e1000_unmap_and_free_tx_resource.isra.45+0x120/0x120 [e1000]
> :[ 4483.088545] ? do_raw_spin_trylock+0x100/0x100
> :[ 4483.088744] ? find_held_lock+0xb0/0xd0
> :[ 4483.088940] ? calc_global_load_tick+0x90/0x170
> :[ 4483.089178] ? match_held_lock+0xa5/0x420
> :[ 4483.089446] ? match_held_lock+0x8d/0x420
> :[ 4483.089637] ? save_trace+0x1e0/0x1e0
> :[ 4483.089824] ? enqueue_hrtimer+0xe2/0x290
> :[ 4483.090023] ? mark_held_locks+0x6e/0x90
> :[ 4483.090241] ? net_rx_action+0x2e3/0xbf0
> :[ 4483.090441] net_rx_action+0x477/0xbf0
> :[ 4483.090647] ? napi_complete_done+0x350/0x350
> :[ 4483.090848] ? lock_downgrade+0x320/0x320
> :[ 4483.091078] ? find_held_lock+0x6d/0xd0
> :[ 4483.091293] ? match_held_lock+0xa5/0x420
> :[ 4483.091481] ? ktime_get+0x18f/0x250
> :[ 4483.091655] ? mark_lock+0x1c9/0xa30
> :[ 4483.091828] ? do_raw_spin_unlock+0x147/0x220
> :[ 4483.092053] ? print_irqtrace_events+0x110/0x110
> :[ 4483.092304] ? pvclock_clocksource_read+0x12c/0x230
> :[ 4483.092525] ? pvclock_read_flags+0x50/0x50
> :[ 4483.092725] ? native_apic_msr_write+0x27/0x30
> :[ 4483.092928] ? lapic_next_event+0x36/0x40
> :[ 4483.093139] ? idle_cpu+0x96/0x110
> :[ 4483.093325] ? task_prio+0x20/0x20
> :[ 4483.093495] ? sched_clock_cpu+0x14/0xe0
> :[ 4483.093683] ? irqtime_account_irq+0xa1/0xd0
> :[ 4483.093893] ? rcu_irq_exit+0x62/0xb0
> :[ 4483.094095] ? irq_exit+0x7a/0x150
> :[ 4483.094322] ? smp_apic_timer_interrupt+0x13e/0x490
> :[ 4483.094534] ? smp_call_function_single_interrupt+0x430/0x430
> :[ 4483.094773] ? trace_hardirqs_off_caller+0x70/0x100
> :[ 4483.095001] ? match_held_lock+0xa5/0x420
> :[ 4483.095227] ? save_trace+0x1e0/0x1e0
> :[ 4483.095417] ? mark_held_locks+0x6e/0x90
> :[ 4483.095599] ? retint_kernel+0x10/0x10
> :[ 4483.095779] ? trace_hardirqs_on_caller+0x17f/0x260
> :[ 4483.096018] ? trace_hardirqs_on_thunk+0x1a/0x1c
> :[ 4483.096263] ? irq_exit+0x7a/0x150
> :[ 4483.096448] ? __lock_is_held+0x51/0xc0
> :[ 4483.096646] __do_softirq+0x1de/0x765
> :[ 4483.096840] ? __irqentry_text_end+0x1fa1d7/0x1fa1d7
> :[ 4483.097081] ? handle_irq+0x109/0x1c0
> :[ 4483.097280] ? lock_downgrade+0x320/0x320
> :[ 4483.097473] ? pvclock_clocksource_read+0x12c/0x230
> :[ 4483.097690] ? pvclock_read_flags+0x50/0x50
> :[ 4483.097884] ? __irq_complete_move+0x15/0x50
> :[ 4483.098100] ? kzalloc.constprop.11+0x15/0x15
> :[ 4483.098314] ? ioapic_ack_level+0xbb/0x1e0
> :[ 4483.098526] ? sched_clock+0x5/0x10
> :[ 4483.098693] ? sched_clock_cpu+0x14/0xe0
> :[ 4483.098899] irq_exit+0x146/0x150
> :[ 4483.099093] do_IRQ+0xb0/0x130
> :[ 4483.099290] common_interrupt+0x91/0x91
> :[ 4483.099474] </IRQ>
> :[ 4483.099601] RIP: 0010:lock_release+0x280/0x4d0
> :[ 4483.099794] RSP: 0000:ffff880011667918 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffda
> :[ 4483.100123] RAX: 0000000000000000 RBX: 1ffff100022ccf26 RCX: ffffffff911cc36f
> :[ 4483.100417] RDX: 0000000000000007 RSI: dffffc0000000000 RDI: 0000000000000246
> :[ 4483.100689] RBP: ffff880062aea7c0 R08: 0000000000000000 R09: 0000000000000000
> :[ 4483.100975] R10: 0000000000000000 R11: 0000000000000000 R12: ffff880062aea7c0
> :[ 4483.101289] R13: 0000000000000001 R14: 0000000000000001 R15: e9e54f45c56e85aa
> :[ 4483.101598] ? lock_release+0x26f/0x4d0
> :[ 4483.101798] ? __handle_mm_fault+0xc29/0x2040
> :[ 4483.102046] ? lock_downgrade+0x320/0x320
> :[ 4483.102257] ? lock_release+0x4d0/0x4d0
> :[ 4483.102448] ? do_raw_spin_trylock+0x100/0x100
> :[ 4483.102670] _raw_spin_unlock+0x1c/0x30
> :[ 4483.102850] __handle_mm_fault+0xc29/0x2040
> :[ 4483.103077] ? __pmd_alloc+0x320/0x320
> :[ 4483.103302] ? handle_mm_fault+0x17a/0x4d0
> :[ 4483.103499] ? lock_downgrade+0x320/0x320
> :[ 4483.103706] ? mem_cgroup_from_task+0xb4/0x170
> :[ 4483.103910] ? rcu_is_watching+0x81/0xc0
> :[ 4483.104137] handle_mm_fault+0x204/0x4d0
> :[ 4483.104345] ? __handle_mm_fault+0x2040/0x2040
> :[ 4483.104546] ? vmacache_find+0xe6/0x110
> :[ 4483.104739] __do_page_fault+0x3b1/0x6e0
> :[ 4483.104935] ? spurious_fault+0x320/0x320
> :[ 4483.105151] ? __do_page_fault+0x5dd/0x6e0
> :[ 4483.105369] do_page_fault+0xb6/0x440
> :[ 4483.105545] ? __do_page_fault+0x6e0/0x6e0
> :[ 4483.105736] ? exit_to_usermode_loop+0xb7/0x170
> :[ 4483.105946] ? trace_raw_output_sys_exit+0x80/0x80
> :[ 4483.106183] ? __do_page_fault+0x5dd/0x6e0
> :[ 4483.106388] ? lockdep_sys_exit+0x16/0x8e
> :[ 4483.106572] ? syscall_return_slowpath+0x1bc/0x2c0
> :[ 4483.106783] ? mark_held_locks+0x1c/0x90
> :[ 4483.107093] ? retint_user+0x18/0x18
> :[ 4483.107281] ? page_fault+0x65/0x80
> :[ 4483.107462] ? trace_hardirqs_off_caller+0xbe/0x100
> :[ 4483.107674] ? trace_hardirqs_off_thunk+0x1a/0x1c
> :[ 4483.107890] ? page_fault+0x65/0x80
> :[ 4483.108079] page_fault+0x7b/0x80
> :[ 4483.108267] RIP: 0033:0x408de0
> :[ 4483.108434] RSP: 002b:00007ffc27610e80 EFLAGS: 00010202
> :[ 4483.108656] RAX: 00007fb1b53da000 RBX: 00007fb1b7152068 RCX: 00007fb1b540a880
> :[ 4483.108939] RDX: 00007fb1b538a870 RSI: 0000000000081000 RDI: 0000000000000000
> :[ 4483.109248] RBP: 00007fb1b7152010 R08: 00007fb1b538a010 R09: 0000000000000000
> :[ 4483.109532] R10: 0000000000000022 R11: 0000000000000246 R12: 0000000000000029
> :[ 4483.109804] R13: 00007fb1b538a010 R14: 000000000115b3b8 R15: 0000000000000000
> :
> :[ 4483.110264] Allocated by task 0:
> :[ 4483.110429] (stack is not available)
> :
> :[ 4483.110702] Freed by task 0:
> :[ 4483.110853] (stack is not available)
> :
> :[ 4483.111159] The buggy address belongs to the object at ffff880067ef7b00
> : which belongs to the cache request_sock_TCP of size 328
> :[ 4483.111629] The buggy address is located 192 bytes inside of
> : 328-byte region [ffff880067ef7b00, ffff880067ef7c48)
> :[ 4483.112063] The buggy address belongs to the page:
> :[ 4483.112289] page:ffffea00019fbd00 count:1 mapcount:0 mapping:0000000000000000 index:0xffff880067ef7e30 compound_mapcount: 0
> :[ 4483.112699] flags: 0xfffe000008100(slab|head)
> :[ 4483.112900] raw: 000fffe000008100 0000000000000000 ffff880067ef7e30 0000000100280002
> :[ 4483.113232] raw: ffff880069909780 ffff880069909780 ffff88006a186f80 0000000000000000
> :[ 4483.113539] page dumped because: kasan: bad access detected
> :
> :[ 4483.113872] Memory state around the buggy address:
> :[ 4483.114108] ffff880067ef7a80: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc
> :[ 4483.114415] ffff880067ef7b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
> :[ 4483.114695] >ffff880067ef7b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
> :[ 4483.114990] ^
> :[ 4483.115246] ffff880067ef7c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
> :[ 4483.115537] ffff880067ef7c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
> :[ 4483.115816] ==================================================================
> :[ 4483.116132] Disabling lock debugging due to kernel taint
>
> /root/linux/./include/linux/cgroup-defs.h:761
> 169c2: 49 8d bc 24 f0 03 00 lea 0x3f0(%r12),%rdi
> 169c9: 00
> 169ca: 41 bd 01 00 00 00 mov $0x1,%r13d
> 169d0: e8 00 00 00 00 callq 169d5 <__dev_queue_xmit+0x2e5>
> 169d5: 41 f6 84 24 f0 03 00 testb $0x1,0x3f0(%r12)
> 169dc: 00 01
> 169de: 74 16 je 169f6 <__dev_queue_xmit+0x306>
> 169e0: 49 8d bc 24 f2 03 00 lea 0x3f2(%r12),%rdi
> 169e7: 00
> 169e8: e8 00 00 00 00 callq 169ed <__dev_queue_xmit+0x2fd>
> 169ed: 45 0f b7 ac 24 f2 03 movzwl 0x3f2(%r12),%r13d
> 169f4: 00 00
>
> static inline u16 sock_cgroup_prioidx(struct sock_cgroup_data *skcd)
> {
> /* fallback to 1 which is always the ID of the root cgroup */
> 761: return (skcd->is_data & 1) ? skcd->prioidx : 1;
> }
Thanks for the report, I have cooked a patch and will send it after tests.
^ permalink raw reply
* Fw: [Bug 199109] New: pptp: kernel printk "recursion detected", and then reboot itself
From: Stephen Hemminger @ 2018-03-14 15:02 UTC (permalink / raw)
To: xeb; +Cc: netdev
Begin forwarded message:
Date: Wed, 14 Mar 2018 06:56:09 +0000
From: bugzilla-daemon@bugzilla.kernel.org
To: stephen@networkplumber.org
Subject: [Bug 199109] New: pptp: kernel printk "recursion detected", and then reboot itself
https://bugzilla.kernel.org/show_bug.cgi?id=199109
Bug ID: 199109
Summary: pptp: kernel printk "recursion detected", and then
reboot itself
Product: Networking
Version: 2.5
Kernel Version: 4.9.77
Hardware: Mips32
OS: Linux
Tree: Mainline
Status: NEW
Severity: high
Priority: P1
Component: IPV4
Assignee: stephen@networkplumber.org
Reporter: xuheng333@zoho.com
Regression: No
Created attachment 274715
--> https://bugzilla.kernel.org/attachment.cgi?id=274715&action=edit
system log
Use openwrt LEDE, (gcc version 5.5.0 (OpenWrt GCC 5.5.0 r5932-9c4fe10) ).
When use pptp, make WAN(eth1) down and then make WAN(eth1) up, pptp will redial
itself. Do this in a loop.
After a while, kernel print "recursion detected" and "net_ratelimit: 49422
callbacks suppressed", print this many times, then system reboot.
When add more printk in driver "driver/net/ppp/ppp_generic.c", fond it fall in
loop in "static void __ppp_xmit_process(struct ppp *ppp)", which called by
"static void __ppp_channel_push(struct channel *pch)".
__ppp_channel_push() locked ppp->xmit_recursion, and loop for long time( while
(!ppp->xmit_pending && (skb = skb_dequeue(&ppp->file.xq))) ppp_send_frame(ppp,
skb); ). Some other thread want to lock ppp->xmit_recursion, but failed.
static void __ppp_channel_push(struct channel *pch)
{
struct sk_buff *skb;
struct ppp *ppp;
spin_lock_bh(&pch->downl);
if (pch->chan) {
while (!skb_queue_empty(&pch->file.xq)) {
skb = skb_dequeue(&pch->file.xq);
if (!pch->chan->ops->start_xmit(pch->chan, skb)) {
/* put the packet back and try again later */
skb_queue_head(&pch->file.xq, skb);
break;
}
}
} else {
/* channel got deregistered */
skb_queue_purge(&pch->file.xq);
}
spin_unlock_bh(&pch->downl);
/* see if there is anything from the attached unit to be sent */
if (skb_queue_empty(&pch->file.xq)) {
ppp = pch->ppp;
if (ppp)
__ppp_xmit_process(ppp);
}
}
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply
* Re: [PATCH RFC bpf-next 1/6] bpf: Hooks for sys_bind
From: Daniel Borkmann @ 2018-03-14 14:55 UTC (permalink / raw)
To: Alexei Starovoitov, davem; +Cc: netdev, kernel-team
In-Reply-To: <043c6e66-aef1-51ad-177c-6e3925d4408a@iogearbox.net>
On 03/14/2018 03:37 PM, Daniel Borkmann wrote:
> On 03/14/2018 04:39 AM, Alexei Starovoitov wrote:
> [...]
>> +#define BPF_CGROUP_RUN_PROG_INET4_BIND(sk, uaddr) \
>> + BPF_CGROUP_RUN_SA_PROG(sk, uaddr, BPF_CGROUP_INET4_BIND)
>> +
>> +#define BPF_CGROUP_RUN_PROG_INET6_BIND(sk, uaddr) \
>> + BPF_CGROUP_RUN_SA_PROG(sk, uaddr, BPF_CGROUP_INET6_BIND)
>> +
>> #define BPF_CGROUP_RUN_PROG_SOCK_OPS(sock_ops) \
>> ({ \
>> int __ret = 0; \
>> @@ -135,6 +154,8 @@ static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; }
>> #define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk,skb) ({ 0; })
>> #define BPF_CGROUP_RUN_PROG_INET_EGRESS(sk,skb) ({ 0; })
>> #define BPF_CGROUP_RUN_PROG_INET_SOCK(sk) ({ 0; })
>> +#define BPF_CGROUP_RUN_PROG_INET4_BIND(sk, uaddr) ({ 0; })
>> +#define BPF_CGROUP_RUN_PROG_INET6_BIND(sk, uaddr) ({ 0; })
>> #define BPF_CGROUP_RUN_PROG_SOCK_OPS(sock_ops) ({ 0; })
>> #define BPF_CGROUP_RUN_PROG_DEVICE_CGROUP(type,major,minor,access) ({ 0; })
>>
>> diff --git a/include/linux/bpf_types.h b/include/linux/bpf_types.h
>> index 19b8349a3809..eefd877f8e68 100644
>> --- a/include/linux/bpf_types.h
>> +++ b/include/linux/bpf_types.h
>> @@ -8,6 +8,8 @@ BPF_PROG_TYPE(BPF_PROG_TYPE_SCHED_ACT, tc_cls_act)
>> BPF_PROG_TYPE(BPF_PROG_TYPE_XDP, xdp)
>> BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_SKB, cg_skb)
>> BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_SOCK, cg_sock)
>> +BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_INET4_BIND, cg_inet4_bind)
>> +BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_INET6_BIND, cg_inet6_bind)
>> BPF_PROG_TYPE(BPF_PROG_TYPE_LWT_IN, lwt_inout)
>> BPF_PROG_TYPE(BPF_PROG_TYPE_LWT_OUT, lwt_inout)
>> BPF_PROG_TYPE(BPF_PROG_TYPE_LWT_XMIT, lwt_xmit)
>> diff --git a/include/linux/filter.h b/include/linux/filter.h
>> index fdb691b520c0..fe469320feab 100644
>> --- a/include/linux/filter.h
>> +++ b/include/linux/filter.h
>> @@ -1001,6 +1001,16 @@ static inline int bpf_tell_extensions(void)
>> return SKF_AD_MAX;
>> }
>>
>> +struct bpf_sock_addr_kern {
>> + struct sock *sk;
>> + struct sockaddr *uaddr;
>> + /* Temporary "register" to make indirect stores to nested structures
>> + * defined above. We need three registers to make such a store, but
>> + * only two (src and dst) are available at convert_ctx_access time
>> + */
>> + u64 tmp_reg;
>> +};
>> +
>> struct bpf_sock_ops_kern {
>> struct sock *sk;
>> u32 op;
>> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
>> index 2a66769e5875..78628a3f3cd8 100644
>> --- a/include/uapi/linux/bpf.h
>> +++ b/include/uapi/linux/bpf.h
>> @@ -133,6 +133,8 @@ enum bpf_prog_type {
>> BPF_PROG_TYPE_SOCK_OPS,
>> BPF_PROG_TYPE_SK_SKB,
>> BPF_PROG_TYPE_CGROUP_DEVICE,
>> + BPF_PROG_TYPE_CGROUP_INET4_BIND,
>> + BPF_PROG_TYPE_CGROUP_INET6_BIND,
>
> Could those all be merged into BPF_PROG_TYPE_SOCK_OPS? I'm slowly getting
> confused by the many sock_*/sk_* prog types we have. The attach hook could
> still be something like BPF_CGROUP_BIND/BPF_CGROUP_CONNECT. Potentially
> storing some prog-type specific void *private_data in prog's aux during
> verification could be a way (similarly as you mention) which can later be
> retrieved at attach time to reject with -ENOTSUPP or such.
>
>> };
>>
>> enum bpf_attach_type {
>> @@ -143,6 +145,8 @@ enum bpf_attach_type {
>> BPF_SK_SKB_STREAM_PARSER,
>> BPF_SK_SKB_STREAM_VERDICT,
>> BPF_CGROUP_DEVICE,
>> + BPF_CGROUP_INET4_BIND,
>> + BPF_CGROUP_INET6_BIND,
>
> Binding to v4 mapped v6 address would work as well, right? Can't this be
> squashed into one attach type as mentioned?
>
>> __MAX_BPF_ATTACH_TYPE
>> };
>>
>> @@ -953,6 +957,26 @@ struct bpf_map_info {
>> __u64 netns_ino;
>> } __attribute__((aligned(8)));
>>
>> +/* User bpf_sock_addr struct to access socket fields and sockaddr struct passed
>> + * by user and intended to be used by socket (e.g. to bind to, depends on
>> + * attach attach type).
>> + */
>> +struct bpf_sock_addr {
>> + __u32 user_family; /* Allows 4-byte read, but no write. */
>> + __u32 user_ip4; /* Allows 1,2,4-byte read and 4-byte write.
>> + * Stored in network byte order.
>> + */
>> + __u32 user_ip6[4]; /* Allows 1,2,4-byte read an 4-byte write.
>> + * Stored in network byte order.
>> + */
>> + __u32 user_port; /* Allows 4-byte read and write.
>> + * Stored in network byte order
>> + */
>> + __u32 family; /* Allows 4-byte read, but no write */
>> + __u32 type; /* Allows 4-byte read, but no write */
>> + __u32 protocol; /* Allows 4-byte read, but no write */
>
> I recall bind to prefix came up from time to time in BPF context in the sense
> to let the app itself be more flexible to bind to BPF prog. Do you see also app
> to be able to add a BPF prog into the array itself?
>
>> +};
>> +
>> /* User bpf_sock_ops struct to access socket values and specify request ops
>> * and their replies.
>> * Some of this fields are in network (bigendian) byte order and may need
>> diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
>> index c1c0b60d3f2f..78ef086a7c2d 100644
>> --- a/kernel/bpf/cgroup.c
>> +++ b/kernel/bpf/cgroup.c
>> @@ -495,6 +495,42 @@ int __cgroup_bpf_run_filter_sk(struct sock *sk,
>> EXPORT_SYMBOL(__cgroup_bpf_run_filter_sk);
>>
>> /**
>> + * __cgroup_bpf_run_filter_sock_addr() - Run a program on a sock and
>> + * provided by user sockaddr
>> + * @sk: sock struct that will use sockaddr
>> + * @uaddr: sockaddr struct provided by user
>> + * @type: The type of program to be exectuted
>> + *
>> + * socket is expected to be of type INET or INET6.
>> + *
>> + * This function will return %-EPERM if an attached program is found and
>> + * returned value != 1 during execution. In all other cases, 0 is returned.
>> + */
>> +int __cgroup_bpf_run_filter_sock_addr(struct sock *sk,
>> + struct sockaddr *uaddr,
>> + enum bpf_attach_type type)
>> +{
>> + struct bpf_sock_addr_kern ctx = {
>> + .sk = sk,
>> + .uaddr = uaddr,
>> + };
>> + struct cgroup *cgrp;
>> + int ret;
>> +
>> + /* Check socket family since not all sockets represent network
>> + * endpoint (e.g. AF_UNIX).
>> + */
>> + if (sk->sk_family != AF_INET && sk->sk_family != AF_INET6)
>> + return 0;
>> +
>> + cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data);
>> + ret = BPF_PROG_RUN_ARRAY(cgrp->bpf.effective[type], &ctx, BPF_PROG_RUN);
>> +
>> + return ret == 1 ? 0 : -EPERM;
>
> Semantics may be a little bit strange, though this would perhaps be at the risk
> of the orchestrator(s) (?). Basically when you run through the prog array, then
> the last attached program in that array has the final /real/ say to which address
> to bind/connect to; all the others decisions can freely be overridden, so this
> is dependent on the order the BPF progs how they were attached. I think we don't
> have this case for context in multi-prog tracing, cgroup/inet (only filtering)
> and cgroup/dev. Although in cgroup/sock_ops for the tcp/BPF hooks progs can already
> override the sock_ops.reply (and sk_txhash which may be less relevant) field from
> the ctx, so whatever one prog is assumed to reply back to the caller, another one
> could override it. Wouldn't it make more sense to just have a single prog instead
> to avoid this override/ordering issue?
Sigh, scratch that last thought ... lack of coffee, it all depends on where in the
cgroup hierarchy you are to be able to override of course.
Thanks,
Daniel
^ permalink raw reply
* [PATCH] lan78xx: Connect phy early
From: Alexander Graf @ 2018-03-14 14:54 UTC (permalink / raw)
To: woojung.huh
Cc: UNGLinuxDriver, netdev, linux-usb, linux-kernel,
Thomas Bogendoerfer, Phil Elwell
When using wicked with a lan78xx device attached to the system, we
end up with ethtool commands issued on the device before an ifup
got issued. That lead to the following crash:
Unable to handle kernel NULL pointer dereference at virtual address 0000039c
pgd = ffff800035b30000
[0000039c] *pgd=0000000000000000
Internal error: Oops: 96000004 [#1] SMP
Modules linked in: [...]
Supported: Yes
CPU: 3 PID: 638 Comm: wickedd Tainted: G E 4.12.14-0-default #1
Hardware name: raspberrypi rpi/rpi, BIOS 2018.03-rc2 02/21/2018
task: ffff800035e74180 task.stack: ffff800036718000
PC is at phy_ethtool_ksettings_get+0x20/0x98
LR is at lan78xx_get_link_ksettings+0x44/0x60 [lan78xx]
pc : [<ffff0000086f7f30>] lr : [<ffff000000dcca84>] pstate: 20000005
sp : ffff80003671bb20
x29: ffff80003671bb20 x28: ffff800035e74180
x27: ffff000008912000 x26: 000000000000001d
x25: 0000000000000124 x24: ffff000008f74d00
x23: 0000004000114809 x22: 0000000000000000
x21: ffff80003671bbd0 x20: 0000000000000000
x19: ffff80003671bbd0 x18: 000000000000040d
x17: 0000000000000001 x16: 0000000000000000
x15: 0000000000000000 x14: ffffffffffffffff
x13: 0000000000000000 x12: 0000000000000020
x11: 0101010101010101 x10: fefefefefefefeff
x9 : 7f7f7f7f7f7f7f7f x8 : fefefeff31677364
x7 : 0000000080808080 x6 : ffff80003671bc9c
x5 : ffff80003671b9f8 x4 : ffff80002c296190
x3 : 0000000000000000 x2 : 0000000000000000
x1 : ffff80003671bbd0 x0 : ffff80003671bc00
Process wickedd (pid: 638, stack limit = 0xffff800036718000)
Call trace:
Exception stack(0xffff80003671b9e0 to 0xffff80003671bb20)
b9e0: ffff80003671bc00 ffff80003671bbd0 0000000000000000 0000000000000000
ba00: ffff80002c296190 ffff80003671b9f8 ffff80003671bc9c 0000000080808080
ba20: fefefeff31677364 7f7f7f7f7f7f7f7f fefefefefefefeff 0101010101010101
ba40: 0000000000000020 0000000000000000 ffffffffffffffff 0000000000000000
ba60: 0000000000000000 0000000000000001 000000000000040d ffff80003671bbd0
ba80: 0000000000000000 ffff80003671bbd0 0000000000000000 0000004000114809
baa0: ffff000008f74d00 0000000000000124 000000000000001d ffff000008912000
bac0: ffff800035e74180 ffff80003671bb20 ffff000000dcca84 ffff80003671bb20
bae0: ffff0000086f7f30 0000000020000005 ffff80002c296000 ffff800035223900
bb00: 0000ffffffffffff 0000000000000000 ffff80003671bb20 ffff0000086f7f30
[<ffff0000086f7f30>] phy_ethtool_ksettings_get+0x20/0x98
[<ffff000000dcca84>] lan78xx_get_link_ksettings+0x44/0x60 [lan78xx]
[<ffff0000087cbc40>] ethtool_get_settings+0x68/0x210
[<ffff0000087cc0d4>] dev_ethtool+0x214/0x2180
[<ffff0000087e5008>] dev_ioctl+0x400/0x630
[<ffff00000879dd00>] sock_do_ioctl+0x70/0x88
[<ffff00000879f5f8>] sock_ioctl+0x208/0x368
[<ffff0000082cde10>] do_vfs_ioctl+0xb0/0x848
[<ffff0000082ce634>] SyS_ioctl+0x8c/0xa8
Exception stack(0xffff80003671bec0 to 0xffff80003671c000)
bec0: 0000000000000009 0000000000008946 0000fffff4e841d0 0000aa0032687465
bee0: 0000aaaafa2319d4 0000fffff4e841d4 0000000032687465 0000000032687465
bf00: 000000000000001d 7f7fff7f7f7f7f7f 72606b622e71ff4c 7f7f7f7f7f7f7f7f
bf20: 0101010101010101 0000000000000020 ffffffffffffffff 0000ffff7f510c68
bf40: 0000ffff7f6a9d18 0000ffff7f44ce30 000000000000040d 0000ffff7f6f98f0
bf60: 0000fffff4e842c0 0000000000000001 0000aaaafa2c2e00 0000ffff7f6ab000
bf80: 0000fffff4e842c0 0000ffff7f62a000 0000aaaafa2b9f20 0000aaaafa2c2e00
bfa0: 0000fffff4e84818 0000fffff4e841a0 0000ffff7f5ad0cc 0000fffff4e841a0
bfc0: 0000ffff7f44ce3c 0000000080000000 0000000000000009 000000000000001d
bfe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
The culprit is quite simple: The driver tries to access the phy left and right,
but only actually has a working reference to it when the device is up.
The fix thus is quite simple too: Get a reference to the phy on probe already
and keep it even when the device is going down.
With this patch applied, I can successfully run wicked on my system and bring
the interface up and down as many times as I want, without getting NULL pointer
dereferences in between.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
drivers/net/usb/lan78xx.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 60a604cc7647..931cc124ab0c 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -2082,8 +2082,6 @@ static int lan78xx_phy_init(struct lan78xx_net *dev)
dev->fc_autoneg = phydev->autoneg;
- phy_start(phydev);
-
netif_dbg(dev, ifup, dev->net, "phy initialised successfully");
return 0;
@@ -2512,9 +2510,7 @@ static int lan78xx_open(struct net_device *net)
if (ret < 0)
goto done;
- ret = lan78xx_phy_init(dev);
- if (ret < 0)
- goto done;
+ phy_start(net->phydev);
/* for Link Check */
if (dev->urb_intr) {
@@ -2575,13 +2571,7 @@ static int lan78xx_stop(struct net_device *net)
if (timer_pending(&dev->stat_monitor))
del_timer_sync(&dev->stat_monitor);
- phy_unregister_fixup_for_uid(PHY_KSZ9031RNX, 0xfffffff0);
- phy_unregister_fixup_for_uid(PHY_LAN8835, 0xfffffff0);
-
phy_stop(net->phydev);
- phy_disconnect(net->phydev);
-
- net->phydev = NULL;
clear_bit(EVENT_DEV_OPEN, &dev->flags);
netif_stop_queue(net);
@@ -3481,6 +3471,11 @@ static void lan78xx_disconnect(struct usb_interface *intf)
net = dev->net;
unregister_netdev(net);
+ phy_unregister_fixup_for_uid(PHY_KSZ9031RNX, 0xfffffff0);
+ phy_unregister_fixup_for_uid(PHY_LAN8835, 0xfffffff0);
+
+ phy_disconnect(net->phydev);
+
cancel_delayed_work_sync(&dev->wq);
usb_scuttle_anchored_urbs(&dev->deferred);
@@ -3634,6 +3629,10 @@ static int lan78xx_probe(struct usb_interface *intf,
pm_runtime_set_autosuspend_delay(&udev->dev,
DEFAULT_AUTOSUSPEND_DELAY);
+ ret = lan78xx_phy_init(dev);
+ if (ret < 0)
+ return ret;
+
return 0;
out3:
--
2.12.3
^ permalink raw reply related
* Re: [PATCH] brcmfmac: drop Inter-Access Point Protocol packets by default
From: Arend van Spriel @ 2018-03-14 14:44 UTC (permalink / raw)
To: Kalle Valo, Rafał Miłecki
Cc: Franky Lin, Hante Meuleman, Chi-Hsien Lin, Wright Feng,
Pieter-Paul Giesberts, James Hughes,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
brcm80211-dev-list.pdl-dY08KVG/lbpWk0Htik3J/w,
brcm80211-dev-list-+wT8y+m8/X5BDgjK7y7TUQ,
netdev-u79uwXL29TY76Z2rM5mHXA, Linus Lüssing, Felix Fietkau,
bridge-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
Rafał Miłecki
In-Reply-To: <878tau7n23.fsf-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
On 3/14/2018 3:24 PM, Kalle Valo wrote:
>> +config BRCMFMAC_IAPP
>> >+ bool "Partial support for obsoleted Inter-Access Point Protocol"
>> >+ depends on BRCMFMAC
>> >+ ---help---
>> >+ Most of Broadcom's firmwares can send 802.11f ADD frame every
>> >+ time new STA connects to the AP interface. Some recent ones
>> >+ can also disassociate STA when they receive such a frame.
>> >+
>> >+ It's important to understand this behavior can lead to a local
>> >+ DoS security issue. Attacker may trigger disassociation of any
>> >+ STA by sending a proper Ethernet frame to the wireless
>> >+ interface.
>> >+
>> >+ Moreover this feature may break AP interfaces in some specific
>> >+ setups. This applies e.g. to the bridge with hairpin mode
>> >+ enabled and IFLA_BRPORT_MCAST_TO_UCAST set. IAPP packet
>> >+ generated by a firmware will get passed back to the wireless
>> >+ interface and cause immediate disassociation of just-connected
>> >+ STA.
> Sorry for jumping late, but does it really make sense to have a Kconfig
> option for this? I don't think we should add a Kconfig option for every
> strange feature, there should be stronger reasons (size savings etc)
> before adding a Kconfig option.
>
> And in this case the size savings can't be much. Wouldn't a module
> parameter be simpler for a functionality change like this?
Hi Kalle,
Good to be wary about Kconfig option. So my reason for asking a Kconfig
option is that this is directly in the datapaths (tx and rx) so I prefer
to disable/enable it compile time rather then runtime.
Regards,
Arend
^ permalink raw reply
* [PATCH 11/16] treewide: simplify Kconfig dependencies for removed archs
From: Arnd Bergmann @ 2018-03-14 14:43 UTC (permalink / raw)
To: linux-arch
Cc: linux-rtc, linux-pwm, linux-fbdev, linux-watchdog, Arnd Bergmann,
linux-mm, netdev, linux-usb, linux-wireless, linux-kernel,
dri-devel, linux-spi, linux-block, linux-ide, linux-input,
linux-fsdevel
In-Reply-To: <20180314143529.1456168-1-arnd@arndb.de>
A lot of Kconfig symbols have architecture specific dependencies.
In those cases that depend on architectures we have already removed,
they can be omitted.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
block/bounce.c | 2 +-
drivers/ide/Kconfig | 2 +-
drivers/ide/ide-generic.c | 12 +-----------
drivers/input/joystick/analog.c | 2 +-
drivers/isdn/hisax/Kconfig | 10 +++++-----
drivers/net/ethernet/davicom/Kconfig | 2 +-
drivers/net/ethernet/smsc/Kconfig | 6 +++---
drivers/net/wireless/cisco/Kconfig | 2 +-
drivers/pwm/Kconfig | 2 +-
drivers/rtc/Kconfig | 2 +-
drivers/spi/Kconfig | 4 ++--
drivers/usb/musb/Kconfig | 2 +-
drivers/video/console/Kconfig | 3 +--
drivers/watchdog/Kconfig | 6 ------
drivers/watchdog/Makefile | 6 ------
fs/Kconfig.binfmt | 5 ++---
fs/minix/Kconfig | 2 +-
include/linux/ide.h | 7 +------
init/Kconfig | 5 ++---
lib/Kconfig.debug | 13 +++++--------
lib/test_user_copy.c | 2 --
mm/Kconfig | 7 -------
mm/percpu.c | 4 ----
23 files changed, 31 insertions(+), 77 deletions(-)
diff --git a/block/bounce.c b/block/bounce.c
index 6a3e68292273..dd0b93f2a871 100644
--- a/block/bounce.c
+++ b/block/bounce.c
@@ -31,7 +31,7 @@
static struct bio_set *bounce_bio_set, *bounce_bio_split;
static mempool_t *page_pool, *isa_page_pool;
-#if defined(CONFIG_HIGHMEM) || defined(CONFIG_NEED_BOUNCE_POOL)
+#if defined(CONFIG_HIGHMEM)
static __init int init_emergency_pool(void)
{
#if defined(CONFIG_HIGHMEM) && !defined(CONFIG_MEMORY_HOTPLUG)
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
index cf1fb3fb5d26..901b8833847f 100644
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -200,7 +200,7 @@ comment "IDE chipset support/bugfixes"
config IDE_GENERIC
tristate "generic/default IDE chipset support"
- depends on ALPHA || X86 || IA64 || M32R || MIPS || ARCH_RPC
+ depends on ALPHA || X86 || IA64 || MIPS || ARCH_RPC
default ARM && ARCH_RPC
help
This is the generic IDE driver. This driver attaches to the
diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
index 54d7c4685d23..80c0d69b83ac 100644
--- a/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -13,13 +13,10 @@
#include <linux/ide.h>
#include <linux/pci_ids.h>
-/* FIXME: convert arm and m32r to use ide_platform host driver */
+/* FIXME: convert arm to use ide_platform host driver */
#ifdef CONFIG_ARM
#include <asm/irq.h>
#endif
-#ifdef CONFIG_M32R
-#include <asm/m32r.h>
-#endif
#define DRV_NAME "ide_generic"
@@ -35,13 +32,6 @@ static const struct ide_port_info ide_generic_port_info = {
#ifdef CONFIG_ARM
static const u16 legacy_bases[] = { 0x1f0 };
static const int legacy_irqs[] = { IRQ_HARDDISK };
-#elif defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_MAPPI2) || \
- defined(CONFIG_PLAT_OPSPUT)
-static const u16 legacy_bases[] = { 0x1f0 };
-static const int legacy_irqs[] = { PLD_IRQ_CFIREQ };
-#elif defined(CONFIG_PLAT_MAPPI3)
-static const u16 legacy_bases[] = { 0x1f0, 0x170 };
-static const int legacy_irqs[] = { PLD_IRQ_CFIREQ, PLD_IRQ_IDEIREQ };
#elif defined(CONFIG_ALPHA)
static const u16 legacy_bases[] = { 0x1f0, 0x170, 0x1e8, 0x168 };
static const int legacy_irqs[] = { 14, 15, 11, 10 };
diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c
index be1b4921f22a..eefac7978f93 100644
--- a/drivers/input/joystick/analog.c
+++ b/drivers/input/joystick/analog.c
@@ -163,7 +163,7 @@ static unsigned int get_time_pit(void)
#define GET_TIME(x) do { x = (unsigned int)rdtsc(); } while (0)
#define DELTA(x,y) ((y)-(x))
#define TIME_NAME "TSC"
-#elif defined(__alpha__) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_RISCV) || defined(CONFIG_TILE)
+#elif defined(__alpha__) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_RISCV)
#define GET_TIME(x) do { x = get_cycles(); } while (0)
#define DELTA(x,y) ((y)-(x))
#define TIME_NAME "get_cycles"
diff --git a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig
index eb83d94ab4fe..38cfc8baae19 100644
--- a/drivers/isdn/hisax/Kconfig
+++ b/drivers/isdn/hisax/Kconfig
@@ -109,7 +109,7 @@ config HISAX_16_3
config HISAX_TELESPCI
bool "Teles PCI"
- depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+ depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || (XTENSA && !CPU_LITTLE_ENDIAN)))
help
This enables HiSax support for the Teles PCI.
See <file:Documentation/isdn/README.HiSax> on how to configure it.
@@ -237,7 +237,7 @@ config HISAX_MIC
config HISAX_NETJET
bool "NETjet card"
- depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN) || MICROBLAZE))
+ depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || (XTENSA && !CPU_LITTLE_ENDIAN) || MICROBLAZE))
depends on VIRT_TO_BUS
help
This enables HiSax support for the NetJet from Traverse
@@ -249,7 +249,7 @@ config HISAX_NETJET
config HISAX_NETJET_U
bool "NETspider U card"
- depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN) || MICROBLAZE))
+ depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || (XTENSA && !CPU_LITTLE_ENDIAN) || MICROBLAZE))
depends on VIRT_TO_BUS
help
This enables HiSax support for the Netspider U interface ISDN card
@@ -318,7 +318,7 @@ config HISAX_GAZEL
config HISAX_HFC_PCI
bool "HFC PCI-Bus cards"
- depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+ depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || (XTENSA && !CPU_LITTLE_ENDIAN)))
help
This enables HiSax support for the HFC-S PCI 2BDS0 based cards.
@@ -343,7 +343,7 @@ config HISAX_HFC_SX
config HISAX_ENTERNOW_PCI
bool "Formula-n enter:now PCI card"
- depends on HISAX_NETJET && PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+ depends on HISAX_NETJET && PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || (XTENSA && !CPU_LITTLE_ENDIAN)))
help
This enables HiSax support for the Formula-n enter:now PCI
ISDN card.
diff --git a/drivers/net/ethernet/davicom/Kconfig b/drivers/net/ethernet/davicom/Kconfig
index 7ec2d74f94d3..680a6d983f37 100644
--- a/drivers/net/ethernet/davicom/Kconfig
+++ b/drivers/net/ethernet/davicom/Kconfig
@@ -4,7 +4,7 @@
config DM9000
tristate "DM9000 support"
- depends on ARM || BLACKFIN || MIPS || COLDFIRE || NIOS2
+ depends on ARM || MIPS || COLDFIRE || NIOS2
select CRC32
select MII
---help---
diff --git a/drivers/net/ethernet/smsc/Kconfig b/drivers/net/ethernet/smsc/Kconfig
index 948603e9b905..3da0c573d2ab 100644
--- a/drivers/net/ethernet/smsc/Kconfig
+++ b/drivers/net/ethernet/smsc/Kconfig
@@ -5,8 +5,8 @@
config NET_VENDOR_SMSC
bool "SMC (SMSC)/Western Digital devices"
default y
- depends on ARM || ARM64 || ATARI_ETHERNAT || BLACKFIN || COLDFIRE || \
- ISA || M32R || MAC || MIPS || NIOS2 || PCI || \
+ depends on ARM || ARM64 || ATARI_ETHERNAT || COLDFIRE || \
+ ISA || MAC || MIPS || NIOS2 || PCI || \
PCMCIA || SUPERH || XTENSA || H8300
---help---
If you have a network (Ethernet) card belonging to this class, say Y.
@@ -37,7 +37,7 @@ config SMC91X
select CRC32
select MII
depends on !OF || GPIOLIB
- depends on ARM || ARM64 || ATARI_ETHERNAT || BLACKFIN || COLDFIRE || \
+ depends on ARM || ARM64 || ATARI_ETHERNAT || COLDFIRE || \
M32R || MIPS || NIOS2 || SUPERH || XTENSA || H8300
---help---
This is a driver for SMC's 91x series of Ethernet chipsets,
diff --git a/drivers/net/wireless/cisco/Kconfig b/drivers/net/wireless/cisco/Kconfig
index b22567dff893..8ed0b154bb33 100644
--- a/drivers/net/wireless/cisco/Kconfig
+++ b/drivers/net/wireless/cisco/Kconfig
@@ -33,7 +33,7 @@ config AIRO
config AIRO_CS
tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards"
- depends on CFG80211 && PCMCIA && (BROKEN || !M32R)
+ depends on CFG80211 && PCMCIA
select WIRELESS_EXT
select WEXT_SPY
select WEXT_PRIV
diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index 763ee50ea57d..f16aad3bf5d6 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -43,7 +43,7 @@ config PWM_AB8500
config PWM_ATMEL
tristate "Atmel PWM support"
- depends on ARCH_AT91 || AVR32
+ depends on ARCH_AT91
help
Generic PWM framework driver for Atmel SoC.
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index be5a3dc99c11..46af10ac45fc 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -868,7 +868,7 @@ comment "Platform RTC drivers"
config RTC_DRV_CMOS
tristate "PC-style 'CMOS'"
- depends on X86 || ARM || M32R || PPC || MIPS || SPARC64
+ depends on X86 || ARM || PPC || MIPS || SPARC64
default y if X86
select RTC_MC146818_LIB
help
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 603783976b81..103c13fcefa0 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -72,10 +72,10 @@ config SPI_ARMADA_3700
config SPI_ATMEL
tristate "Atmel SPI Controller"
depends on HAS_DMA
- depends on (ARCH_AT91 || AVR32 || COMPILE_TEST)
+ depends on ARCH_AT91 || COMPILE_TEST
help
This selects a driver for the Atmel SPI Controller, present on
- many AT32 (AVR32) and AT91 (ARM) chips.
+ many AT91 ARM chips.
config SPI_AU1550
tristate "Au1550/Au1200/Au1300 SPI Controller"
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 5506a9c03c1f..e757afc1cfd0 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -87,7 +87,7 @@ config USB_MUSB_DA8XX
config USB_MUSB_TUSB6010
tristate "TUSB6010"
depends on HAS_IOMEM
- depends on (ARCH_OMAP2PLUS || COMPILE_TEST) && !BLACKFIN
+ depends on ARCH_OMAP2PLUS || COMPILE_TEST
depends on NOP_USB_XCEIV = USB_MUSB_HDRC # both built-in or both modules
config USB_MUSB_OMAP2PLUS
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index 005ed87c8216..a9e398c144f8 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -6,8 +6,7 @@ menu "Console display driver support"
config VGA_CONSOLE
bool "VGA text console" if EXPERT || !X86
- depends on !4xx && !PPC_8xx && !SPARC && !M68K && !PARISC && !FRV && \
- !SUPERH && !BLACKFIN && !AVR32 && !CRIS && \
+ depends on !4xx && !PPC_8xx && !SPARC && !M68K && !PARISC && !SUPERH && \
(!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) && \
!ARM64 && !ARC && !MICROBLAZE && !OPENRISC
default y
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 0e19679348d1..79020ce95de2 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -828,10 +828,6 @@ config BFIN_WDT
To compile this driver as a module, choose M here: the
module will be called bfin_wdt.
-# CRIS Architecture
-
-# FRV Architecture
-
# X86 (i386 + ia64 + x86_64) Architecture
config ACQUIRE_WDT
@@ -1431,8 +1427,6 @@ config NIC7018_WDT
To compile this driver as a module, choose M here: the module will be
called nic7018_wdt.
-# M32R Architecture
-
# M68K Architecture
config M54xx_WATCHDOG
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
index 0474d38aa854..1f9a0235f22c 100644
--- a/drivers/watchdog/Makefile
+++ b/drivers/watchdog/Makefile
@@ -94,10 +94,6 @@ obj-$(CONFIG_SPRD_WATCHDOG) += sprd_wdt.o
# BLACKFIN Architecture
obj-$(CONFIG_BFIN_WDT) += bfin_wdt.o
-# CRIS Architecture
-
-# FRV Architecture
-
# X86 (i386 + ia64 + x86_64) Architecture
obj-$(CONFIG_ACQUIRE_WDT) += acquirewdt.o
obj-$(CONFIG_ADVANTECH_WDT) += advantechwdt.o
@@ -146,8 +142,6 @@ obj-$(CONFIG_INTEL_MEI_WDT) += mei_wdt.o
obj-$(CONFIG_NI903X_WDT) += ni903x_wdt.o
obj-$(CONFIG_NIC7018_WDT) += nic7018_wdt.o
-# M32R Architecture
-
# M68K Architecture
obj-$(CONFIG_M54xx_WATCHDOG) += m54xx_wdt.o
diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
index 58c2bbd385ad..57a27c42b5ac 100644
--- a/fs/Kconfig.binfmt
+++ b/fs/Kconfig.binfmt
@@ -1,6 +1,6 @@
config BINFMT_ELF
bool "Kernel support for ELF binaries"
- depends on MMU && (BROKEN || !FRV)
+ depends on MMU
select ELFCORE
default y
---help---
@@ -35,7 +35,7 @@ config ARCH_BINFMT_ELF_STATE
config BINFMT_ELF_FDPIC
bool "Kernel support for FDPIC ELF binaries"
default y if !BINFMT_ELF
- depends on (ARM || FRV || BLACKFIN || (SUPERH32 && !MMU) || C6X)
+ depends on (ARM || (SUPERH32 && !MMU) || C6X)
select ELFCORE
help
ELF FDPIC binaries are based on ELF, but allow the individual load
@@ -90,7 +90,6 @@ config BINFMT_SCRIPT
config BINFMT_FLAT
bool "Kernel support for flat binaries"
depends on !MMU || ARM || M68K
- depends on !FRV || BROKEN
help
Support uClinux FLAT format binaries.
diff --git a/fs/minix/Kconfig b/fs/minix/Kconfig
index f2a0cfcef11d..bcd53a79156f 100644
--- a/fs/minix/Kconfig
+++ b/fs/minix/Kconfig
@@ -18,7 +18,7 @@ config MINIX_FS
config MINIX_FS_NATIVE_ENDIAN
def_bool MINIX_FS
- depends on M32R || MICROBLAZE || MIPS || S390 || SUPERH || SPARC || XTENSA || (M68K && !MMU)
+ depends on MICROBLAZE || MIPS || S390 || SUPERH || SPARC || XTENSA || (M68K && !MMU)
config MINIX_FS_BIG_ENDIAN_16BIT_INDEXED
def_bool MINIX_FS
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 20d42c0d9fb6..1d6f16110eae 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -25,15 +25,10 @@
#include <asm/byteorder.h>
#include <asm/io.h>
-#if defined(CONFIG_CRIS) || defined(CONFIG_FRV)
-# define SUPPORT_VLB_SYNC 0
-#else
-# define SUPPORT_VLB_SYNC 1
-#endif
-
/*
* Probably not wise to fiddle with these
*/
+#define SUPPORT_VLB_SYNC 1
#define IDE_DEFAULT_MAX_FAILURES 1
#define ERROR_MAX 8 /* Max read/write errors per sector */
#define ERROR_RESET 3 /* Reset controller every 4th retry */
diff --git a/init/Kconfig b/init/Kconfig
index a14bcc9724a2..2852692d7c9c 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -998,7 +998,6 @@ config RELAY
config BLK_DEV_INITRD
bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
- depends on BROKEN || !FRV
help
The initial RAM filesystem is a ramfs which is loaded by the
boot loader (loadlin or lilo) and that is mounted as root
@@ -1108,7 +1107,7 @@ config MULTIUSER
config SGETMASK_SYSCALL
bool "sgetmask/ssetmask syscalls support" if EXPERT
- def_bool PARISC || BLACKFIN || M68K || PPC || MIPS || X86 || SPARC || CRIS || MICROBLAZE || SUPERH
+ def_bool PARISC || M68K || PPC || MIPS || X86 || SPARC || MICROBLAZE || SUPERH
---help---
sys_sgetmask and sys_ssetmask are obsolete system calls
no longer supported in libc but still enabled by default in some
@@ -1370,7 +1369,7 @@ config KALLSYMS_ABSOLUTE_PERCPU
config KALLSYMS_BASE_RELATIVE
bool
depends on KALLSYMS
- default !IA64 && !(TILE && 64BIT)
+ default !IA64
help
Instead of emitting them as absolute values in the native word size,
emit the symbol references in the kallsyms table as 32-bit entries,
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 41ac9d294245..6927c6d8d185 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -165,7 +165,7 @@ config DEBUG_INFO_REDUCED
config DEBUG_INFO_SPLIT
bool "Produce split debuginfo in .dwo files"
- depends on DEBUG_INFO && !FRV
+ depends on DEBUG_INFO
help
Generate debug info into separate .dwo files. This significantly
reduces the build directory size for builds with DEBUG_INFO,
@@ -354,10 +354,7 @@ config ARCH_WANT_FRAME_POINTERS
config FRAME_POINTER
bool "Compile the kernel with frame pointers"
- depends on DEBUG_KERNEL && \
- (CRIS || M68K || FRV || UML || \
- SUPERH || BLACKFIN) || \
- ARCH_WANT_FRAME_POINTERS
+ depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS
default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
help
If you say Y here the resulting kernel image will be slightly
@@ -1138,7 +1135,7 @@ config LOCKDEP
bool
depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
select STACKTRACE
- select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND && !S390 && !MICROBLAZE && !ARC && !SCORE && !X86
+ select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND && !S390 && !MICROBLAZE && !ARC && !X86
select KALLSYMS
select KALLSYMS_ALL
@@ -1571,7 +1568,7 @@ config FAULT_INJECTION_STACKTRACE_FILTER
depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
depends on !X86_64
select STACKTRACE
- select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC && !SCORE && !X86
+ select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC && !X86
help
Provide stacktrace filter for fault-injection capabilities
@@ -1969,7 +1966,7 @@ config STRICT_DEVMEM
bool "Filter access to /dev/mem"
depends on MMU && DEVMEM
depends on ARCH_HAS_DEVMEM_IS_ALLOWED
- default y if TILE || PPC || X86 || ARM64
+ default y if PPC || X86 || ARM64
---help---
If this option is disabled, you allow userspace (root) access to all
of memory, including kernel and userspace memory. Accidental
diff --git a/lib/test_user_copy.c b/lib/test_user_copy.c
index a6556f3364d1..e161f0498f42 100644
--- a/lib/test_user_copy.c
+++ b/lib/test_user_copy.c
@@ -31,8 +31,6 @@
* their capability at compile-time, we just have to opt-out certain archs.
*/
#if BITS_PER_LONG == 64 || (!(defined(CONFIG_ARM) && !defined(MMU)) && \
- !defined(CONFIG_BLACKFIN) && \
- !defined(CONFIG_M32R) && \
!defined(CONFIG_M68K) && \
!defined(CONFIG_MICROBLAZE) && \
!defined(CONFIG_NIOS2) && \
diff --git a/mm/Kconfig b/mm/Kconfig
index abefa573bcd8..d5004d82a1d6 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -278,13 +278,6 @@ config BOUNCE
by default when ZONE_DMA or HIGHMEM is selected, but you
may say n to override this.
-# On the 'tile' arch, USB OHCI needs the bounce pool since tilegx will often
-# have more than 4GB of memory, but we don't currently use the IOTLB to present
-# a 32-bit address to OHCI. So we need to use a bounce pool instead.
-config NEED_BOUNCE_POOL
- bool
- default y if TILE && USB_OHCI_HCD
-
config NR_QUICK
int
depends on QUICKLIST
diff --git a/mm/percpu.c b/mm/percpu.c
index 50e7fdf84055..79e3549cab0f 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -2719,11 +2719,7 @@ void __init setup_per_cpu_areas(void)
if (pcpu_setup_first_chunk(ai, fc) < 0)
panic("Failed to initialize percpu areas.");
-#ifdef CONFIG_CRIS
-#warning "the CRIS architecture has physical and virtual addresses confused"
-#else
pcpu_free_alloc_info(ai);
-#endif
}
#endif /* CONFIG_SMP */
--
2.9.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related
* Re: [PATCH] netlink: make sure nladdr has correct size in netlink_connect()
From: Eric Dumazet @ 2018-03-14 14:40 UTC (permalink / raw)
To: Alexander Potapenko; +Cc: Dmitriy Vyukov, David Miller, Networking, LKML
In-Reply-To: <CAG_fn=VMj0KDqr24Mx71QBZjHzJDdQi0OthA-E1YcB0q=Sk0BA@mail.gmail.com>
On Wed, Mar 14, 2018 at 7:16 AM, Alexander Potapenko <glider@google.com> wrote:
>
>
>
> On Wed, Mar 14, 2018 at 3:11 PM Eric Dumazet <edumazet@google.com> wrote:
>>
>> On Wed, Mar 14, 2018 at 7:03 AM, Alexander Potapenko <glider@google.com>
>> wrote:
>> > KMSAN reports use of uninitialized memory in the case when |alen| is
>> > smaller than sizeof(struct netlink_sock), and therefore |nladdr| isn't
>> > fully copied from the userspace.
>> >
>> > Signed-off-by: Alexander Potapenko <glider@google.com>
>> > Fixes: 1da177e4c3f41524 ("Linux-2.6.12-rc2")
>> > ---
>> > net/netlink/af_netlink.c | 3 +++
>> > 1 file changed, 3 insertions(+)
>> >
>> > diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
>> > index 07e8478068f0..5d49b39e81c3 100644
>> > --- a/net/netlink/af_netlink.c
>> > +++ b/net/netlink/af_netlink.c
>> > @@ -1085,6 +1085,9 @@ static int netlink_connect(struct socket *sock,
>> > struct sockaddr *addr,
>> > if (addr->sa_family != AF_NETLINK)
>> > return -EINVAL;
>> >
>> > + if (alen < sizeof(struct netlink_sock))
>> > + return -EINVAL;
>> > +
>> >
>>
>> Hmmm. How was this patch tested exactly ?
>
> You're absolutely right, I should have been using sizeof(sockaddr_nl).
> The reproducer that I used to trigger the bug was passing alen=2, so the
> patch still worked despite being incorrect.
> Is there any generic set of networking tests that I can use for such bugs?
There are upstream tests in tools/testing/selftests/
In your case, making sure tools like iproute2 ss are still working
would have done the job.
^ permalink raw reply
* Re: [PATCH RFC bpf-next 1/6] bpf: Hooks for sys_bind
From: Daniel Borkmann @ 2018-03-14 14:37 UTC (permalink / raw)
To: Alexei Starovoitov, davem; +Cc: netdev, kernel-team
In-Reply-To: <20180314033934.3502167-2-ast@kernel.org>
On 03/14/2018 04:39 AM, Alexei Starovoitov wrote:
[...]
> +#define BPF_CGROUP_RUN_PROG_INET4_BIND(sk, uaddr) \
> + BPF_CGROUP_RUN_SA_PROG(sk, uaddr, BPF_CGROUP_INET4_BIND)
> +
> +#define BPF_CGROUP_RUN_PROG_INET6_BIND(sk, uaddr) \
> + BPF_CGROUP_RUN_SA_PROG(sk, uaddr, BPF_CGROUP_INET6_BIND)
> +
> #define BPF_CGROUP_RUN_PROG_SOCK_OPS(sock_ops) \
> ({ \
> int __ret = 0; \
> @@ -135,6 +154,8 @@ static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; }
> #define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk,skb) ({ 0; })
> #define BPF_CGROUP_RUN_PROG_INET_EGRESS(sk,skb) ({ 0; })
> #define BPF_CGROUP_RUN_PROG_INET_SOCK(sk) ({ 0; })
> +#define BPF_CGROUP_RUN_PROG_INET4_BIND(sk, uaddr) ({ 0; })
> +#define BPF_CGROUP_RUN_PROG_INET6_BIND(sk, uaddr) ({ 0; })
> #define BPF_CGROUP_RUN_PROG_SOCK_OPS(sock_ops) ({ 0; })
> #define BPF_CGROUP_RUN_PROG_DEVICE_CGROUP(type,major,minor,access) ({ 0; })
>
> diff --git a/include/linux/bpf_types.h b/include/linux/bpf_types.h
> index 19b8349a3809..eefd877f8e68 100644
> --- a/include/linux/bpf_types.h
> +++ b/include/linux/bpf_types.h
> @@ -8,6 +8,8 @@ BPF_PROG_TYPE(BPF_PROG_TYPE_SCHED_ACT, tc_cls_act)
> BPF_PROG_TYPE(BPF_PROG_TYPE_XDP, xdp)
> BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_SKB, cg_skb)
> BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_SOCK, cg_sock)
> +BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_INET4_BIND, cg_inet4_bind)
> +BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_INET6_BIND, cg_inet6_bind)
> BPF_PROG_TYPE(BPF_PROG_TYPE_LWT_IN, lwt_inout)
> BPF_PROG_TYPE(BPF_PROG_TYPE_LWT_OUT, lwt_inout)
> BPF_PROG_TYPE(BPF_PROG_TYPE_LWT_XMIT, lwt_xmit)
> diff --git a/include/linux/filter.h b/include/linux/filter.h
> index fdb691b520c0..fe469320feab 100644
> --- a/include/linux/filter.h
> +++ b/include/linux/filter.h
> @@ -1001,6 +1001,16 @@ static inline int bpf_tell_extensions(void)
> return SKF_AD_MAX;
> }
>
> +struct bpf_sock_addr_kern {
> + struct sock *sk;
> + struct sockaddr *uaddr;
> + /* Temporary "register" to make indirect stores to nested structures
> + * defined above. We need three registers to make such a store, but
> + * only two (src and dst) are available at convert_ctx_access time
> + */
> + u64 tmp_reg;
> +};
> +
> struct bpf_sock_ops_kern {
> struct sock *sk;
> u32 op;
> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
> index 2a66769e5875..78628a3f3cd8 100644
> --- a/include/uapi/linux/bpf.h
> +++ b/include/uapi/linux/bpf.h
> @@ -133,6 +133,8 @@ enum bpf_prog_type {
> BPF_PROG_TYPE_SOCK_OPS,
> BPF_PROG_TYPE_SK_SKB,
> BPF_PROG_TYPE_CGROUP_DEVICE,
> + BPF_PROG_TYPE_CGROUP_INET4_BIND,
> + BPF_PROG_TYPE_CGROUP_INET6_BIND,
Could those all be merged into BPF_PROG_TYPE_SOCK_OPS? I'm slowly getting
confused by the many sock_*/sk_* prog types we have. The attach hook could
still be something like BPF_CGROUP_BIND/BPF_CGROUP_CONNECT. Potentially
storing some prog-type specific void *private_data in prog's aux during
verification could be a way (similarly as you mention) which can later be
retrieved at attach time to reject with -ENOTSUPP or such.
> };
>
> enum bpf_attach_type {
> @@ -143,6 +145,8 @@ enum bpf_attach_type {
> BPF_SK_SKB_STREAM_PARSER,
> BPF_SK_SKB_STREAM_VERDICT,
> BPF_CGROUP_DEVICE,
> + BPF_CGROUP_INET4_BIND,
> + BPF_CGROUP_INET6_BIND,
Binding to v4 mapped v6 address would work as well, right? Can't this be
squashed into one attach type as mentioned?
> __MAX_BPF_ATTACH_TYPE
> };
>
> @@ -953,6 +957,26 @@ struct bpf_map_info {
> __u64 netns_ino;
> } __attribute__((aligned(8)));
>
> +/* User bpf_sock_addr struct to access socket fields and sockaddr struct passed
> + * by user and intended to be used by socket (e.g. to bind to, depends on
> + * attach attach type).
> + */
> +struct bpf_sock_addr {
> + __u32 user_family; /* Allows 4-byte read, but no write. */
> + __u32 user_ip4; /* Allows 1,2,4-byte read and 4-byte write.
> + * Stored in network byte order.
> + */
> + __u32 user_ip6[4]; /* Allows 1,2,4-byte read an 4-byte write.
> + * Stored in network byte order.
> + */
> + __u32 user_port; /* Allows 4-byte read and write.
> + * Stored in network byte order
> + */
> + __u32 family; /* Allows 4-byte read, but no write */
> + __u32 type; /* Allows 4-byte read, but no write */
> + __u32 protocol; /* Allows 4-byte read, but no write */
I recall bind to prefix came up from time to time in BPF context in the sense
to let the app itself be more flexible to bind to BPF prog. Do you see also app
to be able to add a BPF prog into the array itself?
> +};
> +
> /* User bpf_sock_ops struct to access socket values and specify request ops
> * and their replies.
> * Some of this fields are in network (bigendian) byte order and may need
> diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
> index c1c0b60d3f2f..78ef086a7c2d 100644
> --- a/kernel/bpf/cgroup.c
> +++ b/kernel/bpf/cgroup.c
> @@ -495,6 +495,42 @@ int __cgroup_bpf_run_filter_sk(struct sock *sk,
> EXPORT_SYMBOL(__cgroup_bpf_run_filter_sk);
>
> /**
> + * __cgroup_bpf_run_filter_sock_addr() - Run a program on a sock and
> + * provided by user sockaddr
> + * @sk: sock struct that will use sockaddr
> + * @uaddr: sockaddr struct provided by user
> + * @type: The type of program to be exectuted
> + *
> + * socket is expected to be of type INET or INET6.
> + *
> + * This function will return %-EPERM if an attached program is found and
> + * returned value != 1 during execution. In all other cases, 0 is returned.
> + */
> +int __cgroup_bpf_run_filter_sock_addr(struct sock *sk,
> + struct sockaddr *uaddr,
> + enum bpf_attach_type type)
> +{
> + struct bpf_sock_addr_kern ctx = {
> + .sk = sk,
> + .uaddr = uaddr,
> + };
> + struct cgroup *cgrp;
> + int ret;
> +
> + /* Check socket family since not all sockets represent network
> + * endpoint (e.g. AF_UNIX).
> + */
> + if (sk->sk_family != AF_INET && sk->sk_family != AF_INET6)
> + return 0;
> +
> + cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data);
> + ret = BPF_PROG_RUN_ARRAY(cgrp->bpf.effective[type], &ctx, BPF_PROG_RUN);
> +
> + return ret == 1 ? 0 : -EPERM;
Semantics may be a little bit strange, though this would perhaps be at the risk
of the orchestrator(s) (?). Basically when you run through the prog array, then
the last attached program in that array has the final /real/ say to which address
to bind/connect to; all the others decisions can freely be overridden, so this
is dependent on the order the BPF progs how they were attached. I think we don't
have this case for context in multi-prog tracing, cgroup/inet (only filtering)
and cgroup/dev. Although in cgroup/sock_ops for the tcp/BPF hooks progs can already
override the sock_ops.reply (and sk_txhash which may be less relevant) field from
the ctx, so whatever one prog is assumed to reply back to the caller, another one
could override it. Wouldn't it make more sense to just have a single prog instead
to avoid this override/ordering issue?
> +}
> +EXPORT_SYMBOL(__cgroup_bpf_run_filter_sock_addr);
> +
> +/**
> * __cgroup_bpf_run_filter_sock_ops() - Run a program on a sock
> * @sk: socket to get cgroup from
> * @sock_ops: bpf_sock_ops_kern struct to pass to program. Contains
> diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
> index e24aa3241387..7f86542aa42c 100644
> --- a/kernel/bpf/syscall.c
> +++ b/kernel/bpf/syscall.c
> @@ -1376,6 +1376,12 @@ static int bpf_prog_attach(const union bpf_attr *attr)
> case BPF_CGROUP_INET_SOCK_CREATE:
> ptype = BPF_PROG_TYPE_CGROUP_SOCK;
> break;
> + case BPF_CGROUP_INET4_BIND:
> + ptype = BPF_PROG_TYPE_CGROUP_INET4_BIND;
> + break;
> + case BPF_CGROUP_INET6_BIND:
> + ptype = BPF_PROG_TYPE_CGROUP_INET6_BIND;
> + break;
> case BPF_CGROUP_SOCK_OPS:
> ptype = BPF_PROG_TYPE_SOCK_OPS;
> break;
> @@ -1431,6 +1437,12 @@ static int bpf_prog_detach(const union bpf_attr *attr)
> case BPF_CGROUP_INET_SOCK_CREATE:
> ptype = BPF_PROG_TYPE_CGROUP_SOCK;
> break;
> + case BPF_CGROUP_INET4_BIND:
> + ptype = BPF_PROG_TYPE_CGROUP_INET4_BIND;
> + break;
> + case BPF_CGROUP_INET6_BIND:
> + ptype = BPF_PROG_TYPE_CGROUP_INET6_BIND;
> + break;
> case BPF_CGROUP_SOCK_OPS:
> ptype = BPF_PROG_TYPE_SOCK_OPS;
> break;
> @@ -1478,6 +1490,8 @@ static int bpf_prog_query(const union bpf_attr *attr,
> case BPF_CGROUP_INET_INGRESS:
> case BPF_CGROUP_INET_EGRESS:
> case BPF_CGROUP_INET_SOCK_CREATE:
> + case BPF_CGROUP_INET4_BIND:
> + case BPF_CGROUP_INET6_BIND:
> case BPF_CGROUP_SOCK_OPS:
> case BPF_CGROUP_DEVICE:
> break;
> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> index eb79a34359c0..01b54afcb762 100644
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c
> @@ -3872,6 +3872,8 @@ static int check_return_code(struct bpf_verifier_env *env)
> switch (env->prog->type) {
> case BPF_PROG_TYPE_CGROUP_SKB:
> case BPF_PROG_TYPE_CGROUP_SOCK:
> + case BPF_PROG_TYPE_CGROUP_INET4_BIND:
> + case BPF_PROG_TYPE_CGROUP_INET6_BIND:
> case BPF_PROG_TYPE_SOCK_OPS:
> case BPF_PROG_TYPE_CGROUP_DEVICE:
> break;
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox