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: <20230124193004.206841-5-ebiggers@kernel.org>
Date:   Tue, 24 Jan 2023 11:29:48 -0800
From:   Eric Biggers <ebiggers@...nel.org>
To:     stable@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Kees Cook <keescook@...omium.org>, SeongJae Park <sj@...nel.org>,
        Seth Jenkins <sethjenkins@...gle.com>,
        Jann Horn <jannh@...gle.com>,
        "Eric W . Biederman" <ebiederm@...ssion.com>,
        linux-hardening@...r.kernel.org, linux-kernel@...r.kernel.org,
        Andrey Ryabinin <ryabinin.a.a@...il.com>,
        Baoquan He <bhe@...hat.com>, Jonathan Corbet <corbet@....net>,
        Xuefeng Li <lixuefeng@...ngson.cn>,
        Tiezhu Yang <yangtiezhu@...ngson.cn>,
        Marco Elver <elver@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: [PATCH 5.10 04/20] ubsan: no need to unset panic_on_warn in ubsan_epilogue()

From: Tiezhu Yang <yangtiezhu@...ngson.cn>

commit d83ce027a54068fabb70d2c252e1ce2da86784a4 upstream.

panic_on_warn is unset inside panic(), so no need to unset it before
calling panic() in ubsan_epilogue().

Link: https://lkml.kernel.org/r/1644324666-15947-5-git-send-email-yangtiezhu@loongson.cn
Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
Reviewed-by: Marco Elver <elver@...gle.com>
Cc: Andrey Ryabinin <ryabinin.a.a@...il.com>
Cc: Baoquan He <bhe@...hat.com>
Cc: Jonathan Corbet <corbet@....net>
Cc: Xuefeng Li <lixuefeng@...ngson.cn>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
Signed-off-by: Eric Biggers <ebiggers@...gle.com>
---
 lib/ubsan.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/lib/ubsan.c b/lib/ubsan.c
index adf8dcf3c84e6..d81d107f64f41 100644
--- a/lib/ubsan.c
+++ b/lib/ubsan.c
@@ -151,16 +151,8 @@ static void ubsan_epilogue(void)
 
 	current->in_ubsan--;
 
-	if (panic_on_warn) {
-		/*
-		 * This thread may hit another WARN() in the panic path.
-		 * Resetting this prevents additional WARN() from panicking the
-		 * system on this thread.  Other threads are blocked by the
-		 * panic_mutex in panic().
-		 */
-		panic_on_warn = 0;
+	if (panic_on_warn)
 		panic("panic_on_warn set ...\n");
-	}
 }
 
 static void handle_overflow(struct overflow_data *data, void *lhs,
-- 
2.39.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ