Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4140376rdb; Thu, 14 Sep 2023 13:03:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHoQKE2IGlv20MILYIUqGp1to55C55ArGvFpb2cy7+v7JoI442pCd2iGGRJ2SVG+z9DWvoi X-Received: by 2002:a05:6a20:5642:b0:14c:d494:77c3 with SMTP id is2-20020a056a20564200b0014cd49477c3mr5342348pzc.33.1694721822918; Thu, 14 Sep 2023 13:03:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694721822; cv=none; d=google.com; s=arc-20160816; b=LlDiCAsMcDtLD0EiCW50kDUIsNpVZCK2Ah2L/sK2wxdEjTcvVz1CvogIBlnBy9enf0 9CbF9KVOqIATbe3xuMLjP8ZPqAWEkIPWYmGZN7sS8YSTSD0fSL9CEl/Pf9rY0Xi4XTeN USZjq3iL6WKFzVDSq+XKQ1aTfy/Py11Lv744EuU2WlxK82woB1MfrnPwKiwfyWYyLaEm qaV9m3st6eQ/xBlxHZUnUSdb2sBZj5OAP11yi4eyqPCl2WxJnKGJIFYotKbduibwDSY6 IfnufKIhNE9anxCSe4M7kGPziey4EqiqyIoeQW4APPgMcgDdlYqLV3igRAh0vY7q181J 8Ouw== 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=rg4afThrd0boKj++tc2gp5IX8j6/oqBQQnl2Ndhwbw8=; fh=UwcKpRaBe8M5lGq2k0VrSUrJn3Ex7ShVSG4HyWFyA5o=; b=0GRWX4kLvd+7b4A1OviTvLOVd1EY40mIBYPYeOhfm1O0e5biWLj6w2TFcYOC6JmEpD sScN1O38Rd4gg4tbi+iEYhN8LmONudHIr2gT7W8aNqSGgXOQhSyM5xCdVRrkZp3xLgyu CtQ/H/aciKFyIGOAYigaZcauI6GBcPNpebT+ygT7eiOKRARzB4+aTAzMG6bKz6KxJ2h8 LoESGGDlBEFh6SxpNw6hmAYWBCdVV1/+3tZ78amKzH3db04nWYYpHX4LxgcH/7zh179i NpDxmlEByZUykj5nwidKz5WUyE/XsKY1OwIBzxXpCF8A0QTg3CsjjIxO9emZYz8vu9iI kyJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=LGDddFnq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id f26-20020a65629a000000b0054405623a4asi1892539pgv.615.2023.09.14.13.03.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 13:03:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=LGDddFnq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id F21198294F73; Thu, 14 Sep 2023 07:27:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240012AbjINO1E (ORCPT + 99 others); Thu, 14 Sep 2023 10:27:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233954AbjINO1D (ORCPT ); Thu, 14 Sep 2023 10:27:03 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAA50B9 for ; Thu, 14 Sep 2023 07:26:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=rg4afThrd0boKj++tc2gp5IX8j6/oqBQQnl2Ndhwbw8=; b=LGDddFnqewuxTTVGO3/21p4nK0 qBYceHdhjMDF3DDM4uvGRYIDHZBtIaHqwfYXeYxi6blUI1atxm19kehFcpZR4ijNk8EdYLXCCyBaT t3HaLClVDFfGctv8AaRdE5vKqtwGqu9xPwV8qq0ZIW+wf8dNJEX77OE15kHHe+WuqbyyYwxOheQ8b Qc1qJPnJhrBVmQ2skDuqhTS2REN7ZvocBsH0HsbdBnMATgZnNcxee4oTWsdWR/eJSbMV10K5C5lJ+ J46vvMVAoO/9M757fY9J6+y/Tn55uEamWc/IkI0XluTNKM5Uji5jItVbYr90c0DdxZ3zqNbibD/wt 6sUXZlZw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qgnIq-007vTK-00; Thu, 14 Sep 2023 14:26:45 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 1FB1430036C; Thu, 14 Sep 2023 16:26:45 +0200 (CEST) Date: Thu, 14 Sep 2023 16:26:44 +0200 From: Peter Zijlstra To: Ingo Molnar Cc: "Huang, Kai" , lkp , "kirill.shutemov@linux.intel.com" , "linux-kernel@vger.kernel.org" , "oe-kbuild-all@lists.linux.dev" , "x86@kernel.org" , "dave.hansen@linux.intel.com" , matz@suse.de Subject: Re: [tip:x86/tdx 8/12] vmlinux.o: warning: objtool: __tdx_hypercall+0x128: __tdx_hypercall_failed() is missing a __noreturn annotation Message-ID: <20230914142644.GC18948@noisy.programming.kicks-ass.net> References: <202309140828.9RdmlH2Z-lkp@intel.com> <90f0a4d44704f9c296f3a4d8b72c57f2916aa09d.camel@intel.com> <377b1ce2ecd390f4b6f8cdf68d22c708f7cef6d1.camel@intel.com> <20230914072959.GC16631@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 14 Sep 2023 07:27:05 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email On Thu, Sep 14, 2023 at 04:16:47PM +0200, Ingo Molnar wrote: > > * Peter Zijlstra wrote: > > > > It appears the __noreturn must be annotated to the function declaration > > > but not the function body. I'll send out the fix as soon as I confirm > > > the fix with LKP. > > > > FWIW, the reason being that... > > > > The point of noreturn is that the caller should know to stop generating > > code. For that the declaration needs the attribute, because call sites > > typically do not have access to the function definition in C. > > BTW., arguably shouldn't the compiler generate a warning to begin with, > when it encounters a noreturn function definition whose prototype doesn't > have the attribute? Yeah, I would agree with that, but I think the problem is that gnu attributes are all considered 'optional' and do not factor into the actual signature. Added Michael to Cc so he may clarify if I'm talking nonsense.