• Aleksa Sarai's avatar
    memfd: drop warning for missing exec-related flags · 1717449b
    Aleksa Sarai authored
    Commit 434ed335 ("memfd: improve userspace warnings for missing
    exec-related flags") attempted to make these warnings more useful (so
    they would work as an incentive to get users to switch to specifying
    these flags -- as intended by the original MFD_NOEXEC_SEAL patchset).
    Unfortunately, it turns out that even INFO-level logging is too extreme
    to enable by default and alternative solutions to the spam issue (such
    as doing more extreme rate-limiting per-task) are either too ugly or
    overkill for something as simple as emitting a log as a developer aid.
    
    Given that the flags are new and there is no harm to not specifying them
    (after all, we maintain backwards compatibility) we can just drop the
    warnings for now until some time in the future when most programs have
    migrated and distributions start using vm.memfd_noexec=1 (where failing
    to pass the flag would result in unexpected errors for programs that use
    executable memfds).
    
    Link: https://lkml.kernel.org/r/20230912-memfd-reduce-spam-v2-1-7d92a4964b6a@cyphar.com
    Fixes: 434ed335 ("memfd: improve userspace warnings for missing exec-related flags")
    Fixes: 2562d67b ("revert "memfd: improve userspace warnings for missing exec-related flags".")
    Signed-off-by: default avatarAleksa Sarai <cyphar@cyphar.com>
    Reported-by: default avatarDamian Tometzki <dtometzki@fedoraproject.org>
    Reviewed-by: default avatarChristian Brauner <brauner@kernel.org>
    Cc: Daniel Verkamp <dverkamp@chromium.org>
    Cc: Jeff Xu <jeffxu@google.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Shuah Khan <shuah@kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    1717449b
memfd.c 9.6 KB