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]
Message-ID: <1427447958-42138-1-git-send-email-long.wanglong@huawei.com>
Date:	Fri, 27 Mar 2015 09:19:18 +0000
From:	Wang Long <long.wanglong@...wei.com>
To:	<keescook@...omium.org>, <ccross@...roid.com>, <anton@...msg.org>,
	<tony.luck@...el.com>, <tony@...mide.com>
CC:	<linux-kernel@...r.kernel.org>, <long.wanglong@...wei.com>,
	<peifeiyue@...wei.com>, <morgan.wang@...wei.com>,
	<sergiu@...omium.org>, <salyzyn@...roid.com>,
	<anton.vorontsov@...aro.org>, <marco.stornelli@...il.com>
Subject: [PATCH] ramoops: make it possible to change mem_type param.

If we set ramoops.mem_type=1 in command line, the current
code can not change mem_type to 1, because it is assigned
to 0 in function ramoops_register_dummy.

This patch make it possible to change mem_type parameter
in command line.

Signed-off-by: Wang Long <long.wanglong@...wei.com>
---
 fs/pstore/ram.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 44a549b..65e0532 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -65,7 +65,7 @@ module_param(mem_size, ulong, 0400);
 MODULE_PARM_DESC(mem_size,
 		"size of reserved RAM used to store oops/panic logs");
 
-static unsigned int mem_type;
+static unsigned int mem_type = 0;
 module_param(mem_type, uint, 0600);
 MODULE_PARM_DESC(mem_type,
 		"set to 1 to try to use unbuffered memory (default 0)");
@@ -608,7 +608,7 @@ static void ramoops_register_dummy(void)
 
 	dummy_data->mem_size = mem_size;
 	dummy_data->mem_address = mem_address;
-	dummy_data->mem_type = 0;
+	dummy_data->mem_type = mem_type;
 	dummy_data->record_size = record_size;
 	dummy_data->console_size = ramoops_console_size;
 	dummy_data->ftrace_size = ramoops_ftrace_size;
-- 
1.8.3.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