On 2023-04-11 15:44, Daniel Vetter wrote:
On Tue, Apr 04, 2023 at 09:39:34PM +0200, Daniel Vetter wrote:
This is an oversight from dc5bdb68b5b3 ("drm/fb-helper: Fix vt
restore") - I failed to realize that nasty userspace could set this.

It's not pretty to mix up kernel-internal and userspace uapi flags
like this, but since the entire fb_var_screeninfo structure is uapi
we'd need to either add a new parameter to the ->fb_set_par callback
and fb_set_par() function, which has a _lot_ of users. Or some other
fairly ugly side-channel int fb_info. Neither is a pretty prospect.

Instead just correct the issue at hand by filtering out this
kernel-internal flag in the ioctl handling code.

Signed-off-by: Daniel Vetter <[email protected]>
Fixes: dc5bdb68b5b3 ("drm/fb-helper: Fix vt restore")
Cc: Alex Deucher <[email protected]>
Cc: [email protected]
Cc: Michel Dänzer <[email protected]>
Cc: Noralf Trønnes <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: <[email protected]> # v5.7+
Cc: Bartlomiej Zolnierkiewicz <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Qiujun Huang <[email protected]>
Cc: Peter Rosin <[email protected]>
Cc: [email protected]
Cc: Helge Deller <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Samuel Thibault <[email protected]>
Cc: Tetsuo Handa <[email protected]>
Cc: Shigeru Yoshida <[email protected]>
An Ack on this (or a better idea) would be great, so I can stuff it into
-fixes.
Acked-by: Maarten Lankhorst <[email protected]>

Reply via email to