Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3847665ybh; Tue, 17 Mar 2020 07:41:34 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtUvcbN77WM3rB5dHa2K6EvHBrHzuhHZuf4iU4K/ReGW++KKKVCw1ANYQsRnE/O+DWwsT6Z X-Received: by 2002:a9d:2c69:: with SMTP id f96mr3814673otb.62.1584456094494; Tue, 17 Mar 2020 07:41:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584456094; cv=none; d=google.com; s=arc-20160816; b=A1fzrQW8CtOyyDYuao+aNrOvlmJbEsmN8nYU1msS+IW8sBFj88FcExuNV8cHAtwmXn 3sJOcX0Z1G925zTwakr+KnduuWOeThp/qAEi7zhquTASgbUhQMttImljhTsUBv5JXf6v vx0zp3m/FBkPVqSZcitUKb3dpxy97kzHj1j65EfL3+nDRIle+z7ryoqS9v9LBojSCspy zT8o84H6YRhpas8Iyjvh65Vx1VE4O1BK3UPd1DZAwp1c0ZPuY89YpYdJ48pWbwwBsaXP TycMfdVnBGW3bScu4RFKg+OTMeMGQQzKYpW82tkTE7QaT0pAArcN1a5Pbf1mgTSRTAhB xaFQ== 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:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=cTFqU/I5vZ/SQbtcIgbGrlxryRVnOa8A+7W1PFxjykk=; b=qdxw4NxiLcUhCIYZmXlbt4u0WKfdpFAQ4jyEQ//ApDc71x0+J/nFWp91f3qK1Jb8ME UvnHD/WUpAPXV4Gq2XElm6OKkKiGL1hQ3in9xX7pFItnFp0s/OYz8Mr/Xwyuy+my11l4 T2IKuDKRzKlJ3LP+q/jIzbHFAsW5HJa9aI10QBbnWe20sun1S/XnmQFJuKQ5AgXFUkm1 h1Fs1HlU3vLGonUqw1hUgSozWzlUdLHUKBtWGPbEEo3lk1D6wumKBVD8E31Msz0wfQrU FK+4OaLIkwqmvludvo8qeDGiPOBn9QOGOz7Eu3n6vtvosSU96MXL3ROEps85b/FXawkP uYFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TbPS5+7l; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n62si1791811oig.196.2020.03.17.07.41.21; Tue, 17 Mar 2020 07:41:34 -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=@redhat.com header.s=mimecast20190719 header.b=TbPS5+7l; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726757AbgCQOje (ORCPT + 99 others); Tue, 17 Mar 2020 10:39:34 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:55253 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726248AbgCQOjd (ORCPT ); Tue, 17 Mar 2020 10:39:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584455972; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=cTFqU/I5vZ/SQbtcIgbGrlxryRVnOa8A+7W1PFxjykk=; b=TbPS5+7lXxiu0Z4ctUulAGCeq7phq/p6Q9MgYk8Js43nuF53L8+D1uol+mhWskkAY56CN/ KH5QO9rpv2Z54U8Q2W3BTsNKpl1ifkrOzU3Dj/E7jxXAtF7WYKn6f4ApkImPOnUOOsQA7L Mj5uJw/QxBH9VN93D2lxWYx0p1S2WNA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-296-G8mX7Sl3OAi95uLDW2rLaw-1; Tue, 17 Mar 2020 10:39:28 -0400 X-MC-Unique: G8mX7Sl3OAi95uLDW2rLaw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 02BD21005F99; Tue, 17 Mar 2020 14:39:27 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-112-22.ams2.redhat.com [10.36.112.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 96B2590811; Tue, 17 Mar 2020 14:39:26 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id 02HEdNuC011604; Tue, 17 Mar 2020 15:39:23 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id 02HEdE0J011603; Tue, 17 Mar 2020 15:39:14 +0100 Date: Tue, 17 Mar 2020 15:39:14 +0100 From: Jakub Jelinek To: Borislav Petkov 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: <20200317143914.GI2156@tucnak> Reply-To: Jakub Jelinek 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> <20200317143602.GC15609@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200317143602.GC15609@zn.tnic> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 17, 2020 at 03:36:02PM +0100, Borislav Petkov wrote: > 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 That is because the option is called -fno-stack-protector, so one needs to use __attribute__((optimize("no-stack-protector"))) Jakub