kcmp: print index parameters of unknown commands as kernel_ulong_t

* lookup_dcookie.c (SYS_FUNC(kcmp)): Use getarg_ull to retrieve idx1
and idx2, print them using %#llx format in case of unknown command.
This commit is contained in:
Дмитрий Левин 2016-10-27 22:44:08 +00:00
parent 8b0f48ee06
commit 63c27873b6

6
kcmp.c
View File

@ -33,8 +33,8 @@ SYS_FUNC(kcmp)
pid_t pid1 = tcp->u_arg[0];
pid_t pid2 = tcp->u_arg[1];
int type = tcp->u_arg[2];
unsigned long idx1 = tcp->u_arg[3];
unsigned long idx2 = tcp->u_arg[4];
unsigned long long idx1 = getarg_ull(tcp, 3);
unsigned long long idx2 = getarg_ull(tcp, 4);
tprintf("%d, %d, ", pid1, pid2);
printxval(kcmp_types, type, "KCMP_???");
@ -51,7 +51,7 @@ SYS_FUNC(kcmp)
case KCMP_VM:
break;
default:
tprintf(", %#lx, %#lx", idx1, idx2);
tprintf(", %#llx, %#llx", idx1, idx2);
}
return RVAL_DECODED;