All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruno Meneguele <bmeneg@redhat.com>
To: Mimi Zohar <zohar@linux.ibm.com>
Cc: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/4] ima: limit secure boot feedback scope for appraise
Date: Fri, 4 Sep 2020 22:17:21 -0300	[thread overview]
Message-ID: <20200905011721.GA3225@heredoc.io> (raw)
In-Reply-To: <f6b04ff269d3f5f72ee6b005bb97e6ac7b73b43e.camel@linux.ibm.com>

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

On Fri, Sep 04, 2020 at 05:07:08PM -0400, Mimi Zohar wrote:
> Hi Bruno,
> 
> > +	bool sb_state = arch_ima_get_secureboot();
> > +	int appraisal_state = ima_appraise;
> >  
> >  	if (strncmp(str, "off", 3) == 0)
> > -		ima_appraise = 0;
> > +		appraisal_state = 0;
> >  	else if (strncmp(str, "log", 3) == 0)
> > -		ima_appraise = IMA_APPRAISE_LOG;
> > +		appraisal_state = IMA_APPRAISE_LOG;
> >  	else if (strncmp(str, "fix", 3) == 0)
> > -		ima_appraise = IMA_APPRAISE_FIX;
> > +		appraisal_state = IMA_APPRAISE_FIX;
> >  	else if (strncmp(str, "enforce", 7) == 0)
> > -		ima_appraise = IMA_APPRAISE_ENFORCE;
> > +		appraisal_state = IMA_APPRAISE_ENFORCE;
> >  	else
> >  		pr_err("invalid \"%s\" appraise option", str);
> > +
> > +	/* If appraisal state was changed, but secure boot is enabled,
> > +	 * keep its default */
> > +	if (sb_state) {
> > +		if (!(appraisal_state & IMA_APPRAISE_ENFORCE))
> > +			pr_info("Secure boot enabled: ignoring ima_appraise=%s option",
> > +				str);
> > +		else
> > +			ima_appraise = appraisal_state;
> > +	}
> 
> Shouldn't the "else" clause be here.   No need to re-post the entire
> patch set.

Yes, of course it should.
Sorry. Sending the v3 for this patch.

> 
> thanks,
> 
> Mimi
> 
> >  #endif
> >  	return 1;
> >  }
> 
> 

-- 
bmeneg 
PGP Key: http://bmeneg.com/pubkey.txt

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

  reply	other threads:[~2020-09-05  1:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04 19:40 [PATCH v2 0/4] integrity: improve user feedback for invalid bootparams Bruno Meneguele
2020-09-04 19:40 ` [PATCH v2 1/4] ima: add check for enforced appraise option Bruno Meneguele
2020-09-04 19:40 ` [PATCH v2 2/4] integrity: invalid kernel parameters feedback Bruno Meneguele
2020-09-04 19:40 ` [PATCH v2 3/4] ima: limit secure boot feedback scope for appraise Bruno Meneguele
2020-09-04 21:07   ` Mimi Zohar
2020-09-05  1:17     ` Bruno Meneguele [this message]
2020-09-05  1:20   ` [PATCH v3 " Bruno Meneguele
2020-09-11 15:07     ` Mimi Zohar
2020-09-11 18:03       ` Bruno Meneguele
2020-09-04 19:41 ` [PATCH v2 4/4] integrity: prompt keyring name for unknown key request Bruno Meneguele

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=20200905011721.GA3225@heredoc.io \
    --to=bmeneg@redhat.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zohar@linux.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.