Re: [PATCH v2] um: Avoid longjmp/setjmp symbol clashes with libpthread.a
From: Thomas Meyer
Date: Thu Jun 01 2017 - 17:25:52 EST
Am Donnerstag, den 01.06.2017, 22:58 +0200 schrieb Richard Weinberger:
>
> Sorry, I thought you are CC'ed.
> Thomas please speak up. AFAIR UML fails to boot on one of your new
> Laptops.
Hi,
yes, the first userspace process failes here:
void userspace(struct uml_pt_regs *regs)
{
int err, status, op, pid = userspace_pid[0];
/* To prevent races if using_sysemu changes under us.*/
int local_using_sysemu;
siginfo_t si;
/* Handle any immediate reschedules or signals */
interrupt_end();
while (1) {
/*
* This can legitimately fail if the process loads a
* bogus value into a segment register. It will
* segfault and PTRACE_GETREGS will read that value
* out of the process. However, PTRACE_SETREGS will
* fail. In this case, there is nothing to do but
* just kill the process.
*/
if (ptrace(PTRACE_SETREGS, pid, 0, regs->gp))
fatal_sigsegv();
if (put_fp_registers(pid, regs->fp))
-> fatal_sigsegv();
the put_fp_registers fails with errno 4 if I recall correctly.
I didn't investigate yet further, why the the xstate ptrace call fails.
kind regards
thomas
> Thanks,
> //richard