Skip to content

Commit c88b9b4

Browse files
committed
Merge tag 'net-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from netfilter, bluetooth and bpf. Fairly usual collection of driver and core fixes. The large selftest accompanying one of the fixes is also becoming a common occurrence. Current release - regressions: - ipv6: fix infinite recursion in fib6_dump_done() - net/rds: fix possible null-deref in newly added error path Current release - new code bugs: - net: do not consume a full cacheline for system_page_pool - bpf: fix bpf_arena-related file descriptor leaks in the verifier - drv: ice: fix freeing uninitialized pointers, fixing misuse of the newfangled __free() auto-cleanup Previous releases - regressions: - x86/bpf: fixes the BPF JIT with retbleed=stuff - xen-netfront: add missing skb_mark_for_recycle, fix page pool accounting leaks, revealed by recently added explicit warning - tcp: fix bind() regression for v6-only wildcard and v4-mapped-v6 non-wildcard addresses - Bluetooth: - replace "hci_qca: Set BDA quirk bit if fwnode exists in DT" with better workarounds to un-break some buggy Qualcomm devices - set conn encrypted before conn establishes, fix re-connecting to some headsets which use slightly unusual sequence of msgs - mptcp: - prevent BPF accessing lowat from a subflow socket - don't account accept() of non-MPC client as fallback to TCP - drv: mana: fix Rx DMA datasize and skb_over_panic - drv: i40e: fix VF MAC filter removal Previous releases - always broken: - gro: various fixes related to UDP tunnels - netns crossing problems, incorrect checksum conversions, and incorrect packet transformations which may lead to panics - bpf: support deferring bpf_link dealloc to after RCU grace period - nf_tables: - release batch on table validation from abort path - release mutex after nft_gc_seq_end from abort path - flush pending destroy work before exit_net release - drv: r8169: skip DASH fw status checks when DASH is disabled" * tag 'net-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (81 commits) netfilter: validate user input for expected length net/sched: act_skbmod: prevent kernel-infoleak net: usb: ax88179_178a: avoid the interface always configured as random address net: dsa: sja1105: Fix parameters order in sja1110_pcs_mdio_write_c45() net: ravb: Always update error counters net: ravb: Always process TX descriptor ring netfilter: nf_tables: discard table flag update with pending basechain deletion netfilter: nf_tables: Fix potential data-race in __nft_flowtable_type_get() netfilter: nf_tables: reject new basechain after table flag update netfilter: nf_tables: flush pending destroy work before exit_net release netfilter: nf_tables: release mutex after nft_gc_seq_end from abort path netfilter: nf_tables: release batch on table validation from abort path Revert "tg3: Remove residual error handling in tg3_suspend" tg3: Remove residual error handling in tg3_suspend net: mana: Fix Rx DMA datasize and skb_over_panic net/sched: fix lockdep splat in qdisc_tree_reduce_backlog() net: phy: micrel: lan8814: Fix when enabling/disabling 1-step timestamping net: stmmac: fix rx queue priority assignment net: txgbe: fix i2c dev name cannot match clkdev net: fec: Set mac_managed_pm during probe ...
2 parents ec25bd8 + 1cfa2f1 commit c88b9b4

File tree

85 files changed

+1606
-405
lines changed

Some content is hidden

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

85 files changed

+1606
-405
lines changed

Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ properties:
9494

9595
local-bd-address: true
9696

97+
qcom,local-bd-address-broken:
98+
type: boolean
99+
description:
100+
boot firmware is incorrectly passing the address in big-endian order
97101

98102
required:
99103
- compatible
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
==========================
4+
Devlink E-Switch Attribute
5+
==========================
6+
7+
Devlink E-Switch supports two modes of operation: legacy and switchdev.
8+
Legacy mode operates based on traditional MAC/VLAN steering rules. Switching
9+
decisions are made based on MAC addresses, VLANs, etc. There is limited ability
10+
to offload switching rules to hardware.
11+
12+
On the other hand, switchdev mode allows for more advanced offloading
13+
capabilities of the E-Switch to hardware. In switchdev mode, more switching
14+
rules and logic can be offloaded to the hardware switch ASIC. It enables
15+
representor netdevices that represent the slow path of virtual functions (VFs)
16+
or scalable-functions (SFs) of the device. See more information about
17+
:ref:`Documentation/networking/switchdev.rst <switchdev>` and
18+
:ref:`Documentation/networking/representors.rst <representors>`.
19+
20+
In addition, the devlink E-Switch also comes with other attributes listed
21+
in the following section.
22+
23+
Attributes Description
24+
======================
25+
26+
The following is a list of E-Switch attributes.
27+
28+
.. list-table:: E-Switch attributes
29+
:widths: 8 5 45
30+
31+
* - Name
32+
- Type
33+
- Description
34+
* - ``mode``
35+
- enum
36+
- The mode of the device. The mode can be one of the following:
37+
38+
* ``legacy`` operates based on traditional MAC/VLAN steering
39+
rules.
40+
* ``switchdev`` allows for more advanced offloading capabilities of
41+
the E-Switch to hardware.
42+
* - ``inline-mode``
43+
- enum
44+
- Some HWs need the VF driver to put part of the packet
45+
headers on the TX descriptor so the e-switch can do proper
46+
matching and steering. Support for both switchdev mode and legacy mode.
47+
48+
* ``none`` none.
49+
* ``link`` L2 mode.
50+
* ``network`` L3 mode.
51+
* ``transport`` L4 mode.
52+
* - ``encap-mode``
53+
- enum
54+
- The encapsulation mode of the device. Support for both switchdev mode
55+
and legacy mode. The mode can be one of the following:
56+
57+
* ``none`` Disable encapsulation support.
58+
* ``basic`` Enable encapsulation support.
59+
60+
Example Usage
61+
=============
62+
63+
.. code:: shell
64+
65+
# enable switchdev mode
66+
$ devlink dev eswitch set pci/0000:08:00.0 mode switchdev
67+
68+
# set inline-mode and encap-mode
69+
$ devlink dev eswitch set pci/0000:08:00.0 inline-mode none encap-mode basic
70+
71+
# display devlink device eswitch attributes
72+
$ devlink dev eswitch show pci/0000:08:00.0
73+
pci/0000:08:00.0: mode switchdev inline-mode none encap-mode basic
74+
75+
# enable encap-mode with legacy mode
76+
$ devlink dev eswitch set pci/0000:08:00.0 mode legacy inline-mode none encap-mode basic

Documentation/networking/devlink/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ general.
6767
devlink-selftests
6868
devlink-trap
6969
devlink-linecard
70+
devlink-eswitch-attr
7071

7172
Driver-specific documentation
7273
-----------------------------

Documentation/networking/representors.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.. SPDX-License-Identifier: GPL-2.0
2+
.. _representors:
23

34
=============================
45
Network Function Representors

MAINTAINERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14019,6 +14019,7 @@ F: drivers/net/ethernet/mellanox/mlx4/en_*
1401914019

1402014020
MELLANOX ETHERNET DRIVER (mlx5e)
1402114021
M: Saeed Mahameed <[email protected]>
14022+
M: Tariq Toukan <[email protected]>
1402214023
1402314024
S: Supported
1402414025
W: http://www.mellanox.com
@@ -14086,6 +14087,7 @@ F: include/uapi/rdma/mlx4-abi.h
1408614087
MELLANOX MLX5 core VPI driver
1408714088
M: Saeed Mahameed <[email protected]>
1408814089
M: Leon Romanovsky <[email protected]>
14090+
M: Tariq Toukan <[email protected]>
1408914091
1409014092
1409114093
S: Supported
@@ -23679,7 +23681,6 @@ F: drivers/scsi/vmw_pvscsi.c
2367923681
F: drivers/scsi/vmw_pvscsi.h
2368023682

2368123683
VMWARE VIRTUAL PTP CLOCK DRIVER
23682-
M: Jeff Sipek <[email protected]>
2368323684
R: Ajay Kaher <[email protected]>
2368423685
R: Alexey Makhalov <[email protected]>
2368523686
R: VMware PV-Drivers Reviewers <[email protected]>

arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,8 @@ ap_spi_fp: &spi10 {
944944
vddrf-supply = <&pp1300_l2c>;
945945
vddch0-supply = <&pp3300_l10c>;
946946
max-speed = <3200000>;
947+
948+
qcom,local-bd-address-broken;
947949
};
948950
};
949951

arch/x86/include/asm/alternative.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ extern void callthunks_patch_builtin_calls(void);
117117
extern void callthunks_patch_module_calls(struct callthunk_sites *sites,
118118
struct module *mod);
119119
extern void *callthunks_translate_call_dest(void *dest);
120-
extern int x86_call_depth_emit_accounting(u8 **pprog, void *func);
120+
extern int x86_call_depth_emit_accounting(u8 **pprog, void *func, void *ip);
121121
#else
122122
static __always_inline void callthunks_patch_builtin_calls(void) {}
123123
static __always_inline void
@@ -128,7 +128,7 @@ static __always_inline void *callthunks_translate_call_dest(void *dest)
128128
return dest;
129129
}
130130
static __always_inline int x86_call_depth_emit_accounting(u8 **pprog,
131-
void *func)
131+
void *func, void *ip)
132132
{
133133
return 0;
134134
}

arch/x86/kernel/callthunks.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ static bool is_callthunk(void *addr)
314314
return !bcmp(pad, insn_buff, tmpl_size);
315315
}
316316

317-
int x86_call_depth_emit_accounting(u8 **pprog, void *func)
317+
int x86_call_depth_emit_accounting(u8 **pprog, void *func, void *ip)
318318
{
319319
unsigned int tmpl_size = SKL_TMPL_SIZE;
320320
u8 insn_buff[MAX_PATCH_LEN];
@@ -327,7 +327,7 @@ int x86_call_depth_emit_accounting(u8 **pprog, void *func)
327327
return 0;
328328

329329
memcpy(insn_buff, skl_call_thunk_template, tmpl_size);
330-
apply_relocation(insn_buff, tmpl_size, *pprog,
330+
apply_relocation(insn_buff, tmpl_size, ip,
331331
skl_call_thunk_template, tmpl_size);
332332

333333
memcpy(*pprog, insn_buff, tmpl_size);

arch/x86/net/bpf_jit_comp.c

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ static int emit_call(u8 **pprog, void *func, void *ip)
480480
static int emit_rsb_call(u8 **pprog, void *func, void *ip)
481481
{
482482
OPTIMIZER_HIDE_VAR(func);
483-
x86_call_depth_emit_accounting(pprog, func);
483+
ip += x86_call_depth_emit_accounting(pprog, func, ip);
484484
return emit_patch(pprog, func, ip, 0xE8);
485485
}
486486

@@ -1972,20 +1972,17 @@ st: if (is_imm8(insn->off))
19721972

19731973
/* call */
19741974
case BPF_JMP | BPF_CALL: {
1975-
int offs;
1975+
u8 *ip = image + addrs[i - 1];
19761976

19771977
func = (u8 *) __bpf_call_base + imm32;
19781978
if (tail_call_reachable) {
19791979
RESTORE_TAIL_CALL_CNT(bpf_prog->aux->stack_depth);
1980-
if (!imm32)
1981-
return -EINVAL;
1982-
offs = 7 + x86_call_depth_emit_accounting(&prog, func);
1983-
} else {
1984-
if (!imm32)
1985-
return -EINVAL;
1986-
offs = x86_call_depth_emit_accounting(&prog, func);
1980+
ip += 7;
19871981
}
1988-
if (emit_call(&prog, func, image + addrs[i - 1] + offs))
1982+
if (!imm32)
1983+
return -EINVAL;
1984+
ip += x86_call_depth_emit_accounting(&prog, func, ip);
1985+
if (emit_call(&prog, func, ip))
19891986
return -EINVAL;
19901987
break;
19911988
}
@@ -2835,7 +2832,7 @@ static int __arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *rw_im
28352832
* Direct-call fentry stub, as such it needs accounting for the
28362833
* __fentry__ call.
28372834
*/
2838-
x86_call_depth_emit_accounting(&prog, NULL);
2835+
x86_call_depth_emit_accounting(&prog, NULL, image);
28392836
}
28402837
EMIT1(0x55); /* push rbp */
28412838
EMIT3(0x48, 0x89, 0xE5); /* mov rbp, rsp */

drivers/bluetooth/btqca.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,11 +826,15 @@ EXPORT_SYMBOL_GPL(qca_uart_setup);
826826

827827
int qca_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
828828
{
829+
bdaddr_t bdaddr_swapped;
829830
struct sk_buff *skb;
830831
int err;
831832

832-
skb = __hci_cmd_sync_ev(hdev, EDL_WRITE_BD_ADDR_OPCODE, 6, bdaddr,
833-
HCI_EV_VENDOR, HCI_INIT_TIMEOUT);
833+
baswap(&bdaddr_swapped, bdaddr);
834+
835+
skb = __hci_cmd_sync_ev(hdev, EDL_WRITE_BD_ADDR_OPCODE, 6,
836+
&bdaddr_swapped, HCI_EV_VENDOR,
837+
HCI_INIT_TIMEOUT);
834838
if (IS_ERR(skb)) {
835839
err = PTR_ERR(skb);
836840
bt_dev_err(hdev, "QCA Change address cmd failed (%d)", err);

0 commit comments

Comments
 (0)