Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3843794ybh; Tue, 17 Mar 2020 07:37:17 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtmSQJaBEKOTJqyOMVj5ZLAo0hxOkkBySuqjDy2bqFpzDcyGaOSl6SVi4TWtrhRLo68AZrf X-Received: by 2002:a9d:a68:: with SMTP id 95mr3747656otg.87.1584455836919; Tue, 17 Mar 2020 07:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584455836; cv=none; d=google.com; s=arc-20160816; b=WsaKylhm/2Sr1R9p4gIW4VIeV+gEzQbwD28F1x21gdcXt1YKNQDkXJ6en3INQfqnlK Db5oc/h5hxV81ZJ/bILt8ks2uRmL2P8C34O9Wt325QCNd2ZrIGBa6hXux/BoJ3qNpcvq 6qRiXRBGkBu+Z+QDFFFTLBU/shRUZJz0N9LZZGCHc5+2KTQh6utJa0sfbpdDFJ5AbwgK 0RaMCeQtDBGbT1r5wZvJ2uNw/2piMjjWMM+0UWFKc1erPgXn4acLqFnSBCfOlkR/VSma WnvUgjJOFwxswX5hcwZaGgE6HbIjyfBj5Vz007U8PxFbw3f6/CR4IhCbUi1xHugdH9VV SLBg== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pLtUF7XMg1WrGT46sBhFehgi7iRI9WIwUnnPY7j9O94=; b=CexBjp0nvcdvjRv7S2i5oOgNmp37tWzztGQbgL2DlUXbSPnLa6NO2RDZ0FxAhZQ7Lo 1F5SnENmZ0IjquxzGpIWaJGTUha36AePts5rSfW/2FEtkBWsPBv6OhthneIzSWe9dUGj 0Oflc/815qmLkFPvErT6yvK6FhU5wBGnRx4vqPHVlc7r65T+LC6/XV96b1+q6EzywAco /qEoEwxyM8s1Z8kEVh58ZRCZJTRzVW1k8EiljYMcfBsBdoG/KrHsm6F1OPAVynGJQ6RK skUNFX3LmDvLvC35cBdbGlTuCBDIBH+hroKIVYT/EGuOfcsxItcPPhd+5+/gVmOTAjDd H4kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=AgkshhTI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id w6si1795116oig.171.2020.03.17.07.37.03; Tue, 17 Mar 2020 07:37:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=AgkshhTI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726766AbgCQOf7 (ORCPT + 99 others); Tue, 17 Mar 2020 10:35:59 -0400 Received: from mail.skyhub.de ([5.9.137.197]:34208 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726222AbgCQOf7 (ORCPT ); Tue, 17 Mar 2020 10:35:59 -0400 Received: from zn.tnic (p200300EC2F0C9600080652A9D2B77226.dip0.t-ipconnect.de [IPv6:2003:ec:2f0c:9600:806:52a9:d2b7:7226]) (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 2E9951EC0C68; Tue, 17 Mar 2020 15:35:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1584455757; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pLtUF7XMg1WrGT46sBhFehgi7iRI9WIwUnnPY7j9O94=; b=AgkshhTIJ83v/dovDgtoI3tBP38gaaau4yDq4L4PBgiI3fqCy32xxbMnAqQ9NXlb61Kf8B qE+NP+c2KmmTVazrG2xoo3BtTLmHKBPhpsKXK1Ir7TEhAs9yMoxy/ku3BVyZ2qCBcgRdO/ IuziBmxUmpCXrZegdBYzmuV3YHgd5KM= Date: Tue, 17 Mar 2020 15:36:02 +0100 From: Borislav Petkov To: Jakub Jelinek Cc: Peter Zijlstra , Sergei Trofimovich , linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andy Lutomirski , x86@kernel.org, Michael Matz Subject: Re: [PATCH] x86: fix early boot crash on gcc-10 Message-ID: <20200317143602.GC15609@zn.tnic> References: <20200314164451.346497-1-slyfox@gentoo.org> <20200316130414.GC12561@hirez.programming.kicks-ass.net> <20200316132648.GM2156@tucnak> <20200316134234.GE12561@hirez.programming.kicks-ass.net> <20200316175450.GO26126@zn.tnic> <20200316180303.GR2156@tucnak> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200316180303.GR2156@tucnak> 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 Mon, Mar 16, 2020 at 07:03:03PM +0100, Jakub Jelinek wrote: > On Mon, Mar 16, 2020 at 06:54:50PM +0100, Borislav Petkov wrote: > > So having a way to state "do not add stack canary checking to this > > particular function" would be optimal. And since you already have the > > "stack_protect" function attribute I figure adding a "no_stack_protect" > > one should be easy... > > Easy, but a waste when GCC already has the optimize attribute that can > handle also ~450 other options that are per-function rather than per-TU. Ok, Micha explained to me what you mean here and I did: static void __attribute__((optimize("no-stack-protect"))) notrace start_secondary(void *unused) { but it said arch/x86/kernel/smpboot.c:216:1: warning: bad option ‘-fno-stack-protect’ to attribute ‘optimize’ [-Wattributes] 216 | { | ^ because -fno-stack-protect is not implemented yet. Regardless, yes, that can work too, if we had the -fno-stack-protect variant. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette