lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 10 Feb 2022 12:22:02 +0100
From:   Thomas Zimmermann <tzimmermann@...e.de>
To:     Daniel Vetter <daniel.vetter@...ll.ch>,
        DRI Development <dri-devel@...ts.freedesktop.org>
Cc:     linux-fbdev@...r.kernel.org,
        Intel Graphics Development <intel-gfx@...ts.freedesktop.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Qing Wang <wangqing@...o.com>,
        Daniel Vetter <daniel.vetter@...el.com>,
        Sam Ravnborg <sam@...nborg.org>, Helge Deller <deller@....de>
Subject: Re: [PATCH v2 05/19] fbdev/sysfs: Fix locking



Am 08.02.22 um 22:08 schrieb Daniel Vetter:
> fb_set_var requires we hold the fb_info lock. Or at least this now
> matches what the ioctl does ...
> 
> Note that ps3fb and sh_mobile_lcdcfb are busted in different ways here,
> but I will not fix them up.
> 
> Also in practice this isn't a big deal, because really variable fbdev
> state is actually protected by console_lock (because fbcon just
> doesn't bother with lock_fb_info() at all), and lock_fb_info
> protecting anything is really just a neat lie. But that's a much
> bigger fish to fry.
> 
> Acked-by: Sam Ravnborg <sam@...nborg.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@...el.com>
> Cc: Helge Deller <deller@....de>
> Cc: Daniel Vetter <daniel@...ll.ch>
> Cc: Qing Wang <wangqing@...o.com>
> Cc: Sam Ravnborg <sam@...nborg.org>

Acked-by: Thomas Zimmermann <tzimmermann@...e.de>

> ---
>   drivers/video/fbdev/core/fbsysfs.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/video/fbdev/core/fbsysfs.c b/drivers/video/fbdev/core/fbsysfs.c
> index 26892940c213..8c1ee9ecec3d 100644
> --- a/drivers/video/fbdev/core/fbsysfs.c
> +++ b/drivers/video/fbdev/core/fbsysfs.c
> @@ -91,9 +91,11 @@ static int activate(struct fb_info *fb_info, struct fb_var_screeninfo *var)
>   
>   	var->activate |= FB_ACTIVATE_FORCE;
>   	console_lock();
> +	lock_fb_info(fb_info);
>   	err = fb_set_var(fb_info, var);
>   	if (!err)
>   		fbcon_update_vcs(fb_info, var->activate & FB_ACTIVATE_ALL);
> +	unlock_fb_info(fb_info);
>   	console_unlock();
>   	if (err)
>   		return err;

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ