From: Eugene Syromyatnikov Date: Mon, 19 Dec 2016 21:13:27 +0000 (+0300) Subject: kexec: fix for the x32 ABI X-Git-Tag: v4.16~325 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e4c657a9de3b10204b689adec92c7bd11c98a64;p=strace kexec: fix for the x32 ABI There is no compat (and no 32-bit version, ever) for x32 ABI, so kernel's long type should be used for arguments' values. The only remaining thing is a pointer to cmdline string, but it is currently broken on x32 anyway. * kexec.c (SYS_FUNC(kexec_file_load)): Print the cmdline_len argument as kernel long, retrieve it via getarg_klu; use printflags64 for printing the flags argument, retrieve it via getarg_klu. --- diff --git a/kexec.c b/kexec.c index bf84db93..d7054993 100644 --- a/kexec.c +++ b/kexec.c @@ -112,12 +112,12 @@ SYS_FUNC(kexec_file_load) printfd(tcp, tcp->u_arg[1]); tprints(", "); /* cmdline_len */ - tprintf("%lu, ", tcp->u_arg[2]); + tprintf("%" PRI_klu ", ", getarg_klu(tcp, 2)); /* cmdline */ printstr(tcp, tcp->u_arg[3], tcp->u_arg[2]); tprints(", "); /* flags */ - printflags_long(kexec_file_load_flags, tcp->u_arg[4], "KEXEC_FILE_???"); + printflags64(kexec_file_load_flags, getarg_klu(tcp, 4), "KEXEC_FILE_???"); return RVAL_DECODED; }