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: <f8aa0762-4af2-54a2-c9e8-8023a4b7aed5@kernel.org>
Date:   Fri, 17 Jul 2020 08:10:45 +0200
From:   Jiri Slaby <jirislaby@...nel.org>
To:     "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] tty: Avoid the use of one-element arrays

On 16. 07. 20, 20:08, Gustavo A. R. Silva wrote:
> One-element arrays are being deprecated[1]. Replace the one-element arrays
> with simple value types 'char reserved_char' and 'compat_int_t reserved'[2],
> once it seems these are just placeholders for alignment.
> 
> Also, while there, use the preferred form for passing a size of a struct.
> The alternative form where struct name is spelled out hurts readability
> and introduces an opportunity for a bug when the variable type is changed
> but the corresponding sizeof that is passed as argument is not.
> 
> Lastly, fix the checkpatch.pl warnings below:
> 
> ERROR: code indent should use tabs where possible
> +        char    reserved_char;$
> 
> WARNING: please, no spaces at the start of a line
> +        char    reserved_char;$
> 
> ERROR: code indent should use tabs where possible
> +        compat_int_t    reserved;$
> 
> WARNING: please, no spaces at the start of a line
> +        compat_int_t    reserved;$

May I ask you to send a follow-up patch to fix the whole structure's
indentation?

> [1] https://github.com/KSPP/linux/issues/79
> [2] https://github.com/KSPP/linux/issues/86
> 
> Tested-by: kernel test robot <lkp@...el.com>
> Link: https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/0-day/tty-20200716.md
> Signed-off-by: Gustavo A. R. Silva <gustavoars@...nel.org>

Acked-by: Jiri Slaby <jirislaby@...nel.org>

thanks,
-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ