summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-09-03 02:12:11 -0400
committerGabe Black <gblack@eecs.umich.edu>2006-09-03 02:12:11 -0400
commitb11018ca12ddd8557bddbadaf649253aa5fd8c47 (patch)
treea471d87433fa3396dfd5819e386a199752c7aed5 /src/sim
parentc32ef326d269e903b96d20887dafba65e06bee72 (diff)
downloadgem5-b11018ca12ddd8557bddbadaf649253aa5fd8c47.tar.xz
Made system calls use the uid, etc parameters from the live process.
--HG-- extra : convert_revision : 2aadb87b4602324423aadb903010f5b49fcef41b
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/syscall_emul.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc
index e72890612..6620d95e3 100644
--- a/src/sim/syscall_emul.cc
+++ b/src/sim/syscall_emul.cc
@@ -401,8 +401,8 @@ getpidPseudoFunc(SyscallDesc *desc, int callnum, Process *process,
// fake_syscall mode, so there's no way for a process to know it's
// not getting a unique value.
- tc->setIntReg(SyscallPseudoReturnReg, 99);
- return 100;
+ tc->setIntReg(SyscallPseudoReturnReg, process->ppid);
+ return process->pid;
}
@@ -414,8 +414,8 @@ getuidPseudoFunc(SyscallDesc *desc, int callnum, Process *process,
// simulation to be deterministic.
// EUID goes in r20.
- tc->setIntReg(SyscallPseudoReturnReg, 100); //EUID
- return 100; // UID
+ tc->setIntReg(SyscallPseudoReturnReg, process->euid); //EUID
+ return process->uid; // UID
}
@@ -424,8 +424,8 @@ getgidPseudoFunc(SyscallDesc *desc, int callnum, Process *process,
ThreadContext *tc)
{
// Get current group ID. EGID goes in r20.
- tc->setIntReg(SyscallPseudoReturnReg, 100); //EGID
- return 100;
+ tc->setIntReg(SyscallPseudoReturnReg, process->egid); //EGID
+ return process->gid;
}
@@ -446,43 +446,43 @@ getpidFunc(SyscallDesc *desc, int callnum, Process *process,
// fake_syscall mode, so there's no way for a process to know it's
// not getting a unique value.
- tc->setIntReg(SyscallPseudoReturnReg, 99); //PID
- return 100;
+ tc->setIntReg(SyscallPseudoReturnReg, process->ppid); //PID
+ return process->pid;
}
SyscallReturn
getppidFunc(SyscallDesc *desc, int callnum, Process *process,
ThreadContext *tc)
{
- return 99;
+ return process->ppid;
}
SyscallReturn
getuidFunc(SyscallDesc *desc, int callnum, Process *process,
ThreadContext *tc)
{
- return 100; // UID
+ return process->uid; // UID
}
SyscallReturn
geteuidFunc(SyscallDesc *desc, int callnum, Process *process,
ThreadContext *tc)
{
- return 100; // UID
+ return process->euid; // UID
}
SyscallReturn
getgidFunc(SyscallDesc *desc, int callnum, Process *process,
ThreadContext *tc)
{
- return 100;
+ return process->gid;
}
SyscallReturn
getegidFunc(SyscallDesc *desc, int callnum, Process *process,
ThreadContext *tc)
{
- return 100;
+ return process->egid;
}