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>] [day] [month] [year] [list]
Message-ID: <20241223085420.1815930-1-zhangheng@kylinos.cn>
Date: Mon, 23 Dec 2024 16:54:20 +0800
From: Zhang Heng <zhangheng@...inos.cn>
To: jason.wessel@...driver.com,
	danielt@...nel.org,
	dianders@...omium.org
Cc: kgdb-bugreport@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org,
	Zhang Heng <zhangheng@...inos.cn>
Subject: [PATCH v2] kdb: use kmap_local_page()

Use kmap_local_page() instead of kmap_atomic() which has been deprecated.

Signed-off-by: Zhang Heng <zhangheng@...inos.cn>
Reviewed-by: Douglas Anderson <dianders@...omium.org>
---

Changes in v2:
- add Reviewer
- update author name spelling

 kernel/debug/kdb/kdb_support.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/debug/kdb/kdb_support.c b/kernel/debug/kdb/kdb_support.c
index 0a39497140bf..1ef831cacbc2 100644
--- a/kernel/debug/kdb/kdb_support.c
+++ b/kernel/debug/kdb/kdb_support.c
@@ -305,7 +305,7 @@ int kdb_putarea_size(unsigned long addr, void *res, size_t size)
 
 /*
  * kdb_getphys - Read data from a physical address. Validate the
- * 	address is in range, use kmap_atomic() to get data
+ *	address is in range, use kmap_local_page() to get data
  * 	similar to kdb_getarea() - but for phys addresses
  * Inputs:
  * 	res	Pointer to the word to receive the result
@@ -324,9 +324,9 @@ static int kdb_getphys(void *res, unsigned long addr, size_t size)
 	if (!pfn_valid(pfn))
 		return 1;
 	page = pfn_to_page(pfn);
-	vaddr = kmap_atomic(page);
+	vaddr = kmap_local_page(page);
 	memcpy(res, vaddr + (addr & (PAGE_SIZE - 1)), size);
-	kunmap_atomic(vaddr);
+	kunmap_local(vaddr);
 
 	return 0;
 }
-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ