Commit 545c4944 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull networking fixes from Paolo Abeni:
 "Including fixes from bpf.

  Relatively calm week, likely due to public holiday in most places. No
  known outstanding regressions.

  Current release - regressions:

   - rxrpc: fix wrong alignmask in __page_frag_alloc_align()

   - eth: e1000e: change usleep_range to udelay in PHY mdic access

  Previous releases - regressions:

   - gro: fix udp bad offset in socket lookup

   - bpf: fix incorrect runtime stat for arm64

   - tipc: fix UAF in error path

   - netfs: fix a potential infinite loop in extract_user_to_sg()

   - eth: ice: ensure the copied buf is NUL terminated

   - eth: qeth: fix kernel panic after setting hsuid

  Previous releases - always broken:

   - bpf:
       - verifier: prevent userspace memory access
       - xdp: use flags field to disambiguate broadcast redirect

   - bridge: fix multicast-to-unicast with fraglist GSO

   - mptcp: ensure snd_nxt is properly initialized on connect

   - nsh: fix outer header access in nsh_gso_segment().

   - eth: bcmgenet: fix racing registers access

   - eth: vxlan: fix stats counters.

  Misc:

   - a bunch of MAINTAINERS file updates"

* tag 'net-6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (45 commits)
  MAINTAINERS: mark MYRICOM MYRI-10G as Orphan
  MAINTAINERS: remove Ariel Elior
  net: gro: add flush check in udp_gro_receive_segment
  net: gro: fix udp bad offset in socket lookup by adding {inner_}network_offset to napi_gro_cb
  ipv4: Fix uninit-value access in __ip_make_skb()
  s390/qeth: Fix kernel panic after setting hsuid
  vxlan: Pull inner IP header in vxlan_rcv().
  tipc: fix a possible memleak in tipc_buf_append
  tipc: fix UAF in error path
  rxrpc: Clients must accept conn from any address
  net: core: reject skb_copy(_expand) for fraglist GSO skbs
  net: bridge: fix multicast-to-unicast with fraglist GSO
  mptcp: ensure snd_nxt is properly initialized on connect
  e1000e: change usleep_range to udelay in PHY mdic access
  net: dsa: mv88e6xxx: Fix number of databases for 88E6141 / 88E6341
  cxgb4: Properly lock TX queue for the selftest.
  rxrpc: Fix using alignmask being zero for __page_frag_alloc_align()
  vxlan: Add missing VNI filter counter update in arp_reduce().
  vxlan: Fix racy device stats updates.
  net: qede: use return from qede_parse_actions()
  ...
parents 01066798 78cfe547
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -512,6 +512,7 @@ Praveen BP <praveenbp@ti.com>
Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com> <pradeepc@codeaurora.org>
Prasad Sodagudi <quic_psodagud@quicinc.com> <psodagud@codeaurora.org>
Punit Agrawal <punitagrawal@gmail.com> <punit.agrawal@arm.com>
Puranjay Mohan <puranjay@kernel.org> <puranjay12@gmail.com>
Qais Yousef <qyousef@layalina.io> <qais.yousef@imgtec.com>
Qais Yousef <qyousef@layalina.io> <qais.yousef@arm.com>
Quentin Monnet <qmo@kernel.org> <quentin.monnet@netronome.com>
+14 −8
Original line number Diff line number Diff line
@@ -553,7 +553,7 @@ F: Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
F:	drivers/input/misc/adxl34x.c
ADXL355 THREE-AXIS DIGITAL ACCELEROMETER DRIVER
M:	Puranjay Mohan <puranjay12@gmail.com>
M:	Puranjay Mohan <puranjay@kernel.org>
L:	linux-iio@vger.kernel.org
S:	Supported
F:	Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml
@@ -3714,7 +3714,7 @@ F: drivers/iio/imu/bmi323/
BPF JIT for ARM
M:	Russell King <linux@armlinux.org.uk>
M:	Puranjay Mohan <puranjay12@gmail.com>
M:	Puranjay Mohan <puranjay@kernel.org>
L:	bpf@vger.kernel.org
S:	Maintained
F:	arch/arm/net/
@@ -3764,6 +3764,8 @@ X: arch/riscv/net/bpf_jit_comp64.c
BPF JIT for RISC-V (64-bit)
M:	Björn Töpel <bjorn@kernel.org>
R:	Pu Lehui <pulehui@huawei.com>
R:	Puranjay Mohan <puranjay@kernel.org>
L:	bpf@vger.kernel.org
S:	Maintained
F:	arch/riscv/net/
@@ -4191,7 +4193,6 @@ S: Supported
F:	drivers/scsi/bnx2i/
BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
M:	Ariel Elior <aelior@marvell.com>
M:	Sudarsana Kalluru <skalluru@marvell.com>
M:	Manish Chopra <manishc@marvell.com>
L:	netdev@vger.kernel.org
@@ -15160,9 +15161,8 @@ F: drivers/scsi/myrb.*
F:	drivers/scsi/myrs.*
MYRICOM MYRI-10G 10GbE DRIVER (MYRI10GE)
M:	Chris Lee <christopher.lee@cspi.com>
L:	netdev@vger.kernel.org
S:	Supported
S:	Orphan
W:	https://www.cspi.com/ethernet-products/support/downloads/
F:	drivers/net/ethernet/myricom/myri10ge/
@@ -17990,7 +17990,6 @@ S: Supported
F:	drivers/scsi/qedi/
QLOGIC QL4xxx ETHERNET DRIVER
M:	Ariel Elior <aelior@marvell.com>
M:	Manish Chopra <manishc@marvell.com>
L:	netdev@vger.kernel.org
S:	Supported
@@ -18000,7 +17999,6 @@ F: include/linux/qed/
QLOGIC QL4xxx RDMA DRIVER
M:	Michal Kalderon <mkalderon@marvell.com>
M:	Ariel Elior <aelior@marvell.com>
L:	linux-rdma@vger.kernel.org
S:	Supported
F:	drivers/infiniband/hw/qedr/
@@ -21918,7 +21916,7 @@ F: include/linux/soc/ti/ti_sci_inta_msi.h
F:	include/linux/soc/ti/ti_sci_protocol.h
TEXAS INSTRUMENTS' TMP117 TEMPERATURE SENSOR DRIVER
M:	Puranjay Mohan <puranjay12@gmail.com>
M:	Puranjay Mohan <puranjay@kernel.org>
L:	linux-iio@vger.kernel.org
S:	Supported
F:	Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml
@@ -24459,6 +24457,14 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/har
F:	Documentation/admin-guide/LSM/Yama.rst
F:	security/yama/
YAML NETLINK (YNL)
M:	Donald Hunter <donald.hunter@gmail.com>
M:	Jakub Kicinski <kuba@kernel.org>
F:	Documentation/netlink/
F:	Documentation/userspace-api/netlink/intro-specs.rst
F:	Documentation/userspace-api/netlink/specs.rst
F:	tools/net/ynl/
YEALINK PHONE DRIVER
M:	Henk Vergonet <Henk.Vergonet@gmail.com>
L:	usbb2k-api-dev@nongnu.org
+43 −13
Original line number Diff line number Diff line
@@ -871,16 +871,11 @@ static inline void emit_a32_alu_r64(const bool is64, const s8 dst[],
}

/* dst = src (4 bytes)*/
static inline void emit_a32_mov_r(const s8 dst, const s8 src, const u8 off,
				  struct jit_ctx *ctx) {
static inline void emit_a32_mov_r(const s8 dst, const s8 src, struct jit_ctx *ctx) {
	const s8 *tmp = bpf2a32[TMP_REG_1];
	s8 rt;

	rt = arm_bpf_get_reg32(src, tmp[0], ctx);
	if (off && off != 32) {
		emit(ARM_LSL_I(rt, rt, 32 - off), ctx);
		emit(ARM_ASR_I(rt, rt, 32 - off), ctx);
	}
	arm_bpf_put_reg32(dst, rt, ctx);
}

@@ -889,15 +884,15 @@ static inline void emit_a32_mov_r64(const bool is64, const s8 dst[],
				  const s8 src[],
				  struct jit_ctx *ctx) {
	if (!is64) {
		emit_a32_mov_r(dst_lo, src_lo, 0, ctx);
		emit_a32_mov_r(dst_lo, src_lo, ctx);
		if (!ctx->prog->aux->verifier_zext)
			/* Zero out high 4 bytes */
			emit_a32_mov_i(dst_hi, 0, ctx);
	} else if (__LINUX_ARM_ARCH__ < 6 &&
		   ctx->cpu_architecture < CPU_ARCH_ARMv5TE) {
		/* complete 8 byte move */
		emit_a32_mov_r(dst_lo, src_lo, 0, ctx);
		emit_a32_mov_r(dst_hi, src_hi, 0, ctx);
		emit_a32_mov_r(dst_lo, src_lo, ctx);
		emit_a32_mov_r(dst_hi, src_hi, ctx);
	} else if (is_stacked(src_lo) && is_stacked(dst_lo)) {
		const u8 *tmp = bpf2a32[TMP_REG_1];

@@ -917,17 +912,52 @@ static inline void emit_a32_mov_r64(const bool is64, const s8 dst[],
static inline void emit_a32_movsx_r64(const bool is64, const u8 off, const s8 dst[], const s8 src[],
				      struct jit_ctx *ctx) {
	const s8 *tmp = bpf2a32[TMP_REG_1];
	const s8 *rt;
	s8 rs;
	s8 rd;

	if (is_stacked(dst_lo))
		rd = tmp[1];
	else
		rd = dst_lo;
	rs = arm_bpf_get_reg32(src_lo, rd, ctx);
	/* rs may be one of src[1], dst[1], or tmp[1] */

	/* Sign extend rs if needed. If off == 32, lower 32-bits of src are moved to dst and sign
	 * extension only happens in the upper 64 bits.
	 */
	if (off != 32) {
		/* Sign extend rs into rd */
		emit(ARM_LSL_I(rd, rs, 32 - off), ctx);
		emit(ARM_ASR_I(rd, rd, 32 - off), ctx);
	} else {
		rd = rs;
	}

	rt = arm_bpf_get_reg64(dst, tmp, ctx);
	/* Write rd to dst_lo
	 *
	 * Optimization:
	 * Assume:
	 * 1. dst == src and stacked.
	 * 2. off == 32
	 *
	 * In this case src_lo was loaded into rd(tmp[1]) but rd was not sign extended as off==32.
	 * So, we don't need to write rd back to dst_lo as they have the same value.
	 * This saves us one str instruction.
	 */
	if (dst_lo != src_lo || off != 32)
		arm_bpf_put_reg32(dst_lo, rd, ctx);

	emit_a32_mov_r(dst_lo, src_lo, off, ctx);
	if (!is64) {
		if (!ctx->prog->aux->verifier_zext)
			/* Zero out high 4 bytes */
			emit_a32_mov_i(dst_hi, 0, ctx);
	} else {
		emit(ARM_ASR_I(rt[0], rt[1], 31), ctx);
		if (is_stacked(dst_hi)) {
			emit(ARM_ASR_I(tmp[0], rd, 31), ctx);
			arm_bpf_put_reg32(dst_hi, tmp[0], ctx);
		} else {
			emit(ARM_ASR_I(dst_hi, rd, 31), ctx);
		}
	}
}

+3 −3
Original line number Diff line number Diff line
@@ -1844,15 +1844,15 @@ static void invoke_bpf_prog(struct jit_ctx *ctx, struct bpf_tramp_link *l,

	emit_call(enter_prog, ctx);

	/* save return value to callee saved register x20 */
	emit(A64_MOV(1, A64_R(20), A64_R(0)), ctx);

	/* if (__bpf_prog_enter(prog) == 0)
	 *         goto skip_exec_of_prog;
	 */
	branch = ctx->image + ctx->idx;
	emit(A64_NOP, ctx);

	/* save return value to callee saved register x20 */
	emit(A64_MOV(1, A64_R(20), A64_R(0)), ctx);

	emit(A64_ADD_I(1, A64_R(0), A64_SP, args_off), ctx);
	if (!p->jited)
		emit_addr_mov_i64(A64_R(1), (const u64)p->insnsi, ctx);
+3 −3
Original line number Diff line number Diff line
@@ -722,6 +722,9 @@ static int invoke_bpf_prog(struct bpf_tramp_link *l, int args_off, int retval_of
	if (ret)
		return ret;

	/* store prog start time */
	emit_mv(RV_REG_S1, RV_REG_A0, ctx);

	/* if (__bpf_prog_enter(prog) == 0)
	 *	goto skip_exec_of_prog;
	 */
@@ -729,9 +732,6 @@ static int invoke_bpf_prog(struct bpf_tramp_link *l, int args_off, int retval_of
	/* nop reserved for conditional jump */
	emit(rv_nop(), ctx);

	/* store prog start time */
	emit_mv(RV_REG_S1, RV_REG_A0, ctx);

	/* arg1: &args_off */
	emit_addi(RV_REG_A0, RV_REG_FP, -args_off, ctx);
	if (!p->jited)
Loading