[PATCH] Correct decoding of readahead on powerpc32

Andreas Schwab schwab at redhat.com
Tue Nov 3 12:56:46 UTC 2009


>From 609019f586148ba7952bfc4cd58ee5d43427da02 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab at redhat.com>
Date: Tue, 3 Nov 2009 13:54:57 +0100
Subject: [PATCH] Correct decoding of readahead on powerpc32.

* linux/powerpc/syscallent.h (sys_readahead): Account for 64bit
alignment on powerpc32.
* file.c (sys_readahead): Align 64bit arg.
---
 file.c                     |    1 +
 linux/powerpc/syscallent.h |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/file.c b/file.c
index 2197cdc..88ccd44 100644
--- a/file.c
+++ b/file.c
@@ -610,6 +610,7 @@ int
 sys_readahead(struct tcb *tcp)
 {
 	if (entering(tcp)) {
+		ALIGN64 (tcp, 1);
 		tprintf("%ld, %lld, %ld", tcp->u_arg[0],
 # if defined LINUX_MIPSN32
 			tcp->ext_arg[1], tcp->u_arg[2]
diff --git a/linux/powerpc/syscallent.h b/linux/powerpc/syscallent.h
index 116edc8..ecf7245 100644
--- a/linux/powerpc/syscallent.h
+++ b/linux/powerpc/syscallent.h
@@ -219,7 +219,7 @@
 	{ 5,	0,	sys_putpmsg,		"putpmsg"		}, /* 188 */
 	{ 0,	TP,	sys_vfork,		"vfork"			}, /* 189 */
 	{ 2,	0,	sys_getrlimit,		"getrlimit"		}, /* 190 */
-	{ 4,	TD,	sys_readahead,		"readahead"		}, /* 190 */
+	{ 5,	TD,	sys_readahead,		"readahead"		}, /* 190 */
 	{ 6,	0,	sys_mmap,		"mmap2"			}, /* 192 */
 	{ 4,	TF,	sys_truncate64,		"truncate64"		}, /* 193 */
 	{ 4,	TD,	sys_ftruncate64,	"ftruncate64"		}, /* 194 */
-- 
1.6.5.1


Andreas.

-- 
Andreas Schwab, schwab at redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."




More information about the Strace-devel mailing list