public inbox for audit@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Casey Schaufler <casey@schaufler-ca.com>,
	casey@schaufler-ca.com, eparis@redhat.com,
	linux-security-module@vger.kernel.org, audit@vger.kernel.org
Cc: jmorris@namei.org, serge@hallyn.com, keescook@chromium.org,
	john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp,
	stephen.smalley.work@gmail.com, linux-kernel@vger.kernel.org,
	selinux@vger.kernel.org
Subject: Re: [PATCH v2 1/6] Audit: Create audit_stamp structure
Date: Wed, 12 Mar 2025 19:51:33 -0400	[thread overview]
Message-ID: <d3a295144441248d47fee124e30a008a@paul-moore.com> (raw)
In-Reply-To: <20250307183701.16970-2-casey@schaufler-ca.com>

On Mar  7, 2025 Casey Schaufler <casey@schaufler-ca.com> wrote:
> 
> Replace the timestamp and serial number pair used in audit records
> with a structure containing the two elements.
> 
> Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
> ---
>  kernel/audit.c   | 17 +++++++++--------
>  kernel/audit.h   | 13 +++++++++----
>  kernel/auditsc.c | 22 +++++++++-------------
>  3 files changed, 27 insertions(+), 25 deletions(-)

...

> diff --git a/kernel/auditsc.c b/kernel/auditsc.c
> index 9c853cde9abe..2ec3a0d85447 100644
> --- a/kernel/auditsc.c
> +++ b/kernel/auditsc.c
> @@ -994,10 +994,10 @@ static void audit_reset_context(struct audit_context *ctx)
>  	 */
>  
>  	ctx->current_state = ctx->state;
> -	ctx->serial = 0;
> +	ctx->stamp.serial = 0;
>  	ctx->major = 0;
>  	ctx->uring_op = 0;
> -	ctx->ctime = (struct timespec64){ .tv_sec = 0, .tv_nsec = 0 };
> +	ctx->stamp.ctime = (struct timespec64){ .tv_sec = 0, .tv_nsec = 0 };
>  	memset(ctx->argv, 0, sizeof(ctx->argv));
>  	ctx->return_code = 0;
>  	ctx->prio = (ctx->state == AUDIT_STATE_RECORD ? ~0ULL : 0);

Since we are now combining the timestamp and serial number into a single
struct, let's move both clear/reset instructions together up to where
we currently reset ctx->serial.

--
paul-moore.com

  reply	other threads:[~2025-03-12 23:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250307183701.16970-1-casey.ref@schaufler-ca.com>
2025-03-07 18:36 ` [PATCH v2 0/6] Audit: Records for multiple security contexts Casey Schaufler
2025-03-07 18:36   ` [PATCH v2 1/6] Audit: Create audit_stamp structure Casey Schaufler
2025-03-12 23:51     ` Paul Moore [this message]
2025-03-07 18:36   ` [PATCH v2 2/6] Audit: Allow multiple records in an audit_buffer Casey Schaufler
2025-03-12 23:51     ` Paul Moore
2025-03-07 18:36   ` [PATCH v2 3/6] LSM: security_lsmblob_to_secctx module selection Casey Schaufler
2025-03-08 15:52     ` kernel test robot
2025-03-12 23:51     ` Paul Moore
2025-03-07 18:36   ` [PATCH v2 4/6] Audit: Add record for multiple task security contexts Casey Schaufler
2025-03-12 23:51     ` Paul Moore
2025-03-13 12:29       ` Paul Moore
2025-03-07 18:37   ` [PATCH v2 5/6] Audit: multiple subject lsm values for netlabel Casey Schaufler
2025-03-12 23:51     ` Paul Moore
2025-03-07 18:37   ` [PATCH v2 6/6] Audit: Add record for multiple object contexts Casey Schaufler
2025-03-09 14:18     ` kernel test robot
2025-03-10  7:26     ` kernel test robot
2025-03-10  8:20     ` Dan Carpenter
2025-03-12 23:51     ` Paul Moore

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=d3a295144441248d47fee124e30a008a@paul-moore.com \
    --to=paul@paul-moore.com \
    --cc=audit@vger.kernel.org \
    --cc=casey@schaufler-ca.com \
    --cc=eparis@redhat.com \
    --cc=jmorris@namei.org \
    --cc=john.johansen@canonical.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=selinux@vger.kernel.org \
    --cc=serge@hallyn.com \
    --cc=stephen.smalley.work@gmail.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