public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Richard Guy Briggs <rgb@redhat.com>
To: Steve Grubb <sgrubb@redhat.com>
Cc: linux-audit@redhat.com
Subject: Re: Is zero a valid value for the pid member of the AUDIT_SIGNAL_INFO message?
Date: Wed, 12 Mar 2014 12:28:27 -0400	[thread overview]
Message-ID: <20140312162827.GE15329@madcap2.tricolour.ca> (raw)
In-Reply-To: <3374960.PoaQzalfXb@x2>

On 14/03/12, Steve Grubb wrote:
> On Wednesday, March 12, 2014 11:35:56 AM Richard Guy Briggs wrote:
> > > > I looked at converting audit_sig_pid from pid_t to struct pid *, but
> > > > then get_pid() would also be needed to protect that reference.  A
> > > > put_pid() would need to be done once it is no longer needed, which could
> > > > be immediately after it is read in the AUDIT_SIGNAL_INFO message
> > > > preparation, assuming it would never need to be read again.  If this
> > > > isn't the case, put_pid() could be called when audit_pid is nulled, but
> > > > if that message never comes, that struct pid is stuck with a stale
> > > > refcount.  (That isn't an issue if it is init or systemd, but it is
> > > > still wrong.)
> > > >
> > > > This looks more and more like overkill and should probably leave
> > > > audit_sig_pid as pid_t.
> > >
> > > The code has been working good for a long time. I am wondering if the
> > > original  intent was to make it general in case we decided to add more
> > > signals that we are interested in.
> > 
> > Such as HUP to reread config or other possibilities?
> 
> I think we started with sigterm. Then we needed sighup. Then needed usr1 & 
> usr2. Somewhere along the way I think it was just decided to make it open 
> ended in case more were needed later.

Currently, TERM, HUP, USR1 and USR2 but no others cause audit_sig_pid to be set.

Other signals only cause the target task to be added to the target list.

So what is the use case to send any other signal, causing the target to
only be added to the context target list?

> -Steve

- RGB

--
Richard Guy Briggs <rbriggs@redhat.com>
Senior Software Engineer, Kernel Security, AMER ENG Base Operating Systems, Red Hat
Remote, Ottawa, Canada
Voice: +1.647.777.2635, Internal: (81) 32635, Alt: +1.613.693.0684x3545

  reply	other threads:[~2014-03-12 16:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-11 22:15 Is zero a valid value for the pid member of the AUDIT_SIGNAL_INFO message? Richard Guy Briggs
2014-03-12  1:06 ` Eric Paris
2014-03-12  3:32   ` Richard Guy Briggs
2014-03-12 12:44     ` Steve Grubb
2014-03-12 15:35       ` Richard Guy Briggs
2014-03-12 16:07         ` Steve Grubb
2014-03-12 16:28           ` Richard Guy Briggs [this message]
2014-03-12 12:22 ` Steve Grubb
2014-03-12 15:28   ` Richard Guy Briggs
2014-03-12 16:35   ` Eric Paris
2014-03-12 18:21     ` Richard Guy Briggs
2014-03-12 18:27       ` Eric Paris

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=20140312162827.GE15329@madcap2.tricolour.ca \
    --to=rgb@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=sgrubb@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