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] [day] [month] [year] [list]
Date:   Tue, 1 Aug 2023 07:56:39 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     oushixiong <oushixiong@...inos.cn>
Cc:     Jiri Slaby <jirislaby@...nel.org>,
        Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        Samuel Thibault <samuel.thibault@...-lyon.org>,
        Daniel Vetter <daniel.vetter@...ll.ch>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tty: vt: Remove some repetitive initialization

On Tue, Aug 01, 2023 at 01:49:33PM +0800, oushixiong wrote:
> Some members of struct vc_data have been initialized in the vc_visual(),

Which members specifically?

> so it no longer to initialized them in vc_init().
> 
> Signed-off-by: oushixiong <oushixiong@...inos.cn>
> ---
>  drivers/tty/vt/vt.c | 16 ++++------------
>  1 file changed, 4 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
> index 1e8e57b45688..cf77011a8f4e 100644
> --- a/drivers/tty/vt/vt.c
> +++ b/drivers/tty/vt/vt.c
> @@ -140,8 +140,7 @@ EXPORT_SYMBOL(vc_cons);
>  static const struct consw *con_driver_map[MAX_NR_CONSOLES];
>  
>  static int con_open(struct tty_struct *, struct file *);
> -static void vc_init(struct vc_data *vc, unsigned int rows,
> -		    unsigned int cols, int do_clear);
> +static void vc_init(struct vc_data *vc, int do_clear);
>  static void gotoxy(struct vc_data *vc, int new_x, int new_y);
>  static void save_cur(struct vc_data *vc);
>  static void reset_terminal(struct vc_data *vc, int do_clear);
> @@ -1103,7 +1102,7 @@ int vc_allocate(unsigned int currcons)	/* return 0 on success */
>  	if (global_cursor_default == -1)
>  		global_cursor_default = 1;
>  
> -	vc_init(vc, vc->vc_rows, vc->vc_cols, 1);
> +	vc_init(vc, 1);
>  	vcs_make_sysfs(currcons);
>  	atomic_notifier_call_chain(&vt_notifier_list, VT_ALLOCATE, &param);
>  
> @@ -3398,16 +3397,10 @@ module_param_named(color, default_color, int, S_IRUGO | S_IWUSR);
>  module_param_named(italic, default_italic_color, int, S_IRUGO | S_IWUSR);
>  module_param_named(underline, default_underline_color, int, S_IRUGO | S_IWUSR);
>  
> -static void vc_init(struct vc_data *vc, unsigned int rows,
> -		    unsigned int cols, int do_clear)
> +static void vc_init(struct vc_data *vc, int do_clear)
>  {
>  	int j, k ;
>  
> -	vc->vc_cols = cols;
> -	vc->vc_rows = rows;
> -	vc->vc_size_row = cols << 1;
> -	vc->vc_screenbuf_size = vc->vc_rows * vc->vc_size_row;

Where are these being set now?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ