public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Thomas Gleixner <tglx@linutronix•de>,
	Ingo Molnar <mingo@kernel•org>, "H. Peter Anvin" <hpa@zytor•com>,
	Peter Zijlstra <peterz@infradead•org>,
	Herbert Xu <herbert@gondor•apana.org.au>
Cc: Linux Crypto List <linux-crypto@vger•kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>,
	Marco Elver <elver@google•com>,
	Sergey Shtylyov <s.shtylyov@omp•ru>
Subject: linux-next: manual merge of the tip tree with the crypto tree
Date: Wed, 7 Jan 2026 13:07:36 +1100	[thread overview]
Message-ID: <20260107130736.22775042@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2483 bytes --]

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)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2026-01-07  2:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-07  2:07 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-09-19 13:31 linux-next: manual merge of the tip tree with the crypto tree Mark Brown
2025-09-19 20:43 ` Borislav Petkov
2025-09-20  1:17   ` Herbert Xu
2025-09-20 10:01     ` Borislav Petkov
2025-04-08  1:28 Stephen Rothwell
2025-04-08  6:35 ` Ingo Molnar
2022-11-28  1:29 Stephen Rothwell
2020-07-21  4:28 Stephen Rothwell
2020-08-03 22:14 ` Stephen Rothwell
2020-07-17  4:46 Stephen Rothwell
2020-07-17  6:27 ` Uros Bizjak
2020-07-17  6:44   ` Herbert Xu
2020-07-17  6:56     ` Stephen Rothwell
2020-07-17  7:31     ` Uros Bizjak
2020-07-20  4:03       ` Stephen Rothwell
2020-07-20  6:13         ` Uros Bizjak
2020-07-20  6:29           ` Stephen Rothwell
2020-07-20 11:59       ` Herbert Xu
2017-11-08  2:21 Stephen Rothwell
2015-10-12  3:24 Stephen Rothwell
2015-10-12  6:18 ` Herbert Xu
2015-06-17  3:21 Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260107130736.22775042@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=elver@google$(echo .)com \
    --cc=herbert@gondor$(echo .)apana.org.au \
    --cc=hpa@zytor$(echo .)com \
    --cc=linux-crypto@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=mingo@kernel$(echo .)org \
    --cc=peterz@infradead$(echo .)org \
    --cc=s.shtylyov@omp$(echo .)ru \
    --cc=tglx@linutronix$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox