aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/include/uapi/asm/socket.h3
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c10
-rw-r--r--arch/arm/net/bpf_jit_32.c15
-rw-r--r--arch/avr32/include/uapi/asm/socket.h4
-rw-r--r--arch/cris/include/uapi/asm/socket.h4
-rw-r--r--arch/frv/include/uapi/asm/socket.h4
-rw-r--r--arch/h8300/include/uapi/asm/socket.h4
-rw-r--r--arch/ia64/include/uapi/asm/socket.h4
-rw-r--r--arch/m32r/include/uapi/asm/socket.h4
-rw-r--r--arch/mips/bcm47xx/serial.c2
-rw-r--r--arch/mips/include/uapi/asm/socket.h5
-rw-r--r--arch/mn10300/include/uapi/asm/socket.h4
-rw-r--r--arch/parisc/include/uapi/asm/socket.h3
-rw-r--r--arch/powerpc/include/uapi/asm/socket.h4
-rw-r--r--arch/s390/include/uapi/asm/socket.h4
-rw-r--r--arch/sparc/include/uapi/asm/socket.h3
-rw-r--r--arch/um/drivers/net_kern.c26
-rw-r--r--arch/um/include/shared/net_kern.h1
-rw-r--r--arch/x86/crypto/aesni-intel_glue.c37
-rw-r--r--arch/x86/net/bpf_jit_comp.c40
-rw-r--r--arch/xtensa/include/uapi/asm/socket.h4
21 files changed, 104 insertions, 81 deletions
diff --git a/arch/alpha/include/uapi/asm/socket.h b/arch/alpha/include/uapi/asm/socket.h
index 097c1577735a..c5195524d1ef 100644
--- a/arch/alpha/include/uapi/asm/socket.h
+++ b/arch/alpha/include/uapi/asm/socket.h
@@ -19,7 +19,7 @@
19#define SO_BROADCAST 0x0020 19#define SO_BROADCAST 0x0020
20#define SO_LINGER 0x0080 20#define SO_LINGER 0x0080
21#define SO_OOBINLINE 0x0100 21#define SO_OOBINLINE 0x0100
22/* To add :#define SO_REUSEPORT 0x0200 */ 22#define SO_REUSEPORT 0x0200
23 23
24#define SO_TYPE 0x1008 24#define SO_TYPE 0x1008
25#define SO_ERROR 0x1007 25#define SO_ERROR 0x1007
@@ -77,5 +77,6 @@
77/* Instruct lower device to use last 4-bytes of skb data as FCS */ 77/* Instruct lower device to use last 4-bytes of skb data as FCS */
78#define SO_NOFCS 43 78#define SO_NOFCS 43
79 79
80#define SO_LOCK_FILTER 44
80 81
81#endif /* _UAPI_ASM_SOCKET_H */ 82#endif /* _UAPI_ASM_SOCKET_H */
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 3985f35aee06..a4ca63ba7faa 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -309,7 +309,7 @@ static struct omap2_hsmmc_info mmc[] = {
309 .gpio_wp = 63, 309 .gpio_wp = 63,
310 .deferred = true, 310 .deferred = true,
311 }, 311 },
312#ifdef CONFIG_WL12XX_PLATFORM_DATA 312#ifdef CONFIG_WILINK_PLATFORM_DATA
313 { 313 {
314 .name = "wl1271", 314 .name = "wl1271",
315 .mmc = 2, 315 .mmc = 2,
@@ -450,7 +450,7 @@ static struct regulator_init_data omap3evm_vio = {
450 .consumer_supplies = omap3evm_vio_supply, 450 .consumer_supplies = omap3evm_vio_supply,
451}; 451};
452 452
453#ifdef CONFIG_WL12XX_PLATFORM_DATA 453#ifdef CONFIG_WILINK_PLATFORM_DATA
454 454
455#define OMAP3EVM_WLAN_PMENA_GPIO (150) 455#define OMAP3EVM_WLAN_PMENA_GPIO (150)
456#define OMAP3EVM_WLAN_IRQ_GPIO (149) 456#define OMAP3EVM_WLAN_IRQ_GPIO (149)
@@ -563,7 +563,7 @@ static struct omap_board_mux omap35x_board_mux[] __initdata = {
563 OMAP_PIN_OFF_NONE), 563 OMAP_PIN_OFF_NONE),
564 OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | 564 OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
565 OMAP_PIN_OFF_NONE), 565 OMAP_PIN_OFF_NONE),
566#ifdef CONFIG_WL12XX_PLATFORM_DATA 566#ifdef CONFIG_WILINK_PLATFORM_DATA
567 /* WLAN IRQ - GPIO 149 */ 567 /* WLAN IRQ - GPIO 149 */
568 OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), 568 OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
569 569
@@ -601,7 +601,7 @@ static struct omap_board_mux omap36x_board_mux[] __initdata = {
601 OMAP3_MUX(SYS_BOOT4, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), 601 OMAP3_MUX(SYS_BOOT4, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
602 OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), 602 OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
603 OMAP3_MUX(SYS_BOOT6, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), 603 OMAP3_MUX(SYS_BOOT6, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
604#ifdef CONFIG_WL12XX_PLATFORM_DATA 604#ifdef CONFIG_WILINK_PLATFORM_DATA
605 /* WLAN IRQ - GPIO 149 */ 605 /* WLAN IRQ - GPIO 149 */
606 OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), 606 OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
607 607
@@ -637,7 +637,7 @@ static struct gpio omap3_evm_ehci_gpios[] __initdata = {
637 637
638static void __init omap3_evm_wl12xx_init(void) 638static void __init omap3_evm_wl12xx_init(void)
639{ 639{
640#ifdef CONFIG_WL12XX_PLATFORM_DATA 640#ifdef CONFIG_WILINK_PLATFORM_DATA
641 int ret; 641 int ret;
642 642
643 /* WL12xx WLAN Init */ 643 /* WL12xx WLAN Init */
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index a34f1e214116..6828ef6ce80e 100644
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -341,10 +341,17 @@ static void emit_load_be16(u8 cond, u8 r_res, u8 r_addr, struct jit_ctx *ctx)
341 341
342static inline void emit_swap16(u8 r_dst, u8 r_src, struct jit_ctx *ctx) 342static inline void emit_swap16(u8 r_dst, u8 r_src, struct jit_ctx *ctx)
343{ 343{
344 emit(ARM_LSL_R(ARM_R1, r_src, 8), ctx); 344 /* r_dst = (r_src << 8) | (r_src >> 8) */
345 emit(ARM_ORR_S(r_dst, ARM_R1, r_src, SRTYPE_LSL, 8), ctx); 345 emit(ARM_LSL_I(ARM_R1, r_src, 8), ctx);
346 emit(ARM_LSL_I(r_dst, r_dst, 8), ctx); 346 emit(ARM_ORR_S(r_dst, ARM_R1, r_src, SRTYPE_LSR, 8), ctx);
347 emit(ARM_LSL_R(r_dst, r_dst, 8), ctx); 347
348 /*
349 * we need to mask out the bits set in r_dst[23:16] due to
350 * the first shift instruction.
351 *
352 * note that 0x8ff is the encoded immediate 0x00ff0000.
353 */
354 emit(ARM_BIC_I(r_dst, r_dst, 0x8ff), ctx);
348} 355}
349 356
350#else /* ARMv6+ */ 357#else /* ARMv6+ */
diff --git a/arch/avr32/include/uapi/asm/socket.h b/arch/avr32/include/uapi/asm/socket.h
index 486df68abeec..51c6401582ea 100644
--- a/arch/avr32/include/uapi/asm/socket.h
+++ b/arch/avr32/include/uapi/asm/socket.h
@@ -22,7 +22,7 @@
22#define SO_PRIORITY 12 22#define SO_PRIORITY 12
23#define SO_LINGER 13 23#define SO_LINGER 13
24#define SO_BSDCOMPAT 14 24#define SO_BSDCOMPAT 14
25/* To add :#define SO_REUSEPORT 15 */ 25#define SO_REUSEPORT 15
26#define SO_PASSCRED 16 26#define SO_PASSCRED 16
27#define SO_PEERCRED 17 27#define SO_PEERCRED 17
28#define SO_RCVLOWAT 18 28#define SO_RCVLOWAT 18
@@ -70,4 +70,6 @@
70/* Instruct lower device to use last 4-bytes of skb data as FCS */ 70/* Instruct lower device to use last 4-bytes of skb data as FCS */
71#define SO_NOFCS 43 71#define SO_NOFCS 43
72 72
73#define SO_LOCK_FILTER 44
74
73#endif /* __ASM_AVR32_SOCKET_H */ 75#endif /* __ASM_AVR32_SOCKET_H */
diff --git a/arch/cris/include/uapi/asm/socket.h b/arch/cris/include/uapi/asm/socket.h
index b681b043f6c8..50692b738c75 100644
--- a/arch/cris/include/uapi/asm/socket.h
+++ b/arch/cris/include/uapi/asm/socket.h
@@ -24,7 +24,7 @@
24#define SO_PRIORITY 12 24#define SO_PRIORITY 12
25#define SO_LINGER 13 25#define SO_LINGER 13
26#define SO_BSDCOMPAT 14 26#define SO_BSDCOMPAT 14
27/* To add :#define SO_REUSEPORT 15 */ 27#define SO_REUSEPORT 15
28#define SO_PASSCRED 16 28#define SO_PASSCRED 16
29#define SO_PEERCRED 17 29#define SO_PEERCRED 17
30#define SO_RCVLOWAT 18 30#define SO_RCVLOWAT 18
@@ -72,6 +72,8 @@
72/* Instruct lower device to use last 4-bytes of skb data as FCS */ 72/* Instruct lower device to use last 4-bytes of skb data as FCS */
73#define SO_NOFCS 43 73#define SO_NOFCS 43
74 74
75#define SO_LOCK_FILTER 44
76
75#endif /* _ASM_SOCKET_H */ 77#endif /* _ASM_SOCKET_H */
76 78
77 79
diff --git a/arch/frv/include/uapi/asm/socket.h b/arch/frv/include/uapi/asm/socket.h
index 871f89b7fbda..595391f0f98c 100644
--- a/arch/frv/include/uapi/asm/socket.h
+++ b/arch/frv/include/uapi/asm/socket.h
@@ -22,7 +22,7 @@
22#define SO_PRIORITY 12 22#define SO_PRIORITY 12
23#define SO_LINGER 13 23#define SO_LINGER 13
24#define SO_BSDCOMPAT 14 24#define SO_BSDCOMPAT 14
25/* To add :#define SO_REUSEPORT 15 */ 25#define SO_REUSEPORT 15
26#define SO_PASSCRED 16 26#define SO_PASSCRED 16
27#define SO_PEERCRED 17 27#define SO_PEERCRED 17
28#define SO_RCVLOWAT 18 28#define SO_RCVLOWAT 18
@@ -70,5 +70,7 @@
70/* Instruct lower device to use last 4-bytes of skb data as FCS */ 70/* Instruct lower device to use last 4-bytes of skb data as FCS */
71#define SO_NOFCS 43 71#define SO_NOFCS 43
72 72
73#define SO_LOCK_FILTER 44
74
73#endif /* _ASM_SOCKET_H */ 75#endif /* _ASM_SOCKET_H */
74 76
diff --git a/arch/h8300/include/uapi/asm/socket.h b/arch/h8300/include/uapi/asm/socket.h
index 90a2e573c7e6..43e32621da7d 100644
--- a/arch/h8300/include/uapi/asm/socket.h
+++ b/arch/h8300/include/uapi/asm/socket.h
@@ -22,7 +22,7 @@
22#define SO_PRIORITY 12 22#define SO_PRIORITY 12
23#define SO_LINGER 13 23#define SO_LINGER 13
24#define SO_BSDCOMPAT 14 24#define SO_BSDCOMPAT 14
25/* To add :#define SO_REUSEPORT 15 */ 25#define SO_REUSEPORT 15
26#define SO_PASSCRED 16 26#define SO_PASSCRED 16
27#define SO_PEERCRED 17 27#define SO_PEERCRED 17
28#define SO_RCVLOWAT 18 28#define SO_RCVLOWAT 18
@@ -70,4 +70,6 @@
70/* Instruct lower device to use last 4-bytes of skb data as FCS */ 70/* Instruct lower device to use last 4-bytes of skb data as FCS */
71#define SO_NOFCS 43 71#define SO_NOFCS 43
72 72
73#define SO_LOCK_FILTER 44
74
73#endif /* _ASM_SOCKET_H */ 75#endif /* _ASM_SOCKET_H */
diff --git a/arch/ia64/include/uapi/asm/socket.h b/arch/ia64/include/uapi/asm/socket.h
index 23d6759bb57b..c567adc8bea5 100644
--- a/arch/ia64/include/uapi/asm/socket.h
+++ b/arch/ia64/include/uapi/asm/socket.h
@@ -31,7 +31,7 @@
31#define SO_PRIORITY 12 31#define SO_PRIORITY 12
32#define SO_LINGER 13 32#define SO_LINGER 13
33#define SO_BSDCOMPAT 14 33#define SO_BSDCOMPAT 14
34/* To add :#define SO_REUSEPORT 15 */ 34#define SO_REUSEPORT 15
35#define SO_PASSCRED 16 35#define SO_PASSCRED 16
36#define SO_PEERCRED 17 36#define SO_PEERCRED 17
37#define SO_RCVLOWAT 18 37#define SO_RCVLOWAT 18
@@ -79,4 +79,6 @@
79/* Instruct lower device to use last 4-bytes of skb data as FCS */ 79/* Instruct lower device to use last 4-bytes of skb data as FCS */
80#define SO_NOFCS 43 80#define SO_NOFCS 43
81 81
82#define SO_LOCK_FILTER 44
83
82#endif /* _ASM_IA64_SOCKET_H */ 84#endif /* _ASM_IA64_SOCKET_H */
diff --git a/arch/m32r/include/uapi/asm/socket.h b/arch/m32r/include/uapi/asm/socket.h
index 5e7088a26726..519afa2755db 100644
--- a/arch/m32r/include/uapi/asm/socket.h
+++ b/arch/m32r/include/uapi/asm/socket.h
@@ -22,7 +22,7 @@
22#define SO_PRIORITY 12 22#define SO_PRIORITY 12
23#define SO_LINGER 13 23#define SO_LINGER 13
24#define SO_BSDCOMPAT 14 24#define SO_BSDCOMPAT 14
25/* To add :#define SO_REUSEPORT 15 */ 25#define SO_REUSEPORT 15
26#define SO_PASSCRED 16 26#define SO_PASSCRED 16
27#define SO_PEERCRED 17 27#define SO_PEERCRED 17
28#define SO_RCVLOWAT 18 28#define SO_RCVLOWAT 18
@@ -70,4 +70,6 @@
70/* Instruct lower device to use last 4-bytes of skb data as FCS */ 70/* Instruct lower device to use last 4-bytes of skb data as FCS */
71#define SO_NOFCS 43 71#define SO_NOFCS 43
72 72
73#define SO_LOCK_FILTER 44
74
73#endif /* _ASM_M32R_SOCKET_H */ 75#endif /* _ASM_M32R_SOCKET_H */
diff --git a/arch/mips/bcm47xx/serial.c b/arch/mips/bcm47xx/serial.c
index 57981e4fe2bc..b8ef965705cf 100644
--- a/arch/mips/bcm47xx/serial.c
+++ b/arch/mips/bcm47xx/serial.c
@@ -62,7 +62,7 @@ static int __init uart8250_init_bcma(void)
62 62
63 p->mapbase = (unsigned int) bcma_port->regs; 63 p->mapbase = (unsigned int) bcma_port->regs;
64 p->membase = (void *) bcma_port->regs; 64 p->membase = (void *) bcma_port->regs;
65 p->irq = bcma_port->irq + 2; 65 p->irq = bcma_port->irq;
66 p->uartclk = bcma_port->baud_base; 66 p->uartclk = bcma_port->baud_base;
67 p->regshift = bcma_port->reg_shift; 67 p->regshift = bcma_port->reg_shift;
68 p->iotype = UPIO_MEM; 68 p->iotype = UPIO_MEM;
diff --git a/arch/mips/include/uapi/asm/socket.h b/arch/mips/include/uapi/asm/socket.h
index 17307ab90474..3e68bfbda6bc 100644
--- a/arch/mips/include/uapi/asm/socket.h
+++ b/arch/mips/include/uapi/asm/socket.h
@@ -28,9 +28,7 @@
28#define SO_LINGER 0x0080 /* Block on close of a reliable 28#define SO_LINGER 0x0080 /* Block on close of a reliable
29 socket to transmit pending data. */ 29 socket to transmit pending data. */
30#define SO_OOBINLINE 0x0100 /* Receive out-of-band data in-band. */ 30#define SO_OOBINLINE 0x0100 /* Receive out-of-band data in-band. */
31#if 0 31#define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */
32To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */
33#endif
34 32
35#define SO_TYPE 0x1008 /* Compatible name for SO_STYLE. */ 33#define SO_TYPE 0x1008 /* Compatible name for SO_STYLE. */
36#define SO_STYLE SO_TYPE /* Synonym */ 34#define SO_STYLE SO_TYPE /* Synonym */
@@ -90,5 +88,6 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */
90/* Instruct lower device to use last 4-bytes of skb data as FCS */ 88/* Instruct lower device to use last 4-bytes of skb data as FCS */
91#define SO_NOFCS 43 89#define SO_NOFCS 43
92 90
91#define SO_LOCK_FILTER 44
93 92
94#endif /* _UAPI_ASM_SOCKET_H */ 93#endif /* _UAPI_ASM_SOCKET_H */
diff --git a/arch/mn10300/include/uapi/asm/socket.h b/arch/mn10300/include/uapi/asm/socket.h
index af5366bbfe62..5c7c7c988544 100644
--- a/arch/mn10300/include/uapi/asm/socket.h
+++ b/arch/mn10300/include/uapi/asm/socket.h
@@ -22,7 +22,7 @@
22#define SO_PRIORITY 12 22#define SO_PRIORITY 12
23#define SO_LINGER 13 23#define SO_LINGER 13
24#define SO_BSDCOMPAT 14 24#define SO_BSDCOMPAT 14
25/* To add :#define SO_REUSEPORT 15 */ 25#define SO_REUSEPORT 15
26#define SO_PASSCRED 16 26#define SO_PASSCRED 16
27#define SO_PEERCRED 17 27#define SO_PEERCRED 17
28#define SO_RCVLOWAT 18 28#define SO_RCVLOWAT 18
@@ -70,4 +70,6 @@
70/* Instruct lower device to use last 4-bytes of skb data as FCS */ 70/* Instruct lower device to use last 4-bytes of skb data as FCS */
71#define SO_NOFCS 43 71#define SO_NOFCS 43
72 72
73#define SO_LOCK_FILTER 44
74
73#endif /* _ASM_SOCKET_H */ 75#endif /* _ASM_SOCKET_H */
diff --git a/arch/parisc/include/uapi/asm/socket.h b/arch/parisc/include/uapi/asm/socket.h
index d9ff4731253b..526e4b9aece0 100644
--- a/arch/parisc/include/uapi/asm/socket.h
+++ b/arch/parisc/include/uapi/asm/socket.h
@@ -13,7 +13,7 @@
13#define SO_BROADCAST 0x0020 13#define SO_BROADCAST 0x0020
14#define SO_LINGER 0x0080 14#define SO_LINGER 0x0080
15#define SO_OOBINLINE 0x0100 15#define SO_OOBINLINE 0x0100
16/* To add :#define SO_REUSEPORT 0x0200 */ 16#define SO_REUSEPORT 0x0200
17#define SO_SNDBUF 0x1001 17#define SO_SNDBUF 0x1001
18#define SO_RCVBUF 0x1002 18#define SO_RCVBUF 0x1002
19#define SO_SNDBUFFORCE 0x100a 19#define SO_SNDBUFFORCE 0x100a
@@ -69,6 +69,7 @@
69/* Instruct lower device to use last 4-bytes of skb data as FCS */ 69/* Instruct lower device to use last 4-bytes of skb data as FCS */
70#define SO_NOFCS 0x4024 70#define SO_NOFCS 0x4024
71 71
72#define SO_LOCK_FILTER 0x4025
72 73
73/* O_NONBLOCK clashes with the bits used for socket types. Therefore we 74/* O_NONBLOCK clashes with the bits used for socket types. Therefore we
74 * have to define SOCK_NONBLOCK to a different value here. 75 * have to define SOCK_NONBLOCK to a different value here.
diff --git a/arch/powerpc/include/uapi/asm/socket.h b/arch/powerpc/include/uapi/asm/socket.h
index eb0b1864d400..a26dcaece509 100644
--- a/arch/powerpc/include/uapi/asm/socket.h
+++ b/arch/powerpc/include/uapi/asm/socket.h
@@ -29,7 +29,7 @@
29#define SO_PRIORITY 12 29#define SO_PRIORITY 12
30#define SO_LINGER 13 30#define SO_LINGER 13
31#define SO_BSDCOMPAT 14 31#define SO_BSDCOMPAT 14
32/* To add :#define SO_REUSEPORT 15 */ 32#define SO_REUSEPORT 15
33#define SO_RCVLOWAT 16 33#define SO_RCVLOWAT 16
34#define SO_SNDLOWAT 17 34#define SO_SNDLOWAT 17
35#define SO_RCVTIMEO 18 35#define SO_RCVTIMEO 18
@@ -77,4 +77,6 @@
77/* Instruct lower device to use last 4-bytes of skb data as FCS */ 77/* Instruct lower device to use last 4-bytes of skb data as FCS */
78#define SO_NOFCS 43 78#define SO_NOFCS 43
79 79
80#define SO_LOCK_FILTER 44
81
80#endif /* _ASM_POWERPC_SOCKET_H */ 82#endif /* _ASM_POWERPC_SOCKET_H */
diff --git a/arch/s390/include/uapi/asm/socket.h b/arch/s390/include/uapi/asm/socket.h
index 436d07c23be8..f99eea7fff0f 100644
--- a/arch/s390/include/uapi/asm/socket.h
+++ b/arch/s390/include/uapi/asm/socket.h
@@ -28,7 +28,7 @@
28#define SO_PRIORITY 12 28#define SO_PRIORITY 12
29#define SO_LINGER 13 29#define SO_LINGER 13
30#define SO_BSDCOMPAT 14 30#define SO_BSDCOMPAT 14
31/* To add :#define SO_REUSEPORT 15 */ 31#define SO_REUSEPORT 15
32#define SO_PASSCRED 16 32#define SO_PASSCRED 16
33#define SO_PEERCRED 17 33#define SO_PEERCRED 17
34#define SO_RCVLOWAT 18 34#define SO_RCVLOWAT 18
@@ -76,4 +76,6 @@
76/* Instruct lower device to use last 4-bytes of skb data as FCS */ 76/* Instruct lower device to use last 4-bytes of skb data as FCS */
77#define SO_NOFCS 43 77#define SO_NOFCS 43
78 78
79#define SO_LOCK_FILTER 44
80
79#endif /* _ASM_SOCKET_H */ 81#endif /* _ASM_SOCKET_H */
diff --git a/arch/sparc/include/uapi/asm/socket.h b/arch/sparc/include/uapi/asm/socket.h
index c83a937ead00..cbbad74b2e06 100644
--- a/arch/sparc/include/uapi/asm/socket.h
+++ b/arch/sparc/include/uapi/asm/socket.h
@@ -15,7 +15,7 @@
15#define SO_PEERCRED 0x0040 15#define SO_PEERCRED 0x0040
16#define SO_LINGER 0x0080 16#define SO_LINGER 0x0080
17#define SO_OOBINLINE 0x0100 17#define SO_OOBINLINE 0x0100
18/* To add :#define SO_REUSEPORT 0x0200 */ 18#define SO_REUSEPORT 0x0200
19#define SO_BSDCOMPAT 0x0400 19#define SO_BSDCOMPAT 0x0400
20#define SO_RCVLOWAT 0x0800 20#define SO_RCVLOWAT 0x0800
21#define SO_SNDLOWAT 0x1000 21#define SO_SNDLOWAT 0x1000
@@ -66,6 +66,7 @@
66/* Instruct lower device to use last 4-bytes of skb data as FCS */ 66/* Instruct lower device to use last 4-bytes of skb data as FCS */
67#define SO_NOFCS 0x0027 67#define SO_NOFCS 0x0027
68 68
69#define SO_LOCK_FILTER 0x0028
69 70
70/* Security levels - as per NRL IPv6 - don't actually do anything */ 71/* Security levels - as per NRL IPv6 - don't actually do anything */
71#define SO_SECURITY_AUTHENTICATION 0x5001 72#define SO_SECURITY_AUTHENTICATION 0x5001
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index b1314ebf1f72..d8926c303629 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -274,8 +274,8 @@ static void uml_net_poll_controller(struct net_device *dev)
274static void uml_net_get_drvinfo(struct net_device *dev, 274static void uml_net_get_drvinfo(struct net_device *dev,
275 struct ethtool_drvinfo *info) 275 struct ethtool_drvinfo *info)
276{ 276{
277 strcpy(info->driver, DRIVER_NAME); 277 strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver));
278 strcpy(info->version, "42"); 278 strlcpy(info->version, "42", sizeof(info->version));
279} 279}
280 280
281static const struct ethtool_ops uml_net_ethtool_ops = { 281static const struct ethtool_ops uml_net_ethtool_ops = {
@@ -293,8 +293,9 @@ static void uml_net_user_timer_expire(unsigned long _conn)
293#endif 293#endif
294} 294}
295 295
296static int setup_etheraddr(char *str, unsigned char *addr, char *name) 296static void setup_etheraddr(struct net_device *dev, char *str)
297{ 297{
298 unsigned char *addr = dev->dev_addr;
298 char *end; 299 char *end;
299 int i; 300 int i;
300 301
@@ -334,13 +335,12 @@ static int setup_etheraddr(char *str, unsigned char *addr, char *name)
334 addr[0] | 0x02, addr[1], addr[2], addr[3], addr[4], 335 addr[0] | 0x02, addr[1], addr[2], addr[3], addr[4],
335 addr[5]); 336 addr[5]);
336 } 337 }
337 return 0; 338 return;
338 339
339random: 340random:
340 printk(KERN_INFO 341 printk(KERN_INFO
341 "Choosing a random ethernet address for device %s\n", name); 342 "Choosing a random ethernet address for device %s\n", dev->name);
342 eth_random_addr(addr); 343 eth_hw_addr_random(dev);
343 return 1;
344} 344}
345 345
346static DEFINE_SPINLOCK(devices_lock); 346static DEFINE_SPINLOCK(devices_lock);
@@ -392,7 +392,6 @@ static void eth_configure(int n, void *init, char *mac,
392 struct net_device *dev; 392 struct net_device *dev;
393 struct uml_net_private *lp; 393 struct uml_net_private *lp;
394 int err, size; 394 int err, size;
395 int random_mac;
396 395
397 size = transport->private_size + sizeof(struct uml_net_private); 396 size = transport->private_size + sizeof(struct uml_net_private);
398 397
@@ -419,9 +418,9 @@ static void eth_configure(int n, void *init, char *mac,
419 */ 418 */
420 snprintf(dev->name, sizeof(dev->name), "eth%d", n); 419 snprintf(dev->name, sizeof(dev->name), "eth%d", n);
421 420
422 random_mac = setup_etheraddr(mac, device->mac, dev->name); 421 setup_etheraddr(dev, mac);
423 422
424 printk(KERN_INFO "Netdevice %d (%pM) : ", n, device->mac); 423 printk(KERN_INFO "Netdevice %d (%pM) : ", n, dev->dev_addr);
425 424
426 lp = netdev_priv(dev); 425 lp = netdev_priv(dev);
427 /* This points to the transport private data. It's still clear, but we 426 /* This points to the transport private data. It's still clear, but we
@@ -468,17 +467,12 @@ static void eth_configure(int n, void *init, char *mac,
468 init_timer(&lp->tl); 467 init_timer(&lp->tl);
469 spin_lock_init(&lp->lock); 468 spin_lock_init(&lp->lock);
470 lp->tl.function = uml_net_user_timer_expire; 469 lp->tl.function = uml_net_user_timer_expire;
471 memcpy(lp->mac, device->mac, sizeof(lp->mac)); 470 memcpy(lp->mac, dev->dev_addr, sizeof(lp->mac));
472 471
473 if ((transport->user->init != NULL) && 472 if ((transport->user->init != NULL) &&
474 ((*transport->user->init)(&lp->user, dev) != 0)) 473 ((*transport->user->init)(&lp->user, dev) != 0))
475 goto out_unregister; 474 goto out_unregister;
476 475
477 /* don't use eth_mac_addr, it will not work here */
478 memcpy(dev->dev_addr, device->mac, ETH_ALEN);
479 if (random_mac)
480 dev->addr_assign_type |= NET_ADDR_RANDOM;
481
482 dev->mtu = transport->user->mtu; 476 dev->mtu = transport->user->mtu;
483 dev->netdev_ops = &uml_netdev_ops; 477 dev->netdev_ops = &uml_netdev_ops;
484 dev->ethtool_ops = &uml_net_ethtool_ops; 478 dev->ethtool_ops = &uml_net_ethtool_ops;
diff --git a/arch/um/include/shared/net_kern.h b/arch/um/include/shared/net_kern.h
index 5c367f22595b..012ac87d4900 100644
--- a/arch/um/include/shared/net_kern.h
+++ b/arch/um/include/shared/net_kern.h
@@ -18,7 +18,6 @@ struct uml_net {
18 struct net_device *dev; 18 struct net_device *dev;
19 struct platform_device pdev; 19 struct platform_device pdev;
20 int index; 20 int index;
21 unsigned char mac[ETH_ALEN];
22}; 21};
23 22
24struct uml_net_private { 23struct uml_net_private {
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c
index 1b9c22bea8a7..a0795da22c02 100644
--- a/arch/x86/crypto/aesni-intel_glue.c
+++ b/arch/x86/crypto/aesni-intel_glue.c
@@ -40,10 +40,6 @@
40#include <linux/workqueue.h> 40#include <linux/workqueue.h>
41#include <linux/spinlock.h> 41#include <linux/spinlock.h>
42 42
43#if defined(CONFIG_CRYPTO_CTR) || defined(CONFIG_CRYPTO_CTR_MODULE)
44#define HAS_CTR
45#endif
46
47#if defined(CONFIG_CRYPTO_PCBC) || defined(CONFIG_CRYPTO_PCBC_MODULE) 43#if defined(CONFIG_CRYPTO_PCBC) || defined(CONFIG_CRYPTO_PCBC_MODULE)
48#define HAS_PCBC 44#define HAS_PCBC
49#endif 45#endif
@@ -395,12 +391,6 @@ static int ablk_ctr_init(struct crypto_tfm *tfm)
395 return ablk_init_common(tfm, "__driver-ctr-aes-aesni"); 391 return ablk_init_common(tfm, "__driver-ctr-aes-aesni");
396} 392}
397 393
398#ifdef HAS_CTR
399static int ablk_rfc3686_ctr_init(struct crypto_tfm *tfm)
400{
401 return ablk_init_common(tfm, "rfc3686(__driver-ctr-aes-aesni)");
402}
403#endif
404#endif 394#endif
405 395
406#ifdef HAS_PCBC 396#ifdef HAS_PCBC
@@ -1158,33 +1148,6 @@ static struct crypto_alg aesni_algs[] = { {
1158 .maxauthsize = 16, 1148 .maxauthsize = 16,
1159 }, 1149 },
1160 }, 1150 },
1161#ifdef HAS_CTR
1162}, {
1163 .cra_name = "rfc3686(ctr(aes))",
1164 .cra_driver_name = "rfc3686-ctr-aes-aesni",
1165 .cra_priority = 400,
1166 .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
1167 .cra_blocksize = 1,
1168 .cra_ctxsize = sizeof(struct async_helper_ctx),
1169 .cra_alignmask = 0,
1170 .cra_type = &crypto_ablkcipher_type,
1171 .cra_module = THIS_MODULE,
1172 .cra_init = ablk_rfc3686_ctr_init,
1173 .cra_exit = ablk_exit,
1174 .cra_u = {
1175 .ablkcipher = {
1176 .min_keysize = AES_MIN_KEY_SIZE +
1177 CTR_RFC3686_NONCE_SIZE,
1178 .max_keysize = AES_MAX_KEY_SIZE +
1179 CTR_RFC3686_NONCE_SIZE,
1180 .ivsize = CTR_RFC3686_IV_SIZE,
1181 .setkey = ablk_set_key,
1182 .encrypt = ablk_encrypt,
1183 .decrypt = ablk_decrypt,
1184 .geniv = "seqiv",
1185 },
1186 },
1187#endif
1188#endif 1151#endif
1189#ifdef HAS_PCBC 1152#ifdef HAS_PCBC
1190}, { 1153}, {
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
index d11a47099d33..3cbe45381bbb 100644
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -1,6 +1,6 @@
1/* bpf_jit_comp.c : BPF JIT compiler 1/* bpf_jit_comp.c : BPF JIT compiler
2 * 2 *
3 * Copyright (C) 2011 Eric Dumazet (eric.dumazet@gmail.com) 3 * Copyright (C) 2011-2013 Eric Dumazet (eric.dumazet@gmail.com)
4 * 4 *
5 * This program is free software; you can redistribute it and/or 5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License 6 * modify it under the terms of the GNU General Public License
@@ -124,6 +124,26 @@ static inline void bpf_flush_icache(void *start, void *end)
124#define CHOOSE_LOAD_FUNC(K, func) \ 124#define CHOOSE_LOAD_FUNC(K, func) \
125 ((int)K < 0 ? ((int)K >= SKF_LL_OFF ? func##_negative_offset : func) : func##_positive_offset) 125 ((int)K < 0 ? ((int)K >= SKF_LL_OFF ? func##_negative_offset : func) : func##_positive_offset)
126 126
127/* Helper to find the offset of pkt_type in sk_buff
128 * We want to make sure its still a 3bit field starting at a byte boundary.
129 */
130#define PKT_TYPE_MAX 7
131static int pkt_type_offset(void)
132{
133 struct sk_buff skb_probe = {
134 .pkt_type = ~0,
135 };
136 char *ct = (char *)&skb_probe;
137 unsigned int off;
138
139 for (off = 0; off < sizeof(struct sk_buff); off++) {
140 if (ct[off] == PKT_TYPE_MAX)
141 return off;
142 }
143 pr_err_once("Please fix pkt_type_offset(), as pkt_type couldn't be found\n");
144 return -1;
145}
146
127void bpf_jit_compile(struct sk_filter *fp) 147void bpf_jit_compile(struct sk_filter *fp)
128{ 148{
129 u8 temp[64]; 149 u8 temp[64];
@@ -216,6 +236,7 @@ void bpf_jit_compile(struct sk_filter *fp)
216 case BPF_S_ANC_VLAN_TAG: 236 case BPF_S_ANC_VLAN_TAG:
217 case BPF_S_ANC_VLAN_TAG_PRESENT: 237 case BPF_S_ANC_VLAN_TAG_PRESENT:
218 case BPF_S_ANC_QUEUE: 238 case BPF_S_ANC_QUEUE:
239 case BPF_S_ANC_PKTTYPE:
219 case BPF_S_LD_W_ABS: 240 case BPF_S_LD_W_ABS:
220 case BPF_S_LD_H_ABS: 241 case BPF_S_LD_H_ABS:
221 case BPF_S_LD_B_ABS: 242 case BPF_S_LD_B_ABS:
@@ -536,6 +557,23 @@ void bpf_jit_compile(struct sk_filter *fp)
536 EMIT3(0x83, 0xe0, 0x01); /* and $0x1,%eax */ 557 EMIT3(0x83, 0xe0, 0x01); /* and $0x1,%eax */
537 } 558 }
538 break; 559 break;
560 case BPF_S_ANC_PKTTYPE:
561 {
562 int off = pkt_type_offset();
563
564 if (off < 0)
565 goto out;
566 if (is_imm8(off)) {
567 /* movzbl off8(%rdi),%eax */
568 EMIT4(0x0f, 0xb6, 0x47, off);
569 } else {
570 /* movbl off32(%rdi),%eax */
571 EMIT3(0x0f, 0xb6, 0x87);
572 EMIT(off, 4);
573 }
574 EMIT3(0x83, 0xe0, PKT_TYPE_MAX); /* and $0x7,%eax */
575 break;
576 }
539 case BPF_S_LD_W_ABS: 577 case BPF_S_LD_W_ABS:
540 func = CHOOSE_LOAD_FUNC(K, sk_load_word); 578 func = CHOOSE_LOAD_FUNC(K, sk_load_word);
541common_load: seen |= SEEN_DATAREF; 579common_load: seen |= SEEN_DATAREF;
diff --git a/arch/xtensa/include/uapi/asm/socket.h b/arch/xtensa/include/uapi/asm/socket.h
index 38079be1cf1e..35905cb6e419 100644
--- a/arch/xtensa/include/uapi/asm/socket.h
+++ b/arch/xtensa/include/uapi/asm/socket.h
@@ -32,7 +32,7 @@
32#define SO_PRIORITY 12 32#define SO_PRIORITY 12
33#define SO_LINGER 13 33#define SO_LINGER 13
34#define SO_BSDCOMPAT 14 34#define SO_BSDCOMPAT 14
35/* To add :#define SO_REUSEPORT 15 */ 35#define SO_REUSEPORT 15
36#define SO_PASSCRED 16 36#define SO_PASSCRED 16
37#define SO_PEERCRED 17 37#define SO_PEERCRED 17
38#define SO_RCVLOWAT 18 38#define SO_RCVLOWAT 18
@@ -81,4 +81,6 @@
81/* Instruct lower device to use last 4-bytes of skb data as FCS */ 81/* Instruct lower device to use last 4-bytes of skb data as FCS */
82#define SO_NOFCS 43 82#define SO_NOFCS 43
83 83
84#define SO_LOCK_FILTER 44
85
84#endif /* _XTENSA_SOCKET_H */ 86#endif /* _XTENSA_SOCKET_H */