From nobody Fri Dec 19 07:21:09 2025 Received: from esa2.hc555-34.eu.iphmx.com (esa2.hc555-34.eu.iphmx.com [23.90.104.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E97A328B43 for ; Tue, 16 Dec 2025 13:28:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=23.90.104.147 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765891726; cv=none; b=qYdX5VQ927gVLYF0NSht7+cm/uE5PsLoSgRsDmDsXvPPqetj+Cc+0uz+zvctxMakwgVQ/tF+h73vZMtwSkey9d+Guef7SAj5aIod1jaiqKVW8Atky1tE8Ql/9QlcsFsdUaszw01+Iutc6Goc6ORgoru9b4vUS2OMhCjXYQL6sEQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765891726; c=relaxed/simple; bh=+k+9060VbjZlu9Xk37ggzq9agHSaf6TFpI6uV0BnxcM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=r0bbPDZYqyDCnOXYYkFQcJBZyNRC6MNiwBrRcRrYX93FTWR5wXJU3SMgdizNSDVvt4QzfX2PSqeA/k5MR/ISOeP8swpBl9AzfpgtDOUY0dnysS51O2jPVD6B194yssazYc/3wKVXhs26NgWZt/whW+lXiEe5ur8nla24rCbKYR4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mobileye.com; spf=pass smtp.mailfrom=mobileye.com; dkim=fail (0-bit key) header.d=mobileye.com header.i=@mobileye.com header.b=P2ruUXzn reason="key not found in DNS"; arc=none smtp.client-ip=23.90.104.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mobileye.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mobileye.com Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=mobileye.com header.i=@mobileye.com header.b="P2ruUXzn" DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mobileye.com; i=@mobileye.com; q=dns/txt; s=MoEyIP; t=1765891723; x=1797427723; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+k+9060VbjZlu9Xk37ggzq9agHSaf6TFpI6uV0BnxcM=; b=P2ruUXzndzpFKQ3IR6PGywXyaomoq26v4qvFbFr/qNRDs+gkQZ6jrzRr 6BGatEp3k5JZQrKGTn/YgtpmXTdAjSrVlASUGKoXfEf3zQ+qsERRsCJeo YWUQjPg1z0TBXwd7ks2XsEvC/AVDrXOneiOJXyKPQEQN2Shz2b68l9QVq 2v8SubDe9zoj4+Vhi2NHL/UjNNcokYOPcyqVNIsCf3gKYxnrPTw5Mxlj1 4FXanvWLLnKJTSktGLK1rhN5/QcRaaXrg0sA20epeCKckCfZngt11YvFu wmpuVGZOo46qjau97aZMDZ5Bj7XcgixAC4E66OpIcvjbfPYeV38Yy/Wak w==; X-CSE-ConnectionGUID: uQt6+sSCSkq7gwxlCbF4xw== X-CSE-MsgGUID: xEnpMosHQ5edwqpeFgsXRQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from unknown (HELO ces01_data.me-corp.lan) ([146.255.191.134]) by esa2.hc555-34.eu.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Dec 2025 15:28:36 +0200 X-CSE-ConnectionGUID: qDu5oNm+RT+I2zFZyqnFsA== X-CSE-MsgGUID: n5AbACJbStS91yR4szaKew== Received: from unknown (HELO epgd034.me-corp.lan) ([10.154.54.6]) by ces01_data.me-corp.lan with SMTP; 16 Dec 2025 15:29:45 +0200 Received: by epgd034.me-corp.lan (sSMTP sendmail emulation); Tue, 16 Dec 2025 15:28:34 +0200 From: Pnina Feder To: Andrew Morton , Baoquan He Cc: Vivek Goyal , Dave Young , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Pnina Feder Subject: [PATCH 1/2] kernel: vmcoreinfo: allocate vmcoreinfo_data based on VMCOREINFO_BYTES Date: Tue, 16 Dec 2025 15:28:00 +0200 Message-ID: <20251216132801.807260-2-pnina.feder@mobileye.com> In-Reply-To: <20251216132801.807260-1-pnina.feder@mobileye.com> References: <20251216132801.807260-1-pnina.feder@mobileye.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" VMCOREINFO_BYTES defines the size of vmcoreinfo data, but the current implementation assumes a single page allocation. Allocate vmcoreinfo_data using get_order(VMCOREINFO_BYTES) so that vmcoreinfo can safely grow beyond PAGE_SIZE. This avoids hidden assumptions and keeps vmcoreinfo size consistent across the kernel. Signed-off-by: Pnina Feder --- kernel/vmcore_info.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/vmcore_info.c b/kernel/vmcore_info.c index fe9bf8db1922..22b3205dd4dc 100644 --- a/kernel/vmcore_info.c +++ b/kernel/vmcore_info.c @@ -137,7 +137,9 @@ EXPORT_SYMBOL_GPL(hwerr_log_error_type); =20 static int __init crash_save_vmcoreinfo_init(void) { - vmcoreinfo_data =3D (unsigned char *)get_zeroed_page(GFP_KERNEL); + int order; + order =3D get_order(VMCOREINFO_BYTES); + vmcoreinfo_data =3D (unsigned char *)__get_free_pages(GFP_KERNEL | __GFP_= ZERO, order); if (!vmcoreinfo_data) { pr_warn("Memory allocation for vmcoreinfo_data failed\n"); return -ENOMEM; @@ -146,7 +148,7 @@ static int __init crash_save_vmcoreinfo_init(void) vmcoreinfo_note =3D alloc_pages_exact(VMCOREINFO_NOTE_SIZE, GFP_KERNEL | __GFP_ZERO); if (!vmcoreinfo_note) { - free_page((unsigned long)vmcoreinfo_data); + free_pages((unsigned long)vmcoreinfo_data, order); vmcoreinfo_data =3D NULL; pr_warn("Memory allocation for vmcoreinfo_note failed\n"); return -ENOMEM; --=20 2.43.0