From: Kees Cook <keescook@chromium.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Greg KH <greg@kroah.com>, Arnd Bergmann <arnd@arndb.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Subject: Re: linux-next: manual merge of the kspp tree with the char-misc tree
Date: Mon, 9 May 2022 16:12:04 -0700 [thread overview]
Message-ID: <202205091610.4375DD0A@keescook> (raw)
In-Reply-To: <20220509185344.3fe1a354@canb.auug.org.au>
On Mon, May 09, 2022 at 06:53:44PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the kspp tree got a conflict in:
>
> drivers/misc/lkdtm/stackleak.c
>
> between commit:
>
> 73f62e60d80c ("lkdtm: Move crashtype definitions into each category")
>
> from the char-misc tree and commits:
>
> c393c0b98d75 ("lkdtm/stackleak: prevent unexpected stack usage")
> 932c12ae7963 ("lkdtm/stackleak: fix CONFIG_GCC_PLUGIN_STACKLEAK=n")
>
> from the kspp tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc drivers/misc/lkdtm/stackleak.c
> index 210c84dfe1d2,82369c6f889e..000000000000
> --- a/drivers/misc/lkdtm/stackleak.c
> +++ b/drivers/misc/lkdtm/stackleak.c
> @@@ -81,11 -115,21 +115,29 @@@ out
> }
> }
>
> -void lkdtm_STACKLEAK_ERASING(void)
> ++static void lkdtm_STACKLEAK_ERASING(void)
> + {
> + unsigned long flags;
> +
> + local_irq_save(flags);
> + check_stackleak_irqoff();
> + local_irq_restore(flags);
> + }
> + #else /* defined(CONFIG_GCC_PLUGIN_STACKLEAK) */
> -void lkdtm_STACKLEAK_ERASING(void)
> ++static void lkdtm_STACKLEAK_ERASING(void)
> + {
> + if (IS_ENABLED(CONFIG_HAVE_ARCH_STACKLEAK)) {
> + pr_err("XFAIL: stackleak is not enabled (CONFIG_GCC_PLUGIN_STACKLEAK=n)\n");
> + } else {
> + pr_err("XFAIL: stackleak is not supported on this arch (HAVE_ARCH_STACKLEAK=n)\n");
> + }
> + }
> + #endif /* defined(CONFIG_GCC_PLUGIN_STACKLEAK) */
> +static struct crashtype crashtypes[] = {
> + CRASHTYPE(STACKLEAK_ERASING),
> +};
> +
> +struct crashtype_category stackleak_crashtypes = {
> + .crashtypes = crashtypes,
> + .len = ARRAY_SIZE(crashtypes),
> +};
Thanks! Yes, this looks correct. The "tricky" bit here is making sure
both lkdtm_STACKLEAK_ERASING instances are static, which you did. :)
-Kees
--
Kees Cook
next prev parent reply other threads:[~2022-05-09 23:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 8:53 linux-next: manual merge of the kspp tree with the char-misc tree Stephen Rothwell
2022-05-09 23:12 ` Kees Cook [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-05-05 7:20 Stephen Rothwell
2022-05-07 17:17 ` Kees Cook
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=202205091610.4375DD0A@keescook \
--to=keescook@chromium.org \
--cc=arnd@arndb.de \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=sfr@canb.auug.org.au \
/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).