Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp806083rwe; Wed, 24 Aug 2022 09:13:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR5X20Gy56stdalxQStvCN6PA15PTPk/+KO55xzyxTBFMBh6AAp0i2lSuNfsPqs4PYcGn6ed X-Received: by 2002:a62:1c56:0:b0:536:4f4b:d99e with SMTP id c83-20020a621c56000000b005364f4bd99emr20371492pfc.64.1661357614450; Wed, 24 Aug 2022 09:13:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661357614; cv=none; d=google.com; s=arc-20160816; b=H+8iXKYRGLsALa/n+eeXHrAnRIyqIbMxAw/vQGWSOMNpa0f5q3lW2s4lHzPQv9cVsJ GX7qYrgyU9I/b+KAXMh3IZETZ8gIrsXJH3aA2iSWBuMm1G8pvPsCXyiFcnIYtK3Vt6Bg J2SgrwgUQfmwQNBPofxkIHqaxMhPfGrPX4TN5tsTcd+2cISx7/PtezzyhRws/Kr8Sdmk MR8l48qlUk8Pe0/JZ0KBUJJl9UGkywAqHwom3De+bCjAm0G87AfKst0oYo447yzpq/s8 YK3aAPAnZsn1yXaL/NSJ/Pv26oVGoc/qIguq3exOQgIcvVGzBtkZa33ZpK/z2eiIJ0Ck mAQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fHn/HurE6G7lQKnc8g7UWWop7cNMxA3yDLWtujI6evg=; b=hVPHcV4NefndjUfwFz7nMXoEoXmvFcNr0oCoBcnZGXygsze1FPLUpakugsCy5VU7kZ lFLw6/XwDpggi9EEtUO429asvCoVj5XLkPDkScb84Yfv5wiPrh+AHhsNHL3mNW9a7g3d tngiOI4pMYa8TzRn4vBqBruMod76ZEa4jJzc0aC5DmCaZKtqRsFSvk2U3Q27H5UFomtf Ty7i1H0jN6JDgwIUo+M1RXi3eeFNLmgRMmSR5TqVwtwByIj4s8EkN5eRDyzcYTHkvjj7 W/Nm/o93ggJaJsVKWn4UlSHPWcUsRDtKwEuxrZNPCS0eJ3JssSJLEwm8GvDWMFbbWOjS fBQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="da2rKDt/"; 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 j11-20020a17090276cb00b00170ad89d371si16213565plt.465.2022.08.24.09.13.22; Wed, 24 Aug 2022 09:13:34 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="da2rKDt/"; 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 S236708AbiHXPiq (ORCPT + 99 others); Wed, 24 Aug 2022 11:38:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236248AbiHXPip (ORCPT ); Wed, 24 Aug 2022 11:38:45 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C4417198C; Wed, 24 Aug 2022 08:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fHn/HurE6G7lQKnc8g7UWWop7cNMxA3yDLWtujI6evg=; b=da2rKDt/rAXyxvZ704clMkCQP8 AfMfpXFLtvIgLih9jukwzpYIS3e4LgxqaqFyGVlig0Y9LvNIHVkM62yXtAJHNrE+il3cNzJMZBhgK JnR3DSilRVQ6j3daaBpoJba25Vy7bhNiLXpZK/vV8POiPDz9DSRf8iFop+8wjiTz+QfM2Mc1Gi1H0 rS6EmcA1ww6ljbbEtl0SRwg0F2WTOPlIY8M2bHgIArBg5q+zxeTp2urnti7nnoSncCQU855rA5WDy osM2l+mXM6VJOxcPZbpqPpDGIKvRpWxUiDeidzuV8+cc7UyNGLc9gLtPycmmBrHJtidmanA8s7GMm ZnO5FIiw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQsSb-00GRSU-2m; Wed, 24 Aug 2022 15:38:31 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 0FCB0980BE2; Wed, 24 Aug 2022 17:38:27 +0200 (CEST) Date: Wed, 24 Aug 2022 17:38:26 +0200 From: Peter Zijlstra To: Borislav Petkov Cc: X86 ML , Michael Matz , linux-toolchains@vger.kernel.org, LKML , Josh Poimboeuf Subject: Re: [PATCH] x86/sev: Mark snp_abort() noreturn Message-ID: References: <20220824152420.20547-1-bp@alien8.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220824152420.20547-1-bp@alien8.de> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 05:24:20PM +0200, Borislav Petkov wrote: > From: Borislav Petkov > > 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 > > This triggers with gcc-12. You'll probably also have to add it to the objtool/check.c:global_noreturn[] list, for the case where objtool fails to recognise it as noreturn.