* [PATCH] selftests: vDSO: don't include generated headers for chacha test @ 2024-09-04 15:58 Jason A. Donenfeld 2024-09-04 16:19 ` Adhemerval Zanella Netto 2024-09-10 22:52 ` Aishwarya TCV 0 siblings, 2 replies; 11+ messages in thread From: Jason A. Donenfeld @ 2024-09-04 15:58 UTC (permalink / raw) To: adhemerval.zanella, linux-kernel; +Cc: Jason A. Donenfeld It's not correct to use $(top_srcdir) for generated header files, for builds that are done out of tree via O=, and $(objtree) isn't valid in the selftests context. Instead, just obviate the need for these generated header files by defining empty stubs in tools/include/asm, which is the same thing that's done for rwlock.h. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> --- tools/include/asm/asm-offsets.h | 0 tools/include/asm/cpucap-defs.h | 0 tools/include/asm/sysreg-defs.h | 0 tools/testing/selftests/vDSO/Makefile | 1 - 4 files changed, 1 deletion(-) create mode 100644 tools/include/asm/asm-offsets.h create mode 100644 tools/include/asm/cpucap-defs.h create mode 100644 tools/include/asm/sysreg-defs.h diff --git a/tools/include/asm/asm-offsets.h b/tools/include/asm/asm-offsets.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tools/include/asm/cpucap-defs.h b/tools/include/asm/cpucap-defs.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tools/include/asm/sysreg-defs.h b/tools/include/asm/sysreg-defs.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile index 3c6fafbd83a6..55038a65fa61 100644 --- a/tools/testing/selftests/vDSO/Makefile +++ b/tools/testing/selftests/vDSO/Makefile @@ -40,6 +40,5 @@ $(OUTPUT)/vdso_test_getrandom: CFLAGS += -isystem $(top_srcdir)/tools/include \ $(OUTPUT)/vdso_test_chacha: $(top_srcdir)/tools/arch/$(SRCARCH)/vdso/vgetrandom-chacha.S $(OUTPUT)/vdso_test_chacha: CFLAGS += -idirafter $(top_srcdir)/tools/include \ -idirafter $(top_srcdir)/arch/$(SRCARCH)/include \ - -idirafter $(top_srcdir)/arch/$(SRCARCH)/include/generated \ -idirafter $(top_srcdir)/include \ -D__ASSEMBLY__ -Wa,--noexecstack -- 2.46.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] selftests: vDSO: don't include generated headers for chacha test 2024-09-04 15:58 [PATCH] selftests: vDSO: don't include generated headers for chacha test Jason A. Donenfeld @ 2024-09-04 16:19 ` Adhemerval Zanella Netto 2024-09-10 22:52 ` Aishwarya TCV 1 sibling, 0 replies; 11+ messages in thread From: Adhemerval Zanella Netto @ 2024-09-04 16:19 UTC (permalink / raw) To: Jason A. Donenfeld, linux-kernel On 04/09/24 12:58, Jason A. Donenfeld wrote: > It's not correct to use $(top_srcdir) for generated header files, for > builds that are done out of tree via O=, and $(objtree) isn't valid in > the selftests context. Instead, just obviate the need for these > generated header files by defining empty stubs in tools/include/asm, > which is the same thing that's done for rwlock.h. > > Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Works for me, thanks. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> > --- > tools/include/asm/asm-offsets.h | 0 > tools/include/asm/cpucap-defs.h | 0 > tools/include/asm/sysreg-defs.h | 0 > tools/testing/selftests/vDSO/Makefile | 1 - > 4 files changed, 1 deletion(-) > create mode 100644 tools/include/asm/asm-offsets.h > create mode 100644 tools/include/asm/cpucap-defs.h > create mode 100644 tools/include/asm/sysreg-defs.h > > diff --git a/tools/include/asm/asm-offsets.h b/tools/include/asm/asm-offsets.h > new file mode 100644 > index 000000000000..e69de29bb2d1 > diff --git a/tools/include/asm/cpucap-defs.h b/tools/include/asm/cpucap-defs.h > new file mode 100644 > index 000000000000..e69de29bb2d1 > diff --git a/tools/include/asm/sysreg-defs.h b/tools/include/asm/sysreg-defs.h > new file mode 100644 > index 000000000000..e69de29bb2d1 > diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile > index 3c6fafbd83a6..55038a65fa61 100644 > --- a/tools/testing/selftests/vDSO/Makefile > +++ b/tools/testing/selftests/vDSO/Makefile > @@ -40,6 +40,5 @@ $(OUTPUT)/vdso_test_getrandom: CFLAGS += -isystem $(top_srcdir)/tools/include \ > $(OUTPUT)/vdso_test_chacha: $(top_srcdir)/tools/arch/$(SRCARCH)/vdso/vgetrandom-chacha.S > $(OUTPUT)/vdso_test_chacha: CFLAGS += -idirafter $(top_srcdir)/tools/include \ > -idirafter $(top_srcdir)/arch/$(SRCARCH)/include \ > - -idirafter $(top_srcdir)/arch/$(SRCARCH)/include/generated \ > -idirafter $(top_srcdir)/include \ > -D__ASSEMBLY__ -Wa,--noexecstack ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] selftests: vDSO: don't include generated headers for chacha test 2024-09-04 15:58 [PATCH] selftests: vDSO: don't include generated headers for chacha test Jason A. Donenfeld 2024-09-04 16:19 ` Adhemerval Zanella Netto @ 2024-09-10 22:52 ` Aishwarya TCV 2024-09-11 2:44 ` Jason A. Donenfeld 1 sibling, 1 reply; 11+ messages in thread From: Aishwarya TCV @ 2024-09-10 22:52 UTC (permalink / raw) To: Jason A. Donenfeld Cc: adhemerval.zanella, linux-kernel, mark Brown, Naresh Kamboju On 04/09/2024 16:58, Jason A. Donenfeld wrote: > It's not correct to use $(top_srcdir) for generated header files, for > builds that are done out of tree via O=, and $(objtree) isn't valid in > the selftests context. Instead, just obviate the need for these > generated header files by defining empty stubs in tools/include/asm, > which is the same thing that's done for rwlock.h. > > Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Hi Jason, Currently when building kselftest against next-master with arm64 arch and defconfig+kselftest-kvm, few errors due to undeclared variables are observed in our CI. Hence unable to build and run kselftest-kvm tests. I ran a bisect that pointed at this patch. I have attached the bisect log and full log from failure below. Failure log: ----------- https://storage.kernelci.org/next/master/next-20240906/arm64/defconfig+kselftest/gcc-12/logs/kselftest.log In file included from /tmp/kci/linux/build/usr/include/linux/kvm.h:15, from include/kvm_util.h:14, from aarch64/aarch32_id_regs.c:13: aarch64/aarch32_id_regs.c:70:27: error: ‘SYS_ID_PFR0_EL1’ undeclared here (not in a function); did you mean ‘SYS_ICC_AP1R0_EL1’? 70 | KVM_ARM64_SYS_REG(SYS_ID_PFR0_EL1), | ^~~~~~~~~~~~~~~ . . aarch64/aarch32_id_regs.c:149:44: error: ‘ID_AA64PFR0_EL1_EL0_MASK’ undeclared (first use in this function) 149 | el0 = FIELD_GET(ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_EL0), val); | ^~~~~~~~~~~~~~~~~~~ /tmp/kci/linux/tools/testing/selftests/../../../tools/include/linux/compiler.h:17:23: note: in definition of macro ‘__compiletime_assert’ 17 | if (!(condition)) \ | ^~~~~~~~~ /tmp/kci/linux/tools/testing/selftests/../../../tools/include/linux/compiler.h:37:9: note: in expansion of macro ‘_compiletime_assert’ 37 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ /tmp/kci/linux/tools/testing/selftests/../../../tools/include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’ 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ /tmp/kci/linux/tools/testing/selftests/../../../tools/include/linux/bitfield.h:62:17: note: in expansion of macro ‘BUILD_BUG_ON_MSG’ 62 | BUILD_BUG_ON_MSG(!__builtin_constant_p(_mask), \ | ^~~~~~~~~~~~~~~~ /tmp/kci/linux/tools/testing/selftests/../../../tools/include/linux/bitfield.h:125:17: note: in expansion of macro ‘__BF_FIELD_CHECK’ 125 | __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \ | ^~~~~~~~~~~~~~~~ aarch64/aarch32_id_regs.c:149:15: note: in expansion of macro ‘FIELD_GET’ 149 | el0 = FIELD_GET(ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_EL0), val); | ^~~~~~~~~ aarch64/aarch32_id_regs.c:149:25: note: in expansion of macro ‘ARM64_FEATURE_MASK’ 149 | el0 = FIELD_GET(ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_EL0), val); | ^~~~~~~~~~~~~~~~~~ At top level: cc1: note: unrecognized command-line option ‘-Wno-gnu-variable-sized-type-not-at-end’ may have been intended to silence earlier diagnostics make[4]: *** [Makefile:299: /tmp/kci/linux/build/kselftest/kvm/aarch64/aarch32_id_regs.o] Error 1 make[4]: Leaving directory '/tmp/kci/linux/tools/testing/selftests/kvm' Bisect log: ----------- git bisect start # good: [da3ea35007d0af457a0afc87e84fddaebc4e0b63] Linux 6.11-rc7 git bisect good da3ea35007d0af457a0afc87e84fddaebc4e0b63 # bad: [6708132e80a2ced620bde9b9c36e426183544a23] Add linux-next specific files for 20240910 git bisect bad 6708132e80a2ced620bde9b9c36e426183544a23 # good: [b66d58fce82c825b3dbb57a46b9a74f081ef7ec7] Merge branch 'main' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git git bisect good b66d58fce82c825b3dbb57a46b9a74f081ef7ec7 # good: [a636a90415dbc59f005369e3053996f859f0af50] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux git bisect good a636a90415dbc59f005369e3053996f859f0af50 # good: [8e5ac35ddecbeddce79e915c226baaf577a2be6e] Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git git bisect good 8e5ac35ddecbeddce79e915c226baaf577a2be6e # good: [e9643b5e3a2f5f0607d3b71bebe22cc6d29b534c] Merge branch 'counter-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter.git git bisect good e9643b5e3a2f5f0607d3b71bebe22cc6d29b534c # good: [150b9788d677f54650e1aceffde0eead5986baab] Merge branch 'pwm/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git git bisect good 150b9788d677f54650e1aceffde0eead5986baab # good: [b4c533038255b85a068b622f888e0a9e8096a199] Merge branch 'slab/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git git bisect good b4c533038255b85a068b622f888e0a9e8096a199 # bad: [b9a71f4a0f68d11be247fd7ff82d7a72e3503181] Merge branch 'rust-next' of https://github.com/Rust-for-Linux/linux.git git bisect bad b9a71f4a0f68d11be247fd7ff82d7a72e3503181 # good: [aeb0e24abbebebff3b5ac65486c933d0ecd5cf81] kbuild: rust: replace proc macros dependency on `core.o` with the version text git bisect good aeb0e24abbebebff3b5ac65486c933d0ecd5cf81 # good: [b75eb4403eefde26f8f71a66dcc609a091fa40e6] random: vDSO: minimize and simplify header includes git bisect good b75eb4403eefde26f8f71a66dcc609a091fa40e6 # bad: [5bc8fca346995ada9a379369492620f5d1991a08] powerpc/vdso32: Add crtsavres git bisect bad 5bc8fca346995ada9a379369492620f5d1991a08 # good: [c2066b95688ab8d1c296d44e325f54630688e6a7] selftests: vDSO: also test counter in vdso_test_chacha git bisect good c2066b95688ab8d1c296d44e325f54630688e6a7 # bad: [a727d213f81c9ffba79e161f59e120c92b9ddb1b] selftests: vDSO: don't include generated headers for chacha test git bisect bad a727d213f81c9ffba79e161f59e120c92b9ddb1b # good: [67e5214e51e767d4e04d9eb5754d320c918c5ed8] arm64: vDSO: Wire up getrandom() vDSO implementation git bisect good 67e5214e51e767d4e04d9eb5754d320c918c5ed8 # first bad commit: [a727d213f81c9ffba79e161f59e120c92b9ddb1b] selftests: vDSO: don't include generated headers for chacha test Thanks, Aishwarya ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] selftests: vDSO: don't include generated headers for chacha test 2024-09-10 22:52 ` Aishwarya TCV @ 2024-09-11 2:44 ` Jason A. Donenfeld 2024-09-11 10:14 ` Mark Brown 0 siblings, 1 reply; 11+ messages in thread From: Jason A. Donenfeld @ 2024-09-11 2:44 UTC (permalink / raw) To: Aishwarya TCV Cc: adhemerval.zanella, linux-kernel, mark Brown, Naresh Kamboju On Tue, Sep 10, 2024 at 11:52:51PM +0100, Aishwarya TCV wrote: > make[4]: *** [Makefile:299: > /tmp/kci/linux/build/kselftest/kvm/aarch64/aarch32_id_regs.o] Error 1 > make[4]: Leaving directory '/tmp/kci/linux/tools/testing/selftests/kvm' You sure this bisected right? That directory isn't related to the commit in question, I don't think... Jason ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] selftests: vDSO: don't include generated headers for chacha test 2024-09-11 2:44 ` Jason A. Donenfeld @ 2024-09-11 10:14 ` Mark Brown 2024-09-11 12:47 ` Jason A. Donenfeld 0 siblings, 1 reply; 11+ messages in thread From: Mark Brown @ 2024-09-11 10:14 UTC (permalink / raw) To: Jason A. Donenfeld Cc: Aishwarya TCV, adhemerval.zanella, linux-kernel, Naresh Kamboju [-- Attachment #1: Type: text/plain, Size: 637 bytes --] On Wed, Sep 11, 2024 at 04:44:48AM +0200, Jason A. Donenfeld wrote: > On Tue, Sep 10, 2024 at 11:52:51PM +0100, Aishwarya TCV wrote: > > make[4]: *** [Makefile:299: > > /tmp/kci/linux/build/kselftest/kvm/aarch64/aarch32_id_regs.o] Error 1 > > make[4]: Leaving directory '/tmp/kci/linux/tools/testing/selftests/kvm' > You sure this bisected right? That directory isn't related to the > commit in question, I don't think... I eyeballed it for Aishwarya and it looked related on first glance (messing around with the generated headers), though looking again it's only in the vDSO directory so shouldn't be messing up other directories... [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] selftests: vDSO: don't include generated headers for chacha test 2024-09-11 10:14 ` Mark Brown @ 2024-09-11 12:47 ` Jason A. Donenfeld 2024-09-11 13:01 ` Jason A. Donenfeld 0 siblings, 1 reply; 11+ messages in thread From: Jason A. Donenfeld @ 2024-09-11 12:47 UTC (permalink / raw) To: Mark Brown Cc: Aishwarya TCV, adhemerval.zanella, linux-kernel, Naresh Kamboju On Wed, Sep 11, 2024 at 11:14:06AM +0100, Mark Brown wrote: > On Wed, Sep 11, 2024 at 04:44:48AM +0200, Jason A. Donenfeld wrote: > > On Tue, Sep 10, 2024 at 11:52:51PM +0100, Aishwarya TCV wrote: > > > make[4]: *** [Makefile:299: > > > /tmp/kci/linux/build/kselftest/kvm/aarch64/aarch32_id_regs.o] Error 1 > > > make[4]: Leaving directory '/tmp/kci/linux/tools/testing/selftests/kvm' > > > You sure this bisected right? That directory isn't related to the > > commit in question, I don't think... > > I eyeballed it for Aishwarya and it looked related on first glance > (messing around with the generated headers), though looking again it's > only in the vDSO directory so shouldn't be messing up other > directories... Okay, so... I reproduced the problem on linux-next. Then I reverted the commit and reproduced it again. Then just to be sure, I ran: $ git checkout v6.9 tools/testing/selftests/vDSO/ And then I reproduced the problem again. So I think we can be somewhat certain the unrelated directory is indeed unrelated. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] selftests: vDSO: don't include generated headers for chacha test 2024-09-11 12:47 ` Jason A. Donenfeld @ 2024-09-11 13:01 ` Jason A. Donenfeld 2024-09-11 13:33 ` Jason A. Donenfeld 0 siblings, 1 reply; 11+ messages in thread From: Jason A. Donenfeld @ 2024-09-11 13:01 UTC (permalink / raw) To: Mark Brown Cc: Aishwarya TCV, adhemerval.zanella, linux-kernel, Naresh Kamboju On Wed, Sep 11, 2024 at 02:47:02PM +0200, Jason A. Donenfeld wrote: > On Wed, Sep 11, 2024 at 11:14:06AM +0100, Mark Brown wrote: > > On Wed, Sep 11, 2024 at 04:44:48AM +0200, Jason A. Donenfeld wrote: > > > On Tue, Sep 10, 2024 at 11:52:51PM +0100, Aishwarya TCV wrote: > > > > make[4]: *** [Makefile:299: > > > > /tmp/kci/linux/build/kselftest/kvm/aarch64/aarch32_id_regs.o] Error 1 > > > > make[4]: Leaving directory '/tmp/kci/linux/tools/testing/selftests/kvm' > > > > > You sure this bisected right? That directory isn't related to the > > > commit in question, I don't think... > > > > I eyeballed it for Aishwarya and it looked related on first glance > > (messing around with the generated headers), though looking again it's > > only in the vDSO directory so shouldn't be messing up other > > directories... > > Okay, so... I reproduced the problem on linux-next. Then I reverted the > commit and reproduced it again. Then just to be sure, I ran: > > $ git checkout v6.9 tools/testing/selftests/vDSO/ > > And then I reproduced the problem again. > > So I think we can be somewhat certain the unrelated directory is indeed > unrelated. Ahhh, got it. Running `$ rm tools/include/asm/sysreg-defs.h` fixes the problem. I'll look into a fix this afternoon. Jason ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] selftests: vDSO: don't include generated headers for chacha test 2024-09-11 13:01 ` Jason A. Donenfeld @ 2024-09-11 13:33 ` Jason A. Donenfeld 2024-09-11 13:36 ` [PATCH v2] " Jason A. Donenfeld 0 siblings, 1 reply; 11+ messages in thread From: Jason A. Donenfeld @ 2024-09-11 13:33 UTC (permalink / raw) To: Mark Brown Cc: Aishwarya TCV, adhemerval.zanella, linux-kernel, Naresh Kamboju On Wed, Sep 11, 2024 at 03:01:26PM +0200, Jason A. Donenfeld wrote: > On Wed, Sep 11, 2024 at 02:47:02PM +0200, Jason A. Donenfeld wrote: > > On Wed, Sep 11, 2024 at 11:14:06AM +0100, Mark Brown wrote: > > > On Wed, Sep 11, 2024 at 04:44:48AM +0200, Jason A. Donenfeld wrote: > > > > On Tue, Sep 10, 2024 at 11:52:51PM +0100, Aishwarya TCV wrote: > > > > > make[4]: *** [Makefile:299: > > > > > /tmp/kci/linux/build/kselftest/kvm/aarch64/aarch32_id_regs.o] Error 1 > > > > > make[4]: Leaving directory '/tmp/kci/linux/tools/testing/selftests/kvm' > > > > > > > You sure this bisected right? That directory isn't related to the > > > > commit in question, I don't think... > > > > > > I eyeballed it for Aishwarya and it looked related on first glance > > > (messing around with the generated headers), though looking again it's > > > only in the vDSO directory so shouldn't be messing up other > > > directories... > > > > Okay, so... I reproduced the problem on linux-next. Then I reverted the > > commit and reproduced it again. Then just to be sure, I ran: > > > > $ git checkout v6.9 tools/testing/selftests/vDSO/ > > > > And then I reproduced the problem again. > > > > So I think we can be somewhat certain the unrelated directory is indeed > > unrelated. > > Ahhh, got it. > > Running `$ rm tools/include/asm/sysreg-defs.h` fixes the problem. I'll > look into a fix this afternoon. I'll fix it up as follows: diff --git a/tools/include/asm/asm-offsets.h b/tools/include/generated/asm-offsets.h similarity index 100% rename from tools/include/asm/asm-offsets.h rename to tools/include/generated/asm-offsets.h diff --git a/tools/include/asm/cpucap-defs.h b/tools/include/generated/asm/cpucap-defs.h similarity index 100% rename from tools/include/asm/cpucap-defs.h rename to tools/include/generated/asm/cpucap-defs.h diff --git a/tools/include/asm/sysreg-defs.h b/tools/include/generated/asm/sysreg-defs.h similarity index 100% rename from tools/include/asm/sysreg-defs.h rename to tools/include/generated/asm/sysreg-defs.h diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile index 5bd30d745d42..86ebc4115eda 100644 --- a/tools/testing/selftests/vDSO/Makefile +++ b/tools/testing/selftests/vDSO/Makefile @@ -39,6 +39,7 @@ $(OUTPUT)/vdso_test_getrandom: CFLAGS += -isystem $(top_srcdir)/tools/include \ $(OUTPUT)/vdso_test_chacha: $(top_srcdir)/tools/arch/$(SRCARCH)/vdso/vgetrandom-chacha.S $(OUTPUT)/vdso_test_chacha: CFLAGS += -idirafter $(top_srcdir)/tools/include \ + -idirafter $(top_srcdir)/tools/include/generated \ -idirafter $(top_srcdir)/arch/$(SRCARCH)/include \ -idirafter $(top_srcdir)/include \ -D__ASSEMBLY__ -Wa,--noexecstack ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v2] selftests: vDSO: don't include generated headers for chacha test 2024-09-11 13:33 ` Jason A. Donenfeld @ 2024-09-11 13:36 ` Jason A. Donenfeld 2024-09-11 14:12 ` Mark Brown 0 siblings, 1 reply; 11+ messages in thread From: Jason A. Donenfeld @ 2024-09-11 13:36 UTC (permalink / raw) To: Aishwarya TCV, adhemerval.zanella, linux-kernel, Naresh Kamboju, Mark Brown Cc: Jason A. Donenfeld It's not correct to use $(top_srcdir) for generated header files, for builds that are done out of tree via O=, and $(objtree) isn't valid in the selftests context. Instead, just obviate the need for these generated header files by defining empty stubs in tools/include, which is the same thing that's done for rwlock.h. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> --- I'll replace the broken commit with this one. I've verified the kselftests are fine now, particularly for kvm. tools/include/generated/asm-offsets.h | 0 tools/include/generated/asm/cpucap-defs.h | 0 tools/include/generated/asm/sysreg-defs.h | 0 tools/testing/selftests/vDSO/Makefile | 2 +- 4 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 tools/include/generated/asm-offsets.h create mode 100644 tools/include/generated/asm/cpucap-defs.h create mode 100644 tools/include/generated/asm/sysreg-defs.h diff --git a/tools/include/generated/asm-offsets.h b/tools/include/generated/asm-offsets.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tools/include/generated/asm/cpucap-defs.h b/tools/include/generated/asm/cpucap-defs.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tools/include/generated/asm/sysreg-defs.h b/tools/include/generated/asm/sysreg-defs.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile index 3c6fafbd83a6..610056acc1b7 100644 --- a/tools/testing/selftests/vDSO/Makefile +++ b/tools/testing/selftests/vDSO/Makefile @@ -39,7 +39,7 @@ $(OUTPUT)/vdso_test_getrandom: CFLAGS += -isystem $(top_srcdir)/tools/include \ $(OUTPUT)/vdso_test_chacha: $(top_srcdir)/tools/arch/$(SRCARCH)/vdso/vgetrandom-chacha.S $(OUTPUT)/vdso_test_chacha: CFLAGS += -idirafter $(top_srcdir)/tools/include \ + -idirafter $(top_srcdir)/tools/include/generated \ -idirafter $(top_srcdir)/arch/$(SRCARCH)/include \ - -idirafter $(top_srcdir)/arch/$(SRCARCH)/include/generated \ -idirafter $(top_srcdir)/include \ -D__ASSEMBLY__ -Wa,--noexecstack -- 2.46.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2] selftests: vDSO: don't include generated headers for chacha test 2024-09-11 13:36 ` [PATCH v2] " Jason A. Donenfeld @ 2024-09-11 14:12 ` Mark Brown 2024-09-11 14:40 ` Jason A. Donenfeld 0 siblings, 1 reply; 11+ messages in thread From: Mark Brown @ 2024-09-11 14:12 UTC (permalink / raw) To: Jason A. Donenfeld Cc: Aishwarya TCV, adhemerval.zanella, linux-kernel, Naresh Kamboju [-- Attachment #1: Type: text/plain, Size: 846 bytes --] On Wed, Sep 11, 2024 at 03:36:32PM +0200, Jason A. Donenfeld wrote: > It's not correct to use $(top_srcdir) for generated header files, for > builds that are done out of tree via O=, and $(objtree) isn't valid in > the selftests context. Instead, just obviate the need for these > generated header files by defining empty stubs in tools/include, which > is the same thing that's done for rwlock.h. ... > I'll replace the broken commit with this one. I've verified the > kselftests are fine now, particularly for kvm. Did you also check perf? For arm64 it uses the sysregs values though I don't off hand know if that includes any of the generated values. I would expect that KVM will start breaking for arm64 at some point even if it works for now, there was a desire to replace use of magic numbers for registers in the tests with defines. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2] selftests: vDSO: don't include generated headers for chacha test 2024-09-11 14:12 ` Mark Brown @ 2024-09-11 14:40 ` Jason A. Donenfeld 0 siblings, 0 replies; 11+ messages in thread From: Jason A. Donenfeld @ 2024-09-11 14:40 UTC (permalink / raw) To: Mark Brown Cc: Aishwarya TCV, adhemerval.zanella, linux-kernel, Naresh Kamboju On Wed, Sep 11, 2024 at 03:12:35PM +0100, Mark Brown wrote: > On Wed, Sep 11, 2024 at 03:36:32PM +0200, Jason A. Donenfeld wrote: > > > It's not correct to use $(top_srcdir) for generated header files, for > > builds that are done out of tree via O=, and $(objtree) isn't valid in > > the selftests context. Instead, just obviate the need for these > > generated header files by defining empty stubs in tools/include, which > > is the same thing that's done for rwlock.h. > > ... > > > I'll replace the broken commit with this one. I've verified the > > kselftests are fine now, particularly for kvm. > > Did you also check perf? For arm64 it uses the sysregs values though I > don't off hand know if that includes any of the generated values. I > would expect that KVM will start breaking for arm64 at some point even > if it works for now, there was a desire to replace use of magic numbers > for registers in the tests with defines. I just booted an arm64 VM and built perf with all the various options and such, and it works fine. Those header files in the fixup commit aren't seen by perf. Jason ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-09-11 14:40 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-09-04 15:58 [PATCH] selftests: vDSO: don't include generated headers for chacha test Jason A. Donenfeld 2024-09-04 16:19 ` Adhemerval Zanella Netto 2024-09-10 22:52 ` Aishwarya TCV 2024-09-11 2:44 ` Jason A. Donenfeld 2024-09-11 10:14 ` Mark Brown 2024-09-11 12:47 ` Jason A. Donenfeld 2024-09-11 13:01 ` Jason A. Donenfeld 2024-09-11 13:33 ` Jason A. Donenfeld 2024-09-11 13:36 ` [PATCH v2] " Jason A. Donenfeld 2024-09-11 14:12 ` Mark Brown 2024-09-11 14:40 ` Jason A. Donenfeld
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox