Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp895044rwe; Wed, 24 Aug 2022 10:47:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR5LWFTo50+4VYX3albt0i5RLsvmqA5KApzTKm/lfZrAy3BnQxPd71d5w5nTkwkgTTbi9pJ8 X-Received: by 2002:a17:907:a0c7:b0:734:e049:1af6 with SMTP id hw7-20020a170907a0c700b00734e0491af6mr41004ejc.439.1661363231118; Wed, 24 Aug 2022 10:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661363231; cv=none; d=google.com; s=arc-20160816; b=W2TiWUhZUtUKvaaU/3aM9jNbellB7hKh6l6znAH+miKUQcIe18/0u8jHHQuDLSIDgE OPJ6PZwFmPPLFiYRyPvWIsyb+AJE0gzRqUe+Urq/1FL8FI6dsKVKSjnRQL931+31Vr6Y CP3xWluheijqOuF6XAa7GJGPmR5OKjz45CAlZxhl7TuzxqFRU0lvjw/mrHvC/S89bLoQ qlyiBrD8labdyqw69uUJUuzJt2sbJ2e8CWChjeQRkTY76eVp5Bq9TDjJo/ETDPzHHS1q HmHddIHtfxB6ABjytAz3frO45Z/aok1fPKMOpHr8XYy/o9cC/Lp5H6kLopeikdfEf8uQ pOPQ== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=W/zv1tdZc37Zkb0uUxYQMxz4HIHNFr57tfSlRDfg86Q=; b=JYb8bKTdNexfgtOv1x4diRTUyj5+LrMVP5NZkw4OQ2kUN6KKLbBsm+0mhZzxud5U+5 /r+jnZ2faL9xi9vaR4NT3Ydwsz/aNI3hWgIncd0qa04BBsPYrv54Y08AzWefFuKWXvnF 9DUaS68dXsSkc6zU42GG7MqOKvVoLczHoK56I/BmXGW/ZryJblC8k46AXj24yOEYHxNQ 8Mi/AdG1Z4qttj6oqK1Sel7CVI6PsR1ZuA8moGzFhFaJaHsKZlj9zlk/j4J+RuNu7uCv stcMSKVK1+MIXbhLj6TJVu351rkQmOFat8uvaoTi9ElwsiMM+9IZvwxXOMVrPjhLw9dh of/g== 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 dt5-20020a170907728500b007310a6d6a7esi2429242ejc.975.2022.08.24.10.46.45; Wed, 24 Aug 2022 10:47:11 -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 S240201AbiHXRc5 (ORCPT + 99 others); Wed, 24 Aug 2022 13:32:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240198AbiHXRcz (ORCPT ); Wed, 24 Aug 2022 13:32:55 -0400 Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 95D8D7E005; Wed, 24 Aug 2022 10:32:54 -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 27OHTUfQ030081; Wed, 24 Aug 2022 12:29:30 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 27OHTUCL030078; Wed, 24 Aug 2022 12:29:30 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 24 Aug 2022 12:29:29 -0500 From: Segher Boessenkool To: Borislav Petkov Cc: X86 ML , Michael Matz , linux-toolchains@vger.kernel.org, LKML Subject: Re: [PATCH] x86/sev: Mark snp_abort() noreturn Message-ID: <20220824172929.GA25951@gate.crashing.org> 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> 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 Hi! 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? It sounds like you need this (and then fix all resulting warnings) to not upset objtool? It is nice to have this anyway (if there aren't a zillion false positives), but it seems objtool is very fragile. Segher