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>] [day] [month] [year] [list]
Message-Id: <20170929162221.32500-1-aryabinin@virtuozzo.com>
Date:   Fri, 29 Sep 2017 19:22:21 +0300
From:   Andrey Ryabinin <aryabinin@...tuozzo.com>
To:     akpm@...ux-foundation.org, Dmitry Vyukov <dvyukov@...gle.com>
Cc:     Andrey Konovalov <andreyknvl@...gle.com>,
        syzkaller@...glegroups.com, Mark Rutland <mark.rutland@....com>,
        linux-kernel@...r.kernel.org,
        Andrey Ryabinin <aryabinin@...tuozzo.com>
Subject: [PATCH v2] kcov: remove pointless current != NULL check

__sanitizer_cov_trace_pc() is a hot code, so it's worth
to remove pointless '!current' check. Current is never NULL.

Signed-off-by: Andrey Ryabinin <aryabinin@...tuozzo.com>
Acked-by: Dmitry Vyukov <dvyukov@...gle.com>
Acked-by: Mark Rutland <mark.rutland@....com>
---

Changes since v1:
 - Collect acks and drop other patches.

 kernel/kcov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/kcov.c b/kernel/kcov.c
index 3f693a0f6f3e..d9a4ee1f3423 100644
--- a/kernel/kcov.c
+++ b/kernel/kcov.c
@@ -61,7 +61,7 @@ void notrace __sanitizer_cov_trace_pc(void)
 	 * We are interested in code coverage as a function of a syscall inputs,
 	 * so we ignore code executed in interrupts.
 	 */
-	if (!t || !in_task())
+	if (!in_task())
 		return;
 	mode = READ_ONCE(t->kcov_mode);
 	if (mode == KCOV_MODE_TRACE) {
-- 
2.13.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ