Port-sparc64 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Set PSTATE.PRIV for user process
On Fri, 23 Oct 2026 13:03:28 +0100
Sad Clouds <cryintothebluesky%gmail.com@localhost> wrote:
> Something is really whacky going on here. It feels like during
> save/restore another trap occurs (text or data fault?), causing partial
> register save/restore and messing up their values.
>
Another interesting thing I notice is the alignment of window registers
save area on the stack. If I examine the locations in the core dump:
(gdb) x/16xg $sp + 2047
0xffffffffffffbfd0: 0x0000000066666665 l0
0xffffffffffffbfd8: 0x0000000066666663 l1
0xffffffffffffbfe0: 0x0000000040828eb0 l2
0xffffffffffffbfe8: 0x0000000066666662 l3
0xffffffffffffbff0: 0x0000000000000000 l4
0xffffffffffffbff8: 0x6666666666666663 l5
0xffffffffffffc000: 0x5555555555555556 l6 <-- starts on 8 KiB page boundary
0xffffffffffffc008: 0x5555555555555557 l7
0xffffffffffffc010: 0x0000000040a17e80 i0
0xffffffffffffc018: 0x0000000000001400 i1
0xffffffffffffc020: 0x6666666666666662 i2
0xffffffffffffc028: 0x6666666666666663 i3
0xffffffffffffc030: 0x6666666666666664 i4
0xffffffffffffc038: 0xffffffffffffb911 i5
0xffffffffffffc040: 0x6666666666666666 i6
0xffffffffffffc048: 0x6666666666666667 i7
NetBSD sparc64 uses 8 KiB pages. Register %l6 address starts on 8 KiB
page boundary.
Registers %l0-%l5 on one page are saved and restored with correct
values, but registers %l6-%l7 and %i0-%i7 on the next pages are not
saved correctly to those memory addresses.
Could be a coincidence or a smoking gun.
Home |
Main Index |
Thread Index |
Old Index