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] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y2JoDQyeqw9kO0KP@hirez.programming.kicks-ass.net>
Date:   Wed, 2 Nov 2022 13:52:29 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Alexander Potapenko <glider@...gle.com>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Marco Elver <elver@...gle.com>
Subject: Re: [PATCH 1/5] kmsan: core: kmsan_in_runtime() should return true
 in NMI context

On Wed, Nov 02, 2022 at 12:06:07PM +0100, Alexander Potapenko wrote:
> Without that, every call to __msan_poison_alloca() in NMI may end up
> allocating memory, which is NMI-unsafe.
> 
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Dmitry Vyukov <dvyukov@...gle.com>
> Cc: Marco Elver <elver@...gle.com>
> Cc: Peter Zijlstra (Intel) <peterz@...radead.org>
> Link: https://lore.kernel.org/lkml/20221025221755.3810809-1-glider@google.com/
> Signed-off-by: Alexander Potapenko <glider@...gle.com>

Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>

> ---
>  mm/kmsan/kmsan.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/mm/kmsan/kmsan.h b/mm/kmsan/kmsan.h
> index 961eb658020aa..3cd2050a33e6a 100644
> --- a/mm/kmsan/kmsan.h
> +++ b/mm/kmsan/kmsan.h
> @@ -125,6 +125,8 @@ static __always_inline bool kmsan_in_runtime(void)
>  {
>  	if ((hardirq_count() >> HARDIRQ_SHIFT) > 1)
>  		return true;
> +	if (in_nmi())
> +		return true;
>  	return kmsan_get_context()->kmsan_in_runtime;
>  }
>  
> -- 
> 2.38.1.273.g43a17bfeac-goog
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ