public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Shreenidhi Shedi <yesshedi@gmail.com>
Cc: dhowells@redhat.com, dwmw2@infradead.org, masahiroy@kernel.org,
	nathan@kernel.org, ndesaulniers@google.com, nicolas@fjasle.eu,
	linux-kernel@vger.kernel.org, sshedi@vmware.com,
	linux-kbuild@vger.kernel.org
Subject: Re: [PATCH v9 3/7] sign-file: move file signing logic to its own function
Date: Thu, 10 Aug 2023 07:50:16 +0200	[thread overview]
Message-ID: <2023081040-rarity-presuming-842d@gregkh> (raw)
In-Reply-To: <20230809172211.343677-4-yesshedi@gmail.com>

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@gmail.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

  reply	other threads:[~2023-08-10  5:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-09 17:22 [PATCH v9 0/7] refactor file signing program Shreenidhi Shedi
2023-08-09 17:22 ` [PATCH v9 1/7] sign-file: use getopt_long_only for parsing input args Shreenidhi Shedi
2023-08-10  5:47   ` Greg KH
2023-08-09 17:22 ` [PATCH v9 2/7] sign-file: inntroduce few new flags to make argument processing easy Shreenidhi Shedi
2023-08-10  5:48   ` Greg KH
2023-08-10  5:49   ` Greg KH
2023-08-09 17:22 ` [PATCH v9 3/7] sign-file: move file signing logic to its own function Shreenidhi Shedi
2023-08-10  5:50   ` Greg KH [this message]
2023-08-09 17:22 ` [PATCH v9 4/7] sign-file: add support to sign modules in bulk Shreenidhi Shedi
2023-08-10  5:50   ` Greg KH
2023-08-13 12:26     ` Masahiro Yamada
2023-08-09 17:22 ` [PATCH v9 5/7] sign-file: improve help message Shreenidhi Shedi
2023-08-10  6:18   ` Greg KH
2023-08-09 17:22 ` [PATCH v9 6/7] sign-file: use const with a global string constant Shreenidhi Shedi
2023-08-09 17:22 ` [PATCH v9 7/7] sign-file: fix do while styling issue Shreenidhi Shedi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2023081040-rarity-presuming-842d@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nicolas@fjasle.eu \
    --cc=sshedi@vmware.com \
    --cc=yesshedi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox