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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 12 Oct 2012 14:45:22 +0800
From:	Zhang Yanfei <zhangyanfei@...fujitsu.com>
To:	x86@...nel.org, kexec@...ts.infradead.org,
	linux-doc@...r.kernel.org, Avi Kivity <avi@...hat.com>,
	mtosatti@...hat.com
CC:	linux-kernel@...r.kernel.org,
	"kvm@...r.kernel.org" <kvm@...r.kernel.org>
Subject: [PATCH 3/3] sysctl: introduce a new interface to control kdump-vmcs-clear
 behaviour

This patch exports the variable clear_loaded_vmcs_enabled to userspace.

Signed-off-by: zhangyanfei <zhangyanfei@...fujitsu.com>
---
 Documentation/sysctl/kernel.txt |    8 ++++++++
 kernel/sysctl.c                 |   10 ++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 6d78841..038148b 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -25,6 +25,7 @@ show up in /proc/sys/kernel:
 - bootloader_version	     [ X86 only ]
 - callhome		     [ S390 only ]
 - cap_last_cap
+- clear_loaded_vmcs	     [ X86 only ]
 - core_pattern
 - core_pipe_limit
 - core_uses_pid
@@ -164,6 +165,13 @@ CAP_LAST_CAP from the kernel.
 
 ==============================================================
 
+clear_loaded_vmcs
+
+Controls if VMCSs should be cleared when host is doing kdump.  Exports
+clear_loaded_vmcs_enabled from the kernel.
+
+==============================================================
+
 core_pattern:
 
 core_pattern is used to specify a core dumpfile pattern name.
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 4ab1187..3ab7d9c 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -63,6 +63,7 @@
 
 #include <asm/uaccess.h>
 #include <asm/processor.h>
+#include <asm/kexec.h>
 
 #ifdef CONFIG_X86
 #include <asm/nmi.h>
@@ -994,6 +995,15 @@ static struct ctl_table kern_table[] = {
 		.proc_handler	= proc_dointvec,
 	},
 #endif
+#ifdef CONFIG_KEXEC
+	{
+		.procname	= "clear_loaded_vmcs",
+		.data		= &clear_loaded_vmcs_enabled,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= proc_dointvec,
+	},
+#endif
 	{ }
 };
 
-- 
1.7.1
--
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