From: Rob Gardner <rob.gardner@xxxxxxxxxx> Date: Tue, 22 Dec 2015 21:16:07 -0700 > There have been several reports of random processes being killed with > a bus error or segfault during userspace stack walking in perf. One > of the root causes of this problem is an asynchronous modification to > thread_info fault_address and fault_code, which stems from a perf > counter interrupt arriving during kernel processing of a "benign" > fault, such as a TSB miss. Since perf_callchain_user() invokes > copy_from_user() to read user stacks, a fault is not only possible, > but probable. Validity checks on the stack address merely cover up the > problem and reduce its frequency. > > The solution here is to save and restore fault_address and fault_code > in perf_callchain_user() so that the benign fault handler is not > disturbed by a perf interrupt. > > Signed-off-by: Rob Gardner <rob.gardner@xxxxxxxxxx> > Signed-off-by: Dave Aldridge <david.j.aldridge@xxxxxxxxxx> Applied. -- 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