lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202205091610.4375DD0A@keescook>
Date:   Mon, 9 May 2022 16:12:04 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Stephen Rothwell <sfr@...b.auug.org.au>
Cc:     Greg KH <greg@...ah.com>, Arnd Bergmann <arnd@...db.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Mark Rutland <mark.rutland@....com>
Subject: Re: linux-next: manual merge of the kspp tree with the char-misc tree

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ