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:	Tue, 21 Jun 2011 16:10:45 +0800
From:	Amerigo Wang <amwang@...hat.com>
To:	linux-kernel@...r.kernel.org
Cc:	akpm@...ux-foundation.org, Amerigo Wang <amwang@...hat.com>,
	Hugh Dickins <hughd@...gle.com>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Rik van Riel <riel@...hat.com>, Mel Gorman <mel@....ul.ie>,
	linux-mm@...ck.org
Subject: [PATCH 4/4] mm: introduce no_ksm to disable totally KSM

Introduce a new kernel parameter "no_ksm" to totally disable KSM.

Signed-off-by: WANG Cong <amwang@...hat.com>
---
 mm/ksm.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/mm/ksm.c b/mm/ksm.c
index 9a68b0c..eeb45a2 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -1984,11 +1984,24 @@ static struct attribute_group ksm_attr_group = {
 };
 #endif /* CONFIG_SYSFS */
 
+static int no_ksm;
+static int __init setup_ksm(char *str)
+{
+	no_ksm = 1;
+	return 0;
+}
+__setup("no_ksm", setup_ksm);
+
 static int __init ksm_init(void)
 {
 	struct task_struct *ksm_thread;
 	int err;
 
+	if (no_ksm) {
+		printk(KERN_INFO "ksm: disabled by cmdline\n");
+		return 0;
+	}
+
 	err = ksm_slab_init();
 	if (err)
 		goto out;
-- 
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ