From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932395AbbDJU5H (ORCPT ); Fri, 10 Apr 2015 16:57:07 -0400 Received: from mga14.intel.com ([192.55.52.115]:57806 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756484AbbDJU5F (ORCPT ); Fri, 10 Apr 2015 16:57:05 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,558,1422950400"; d="scan'208";a="479494298" Date: Fri, 10 Apr 2015 13:57:02 -0700 From: Andi Kleen To: Andy Lutomirski Cc: Andi Kleen , X86 ML , Andrew Lutomirski , "linux-kernel@vger.kernel.org" , Steven Rostedt , Borislav Petkov Subject: Re: [PATCH 4/8] x86: Add support for rd/wr fs/gs base Message-ID: <20150410205702.GV15335@tassilo.jf.intel.com> References: <1428681033-1549-1-git-send-email-andi@firstfloor.org> <1428681033-1549-5-git-send-email-andi@firstfloor.org> <20150410202132.GQ15335@tassilo.jf.intel.com> <20150410204125.GS15335@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I think all of this stems from unfortunate naming. DEBUG_STACK isn't > one stack -- it's a debug stack *array*. The IST shift mechanism > means that we can use different entries in that array as our stacks > depending on how deeply nested we are. I still think it's a terrible idea. > > Just handling it in the code is simple enough. > > It seems to account for over half the asm diff. I'm talking about the > addition of approximately two lines of C and the removal of a huge > chunk of the asm diff. It's just adding offsets to the stack code. Nothing complicated. It's also straight forward code. Far more preferable than your magic overlapping stacks. -Andi -- ak@linux.intel.com -- Speaking for myself only