Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jun 2000 08:39:10 -0400 (EDT)
From:      Luoqi Chen <luoqi@watermarkgroup.com>
To:        dfr@nlsystems.com, dillon@apollo.backplane.com
Cc:        arch@FreeBSD.ORG
Subject:   Re: Syscalls and execve
Message-ID:  <200006091239.e59Cd9T08096@lor.watermarkgroup.com>

next in thread | raw e-mail | index | archive | help
> >     Why not have the new exec()'d process, when it gets the cpu in supervisor
> >     mode, clear the registers in supervisor mode before returning
> >     to user mode?  e.g. near the end of kern/kern_exec.c's execve().
> >     (or somewhere similar).  Then at least the 'garbage' will be more 
> >     like what you see on return from a syscall rather then something 
> >     inherited from another process.
> > 
> Here the current process *is* the process calling exec() (unlike fork()), so 
> why not just zero those registers in setregs()?
> 
> -lq
> 
I take back what I've just said, this won't guarantee zeros in those volatile
registers. Moreover doesn't the new process image expect to see argc, argv,
envp in the argument registers? Exec() needs special treatment, maybe an
exec_trampoline()?

-lq


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006091239.e59Cd9T08096>