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: <a602b661-dde5-399d-6245-cf48a0e43f54@android.com>
Date:   Mon, 1 Oct 2018 13:52:32 -0700
From:   Mark Salyzyn <salyzyn@...roid.com>
To:     Thomas Gleixner <tglx@...utronix.de>
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 10/01/2018 11:15 AM, Thomas Gleixner wrote:
> 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

Great idea. Thanks!

The point of the first 12 patches is to _align_ the arm code to match 
the assembler for arm64 exactly 1:1. Then switch arm64 assembler to use 
the _same_ code in 'C' as a library. No performance degradation.

Next extend the vdso framework on arm64 to _also_ use that library for 
vDSO32 (arm32 compat on 64-bit). At this point we achieve a 0.4% power 
reduction on Android.

At that point, we would be ready for a rework that fixes all three (ARM 
vDSO, ARM64 vDSO and ARM64 vDSO32) to get the compiler to handle the 
switch statement better. One step at a time.

-- Mark


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ