Skip to content

Commit 0682150

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from David Miller: 1) Fix jmp to 1st instruction in x64 JIT, from Alexei Starovoitov. 2) Severl kTLS fixes in mlx5 driver, from Tariq Toukan. 3) Fix severe performance regression due to lack of SKB coalescing of fragments during local delivery, from Guillaume Nault. 4) Error path memory leak in sch_taprio, from Ivan Khoronzhuk. 5) Fix batched events in skbedit packet action, from Roman Mashak. 6) Propagate VLAN TX offload to hw_enc_features in bond and team drivers, from Yue Haibing. 7) RXRPC local endpoint refcounting fix and read after free in rxrpc_queue_local(), from David Howells. 8) Fix endian bug in ibmveth multicast list handling, from Thomas Falcon. 9) Oops, make nlmsg_parse() wrap around the correct function, __nlmsg_parse not __nla_parse(). Fix from David Ahern. 10) Memleak in sctp_scend_reset_streams(), fro Zheng Bin. 11) Fix memory leak in cxgb4, from Wenwen Wang. 12) Yet another race in AF_PACKET, from Eric Dumazet. 13) Fix false detection of retransmit failures in tipc, from Tuong Lien. 14) Use after free in ravb_tstamp_skb, from Tho Vu. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (101 commits) ravb: Fix use-after-free ravb_tstamp_skb netfilter: nf_tables: map basechain priority to hardware priority net: sched: use major priority number as hardware priority wimax/i2400m: fix a memory leak bug net: cavium: fix driver name ibmvnic: Unmap DMA address of TX descriptor buffers after use bnxt_en: Fix to include flow direction in L2 key bnxt_en: Use correct src_fid to determine direction of the flow bnxt_en: Suppress HWRM errors for HWRM_NVM_GET_VARIABLE command bnxt_en: Fix handling FRAG_ERR when NVM_INSTALL_UPDATE cmd fails bnxt_en: Improve RX doorbell sequence. bnxt_en: Fix VNIC clearing logic for 57500 chips. net: kalmia: fix memory leaks cx82310_eth: fix a memory leak bug bnx2x: Fix VF's VLAN reconfiguration in reload. Bluetooth: Add debug setting for changing minimum encryption key size tipc: fix false detection of retransmit failures lan78xx: Fix memory leaks MAINTAINERS: r8169: Update path to the driver MAINTAINERS: PHY LIBRARY: Update files in the record ...
2 parents 555df33 + cfef46d commit 0682150

File tree

125 files changed

+1156
-688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+1156
-688
lines changed

Documentation/admin-guide/sysctl/net.rst

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ Table : Subdirectories in /proc/sys/net
3939
802 E802 protocol ax25 AX25
4040
ethernet Ethernet protocol rose X.25 PLP layer
4141
ipv4 IP version 4 x25 X.25 protocol
42-
ipx IPX token-ring IBM token ring
4342
bridge Bridging decnet DEC net
4443
ipv6 IP version 6 tipc TIPC
4544
========= =================== = ========== ==================
@@ -401,33 +400,7 @@ interface.
401400
(network) that the route leads to, the router (may be directly connected), the
402401
route flags, and the device the route is using.
403402

404-
405-
5. IPX
406-
------
407-
408-
The IPX protocol has no tunable values in proc/sys/net.
409-
410-
The IPX protocol does, however, provide proc/net/ipx. This lists each IPX
411-
socket giving the local and remote addresses in Novell format (that is
412-
network:node:port). In accordance with the strange Novell tradition,
413-
everything but the port is in hex. Not_Connected is displayed for sockets that
414-
are not tied to a specific remote address. The Tx and Rx queue sizes indicate
415-
the number of bytes pending for transmission and reception. The state
416-
indicates the state the socket is in and the uid is the owning uid of the
417-
socket.
418-
419-
The /proc/net/ipx_interface file lists all IPX interfaces. For each interface
420-
it gives the network number, the node number, and indicates if the network is
421-
the primary network. It also indicates which device it is bound to (or
422-
Internal for internal networks) and the Frame Type if appropriate. Linux
423-
supports 802.3, 802.2, 802.2 SNAP and DIX (Blue Book) ethernet framing for
424-
IPX.
425-
426-
The /proc/net/ipx_route table holds a list of IPX routes. For each route it
427-
gives the destination network, the router node (or Directly) and the network
428-
address of the router (or Connected) for internal networks.
429-
430-
6. TIPC
403+
5. TIPC
431404
-------
432405

433406
tipc_rmem

Documentation/networking/tls-offload.rst

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -506,21 +506,3 @@ Drivers should ignore the changes to TLS the device feature flags.
506506
These flags will be acted upon accordingly by the core ``ktls`` code.
507507
TLS device feature flags only control adding of new TLS connection
508508
offloads, old connections will remain active after flags are cleared.
509-
510-
Known bugs
511-
==========
512-
513-
skb_orphan() leaks clear text
514-
-----------------------------
515-
516-
Currently drivers depend on the :c:member:`sk` member of
517-
:c:type:`struct sk_buff <sk_buff>` to identify segments requiring
518-
encryption. Any operation which removes or does not preserve the socket
519-
association such as :c:func:`skb_orphan` or :c:func:`skb_clone`
520-
will cause the driver to miss the packets and lead to clear text leaks.
521-
522-
Redirects leak clear text
523-
-------------------------
524-
525-
In the RX direction, if segment has already been decrypted by the device
526-
and it gets redirected or mirrored - clear text will be transmitted out.

Documentation/networking/tuntap.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ Ethernet device, which instead of receiving packets from a physical
204204
media, receives them from user space program and instead of sending
205205
packets via physical media sends them to the user space program.
206206

207-
Let's say that you configured IPX on the tap0, then whenever
208-
the kernel sends an IPX packet to tap0, it is passed to the application
207+
Let's say that you configured IPv6 on the tap0, then whenever
208+
the kernel sends an IPv6 packet to tap0, it is passed to the application
209209
(VTun for example). The application encrypts, compresses and sends it to
210210
the other side over TCP or UDP. The application on the other side decompresses
211211
and decrypts the data received and writes the packet to the TAP device,

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ M: Realtek linux nic maintainers <[email protected]>
183183
M: Heiner Kallweit <[email protected]>
184184
185185
S: Maintained
186-
F: drivers/net/ethernet/realtek/r8169.c
186+
F: drivers/net/ethernet/realtek/r8169*
187187

188188
8250/16?50 (AND CLONE UARTS) SERIAL DRIVER
189189
M: Greg Kroah-Hartman <[email protected]>
@@ -6065,7 +6065,7 @@ M: Florian Fainelli <[email protected]>
60656065
M: Heiner Kallweit <[email protected]>
60666066
60676067
S: Maintained
6068-
F: Documentation/ABI/testing/sysfs-bus-mdio
6068+
F: Documentation/ABI/testing/sysfs-class-net-phydev
60696069
F: Documentation/devicetree/bindings/net/ethernet-phy.yaml
60706070
F: Documentation/devicetree/bindings/net/mdio*
60716071
F: Documentation/networking/phy.rst

arch/x86/net/bpf_jit_comp.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,9 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
390390

391391
emit_prologue(&prog, bpf_prog->aux->stack_depth,
392392
bpf_prog_was_classic(bpf_prog));
393+
addrs[0] = prog - temp;
393394

394-
for (i = 0; i < insn_cnt; i++, insn++) {
395+
for (i = 1; i <= insn_cnt; i++, insn++) {
395396
const s32 imm32 = insn->imm;
396397
u32 dst_reg = insn->dst_reg;
397398
u32 src_reg = insn->src_reg;
@@ -1105,7 +1106,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
11051106
extra_pass = true;
11061107
goto skip_init_addrs;
11071108
}
1108-
addrs = kmalloc_array(prog->len, sizeof(*addrs), GFP_KERNEL);
1109+
addrs = kmalloc_array(prog->len + 1, sizeof(*addrs), GFP_KERNEL);
11091110
if (!addrs) {
11101111
prog = orig_prog;
11111112
goto out_addrs;
@@ -1115,7 +1116,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
11151116
* Before first pass, make a rough estimation of addrs[]
11161117
* each BPF instruction is translated to less than 64 bytes
11171118
*/
1118-
for (proglen = 0, i = 0; i < prog->len; i++) {
1119+
for (proglen = 0, i = 0; i <= prog->len; i++) {
11191120
proglen += 64;
11201121
addrs[i] = proglen;
11211122
}
@@ -1180,7 +1181,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
11801181

11811182
if (!image || !prog->is_func || extra_pass) {
11821183
if (image)
1183-
bpf_prog_fill_jited_linfo(prog, addrs);
1184+
bpf_prog_fill_jited_linfo(prog, addrs + 1);
11841185
out_addrs:
11851186
kfree(addrs);
11861187
kfree(jit_data);

drivers/bluetooth/btqca.c

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,27 @@ static int qca_send_reset(struct hci_dev *hdev)
9999
return 0;
100100
}
101101

102+
int qca_send_pre_shutdown_cmd(struct hci_dev *hdev)
103+
{
104+
struct sk_buff *skb;
105+
int err;
106+
107+
bt_dev_dbg(hdev, "QCA pre shutdown cmd");
108+
109+
skb = __hci_cmd_sync(hdev, QCA_PRE_SHUTDOWN_CMD, 0,
110+
NULL, HCI_INIT_TIMEOUT);
111+
if (IS_ERR(skb)) {
112+
err = PTR_ERR(skb);
113+
bt_dev_err(hdev, "QCA preshutdown_cmd failed (%d)", err);
114+
return err;
115+
}
116+
117+
kfree_skb(skb);
118+
119+
return 0;
120+
}
121+
EXPORT_SYMBOL_GPL(qca_send_pre_shutdown_cmd);
122+
102123
static void qca_tlv_check_data(struct rome_config *config,
103124
const struct firmware *fw)
104125
{
@@ -119,6 +140,7 @@ static void qca_tlv_check_data(struct rome_config *config,
119140
BT_DBG("Length\t\t : %d bytes", length);
120141

121142
config->dnld_mode = ROME_SKIP_EVT_NONE;
143+
config->dnld_type = ROME_SKIP_EVT_NONE;
122144

123145
switch (config->type) {
124146
case TLV_TYPE_PATCH:
@@ -268,7 +290,7 @@ static int qca_inject_cmd_complete_event(struct hci_dev *hdev)
268290

269291
evt = skb_put(skb, sizeof(*evt));
270292
evt->ncmd = 1;
271-
evt->opcode = QCA_HCI_CC_OPCODE;
293+
evt->opcode = cpu_to_le16(QCA_HCI_CC_OPCODE);
272294

273295
skb_put_u8(skb, QCA_HCI_CC_SUCCESS);
274296

@@ -323,7 +345,7 @@ static int qca_download_firmware(struct hci_dev *hdev,
323345
*/
324346
if (config->dnld_type == ROME_SKIP_EVT_VSE_CC ||
325347
config->dnld_type == ROME_SKIP_EVT_VSE)
326-
return qca_inject_cmd_complete_event(hdev);
348+
ret = qca_inject_cmd_complete_event(hdev);
327349

328350
out:
329351
release_firmware(fw);
@@ -388,6 +410,9 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
388410
return err;
389411
}
390412

413+
/* Give the controller some time to get ready to receive the NVM */
414+
msleep(10);
415+
391416
/* Download NVM configuration */
392417
config.type = TLV_TYPE_NVM;
393418
if (firmware_name)

drivers/bluetooth/btqca.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#define EDL_PATCH_TLV_REQ_CMD (0x1E)
1414
#define EDL_NVM_ACCESS_SET_REQ_CMD (0x01)
1515
#define MAX_SIZE_PER_TLV_SEGMENT (243)
16+
#define QCA_PRE_SHUTDOWN_CMD (0xFC08)
1617

1718
#define EDL_CMD_REQ_RES_EVT (0x00)
1819
#define EDL_PATCH_VER_RES_EVT (0x19)
@@ -135,6 +136,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
135136
const char *firmware_name);
136137
int qca_read_soc_version(struct hci_dev *hdev, u32 *soc_version);
137138
int qca_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
139+
int qca_send_pre_shutdown_cmd(struct hci_dev *hdev);
138140
static inline bool qca_is_wcn399x(enum qca_btsoc_type soc_type)
139141
{
140142
return soc_type == QCA_WCN3990 || soc_type == QCA_WCN3998;
@@ -167,4 +169,9 @@ static inline bool qca_is_wcn399x(enum qca_btsoc_type soc_type)
167169
{
168170
return false;
169171
}
172+
173+
static inline int qca_send_pre_shutdown_cmd(struct hci_dev *hdev)
174+
{
175+
return -EOPNOTSUPP;
176+
}
170177
#endif

drivers/bluetooth/btusb.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2762,8 +2762,10 @@ static int btusb_mtk_setup_firmware(struct hci_dev *hdev, const char *fwname)
27622762
fw_size = fw->size;
27632763

27642764
/* The size of patch header is 30 bytes, should be skip */
2765-
if (fw_size < 30)
2765+
if (fw_size < 30) {
2766+
err = -EINVAL;
27662767
goto err_release_fw;
2768+
}
27672769

27682770
fw_size -= 30;
27692771
fw_ptr += 30;

drivers/bluetooth/hci_qca.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ static void device_want_to_sleep(struct hci_uart *hu)
705705
unsigned long flags;
706706
struct qca_data *qca = hu->priv;
707707

708-
BT_DBG("hu %p want to sleep", hu);
708+
BT_DBG("hu %p want to sleep in %d state", hu, qca->rx_ibs_state);
709709

710710
spin_lock_irqsave(&qca->hci_ibs_lock, flags);
711711

@@ -720,7 +720,7 @@ static void device_want_to_sleep(struct hci_uart *hu)
720720
break;
721721

722722
case HCI_IBS_RX_ASLEEP:
723-
/* Fall through */
723+
break;
724724

725725
default:
726726
/* Any other state is illegal */
@@ -912,7 +912,7 @@ static int qca_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
912912
if (hdr->evt == HCI_EV_VENDOR)
913913
complete(&qca->drop_ev_comp);
914914

915-
kfree(skb);
915+
kfree_skb(skb);
916916

917917
return 0;
918918
}
@@ -1386,6 +1386,9 @@ static int qca_power_off(struct hci_dev *hdev)
13861386
{
13871387
struct hci_uart *hu = hci_get_drvdata(hdev);
13881388

1389+
/* Perform pre shutdown command */
1390+
qca_send_pre_shutdown_cmd(hdev);
1391+
13891392
qca_power_shutdown(hu);
13901393
return 0;
13911394
}

drivers/net/bonding/bond_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,8 @@ static void bond_compute_features(struct bonding *bond)
11261126
done:
11271127
bond_dev->vlan_features = vlan_features;
11281128
bond_dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL |
1129+
NETIF_F_HW_VLAN_CTAG_TX |
1130+
NETIF_F_HW_VLAN_STAG_TX |
11291131
NETIF_F_GSO_UDP_L4;
11301132
bond_dev->mpls_features = mpls_features;
11311133
bond_dev->gso_max_segs = gso_max_segs;

0 commit comments

Comments
 (0)