Re: [PATCH 0/4] sparc64: perf fixes for userspace stacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: David Ahern <david.ahern@xxxxxxxxxx>
Date: Mon, 15 Jun 2015 16:15:42 -0400

> Hi Dave:
> 
> Coming back to the perf userspace callchain problem. As a reminder there are
> a series of problems trying to use perf to collect callchains with scheduling
> tracepoints, e.g., perf sched record -g -- <cmd>.
> 
> The first patch disables pagefaults while walking the user stack. As discussed
> a couple of months ago this is the right fix, but I was puzzled as to why
> processes were terminating with sigbus (and sometimes sigsegv). I believe the
> root of this problem is bad addresses trying to walk the frames using frame
> pointers. The bad addresses lead to faults that get handled by do_sparc64_fault
> and it aborts the task though I am still puzzled as to why it gets past this
> check in do_sparc64_fault:
> 
>         if (in_atomic() || !mm)
>                 goto intr_or_no_mm;
> 
> pagefault_disable bumps the preempt_count which should make in_atomic return != 0
> (building kernels with preemption set to voluntar, CONFIG_PREEMPT_VOLUNTARY=y).
> 
> While this set does not fully solve the problem it does prevent a number of
> pain points with the current code, most notably able to lock up the system.

Series applied, thanks David.

We can be more strict with the stack alignment check, the window
save/restore won't work on anything not at least 8 byte aligned and
this is strictly defined in the ABIs.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux