mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Baolin Wang <baolin.wang@linaro.org>
Cc: serge.hallyn@canonical.com, arnd@arndb.de,
	john.stultz@linaro.org, linux-kernel@vger.kernel.org,
	james.l.morris@oracle.com, serge@hallyn.com, paul@paul-moore.com,
	john.johansen@canonical.com, sds@tycho.nsa.gov,
	casey@schaufler-ca.com, penguin-kernel@I-love.SAKURA.ne.jp,
	neilb@suse.de, edumazet@google.com, jlayton@primarydata.com,
	linux-security-module@vger.kernel.org, y2038@lists.linaro.org
Subject: Re: [PATCH 3/6] security: Introduce security_settime64()
Date: Wed, 15 Jul 2015 12:24:09 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1507151218060.18576@nanos> (raw)
In-Reply-To: <ebd8579536b37bbaf60bbb87420f39f72334a777.1436511577.git.baolin.wang@linaro.org>

On Wed, 15 Jul 2015, Baolin Wang wrote:

> security_settime() returns a timespec, which is not year 2038 safe

It returns int, which is year 2038 safe on all systems. Copy and paste
is great, right?

> -int security_settime(const struct timespec *ts, const struct timezone *tz);
> +int security_settime64(const struct timespec64 *ts, const struct timezone *tz);
> +static inline int security_settime(const struct timespec *ts, const struct timezone *tz)
> +{
> +	struct timespec64 ts64 = timespec_to_timespec64(*ts);
> +
> +	return security_settime64(&ts64, tz);
> +}

What's the point of this inline? Explanation is missing in
changelog.

Also this wants follow up patches which fix the call sites and remove
that inline helper again.

> -int cap_settime(const struct timespec *ts, const struct timezone *tz)
> +int cap_settime(const struct timespec64 *ts, const struct timezone *tz)

Changelog is missing that none of the existing hooks is using the ts
argument and therefor the patch is not doing any functional changes.

Thanks,

	tglx

  reply	other threads:[~2015-07-15 10:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15  5:47 [PATCH 0/6] Introduce 64bit accessors and structures required to address y2038 issues in the posix_clock subsystem Baolin Wang
2015-07-15  5:51 ` [PATCH 1/6] time: Introduce struct itimerspec64 Baolin Wang
2015-07-15  5:54 ` [PATCH 2/6] timekeeping: Introduce current_kernel_time64() Baolin Wang
2015-07-15  5:57 ` [PATCH 3/6] security: Introduce security_settime64() Baolin Wang
2015-07-15 10:24   ` Thomas Gleixner [this message]
2015-07-15 11:34     ` Baolin Wang
2015-07-15  6:01 ` [PATCH 4/6] time: Introduce do_sys_settimeofday64() Baolin Wang
2015-07-15  6:04 ` [PATCH 5/6] time: Introduce timespec64_to_jiffies()/jiffies_to_timespec64() Baolin Wang
2015-07-15  6:07 ` [PATCH 6/6] cputime: Introduce cputime_to_timespec64()/timespec64_to_cputime() Baolin Wang
2015-07-15 10:31   ` Thomas Gleixner
2015-07-15 11:42     ` Baolin Wang
2015-07-15 11:55       ` Thomas Gleixner
2015-07-16  2:22         ` Baolin Wang
2015-07-16 10:43           ` Thomas Gleixner
2015-07-17  8:39             ` Baolin Wang

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.11.1507151218060.18576@nanos \
    --to=tglx@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=baolin.wang@linaro.org \
    --cc=casey@schaufler-ca.com \
    --cc=edumazet@google.com \
    --cc=james.l.morris@oracle.com \
    --cc=jlayton@primarydata.com \
    --cc=john.johansen@canonical.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=paul@paul-moore.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=sds@tycho.nsa.gov \
    --cc=serge.hallyn@canonical.com \
    --cc=serge@hallyn.com \
    --cc=y2038@lists.linaro.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®