All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: Paul Moore <pmoore@redhat.com>
Cc: Eric Paris <eparis@redhat.com>,
	Richard Guy Briggs <rgb@redhat.com>,
	linux-audit@redhat.com, linux-kernel@vger.kernel.org,
	aviro@redhat.com
Subject: Re: [PATCH V5 0/5] audit by executable name
Date: Tue, 21 Oct 2014 18:06:52 -0400	[thread overview]
Message-ID: <7183031.mHcELVMDhn@x2> (raw)
In-Reply-To: <3623738.X9Kq6ePK5C@sifl>

On Tuesday, October 21, 2014 05:56:36 PM Paul Moore wrote:
> On Monday, October 20, 2014 07:33:39 PM Steve Grubb wrote:
> > On Monday, October 20, 2014 07:02:33 PM Paul Moore wrote:
> > > On Monday, October 20, 2014 06:47:27 PM Eric Paris wrote:
> > > > On Mon, 2014-10-20 at 16:25 -0400, Steve Grubb wrote:
> > > > > On Thursday, October 02, 2014 11:06:51 PM Richard Guy Briggs wrote:
> > > > > > This is a part of Peter Moody, my and Eric Paris' work to
> > > > > > implement
> > > > > > audit by executable name.
> > > > > 
> > > > > Does this patch set define an AUDIT_VERSION_SOMETHING and then set
> > > > > AUDIT_VERSION_LATEST to it? If not, I need one to tell if the kernel
> > > > > supports it when issuing commands. Also, if its conceivable that
> > > > > kernels
> > > > > may pick and choose what features could be backported to a curated
> > > > > kernel, should AUDIT_VERSION_ be a number that is incremented or a
> > > > > bit
> > > > > mask?
> > > > 
> > > > Right now the value is 2. So this is your last hope if you want to
> > > > make
> > > > it a bitmask. I'll leave that up to paul/richard to (over) design.
> > > 
> > > Audit is nothing if not over-designed.  I want to make sure we're
> > > consistent with the previous design methodologies ;)
> > > 
> > > I've been thinking about this for about the past half-hour while I've
> > > been
> > > going through some other mail and I'm not really enthused about using
> > > the
> > > version number to encode capabilities.  What sort of problems would we
> > > have if we introduced a new audit netlink command to query the kernel
> > > for
> > > audit capabilities?
> > 
> > I thought that is what we were getting in this patch:
> > https://www.redhat.com/archives/linux-audit/2014-January/msg00054.html
> 
> That patch, and the simple name "version", looks more like a version number
> and not a capabilities bitmap.  However, as Eric previously pointed out,
> since we are only at version 2, all is not lost.
> 
> > As I understood it, I send an AUDIT_GET command on netlink and then look
> > in
> > status.version to see what we have. I really think that in the mainline
> > kernel, there will be a steady increment of capabilities. However, for
> > distributions, they may want to pick and choose which capabilities to
> > backport to their shipping kernel. Meaning in practice, a bitmap may be
> > better to allow cherry picking capabilities and user space being able to
> > make informed decisions.
> 
> If we are intending to use this as a way of checking for functionality then
> it really should be a bitmap and not a version number.  Regardless of if we
> are talking about an upstream or distribution kernel.
> 
> > I really don't mind if this is done by a new netlink command (but if we
> > do,
> > what happens to status.version?) or if we just keep going with
> > status.version. Just tell me which it is.
> 
> No, let's stick with what we have now.  I mistakenly assumed that since the
> struct field and userspace #defines included "version" that the value was
> actually a version number ... silly me, I have no idea why I thought that.
> 
> So, with this in mind, I think a couple of small tweaks are in order (sorry
> Richard), in no particular order:
> 
> * Change the audit_status.version field comment in
> include/uapi/linux/audit.h to "/* audit functionality bitmap */", or
> similar.  We can't really change the structure now, but the comment is fair
> game.
> 
> * Change AUDIT_VERSION_LATEST to a bitmask instead of a number.  For
> example, it should be 3 given the current code, not 2.  In a perfect world
> this wouldn't even be in the uapi header, but it is so we need to keep it
> updated. Bumping it higher should be backwards compatible.
> 
> Can anyone think of anything else that might be affected by this?

This plan sounds good to me.

Thanks,
-Steve

  reply	other threads:[~2014-10-21 22:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03  3:06 [PATCH V5 0/5] audit by executable name Richard Guy Briggs
2014-10-03  3:06 ` Richard Guy Briggs
2014-10-03  3:06 ` [PATCH V5 1/5] audit: implement audit by executable Richard Guy Briggs
2014-10-03  3:06   ` Richard Guy Briggs
2014-10-03  3:06 ` [PATCH V5 2/5] audit: clean simple fsnotify implementation Richard Guy Briggs
2014-10-03  3:06 ` [PATCH V5 3/5] audit: convert audit_exe to audit_fsnotify Richard Guy Briggs
2014-10-03  3:06   ` Richard Guy Briggs
2014-10-03  3:06 ` [PATCH V5 4/5] audit: avoid double copying the audit_exe path string Richard Guy Briggs
2014-10-03  3:06 ` [PATCH V5 5/5] Revert "fixup! audit: clean simple fsnotify implementation" Richard Guy Briggs
2014-10-20 20:25 ` [PATCH V5 0/5] audit by executable name Steve Grubb
2014-10-20 22:47   ` Eric Paris
2014-10-20 23:02     ` Paul Moore
2014-10-20 23:33       ` Steve Grubb
2014-10-20 23:49         ` Steve Grubb
2014-10-21 21:56         ` Paul Moore
2014-10-21 22:06           ` Steve Grubb [this message]
2014-10-21 22:19           ` Eric Paris
2014-10-21 22:35             ` Paul Moore
2014-10-29 19:48               ` Richard Guy Briggs
2014-10-29 20:05                 ` Steve Grubb
2014-10-29 21:54                   ` Richard Guy Briggs
2014-10-29 23:59                     ` Eric Paris
2014-10-30  1:17                       ` Richard Guy Briggs
  -- strict thread matches above, loose matches on Subject: below --
2015-05-29 16:14 Peter Moody
2015-05-29 16:26 ` Paul Moore
2015-05-29 16:28 ` Richard Guy Briggs
2015-05-29 17:15   ` Peter Moody

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=7183031.mHcELVMDhn@x2 \
    --to=sgrubb@redhat.com \
    --cc=aviro@redhat.com \
    --cc=eparis@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmoore@redhat.com \
    --cc=rgb@redhat.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.