From patchwork Mon Jan 16 10:10:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Olsa X-Patchwork-Id: 13102851 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92496C63797 for ; Mon, 16 Jan 2023 10:12:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230246AbjAPKMv (ORCPT ); Mon, 16 Jan 2023 05:12:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230225AbjAPKLM (ORCPT ); Mon, 16 Jan 2023 05:11:12 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FEA91ABF0; Mon, 16 Jan 2023 02:10:20 -0800 (PST) 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 EEE4FB80B14; Mon, 16 Jan 2023 10:10:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55CB4C433F0; Mon, 16 Jan 2023 10:10:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673863817; bh=Aj54/H0x1pXEGgKMDyVJ8829D+rrZ/WP8KLwhEbUa+Y=; h=From:To:Cc:Subject:Date:From; b=F1pN3VelIJx5yiDHdoTYDGP9q6uij53ygLuV+Cty5y2QXokctCA+nmzy9DdqqXVgU js0P0XuliX0eYtfHSxVimTrx+TOmeoXBBZwEEU9ACiZkkkaupayahBDEFlExGsEchs MOmTbmR4aNK/+OJPvtQOUKHflPEytEmmly7sZQxCY4LtGHpoINOp5lPO42PFkBdyqx 1FS8fGzxVm7CpWE0MBDBu+leVki/iYu1bVvRCTYvHlm3TLSZjNY9kNDaRk02TwOQzg lZ6kMQSdglAPUGIakq5pGSF1WqaM5D6xRxxay2Pkht39Wi8sHR3YLoy1iC8ad30poY IbpWAJ37akJSA== From: Jiri Olsa To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Zhen Lei Cc: bpf@vger.kernel.org, live-patching@vger.kernel.org, linux-modules@vger.kernel.org, Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Joe Lawrence , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Luis Chamberlain Subject: [PATCHv3 bpf-next 0/3] kallsyms: Optimize the search for module symbols by livepatch and bpf Date: Mon, 16 Jan 2023 11:10:06 +0100 Message-Id: <20230116101009.23694-1-jolsa@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Precedence: bulk List-ID: hi, sending new version of [1] patchset posted originally by Zhen Lei. It contains 2 changes that improove search performance for livepatch and bpf. v3 changes: - fixed off by 1 issue, simplified condition, added acks [Song] - added module attach as subtest [Andrii] v2 changes: - reworked the bpf change and meassured the performance - adding new selftest to benchmark kprobe multi module attachment - skipping patch 3 as requested by Zhen Lei - added Reviewed-by for patch 1 [Petr Mladek] thanks, jirka [1] https://lore.kernel.org/bpf/20221230112729.351-1-thunder.leizhen@huawei.com/ --- Jiri Olsa (2): selftests/bpf: Add serial_test_kprobe_multi_bench_attach_kernel/module tests bpf: Change modules resolving for kprobe multi link Zhen Lei (1): livepatch: Improve the search performance of module_kallsyms_on_each_symbol() include/linux/module.h | 6 ++++-- kernel/livepatch/core.c | 10 +--------- kernel/module/kallsyms.c | 13 ++++++++++++- kernel/trace/bpf_trace.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------- kernel/trace/ftrace.c | 2 +- tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c | 19 ++++++++++++++----- 6 files changed, 79 insertions(+), 64 deletions(-)