From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9A0DC433DB for ; Thu, 11 Feb 2021 16:39:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8B48564D9E for ; Thu, 11 Feb 2021 16:39:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232067AbhBKQjf (ORCPT ); Thu, 11 Feb 2021 11:39:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231816AbhBKQhL (ORCPT ); Thu, 11 Feb 2021 11:37:11 -0500 Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55DEAC061574; Thu, 11 Feb 2021 08:36:28 -0800 (PST) Received: by mail-il1-x131.google.com with SMTP id q9so5626640ilo.1; Thu, 11 Feb 2021 08:36:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=T7IfdITc2G6l0UJ7iQZqMpmWkPqCDFFsuFOokca/bRM=; b=cjq3KD1hLVOE4Z4oipVeSCZcoTVL7rRhkLe4RpF0JH2DchV72aEcZbmMUPeFO1Rle8 8TafWSIe9Y4m54B1ZZJK1Zu6v2ruOCD444JuVAv1MvIQNYgFennWS3HK7eqPdcOj39Dj eBT2pv5NQOr88GkYvgp4nB7nyKN/zLDeb8UMcRSCAogus8BVIubbok8bIRNWGtqhLRzw fKcU+dw79NMAbB4q7jzEwi1MTlNVqaWV8SPRwMIQLN0FpDpflGqnnrVolEH8KX9iQXuC xKIv1u1q6u5SMrGC+TQ5gHyivvWrhMiCOfqRp3+fX4nE/dH/qJG8xqaB3JJsZudIwwZ3 6Nmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=T7IfdITc2G6l0UJ7iQZqMpmWkPqCDFFsuFOokca/bRM=; b=pp8Ksu/xgkpaYqb6pgs7rYr1tidc1qmrGyc5nFGy55fiJiGKZujuplGxmEFj00zif/ JerIIuptTx5Pcd5DF5Cc0dl9ZtCFM+CX2V/BX3vsMot32Df1ksN4/CY16jG/KLAdROD7 E7SWqtrRDm7SR5IQsERSvwD10TxxEYehl63gJ/eSAd4A0SGSkfFOCInzXIYpsNEtx4IW Mvn5MIOHYEtsIDggLXXMvEgA4BfvBSvKLuRR7MADL5oLrQkFmo+soR7x3THQrmoME39Y GoLUO8Ffw40zUtO9JfjA4c3J4/b29oH38W/gY8pxgZXe1fm+Z2Sn25kuLgAvUKJcHasX EkkQ== X-Gm-Message-State: AOAM530ZtHVH82JLRwf1CCWjZnPghuw/KpsckyDFZNN/08OrlIHt+o+j ogyu24Og3jlvirnbH1kOXhsLTr74KerLZ/7pwWk= X-Google-Smtp-Source: ABdhPJyXlPHHikWMAqYlGx83bSVgiHeZwPihSI7pebcew5wDt2j5rxDGaSuaSi2j5shZWrFi0HNwWlrFIkmg8RTAqQw= X-Received: by 2002:a05:6e02:4ca:: with SMTP id f10mr2993363ils.112.1613061387730; Thu, 11 Feb 2021 08:36:27 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Thu, 11 Feb 2021 17:36:16 +0100 Message-ID: Subject: Re: FAILED unresolved symbol vfs_truncate on arm64 with LLVM To: Jiri Olsa Cc: Andrii Nakryiko , Nathan Chancellor , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Nick Desaulniers , Networking , bpf , clang-built-linux , Veronika Kabatova , Jiri Olsa Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Feb 11, 2021 at 5:07 PM Jiri Olsa wrote: > > On Thu, Feb 11, 2021 at 04:43:48PM +0100, Sedat Dilek wrote: > > SNIP > > > > > filled with elf functions start/end values, right? > > > > > > > > > /* > > > > > * We iterate over sorted array, so we can easily skip > > > > > * not valid item and move following valid field into > > > > > > > > > > > > > > > So the idea is to use address segments and check whether there is a > > > > > segment that overlaps with a given address by first binary searching > > > > > for a segment with the largest starting address that is <= addr. And > > > > > then just confirming that segment does overlap with the requested > > > > > address. > > > > > > > > > > WDYT? > > > > > > heya, > > > with your approach I ended up with change below, it gives me same > > > results as with the previous change > > > > > > I think I'll separate the kmod bool address computation later on, > > > but I did not want to confuse this change for now > > > > > > > I have applied your diff on top of pahole-v1.20 with Yonghong Son's > > "btf_encoder: sanitize non-regular int base type" applied. > > This is on x86-64 with LLVM-12, so I am not directly affected. > > If it is out of interest I can offer vmlinux (or .*btf* files) w/ and > > w/o your diff. > > if you could run your tests/workloads and check the new change does not > break your stuff, that'd be great > > we need soem testsuite ;-) I have some stupid test script which runs over > few vmlinux binaries and check the diff in BTF data.. problem is that these > vmlinux binaries are ~300M each, so it's not great for sharing > > also I was checking if we could use BPF_BTF_LOAD syscall and load BTF in > kernel and back at the end of pahole processing to check it's valid ;-) > Just finished a new build. What I did: cd /path/to/linux/git rm -v .*btf* vmlinux* I collected some commands in CBL issue #1297. $ /usr/sbin/bpftool btf dump file vmlinux | rg 'vfs_truncate|bpf_d_path' [22259] TYPEDEF 'btf_bpf_d_path' type_id=22260 [29970] FUNC 'vfs_truncate' type_id=29969 linkage=static Tests? $MAKE $MAKE_OPTS -C tools/testing/selftests/bpf/ ^^^ ??? - Sedat - [1] https://github.com/ClangBuiltLinux/linux/issues/1297 > thanks, > jirka >