[PATCH] nptl: Add <thread_pointer.h> for or1k

Michael Jeanson mjeanson@efficios.com
Mon Jan 6 18:26:48 GMT 2025


On 2024-12-24 15:20, Stafford Horne wrote: 
> I think this ended up being ok.
> 
> I have added the call to rseq_syscall and implemented self tests on my branch
> now.
> 
>  - https://github.com/stffrdhrn/linux/commits/or1k-rseq/
>  - commit 1fa73dd6c2d3 ("rseq/selftests: Add support for OpenRISC")
> 
> I haven't got the tests to complete fully yet though.  Do you have a recommended
> approach for building, testing and debugging them?  I am using my glibc
> toolchain, but I assume the original implementations didnt have glibc support
> available when they were testing.
> 
> My stack now:
> 
>   - QEMU virt
>   - Linux virt_defconfig (or1k-rseq branch)
>     - rseq selftests - built with gcc/glibc toolchain (or1k-rseq branch)
>   - rootfs - Buildroot with my glibc (or1k-rseq branch)
>     - gdb
>     - strace
> 
> In general I am using the latest git HEADs for qemu, gcc, binutils etc.
> 
> Once, everything is working on QEMU I will test again on the FPGA hardware.
> 
> Currently tests are failing with SIGSEGV:
> 
>     TAP version 13
>     1..10
>     # timeout set to 0
>     # selftests: rseq: basic_test
>     # testing current cpu
>     ok 1 selftests: rseq: basic_test
>     # timeout set to 0
>     # selftests: rseq: basic_percpu_ops_test
>     # spinlock
>     # ./kselftest/runner.sh: line 37:   772 Segmentation fault      /usr/bin/timeout  --foreground "$kselftest_timeout" /usr/bin/timeout "$kselftest_timeout" $1
>     not ok 2 selftests: rseq: basic_percpu_ops_test # exit=139
> 
> In gdb it looks to be happening in in an mprotect syscall in glibc and at that
> point the stack seems to be corrupt already.  So its taking me a bit of time to
> untangle.
> 
> -Stafford

Hi,

Sorry for the late reply, I was away for the holidays. From your other message I
think you managed to get through this. Is there anything I can still help you
with?

Michael


More information about the Libc-alpha mailing list