linux-user: handle /proc/self/exe with execve() syscall
commitf07eb1c4f805c0dcc14dd69fee49b601ce0b2d2c
authorLaurent Vivier <laurent@vivier.eu>
Tue, 27 Sep 2022 12:43:56 +0000 (27 14:43 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Fri, 21 Oct 2022 15:46:19 +0000 (21 17:46 +0200)
treeb14eada29e2a65b574b6294c1f1c42543c4a9713
parent46187d707e7639b743a3b9f72da03ad4b9abc255
linux-user: handle /proc/self/exe with execve() syscall

If path is /proc/self/exe, use the executable path
provided by exec_path.

Don't use execfd as it is closed by loader_exec() and otherwise
will survive to the exec() syscall and be usable child process.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20220927124357.688536-2-laurent@vivier.eu>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/syscall.c