From: Steve Grubb <sgrubb@redhat.com>
To: Richard Guy Briggs <rgb@redhat.com>
Cc: eparis@parisplace.org, linux-audit@redhat.com, ebiederm@xmission.com
Subject: Re: [PATCH 2/2] audit: shrink audit_krule by using smaller bitfields
Date: Tue, 23 Dec 2014 14:04:07 -0500 [thread overview]
Message-ID: <3448029.dRXQZFlVeR@x2> (raw)
In-Reply-To: <612e5ae15412220b35b5402b39a00112b1842955.1419357176.git.rgb@redhat.com>
On Tuesday, December 23, 2014 01:20:15 PM Richard Guy Briggs wrote:
> Replace five 32-bit fields with one. Move a nearby 32-bit field to enable
> 64-bit alignment.
Are there performance impacts from handling bit fields? The syscall audit rules
affect each syscall of each program running. Also, setting bitfields so small
kind of boxes in any future capability enhancements.
-Steve
> Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
> ---
> include/linux/audit.h | 13 +++++++------
> 1 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/include/linux/audit.h b/include/linux/audit.h
> index b481779..bd06f92 100644
> --- a/include/linux/audit.h
> +++ b/include/linux/audit.h
> @@ -46,13 +46,14 @@ struct audit_tree;
> struct sk_buff;
>
> struct audit_krule {
> - u32 pflags;
> - u32 flags;
> - u32 listnr;
> - u32 action;
> - u32 mask[AUDIT_BITMASK_SIZE];
> + u32 listnr:4,
> + flags:5,
> + action:2,
> + pflags:1,
> + field_count:7,
> + reserved:13;
> u32 buflen; /* for data alloc on list rules */
> - u32 field_count;
> + u32 mask[AUDIT_BITMASK_SIZE];
> char *filterkey; /* ties events to rules */
> struct audit_field *fields;
> struct audit_field *arch_f; /* quick access to arch field */
next prev parent reply other threads:[~2014-12-23 19:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-23 18:02 [PATCH 1/2] audit: restore AUDIT_LOGINUID unset ABI Richard Guy Briggs
2014-12-23 18:20 ` [PATCH 2/2] audit: shrink audit_krule by using smaller bitfields Richard Guy Briggs
2014-12-23 18:33 ` Paris, Eric
2014-12-23 20:42 ` Richard Guy Briggs
2014-12-23 19:04 ` Steve Grubb [this message]
2014-12-23 20:43 ` Richard Guy Briggs
2014-12-23 21:29 ` Paul Moore
2014-12-23 21:26 ` [PATCH 1/2] audit: restore AUDIT_LOGINUID unset ABI Paul Moore
2014-12-23 21:41 ` Paris, Eric
2014-12-23 21:46 ` Paul Moore
2014-12-23 23:02 ` Richard Guy Briggs
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=3448029.dRXQZFlVeR@x2 \
--to=sgrubb@redhat.com \
--cc=ebiederm@xmission.com \
--cc=eparis@parisplace.org \
--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