Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp663429ybg; Wed, 3 Jun 2020 10:16:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHyxOnkICaMVpRyKYLIKOQW1hlNpDSMOJzUPPTswUm1ha40SRPmiQLXZBsXbLo0LY4eJ7k X-Received: by 2002:a17:906:9404:: with SMTP id q4mr330224ejx.138.1591204616137; Wed, 03 Jun 2020 10:16:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591204616; cv=none; d=google.com; s=arc-20160816; b=k48YtiqxfuG/gByo7/VmjRAKrOXdJq7eytxWiXKw9xJnHqYyRflKVI6JNRKEaSSOvu T8NaXOcorfJFVRP/oycG0GvvAvPQq+Tov77uX2qDY4Ejqzi5DbsPJFFlYknEj4fGKmQp pNVUVGY0db+outkaewSRy3n9MiYzwkSnSDsJhEhRB3fKtrJ04EvO91f1YREqLXfIp+js RKOKVVfjCyAl57+l6YErQOVEWHxgPBdaKgD9FtNs8eC6DskTilzdx/DZj0wvWTJHfeWF 1SNwnPFpmeKJKfxnyfrvRRsiXs17e7YqtDsW6U3RB0x+7ptUMvUMpZQSeH5UnqgNjjAO Pcxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=L1fN4KADaSCEVr+fi2VR4+YYdyW02dzdqKarwAuE5JM=; b=bgNc4Hbg9Uc2wfPEtsH680ksp3q9p+TchCcKq/inDFTCUCh5FcPZqc5E6RB5n/GsWa iYpSzOOJsmvOjQrM9okDmz7BIvCpFdqmPycix7rfL9+Ax2ogmqegES57ouzGyez9IVTw ZRnQTeKS+nRDDSgXC7aYsql14FH37t1n9OZVmZ+U3COHYxdctNmUMUZaVMEXYwZdc9Ss falHRZTE+7LKtVb//KqmL9UAAJj9wxMKz3WxmMAsuXEeG/c79EUb7s1koVJN5bTEdfTb 1mlDiebXUCDLmfsWfCe0PIDY9NpBdbM/LSmFpRzx8stfQxuTAk3T806qV7+yMez6evhl ozBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Db0LhHXV; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nx24si66783ejb.615.2020.06.03.10.16.32; Wed, 03 Jun 2020 10:16:56 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Db0LhHXV; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726206AbgFCROY (ORCPT + 99 others); Wed, 3 Jun 2020 13:14:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725961AbgFCROX (ORCPT ); Wed, 3 Jun 2020 13:14:23 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73477C08C5C0; Wed, 3 Jun 2020 10:14:23 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id d5so3105446ios.9; Wed, 03 Jun 2020 10:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=L1fN4KADaSCEVr+fi2VR4+YYdyW02dzdqKarwAuE5JM=; b=Db0LhHXVPJ1WDh4jiINB0XFaVbDBzWenltsB/4/hA7fJZ6Hr8v0Xht83c3199T1yxi wj6zyxjnOytfhPMMJoqYDdWPXy13gaAApB9OAijKtHKZiI2X6rX0gFcT05L+2PIc7wEg sAuGgs0Oi2thTotzd7Kz3DVQyVc8wOdDv9YLmxxRVFSbxdfo00cEj51yRXyPEQgVNuyt iyg2XZsVkEYuK83zco2OpPkPFOjgxshuaW61s4O6ttmYKWrMzjenifBmbDHToXgSUmod ZOa0ddWhfLP1JZosxFIKMvhxA97FHlf/ANjJkOFh5wPRfryMd9a0NPvJSIsP4dsX+tUB NhRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L1fN4KADaSCEVr+fi2VR4+YYdyW02dzdqKarwAuE5JM=; b=BZCJNKcCFrQMpxHIv9ih39Jy616RSiG99ggmG5p08bjNCxemRKr2uXnzK2mg4Dendz ijV2ymCTiVPk7Sj7VzJ9m5er4nTmPJME0eDbuMqUIAV2HNdNPTryJX2VsNYgrkb3SIOm oXDxZ+gewz7vRujmA1F6KlrIIPsCWLyDpBBO0WtwOx66qnBN57YeHj/ANTpOi6uhnqpL QRgFBrYKmoUK3AII8nuQMuaqY00OH2js5nynIcqRHhrtKGf5ff5Dluynds8pVNLsctWB ZIeDFdp+2S2BRcBEoC3X8AoK2u0b/9TE3593dr0FOYegX5GAPzLi9xBgjE16m330vg70 Uzvw== X-Gm-Message-State: AOAM533jrY6mBM89GspVoLSIcjln40p6+McWlE24kfSuOr1oitHmiQkc fbNlNxyLo8nW7Iy8VsdTvv6H/d6HkijI/sVl5g== X-Received: by 2002:a6b:fc0d:: with SMTP id r13mr715961ioh.40.1591204462837; Wed, 03 Jun 2020 10:14:22 -0700 (PDT) MIME-Version: 1.0 References: <20200428151725.31091-1-joro@8bytes.org> <20200428151725.31091-36-joro@8bytes.org> <20200603151857.GC23071@8bytes.org> In-Reply-To: <20200603151857.GC23071@8bytes.org> From: Brian Gerst Date: Wed, 3 Jun 2020 13:14:11 -0400 Message-ID: Subject: Re: [PATCH v3 35/75] x86/head/64: Build k/head64.c with -fno-stack-protector To: Joerg Roedel 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 3, 2020 at 11:18 AM Joerg Roedel wrote: > > 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. Good point. Since this is boot code which isn't subject to stack smashing attacks, disabling stack protector is probably the simpler option. -- Brian Gerst