From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751400AbcHFUWP (ORCPT ); Sat, 6 Aug 2016 16:22:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39610 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750979AbcHFUWM (ORCPT ); Sat, 6 Aug 2016 16:22:12 -0400 Date: Sat, 6 Aug 2016 08:13:33 -0500 From: Josh Poimboeuf To: Borislav Petkov Cc: Nilay Vaish , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , x86 , Linux Kernel list , Andy Lutomirski , Linus Torvalds , Steven Rostedt , Brian Gerst , Kees Cook , Peter Zijlstra , Frederic Weisbecker , Byungchul Park Subject: Re: [PATCH v2 03/44] x86/asm/head: rename 'stack_start' -> 'initial_stack' Message-ID: <20160806131333.zjvmlin3ulrbc5pe@treble> References: <0070e6dc7c24fe73c17d20e3a7f9885c10616abc.1470345772.git.jpoimboe@redhat.com> <20160805160157.7blwronmj4tecrud@treble> <20160806052521.GA20667@nazgul.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160806052521.GA20667@nazgul.tnic> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 06 Aug 2016 13:13:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 06, 2016 at 07:25:21AM +0200, Borislav Petkov wrote: > On Fri, Aug 05, 2016 at 11:01:57AM -0500, Josh Poimboeuf wrote: > > The 8 should be changed to SIZEOF_PTREGS in a later patch > > ("x86/asm/head: standardize the end of the stack for idle tasks"). > > But SIZEOF_PTREGS is 21*8. I don't understand. I was referring to this patch: [PATCH v2 41/44] x86/asm/head: standardize the end of the stack for idle tasks https://lkml.kernel.org/r/98f297ffbc2a23131f08c5c77c4db974e0de2ad3.1470345772.git.jpoimboe@redhat.com It changes the stack end offset from 8 to SIZEOF_PTREGS, so idle tasks will have the same end of stack address that other tasks do. I was thinking we should make a similar change here, for consistency: /* * Setup stack for verify_cpu(). "-8" because stack_start is defined * this way, see below. Our best guess is a NULL ptr for stack * termination heuristics and we don't want to break anything which * might depend on it (kgdb, ...). */ leaq (__end_init_task - 8)(%rip), %rsp -- Josh