🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by Mark Brown Fri, 27 Nov 2026 15:55
linux-next: manual merge of the bpf-next tree with the bpf tree
#23622
Author: Mark Brown
Date: Fri, 27 Nov 2026 15:55
108 lines
11018 bytes
--Pa5uPlxAM9VD/AVg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi all,

Today's linux-next merge of the bpf-next tree got a conflict in:

  kernel/bpf/fixups.c

between commit:

  1879b5e505de9 ("bpf: Emit nospec after calls and atomics that write to th=
e stack")

=66rom the bpf tree and commit:

  57fae4059380a ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/b=
pf 7.4-rc1")

=66rom the bpf-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc kernel/bpf/fixups.c
index 8c3a17a05a4e1,7af8cb886f7d4..0000000000000
--- a/kernel/bpf/fixups.c
+++ b/kernel/bpf/fixups.c
@@@ -907,14 -1261,11 +1261,12 @@@ int bpf_convert_ctx_accesses(struct bpf
  {
  	struct bpf_subprog_info *subprogs =3D env->subprog_info;
  	const struct bpf_verifier_ops *ops =3D env->ops;
- 	int i, cnt, size, ctx_field_size, ret, delta =3D 0, epilogue_cnt =3D 0;
- 	const int insn_cnt =3D env->prog->len;
+ 	int i, cnt, size, ctx_field_size, ret, epilogue_cnt =3D 0, first =3D 0;
  	struct bpf_insn *epilogue_buf =3D env->epilogue_buf;
  	struct bpf_insn *insn_buf =3D env->insn_buf;
 +	bool nospec, nospec_next =3D false;
  	struct bpf_insn *insn;
  	u32 target_size, size_default, off;
- 	struct bpf_prog *new_prog;
  	enum bpf_access_type type;
  	bool is_narrower_load;
  	int epilogue_idx =3D 0;
@@@ -995,13 -1336,10 +1337,15 @@@
  		enum bpf_reg_type ptr_type;
  		u8 mode;
 =20
+ 		insn =3D &env->prog->insnsi[i];
+=20
 -		if (env->insn_aux_data[i].nospec) {
 -			WARN_ON_ONCE(env->insn_aux_data[i].alu_state);
 +		/* A call or an atomic gets its nospec in front of the next insn */
- 		nospec =3D env->insn_aux_data[i + delta].nospec;
- 		WARN_ON_ONCE(nospec && env->insn_aux_data[i + delta].alu_state);
++		nospec =3D env->insn_aux_data[i].nospec;
++		WARN_ON_ONCE(nospec && env->insn_aux_data[i].alu_state);
 +		nospec |=3D nospec_next;
- 		nospec_next =3D env->insn_aux_data[i + delta].nospec_result;
++		nospec_next =3D env->insn_aux_data[i].nospec_result;
 +
 +		if (nospec) {
  			struct bpf_insn *patch =3D insn_buf;
 =20
  			*patch++ =3D BPF_ST_NOSPEC();
@@@ -1101,14 -1423,9 +1429,10 @@@
  			*patch++ =3D *insn;
  			*patch++ =3D BPF_ST_NOSPEC();
  			cnt =3D patch - insn_buf;
- 			new_prog =3D bpf_patch_insn_data(env, i + delta, insn_buf, cnt);
- 			if (!new_prog)
- 				return -ENOMEM;
-=20
- 			delta    +=3D cnt - 1;
- 			env->prog =3D new_prog;
- 			insn      =3D new_prog->insnsi + i + delta;
+ 			insn =3D bpf_patch_list_add(env, i, insn_buf, cnt);
+ 			if (IS_ERR(insn))
+ 				return PTR_ERR(insn);
 +			nospec_next =3D false;
  			continue;
  		}
 =20

--Pa5uPlxAM9VD/AVg
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmsJp98ACgkQJNaLcl1U
h9AGVgf9FXfiw6bENsBziiPehzm8ZRaG/+PetmJ73yAjIJ6LDVDHDoNtcWO7Rjog
vCDHI/Uo33ZJv+dcMRkfmP5FYgzgdR01LZX3gisvRRwCDwd58x+5h4vuQZ88ARM0
k1HBSHiEaGyNrLzuN1cXe6osTIyiIO4HR+7T8G4iOvhsVC8Q9AfHaLUAR1eQ4/QJ
mNEtQ1ADyHHxUIhfkLKhK4l8/BtHOoR9l5Z/gWBpXHg5occRC8wsXi9P6hrQArtZ
3ZxPi4XIqEw2KT8tbWLNyLMND8C6U95/8YFF0Up2hcv7S9enw2gdUq19Aae/rrOH
NX/D39qZ3husYQbVkZHIgW/OCiQ5Jg==
=Kkib
-----END PGP SIGNATURE-----

--Pa5uPlxAM9VD/AVg--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads