From: Chris Wright <chrisw@osdl.org>
To: Rik Faith <faith@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RFC] Light-weight Auditing Framework
Date: Mon, 1 Mar 2004 12:26:18 -0800 [thread overview]
Message-ID: <20040301122618.O22989@build.pdx.osdl.net> (raw)
In-Reply-To: <16451.25789.72815.763592@neuro.alephnull.com>; from faith@redhat.com on Mon, Mar 01, 2004 at 11:28:45AM -0500
* Rik Faith (faith@redhat.com) wrote:
> This note describes a patch against 2.6.4-rc1-bk2 that provides a
> low-overhead system-call auditing framework for Linux that is usable by
> LSM components (e.g., SELinux). Comments will be appreciated.
Do you have an perf numbers for simply enabling the auditint framework?
Seems to be a lot of use of likely/unlikely. Are these actually useful
optimizations? Doesn't seem like CONFIG_AUDIT=n disables all the code.
Not sure if the rest of the patch lot is mainlineable or not, but here are
some simple nits/questions.
Some basic CodingStyle bits:
+static int audit_initialized = 0;
no need to zero initialized static data.
+ if (in_irq()) BUG();
+ if (!context) BUG();
convert to BUG_ON(in_irq());
BUG_ON(!context);
+#ifdef CONFIG_AUDIT
+/***********************************************************************/
+/** audit.c **/
+/***********************************************************************/
Noisy comments.
+ audit_log_format(ab, " dev=%02x:%02x",
+ MAJOR(context->names[i].rdev),
+ MINOR(context->names[i].rdev));
format_dev_t() ?
+static int __init audit_enable(char *str)
+{
+ if (!strncmp(str, "on", 2) || !strncmp(str, "yes", 3))
+ audit_default = 1;
+ else if (!strncmp(str, "off", 3) || !strncmp(str, "no", 2))
+ audit_default = 0;
+ else
+ audit_default = simple_strtol(str, NULL, 0);
just pick one method, strings or int (int is so simple), and document the
method for enable/disable.
+void audit_log_vformat(struct audit_buffer *ab, const char *fmt, va_list args)
as of now, this could be static, and not exported, no?
+ ab = kmalloc(sizeof(*ab), GFP_ATOMIC);
need atomic allocations here? also, i wasn't clear on what makes sure the
audit_buffers can't be overflown, the bits in vformat talking about 1024 bytes?
+ audit_log_format(ab, "<toolong>");
is it useful to at least get the final d_name?
thanks,
-chris
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net
next prev parent reply other threads:[~2004-03-01 20:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-01 16:28 Rik Faith
2004-03-01 19:45 ` Christoph Hellwig
2004-03-01 20:28 ` Rik Faith
2004-03-02 9:44 ` Olaf Kirch
2004-03-02 11:09 ` Rik Faith
2004-03-02 15:02 ` Rik Faith
2004-03-03 8:55 ` Muli Ben-Yehuda
2004-03-03 11:21 ` Rik Faith
2004-03-01 20:26 ` Chris Wright [this message]
2004-03-02 21:49 ` Rik Faith
2004-03-03 0:49 ` Chris Wright
2004-03-03 10:57 ` Rik Faith
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=20040301122618.O22989@build.pdx.osdl.net \
--to=chrisw@osdl.org \
--cc=faith@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®