linux-next: manual merge of the crypto-current tree with Linus' tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: pgp2g2RlNa4Lr.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux