Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1033312rwe; Wed, 24 Aug 2022 13:36:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR50CxQFPwx8htTc3CRy2D+zaToL5kWhvyLu/Osn/2n/znlq5FhSSGyGyas66mbryu9kKH8M X-Received: by 2002:a17:90a:c402:b0:1f2:ca71:93a5 with SMTP id i2-20020a17090ac40200b001f2ca7193a5mr894278pjt.34.1661373400790; Wed, 24 Aug 2022 13:36:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661373400; cv=none; d=google.com; s=arc-20160816; b=zd0cMVPjCt+NojWAxmaJmU8RTGEd6nsiKUXCadxi8Vsf8f70iNsqADU6ChwqERwQnO lfk4I5x2oqnAiiCPr+V1f7yxnxSpZfA/Y1dhY3zir468lTUpUybX/Eb1OVZbSBwrKhXF xxPj2pFjjjYNLgZ+UCMjtHAAnTQ4IsqzZARklJyW9MFXqcEqENNoFjhbM5gFfPZgEW1b MRDyXFqOW9Rz+71pCBEmKR1J/gabZX7E415Ikv+Y/mYOQTiTIxUo6Y9sofszsWhoZWeS j8koAmd6voUSpJGSLdTtwZD7BX6YZJAJx97HSa8P0krjn81m7toqUdGo72PKJHHzhTEe QLAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=LLNkQuNlzHnHJFI0wmqkj9NGE5qtUSx4uH3ci6OdV2Q=; b=hHyKKyMsh4Wh4uvbE51jcbK7TCAwTl6p//OR8NI1eABcspvQ5Z1CkmegWMvC7uI8hv XIUTI6vLDS7GClSG/q1HWG38URK9ecm+6HGvqnZbd0qk2nkpMlND2M+k7OHGRqcbgGdv QoL/vFIBbyCSMe5sVYf4RFHDiHuIB1+arLHcjYfSzHGldnN3lnfiUr81ivUPt9MWLmYj xteGTlWUdk4CZ2ydTLbhIIhAwVFYcGdqoO/1D8hzLi5CfXfFYfkrf0vrLaY2Dyo4hqa6 BgPAIQgEu42dhPX8SVQmLVhlUhhy+CuzEjcWIkCnkgAMarvwI495Yms3ZwzC/CBTcsnk DpzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bx17-20020a056a00429100b005369b8144a4si7978903pfb.22.2022.08.24.13.36.29; Wed, 24 Aug 2022 13:36:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239990AbiHXTvP (ORCPT + 99 others); Wed, 24 Aug 2022 15:51:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237608AbiHXTvO (ORCPT ); Wed, 24 Aug 2022 15:51:14 -0400 Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 709995466B; Wed, 24 Aug 2022 12:51:11 -0700 (PDT) Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 27OJhneA002823; Wed, 24 Aug 2022 14:43:49 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 27OJhnnE002822; Wed, 24 Aug 2022 14:43:49 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 24 Aug 2022 14:43:49 -0500 From: Segher Boessenkool To: Nick Desaulniers Cc: Borislav Petkov , X86 ML , Michael Matz , linux-toolchains@vger.kernel.org, LKML Subject: Re: [PATCH] x86/sev: Mark snp_abort() noreturn Message-ID: <20220824194349.GB25951@gate.crashing.org> References: <20220824152420.20547-1-bp@alien8.de> <20220824172929.GA25951@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 24, 2022 at 11:44:35AM -0700, Nick Desaulniers wrote: > On Wed, Aug 24, 2022 at 10:33 AM Segher Boessenkool > wrote: > > On Wed, Aug 24, 2022 at 05:24:20PM +0200, Borislav Petkov wrote: > > > Mark both the function prototype and definition as noreturn in order to > > > prevent the compiler from doing transformations which confuse objtool > > > like so: > > > > > > vmlinux.o: warning: objtool: sme_enable+0x71: unreachable instruction > > > > Would -Wmissing-noreturn have caught this? > > Oh, that's shiny. Is that relatively new? Relatively, yes. commit 0ca3fb0a168e9db2bd5405855d3932f62b08b7c9 Author: Kaveh R. Ghazi Date: Tue Oct 20 07:32:08 1998 +0000 New warning, `missing-noreturn': The alias -Wsuggest-attribute=noreturn is newer: commit 94ee697923f5a93881edbc5e1b3f810b290f0fc7 Author: Manuel L?pez-Ib??ez Date: Sun Apr 29 09:15:30 2012 +0000 * common.opt (Wmissing-noreturn): Alias of -Wsuggest-attribute=noret Segher