Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2685296rwb; Sat, 29 Jul 2023 11:36:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlHeaD0WY2ypZXvnZ08FGXSbKb0/nR8wCUfROOD2owCEYIbQYFN8D2pU/vC09+SLtTiWO+TT X-Received: by 2002:a05:6a00:8c9:b0:668:74e9:8efb with SMTP id s9-20020a056a0008c900b0066874e98efbmr6415566pfu.8.1690655817596; Sat, 29 Jul 2023 11:36:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690655817; cv=none; d=google.com; s=arc-20160816; b=nErO0+XBDKfWYiuP5PQo7me9PAhVeo7CmiNHyaPuTr3I6l1ZCcex+LLoW3F5g+gE3m QzgCGB8Qpk2XAR/Z0ShhNo30w8sJfVkEDU+WuyihVAWaAwiw8sIviIda6CukF7wFMSIU KzPxKkBAMuvYDaO2RwHKvwO63/i8CWk4E/NzOnM3dIXd+zwR5Dlx6lUHB/NlODctToNC GYd2DJZhWyebzR/MGAiaA54xu0xt2j2okeC/8qU9FrDfGxlm0/+ZTwHiuNLzBkbJGh+F sDGSRlEuPSI8eNbYYO13Nu2oElmDuPKy3WfX4TXmZuP7JJBtxHStE/v3ajaH2M0LpEZI Iwbg== 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 :dkim-signature; bh=YKtmXB8XlRJmZbUL44WnEpFnIv2aTR85Fjju5w0P3Y8=; fh=1L5sQCB4yYrehtiln8zkQvB1DkXI7Hh5KaNUy3aS69k=; b=RM6TKbsIB5gzPmdyWT2OfYmtVtwSjJF58bsV8AFTIADII8N3LXxrmBz7KC6hCuPJ4t bBP20En+abtrLBDpn8UGdeYzqVJZbD11kcZf0V4O9NxkWD9vDHOH4WMefZ6FEO/3037h Obj0xXHS/8SGEKqu0zXhZStdY6Z+z9s7Re5sCnSk8mSit4Hf+dkcoT02XkPr0OFxFfu5 EAUMfS9ic8AwgMhLDCu9U4V7KUcIlglPBnM2ZA6z+nEPKTIkO1kt+skXkpYvwwO2zu+X kX+VI7aZlMl2Xw5I2PnSCxz7HgbHLiiZwqo7NiybGb8aGK5VPo2pPNzh4OuoaX3u+t/X 0wag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lBVI1Fzl; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k11-20020a056a00168b00b00682850547a9si4276177pfc.201.2023.07.29.11.36.45; Sat, 29 Jul 2023 11:36:57 -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=@kernel.org header.s=k20201202 header.b=lBVI1Fzl; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231565AbjG2POp (ORCPT + 99 others); Sat, 29 Jul 2023 11:14:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229746AbjG2POn (ORCPT ); Sat, 29 Jul 2023 11:14:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C16DF1BE5; Sat, 29 Jul 2023 08:14:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5E4AF60C6D; Sat, 29 Jul 2023 15:14:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE6B6C433C8; Sat, 29 Jul 2023 15:14:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690643681; bh=Ap6ei0a4Hf1ttKLS0HQpx4Ur7UI38Fn6v9BKc3A7fBE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lBVI1FzlcfWuS0k612zckmJ4F9m2gNFN1XKY/138WO7pnn+Ibdu+OghG3YNSlgv9c /hI/eqHC+nuIjsdxZlQer5XZvRuT9pdA1PBtpgG/tGR8Iejs8mQTbERrFbI0Zr10zh lLYIAHjihvBf6ropzggyUFp7txQdPD4C93OWDmm0SpFMe3yYhHqqG7mbBBeeH54Z2i Do8KP6qcfbW6Uwnxkhj1ngDBikEAhFjMBgYOX5n1LWj56Ql2PxEnankKz8+hOz4YC8 7qQ0P37Ef+NIaghCsgaNqZICTNqX77K8H8h9WpMmAThy1SlPiwQ5MPZD+PQBIMMwGT pGeCxjFBeoIbQ== Date: Sun, 30 Jul 2023 00:14:35 +0900 From: Masami Hiramatsu (Google) To: Petr Pavlu Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, peterz@infradead.org, samitolvanen@google.com, x86@kernel.org, linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/2] x86/retpoline,kprobes: Fix the [__indirect_thunk_start, ..end] range Message-Id: <20230730001435.ed2b12649d5c98d42981daf6@kernel.org> In-Reply-To: <20230711091952.27944-1-petr.pavlu@suse.com> References: <20230711091952.27944-1-petr.pavlu@suse.com> X-Mailer: Sylpheed 3.7.0 (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=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, 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 Hi Peter, Can you pick this series to tip tree? I think, these affect to x86 arch code. Thank you, On Tue, 11 Jul 2023 11:19:50 +0200 Petr Pavlu wrote: > Fix problems with an output position of thunk sections and the > associated definition of range [__indirect_thunk_start, > __indirect_thunk_end] which affects the kprobes optimization. > > Initial v1 of the series kept the mentioned range but it turns out the > logic which uses it is not necessary so it is removed altogether. > > Changes since v1 [1]: > - Drop the patch which moved the return thunk out of > [__indirect_thunk_start, ..end] and instead replace it with a removal > of the kprobes optimization check which looked for calls to indirect > thunks. > - Slightly adjust the commit message for the first patch, to better > match the new second patch. > > [1] https://lore.kernel.org/lkml/20230705081547.25130-1-petr.pavlu@suse.com/ > > Petr Pavlu (2): > x86/retpoline,kprobes: Fix position of thunk sections with > CONFIG_LTO_CLANG > x86/retpoline,kprobes: Skip optprobe check for indirect jumps with > retpolines and IBT > > arch/x86/include/asm/nospec-branch.h | 3 --- > arch/x86/kernel/kprobes/opt.c | 40 +++++++++++----------------- > arch/x86/kernel/vmlinux.lds.S | 4 +-- > arch/x86/lib/retpoline.S | 4 +-- > tools/perf/util/thread-stack.c | 4 +-- > 5 files changed, 20 insertions(+), 35 deletions(-) > > -- > 2.35.3 > -- Masami Hiramatsu (Google)