lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1366210882-27109-1-git-send-email-simon.marchi@polymtl.ca>
Date:	Wed, 17 Apr 2013 11:01:22 -0400
From:	Simon Marchi <simon.marchi@...ymtl.ca>
To:	cmetcalf@...era.com
Cc:	linux-kernel@...r.kernel.org,
	Simon Marchi <simon.marchi@...ymtl.ca>
Subject: [PATCH] arch/tile: Fix syscall return value passed to tracepoint

Currently the syscall number is passed, but it should be the return
value, which is kept in r0.

Signed-off-by: Simon Marchi <simon.marchi@...ymtl.ca>
---
This patch applies on Chris Metcalf's tree:
  http://git.kernel.org/cgit/linux/kernel/git/cmetcalf/linux-tile.git

arch/tile/include/uapi/arch/abi.h |    2 ++
 arch/tile/kernel/ptrace.c         |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/tile/include/uapi/arch/abi.h b/arch/tile/include/uapi/arch/abi.h
index c55a3d4..400401b 100644
--- a/arch/tile/include/uapi/arch/abi.h
+++ b/arch/tile/include/uapi/arch/abi.h
@@ -119,6 +119,8 @@ typedef __int_reg_t int_reg_t;
 /** Name of register that holds the syscall number, for use in assembly. */
 #define TREG_SYSCALL_NR_NAME r10
 
+/** Register that holds the return value for system calls. */
+#define TREG_SYSCALL_RET_NR  0
 
 /**
  * The ABI requires callers to allocate a caller state save area of
diff --git a/arch/tile/kernel/ptrace.c b/arch/tile/kernel/ptrace.c
index 363b2dd..91fd3af 100644
--- a/arch/tile/kernel/ptrace.c
+++ b/arch/tile/kernel/ptrace.c
@@ -269,7 +269,7 @@ void do_syscall_trace_exit(struct pt_regs *regs)
 		tracehook_report_syscall_exit(regs, 0);
 
 	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
-		trace_sys_exit(regs, regs->regs[TREG_SYSCALL_NR]);
+		trace_sys_exit(regs, regs->regs[TREG_SYSCALL_RET_NR]);
 }
 
 void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code)
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ