[RFC PATCH v2 9/9] um: pass FD for memory operations when needed
Benjamin Berg
benjamin at sipsolutions.net
Sat Oct 26 03:33:38 PDT 2024
Hi,
On Thu, 2024-10-24 at 21:52 +0800, Tiwei Bie wrote:
> On 2024/10/23 22:08, Benjamin Berg wrote:
> [...]
>
>
> It looks the memcpy could trigger a crash when UML_SECCOMP is
> enabled:
>
> [...]
>
> It can be fixed with changes like below on my machine:
>
> diff --git a/arch/um/include/shared/skas/mm_id.h
> b/arch/um/include/shared/skas/mm_id.h
> index f2d4c383c958..26d922443454 100644
> --- a/arch/um/include/shared/skas/mm_id.h
> +++ b/arch/um/include/shared/skas/mm_id.h
> @@ -6,6 +6,8 @@
> #ifndef __MM_ID_H
> #define __MM_ID_H
>
> +#include <linux/kconfig.h>
> +
> #ifdef CONFIG_UML_SECCOMP
> #define STUB_MAX_FDS 4
> #else
Hmm, the "#include <linux/kconfig.h>" in userspace code again. I
dropped the include from process.c after Johanne's comment …
Maybe we can really just include kconfig.h. But we can also avoid it by
adding the definition into common-offsets.h, or just keeping a couple
of extra integers around in non-seccomp compiles :-)
Benjamin
More information about the linux-um
mailing list