From: Thomas Gleixner <tglx@linutronix.de>
To: Ondrej Mosnacek <omosnace@redhat.com>
Cc: linux-audit@redhat.com, Paul Moore <paul@paul-moore.com>,
Richard Guy Briggs <rgb@redhat.com>,
Steve Grubb <sgrubb@redhat.com>,
Miroslav Lichvar <mlichvar@redhat.com>,
John Stultz <john.stultz@linaro.org>,
Stephen Boyd <sboyd@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH ghak10 v7 2/2] ntp: Audit NTP parameters adjustment
Date: Wed, 10 Apr 2019 08:24:28 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.1904100819290.2020@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20190409123134.19350-3-omosnace@redhat.com>
On Tue, 9 Apr 2019, Ondrej Mosnacek wrote:
> diff --git a/include/linux/audit.h b/include/linux/audit.h
> index 2c62c0468888..1c372ad7ebe9 100644
> --- a/include/linux/audit.h
> +++ b/include/linux/audit.h
> @@ -86,6 +86,26 @@ struct audit_field {
> u32 op;
> };
>
> +#define AUDIT_NTP_OFFSET 0
> +#define AUDIT_NTP_FREQ 1
> +#define AUDIT_NTP_STATUS 2
> +#define AUDIT_NTP_TAI 3
> +#define AUDIT_NTP_TICK 4
> +#define AUDIT_NTP_ADJUST 5
> +#define AUDIT_NTP_NVALS 6 /* count */
That should be an named enum and the id argument should be the same type.
> @@ -720,14 +721,29 @@ int __do_adjtimex(struct __kernel_timex *txc, const struct timespec64 *ts,
> /* adjtime() is independent from ntp_adjtime() */
> time_adjust = txc->offset;
> ntp_update_frequency();
> +
> + audit_ntp_set_old(ad, AUDIT_NTP_ADJUST, save_adjust);
> + audit_ntp_set_new(ad, AUDIT_NTP_ADJUST, time_adjust);
> }
> txc->offset = save_adjust;
> } else {
> -
> /* If there are input parameters, then process them: */
> - if (txc->modes)
> + if (txc->modes) {
> + audit_ntp_set_old(ad, AUDIT_NTP_OFFSET, time_offset);
> + audit_ntp_set_old(ad, AUDIT_NTP_FREQ, time_freq);
> + audit_ntp_set_old(ad, AUDIT_NTP_STATUS, time_status);
> + audit_ntp_set_old(ad, AUDIT_NTP_TAI, *time_tai);
> + audit_ntp_set_old(ad, AUDIT_NTP_TICK, tick_usec);
> +
> process_adjtimex_modes(txc, time_tai);
>
> + audit_ntp_set_new(ad, AUDIT_NTP_OFFSET, time_offset);
> + audit_ntp_set_new(ad, AUDIT_NTP_FREQ, time_freq);
> + audit_ntp_set_new(ad, AUDIT_NTP_STATUS, time_status);
> + audit_ntp_set_new(ad, AUDIT_NTP_TAI, *time_tai);
> + audit_ntp_set_new(ad, AUDIT_NTP_TICK, tick_usec);
> + }
Yes, that looks much more palatable! Nice work!
With the above addressed:
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
next prev parent reply other threads:[~2019-04-10 6:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-09 12:31 [PATCH ghak10 v7 0/2] audit: Log changes that can affect the system clock Ondrej Mosnacek
2019-04-09 12:31 ` [PATCH ghak10 v7 1/2] timekeeping: Audit clock adjustments Ondrej Mosnacek
2019-04-09 14:26 ` Richard Guy Briggs
2019-04-09 15:05 ` Ondrej Mosnacek
2019-04-10 6:25 ` Thomas Gleixner
2019-04-09 12:31 ` [PATCH ghak10 v7 2/2] ntp: Audit NTP parameters adjustment Ondrej Mosnacek
2019-04-09 14:40 ` Richard Guy Briggs
2019-04-09 15:10 ` Ondrej Mosnacek
2019-04-10 6:24 ` Thomas Gleixner [this message]
2019-04-10 7:29 ` Ondrej Mosnacek
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=alpine.DEB.2.21.1904100819290.2020@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=john.stultz@linaro.org \
--cc=linux-audit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mlichvar@redhat.com \
--cc=omosnace@redhat.com \
--cc=paul@paul-moore.com \
--cc=rgb@redhat.com \
--cc=sboyd@kernel.org \
--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
all inboxes | Powered by JetHome®