Patchwork [3.5.y.z,extended,stable] Patch "x86-32: Export kernel_stack_pointer() for modules" has been added to staging queue

mail settings
Submitter Herton Ronaldo Krzesinski
Date Dec. 10, 2012, 2:19 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/204911/
State New
Headers show


Herton Ronaldo Krzesinski - Dec. 10, 2012, 2:19 p.m.
This is a note to let you know that I have just added a patch titled

    x86-32: Export kernel_stack_pointer() for modules

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From 9056c515a1781d9cf09230b97a07a8ce80ad8f29 Mon Sep 17 00:00:00 2001
From: "H. Peter Anvin" <>
Date: Tue, 20 Nov 2012 22:21:02 -0800
Subject: [PATCH] x86-32: Export kernel_stack_pointer() for modules

commit cb57a2b4cff7edf2a4e32c0163200e9434807e0a upstream.

Modules, in particular oprofile (and possibly other similar tools)
need kernel_stack_pointer(), so export it using EXPORT_SYMBOL_GPL().

Cc: Yang Wei <>
Cc: Robert Richter <>
Cc: Jun Zhang <>
Signed-off-by: H. Peter Anvin <>
[ herton: adjust context ]
Signed-off-by: Herton Ronaldo Krzesinski <>
 arch/x86/kernel/ptrace.c |    2 ++
 1 file changed, 2 insertions(+)



diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 947cf90..9ee1787 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -21,6 +21,7 @@ 
 #include <linux/signal.h>
 #include <linux/perf_event.h>
 #include <linux/hw_breakpoint.h>
+#include <linux/module.h>

 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
@@ -192,6 +193,7 @@  unsigned long kernel_stack_pointer(struct pt_regs *regs)

 	return (unsigned long)regs;

 static unsigned long *pt_regs_access(struct pt_regs *regs, unsigned long regno)