• Chris Wilson's avatar
    kcmp: Support selection of SYS_kcmp without CHECKPOINT_RESTORE · bfe3911a
    Chris Wilson authored
    Userspace has discovered the functionality offered by SYS_kcmp and has
    started to depend upon it. In particular, Mesa uses SYS_kcmp for
    os_same_file_description() in order to identify when two fd (e.g. device
    or dmabuf) point to the same struct file. Since they depend on it for
    core functionality, lift SYS_kcmp out of the non-default
    CONFIG_CHECKPOINT_RESTORE into the selectable syscall category.
    
    Rasmus Villemoes also pointed out that systemd uses SYS_kcmp to
    deduplicate the per-service file descriptor store.
    
    Note that some distributions such as Ubuntu are already enabling
    CHECKPOINT_RESTORE in their configs and so, by extension, SYS_kcmp.
    
    References: https://gitlab.freedesktop.org/drm/intel/-/issues/3046
    
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Will Drewry <wad@chromium.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Dave Airlie <airlie...
    bfe3911a
eventpoll.c 63.8 KB