linux-audit.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Casey Schaufler <casey@schaufler-ca.com>
Cc: Richard Guy Briggs <rgb@redhat.com>,
	Linux-Audit Mailing List <linux-audit@redhat.com>
Subject: Re: The audit "context" and when to expect it.
Date: Fri, 29 May 2020 17:49:12 -0400	[thread overview]
Message-ID: <CAHC9VhTF-Y+YW50Qo-UgOFPuvGPvHxPph-KHfU7CmsRbD7QW1A@mail.gmail.com> (raw)
In-Reply-To: <29258822-14bb-5ef9-eec9-e5d09f22d70f@schaufler-ca.com>

On Fri, May 29, 2020 at 5:42 PM Casey Schaufler <casey@schaufler-ca.com> wrote:
> On 5/29/2020 12:01 PM, Paul Moore wrote:
> > On Fri, May 29, 2020 at 1:59 PM Casey Schaufler <casey@schaufler-ca.com> wrote:
> >> What does a NULL audit context (e.g. ab->cxt == NULL) tell
> >> me about the status of the audit buffer? It seems like it should
> >> be telling me that the audit buffer is being created for some
> >> purpose unrelated to the current task. And yet there are places
> >> where information is pulled from the current task even when
> >> the cxt is NULL.
> > The simple answer is that a NULL audit_context indicates a standalone
> > record, meaning a record with a unique timestamp so that it is not
> > associated with any other records into an event.  If the audit_context
> > it not NULL then the information in the context is used to group, or
> > associate, all of the records sharing that context into a single
> > event.
>
> OK, so if I want a add a sub-record with the multiple secctx values

Terminology nit-pick: there are "records" and "events", there is
nothing we would call a sub-record.  In the case you are referring to,
this is a record which would always be part of a larger collection of
records.  It's similar to a PATH record in that it doesn't make sense
by itself, but when combined with the other records in an event, it
provides useful information.

> for the events that include a subject value I need to change those
> events to use an audit_context. Is that going to introduce an
> unacceptable memory or performance burden?

No more so than any additional record.  Or rather, it seems like this
is the only way to do what you want to do so I don't see a way around
it.

-- 
paul moore
www.paul-moore.com

--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit


  reply	other threads:[~2020-05-29 21:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <45ce3357-ca82-8721-22d6-dabe751ad8fa.ref@schaufler-ca.com>
2020-05-29 17:59 ` The audit "context" and when to expect it Casey Schaufler
2020-05-29 19:01   ` Paul Moore
2020-05-29 21:42     ` Casey Schaufler
2020-05-29 21:49       ` Paul Moore [this message]
2020-05-29 22:10         ` Casey Schaufler

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=CAHC9VhTF-Y+YW50Qo-UgOFPuvGPvHxPph-KHfU7CmsRbD7QW1A@mail.gmail.com \
    --to=paul@paul-moore.com \
    --cc=casey@schaufler-ca.com \
    --cc=linux-audit@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).