From: Guenter Roeck <linux@roeck-us.net>
To: Kees Cook <keescook@chromium.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH] lib: stackinit: Adjust target string to 8 bytes for m68k
Date: Tue, 27 Feb 2024 15:03:50 -0800 [thread overview]
Message-ID: <a4bf4063-194f-4740-9c1d-88f9ab38b778@roeck-us.net> (raw)
In-Reply-To: <20240227224653.work.603-kees@kernel.org>
On Tue, Feb 27, 2024 at 02:46:56PM -0800, Kees Cook wrote:
> For reasons I cannot understand, m68k moves the start of the stack frame
> for consecutive calls to the same function if the function's test
> variable is larger than 8 bytes. This was only happening for the char
> array test (obviously), so adjust the length of the string for m68k
> only. I want the array size to be longer than "unsigned long" for every
> given architecture, so the other remain unchanged.
>
> Additionally adjust the error message to be a bit more clear about
> what's happened, and move the KUNIT check outside of the consecutive
> calls to minimize what happens between them.
>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Closes: https://lore.kernel.org/lkml/a0d10d50-2720-4ecd-a2c6-c2c5e5aeee65@roeck-us.net/
> Signed-off-by: Kees Cook <keescook@chromium.org>
Hmm, guess I misunderstood the other e-mail.
Anyway, it works. After re-enabling the m68k tests:
Tested-by: Guenter Roeck <linux@roeck-us.net>
I'll also run it through qemu for other architectures to be sure that there
is no negative impact.
Thanks,
Guenter
next prev parent reply other threads:[~2024-02-27 23:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 22:46 [PATCH] lib: stackinit: Adjust target string to 8 bytes for m68k Kees Cook
2024-02-27 22:56 ` Andreas Schwab
2024-02-27 23:03 ` Guenter Roeck [this message]
2024-02-28 7:58 ` Geert Uytterhoeven
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=a4bf4063-194f-4740-9c1d-88f9ab38b778@roeck-us.net \
--to=linux@roeck-us.net \
--cc=geert@linux-m68k.org \
--cc=keescook@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).