linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Don't fill the kernel log with memfd_create messages
       [not found] <1693408388.rwssx8r1h9.none.ref@localhost>
@ 2023-08-30 15:52 ` Alex Xu (Hello71)
  2023-09-04 13:31   ` Vlastimil Babka
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Xu (Hello71) @ 2023-08-30 15:52 UTC (permalink / raw)
  To: Christian Brauner, Aleksa Sarai
  Cc: Andrew Morton, Shuah Khan, Jeff Xu, Kees Cook, Daniel Verkamp,
	Dominique Martinet, stable, linux-api, linux-kernel, linux-mm,
	linux-kselftest

Hi all,

Recently "memfd: improve userspace warnings for missing exec-related 
flags" was merged. On my system, this is a regression, not an 
improvement, because the entire 256k kernel log buffer (default on x86) 
is filled with these warnings and "__do_sys_memfd_create: 122 callbacks 
suppressed". I haven't investigated too closely, but the most likely 
cause is Wayland libraries.

This is too serious of a consequence for using an old API, especially 
considering how recently the flags were added. The vast majority of 
software has not had time to add the flags: glibc does not define the 
macros until 2.38 which was released less than one month ago, man-pages 
does not document the flags, and according to Debian Code Search, only 
systemd, stress-ng, and strace actually pass either of these flags.

Furthermore, since old kernels reject unknown flags, it's not just a 
matter of defining and passing the flag; every program needs to 
add logic to handle EINVAL and try again.

Some other way needs to be found to encourage userspace to add the 
flags; otherwise, this message will be patched out because the kernel 
log becomes unusable after running unupdated programs, which will still 
exist even after upstreams are fixed. In particular, AppImages, 
flatpaks, snaps, and similar app bundles contain vendored Wayland 
libraries which can be difficult or impossible to update.

Thanks,
Alex.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Don't fill the kernel log with memfd_create messages
  2023-08-30 15:52 ` Don't fill the kernel log with memfd_create messages Alex Xu (Hello71)
@ 2023-09-04 13:31   ` Vlastimil Babka
  2023-09-05 12:10     ` Linux regression tracking #update (Thorsten Leemhuis)
  0 siblings, 1 reply; 3+ messages in thread
From: Vlastimil Babka @ 2023-09-04 13:31 UTC (permalink / raw)
  To: Alex Xu (Hello71), Christian Brauner, Aleksa Sarai
  Cc: Andrew Morton, Shuah Khan, Jeff Xu, Kees Cook, Daniel Verkamp,
	Dominique Martinet, stable, linux-api, linux-kernel, linux-mm,
	linux-kselftest

On 8/30/23 17:52, Alex Xu (Hello71) wrote:
> Hi all,
> 
> Recently "memfd: improve userspace warnings for missing exec-related 
> flags" was merged. On my system, this is a regression, not an 
> improvement, because the entire 256k kernel log buffer (default on x86) 
> is filled with these warnings and "__do_sys_memfd_create: 122 callbacks 
> suppressed". I haven't investigated too closely, but the most likely 
> cause is Wayland libraries.
> 
> This is too serious of a consequence for using an old API, especially 
> considering how recently the flags were added. The vast majority of 
> software has not had time to add the flags: glibc does not define the 
> macros until 2.38 which was released less than one month ago, man-pages 
> does not document the flags, and according to Debian Code Search, only 
> systemd, stress-ng, and strace actually pass either of these flags.
> 
> Furthermore, since old kernels reject unknown flags, it's not just a 
> matter of defining and passing the flag; every program needs to 
> add logic to handle EINVAL and try again.
> 
> Some other way needs to be found to encourage userspace to add the 
> flags; otherwise, this message will be patched out because the kernel 
> log becomes unusable after running unupdated programs, which will still 
> exist even after upstreams are fixed. In particular, AppImages, 
> flatpaks, snaps, and similar app bundles contain vendored Wayland 
> libraries which can be difficult or impossible to update.

It's being reverted:
https://lore.kernel.org/all/20230902230530.6B663C433C8@smtp.kernel.org/

Meanwhile stable should avoid backporting 434ed3350f57 ("memfd: improve
userspace warnings for missing exec-related flags")

> Thanks,
> Alex.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Don't fill the kernel log with memfd_create messages
  2023-09-04 13:31   ` Vlastimil Babka
@ 2023-09-05 12:10     ` Linux regression tracking #update (Thorsten Leemhuis)
  0 siblings, 0 replies; 3+ messages in thread
From: Linux regression tracking #update (Thorsten Leemhuis) @ 2023-09-05 12:10 UTC (permalink / raw)
  To: Linux kernel regressions list
  Cc: stable, linux-api, linux-kernel, linux-mm, linux-kselftest

[TLDR: This mail in primarily relevant for Linux kernel regression
tracking. See link in footer if these mails annoy you.]

On 04.09.23 15:31, Vlastimil Babka wrote:
> On 8/30/23 17:52, Alex Xu (Hello71) wrote:
>> Hi all,
>>
>> Recently "memfd: improve userspace warnings for missing exec-related 
>> flags" was merged. On my system, this is a regression, not an 
>> improvement, because the entire 256k kernel log buffer (default on x86) 
>> is filled with these warnings and "__do_sys_memfd_create: 122 callbacks 
>> suppressed". I haven't investigated too closely, but the most likely 
>> cause is Wayland libraries.
>>
>> This is too serious of a consequence for using an old API, especially 
>> considering how recently the flags were added. The vast majority of 
>> software has not had time to add the flags: glibc does not define the 
>> macros until 2.38 which was released less than one month ago, man-pages 
>> does not document the flags, and according to Debian Code Search, only 
>> systemd, stress-ng, and strace actually pass either of these flags.
>>
>> Furthermore, since old kernels reject unknown flags, it's not just a 
>> matter of defining and passing the flag; every program needs to 
>> add logic to handle EINVAL and try again.
>>
>> Some other way needs to be found to encourage userspace to add the 
>> flags; otherwise, this message will be patched out because the kernel 
>> log becomes unusable after running unupdated programs, which will still 
>> exist even after upstreams are fixed. In particular, AppImages, 
>> flatpaks, snaps, and similar app bundles contain vendored Wayland 
>> libraries which can be difficult or impossible to update.
> 
> It's being reverted:
> https://lore.kernel.org/all/20230902230530.6B663C433C8@smtp.kernel.org/

in that case:

#regzbot fix: revert "memfd: improve userspace warnings for missing
exec-related flags".
#regzbot ignore-activity

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
That page also explains what to do if mails like this annoy you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-05 16:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1693408388.rwssx8r1h9.none.ref@localhost>
2023-08-30 15:52 ` Don't fill the kernel log with memfd_create messages Alex Xu (Hello71)
2023-09-04 13:31   ` Vlastimil Babka
2023-09-05 12:10     ` Linux regression tracking #update (Thorsten Leemhuis)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).