Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp979236imw; Fri, 8 Jul 2022 15:46:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tBnmzcv2oVXnESwihTdjbDtilA7jt3+JNdTyylhoTwlHqFCXI5/PdRHWYY2Lu+9rOlAOeH X-Received: by 2002:a05:6402:378a:b0:431:6d8d:9023 with SMTP id et10-20020a056402378a00b004316d8d9023mr7740236edb.98.1657320380622; Fri, 08 Jul 2022 15:46:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657320380; cv=none; d=google.com; s=arc-20160816; b=vdSRVsmhhLd3vSBZEmrc2i/efjN7s3w3nKbn3XtQdfMjpU7CYrjCXJHmO19hKnQ6Gv h7sEQVmYCmWQwr/IlMmSLBlNtAxmXC+nai+GiDWkAB0MhvoUUgrIytoJXnJO5ebTmM3y 8pkWSfZaDb594/9XOPvrilSfdUdeAum/79WXIk+xLARobBF0ltzpZ2aisjcYPbqr0NDx R82F+T7CMHnQ5Tohw9b+lkb/noeXzw23QoSBPoVfSgW95sfICdfhCkAGkARq7SvCwUil +tgROPJsnhZsY/Ag1SHGfT9owLQi6ldmXgiuUx8oXxfk9dgna5Ug+W2rVThORcnSxq2i RDCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=/jWEX2CAxd2pxItuLqmMwJVi6a+9EYVwihXMCh0ihgo=; b=Fw3Kt+1+APmn/EMnWmrwZW59jDsMft4xXXy6HvQ/9gONI3Nygj1ElJXdRkBkHVQBNh 0cu/zbLaqAYqR8ISG8DNmm+NSmXgObB4+2V/qx/XLsGWL9IPNrkP7qZprPGzbdFEubbC mMODF7KjZ3JZ/Oj8B8OWC5Ygcpz/kiVqmdykMYIG9TUTC48ml0lobRy2na7zZ4QMG+E1 32Pxzs2ObOepKvvUrbobg5EyEesPPOcT5mX1hPr9Oila8TPeUXXK4wtrIue8kUyP48/Y AlB8j/Is0A2KqKOij8HVfhtz/ToxgBQaBQ8PCywRbwPP7Gwd3+tUiq3OyV/hnWDrTeQB qZsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=U3iDzdgX; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m6-20020a056402430600b00435dcc939d3si3310edc.10.2022.07.08.15.45.56; Fri, 08 Jul 2022 15:46:20 -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=@gmail.com header.s=20210112 header.b=U3iDzdgX; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239267AbiGHW15 (ORCPT + 99 others); Fri, 8 Jul 2022 18:27:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238673AbiGHW1s (ORCPT ); Fri, 8 Jul 2022 18:27:48 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8139313B448; Fri, 8 Jul 2022 15:27:47 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id dn9so34605605ejc.7; Fri, 08 Jul 2022 15:27:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/jWEX2CAxd2pxItuLqmMwJVi6a+9EYVwihXMCh0ihgo=; b=U3iDzdgXfVzjGXD+G2rfy3gKypcJs18kw1GTLONv2MDm8G0RrUrg1dKCVtAvXfLfVV Us5QzXMAaG9z7C+VdtuVO3iRmoHRBJolqSPUnp6hFNUB2OmZNCzIRHeIRuSTqjUPRww8 C71PuBR7F5Dxs2ZcRSItBp8kUwsR27OtkDga6FBNk6QNaBndWI38RqgpZwQWhCGUGYtl h8+XT4mVWSbRWXKxLCSBn0pbldS2+CL/iCa/os/PzuCvqcxdo67E7lM+Kxpu6D+TZFBg dEOrp6LtxKWaNlORMasmO3uE8ZSAuR230NBs0jKtacRPi+LkgqSG7I9TVIbR66UJJeea UDgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/jWEX2CAxd2pxItuLqmMwJVi6a+9EYVwihXMCh0ihgo=; b=SAySfGEtayiyC9IxUeMGm0VrFqVT7UQswuLEfjkjKZ43RtYd3mUNOwHE6QrHU26F++ ysfYELH80A58ZaT1/evq9uP4wSH4zEtgYooi/g3cSYzF7x1yzRcjkn1XYgCfQvmPoK1q DB4y7DLw32vD1+91B2WSAKwjTzYX+VEdTBZqOcNQ33GivxSojLq2cXjNA8CEdXHDaeri RKlKny/99WKXkCE0YPDkzBZJyho5KBn72LjyXzuhwgDd6ZXJN7M3oDHb7HOKxi40K5EW ASev3s4QT6K9zoJa1OtHPGgDx2FgSgA1Zo/iqMPw+qTVw82rjTm2uyJMZTOczu739fCQ MspQ== X-Gm-Message-State: AJIora9/wtbapM8d8zZBJ5hVoNRCset0MAjrehxMKqJ7BLQBNkci4rtN Gsd8cxyjlvid1neuVvPgSeU8OD4fPGepzYcFgEY= X-Received: by 2002:a17:907:6e05:b0:72a:a141:962 with SMTP id sd5-20020a1709076e0500b0072aa1410962mr5832229ejc.545.1657319266147; Fri, 08 Jul 2022 15:27:46 -0700 (PDT) MIME-Version: 1.0 References: <1657113391-5624-1-git-send-email-alan.maguire@oracle.com> <1657113391-5624-3-git-send-email-alan.maguire@oracle.com> In-Reply-To: <1657113391-5624-3-git-send-email-alan.maguire@oracle.com> From: Andrii Nakryiko Date: Fri, 8 Jul 2022 15:27:35 -0700 Message-ID: Subject: Re: [PATCH v4 bpf-next 2/2] selftests/bpf: add a ksym iter subtest To: Alan Maguire Cc: Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Martin Lau , Song Liu , Yonghong Song , john fastabend , KP Singh , Jiri Olsa , Masami Hiramatsu , Andrew Morton , David Vernet , swboyd@chromium.org, Nick Desaulniers , Dmitrii Dolgov <9erthalion6@gmail.com>, Kenny Yu , Geliang Tang , Kuniyuki Iwashima , bpf , open list Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Wed, Jul 6, 2022 at 6:17 AM Alan Maguire wrote: > > add subtest verifying BPF ksym iter behaviour. The BPF ksym > iter program shows an example of dumping a format different to > /proc/kallsyms. It adds KIND and MAX_SIZE fields which represent the > kind of symbol (core kernel, module, ftrace, bpf, or kprobe) and > the maximum size the symbol can be. The latter is calculated from > the difference between current symbol value and the next symbol > value. > > The key benefit for this iterator will likely be supporting in-kernel > data-gathering rather than dumping symbol details to userspace and > parsing the results. > > Signed-off-by: Alan Maguire > Acked-by: Yonghong Song > --- Please see progs/bpf_iter.h and add ksym iterator types there. Thanks! > tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 16 +++++ > tools/testing/selftests/bpf/progs/bpf_iter_ksym.c | 74 +++++++++++++++++++++++ > 2 files changed, 90 insertions(+) > create mode 100644 tools/testing/selftests/bpf/progs/bpf_iter_ksym.c > [...]