Align aarch64 with other arches, clear errno before calling ptrace syscall in the libc wrapper.
Details
I was unable to test this, after I installed freshly build world/kernel from HEAD into 11.0 RC2 vm disk, I got
>> FreeBSD EFI boot block Loader path: /boot/loader.efi Initializing modules: ZFS UFS Probing 5 block devices.......* done ZFS found no pools UFS found 1 partition Synchronous Exception at 0x294AD3FA2A0003EC
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Do you have any specific test, or would single stepping with lldb be enough?
lib/libc/aarch64/sys/ptrace.S | ||
---|---|---|
39โ42 | I think this could be rewritten as: stp x0, x1, [sp, #-48]! stp x2, x3, [sp, #16] stp x29, lr, [sp, #32] add x29, sp, #32 It will then comply with the ABI. | |
45โ48 | This would then be: ldp x29, lr, [sp, #32] ldp x2, x3, [sp, #16] ldp x0, x1, [sp], #48 |
Update according to the recommendations.
BTW, from my reading of the IHI 0055C_beta, it is allowed to skip frame construction for some functions:
It may require the frame pointer to address a valid frame record at all times, except that any subroutine may elect not to create a frame record
For testing, just running truss /bin/ls with the patched libc would give good enough coverage.
The main advantage with creating it is the debugger can then perform a backtrace through the function. I added this to the kernel exception frame for this purpose.
For testing, just running truss /bin/ls with the patched libc would give good enough coverage.
Ok, I'll test it when I get a chance to update one of the netperf Caviums.
That should also be fixed at some stage. There are also a few places within the rtld code that also create bad frames.