linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the kspp tree with the char-misc tree
@ 2022-05-05  7:20 Stephen Rothwell
  2022-05-07 17:17 ` Kees Cook
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2022-05-05  7:20 UTC (permalink / raw)
  To: Kees Cook, Greg KH, Arnd Bergmann
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Mark Rutland

[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]

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 commit:

  c393c0b98d75 ("lkdtm/stackleak: prevent unexpected stack usage")

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,52800583fd05..000000000000
--- a/drivers/misc/lkdtm/stackleak.c
+++ b/drivers/misc/lkdtm/stackleak.c
@@@ -81,11 -115,11 +115,20 @@@ 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);
+ }
++
 +static struct crashtype crashtypes[] = {
 +	CRASHTYPE(STACKLEAK_ERASING),
 +};
 +
 +struct crashtype_category stackleak_crashtypes = {
 +	.crashtypes = crashtypes,
 +	.len	    = ARRAY_SIZE(crashtypes),
 +};

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: manual merge of the kspp tree with the char-misc tree
  2022-05-05  7:20 linux-next: manual merge of the kspp tree with the char-misc tree Stephen Rothwell
@ 2022-05-07 17:17 ` Kees Cook
  0 siblings, 0 replies; 4+ messages in thread
From: Kees Cook @ 2022-05-07 17:17 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Greg KH, Arnd Bergmann, Linux Kernel Mailing List,
	Linux Next Mailing List, Mark Rutland

On Thu, May 05, 2022 at 05:20:10PM +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 commit:
> 
>   c393c0b98d75 ("lkdtm/stackleak: prevent unexpected stack usage")
> 
> 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,52800583fd05..000000000000
> --- a/drivers/misc/lkdtm/stackleak.c
> +++ b/drivers/misc/lkdtm/stackleak.c
> @@@ -81,11 -115,11 +115,20 @@@ 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);
> + }
> ++
>  +static struct crashtype crashtypes[] = {
>  +	CRASHTYPE(STACKLEAK_ERASING),
>  +};
>  +
>  +struct crashtype_category stackleak_crashtypes = {
>  +	.crashtypes = crashtypes,
>  +	.len	    = ARRAY_SIZE(crashtypes),
>  +};

Thanks! This looks correct to me.


-- 
Kees Cook

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: manual merge of the kspp tree with the char-misc tree
  2022-05-09  8:53 Stephen Rothwell
@ 2022-05-09 23:12 ` Kees Cook
  0 siblings, 0 replies; 4+ messages in thread
From: Kees Cook @ 2022-05-09 23:12 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Greg KH, Arnd Bergmann, Linux Kernel Mailing List,
	Linux Next Mailing List, Mark Rutland

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* linux-next: manual merge of the kspp tree with the char-misc tree
@ 2022-05-09  8:53 Stephen Rothwell
  2022-05-09 23:12 ` Kees Cook
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2022-05-09  8:53 UTC (permalink / raw)
  To: Kees Cook, Greg KH, Arnd Bergmann
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Mark Rutland

[-- Attachment #1: Type: text/plain, Size: 1900 bytes --]

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),
 +};

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-09 23:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05  7:20 linux-next: manual merge of the kspp tree with the char-misc tree Stephen Rothwell
2022-05-07 17:17 ` Kees Cook
2022-05-09  8:53 Stephen Rothwell
2022-05-09 23:12 ` Kees Cook

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).