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:   Fri, 4 Feb 2022 20:45:46 +0100
From:   Sam Ravnborg <sam@...nborg.org>
To:     Daniel Vetter <daniel.vetter@...ll.ch>
Cc:     DRI Development <dri-devel@...ts.freedesktop.org>,
        linux-fbdev@...r.kernel.org,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Du Cheng <ducheng2@...il.com>,
        Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
        Intel Graphics Development <intel-gfx@...ts.freedesktop.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Claudio Suarez <cssk@...-c.es>,
        Daniel Vetter <daniel.vetter@...el.com>
Subject: Re: [PATCH 15/21] fbcon: Consistently protect deferred_takeover with
 console_lock()

On Mon, Jan 31, 2022 at 10:05:46PM +0100, Daniel Vetter wrote:
> This shouldn't be a problem in practice since until we've actually
> taken over the console there's nothing we've registered with the
> console/vt subsystem, so the exit/unbind path that check this can't
> do the wrong thing. But it's confusing, so fix it by moving it a tad
> later.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@...el.com>
> Cc: Daniel Vetter <daniel@...ll.ch>
> Cc: Du Cheng <ducheng2@...il.com>
> Cc: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
> Cc: Claudio Suarez <cssk@...-c.es>
> Cc: Thomas Zimmermann <tzimmermann@...e.de>

It had helped me if the commitlog was explicit that the
deferred_takeover falg is moved to the worker function to reset it as
late as possible.

With the commit log updated:
Acked-by: Sam Ravnborg <sam@...nborg.org>


> ---
>  drivers/video/fbdev/core/fbcon.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
> index 496bc5f2133e..11b9f962af6f 100644
> --- a/drivers/video/fbdev/core/fbcon.c
> +++ b/drivers/video/fbdev/core/fbcon.c
> @@ -3247,6 +3247,9 @@ static void fbcon_register_existing_fbs(struct work_struct *work)
>  
>  	console_lock();
>  
> +	deferred_takeover = false;
> +	logo_shown = FBCON_LOGO_DONTSHOW;
> +
>  	for_each_registered_fb(i)
>  		fbcon_fb_registered(registered_fb[i]);
>  
> @@ -3264,8 +3267,6 @@ static int fbcon_output_notifier(struct notifier_block *nb,
>  	pr_info("fbcon: Taking over console\n");
>  
>  	dummycon_unregister_output_notifier(&fbcon_output_nb);
> -	deferred_takeover = false;
> -	logo_shown = FBCON_LOGO_DONTSHOW;
>  
>  	/* We may get called in atomic context */
>  	schedule_work(&fbcon_deferred_takeover_work);
> -- 
> 2.33.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ