Linux Hardening
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: David Gow <davidgow@google.com>
Cc: linux-hardening@vger.kernel.org,
	Nathan Chancellor <nathan@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fortify: Adjust KUnit test for modular build
Date: Wed, 14 Sep 2022 06:59:24 -0700	[thread overview]
Message-ID: <202209140658.A471548@keescook> (raw)
In-Reply-To: <CABVgOSnSsMxHQJNPs77rzA729wW1k6o17_ERqGvszFVkQ-hv_Q@mail.gmail.com>

On Wed, Sep 14, 2022 at 06:13:59PM +0800, David Gow wrote:
> On Wed, Sep 14, 2022 at 1:31 AM Kees Cook <keescook@chromium.org> wrote:
> >
> > A much better "unknown size" string pointer is available directly from
> > struct test, so use that instead of a global that isn't shared with
> > modules.
> >
> > Reported-by: Nathan Chancellor <nathan@kernel.org>
> > Link: https://lore.kernel.org/lkml/YyCOHOchVuE/E7vS@dev-arch.thelio-3990X
> > Fixes: 875bfd5276f3 ("fortify: Add KUnit test for FORTIFY_SOURCE internals")
> > Cc: linux-hardening@vger.kernel.org
> > Signed-off-by: Kees Cook <keescook@chromium.org>
> > ---
> > Whoops! Thanks Nathan! :) This fixes it for your reproducer.
> 
> Ah, this is better than saved_command_line, IMO. I don't think it'd
> necessarily be a _disaster_ to just introduce a new dynamically-sized
> string here, which would be more explicit, but test->name is at least
> obviously related to this file anyway.

Yeah, and I'm trying to explicitly use a string that the compiler won't
immediately be able to see through, so best to get it from an external
source.

> Reviewed-by: David Gow <davidgow@google.com>

Thanks!

-Kees

-- 
Kees Cook

      reply	other threads:[~2022-09-14 13:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-13 17:31 [PATCH] fortify: Adjust KUnit test for modular build Kees Cook
2022-09-13 22:05 ` Nathan Chancellor
2022-09-14 10:13 ` David Gow
2022-09-14 13:59   ` Kees Cook [this message]

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=202209140658.A471548@keescook \
    --to=keescook@chromium.org \
    --cc=davidgow@google.com \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@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