From: Steve Grubb <sgrubb@redhat.com>
To: Tony Jones <tonyj@suse.de>
Cc: linux-audit@redhat.com, linux-kernel@vger.kernel.org,
chrisw@sous-sol.org, viro@ftp.linux.org.uk
Subject: Re: [PATCH] audit: clear thread flag for new children
Date: Thu, 1 Nov 2007 14:34:46 -0400 [thread overview]
Message-ID: <200711011434.47147.sgrubb@redhat.com> (raw)
In-Reply-To: <20071101172324.GA3938@suse.de>
On Thursday 01 November 2007 01:23:24 pm Tony Jones wrote:
> > We are looking into this - at one time it did. Someone should follow up
> > with a path correcting this soon. But I doubt the audit system will work
> > correctly if the flag gets removed as there is no good way to add it
> > again later.
>
> So on the syscall path you're now going to something like (pseudocode):
> if (unlikely(current->audit_context)) {audit_syscall_entry()}
> else if (audit_enabled) {audit_alloc(); audit_syscall_entry()}
Something like that. The TIF flag is to pick off processes that we are
interested in auditing, for performance reasons if audit is disabled the
context is not created. But if auditing is re-enabled, processes can
be "repaired" so that the are auditable again by allocating the context on
the fly the first time we see a process. Without the flag, they never get
steered into the audit system where this can happen.
> I agree, if this is what you want to do, then clearing the thread flag
> would be a bad idea.
If any other performance improvements jumps out at you, please bring them up.
> I'd assumed the current behaviour was by design as allocating contexts at
> syscall time doesn't seem a great idea but if you need the functionality,
> you need the functionality.
Yep
-Steve
prev parent reply other threads:[~2007-11-01 18:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-26 20:42 [PATCH] audit: clear thread flag for new children Tony Jones
2007-10-26 22:42 ` Chris Wright
2007-10-27 14:21 ` Steve Grubb
2007-10-29 17:20 ` Tony Jones
2007-10-29 22:04 ` Steve Grubb
2007-10-29 23:15 ` Tony Jones
2007-11-01 14:33 ` Steve Grubb
2007-11-01 17:23 ` Tony Jones
2007-11-01 18:34 ` Steve Grubb [this message]
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=200711011434.47147.sgrubb@redhat.com \
--to=sgrubb@redhat.com \
--cc=chrisw@sous-sol.org \
--cc=linux-audit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tonyj@suse.de \
--cc=viro@ftp.linux.org.uk \
/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