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: <20240130101802.23850-1-gaoshanliukou@163.com>
Date: Tue, 30 Jan 2024 18:18:02 +0800
From: "yang.zhang" <gaoshanliukou@....com>
To: ebiederm@...ssion.com
Cc: kexec@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	"yang.zhang" <yang.zhang@...intek.com>
Subject: [PATCH] kexec: should use uchunk for user buffer increasing

From: "yang.zhang" <yang.zhang@...intek.com>

Because of alignment requirement in kexec-tools, there is
no problem for user buffer increasing when loading segments.
But when coping, the step is uchunk, so we should use uchunk
not mchunk.

Signed-off-by: yang.zhang <yang.zhang@...intek.com>
---
 kernel/kexec_core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
index d08fc7b5db97..2b8354313c85 100644
--- a/kernel/kexec_core.c
+++ b/kernel/kexec_core.c
@@ -813,9 +813,9 @@ static int kimage_load_normal_segment(struct kimage *image,
 		ubytes -= uchunk;
 		maddr  += mchunk;
 		if (image->file_mode)
-			kbuf += mchunk;
+			kbuf += uchunk;
 		else
-			buf += mchunk;
+			buf += uchunk;
 		mbytes -= mchunk;
 
 		cond_resched();
@@ -881,9 +881,9 @@ static int kimage_load_crash_segment(struct kimage *image,
 		ubytes -= uchunk;
 		maddr  += mchunk;
 		if (image->file_mode)
-			kbuf += mchunk;
+			kbuf += uchunk;
 		else
-			buf += mchunk;
+			buf += uchunk;
 		mbytes -= mchunk;
 
 		cond_resched();
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ