delegate the open(2) with the generic forwarding.
This commit solves a problem that causes getpwnam()/getpwuid() to return NULL.
This commit is contained in:
@ -22,7 +22,7 @@
|
||||
|
||||
SYSCALL_DELEGATED(0, read)
|
||||
SYSCALL_DELEGATED(1, write)
|
||||
SYSCALL_HANDLED(2, open)
|
||||
SYSCALL_DELEGATED(2, open)
|
||||
SYSCALL_DELEGATED(3, close)
|
||||
SYSCALL_DELEGATED(4, stat)
|
||||
SYSCALL_DELEGATED(5, fstat)
|
||||
|
||||
@ -924,15 +924,11 @@ int main_loop(int fd, int cpu, pthread_mutex_t *lock)
|
||||
|
||||
switch (w.sr.number) {
|
||||
case __NR_open:
|
||||
dma_buf[256] = 0;
|
||||
|
||||
do_syscall_load(fd, cpu, (unsigned long)dma_buf, w.sr.args[0], 256);
|
||||
/*
|
||||
while (!dma_buf[256]) {
|
||||
asm volatile ("" : : : "memory");
|
||||
ret = do_strncpy_from_user(fd, dma_buf, (void *)w.sr.args[0], PIN_SIZE);
|
||||
if (ret < 0) {
|
||||
do_syscall_return(fd, cpu, ret, 0, 0, 0, 0);
|
||||
break;
|
||||
}
|
||||
*/
|
||||
|
||||
__dprintf("open: %s\n", dma_buf);
|
||||
|
||||
fn = (char *)dma_buf;
|
||||
|
||||
@ -214,15 +214,6 @@ long syscall_generic_forwarding(int n, ihk_mc_user_context_t *ctx)
|
||||
SYSCALL_FOOTER;
|
||||
}
|
||||
|
||||
SYSCALL_DECLARE(open)
|
||||
{
|
||||
|
||||
SYSCALL_HEADER;
|
||||
dkprintf("open: %s\n", (char*)ihk_mc_syscall_arg0(ctx));
|
||||
SYSCALL_ARGS_3(MI, D, D);
|
||||
SYSCALL_FOOTER;
|
||||
}
|
||||
|
||||
void
|
||||
terminate(int rc, int sig, ihk_mc_user_context_t *ctx)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user