From: Al Viro <viro@zeniv.linux.org.uk>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org,
loongarch@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dcache: Define DNAME_INLINE_LEN as a number directly
Date: Tue, 20 May 2025 09:22:58 +0100 [thread overview]
Message-ID: <20250520082258.GC2023217@ZenIV> (raw)
In-Reply-To: <20250520064707.31135-1-yangtiezhu@loongson.cn>
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.
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.
next prev parent reply other threads:[~2025-05-20 8:23 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 [this message]
2025-05-20 17:04 ` Alexei Starovoitov
2025-05-20 18:26 ` Yonghong Song
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=20250520082258.GC2023217@ZenIV \
--to=viro@zeniv.linux.org.uk \
--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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox