linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the crypto-current tree with Linus' tree
@ 2020-06-12 23:49 Stephen Rothwell
  0 siblings, 0 replies; only message in thread
From: Stephen Rothwell @ 2020-06-12 23:49 UTC (permalink / raw)
  To: Herbert Xu, Linux Crypto List
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Al Viro

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

Hi all,

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

  drivers/crypto/ccp/sev-dev.c

between commit:

  835ae3bb530a ("drivers/crypto/ccp/sev-dev.c: get rid of pointless access_ok()")

from Linus' tree and commit:

  832910f2e6b5 ("crypto: ccp - Fix sparse warnings in sev-dev")

from the crypto-current 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/crypto/ccp/sev-dev.c
index a2426334be61,aa576529283b..000000000000
--- a/drivers/crypto/ccp/sev-dev.c
+++ b/drivers/crypto/ccp/sev-dev.c
@@@ -394,7 -395,9 +395,8 @@@ static int sev_ioctl_do_pek_csr(struct 
  		goto cmd;
  
  	/* allocate a physically contiguous buffer to store the CSR blob */
+ 	input_address = (void __user *)input.address;
 -	if (!access_ok(input_address, input.length) ||
 -	    input.length > SEV_FW_BLOB_MAX_SIZE) {
 +	if (input.length > SEV_FW_BLOB_MAX_SIZE) {
  		ret = -EFAULT;
  		goto e_free;
  	}
@@@ -631,6 -635,13 +634,7 @@@ static int sev_ioctl_do_get_id2(struct 
  	if (copy_from_user(&input, (void __user *)argp->data, sizeof(input)))
  		return -EFAULT;
  
 -	/* Check if we have write access to the userspace buffer */
+ 	input_address = (void __user *)input.address;
 -	if (input.address &&
 -	    input.length &&
 -	    !access_ok(input_address, input.length))
 -		return -EFAULT;
 -
  	data = kzalloc(sizeof(*data), GFP_KERNEL);
  	if (!data)
  		return -ENOMEM;
@@@ -745,8 -757,12 +750,11 @@@ static int sev_ioctl_do_pdh_export(stru
  	    !input.cert_chain_address)
  		goto cmd;
  
+ 	input_pdh_cert_address = (void __user *)input.pdh_cert_address;
+ 	input_cert_chain_address = (void __user *)input.cert_chain_address;
+ 
  	/* Allocate a physically contiguous buffer to store the PDH blob. */
 -	if ((input.pdh_cert_len > SEV_FW_BLOB_MAX_SIZE) ||
 -	    !access_ok(input_pdh_cert_address, input.pdh_cert_len)) {
 +	if (input.pdh_cert_len > SEV_FW_BLOB_MAX_SIZE) {
  		ret = -EFAULT;
  		goto e_free;
  	}

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-12 23:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-12 23:49 linux-next: manual merge of the crypto-current tree with Linus' tree Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).