Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755862AbbBPSx3 (ORCPT ); Mon, 16 Feb 2015 13:53:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48491 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755512AbbBPSxZ (ORCPT ); Mon, 16 Feb 2015 13:53:25 -0500 From: Josh Poimboeuf To: Andrew Morton , Ingo Molnar , Peter Zijlstra Cc: Jiri Kosina , Seth Jennings , linux-kernel@vger.kernel.org Subject: [PATCH 0/3] prevent /proc//stack garbage for running tasks Date: Mon, 16 Feb 2015 12:52:33 -0600 Message-Id: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1138 Lines: 30 Reading /proc//stack for a running task (other than current) can print garbage because the saved stack pointer is no longer accurate and the stack itself can be inconsistent. Add new sched and stacktrace functions so that /proc//stack only walks the stack for sleeping tasks and the current task. The new sched_task_call() function will also be useful for future live patching code which will need to atomically examine a task's stack before patching it. Josh Poimboeuf (3): sched: add sched_task_call() stacktrace: add save_stack_trace_tsk_safe() proc: fix /proc//stack for running tasks fs/proc/base.c | 2 +- include/linux/sched.h | 4 ++++ include/linux/stacktrace.h | 2 ++ kernel/sched/core.c | 17 +++++++++++++++++ kernel/stacktrace.c | 22 ++++++++++++++++++++++ 5 files changed, 46 insertions(+), 1 deletion(-) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/