Subject: linux-next: manual merge of the tip tree with the crypto tree

From: Stephen Rothwell <[email-masked]>
Date: Wed, 7 Jan 2026 13:07:36 +1100

Hi all,

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

  crypto/drbg.c

between commits:

  6acd394367ab ("crypto: drbg - make drbg_fips_continuous_test() return bool")
  c904e459cf73 ("crypto: drbg - make drbg_get_random_bytes() return *void*")

from the crypto tree and commit:

  dc36d55d4e72 ("crypto: Enable context analysis")

from the tip 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.

-- 
Cheers,
Stephen Rothwell

diff --cc crypto/drbg.c
index 9a2af599ead1,0a6f6c05a78f..000000000000
--- a/crypto/drbg.c
+++ b/crypto/drbg.c
@@@ -226,16 -226,19 +226,17 @@@ static inline unsigned short drbg_sec_s
   * @entropy buffer of seed data to be checked
   *
   * return:
 - *	0 on success
 - *	-EAGAIN on when the CTRNG is not yet primed
 - *	< 0 on error
 + *	%true on success
 + *	%false when the CTRNG is not yet primed
   */
 -static int drbg_fips_continuous_test(struct drbg_state *drbg,
 -				     const unsigned char *entropy)
 +static bool drbg_fips_continuous_test(struct drbg_state *drbg,
 +				      const unsigned char *entropy)
+ 	__must_hold(&drbg->drbg_mutex)
  {
  	unsigned short entropylen = drbg_sec_strength(drbg->core->flags);
 -	int ret = 0;
  
  	if (!IS_ENABLED(CONFIG_CRYPTO_FIPS))
 -		return 0;
 +		return true;
  
  	/* skip test if we test the overall system */
  	if (list_empty(&drbg->test_data.list))
@@@ -842,13 -846,21 +843,14 @@@ static inline int __drbg_seed(struct dr
  	return ret;
  }
  
 -static inline int drbg_get_random_bytes(struct drbg_state *drbg,
 -					unsigned char *entropy,
 -					unsigned int entropylen)
 +static inline void drbg_get_random_bytes(struct drbg_state *drbg,
 +					 unsigned char *entropy,
 +					 unsigned int entropylen)
+ 	__must_hold(&drbg->drbg_mutex)
  {
 -	int ret;
 -
 -	do {
 +	do
  		get_random_bytes(entropy, entropylen);
 -		ret = drbg_fips_continuous_test(drbg, entropy);
 -		if (ret && ret != -EAGAIN)
 -			return ret;
 -	} while (ret);
 -
 -	return 0;
 +	while (!drbg_fips_continuous_test(drbg, entropy));
  }
  
  static int drbg_seed_from_random(struct drbg_state *drbg)