From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: LEROY Christophe <christophe.leroy2@cs-soprasteria.com>
Cc: Xi Ruoyao <xry111@xry111.site>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"loongarch@lists.linux.dev" <loongarch@lists.linux.dev>,
Jinyang He <hejinyang@loongson.cn>,
Tiezhu Yang <yangtiezhu@loongson.cn>,
Arnd Bergmann <arnd@arndb.de>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH v4 3/4] selftests/vDSO: Use KHDR_INCLUDES to locate UAPI headers for vdso_test_getrandom
Date: Tue, 27 Aug 2024 16:15:34 +0200 [thread overview]
Message-ID: <Zs3fhiSlXg2aCGa8@zx2c4.com> (raw)
In-Reply-To: <019268d4-c177-49e7-aab3-b8fa431905ca@cs-soprasteria.com>
On Tue, Aug 27, 2024 at 02:07:59PM +0000, LEROY Christophe wrote:
> Le 27/08/2024 à 15:58, Jason A. Donenfeld a écrit :
> > On Tue, Aug 27, 2024 at 09:20:16PM +0800, Xi Ruoyao wrote:
> >> Building test_vdso_getrandom currently leads to following issue:
> >>
> >> In file included from /home/xry111/git-repos/linux/tools/include/linux/compiler_types.h:36,
> >> from /home/xry111/git-repos/linux/include/uapi/linux/stddef.h:5,
> >> from /home/xry111/git-repos/linux/include/uapi/linux/posix_types.h:5,
> >> from /usr/include/asm/sigcontext.h:12,
> >> from /usr/include/bits/sigcontext.h:30,
> >> from /usr/include/signal.h:301,
> >> from vdso_test_getrandom.c:14:
> >> /home/xry111/git-repos/linux/tools/include/linux/compiler-gcc.h:3:2: error: #error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
> >> 3 | #error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
> >> | ^~~~~
> >>
> >> It's because the compiler_types.h inclusion in
> >> include/uapi/linux/stddef.h is expected to be removed by the
> >> header_install.sh script, as compiler_types.h shouldn't be used from the
> >> user space.
> >
> > Hmm. If I run this on my current 6.10-based system, I get:
> >
> > $ make
> > CC vdso_standalone_test_x86
> > CC vdso_test_getrandom
> > vdso_test_getrandom.c:43:41: error: field ‘params’ has incomplete type
> > 43 | struct vgetrandom_opaque_params params;
> > | ^~~~~~
> >
> > Because KHDR_INCLUDES is /usr/include instead.
> >
> > Christophe, any suggestions on this one? And any idea why loongarch is
> > hitting it, but not x86 or ppc?
> >
>
>
> Can you 'make clean' then provide the output of 'make V=1' ?
With*out* this patch, the output is:
gcc -std=gnu99 -D_GNU_SOURCE= -isystem /home/zx2c4/Projects/random-linux/tools/testing/selftests/../../../tools/include -isystem /home/zx2c4/Projects/random-linux/tools/testing/selftests/../../../include/uapi vdso_test_getrandom.c parse_vdso.c -o /home/zx2c4/Projects/random-linux/tools/testing/selftests/vDSO/vdso_test_getrandom
*With* this patch, the output is:
gcc -std=gnu99 -D_GNU_SOURCE= -isystem /home/zx2c4/Projects/random-linux/tools/testing/selftests/../../../tools/include -isystem /home/zx2c4/Projects/random-linux/tools/testing/selftests/../../../usr/include vdso_test_getrandom.c parse_vdso.c -o /home/zx2c4/Projects/random-linux/tools/testing/selftests/vDSO/vdso_test_getrandom
vdso_test_getrandom.c:43:41: error: field ‘params’ has incomplete type
43 | struct vgetrandom_opaque_params params;
| ^~~~~~
$ ls /home/zx2c4/Projects/random-linux/tools/testing/selftests/../../../usr/include
headers_check.pl Makefile
Since I don't build in there, this directory is empty.
Jason
next prev parent reply other threads:[~2024-08-27 14:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240827132018.88854-1-xry111@xry111.site>
[not found] ` <20240827132018.88854-4-xry111@xry111.site>
2024-08-27 13:58 ` [PATCH v4 3/4] selftests/vDSO: Use KHDR_INCLUDES to locate UAPI headers for vdso_test_getrandom Jason A. Donenfeld
2024-08-27 14:07 ` LEROY Christophe
2024-08-27 14:15 ` Jason A. Donenfeld [this message]
2024-08-27 14:41 ` Xi Ruoyao
2024-08-27 14:50 ` Christophe Leroy
2024-08-27 15:00 ` Jason A. Donenfeld
2024-08-27 15:05 ` Xi Ruoyao
2024-08-27 15:10 ` Jason A. Donenfeld
2024-08-27 15:28 ` Xi Ruoyao
2024-08-27 15:29 ` Jason A. Donenfeld
2024-08-28 11:36 ` Jason A. Donenfeld
2024-08-28 12:00 ` Xi Ruoyao
2024-08-27 15:12 ` Christophe Leroy
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=Zs3fhiSlXg2aCGa8@zx2c4.com \
--to=jason@zx2c4.com \
--cc=arnd@arndb.de \
--cc=chenhuacai@kernel.org \
--cc=christophe.leroy2@cs-soprasteria.com \
--cc=hejinyang@loongson.cn \
--cc=kernel@xen0n.name \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=tglx@linutronix.de \
--cc=xry111@xry111.site \
--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