Consistently treat operation argument of prctl/arch_prctl syscalls
as int to match the kernel behaviour.
* prctl.c (SYS_FUNC(prctl), SYS_FUNC(arch_prctl)): Assign 1st argument
of syscalls to a variable of type unsigned int and use it in all
subsequent checks and lookups.
SYS_FUNC(prctl)
{
+ const unsigned int option = tcp->u_arg[0];
unsigned int i;
if (entering(tcp))
- printxval(prctl_options, tcp->u_arg[0], "PR_???");
+ printxval(prctl_options, option, "PR_???");
- switch (tcp->u_arg[0]) {
+ switch (option) {
case PR_GET_DUMPABLE:
case PR_GET_KEEPCAPS:
case PR_GET_SECCOMP:
SYS_FUNC(arch_prctl)
{
+ const unsigned int option = tcp->u_arg[0];
+
if (entering(tcp))
- printxval(archvals, tcp->u_arg[0], "ARCH_???");
+ printxval(archvals, option, "ARCH_???");
- switch (tcp->u_arg[0]) {
+ switch (option) {
case ARCH_GET_GS:
case ARCH_GET_FS:
if (entering(tcp))