lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220722183343.229ecc7d@canb.auug.org.au>
Date:   Fri, 22 Jul 2022 18:33:43 +1000
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Theodore Ts'o <tytso@....edu>,
        "Jason A. Donenfeld" <Jason@...c4.com>,
        Heiko Carstens <hca@...ux.ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ibm.com>
Cc:     Alexander Gordeev <agordeev@...ux.ibm.com>,
        Harald Freudenberger <freude@...ux.ibm.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: linux-next: manual merge of the random tree with the s390-fixes
 tree

Hi all,

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

  arch/s390/include/asm/archrandom.h

between commit:

  918e75f77af7 ("s390/archrandom: prevent CPACF trng invocations in interrupt context")

from the s390-fixes tree and commit:

  2b85d0d98f18 ("random: handle archrandom with multiple longs")

from the random 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 arch/s390/include/asm/archrandom.h
index 4120c428dc37,cf5e000df0a1..000000000000
--- a/arch/s390/include/asm/archrandom.h
+++ b/arch/s390/include/asm/archrandom.h
@@@ -11,47 -11,26 +11,28 @@@
  #ifndef _ASM_S390_ARCHRANDOM_H
  #define _ASM_S390_ARCHRANDOM_H
  
- #ifdef CONFIG_ARCH_RANDOM
- 
  #include <linux/static_key.h>
 +#include <linux/preempt.h>
  #include <linux/atomic.h>
  #include <asm/cpacf.h>
  
  DECLARE_STATIC_KEY_FALSE(s390_arch_random_available);
  extern atomic64_t s390_arch_random_counter;
  
- static inline bool __must_check arch_get_random_long(unsigned long *v)
- {
- 	return false;
- }
- 
- static inline bool __must_check arch_get_random_int(unsigned int *v)
- {
- 	return false;
- }
- 
- static inline bool __must_check arch_get_random_seed_long(unsigned long *v)
+ static inline size_t __must_check arch_get_random_longs(unsigned long *v, size_t max_longs)
  {
- 	if (static_branch_likely(&s390_arch_random_available) &&
- 	    in_task()) {
- 		cpacf_trng(NULL, 0, (u8 *)v, sizeof(*v));
- 		atomic64_add(sizeof(*v), &s390_arch_random_counter);
- 		return true;
- 	}
- 	return false;
+ 	return 0;
  }
  
- static inline bool __must_check arch_get_random_seed_int(unsigned int *v)
+ static inline size_t __must_check arch_get_random_seed_longs(unsigned long *v, size_t max_longs)
  {
 -	if (static_branch_likely(&s390_arch_random_available)) {
 +	if (static_branch_likely(&s390_arch_random_available) &&
 +	    in_task()) {
- 		cpacf_trng(NULL, 0, (u8 *)v, sizeof(*v));
- 		atomic64_add(sizeof(*v), &s390_arch_random_counter);
- 		return true;
+ 		cpacf_trng(NULL, 0, (u8 *)v, max_longs * sizeof(*v));
+ 		atomic64_add(max_longs * sizeof(*v), &s390_arch_random_counter);
+ 		return max_longs;
  	}
- 	return false;
+ 	return 0;
  }
  
- #endif /* CONFIG_ARCH_RANDOM */
  #endif /* _ASM_S390_ARCHRANDOM_H */

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ