[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250520082258.GC2023217@ZenIV>
Date: Tue, 20 May 2025 09:22:58 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc: Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
linux-fsdevel@...r.kernel.org, bpf@...r.kernel.org,
loongarch@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dcache: Define DNAME_INLINE_LEN as a number directly
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.
Powered by blists - more mailing lists