Skip to contentSkip to conversation

Started to get "memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL"

DISCUSSION Bagas Sanjaya 4 participants 5 messages Jun 1, 2023 – Jun 2, 2023 Regressions

lore
Share & tools
lore
#0 lore raw

Hi,

I notice a regression report on Bugzilla [1]. Quoting from it:

Quoted 9 lines

Recent kernels seem to generate this:

"memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=3976 'Xorg'"

Is this a kernel problem or something to do with Xorg ?

Seen in Kernels 6.3.4 and 6.4.0-rc4.

Thanks

See Bugzilla for the full thread and attached logs (dmesg, xorg, bisection log).

Anyway, I'm adding it to regzbot:

#regzbot introduced: 105ff5339f498a https://bugzilla.kernel.org/show_bug.cgi?id=217508
#regzbot title: memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL on Xorg

Thanks.

[1]: https://bugzilla.kernel.org/show_bug.cgi?id=217508

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#1 lore raw
Quoted 14 lines · Bagas Sanjaya

Hi,

I notice a regression report on Bugzilla [1]. Quoting from it:

Quoted 9 lines

Recent kernels seem to generate this:

"memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=3976 'Xorg'"

Is this a kernel problem or something to do with Xorg ?

Seen in Kernels 6.3.4 and 6.4.0-rc4.

Thanks

Quoted 7 lines

See Bugzilla for the full thread and attached logs (dmesg, xorg, bisection log).

Anyway, I'm adding it to regzbot:

#regzbot introduced: 105ff5339f498a https://bugzilla.kernel.org/show_bug.cgi?id=217508
#regzbot title: memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL on Xorg

Hm indeed it seems to have introduced 2 new flags and immediately warn if any process doesn't use them. Maybe it would make sense for some of the non-default values of vm.memfd_noexec, but it's too early to warn unconditionally everywhere, no?

Quoted 4 lines

Thanks.

[1]: https://bugzilla.kernel.org/show_bug.cgi?id=217508

#2 lore raw
Quoted 20 lines · Vlastimil Babka
Quoted 19 lines · Bagas Sanjaya

Hi,

I notice a regression report on Bugzilla [1]. Quoting from it:

Quoted 9 lines

Recent kernels seem to generate this:

"memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=3976 'Xorg'"

Is this a kernel problem or something to do with Xorg ?

Seen in Kernels 6.3.4 and 6.4.0-rc4.

Thanks

See Bugzilla for the full thread and attached logs (dmesg, xorg, bisection log).

Anyway, I'm adding it to regzbot:

Quoted 7 lines
Quoted 2 lines

#regzbot introduced: 105ff5339f498a https://bugzilla.kernel.org/show_bug.cgi?id=217508
#regzbot title: memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL on Xorg

Hm indeed it seems to have introduced 2 new flags and immediately warn if any process doesn't use them. Maybe it would make sense for some of the non-default values of vm.memfd_noexec, but it's too early to warn unconditionally everywhere, no?

This is pretty standard for getting new options like this noticed by userspace -- there is no regression in _behavior_. It's just a reminder to fix userspace code.

-Kees

Quoted 4 lines
Quoted 3 lines

[1]: https://bugzilla.kernel.org/show_bug.cgi?id=217508

Signature · 1 line
Kees Cook
#3 lore raw
Quoted 9 lines · Kees Cook
Quoted 4 lines

Hm indeed it seems to have introduced 2 new flags and immediately warn if any process doesn't use them. Maybe it would make sense for some of the non-default values of vm.memfd_noexec, but it's too early to warn unconditionally everywhere, no?

This is pretty standard for getting new options like this noticed by userspace -- there is no regression in _behavior_. It's just a reminder to fix userspace code.

Telling regzbot:

#regzbot invalid: not a kernel regression, but userspace fix is needed

Thanks.

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#4 lore raw
Quoted 11 lines · Bagas Sanjaya
Quoted 9 lines · Kees Cook
Quoted 4 lines

Hm indeed it seems to have introduced 2 new flags and immediately warn if any process doesn't use them. Maybe it would make sense for some of the non-default values of vm.memfd_noexec, but it's too early to warn unconditionally everywhere, no?

This is pretty standard for getting new options like this noticed by userspace -- there is no regression in _behavior_. It's just a reminder to fix userspace code.

Quoted 6 lines

Telling regzbot:

#regzbot invalid: not a kernel regression, but userspace fix is needed

Thanks.

Issue raised with XOrg:

https://gitlab.freedesktop.org/xorg/xserver/-/issues/1553