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]
Message-Id: <1611330937-22654-3-git-send-email-zhaowei1102@thundersoft.com>
Date:   Fri, 22 Jan 2021 07:55:37 -0800
From:   Wesley Zhao <zhaowei1102@...ndersoft.com>
To:     akpm@...ux-foundation.org
Cc:     andriy.shevchenko@...ux.intel.com, keescook@...omium.org,
        tglx@...utronix.de, kerneldev@...smulder.nl, nivedita@...m.mit.edu,
        joe@...ches.com, gpiccoli@...onical.com, aquini@...hat.com,
        gustavoars@...nel.org, zhaowei1102@...ndersoft.com,
        ojeda@...nel.org, ndesaulniers@...ogle.com,
        linux-kernel@...r.kernel.org, david@...hat.com,
        dan.j.williams@...el.com, guohanjun@...wei.com,
        mchehab+huawei@...nel.org
Subject: [PATCH v3 2/2] resource: Make it possible to reserve memory on 64bit platform

For now "reserve=" is limitied to 32bit,not available on 64bit
platform,so we change the get_option() to get_option_ull(added in
patch: commit 4b6bfe96265e ("lib/cmdline: add new function
get_option_ull()"))

Signed-off-by: Wesley Zhao <zhaowei1102@...ndersoft.com>
---
 kernel/resource.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/resource.c b/kernel/resource.c
index 833394f9c608..ee2a0e5d196f 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -1567,13 +1567,13 @@ static int __init reserve_setup(char *str)
 	static struct resource reserve[MAXRESERVE];
 
 	for (;;) {
-		unsigned int io_start, io_num;
+		unsigned long long io_start, io_num;
 		int x = reserved;
 		struct resource *parent;
 
-		if (get_option(&str, &io_start) != 2)
+		if (get_option_ull(&str, &io_start) != 2)
 			break;
-		if (get_option(&str, &io_num) == 0)
+		if (get_option_ull(&str, &io_num) == 0)
 			break;
 		if (x < MAXRESERVE) {
 			struct resource *res = reserve + x;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ