mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: baskov@ispras.ru
To: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] x86: Add strlcat() to compressed kernel
Date: Wed, 25 May 2022 08:18:11 +0300	[thread overview]
Message-ID: <cf76c29a662b8c31b155db305b0e1736@ispras.ru> (raw)
In-Reply-To: <YnzrO8O4Q66SFED0@zn.tnic>

Sorry for delayed reply.

On 2022-05-12 14:10, Borislav Petkov wrote:
> On Thu, May 05, 2022 at 01:32:23PM +0300, Baskov Evgeniy wrote:
>> Subject: Re: [PATCH v3 1/2] x86: Add strlcat() to compressed kernel
> 
> The tip tree preferred format for patch subject prefixes is
> 'subsys/component:', e.g. 'x86/apic:', 'x86/mm/fault:', 'sched/fair:',
> 'genirq/core:'. Please do not use file names or complete file paths as
> prefix. 'git log path/to/file' should give you a reasonable hint in 
> most
> cases.
> 
> The condensed patch description in the subject line should start with a
> uppercase letter and should be written in imperative tone.
> 
> In your case, that would be x86/boot: Add...

Thank you, I'll fix that in v4.

> 
> You can add the BUG_ON() check from the kernel proper version like 
> this:
> 
> diff --git a/arch/x86/boot/compressed/string.c
> b/arch/x86/boot/compressed/string.c
> index b0635539b6f6..643fcd957527 100644
> --- a/arch/x86/boot/compressed/string.c
> +++ b/arch/x86/boot/compressed/string.c
> @@ -46,6 +46,10 @@ size_t strlcat(char *dest, const char *src, size_t 
> count)
>  	size_t len = strlen(src);
>  	size_t res = dsize + len;
> 
> +        /* This would be a bug */
> +        if (dsize >= count)
> +		error("strlcat(): destination too big\n");
> +
>  	dest += dsize;
>  	count -= dsize;
>  	if (len >= count)
> diff --git a/arch/x86/purgatory/purgatory.c 
> b/arch/x86/purgatory/purgatory.c
> index 7558139920f8..65f0cedb65ae 100644
> --- a/arch/x86/purgatory/purgatory.c
> +++ b/arch/x86/purgatory/purgatory.c
> @@ -57,3 +57,4 @@ void purgatory(void)
>   * arch/x86/boot/compressed/string.c
>   */
>  void warn(const char *msg) {}
> +void error(char *m) {}

Ok, will do.

  reply	other threads:[~2022-05-25  5:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07  2:40 [PATCH] x86: Parse CONFIG_CMDLINE in " Baskov Evgeniy
2022-05-04  8:59 ` Borislav Petkov
2022-05-04 20:40   ` baskov
2022-05-04 20:41   ` [PATCH v2 0/2] " Baskov Evgeniy
2022-05-04 20:41     ` [PATCH v2 1/2] x86: add strlcat() to " Baskov Evgeniy
2022-05-04 20:41     ` [PATCH v2 2/2] x86: Parse CONFIG_CMDLINE in " Baskov Evgeniy
2022-05-05 10:32   ` [PATCH v3 0/2] " Baskov Evgeniy
2022-05-05 10:32     ` [PATCH v3 1/2] x86: Add strlcat() to " Baskov Evgeniy
2022-05-12 11:10       ` Borislav Petkov
2022-05-25  5:18         ` baskov [this message]
2022-05-05 10:32     ` [PATCH v3 2/2] x86: Parse CONFIG_CMDLINE in " Baskov Evgeniy
2022-05-12 11:21       ` Borislav Petkov
2022-05-25  5:25         ` baskov
2022-05-25  8:22           ` Borislav Petkov
2022-05-25  9:41             ` baskov
2022-05-25 10:10     ` [PATCH v4 0/5] " Evgeniy Baskov
2022-05-25 10:10       ` [PATCH v4 1/5] x86/boot: Add strlcat() to " Evgeniy Baskov
2022-05-25 10:10       ` [PATCH v4 2/5] x86: Add resolve_cmdline() helper Evgeniy Baskov
2022-08-26 11:35         ` Borislav Petkov
2022-08-27  1:51           ` Evgeniy Baskov
2022-05-25 10:10       ` [PATCH v4 3/5] x86/setup: Use resolve_cmdline() in setup.c Evgeniy Baskov
2022-05-25 10:10       ` [PATCH v4 4/5] x86/boot: Use resolve_cmdline() in compressed kernel Evgeniy Baskov
2022-05-25 10:10       ` [PATCH v4 5/5] x86/boot: Remove no longer needed includes Evgeniy Baskov

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=cf76c29a662b8c31b155db305b0e1736@ispras.ru \
    --to=baskov@ispras.ru \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®