From 8e4c657a9de3b10204b689adec92c7bd11c98a64 Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Tue, 20 Dec 2016 00:13:27 +0300 Subject: [PATCH] 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. --- kexec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.40.0