• Thomas Zimmermann's avatar
    fbdev: Make support for userspace interfaces configurable · 701d2054
    Thomas Zimmermann authored
    Add Kconfig option CONFIG_FB_DEVICE and make the virtual fbdev
    device optional. If the new option has not been selected, fbdev
    does not create files in devfs, sysfs or procfs.
    
    Most modern Linux systems run a DRM-based graphics stack that uses
    the kernel's framebuffer console, but has otherwise deprecated fbdev
    support. Yet fbdev userspace interfaces are still present.
    
    The option makes it possible to use the fbdev subsystem as console
    implementation without support for userspace. This closes potential
    entry points to manipulate kernel or I/O memory via framebuffers. It
    also prevents the execution of driver code via ioctl or sysfs, both
    of which might allow malicious software to exploit bugs in the fbdev
    code.
    
    A small number of fbdev drivers require struct fbinfo.dev to be
    initialized, usually for the support of sysfs interface. Make these
    drivers depend on FB_DEVICE. They can later be fixed if necessary.
    
    v3:
    	* effect -> affect in Kconfig help (Daniel)
    v2:
    	* set FB_DEVICE default to y (Geert)
    	* comment on {get,put}_device() (Sam)
    	* Kconfig fixes (Sam)
    	* add TODO item about FB_DEVICE dependencies (Sam)
    Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
    Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-39-tzimmermann@suse.de
    701d2054
Kconfig 67 KB