Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1702519

Re: [RFC PATCH 3/5] ima: mamespace audit status flags

From Tycho Andersen <tycho@docker.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 3/5] ima: mamespace audit status flags
Date 2017-08-02 23:50 +0200
Message-ID <ua9GG-7au-9@gated-at.bofh.it> (permalink)
References <u5sAi-59K-21@gated-at.bofh.it> <u5sAj-59K-43@gated-at.bofh.it> <u9IZQ-6Oe-11@gated-at.bofh.it> <u9J9w-6UE-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Aug 01, 2017 at 01:25:31PM -0400, Mehmet Kayaalp wrote:
> >> +unsigned long iint_flags(struct integrity_iint_cache *iint,
> >> +			 struct ns_status *status)
> >> +{
> >> +	if (!status)
> >> +		return iint->flags;
> >> +
> >> +	return iint->flags & (status->flags & IMA_NS_STATUS_FLAGS);
> > 
> > Just to confirm, is there any situation where:
> > 
> >    iint->flags & IMA_NS_STATUS_FLAGS != status->flags & IMA_NS_STATUS_FLAGS
> > 
> > ? i.e. can this line just be:
> > 
> >    return status->flags & IMA_NS_STATUS_FLAGS;
> > 
> 
> As Guilherme had pointed out, the first & should be |.

Sorry, that mail got filtered somehow, thanks. Per your discussion, I
guess the most defensive way is:

iint->flags & ~IMA_NS_STATUS_FLAGS | status->flags & IMA_NS_STATUS_FLAGS

in case something comes along and sets IMA_AUDITED on the root iint,
we don't want it to propagate to this ns' status unnecessarily.

Anyway, thanks!

Tycho

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [RFC PATCH 3/5] ima: mamespace audit status flags Tycho Andersen <tycho@docker.com> - 2017-08-01 19:20 +0200
  Re: [RFC PATCH 3/5] ima: mamespace audit status flags Mehmet Kayaalp <mkayaalp@linux.vnet.ibm.com> - 2017-08-01 19:30 +0200
    Re: [RFC PATCH 3/5] ima: mamespace audit status flags Tycho Andersen <tycho@docker.com> - 2017-08-02 23:50 +0200

csiph-web