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 39B44C7618A for ; Thu, 16 Mar 2023 22:37:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229938AbjCPWhH (ORCPT ); Thu, 16 Mar 2023 18:37:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229923AbjCPWhD (ORCPT ); Thu, 16 Mar 2023 18:37:03 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0773DC0B3; Thu, 16 Mar 2023 15:36:59 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id z21so13648821edb.4; Thu, 16 Mar 2023 15:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679006218; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gDnCsGM/FV1yfEUIqdP+WO9uXlOSf1wmfPkNbc+Ep1A=; b=ij85mTrQsntyqaM6cYuQUcOw0ZVEZaogn+UmtL4AdzKsjIpIykVVEc9T6NaoHuSvFn qD5fBvBqM4pVlBiGKwVOang8C1VcmLu0t936OUjLkRl5Ncv/21XOHsFhl3BhGRopkJ0i CprpN/fg55PCEhGt84hVw2ojJHBdULh01mjLVDfBFcLZ3/UesQBOx0EWab76TTpaN4hJ Gv0AdjlgBN9Ft7BZkZ08+kYX9AGR6MrGWY//APrptfEuaoU07bwqvCjsKdZOg4mLzvVn wCUKhdj74B1mdK4nIveVEfIc45r3R2s0whRYhcLvV/MWBNeuaggNKngOnWpmIodrP+BY aHLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679006218; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gDnCsGM/FV1yfEUIqdP+WO9uXlOSf1wmfPkNbc+Ep1A=; b=HLLQ4N0sIhuhEmUl+dmthoa0J3LEn1QsH5SJd4rysyjoPT08syUKs+1GluhQbvxoYT E1KaV2ODpsWO3dj2RsqfKDX3HSfJAmXei0dXqRPmFyVREkwLxuarWabF9tyUtVgbUmDy Z3xM5NsUoG1AwMCx28CDS/lmSz3XwfltzipTdc8icuAiNlU8w2Vg5GaMWVRNcoPytHGY 9VGA0/rGy+hqQHfeibvHcPQp/NJ76ttuE8ekqbjdVeZ0vm+vImMoWfUebOmYz2ojIJER 7BHiMvlwP5sRtGVkSwunVAyGXoRQQBfULSSgLhPJ4zy1wZNfb4JtxQsPt0Zh6YJhZcbK wkQA== X-Gm-Message-State: AO0yUKXkyXTF3OxT28uj9u+jFTLt3X8os0ShaI2M9qxCI8hPgX69ssve h+kPGsIOmXJhM88luliE/ooOZPAldpVGIm08WoI= X-Google-Smtp-Source: AK7set/fYofBPE5FDtJ+WwJR9R3P0GNPMgNfhVh7QImSlv+fd8oGgSx09RSedQu6am3rrZne9IkTLIcoG7c1+0R1TTk= X-Received: by 2002:a50:8e14:0:b0:4fb:f19:883 with SMTP id 20-20020a508e14000000b004fb0f190883mr683888edw.1.1679006218096; Thu, 16 Mar 2023 15:36:58 -0700 (PDT) MIME-Version: 1.0 References: <20230316170149.4106586-1-jolsa@kernel.org> <20230316170149.4106586-10-jolsa@kernel.org> In-Reply-To: <20230316170149.4106586-10-jolsa@kernel.org> From: Andrii Nakryiko Date: Thu, 16 Mar 2023 15:36:46 -0700 Message-ID: Subject: Re: [PATCHv3 bpf-next 9/9] selftests/bpf: Add file_build_id test To: Jiri Olsa Cc: Alexei Starovoitov , Andrii Nakryiko , Hao Luo , Andrew Morton , Alexander Viro , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Matthew Wilcox , bpf@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-perf-users@vger.kernel.org, Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Daniel Borkmann , Namhyung Kim , Dave Chinner Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 16, 2023 at 10:03=E2=80=AFAM Jiri Olsa wrote= : > > The test attaches bpf program to sched_process_exec tracepoint > and gets build of executed file from bprm->file object. typo: build ID > > We use urandom_read as the test program and in addition we also > attach uprobe to liburandom_read.so:urandlib_read_without_sema > and retrieve and check build id of that shared library. > > Also executing the no_build_id binary to verify the bpf program > gets the error properly. > > Signed-off-by: Jiri Olsa > --- > tools/testing/selftests/bpf/Makefile | 7 +- > tools/testing/selftests/bpf/no_build_id.c | 6 ++ > .../selftests/bpf/prog_tests/file_build_id.c | 98 +++++++++++++++++++ > .../selftests/bpf/progs/file_build_id.c | 70 +++++++++++++ > tools/testing/selftests/bpf/test_progs.h | 10 ++ > 5 files changed, 190 insertions(+), 1 deletion(-) > create mode 100644 tools/testing/selftests/bpf/no_build_id.c > create mode 100644 tools/testing/selftests/bpf/prog_tests/file_build_id.= c > create mode 100644 tools/testing/selftests/bpf/progs/file_build_id.c > Looks good, but let's add CONFIG_FILE_BUILD_ID to selftests/bpf/config, as Daniel mentioned. Acked-by: Andrii Nakryiko [...]