Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp580950ybg; Wed, 3 Jun 2020 08:21:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx13WBFqlhk1Aj4PJwuAr/JVFRpiH4iH2GYxarLdoXvzzJIvfwgSi0k3kjP7BoVPui8fNTc X-Received: by 2002:a05:6402:155:: with SMTP id s21mr31216573edu.144.1591197670823; Wed, 03 Jun 2020 08:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591197670; cv=none; d=google.com; s=arc-20160816; b=bC/9IR/+BmX0kTDGg3/j+jALbiAky7PrjR/HjhqZ8Zntoeoo4OZGMmRKVMW+L04p7w Wc0yAzJCT1GjDc16y5gOLZWbpWt/EMQWIgOmAS/m6bCxBVyVGhf4ZRpPFevEalF/LnXX liznyBHimPBV8ExS2duD6q9l71JgAejo3ieH4vFdzkB9Sr1AOL8nR/ARq3nmhTVUbpfN /dm1EKOFvPwe0B++2PrzdNs92WK22qH4G7D1EKGIE9Qt4KDRGL+hMd6wbaH0HVG0n4SB 1kAfnH+CNElZhhXx3WfSlO2nCu2BxbFIJPLCUnoKxg/+5VXzrAMxpQFlgcoKQzblpiQp XKCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=53MeW86TJ5j/5psUa5pXpeoL9aLnusr6CErjpGYrJsg=; b=NSDCTqak7emrgsdLUgGbcsiMcwyqGqUQjQ4MnaoQkkWvxIdOJT2EyFeqM22ZX6DV0i YWmRAHw4vetlfcs/ER4aoiygBLahOtV6c+0obVx7iCG55FfMoxVZXNauIPVXvWZJ/IYr Y+FBg2JxW5BEcQDi9scn5h08zaZymVvQaI5rhB05/olpLAFxk6ufvJOmYkXeUx2YBhWj Scjj/f7f+C4Ixj0daflByNGRpSEv5sG2wJaoKe/SRON9q3N+8ToS2k7wIp4szbrMqNvV iEjm/hsCaT5chktI+Pw3C8MdOWhLMMgab6rCkQTy34FUTWwCcJkY09frA1H+f2aBL9B1 3iiQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d11si1284796eds.416.2020.06.03.08.20.48; Wed, 03 Jun 2020 08:21:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726112AbgFCPTA (ORCPT + 99 others); Wed, 3 Jun 2020 11:19:00 -0400 Received: from 8bytes.org ([81.169.241.247]:45988 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725985AbgFCPS7 (ORCPT ); Wed, 3 Jun 2020 11:18:59 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 4B99F28B; Wed, 3 Jun 2020 17:18:58 +0200 (CEST) Date: Wed, 3 Jun 2020 17:18:57 +0200 From: Joerg Roedel To: Brian Gerst Cc: the arch/x86 maintainers , "H. Peter Anvin" , Andy Lutomirski , Dave Hansen , Peter Zijlstra , Thomas Hellstrom , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Mike Stunes , Joerg Roedel , Linux Kernel Mailing List , kvm list , Linux Virtualization Subject: Re: [PATCH v3 35/75] x86/head/64: Build k/head64.c with -fno-stack-protector Message-ID: <20200603151857.GC23071@8bytes.org> References: <20200428151725.31091-1-joro@8bytes.org> <20200428151725.31091-36-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 19, 2020 at 09:58:18AM -0400, Brian Gerst wrote: > On Tue, Apr 28, 2020 at 11:28 AM Joerg Roedel wrote: > The proper fix would be to initialize MSR_GS_BASE earlier. That'll mean to initialize it two times during boot, as the first C function with stack-protection is called before the kernel switches to its high addresses (early_idt_setup call-path). But okay, I can do that. On the other side, which value does the stack protector have in the early boot code? Joerg