[klibc] Re: [patch] s390: vfork support

H. Peter Anvin hpa at zytor.com
Wed Jun 7 09:09:19 PDT 2006


Heiko Carstens wrote:
> From: Heiko Carstens <heiko.carstens at de.ibm.com>
> 
> vfork support for s390/s390x.
> 
> Signed-off-by: Heiko Carstens <heiko.carstens at de.ibm.com>
> ---
> 
> diff -purN a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
> --- a/usr/klibc/SYSCALLS.def	2006-06-07 09:44:33.000000000 +0200
> +++ b/usr/klibc/SYSCALLS.def	2006-06-07 13:01:54.000000000 +0200
> @@ -28,7 +28,7 @@ void _exit,exit::_exit(int)
>  ; A lot of architectures need architecture-specific vfork
>  ; stubs, due to the no-stack requirement.  These are the
>  ; architectures which don't.
> -<alpha,m32r,ppc,ppc64,sh> pid_t vfork()
> +<alpha,m32r,ppc,ppc64,sh,s390,s390x> pid_t vfork()
>  <sparc,sparc64> pid_t vfork at forkish()
>  #endif
>  <!alpha> pid_t getpid()

More strongly... does the s390(x) really not use the stack at all, 
*including for the return address* for the standard syscall stub?

vfork is forbidden from using the stack above the level of the stack 
frame of the *calling* function.

This means, for example, that x86-64 need custom stubs, even though the 
only thing it uses the stack for normally is the return address.

	-hpa



More information about the klibc mailing list