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: <4d3fd843-2aae-26fd-ea18-26cbc234362e@intel.com>
Date:   Tue, 31 Aug 2021 15:11:59 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Len Brown <lenb@...nel.org>, Borislav Petkov <bp@...en8.de>
Cc:     "Chang S. Bae" <chang.seok.bae@...el.com>,
        Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...nel.org>, X86 ML <x86@...nel.org>,
        "Brown, Len" <len.brown@...el.com>,
        Thiago Macieira <thiago.macieira@...el.com>,
        "Liu, Jing2" <jing2.liu@...el.com>,
        "Ravi V. Shankar" <ravi.v.shankar@...el.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v9 12/26] x86/fpu/xstate: Use feature disable (XFD) to
 protect dynamic user state

On 8/31/21 3:07 PM, Len Brown wrote:
> On Mon, Aug 30, 2021 at 1:52 PM Borislav Petkov <bp@...en8.de> wrote:
> 
>> Well, if you preallocate everything...
> Nothing prevents, say, a pthread_create() or anything
> else where the kernel consumes memory on behalf of a process
> from failing at run-time...  AMX does not add a unique OOM risk here.
> 
>>> The advantage of the #NM over the syscall is that the programmer
>>> doesn't actually have to do anything. Also, transparently allocated
>>> buffers offer a theoretical benefit that a program may have many
>>> threads, but only a few may actually touch AMX, and so there is
>>> savings to be had by allocating buffers only for the threads that
>>> actually use the buffers.
>> The program already asked the kernel whether it can use AMX - it can
>> allocate the buffers for the threads too.
> The result is that if one thread in a 1,000 task process requests
> and touches AMX, the kernel would allocate 8MB, instead of 8KB
> of context switch buffers for that process, no?

Yes, but that's a pretty natural consequence of the process-level ABI
which was chosen.  A per-thread permission scheme would not have had
this particular trade-off.

If you have a big process (lots of threads) and you use a process-level
ABI, there are going to big implications.  I don't think we can get away
from this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ