Re: [PATCH v2] um: Avoid longjmp/setjmp symbol clashes with libpthread.a

From: Florian Fainelli
Date: Fri Jun 02 2017 - 01:49:10 EST




On 06/01/2017 02:25 PM, Thomas Meyer wrote:
> 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.

Which of the branches is put_fp_registers() taking? The
restore_fpx_registers() or restore_fp_registers()? 4 would be EINTR...
What kernel version is used on your host running the UML binary?

Thanks
--
Florian