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: <2023081040-rarity-presuming-842d@gregkh>
Date:   Thu, 10 Aug 2023 07:50:16 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Shreenidhi Shedi <yesshedi@...il.com>
Cc:     dhowells@...hat.com, dwmw2@...radead.org, masahiroy@...nel.org,
        nathan@...nel.org, ndesaulniers@...gle.com, nicolas@...sle.eu,
        linux-kernel@...r.kernel.org, sshedi@...are.com,
        linux-kbuild@...r.kernel.org
Subject: Re: [PATCH v9 3/7] sign-file: move file signing logic to its own
 function

On Wed, Aug 09, 2023 at 10:52:06PM +0530, Shreenidhi Shedi wrote:
> Keep the main function bare minimal and do less in main function.

"do less" means exactly what?

> This patch is pre-work for bulk module signing support.
> 
> Signed-off-by: Shreenidhi Shedi <yesshedi@...il.com>
> ---
>  scripts/sign-file.c | 115 +++++++++++++++++++++-----------------------
>  1 file changed, 54 insertions(+), 61 deletions(-)
> 
> diff --git a/scripts/sign-file.c b/scripts/sign-file.c
> index b0f340ea629b..64d5e00f08e2 100644
> --- a/scripts/sign-file.c
> +++ b/scripts/sign-file.c
> @@ -313,10 +313,10 @@ static void parse_args(int argc, char **argv, struct cmd_opts *opts)
>  	} while (opt != -1);
>  }
>  
> -int main(int argc, char **argv)
> +static int sign_single_file(struct cmd_opts *opts)
>  {
>  	struct module_signature sig_info = { .id_type = PKEY_ID_PKCS7 };
> -	unsigned char buf[4096];
> +	unsigned char buf[4096] = {};

Why make this change?  What requires it to now be zero initialized?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ