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] [day] [month] [year] [list]
Message-ID: <15c09c5a13d244ba8ad3f69ee0a24657@AcuMS.aculab.com>
Date:   Thu, 19 Apr 2018 09:01:12 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Andi Kleen' <ak@...ux.intel.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>
CC:     Joerg Roedel <joro@...tes.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        "Ingo Molnar" <mingo@...nel.org>,
        "H . Peter Anvin" <hpa@...or.com>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-mm <linux-mm@...ck.org>,
        "Andy Lutomirski" <luto@...nel.org>,
        Dave Hansen <dave.hansen@...el.com>,
        "Josh Poimboeuf" <jpoimboe@...hat.com>,
        Juergen Gross <jgross@...e.com>,
        "Peter Zijlstra" <peterz@...radead.org>,
        Borislav Petkov <bp@...en8.de>, Jiri Kosina <jkosina@...e.cz>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Brian Gerst <brgerst@...il.com>,
        Denys Vlasenko <dvlasenk@...hat.com>,
        Eduardo Valentin <eduval@...zon.com>,
        Greg KH <gregkh@...uxfoundation.org>,
        Will Deacon <will.deacon@....com>,
        "Liguori, Anthony" <aliguori@...zon.com>,
        Daniel Gruss <daniel.gruss@...k.tugraz.at>,
        Hugh Dickins <hughd@...gle.com>,
        Kees Cook <keescook@...gle.com>,
        Andrea Arcangeli <aarcange@...hat.com>,
        "Waim@...ux.intel.com" <Waim@...ux.intel.com>
Subject: RE: [PATCH 03/35] x86/entry/32: Load task stack from x86_tss.sp1 in
 SYSENTER handler

From: Andi Kleen
> Sent: 19 April 2018 01:39
> 
> On Wed, Apr 18, 2018 at 05:02:02PM -0700, Linus Torvalds wrote:
> > On Wed, Apr 18, 2018 at 4:26 PM, Andi Kleen <ak@...ux.intel.com> wrote:
> > >
> > > Seems like a hack. Why can't that be stored in a per cpu variable?
> >
> > It *is* a percpu variable - the whole x86_tss structure is percpu.
> >
> > I guess it could be a different (separate) percpu variable, but might
> > as well use the space we already have allocated.
> 
> Would be better/cleaner to use a separate variable instead of reusing
> x86 structures like this. Who knows what subtle side effects that
> may have eventually.
> 
> It will be also easier to understand in the code.

You could (probably) use an unnamed union in the x86_tss structure
so that it is more obvious that the two variables share a location.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ