From: Yonghong Song <yonghong.song@linux.dev>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Al Viro <viro@zeniv.linux.org.uk>
Cc: Tiezhu Yang <yangtiezhu@loongson.cn>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Linux-Fsdevel <linux-fsdevel@vger.kernel.org>,
bpf <bpf@vger.kernel.org>,
loongarch@lists.linux.dev, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dcache: Define DNAME_INLINE_LEN as a number directly
Date: Tue, 20 May 2025 11:26:08 -0700 [thread overview]
Message-ID: <b932c4b8-a45d-4da3-8ef9-f45055830609@linux.dev> (raw)
In-Reply-To: <CAADnVQJW+qyq9wPD6RdoaZ8nLYX8N2+4Bhxyd19h6pdqNRMc3A@mail.gmail.com>
On 5/20/25 1:04 AM, Alexei Starovoitov wrote:
> On Tue, May 20, 2025 at 1:23 AM Al Viro <viro@zeniv.linux.org.uk> wrote:
>> On Tue, May 20, 2025 at 02:47:07PM +0800, Tiezhu Yang wrote:
>>> When executing the bcc script, there exists the following error
>>> on LoongArch and x86_64:
>> NOTABUG. You can't require array sizes to contain no arithmetics,
>> including sizeof(). Well, you can, but don't expect your requests
>> to be satisfied.
>>
>>> How to reproduce:
>>>
>>> git clone https://github.com/iovisor/bcc.git
>>> mkdir bcc/build; cd bcc/build
>>> cmake ..
>>> make
>>> sudo make install
>>> sudo /usr/share/bcc/tools/filetop
>> So fix the script. Or report it to whoever wrote it, if it's
>> not yours.
> +1
>
>> I'm sorry, but we are NOT going to accomodate random parsers
>> poking inside the kernel-internal headers and failing to
>> actually parse the language they are written in.
>>
>> If you want to exfiltrate a constant, do what e.g. asm-offsets is
>> doing. Take a look at e.g. arch/loongarch/kernel/asm-offsets.c
>> and check what ends up in include/generated/asm-offsets.h - the
>> latter is entirely produced out of the former.
>>
>> The trick is to have inline asm that would spew a recognizable
>> line when compiled into assembler, with the value(s) you want
>> substituted into it. See include/linux/kbuild.h for the macros.
>>
>> Then you pick these lines out of generated your_file.s - no need
>> to use python, sed(1) will do just fine. See filechk_offsets in
>> scripts/Makefile.lib for that part.
> None of it is necessary.
>
> Tiezhu,
>
> bcc's tools/filetop.py is really old and obsolete.
> It's not worth fixing. I'd delete it.
> Use bcc's libbpf-tools/filetop instead.
Tiezhu, please check whether libbpf-tools/filetop satisfied your need or
not. Thanks!
next prev parent reply other threads:[~2025-05-20 18:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 6:47 [PATCH] dcache: Define DNAME_INLINE_LEN as a number directly Tiezhu Yang
2025-05-20 8:22 ` Al Viro
2025-05-20 17:04 ` Alexei Starovoitov
2025-05-20 18:26 ` Yonghong Song [this message]
2025-05-21 9:37 ` Tiezhu Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b932c4b8-a45d-4da3-8ef9-f45055830609@linux.dev \
--to=yonghong.song@linux.dev \
--cc=alexei.starovoitov@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=viro@zeniv.linux.org.uk \
--cc=yangtiezhu@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.