public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: manual merge of the crypto tree with the s390 tree
@ 2017-04-27  0:50 Stephen Rothwell
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Rothwell @ 2017-04-27  0:50 UTC (permalink / raw)
  To: Herbert Xu, Martin Schwidefsky, Heiko Carstens
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Harald Freudenberger, Sean Wang

Hi Herbert,

Today's linux-next merge of the crypto tree got conflicts in:

  drivers/char/hw_random/Makefile
  drivers/char/hw_random/Kconfig

between commit:

  bbcb478e3fef ("s390/trng: Introduce s390 TRNG device driver.")

from the s390 tree and commit:

  7701d1ff8ed1 ("hwrng: mtk - Add driver for hardware random generator on MT7623 SoC")

from the crypto 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 drivers/char/hw_random/Kconfig
index b9918fb9587d,fd34121934e5..000000000000
--- a/drivers/char/hw_random/Kconfig
+++ b/drivers/char/hw_random/Kconfig
@@@ -423,20 -409,20 +409,34 @@@ config HW_RANDOM_CAVIU
  
           If unsure, say Y.
  
 +config HW_RANDOM_S390
 +	tristate "S390 True Random Number Generator support"
 +	depends on S390
 +	default HW_RANDOM
 +	---help---
 +	  This driver provides kernel-side support for the True
 +	  Random Number Generator available as CPACF extension
 +	  on modern s390 hardware platforms.
 +
 +	  To compile this driver as a module, choose M here: the
 +	  module will be called s390-trng.
 +
 +	  If unsure, say Y.
 +
+ config HW_RANDOM_MTK
+ 	tristate "Mediatek Random Number Generator support"
+ 	depends on HW_RANDOM
+ 	depends on ARCH_MEDIATEK || COMPILE_TEST
+ 	default y
+ 	---help---
+ 	  This driver provides kernel-side support for the Random Number
+ 	  Generator hardware found on Mediatek SoCs.
+ 
+ 	  To compile this driver as a module, choose M here. the
+ 	  module will be called mtk-rng.
+ 
+ 	  If unsure, say Y.
+ 
  endif # HW_RANDOM
  
  config UML_RANDOM
diff --cc drivers/char/hw_random/Makefile
index dd1765246255,de6ea808bd3c..000000000000
--- a/drivers/char/hw_random/Makefile
+++ b/drivers/char/hw_random/Makefile
@@@ -36,4 -35,4 +35,5 @@@ obj-$(CONFIG_HW_RANDOM_STM32) += stm32-
  obj-$(CONFIG_HW_RANDOM_PIC32) += pic32-rng.o
  obj-$(CONFIG_HW_RANDOM_MESON) += meson-rng.o
  obj-$(CONFIG_HW_RANDOM_CAVIUM) += cavium-rng.o cavium-rng-vf.o
 +obj-$(CONFIG_HW_RANDOM_S390) += s390-trng.o
+ obj-$(CONFIG_HW_RANDOM_MTK)	+= mtk-rng.o

^ permalink raw reply	[flat|nested] 2+ messages in thread
* linux-next: manual merge of the crypto tree with the s390 tree
@ 2019-09-15 21:02 Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2019-09-15 21:02 UTC (permalink / raw)
  To: Ard Biesheuvel, Harald Freudenberger, Vasily Gorbik, Herbert Xu,
	Linux Crypto List
  Cc: Linux Next Mailing List, Linux Kernel Mailing List

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

Hi all,

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

  arch/s390/crypto/aes_s390.c

between commit:

  9e323d45ba94262 ("s390/crypto: xts-aes-s390 fix extra run-time crypto self tests finding")

from the s390 tree and commit:

  ce68acbcb6a5d5d ("crypto: s390/xts-aes - invoke fallback for ciphertext stealing")

from the crypto 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 arch/s390/crypto/aes_s390.c
index 6d2dbb5089d5c,d4f6fd42a1050..0000000000000
--- a/arch/s390/crypto/aes_s390.c
+++ b/arch/s390/crypto/aes_s390.c
@@@ -586,10 -586,7 +586,10 @@@ static int xts_aes_encrypt(struct blkci
  	struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm);
  	struct blkcipher_walk walk;
  
 +	if (!nbytes)
 +		return -EINVAL;
 +
- 	if (unlikely(!xts_ctx->fc))
+ 	if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCK_SIZE) != 0))
  		return xts_fallback_encrypt(desc, dst, src, nbytes);
  
  	blkcipher_walk_init(&walk, dst, src, nbytes);
@@@ -603,10 -600,7 +603,10 @@@ static int xts_aes_decrypt(struct blkci
  	struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm);
  	struct blkcipher_walk walk;
  
 +	if (!nbytes)
 +		return -EINVAL;
 +
- 	if (unlikely(!xts_ctx->fc))
+ 	if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCK_SIZE) != 0))
  		return xts_fallback_decrypt(desc, dst, src, nbytes);
  
  	blkcipher_walk_init(&walk, dst, src, nbytes);

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-15 21:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-27  0:50 linux-next: manual merge of the crypto tree with the s390 tree Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2019-09-15 21:02 Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox