On 15 Jul 2018, at 19:50, Ben Hutchings <[email protected]> wrote: > > Control: tag -1 moreinfo > > On Mon, 1 Jan 2018 22:59:59 +0000 James Clarke <[email protected]> wrote: > [...] >> Please consider applying the patch forwarded upstream (linked in an >> earlier control message) soon; this bug means that if the current >> initramfs is updated, it will no longer boot, as run-init will segfault >> in klibc. Given sparc64 is not a release architecture I can't make this >> bug RC, otherwise I'd probably go for critical. >> >> (To be clear, the issue is in 2.0.4-10 simply because that is the first >> upload to happen since sparc64 has had PIE enabled by default in GCC) > > How exactly did you test this patch? It looks like it will cause > pipe() to crash on success. You put the first instruction of the PIC > prologue into a branch delay slot, which overwrites the register > holding the pointer used to store the system call return values.
I guess nothing I ran used pipe... but you're right, I was trying to be clever with the branch delay slots (taking into account that some them already clobbered %g4 for a position-dependent errno address calculation) and hadn't noticed that pipe was using %g4 as a "caller"-saved register (it's clobbered by userspace calls...). I shall put the nops back in and somehow give it a proper test. James

