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: <201006051223.06000.arnd@arndb.de>
Date:	Sat, 5 Jun 2010 12:23:05 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	John Stultz <johnstul@...ibm.com>
Cc:	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC][PATCH 5/6] Cleanup hrtimer.c's direct access to wall_to_monotonic

On Saturday 05 June 2010, John Stultz wrote:
>         do {
>                 seq = read_seqbegin(&xtime_lock);
>                 xts = __current_kernel_time();
> -               tom = wall_to_monotonic;
> +               tom = __get_wall_to_monotonic();
>         } while (read_seqretry(&xtime_lock, seq));
>  

Would it make sense to also limit the use of xtime_lock to the
timekeeping code? I suppose you could merge the various accessors
(current_kernel_time, get_monotonic_coarse, __current_kernel_time,
__get_wall_to_monotonic) with a single function doing

struct timespec current_kernel_time(struct timespec *tomono)
{
        struct timespec now;
        unsigned long seq;

        do {
                seq = read_seqbegin(&xtime_lock);
		if (tomono)
			wall_to_monotonic;
                now = xtime;
        } while (read_seqretry(&xtime_lock, seq));

        return now;
}

	Arnd
--
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