From patchwork Wed Jul 5 08:15:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Pavlu X-Patchwork-Id: 11626 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1715789vqx; Wed, 5 Jul 2023 01:32:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlEXRg1BRuywFRjU3JiROzK3JPPb26ly+iiu4LnHk0Disy6T79AoCIkyA2C4Eyp+IJONZg46 X-Received: by 2002:a0d:e297:0:b0:579:e606:6ce2 with SMTP id l145-20020a0de297000000b00579e6066ce2mr8976487ywe.40.1688545953004; Wed, 05 Jul 2023 01:32:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688545952; cv=none; d=google.com; s=arc-20160816; b=CJOu6w1ANbgnvo8Vklvavh0syho9bbG9Jg/+pISaMxfcug/3PlEqoa5fDFY5br+Fzw u0a/QTFcIbuxM3FAvxaD4D5ZmT4xtad/a6txXSy3vzST9sjgUz1s7luD0BGJ88Du11Qd UahYMcyCBn9dMotni6rCH2tJSKI4wWurRcARnzrYiU8H/LXUMIFBRzgh1tpw9uLvBz+Y vYbLwsO1O/IdTvsH5keAxmF4ME+k4FG/pq4VuoafVTEYpr5rHBVp4J0BLGBXzytb72UY IS2/joO9FULh4/ZzJiNFWkzItLKS1ggZEAudHKvlZrtpQQiA2iEkUjebsS8yTh0T99k+ PypA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=tUkIuCkSY6nqtqo0glV1weGN9mAs8kCdaJjxpHNVgc4=; fh=b8DnsPAC+aJxBA/QjC6l92OP9PTMA5HDkXksZqlatKo=; b=XJrbJGFHRxmxu0KbZjvRnZrP3MYk90QipiRnUp4yBAjqAJ+eeXvfK2Q2mHpeDut+20 bWy3myEiIWeRCKZ6c+HN/ApPZYxQgTr19tSG26/h2qFf5XKDLsfT7+JlmWtwFHRb1yix SHEIJnMKjWPnflqVl2M7blocMgPuTK1pL5+fqFRCmFgzIuk0MdTeNylAE+5frCGvemg8 9QGJEV4kvx7jUDURQZFeKTN13cRWow1xRQFA3YiTsO8/cjyxbYnSE2NPqzWXkTZr4pRI bY1aZoh8PWCNXnBGn5QDyPySxp5gg9biSf2+5MkkZwIRUdKFCBwQ8JW5Q7QETQ5EjYC7 UZrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=i0S0u2HG; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l64-20020a638843000000b0054ff53233f2si22981281pgd.567.2023.07.05.01.32.20; Wed, 05 Jul 2023 01:32:32 -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=@suse.com header.s=susede1 header.b=i0S0u2HG; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232439AbjGEIQP (ORCPT + 99 others); Wed, 5 Jul 2023 04:16:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229892AbjGEIQN (ORCPT ); Wed, 5 Jul 2023 04:16:13 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9C3010DD; Wed, 5 Jul 2023 01:16:12 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 5014B1F460; Wed, 5 Jul 2023 08:16:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1688544971; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=tUkIuCkSY6nqtqo0glV1weGN9mAs8kCdaJjxpHNVgc4=; b=i0S0u2HG2dQBweu8lRWrTw4+AWdEotnJ8Z3LX7Utkw4zRoddg2LFjGF524GTsmK13rnhLz E/MXXC2EAKK4pL//10OZr5tcBuMyP8+dOFObt7QhGaAYIxazXzDU3caQQQXu3DSVhcGqKd ArT0GFy1bkBI/AYrLr5L218a6AT0wNw= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1182513460; Wed, 5 Jul 2023 08:16:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Acx5A8smpWRkRwAAMHmgww (envelope-from ); Wed, 05 Jul 2023 08:16:11 +0000 From: Petr Pavlu To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mhiramat@kernel.org Cc: peterz@infradead.org, samitolvanen@google.com, x86@kernel.org, linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Petr Pavlu Subject: [PATCH 0/2] x86/retpoline,kprobes: Fix the [__indirect_thunk_start, ..end] range Date: Wed, 5 Jul 2023 10:15:45 +0200 Message-Id: <20230705081547.25130-1-petr.pavlu@suse.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 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_PASS,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770568761300600718?= X-GMAIL-MSGID: =?utf-8?q?1770568761300600718?= 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. Petr Pavlu (2): x86/retpoline,kprobes: Fix position of thunk sections with CONFIG_LTO_CLANG x86/retpoline,kprobes: Avoid treating rethunk as an indirect jump arch/x86/kernel/vmlinux.lds.S | 4 +--- arch/x86/lib/retpoline.S | 8 ++++++-- 2 files changed, 7 insertions(+), 5 deletions(-)