Skip to contentSkip to conversation

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

DISCUSSION Stephen Rothwell 2 participants 3 messages Apr 23, 2021 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

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

security/keys/trusted-keys/trusted_tpm2.c

between commit:

9d5171eab462 ("KEYS: trusted: Fix TPM reservation for seal/unseal")

from Linus' tree and commit:

f2219745250f ("security: keys: trusted: use ASN.1 TPM2 key format for the blobs")

from the tpmdd 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.

Signature · 18 lines
Cheers,
Stephen Rothwell

diff --cc security/keys/trusted-keys/trusted_tpm2.c
index c87c4df8703d,d225ad140960..000000000000
--- a/security/keys/trusted-keys/trusted_tpm2.c
+++ b/security/keys/trusted-keys/trusted_tpm2.c
@@@ -79,7 -245,10 +245,10 @@@ int tpm2_seal_trusted(struct tpm_chip *
  	if (i == ARRAY_SIZE(tpm2_hash_map))
  		return -EINVAL;
  
+ 	if (!options->keyhandle)
+ 		return -EINVAL;
+ 
 -	rc = tpm_buf_init(&buf, TPM2_ST_SESSIONS, TPM2_CC_CREATE);
 +	rc = tpm_try_get_ops(chip);
  	if (rc)
  		return rc;
#1 lore raw
Quoted 5 lines · Stephen Rothwell
security/keys/trusted-keys/trusted_tpm2.c +0 -0
diff --cc security/keys/trusted-keys/trusted_tpm2.c
index c87c4df8703d,d225ad140960..000000000000

security/keys/trusted-keys/trusted_tpm2.c

Quoted 10 lines
security/keys/trusted-keys/trusted_tpm2.c +3 -0
@@@ -79,7 -245,10 +245,10 @@@ int tpm2_seal_trusted(struct tpm_chip *
        if (i == ARRAY_SIZE(tpm2_hash_map))
                return -EINVAL;
 
+       if (!options->keyhandle)
+               return -EINVAL;
+ 
 -      rc = tpm_buf_init(&buf, TPM2_ST_SESSIONS, TPM2_CC_CREATE);
 +      rc = tpm_try_get_ops(chip);
        if (rc)
                return rc;

Yes, that's the right fix, but it should be the one at the top of my tpmdd-for-next branch.

Thanks,

James

#2 lore raw

Hi James,

Quoted 10 lines · On Thu, 22 Apr 2021 22:16:29 -0700 James Bottomley…
Quoted 8 lines · Stephen Rothwell
security/keys/trusted-keys/trusted_tpm2.c +0 -0
diff --cc security/keys/trusted-keys/trusted_tpm2.c
index c87c4df8703d,d225ad140960..000000000000
@@@ -79,7 -245,10 +245,10 @@@ int tpm2_seal_trusted(struct tpm_chip *
        if (i == ARRAY_SIZE(tpm2_hash_map))
                return -EINVAL;
Quoted 10 lines

security/keys/trusted-keys/trusted_tpm2.c

Quoted 7 lines
security/keys/trusted-keys/trusted_tpm2.c +3 -0
+       if (!options->keyhandle)
+               return -EINVAL;
+ 
 -      rc = tpm_buf_init(&buf, TPM2_ST_SESSIONS, TPM2_CC_CREATE);
 +      rc = tpm_try_get_ops(chip);
        if (rc)
                return rc;  

Yes, that's the right fix, but it should be the one at the top of my tpmdd-for-next branch.

Yeah, I haven't merged that yet.

Signature · 2 lines
Cheers,
Stephen Rothwell