Skip to content

fbdev: fix mode sysfs lifetime and bounds issues

Melbin K Mathew dri-devel linux-fbdev lkml sashiko-reviews stable 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 2 repliesIn review
  2. v22 patches 0 repliesSuperseded

Changes in v3 from the cover letter

- Add patch to clear fb_info->mode in fb_set_var() INV_MODE path.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3fbdev: bound mode sysfs output to the sysfs bufferdrivers/video/fbdev/core/fbsysfs.c+10 -51 reply
2/3fbdev: clear fb_info->mode before deleting a videomodedrivers/video/fbdev/core/fbmem.c+4 -10 replies
3/3fbdev: serialize mode sysfs access with lock_fb_info()drivers/video/fbdev/core/fbsysfs.c+38 -81 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/3] fbdev: fix mode sysfs lifetime and bounds issues

This v3 adds a patch to clear fb_info->mode before deleting a videomode through FBIOPUT_VSCREENINFO with FB_ACTIVATE_INV_MODE.

Patch 1 bounds mode sysfs output so show_modes() cannot advance the sysfs buffer offset past PAGE_SIZE.

Patch 2 clears fb_info->mode before fb_delete_videomode() when it matches the mode being removed via the FBIOPUT_VSCREENINFO ioctl.

Patch 3 serializes mode sysfs access with lock_fb_info(), including store_mode(), show_mode(), and show_modes().

Changes in v3:
- Add patch to clear fb_info->mode in fb_set_var() INV_MODE path.

Melbin K Mathew (3):
fbdev: bound mode sysfs output to the sysfs buffer
fbdev: clear fb_info->mode before deleting a videomode
fbdev: serialize mode sysfs access with lock_fb_info()

 drivers/video/fbdev/core/fbmem.c   |  5 ++-
 drivers/video/fbdev/core/fbsysfs.c | 59 ++++++++++++++++++++++++------
 2 files changed, 51 insertions(+), 13 deletions(-)
Signature · 1 line
2.39.5