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]
Date:   Tue, 19 Jun 2018 15:27:19 -0700
From:   Fenghua Yu <fenghua.yu@...el.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Fenghua Yu <fenghua.yu@...el.com>, Ingo Molnar <mingo@...hat.com>,
        H Peter Anvin <hpa@...or.com>,
        Ashok Raj <ashok.raj@...el.com>,
        Alan Cox <alan@...ux.intel.com>,
        Ravi V Shankar <ravi.v.shankar@...el.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        x86 <x86@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
        Borislav Petkov <bp@...en8.de>
Subject: Re: [RFC PATCH 7/8] x86/lib_user_wait.h: Add APIs for user wait
 instructions

On Tue, Jun 19, 2018 at 11:12:05AM +0200, Thomas Gleixner wrote:
> On Fri, 15 Jun 2018, Fenghua Yu wrote:
> 
> > A few new user wait instructions UMONITOR, UMWAIT, and TPAUSE are
> > published in the latest Intel Instruction Set Extensions document.
> > 
> > Define the APIs for user or kernel to use the instructions.
> 
> You're not defining APIs. You're adding a pile of misdesigned helper
> functions which again add static storage per compilation unit and CPUID
> fiddling.
> 
> If you want to add proper APIs then add the stuff to the VDSO and be done
> with it.

The user wait instructions are mainly called by user apps; but they can
be used in kernel as well.

I'm planning to provide five APIs to user:
1. If user wait feature is supported
2. nsec to tsc translation
3. umonitor function that exectes UMONITOR instruction
4. umwait function that executes UMWAIT instruction
5. tpause function that executes TPAUSE instruction

Seems 1-2 can be implemented in VDSO. But should I implement 3-5 in
VDSO/kernel as well?

Thanks.

-Fenghua

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ