summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/core/Makefile
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-06-13 13:07:13 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2023-06-27 09:58:51 +0200
commit701d2054fa317188cd4039c84e72c73254013b23 (patch)
tree8f866db3aeb00cf6d257f4d4cedab6bff1d5c290 /drivers/video/fbdev/core/Makefile
parentfbdev/core: Rework fb init code (diff)
downloadlinux-701d2054fa317188cd4039c84e72c73254013b23.tar.xz
linux-701d2054fa317188cd4039c84e72c73254013b23.zip
fbdev: Make support for userspace interfaces configurable
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: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-39-tzimmermann@suse.de
Diffstat (limited to 'drivers/video/fbdev/core/Makefile')
-rw-r--r--drivers/video/fbdev/core/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/fbdev/core/Makefile b/drivers/video/fbdev/core/Makefile
index eea5938f7423..9150bafd9e89 100644
--- a/drivers/video/fbdev/core/Makefile
+++ b/drivers/video/fbdev/core/Makefile
@@ -2,12 +2,13 @@
obj-$(CONFIG_FB_NOTIFY) += fb_notify.o
obj-$(CONFIG_FB) += fb.o
fb-y := fb_backlight.o \
- fb_chrdev.o \
fb_info.o \
- fb_procfs.o \
- fbmem.o fbmon.o fbcmap.o fbsysfs.o \
+ fbmem.o fbmon.o fbcmap.o \
modedb.o fbcvt.o fb_cmdline.o fb_io_fops.o
fb-$(CONFIG_FB_DEFERRED_IO) += fb_defio.o
+fb-$(CONFIG_FB_DEVICE) += fb_chrdev.o \
+ fb_procfs.o \
+ fbsysfs.o
ifeq ($(CONFIG_FRAMEBUFFER_CONSOLE),y)
fb-y += fbcon.o bitblit.o softcursor.o