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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 18 Oct 2018 00:33:30 +0200
From:   Rasmus Villemoes <linux@...musvillemoes.dk>
To:     linux-kernel@...r.kernel.org
Cc:     x86@...nel.org, "H . Peter Anvin" <hpa@...or.com>,
        Ingo Molnar <mingo@...nel.org>,
        "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>
Subject: [POC 10/12] hack: /proc/rai: add rai_bucket_shift use

Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
---
 arch/x86/kernel/rai.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/x86/kernel/rai.c b/arch/x86/kernel/rai.c
index e55e85f11a2e..c4284ce7478f 100644
--- a/arch/x86/kernel/rai.c
+++ b/arch/x86/kernel/rai.c
@@ -63,11 +63,21 @@ update_rai_access(void)
 static int one, two;
 static long three;
 
+static struct hlist_head *ht1;
+static unsigned shift1;
+
 static int
 rai_proc_show(struct seq_file *m, void *v) {
+	unsigned hash = 0xdeadbeef;
+
 	seq_printf(m, "one: %d, two: %d, three: %ld\n",
 		   rai_load(one), rai_load(two), rai_load(three));
+	seq_printf(m, "ht1: %016lx, bucket 0x%08x: %016lx\n",
+		   (long)rai_load(ht1), hash, (long)rai_bucket_shift(ht1, shift1, hash));
+
 	one = two = three = -1;
+	ht1 = NULL;
+	shift1 = 2;
 
 	return 0;
 }
@@ -89,6 +99,8 @@ static int __init rai_proc_init(void) {
 	one = 1;
 	two = 2;
 	three = 3;
+	ht1 = (void*)0xffffffffabcd0000UL;
+	shift1 = 26;
 
 	proc_create("rai", 0, NULL, &rai_proc_fops);
 	return 0;
-- 
2.19.1.6.gbde171bbf5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ