From patchwork Fri Jan 13 14:33:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Olsa X-Patchwork-Id: 13100872 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 45135C61DB3 for ; Fri, 13 Jan 2023 14:43:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229767AbjAMOm5 (ORCPT ); Fri, 13 Jan 2023 09:42:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbjAMOmU (ORCPT ); Fri, 13 Jan 2023 09:42:20 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 014E640C17; Fri, 13 Jan 2023 06:33:12 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 8F4C361F41; Fri, 13 Jan 2023 14:33:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00873C433EF; Fri, 13 Jan 2023 14:33:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673620391; bh=c2/eHOeJ8hv3rN2sbMnI77LITuYi0ZOFIxjM3mxMwEU=; h=From:To:Cc:Subject:Date:From; b=Egl0gYzczrT8rdS8sgWZPKkHm1tNJZFUMyWA3MoqyTv4XoHm1mbc3j5eXm4N16ylJ 0V5p+bvgG4SQXvLa8PizJPnzPcgVaeefV1INYDeYp4pfNns/07i6TR6Pqz9/rXK795 I1byl0+/OtxplnDtpzYsidxcl+FH3c7tTqLLo36VRWHsAtIOATNsL5bn/JVcRbfmQK jFjrDTSe+xD0uPR/nlPyFH1yPiD9eoEGRtM2jh0odnl2HUYnRZffFx0qLRTFpdHFNW zDtapmP4S7vU25JryqqOD5Jf9S/zb7eUOyXKt97yQojUZL/7UJOmgieFjMoEMnDn1Q Q9atmDJi90SmA== 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: [PATCHv2 bpf-next 0/3] kallsyms: Optimize the search for module symbols by livepatch and bpf Date: Fri, 13 Jan 2023 15:33:00 +0100 Message-Id: <20230113143303.867580-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. 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 | 95 ++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------- kernel/trace/ftrace.c | 2 +- tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c | 21 ++++++++++++++++----- 6 files changed, 83 insertions(+), 64 deletions(-)