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: <013B70E7-0D57-4EB3-BBD2-D9F5E5555CC5@intel.com>
Date:   Mon, 30 Aug 2021 23:38:37 +0000
From:   "Bae, Chang Seok" <chang.seok.bae@...el.com>
To:     Borislav Petkov <bp@...en8.de>
CC:     "Lutomirski, Andy" <luto@...nel.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...nel.org" <mingo@...nel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "Brown, Len" <len.brown@...el.com>,
        "Hansen, Dave" <dave.hansen@...el.com>,
        "Macieira, Thiago" <thiago.macieira@...el.com>,
        "Liu, Jing2" <jing2.liu@...el.com>,
        "Shankar, Ravi V" <ravi.v.shankar@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v9 10/26] x86/fpu/xstate: Update the XSTATE buffer address
 finder to support dynamic states

On Aug 30, 2021, at 10:18, Borislav Petkov <bp@...en8.de> wrote:
> On Wed, Aug 18, 2021 at 07:47:04PM +0000, Bae, Chang Seok wrote:
>> It was refactored to use in the new helper to find feature_nr’s start point.
> 
> Which new helper?
> 
>> If the size is added up here, it is not ‘i’'s start point anymore.
> 
> Yeah, sorry, I have only a very slight idea what you mean here - you'll
> have to try again.

Just recap what is said on SDM, Vol1 13.4.3 Extended Region of an XSAVE Area:

  - In the compacted format, each state component i is located at a byte offset
    from the base address of the XSAVE area.
  - location_i is determined by location_j and size_j, where j is in 1 < j < i
    and the greatest value XCOMP_BV[j] = 1:
    location_i = location_j + size_j
    (let's simplify without the 64-byte alignment here)

This loop was moved from calculate_xstate_buf_size_from_mask() (if renamed) to
here in the new helper -- get_xstate_comp_offset().

But the returned value is different.  get_xstate_comp_offset(mask, i) should
return the location_i but calculate_xstate_buf_size_from_mask(mask) calculates
the buffer size which is location_i + size_i when the greatest feature number
is i.

Thanks,
Chang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ