mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20:03:54 -06:00
linux-user: Emulate CLONE_PIDFD flag in clone()
Add emulation for the CLONE_PIDFD flag of the clone() syscall. This flag was added in Linux kernel 5.2. Successfully tested on a x86-64 Linux host with hppa-linux target. Can be verified by running the testsuite of the qcoro debian package, which breaks hard and kills the currently logged-in user without this patch. Signed-off-by: Helge Deller <deller@gmx.de> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <Y4XoJCpvUA1JD7Sj@p100> [lv: define CLONE_PIDFD if it is not] Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
fe080593dd
commit
895ce8bb53
2 changed files with 35 additions and 1 deletions
|
@ -1111,11 +1111,16 @@ UNUSED static const struct flags mmap_flags[] = {
|
|||
FLAG_END,
|
||||
};
|
||||
|
||||
#ifndef CLONE_PIDFD
|
||||
# define CLONE_PIDFD 0x00001000
|
||||
#endif
|
||||
|
||||
UNUSED static const struct flags clone_flags[] = {
|
||||
FLAG_GENERIC(CLONE_VM),
|
||||
FLAG_GENERIC(CLONE_FS),
|
||||
FLAG_GENERIC(CLONE_FILES),
|
||||
FLAG_GENERIC(CLONE_SIGHAND),
|
||||
FLAG_GENERIC(CLONE_PIDFD),
|
||||
FLAG_GENERIC(CLONE_PTRACE),
|
||||
FLAG_GENERIC(CLONE_VFORK),
|
||||
FLAG_GENERIC(CLONE_PARENT),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue