mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Jarkko Sakkinen <jarkko@kernel.org>,
	linux-integrity@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
	James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Roberto Sassu <roberto.sassu@huawei.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] tpm: Opt-in in disable PCR integrity protection
Date: Thu, 07 Nov 2024 09:00:01 -0500	[thread overview]
Message-ID: <7f77c0e8b481fd813b3a76b84d33d8db62e235f7.camel@linux.ibm.com> (raw)
In-Reply-To: <D5FZRXBCH2B4.1GQIIVQHVB2XI@kernel.org>

On Thu, 2024-11-07 at 15:47 +0200, Jarkko Sakkinen wrote:
> On Thu Nov 7, 2024 at 3:44 PM EET, Mimi Zohar wrote:
> > > 
> > > @@ -232,18 +236,26 @@ int tpm2_pcr_extend(struct tpm_chip *chip, u32 pcr_idx,
> > >  	int rc;
> > >  	int i;
> > >  
> > > -	rc = tpm2_start_auth_session(chip);
> > > -	if (rc)
> > > -		return rc;
> > > +	if (!disable_pcr_integrity_protection) {
> > > +		rc = tpm2_start_auth_session(chip);
> > > +		if (rc)
> > > +			return rc;
> > > +	}
> > >  
> > >  	rc = tpm_buf_init(&buf, TPM2_ST_SESSIONS, TPM2_CC_PCR_EXTEND);
> > >  	if (rc) {
> > > -		tpm2_end_auth_session(chip);
> > > +		if (!disable_pcr_integrity_protection)
> > > +			tpm2_end_auth_session(chip);
> > >  		return rc;
> > >  	}
> > >  
> > > -	tpm_buf_append_name(chip, &buf, pcr_idx, NULL);
> > > -	tpm_buf_append_hmac_session(chip, &buf, 0, NULL, 0);
> > > +	if (!disable_pcr_integrity_protection) {
> > > +		tpm_buf_append_name(chip, &buf, pcr_idx);
> > 
> > tpm_buf_append_name() parameters didn't change.  Don't remove the 'name' field
> > here.
> 
> Hmm... weird I'll check this. Maybe I had something left to staging...
> 
> > 
> > 
> > > +		tpm_buf_append_hmac_session(chip, &buf, 0, NULL, 0);
> > > +	} else {
> > > +		tpm_buf_append_handle(chip, &buf, pcr_idx);
> > 
> 
> > Or here.
> 
> Here I think it is appropriate

Agreed

> 
> > 
> > > +		tpm_buf_append_auth(chip, &buf, 0, NULL, 0);
> > > +	}
> > >  
> > >  	tpm_buf_append_u32(&buf, chip->nr_allocated_banks);
> > > 

  reply	other threads:[~2024-11-07 14:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-07  9:51 Jarkko Sakkinen
2024-11-07 13:20 ` James Bottomley
2024-11-07 13:49   ` Jarkko Sakkinen
2024-11-07 13:52     ` James Bottomley
2024-11-11 19:53       ` Mimi Zohar
2024-11-11 20:12         ` James Bottomley
2024-11-12 17:57         ` Jarkko Sakkinen
2024-11-12 20:00           ` Mimi Zohar
2024-11-07 13:44 ` Mimi Zohar
2024-11-07 13:47   ` Jarkko Sakkinen
2024-11-07 14:00     ` Mimi Zohar [this message]
2024-11-07 16:45       ` Jarkko Sakkinen
2024-11-07 13:46 ` kernel test robot
2024-11-07 20:43 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7f77c0e8b481fd813b3a76b84d33d8db62e235f7.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=corbet@lwn.net \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=roberto.sassu@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®