lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALAqxLX-mnLW5Ou-iwtRpRTbznhsBVzECHYPijifkvRsiHgv_Q@mail.gmail.com>
Date:	Wed, 23 Jul 2014 14:15:55 -0700
From:	John Stultz <john.stultz@...aro.org>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [patch V2 12/64] timekeeper: Move tk_xtime to core code

On Wed, Jul 16, 2014 at 2:04 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
> Index: tip/kernel/time/timekeeping.c
> ===================================================================
> --- tip.orig/kernel/time/timekeeping.c
> +++ tip/kernel/time/timekeeping.c
> @@ -51,6 +51,15 @@ static inline void tk_normalize_xtime(st
>         }
>  }
>
> +static inline struct timespec64 tk_xtime(struct timekeeper *tk)
> +{
> +       struct timespec64 ts;
> +
> +       ts.tv_sec = tk->xtime_sec;
> +       ts.tv_nsec = (long)(tk->xtime_nsec >> tk->shift);
> +       return ts;
> +}
> +
>  static void tk_set_xtime(struct timekeeper *tk, const struct timespec64 *ts)
>  {
>         tk->xtime_sec = ts->tv_sec;
> @@ -199,6 +208,40 @@ static inline s64 timekeeping_get_ns_raw
>         return nsec + arch_gettimeoffset();
>  }
>
> +#ifdef CONFIG_GENERIC_TIME_VSYSCALL_OLD
> +
> +static inline void update_vsyscall(struct timekeeper *tk)
> +{
> +       struct timespec xt;
> +
> +       xt = tk_xtime(tk);
> +       update_vsyscall_old(&xt, &tk->wall_to_monotonic, tk->clock, tk->mult);
> +}

So one gotcha here, and I realized I missed this in my timekeeping
timespec64 conversion patch, is that here we're calling tk_xtime()
which returns a timespec64, and we stuff it into a timespec.

Now, the reason we didn't see the compiler gripe on this, was that the
only VSYSCALL_OLD implementations left are ia64 and ppc64.

I'll add a fixup patch to the queue to address this.

thanks
-john
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ