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: <Z9ctVxwaYOV4A2g4@grain>
Date: Sun, 16 Mar 2025 22:58:15 +0300
From: Cyrill Gorcunov <gorcunov@...il.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Anna-Maria Behnsen <anna-maria@...utronix.de>,
	Frederic Weisbecker <frederic@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: [PATCH] posix-timers: Drop redundant memset call

Initially in the commit 6891c4509c79 memset call has been
needed to clear the memory allocated on a stack, then in the
commit 2482097c6c0f memset call occasionally sneaked in regardless
the fact that we're using kmem_cache_zalloc to allocate a new timer,
lets save a few cycles dropping this call.

Signed-off-by: Cyrill Gorcunov <gorcunov@...il.com>
---
 kernel/time/posix-timers.c |    1 -
 1 file changed, 1 deletion(-)

Index: linux-tip.git/kernel/time/posix-timers.c
===================================================================
--- linux-tip.git.orig/kernel/time/posix-timers.c
+++ linux-tip.git/kernel/time/posix-timers.c
@@ -526,7 +526,6 @@ static int do_timer_create(clockid_t whi
 	} else {
 		new_timer->it_sigev_notify     = SIGEV_SIGNAL;
 		new_timer->sigq.info.si_signo = SIGALRM;
-		memset(&new_timer->sigq.info.si_value, 0, sizeof(sigval_t));
 		new_timer->sigq.info.si_value.sival_int = new_timer->it_id;
 		new_timer->it_pid = get_pid(task_tgid(current));
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ