When a open system call request is delegated, mcexec will check whether
a path name is known one such as "/proc/meminfo" and "/proc/cpuinfo".
During this check, if mcexec causes a SIGSEGV or SIGBUS signal,
mcexec will begin a loop, because mcexec has a signal handler which
returns simply.
The mcexec may send a signal to itself in order that the mcexec
terminates abnormally.
Generally, the signal is delivered to the thread which sent the signal.
In this case, the signal terminates the mcexec immediately.
However, if the signal is delivered to another thread,
the thread which sent the signal can call exit(3)
before the signal terminates the mcexec.
When a signal is forwarded from McKernel,
ioctl(MCEXEC_UP_WAIT_SYSCALL) may return EINTR error.
In this case, though no syscall request has been received,
the mcexec starts to process the syscall requst that is garbage.
When mcexec reduces a stack, mcexec stores the original RLIMIT_STACK
in environment variable MCKERNEL_RLIMIT_STACK.
A fix to prohibit overwrite of this time.
Therefore, the value of RLIMIT_STACK of the McKernel's process is
decided in the following order.
(1) If environment variable MCKERNEL_RLIMIT_STACK exists; the value.
(2) A value of RLIMIT_STACK in the mcexec starting.
- When the stack size is greater than 1 GiB, reduced to 10 MiB.
- To achieve a reduction of the stack, restart itself using the exec().
- By using the environment variable MCKERNEL_RLIMIT_STACK,
tell to McKernel the stack size of the original.
MCKERNEL_RLIMIT_STACK is a environment variable which
specify RLIMIT_STACK value on McKernel.
syntax: MCKERNEL_RLIMIT_STACK=<cur>,<max>
example: MCKERNEL_RLIMIT_STACK=0x800000,-1
cur=8MiB, max=unlimited
- When the interpreter is not found,
add a prefix to the path and retry search.
- the prefix is specified by a environment variable MCEXEC_ALT_ROOT.
- If the MCEXEC_ALT_ROOT does not exist,
/usr/linux-k1om-4.7/linux-k1om is used as a prefix.
When start a program which have a PT_INTERP segment
(dynamic linkaged program have a PT_INTERP segment),
start the interpreter indicated by the PT_INTERP segment.