linux-user/elfload: check PR_GET_DUMPABLE before creating coredump
authorThomas Weißschuh <thomas@t-8ch.de>
Sat, 20 Jan 2024 21:45:25 +0000 (22:45 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 23 Jan 2024 03:24:32 +0000 (13:24 +1000)
commit0ea731db5a0edb5b1b9038e1c0059053e20ce5d3
tree8a04da9de9ac98be941647d971ba76c213e315fa
parent3805d4287fd64917a20bdc406b52d37800d46659
linux-user/elfload: check PR_GET_DUMPABLE before creating coredump

A process can opt-out of coredump creation by calling
prctl(PR_SET_DUMPABLE, 0).
linux-user passes this call from the guest through to the
operating system.
From there it can be read back again to avoid creating coredumps from
qemu-user itself if the guest chose so.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Message-Id: <20240120-qemu-user-dumpable-v3-2-6aa410c933f1@t-8ch.de>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
linux-user/elfload.c