[PATCH 2/8] keyctl: Use getarg_ull for printing generic arguments

Eugene Syromyatnikov evgsyr at gmail.com
Thu Sep 29 12:56:12 UTC 2016


Otherwise it is erroneous on x32, for example.

* keyctl.c (SYS_FUNC(keyctl)): Use "%#llx" conversion specifier and
  getarg_ull for fallback argument printing.
---
 keyctl.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/keyctl.c b/keyctl.c
index ecb3e79..a0bbbd0 100644
--- a/keyctl.c
+++ b/keyctl.c
@@ -301,9 +301,9 @@ SYS_FUNC(keyctl)
 		break;
 
 	default:
-		tprintf("%#lx, %#lx, %#lx, %#lx",
-			tcp->u_arg[1], tcp->u_arg[2],
-			tcp->u_arg[3], tcp->u_arg[4]);
+		tprintf("%#llx, %#llx, %#llx, %#llx",
+			getarg_ull(tcp, 1), getarg_ull(tcp, 2),
+			getarg_ull(tcp, 3), getarg_ull(tcp, 4));
 		break;
 	}
 
-- 
1.7.10.4





More information about the Strace-devel mailing list