Why does GNU sed abuse /proc/filesystems? Re: [PATCH v3 0/3] revamp fs/filesystems.c
From: Cedric Blancher
Date: Tue Apr 28 2026 - 02:38:08 EST
On Sun, 26 Apr 2026 at 00:09, Mateusz Guzik <mjguzik@xxxxxxxxx> wrote:
>
> The file is a mess with a hand-rolled linked list in a desperate need of
> a clean up.
>
> The code to emit /proc/filesystems is used frequently because libselinux
> reads the file, which in turn is linked into numerous frequently used
> programs (even ones you would not suspect, like sed!). In order to
> combat that pre-gen the string instead of pointer-chasing and printfing
> one by-one.
Why is GNU sed touching /proc/filesystems in the first place? This is
not really a stable API, and would actually be a thing which should
NOT be touched by a "simple" userland tool.
<rant>maybe rename /proc/filesystems to
/proc/filesystems_only_for_admin_purposes</rant>, or stick an ACL on
it to prevent abuse?
Ced
--
Cedric Blancher <cedric.blancher@xxxxxxxxx>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur