linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/powerpc: Fix load_unaligned_zeropad build failure
@ 2024-03-05 12:56 Michael Ellerman
  2024-03-05 18:30 ` Kees Cook
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Ellerman @ 2024-03-05 12:56 UTC (permalink / raw)
  To: keescook; +Cc: andy.shevchenko, linuxppc-dev, sachinp, tanzirh

This test is userspace code, but uses some kernel headers via symlinks,
and mocks other headers, in order to test load_unaligned_zeropad().

Currently the test fails to build with:

  In file included from load_unaligned_zeropad.c:26:
  word-at-a-time.h:7:10: fatal error: linux/bitops.h: No such file or directory
      7 | #include <linux/bitops.h>

This is due to the recent changes to the kernel headers.

Fix it by symlinking the new wordpart.h, and creating an empty stub for
bitops.h which is all that's needed.

Reported-by: Sachin Sant <sachinp@linux.ibm.com>
Tested-by: Sachin Sant <sachinp@linux.ibm.com>
Fixes: 66a5c40f60f5 ("kernel.h: removed REPEAT_BYTE from kernel.h")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 tools/testing/selftests/powerpc/primitives/linux/bitops.h   | 0
 tools/testing/selftests/powerpc/primitives/linux/wordpart.h | 1 +
 2 files changed, 1 insertion(+)
 create mode 100644 tools/testing/selftests/powerpc/primitives/linux/bitops.h
 create mode 120000 tools/testing/selftests/powerpc/primitives/linux/wordpart.h

Kees, do you mind taking this one via your tree because that's where the commit
that changes the headers is?

diff --git a/tools/testing/selftests/powerpc/primitives/linux/bitops.h b/tools/testing/selftests/powerpc/primitives/linux/bitops.h
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/tools/testing/selftests/powerpc/primitives/linux/wordpart.h b/tools/testing/selftests/powerpc/primitives/linux/wordpart.h
new file mode 120000
index 000000000000..4a74d2cbbc9b
--- /dev/null
+++ b/tools/testing/selftests/powerpc/primitives/linux/wordpart.h
@@ -0,0 +1 @@
+../../../../../../include/linux/wordpart.h
\ No newline at end of file
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] selftests/powerpc: Fix load_unaligned_zeropad build failure
  2024-03-05 12:56 [PATCH] selftests/powerpc: Fix load_unaligned_zeropad build failure Michael Ellerman
@ 2024-03-05 18:30 ` Kees Cook
  2024-03-06  3:23   ` Michael Ellerman
  0 siblings, 1 reply; 3+ messages in thread
From: Kees Cook @ 2024-03-05 18:30 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Tanzir Hasan, andy.shevchenko, linuxppc-dev, Kees Cook, sachinp

On Tue, 05 Mar 2024 23:56:44 +1100, Michael Ellerman wrote:
> This test is userspace code, but uses some kernel headers via symlinks,
> and mocks other headers, in order to test load_unaligned_zeropad().
> 
> Currently the test fails to build with:
> 
>   In file included from load_unaligned_zeropad.c:26:
>   word-at-a-time.h:7:10: fatal error: linux/bitops.h: No such file or directory
>       7 | #include <linux/bitops.h>
> 
> [...]

Applied to for-next/hardening, thanks!

[1/1] selftests/powerpc: Fix load_unaligned_zeropad build failure
      https://git.kernel.org/kees/c/3fe1eb4dd2e4

Take care,

-- 
Kees Cook


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] selftests/powerpc: Fix load_unaligned_zeropad build failure
  2024-03-05 18:30 ` Kees Cook
@ 2024-03-06  3:23   ` Michael Ellerman
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2024-03-06  3:23 UTC (permalink / raw)
  To: Kees Cook; +Cc: Tanzir Hasan, andy.shevchenko, linuxppc-dev, Kees Cook, sachinp

Kees Cook <keescook@chromium.org> writes:
> On Tue, 05 Mar 2024 23:56:44 +1100, Michael Ellerman wrote:
>> This test is userspace code, but uses some kernel headers via symlinks,
>> and mocks other headers, in order to test load_unaligned_zeropad().
>> 
>> Currently the test fails to build with:
>> 
>>   In file included from load_unaligned_zeropad.c:26:
>>   word-at-a-time.h:7:10: fatal error: linux/bitops.h: No such file or directory
>>       7 | #include <linux/bitops.h>
>> 
>> [...]
>
> Applied to for-next/hardening, thanks!
>
> [1/1] selftests/powerpc: Fix load_unaligned_zeropad build failure
>       https://git.kernel.org/kees/c/3fe1eb4dd2e4
>
> Take care,

Thanks.

cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-06  3:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-05 12:56 [PATCH] selftests/powerpc: Fix load_unaligned_zeropad build failure Michael Ellerman
2024-03-05 18:30 ` Kees Cook
2024-03-06  3:23   ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).