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: <c364342a-833d-0c68-c496-97a843e512a5@intel.com>
Date:   Mon, 27 Sep 2021 15:25:34 -0700
From:   Sohil Mehta <sohil.mehta@...el.com>
To:     Thomas Gleixner <tglx@...utronix.de>, <x86@...nel.org>
CC:     Tony Luck <tony.luck@...el.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H . Peter Anvin" <hpa@...or.com>,
        Andy Lutomirski <luto@...nel.org>,
        Jens Axboe <axboe@...nel.dk>,
        Christian Brauner <christian@...uner.io>,
        Peter Zijlstra <peterz@...radead.org>,
        Shuah Khan <shuah@...nel.org>, Arnd Bergmann <arnd@...db.de>,
        Jonathan Corbet <corbet@....net>,
        Ashok Raj <ashok.raj@...el.com>,
        Jacob Pan <jacob.jun.pan@...ux.intel.com>,
        "Gayatri Kammela" <gayatri.kammela@...el.com>,
        Zeng Guang <guang.zeng@...el.com>,
        "Dan Williams" <dan.j.williams@...el.com>,
        Randy E Witt <randy.e.witt@...el.com>,
        Ravi V Shankar <ravi.v.shankar@...el.com>,
        Ramesh Thomas <ramesh.thomas@...el.com>,
        <linux-api@...r.kernel.org>, <linux-arch@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-kselftest@...r.kernel.org>
Subject: Re: [RFC PATCH 04/13] x86/fpu/xstate: Enumerate User Interrupts
 supervisor state

On 9/23/2021 3:34 PM, Thomas Gleixner wrote:
> On Mon, Sep 13 2021 at 13:01, Sohil Mehta wrote:
>> Enable xstate supervisor support for User Interrupts by default.
> What means enabled by default? It's enabled when available and not
> disabled on the command line.

I'll remove it.

>> The user interrupt state for a task consists of the MSR state and the
>> User Interrupt Flag (UIF) value. XSAVES and XRSTORS handle saving and
>> restoring both of these states.
>>
>> <The supervisor XSTATE code might be reworked based on issues reported
>> in the past. The Uintr context switching code would also need rework and
>> additional testing in that regard.>
> What? Which issues were reported and if they have been reported then how
> is the provided code correct?


I apologize for causing this confusion. This comment was added a few 
months back when the PKRU and FPU code was being reworked. This comment 
is no longer valid.

>> +/*
>> + * State component 14 is supervisor state used for User Interrupts state.
>> + * The size of this state is 48 bytes
>> + */
>> +struct uintr_state {
>> +	u64 handler;
>> +	u64 stack_adjust;
>> +	u32 uitt_size;
>> +	u8  uinv;
>> +	u8  pad1;
>> +	u8  pad2;
>> +	u8  uif_pad3;		/* bit 7 - UIF, bits 6:0 - reserved */
> Please do not use tail comments. Also what kind of name is uif_pad3?
> Bitfields exist for a reason.


An internal version of this used bitfields. I was suggested that use of 
bitfields is not recommended for x86 code.

The name uif_pad3 is really ugly though. I'll change it to a bitfield 
next time.


Thanks,

Sohil

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ