🚀 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 Thu, 12 Nov 2026 14:19
linux-next: manual merge of the bpf-next tree with the origin tree
#15222
Author: Mark Brown
Date: Thu, 12 Nov 2026 14:19
133 lines
12290 bytes
--QRzQixSA9p0gQ/D0
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/scev.c

between commit:

  0af298e62e5cf ("treewide: refresh kmalloc_obj() conversions")

=66rom the origin tree and commits:

  e2f3d29e88d08 ("bpf: Refine registers linked by scalar evolution at condi=
tional jumps")
  aba76dc75e35f ("bpf: Construct scalar evolution expressions without alloc=
ations")
  cfef7bfa2c2a1 ("bpf: Give SSA names to the values that scalar evolution d=
oes not track")

=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/cfg.c
index 1b04538351a1f,bbcf42eae9d92..0000000000000
--- a/kernel/bpf/cfg.c
+++ b/kernel/bpf/cfg.c
diff --cc kernel/bpf/scev.c
index db123ef1f0718,b413998d9cf93..0000000000000
--- a/kernel/bpf/scev.c
+++ b/kernel/bpf/scev.c
@@@ -1260,23 -2430,13 +2430,13 @@@ static int compute_scev_for_loop(struc
  	u32 r;
 =20
  	if (log_level2)
- 		bpf_log(&env->log, "Computing SCEV for loop at %d:\n", cur_header);
+ 		bpf_log(&env->log, "Computing SCEV for %s at %d:\n",
+ 			cur_loop ? "loop" : "subprog", first);
 =20
- 	/*
- 	 * For irreducible loops, and for loops nesting a loop with a truncated
- 	 * exit list, just assume that everything is clobbered for now.
- 	 */
- 	if (!can_compute_loop_scev(cur_loop)) {
- 		header_env =3D get_loop_env(scev, cur_header, cur_header);
- 		if (!header_env)
- 			return -ENOMEM;
- 		/* The freshly allocated environment has all expressions unknown. */
- 		bitmap_fill(cur_loop->store_base_regs, REGS_NUM);
- 		header_env->empty =3D false;
+ 	if (!cur_loop && !can_compute_subprog_scev(env, sub))
  		return 0;
- 	}
 =20
 -	cur_env =3D kzalloc(sizeof(*cur_env), GFP_KERNEL_ACCOUNT);
 +	cur_env =3D kzalloc_obj(*cur_env, GFP_KERNEL_ACCOUNT);
  	if (!cur_env)
  		goto nomem;
  	if (log_level2) {
@@@ -1724,25 -3142,27 +3142,29 @@@ void bpf_free_scev(struct bpf_verifier_
  int bpf_init_scev(struct bpf_verifier_env *env)
  {
  	struct scev *scev;
+ 	u32 r;
 =20
 -	scev =3D kzalloc(sizeof(struct scev), GFP_KERNEL_ACCOUNT);
 +	scev =3D kzalloc_obj(struct scev, GFP_KERNEL_ACCOUNT);
  	if (!scev)
  		return -ENOMEM;
  	env->scev =3D scev;
  	bpf_mark_reg_known_scalar(&scev->zero_reg, 0);
- 	bpf_mark_reg_unknown_imprecise(&scev->unknown_reg);
- 	/* A power of two for hash & (exprs_ht_cnt - 1)` indexing. */
- 	scev->exprs_ht_cnt =3D roundup_pow_of_two(max(256U, DIV_ROUND_UP(env->pr=
og->len, 4)));
- 	scev->exprs_ht =3D kvzalloc_objs(*scev->exprs_ht, scev->exprs_ht_cnt,
- 				       GFP_KERNEL_ACCOUNT);
- 	if (!scev->exprs_ht)
- 		goto nomem;
- 	if (expr0(scev, UNKNOWN) < 0 || expr0(scev, OPAQUE)  < 0)
+ 	bpf_mark_reg_unknown(&scev->unknown_reg);
+ 	setup_initial_loop_env(&scev->identity_env);
+ 	if (grow_exprs(scev, roundup_pow_of_two(REG_EXPR_ID(REGS_NUM))))
  		goto nomem;
+ 	scev->exprs[UNKNOWN_EXPR_ID] =3D (struct expr){ .op =3D UNKNOWN };
+ 	scev->exprs[OPAQUE_EXPR_ID] =3D (struct expr){ .op =3D OPAQUE };
+ 	for (r =3D 0; r < REGS_NUM; r++)
+ 		scev->exprs[REG_EXPR_ID(r)] =3D (struct expr){ .op =3D REG, .is_vn =3D =
true,
+ 							     .params =3D { r, 0 } };
+ 	for (r =3D 0; r < REG_EXPR_ID(REGS_NUM); r++)
+ 		set_expr_base(scev, &scev->exprs[r], r);
+ 	scev->exprs_cnt =3D REG_EXPR_ID(REGS_NUM);
 -	scev->envs =3D kvcalloc(env->prog->len, sizeof(*scev->envs), GFP_KERNEL_=
ACCOUNT);
 -	scev->discovered =3D kvcalloc(env->prog->len, sizeof(*scev->discovered),=
 GFP_KERNEL_ACCOUNT);
 +	scev->envs =3D kvzalloc_objs(*scev->envs, env->prog->len,
 +				   GFP_KERNEL_ACCOUNT);
 +	scev->discovered =3D kvzalloc_objs(*scev->discovered, env->prog->len,
 +					 GFP_KERNEL_ACCOUNT);
  	if (!scev->envs || !scev->discovered)
  		goto nomem;
  	/*

--QRzQixSA9p0gQ/D0
Content-Type: application/pgp-signature; name="signature.asc"

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

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmr1yucACgkQJNaLcl1U
h9Cszwf/QQGXNv+K8uQHamz2z0m++d+2ZMVpeQltNLm/SwHnDwLCmFBs+ksb+Evz
zKotMgOIYBwQKGpACEjS2jderRG68rNVeM56t3lXMwAXeh7noaIDCFHW0CdtvMa/
lqzDgckxEGTIKUMNz3ez3QIrv2Y1QsKl0B2j1ok2HEoHk2Db7mrrTkfb3tR5LdAM
f2qzkU+b7BKHGtxfSYQ76dwzbUUxvdxT3JJxMuVZpiaxEAX/vUDBD122urvPJ31s
4Lq1jV57NYMRwzhuqcpzkviyjyOFprtUst+LiH5JmJczizGAPLdgYrNj4jMdujgy
zjJW+HjA1wi3yyxoCBegw8paZrv6ig==
=CBu9
-----END PGP SIGNATURE-----

--QRzQixSA9p0gQ/D0--
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