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: <alpine.DEB.2.21.1810012009010.32062@nanos.tec.linutronix.de>
Date:   Mon, 1 Oct 2018 20:15:28 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Mark Salyzyn <salyzyn@...roid.com>
cc:     linux-kernel@...r.kernel.org, James Morse <james.morse@....com>,
        Russell King <linux@...linux.org.uk>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will.deacon@....com>,
        Andy Lutomirski <luto@...capital.net>,
        Dmitry Safonov <dsafonov@...tuozzo.com>,
        John Stultz <john.stultz@...aro.org>,
        Mark Rutland <mark.rutland@....com>,
        Laura Abbott <labbott@...hat.com>,
        Kees Cook <keescook@...omium.org>,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        Andy Gross <andy.gross@...aro.org>,
        Kevin Brodsky <kevin.brodsky@....com>,
        Andrew Pinski <apinski@...ium.com>,
        linux-arm-kernel@...ts.infradead.org,
        Jeremy Linton <Jeremy.Linton@....com>,
        android-kernel@...roid.com, Jinbum Park <jinb.park7@...il.com>,
        Ingo Molnar <mingo@...nel.org>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: RESEND [PATCH v6 11/12] lib: vdso: Add support for
 CLOCK_BOOTTIME

On Mon, 1 Oct 2018, Mark Salyzyn wrote:
>  
> +static notrace int do_boottime(const struct vdso_data *vd, struct timespec *ts)
> +{
> +	u32 seq, mult, shift;
> +	u64 nsec, cycle_last;
> +	vdso_wtm_clock_nsec_t wtm_nsec;
> +
> +	/* open coding timespec_add_ns to save a ts->tv_nsec = 0 */
> +	ts->tv_sec = sec + __iter_div_u64_rem(nsec, NSEC_PER_SEC, &nsec);
> +	ts->tv_nsec = nsec;
> +
> +	return 0;
> +}
> +

Instead of adding yet another copy of the same code you might want to look
at the rework I did for the x86 vdso in order to support CLOCK_TAI w/o
running into the issue of the clock switch case being compiled into a jump
table and then the compile asking for retpoline.

  http://lkml.kernel.org/r/20180917124533.329334911@linutronix.de

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ