Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1039700ybz; Wed, 22 Apr 2020 12:23:58 -0700 (PDT) X-Google-Smtp-Source: APiQypIwVKYVFwGiVfDd1O5ADUHMGsobj1jBmE/ZdrXSs4g6F0R8qc6x0p7iS66yD/8yUJfMzuYX X-Received: by 2002:a17:906:d20e:: with SMTP id w14mr26596647ejz.19.1587583438776; Wed, 22 Apr 2020 12:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587583438; cv=none; d=google.com; s=arc-20160816; b=0tZ12uRR8AOzHG9rXVaERPHnldjO59kNRUgN1cLMscYXRx7wNZPs8NZUjqgSNYcjCT oU4xLvci+bwFCNiZO279XpuQ7i1rDk2X/FzwVQFaxXH3qnimiDYyKtErmCOE9SrgMb4k FX+fAoWe+u9A/3IhMTcfBA9qSDbeEoK9/mx+Gikf7gwocmXjXRf6DBmdPt/Ar6cI96NR ZjNwCldPSPCjhIyq1P6Enr6BdeO0+BM2mAMqmZ5jd6CKkyJx5ADE+QevNv0QdBdyXFw5 EZvBcMRogCxWAitQESKAL9wm+OWM0/v9TVnEwm12bM0S1k8JHGeTX/eCM7EgI0eRz50r GVMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uwppnCchAiG8ZwLKxdIRMiSv5cSPYMqUKzvWQTerwHo=; b=vbnufHMEnYbOjhwyLsSrzxGhIKr4Q5uo0hfclJteMUtGIB5jvUF8jthtsnzwa96VIq zQ9rmTDBMr8rG1hLwIrXR3AM3IBtvYZ+O06hU+aNeSFG89FTBZhlCWTr4IWeTHoWVi7T Fo4crQn0RSnIyM1m1gvJ3cKaiwpRJNejD4lWDouKyAM3sQ4OSNW+iJ6/sj3W1A5+fgcc YWKfvIMkyCVHMOsz1uLTYCF4M3ED4VnXiLjIszaulKvfnXGQ9qp6l9w3ODcXAdwcE3FY XZ0VUksf86d75c9d0Lx15bjKbQL3TgFlXFhYlbnwid7tDa3Pmdqb8z1szOFt1SuWOzK4 G3Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=WU6VTXSf; 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=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j8si40549edl.317.2020.04.22.12.23.36; Wed, 22 Apr 2020 12:23:58 -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=@alien8.de header.s=dkim header.b=WU6VTXSf; 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=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726528AbgDVTVX (ORCPT + 99 others); Wed, 22 Apr 2020 15:21:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725935AbgDVTVW (ORCPT ); Wed, 22 Apr 2020 15:21:22 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C93C6C03C1A9 for ; Wed, 22 Apr 2020 12:21:22 -0700 (PDT) Received: from zn.tnic (p200300EC2F0DC10061F884AD77E9675A.dip0.t-ipconnect.de [IPv6:2003:ec:2f0d:c100:61f8:84ad:77e9:675a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 9767C1EC0D41; Wed, 22 Apr 2020 21:21:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1587583280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=uwppnCchAiG8ZwLKxdIRMiSv5cSPYMqUKzvWQTerwHo=; b=WU6VTXSf04lYkmozCkK5w5zhDZykha3Z6APpkq0CZgzMF+2U4teiuYnzU+maYFnlx6Qbrv 8AmuzpPScOyq8sIsCk9nwTGzABklMDoNUu1EJ3jS32gma6IXJqy5J9Tyu483Hn31cuHv1S 1AjAwAsCdf/beHQz5pr8WjHQjleLkUA= Date: Wed, 22 Apr 2020 21:21:13 +0200 From: Borislav Petkov To: Nick Desaulniers Cc: Michael Matz , Jakub Jelinek , Sergei Trofimovich , LKML , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , clang-built-linux , Kees Cook Subject: Re: [PATCH v2] x86: fix early boot crash on gcc-10 Message-ID: <20200422192113.GG26846@zn.tnic> References: <20200417084224.GB7322@zn.tnic> <20200417085859.GU2424@tucnak> <20200417090909.GC7322@zn.tnic> <20200417190607.GY2424@tucnak> <20200422102309.GA26846@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 22, 2020 at 11:55:50AM -0700, Nick Desaulniers wrote: > Can you add by whom? It's not clear to me which function call in > start_secondary modifies the stack protector guard. How's that /* * Prevent tail call to cpu_startup_entry() because the stack protector * guard has been changed a couple of functions up, in * boot_init_stack_canary() and must not be checked before tail calling * another function. */ asm (""); ? > Another question. Do we not want a stack protector at all in this > function? I'm not super familiar with how they work; do we not want > them at all, or simply not to check the guard? Not to check the guard. See the beginning of arch/x86/include/asm/stackprotector.h about how they work. > But if we're not going to check it, I think > __attribute__((no_stack_protector)) applied to start_secondary might > be a more precise fix. No such attribute in gcc yet. But yes, this came up a bit upthread, you can go back in time for details. :) Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette