From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f71.google.com (mail-pl0-f71.google.com [209.85.160.71]) by kanga.kvack.org (Postfix) with ESMTP id EBB436B0005 for ; Wed, 18 Apr 2018 20:38:42 -0400 (EDT) Received: by mail-pl0-f71.google.com with SMTP id y7-v6so1940465plh.7 for ; Wed, 18 Apr 2018 17:38:42 -0700 (PDT) Received: from mga06.intel.com (mga06.intel.com. [134.134.136.31]) by mx.google.com with ESMTPS id m4si1895675pgv.517.2018.04.18.17.38.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Apr 2018 17:38:34 -0700 (PDT) Date: Wed, 18 Apr 2018 17:38:33 -0700 From: Andi Kleen Subject: Re: [PATCH 03/35] x86/entry/32: Load task stack from x86_tss.sp1 in SYSENTER handler Message-ID: <20180419003833.GO6694@tassilo.jf.intel.com> References: <1523892323-14741-1-git-send-email-joro@8bytes.org> <1523892323-14741-4-git-send-email-joro@8bytes.org> <87k1t4t7tw.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Linus Torvalds Cc: Joerg Roedel , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , the arch/x86 maintainers , Linux Kernel Mailing List , linux-mm , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waim@linux.intel.com On Wed, Apr 18, 2018 at 05:02:02PM -0700, Linus Torvalds wrote: > On Wed, Apr 18, 2018 at 4:26 PM, Andi Kleen 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. -Andi