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]
Message-ID: <YTXxaU+w0mTgeL2K@kroah.com>
Date:   Mon, 6 Sep 2021 12:46:01 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Jackie Liu <liu.yun@...ux.dev>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mdacon: fix redefinition of 'scr_memsetw'

On Mon, Sep 06, 2021 at 06:20:30PM +0800, Jackie Liu wrote:
> From: Jackie Liu <liuyun01@...inos.cn>
> 
> CONFIG_VGA_CONSOLE=n and CONFIG_MDA_CONSOLE=n will cause vt_buffer.h not
> include <asm/vga.h>.
> 
> But if we set CONFIG_MDA_CONSOLE=m, mdacon.c include <linux/vt_buffer.h>
> is in front of include <asm/vga.h>. VT_BUF_HAVE_MEMSETW is not defined,
> so vt_buffer.h will define a scr_memsetw, after that, vga.h also define
> a scr_memsetw, so the repeated definition of scr_memsetw appears, builds
> error.
> 
> We only need to make vt_buffer.h also contain vga.h when
> CONFIG_MDA_CONSOLE=m. This problem can be fixed.
> 
> BTW, mdacon.c no need to include vga.h forcibly, let vt_buffer.h do it.
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")

As this has always been an issue, how is this really a "fix"?

How can the above config options be set in this manner, do you have to
do it manually or does a system really need that configuration?


> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: linux-fbdev@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Jackie Liu <liuyun01@...inos.cn>
> ---
>  drivers/video/console/mdacon.c | 1 -
>  include/linux/vt_buffer.h      | 2 +-
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c
> index ef29b321967f..5898d01bc492 100644
> --- a/drivers/video/console/mdacon.c
> +++ b/drivers/video/console/mdacon.c
> @@ -42,7 +42,6 @@
>  #include <linux/init.h>
>  
>  #include <asm/io.h>
> -#include <asm/vga.h>
>  
>  static DEFINE_SPINLOCK(mda_lock);
>  
> diff --git a/include/linux/vt_buffer.h b/include/linux/vt_buffer.h
> index 848db1b1569f..3e71f879e7c0 100644
> --- a/include/linux/vt_buffer.h
> +++ b/include/linux/vt_buffer.h
> @@ -16,7 +16,7 @@
>  
>  #include <linux/string.h>
>  
> -#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE)
> +#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE) || defined(CONFIG_MDA_CONSOLE_MODULE)

If this really is needed, please use the correct define macro that
catches both of these options.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ