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-next>] [day] [month] [year] [list]
Date:   Mon,  4 Jun 2018 19:27:11 +0200
From:   Michael Rodin <michael-git@...in.online>
To:     tglx@...utronix.de, mingo@...hat.com, x86@...nel.org
Cc:     hpa@...or.com, linux-kernel@...r.kernel.org,
        Michael Rodin <michael-git@...in.online>
Subject: [PATCH] arch/x86/entry/vsyscall/vsyscall_gtod.c: remove __read_mostly from vclocks_used

The variable "vclocks_used" doesn't appear to be "read mostly".
Measurements of the access frequency with perf stat [1] and
perf report show, that approximately half of the accesses to
this variable are write accesses and happen in update_vsyscall()
in the file arch/x86/entry/vsyscall/vsyscall_gtod.c.
The measurements were done with the kernel 4.13.0-43-generic used by
ubuntu as well as with the stable kernel 4.16.7 with a custom config.
I've used "perf bench sched" and iperf3 as workloads.

This was discovered during my master thesis in the CADOS project [2].

[1] perf stat --all-cpus --group --event="{mem:addr/4:rw:k,mem:addr/4:w:k}"
[2] https://www.sra.uni-hannover.de/Research/CADOS/

Signed-off-by: Michael Rodin <michael-git@...in.online>
---
 arch/x86/entry/vsyscall/vsyscall_gtod.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/entry/vsyscall/vsyscall_gtod.c b/arch/x86/entry/vsyscall/vsyscall_gtod.c
index e1216dd95c04..fc39f701fe4a 100644
--- a/arch/x86/entry/vsyscall/vsyscall_gtod.c
+++ b/arch/x86/entry/vsyscall/vsyscall_gtod.c
@@ -17,7 +17,7 @@
 #include <asm/vgtod.h>
 #include <asm/vvar.h>
 
-int vclocks_used __read_mostly;
+int vclocks_used;
 
 DEFINE_VVAR(struct vsyscall_gtod_data, vsyscall_gtod_data);
 
-- 
2.14.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ