Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp874862iog; Fri, 17 Jun 2022 16:12:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sHJ2PUsItvv9jc2/Iab0ugBI2MImdhdjhHFy3NTowc1S79GaXwgSkV01zI/XL6oVph/Cll X-Received: by 2002:a17:906:1b19:b0:70d:6fe8:eb44 with SMTP id o25-20020a1709061b1900b0070d6fe8eb44mr11469108ejg.129.1655507542860; Fri, 17 Jun 2022 16:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655507542; cv=none; d=google.com; s=arc-20160816; b=zAypgQo37RpTndXk6vvBOXyNVh4Qb2CWQrFB+dP+RSoJALcNx2rRcE03bYbZXwM7PP /4AAS/Ds0O9kXMLygCXVattHDgipuwig1JN7xclcZauBArRiZDMF++iW5gdh3qVM/cBk alLEZHcVpEg/fYiRSzPifwJJ5XQxjMrNavbJxAcPvW86KQyQdSd4ofYm58nc+AMKQHSJ WySekDGgQxSz1nasDNB5GmACjgunyIzJEY9Hhq+VEFYgHVLloQ0ca1PmlHcaq5umnvGT v1Vt4vvoJFGTahj8fZjvPKjaQh/JrWDkKxDY/kdasWkEOyp7b4Bzqt/tkWcTWYbE1lJL bXNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=oP7IZFtNVr8+jlczb/myP89sbQEu0WyE2BJf3wKsfqY=; b=SBxSI7RzwlooKVMNw6r8YJjJWrzxU0QSTOPzYqJa6bh1CG+Qw53MDfiOyVstLRNbej nmUHCEAoh5BL6/gxJJGlzaWSStnWR84gyAXTX4oAGxo8CWsivNMaSXBKYQN7kJ91k7YG GfsyDo+aKebb3ipnYw9TtqOe7KroLBzMTQFOMyRRr3gu9PIzfFfeQosYI741izZo01So 67mutvFbR3bTipEqnl4Y48wgRIkdw7hw42hxAWpNql0gNaW4pE6Z8RSP8ISmiAOIUQgn jgUbs5wkdqwaGLzVl5R5WlefE1Zpl0oJTJWwI8MvgHeIMqy4gvAzRUBzsA/pyDvgBXSk ogiA== 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 i28-20020a0564020f1c00b0043566d1a4d5si1918592eda.264.2022.06.17.16.11.58; Fri, 17 Jun 2022 16:12:22 -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 S239682AbiFQWwG (ORCPT + 99 others); Fri, 17 Jun 2022 18:52:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231913AbiFQWwD (ORCPT ); Fri, 17 Jun 2022 18:52:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90C4659322 for ; Fri, 17 Jun 2022 15:52:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0DFF4B825F3 for ; Fri, 17 Jun 2022 22:52:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30599C3411B; Fri, 17 Jun 2022 22:51:59 +0000 (UTC) Date: Fri, 17 Jun 2022 18:51:57 -0400 From: Steven Rostedt To: Josh Poimboeuf Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , kernel test robot Subject: Re: [PATCH v2] x86/ftrace: Remove OBJECT_FILES_NON_STANDARD usage Message-ID: <20220617185157.3c6f442a@gandalf.local.home> In-Reply-To: References: X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,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 Fri, 3 Jun 2022 08:04:44 -0700 Josh Poimboeuf wrote: > The file-wide OBJECT_FILES_NON_STANDARD annotation is used with > CONFIG_FRAME_POINTER to tell objtool to skip the entire file when frame > pointers are enabled. However that annotation is now deprecated because > it doesn't work with IBT, where objtool runs on vmlinux.o instead of > individual translation units. > > Instead, use more fine-grained function-specific annotations: > > - The 'save_mcount_regs' macro does funny things with the frame pointer. > Use STACK_FRAME_NON_STANDARD_FP to tell objtool to ignore the > functions using it. > > - The return_to_handler() "function" isn't actually a callable function. > Instead of being called, it's returned to. The real return address > isn't on the stack, so unwinding is already doomed no matter which > unwinder is used. So just remove the STT_FUNC annotation, telling > objtool to ignore it. That also removes the implicit > ANNOTATE_NOENDBR, which now needs to be made explicit. > > Fixes the following warning: > > vmlinux.o: warning: objtool: __fentry__+0x16: return with modified stack frame > > Fixes: ed53a0d97192 ("x86/alternative: Use .ibt_endbr_seal to seal indirect calls") > Reported-by: kernel test robot > Signed-off-by: Josh Poimboeuf > --- > v2: > - fix return_to_handler() Acked-by: Steven Rostedt (Google) -- Steve