]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
sparc64: fix for user probes in high memory
authorEric Saint Etienne <eric.saint.etienne@oracle.com>
Mon, 6 Feb 2017 14:32:41 +0000 (14:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Feb 2017 16:22:28 +0000 (08:22 -0800)
When returning from the user probe code into userspace process, PC & NPC are
truncated to 32 bits.

Due to shared libraries getting loaded very high in the virtual address
space of
the process, placing a user probe inside a shared library makes the kernel
return into the process at the wrong address, causing it to seg'fault
most of
the time.

This patch prevents truncating PC and NPC.

Signed-off-by: Eric Saint Etienne <eric.saint.etienne@oracle.com>
Reviewed-by: David Aldridge <david.j.aldridge@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/uprobes.h

index f87aae5a908e668a9d458a3c45724448b26bb72c..36196c17aff8ed886a4c1f6e11248ea06f8341b7 100644 (file)
@@ -42,8 +42,8 @@ struct arch_uprobe {
 };
 
 struct arch_uprobe_task {
-       u32 saved_tpc;
-       u32 saved_tnpc;
+       u64 saved_tpc;
+       u64 saved_tnpc;
 };
 
 struct task_struct;