Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Browse files Browse the repository at this point in the history
Pull networking fixes from David Miller:

 1) Fix memory leak in netfilter flowtable, from Roi Dayan.

 2) Ref-count leaks in netrom and tipc, from Xiyu Yang.

 3) Fix warning when mptcp socket is never accepted before close, from
    Florian Westphal.

 4) Missed locking in ovs_ct_exit(), from Tonghao Zhang.

 5) Fix large delays during PTP synchornization in cxgb4, from Rahul
    Lakkireddy.

 6) team_mode_get() can hang, from Taehee Yoo.

 7) Need to use kvzalloc() when allocating fw tracer in mlx5 driver,
    from Niklas Schnelle.

 8) Fix handling of bpf XADD on BTF memory, from Jann Horn.

 9) Fix BPF_STX/BPF_B encoding in x86 bpf jit, from Luke Nelson.

10) Missing queue memory release in iwlwifi pcie code, from Johannes
    Berg.

11) Fix NULL deref in macvlan device event, from Taehee Yoo.

12) Initialize lan87xx phy correctly, from Yuiko Oshino.

13) Fix looping between VRF and XFRM lookups, from David Ahern.

14) etf packet scheduler assumes all sockets are full sockets, which is
    not necessarily true. From Eric Dumazet.

15) Fix mptcp data_fin handling in RX path, from Paolo Abeni.

16) fib_select_default() needs to handle nexthop objects, from David
    Ahern.

17) Use GFP_ATOMIC under spinlock in mac80211_hwsim, from Wei Yongjun.

18) vxlan and geneve use wrong nlattr array, from Sabrina Dubroca.

19) Correct rx/tx stats in bcmgenet driver, from Doug Berger.

20) BPF_LDX zero-extension is encoded improperly in x86_32 bpf jit, fix
    from Luke Nelson.

* git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (100 commits)
  selftests/bpf: Fix a couple of broken test_btf cases
  tools/runqslower: Ensure own vmlinux.h is picked up first
  bpf: Make bpf_link_fops static
  bpftool: Respect the -d option in struct_ops cmd
  selftests/bpf: Add test for freplace program with expected_attach_type
  bpf: Propagate expected_attach_type when verifying freplace programs
  bpf: Fix leak in LINK_UPDATE and enforce empty old_prog_fd
  bpf, x86_32: Fix logic error in BPF_LDX zero-extension
  bpf, x86_32: Fix clobbering of dst for BPF_JSET
  bpf, x86_32: Fix incorrect encoding in BPF_LDX zero-extension
  bpf: Fix reStructuredText markup
  net: systemport: suppress warnings on failed Rx SKB allocations
  net: bcmgenet: suppress warnings on failed Rx SKB allocations
  macsec: avoid to set wrong mtu
  mac80211: sta_info: Add lockdep condition for RCU list usage
  mac80211: populate debugfs only after cfg80211 init
  net: bcmgenet: correct per TX/RX ring statistics
  net: meth: remove spurious copyright text
  net: phy: bcm84881: clear settings on link down
  chcr: Fix CPU hard lockup
  ...
  • Loading branch information
torvalds committed Apr 25, 2020
2 parents 5ef58e2 + 167ff13 commit ab51cac
Show file tree
Hide file tree
Showing 114 changed files with 1,131 additions and 397 deletions.
7 changes: 7 additions & 0 deletions Documentation/networking/ip-sysctl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,13 @@ ip_early_demux - BOOLEAN
reduces overall throughput, in such case you should disable it.
Default: 1

ping_group_range - 2 INTEGERS
Restrict ICMP_PROTO datagram sockets to users in the group range.
The default is "1 0", meaning, that nobody (not even root) may
create ping sockets. Setting it to "100 100" would grant permissions
to the single group. "0 4294967295" would enable it for the world, "100
4294967295" would enable it for the users, but not daemons.

tcp_early_demux - BOOLEAN
Enable early demux for established TCP sockets.
Default: 1
Expand Down
45 changes: 22 additions & 23 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ F: drivers/net/hamradio/6pack.c
M: Johannes Berg <[email protected]>
L: [email protected]
S: Maintained
W: http://wireless.kernel.org/
W: https://wireless.wiki.kernel.org/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
F: Documentation/driver-api/80211/cfg80211.rst
Expand Down Expand Up @@ -505,7 +505,7 @@ F: drivers/hwmon/adm1029.c
ADM8211 WIRELESS DRIVER
L: [email protected]
S: Orphan
W: http://wireless.kernel.org/
W: https://wireless.wiki.kernel.org/
F: drivers/net/wireless/admtek/adm8211.*

ADP1653 FLASH CONTROLLER DRIVER
Expand Down Expand Up @@ -2850,14 +2850,14 @@ M: Nick Kossifidis <[email protected]>
M: Luis Chamberlain <[email protected]>
L: [email protected]
S: Maintained
W: http://wireless.kernel.org/en/users/Drivers/ath5k
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath5k
F: drivers/net/wireless/ath/ath5k/

ATHEROS ATH6KL WIRELESS DRIVER
M: Kalle Valo <[email protected]>
L: [email protected]
S: Supported
W: http://wireless.kernel.org/en/users/Drivers/ath6kl
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath6kl
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
F: drivers/net/wireless/ath/ath6kl/

Expand Down Expand Up @@ -3020,15 +3020,15 @@ B43 WIRELESS DRIVER
L: [email protected]
L: [email protected]
S: Odd Fixes
W: http://wireless.kernel.org/en/users/Drivers/b43
W: https://wireless.wiki.kernel.org/en/users/Drivers/b43
F: drivers/net/wireless/broadcom/b43/

B43LEGACY WIRELESS DRIVER
M: Larry Finger <[email protected]>
L: [email protected]
L: [email protected]
S: Maintained
W: http://wireless.kernel.org/en/users/Drivers/b43
W: https://wireless.wiki.kernel.org/en/users/Drivers/b43
F: drivers/net/wireless/broadcom/b43legacy/

BACKLIGHT CLASS/SUBSYSTEM
Expand Down Expand Up @@ -3843,7 +3843,7 @@ CARL9170 LINUX COMMUNITY WIRELESS DRIVER
M: Christian Lamparter <[email protected]>
L: [email protected]
S: Maintained
W: http://wireless.kernel.org/en/users/Drivers/carl9170
W: https://wireless.wiki.kernel.org/en/users/Drivers/carl9170
F: drivers/net/wireless/ath/carl9170/

CAVIUM I2C DRIVER
Expand Down Expand Up @@ -5176,6 +5176,7 @@ S: Maintained
F: drivers/soc/fsl/dpio

DPAA2 ETHERNET DRIVER
M: Ioana Ciornei <[email protected]>
M: Ioana Radulescu <[email protected]>
L: [email protected]
S: Maintained
Expand Down Expand Up @@ -10075,7 +10076,7 @@ MAC80211
M: Johannes Berg <[email protected]>
L: [email protected]
S: Maintained
W: http://wireless.kernel.org/
W: https://wireless.wiki.kernel.org/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
F: Documentation/networking/mac80211-injection.txt
Expand Down Expand Up @@ -10705,7 +10706,6 @@ MEDIATEK MT76 WIRELESS LAN DRIVER
M: Felix Fietkau <[email protected]>
M: Lorenzo Bianconi <[email protected]>
R: Ryder Lee <[email protected]>
R: Roy Luo <[email protected]>
L: [email protected]
S: Maintained
F: drivers/net/wireless/mediatek/mt76/
Expand Down Expand Up @@ -12656,7 +12656,7 @@ F: fs/orangefs/
ORINOCO DRIVER
L: [email protected]
S: Orphan
W: http://wireless.kernel.org/en/users/Drivers/orinoco
W: https://wireless.wiki.kernel.org/en/users/Drivers/orinoco
W: http://www.nongnu.org/orinoco/
F: drivers/net/wireless/intersil/orinoco/

Expand All @@ -12682,7 +12682,7 @@ P54 WIRELESS DRIVER
M: Christian Lamparter <[email protected]>
L: [email protected]
S: Maintained
W: http://wireless.kernel.org/en/users/Drivers/p54
W: https://wireless.wiki.kernel.org/en/users/Drivers/p54
F: drivers/net/wireless/intersil/p54/

PACKING
Expand Down Expand Up @@ -13603,7 +13603,7 @@ PRISM54 WIRELESS DRIVER
M: Luis Chamberlain <[email protected]>
L: [email protected]
S: Obsolete
W: http://wireless.kernel.org/en/users/Drivers/p54
W: https://wireless.wiki.kernel.org/en/users/Drivers/p54
F: drivers/net/wireless/intersil/prism54/

PROC FILESYSTEM
Expand Down Expand Up @@ -13944,7 +13944,7 @@ QUALCOMM ATHEROS ATH10K WIRELESS DRIVER
M: Kalle Valo <[email protected]>
L: [email protected]
S: Supported
W: http://wireless.kernel.org/en/users/Drivers/ath10k
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
F: drivers/net/wireless/ath/ath10k/

Expand All @@ -13959,7 +13959,7 @@ QUALCOMM ATHEROS ATH9K WIRELESS DRIVER
M: QCA ath9k Development <[email protected]>
L: [email protected]
S: Supported
W: http://wireless.kernel.org/en/users/Drivers/ath9k
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath9k
F: drivers/net/wireless/ath/ath9k/

QUALCOMM CAMERA SUBSYSTEM DRIVER
Expand Down Expand Up @@ -14056,13 +14056,12 @@ QUALCOMM WCN36XX WIRELESS DRIVER
M: Kalle Valo <[email protected]>
L: [email protected]
S: Supported
W: http://wireless.kernel.org/en/users/Drivers/wcn36xx
W: https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx
T: git git://github.com/KrasnikovEugene/wcn36xx.git
F: drivers/net/wireless/ath/wcn36xx/

QUANTENNA QTNFMAC WIRELESS DRIVER
M: Igor Mitsyanko <[email protected]>
M: Avinash Patil <[email protected]>
M: Sergey Matyukevich <[email protected]>
L: [email protected]
S: Maintained
Expand Down Expand Up @@ -14284,7 +14283,7 @@ REALTEK WIRELESS DRIVER (rtlwifi family)
M: Ping-Ke Shih <[email protected]>
L: [email protected]
S: Maintained
W: http://wireless.kernel.org/
W: https://wireless.wiki.kernel.org/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
F: drivers/net/wireless/realtek/rtlwifi/

Expand Down Expand Up @@ -14419,7 +14418,7 @@ RFKILL
M: Johannes Berg <[email protected]>
L: [email protected]
S: Maintained
W: http://wireless.kernel.org/
W: https://wireless.wiki.kernel.org/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
F: Documentation/ABI/stable/sysfs-class-rfkill
Expand Down Expand Up @@ -14568,7 +14567,7 @@ F: drivers/media/dvb-frontends/rtl2832_sdr*
RTL8180 WIRELESS DRIVER
L: [email protected]
S: Orphan
W: http://wireless.kernel.org/
W: https://wireless.wiki.kernel.org/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
F: drivers/net/wireless/realtek/rtl818x/rtl8180/

Expand All @@ -14578,7 +14577,7 @@ M: Hin-Tak Leung <[email protected]>
M: Larry Finger <[email protected]>
L: [email protected]
S: Maintained
W: http://wireless.kernel.org/
W: https://wireless.wiki.kernel.org/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
F: drivers/net/wireless/realtek/rtl818x/rtl8187/

Expand Down Expand Up @@ -16933,8 +16932,8 @@ F: drivers/media/platform/ti-vpe/
TI WILINK WIRELESS DRIVERS
L: [email protected]
S: Orphan
W: http://wireless.kernel.org/en/users/Drivers/wl12xx
W: http://wireless.kernel.org/en/users/Drivers/wl1251
W: https://wireless.wiki.kernel.org/en/users/Drivers/wl12xx
W: https://wireless.wiki.kernel.org/en/users/Drivers/wl1251
T: git git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx.git
F: drivers/net/wireless/ti/
F: include/linux/wl12xx.h
Expand Down Expand Up @@ -18216,7 +18215,7 @@ M: Maya Erez <[email protected]>
L: [email protected]
L: [email protected]
S: Supported
W: http://wireless.kernel.org/en/users/Drivers/wil6210
W: https://wireless.wiki.kernel.org/en/users/Drivers/wil6210
F: drivers/net/wireless/ath/wil6210/

WIMAX STACK
Expand Down
18 changes: 15 additions & 3 deletions arch/x86/net/bpf_jit_comp.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,19 @@ static bool is_ereg(u32 reg)
BIT(BPF_REG_AX));
}

/*
* is_ereg_8l() == true if BPF register 'reg' is mapped to access x86-64
* lower 8-bit registers dil,sil,bpl,spl,r8b..r15b, which need extra byte
* of encoding. al,cl,dl,bl have simpler encoding.
*/
static bool is_ereg_8l(u32 reg)
{
return is_ereg(reg) ||
(1 << reg) & (BIT(BPF_REG_1) |
BIT(BPF_REG_2) |
BIT(BPF_REG_FP));
}

static bool is_axreg(u32 reg)
{
return reg == BPF_REG_0;
Expand Down Expand Up @@ -598,9 +611,8 @@ static void emit_stx(u8 **pprog, u32 size, u32 dst_reg, u32 src_reg, int off)
switch (size) {
case BPF_B:
/* Emit 'mov byte ptr [rax + off], al' */
if (is_ereg(dst_reg) || is_ereg(src_reg) ||
/* We have to add extra byte for x86 SIL, DIL regs */
src_reg == BPF_REG_1 || src_reg == BPF_REG_2)
if (is_ereg(dst_reg) || is_ereg_8l(src_reg))
/* Add extra byte for eregs or SIL,DIL,BPL in src_reg */
EMIT2(add_2mod(0x40, dst_reg, src_reg), 0x88);
else
EMIT1(0x88);
Expand Down
28 changes: 22 additions & 6 deletions arch/x86/net/bpf_jit_comp32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1847,14 +1847,16 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
case BPF_B:
case BPF_H:
case BPF_W:
if (!bpf_prog->aux->verifier_zext)
if (bpf_prog->aux->verifier_zext)
break;
if (dstk) {
EMIT3(0xC7, add_1reg(0x40, IA32_EBP),
STACK_VAR(dst_hi));
EMIT(0x0, 4);
} else {
EMIT3(0xC7, add_1reg(0xC0, dst_hi), 0);
/* xor dst_hi,dst_hi */
EMIT2(0x33,
add_2reg(0xC0, dst_hi, dst_hi));
}
break;
case BPF_DW:
Expand Down Expand Up @@ -2013,8 +2015,8 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
case BPF_JMP | BPF_JSET | BPF_X:
case BPF_JMP32 | BPF_JSET | BPF_X: {
bool is_jmp64 = BPF_CLASS(insn->code) == BPF_JMP;
u8 dreg_lo = dstk ? IA32_EAX : dst_lo;
u8 dreg_hi = dstk ? IA32_EDX : dst_hi;
u8 dreg_lo = IA32_EAX;
u8 dreg_hi = IA32_EDX;
u8 sreg_lo = sstk ? IA32_ECX : src_lo;
u8 sreg_hi = sstk ? IA32_EBX : src_hi;

Expand All @@ -2026,6 +2028,13 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
add_2reg(0x40, IA32_EBP,
IA32_EDX),
STACK_VAR(dst_hi));
} else {
/* mov dreg_lo,dst_lo */
EMIT2(0x89, add_2reg(0xC0, dreg_lo, dst_lo));
if (is_jmp64)
/* mov dreg_hi,dst_hi */
EMIT2(0x89,
add_2reg(0xC0, dreg_hi, dst_hi));
}

if (sstk) {
Expand All @@ -2050,8 +2059,8 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
case BPF_JMP | BPF_JSET | BPF_K:
case BPF_JMP32 | BPF_JSET | BPF_K: {
bool is_jmp64 = BPF_CLASS(insn->code) == BPF_JMP;
u8 dreg_lo = dstk ? IA32_EAX : dst_lo;
u8 dreg_hi = dstk ? IA32_EDX : dst_hi;
u8 dreg_lo = IA32_EAX;
u8 dreg_hi = IA32_EDX;
u8 sreg_lo = IA32_ECX;
u8 sreg_hi = IA32_EBX;
u32 hi;
Expand All @@ -2064,6 +2073,13 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
add_2reg(0x40, IA32_EBP,
IA32_EDX),
STACK_VAR(dst_hi));
} else {
/* mov dreg_lo,dst_lo */
EMIT2(0x89, add_2reg(0xC0, dreg_lo, dst_lo));
if (is_jmp64)
/* mov dreg_hi,dst_hi */
EMIT2(0x89,
add_2reg(0xC0, dreg_hi, dst_hi));
}

/* mov ecx,imm32 */
Expand Down
6 changes: 2 additions & 4 deletions drivers/crypto/chelsio/chcr_ktls.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,10 @@ static int chcr_ktls_save_keys(struct chcr_ktls_info *tx_info,
static int chcr_ktls_update_connection_state(struct chcr_ktls_info *tx_info,
int new_state)
{
unsigned long flags;

/* This function can be called from both rx (interrupt context) and tx
* queue contexts.
*/
spin_lock_irqsave(&tx_info->lock, flags);
spin_lock_bh(&tx_info->lock);
switch (tx_info->connection_state) {
case KTLS_CONN_CLOSED:
tx_info->connection_state = new_state;
Expand Down Expand Up @@ -169,7 +167,7 @@ static int chcr_ktls_update_connection_state(struct chcr_ktls_info *tx_info,
pr_err("unknown KTLS connection state\n");
break;
}
spin_unlock_irqrestore(&tx_info->lock, flags);
spin_unlock_bh(&tx_info->lock);

return tx_info->connection_state;
}
Expand Down
Loading

0 comments on commit ab51cac

Please sign in to comment.