From nobody Sun Jun 14 02:36:19 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 13C38358D32; Mon, 4 May 2026 12:23:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777897407; cv=none; b=MVmsbLSHk2/2Z73XnJavHoBr+wq9TJLdDsaHiaSxBDHH9w3H7Xl5NnuCQtcePGymEyaQPgjgW2CjW6qkUvZkUyHpWt3fUL3x2i5VrOy5DWll/o3DH2twdAKuz3bfqW3BMBSSIVc8qZlDHN7eeT8wnwoyWv/9kNocLnRKaFUvMIE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777897407; c=relaxed/simple; bh=reBcjTEUnvdd5AMx6/7bWFMKY4+u2QVgLRWk7MQAxm8=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=tH2fGQsQP6jgt6MBGI2Oyh/cne3bKG1k9Qs7DXM8NO9L77E8yqsxBjCHDyaOkvrAbU0xDhi4JH8+OZz5/MANn7bRW2Fkjae6Cikw9kTFNEyLIpY3mazL1l3bRMfpbLMsq3W4jhcwa3taxIgS41wi3fgRFgKyPtG+69BnhsXmtYk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=EHTGfHvv; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=cFojMzeV; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="EHTGfHvv"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="cFojMzeV" Date: Mon, 04 May 2026 12:23:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1777897404; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dxm685ozK1zN9YKF2RjxiOOWVXELhfVUuIiB6XKObuU=; b=EHTGfHvvd1jvTGmp3ysIJNl+mQIj9z5MTPr1Tgye9Ib4Zz4EsecUh/wxpKc+bi2qVwlOrr gBm47YI+7Op0hIxNWTi7xzK3NWSv6oap7/goI3lMoDBVeCgTPujlPuEjrodUCnZojdHqQV F7QADhqy+FgIkpfON/uMMWZ5fqKKvGJFBdA+DPT8DUVmdt++bhGGe9Zh8eb1Ymkgk7aIFN s4Srox39F5mW3JZ9HboUn7tMeZfoyJ9mNXKVkPCUuUvGhLPiT2Dl9m+lRiZfyXdmrg80pb z6KiyWZEK6UUxi0DN4Rf2UKUNHzp8DwEpcBTLNti83f5mA9t4koCp0cIDRs6Jg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1777897404; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dxm685ozK1zN9YKF2RjxiOOWVXELhfVUuIiB6XKObuU=; b=cFojMzeVmhGC05iZlgw9o4gWeLc4kVi7HJJa8pswsSpbWP5TuNjk2pry9xkeXxH6VMbVAI RRzg170r3b7bGRBA== From: "tip-bot2 for Thorsten Blum" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cleanups] x86/boot/compressed: Use boot_kstrtoul() for hugepages= parsing Cc: Thorsten Blum , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260409161600.152012-2-thorsten.blum@linux.dev> References: <20260409161600.152012-2-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177789740286.424702.8005671059117940510.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/cleanups branch of tip: Commit-ID: 7b894dac26e56eb1de7a8e198af4b994c5d6da82 Gitweb: https://git.kernel.org/tip/7b894dac26e56eb1de7a8e198af4b994c= 5d6da82 Author: Thorsten Blum AuthorDate: Thu, 09 Apr 2026 18:15:59 +02:00 Committer: Borislav Petkov (AMD) CommitterDate: Mon, 04 May 2026 14:16:11 +02:00 x86/boot/compressed: Use boot_kstrtoul() for hugepages=3D parsing Replace simple_strtoull() with boot_kstrtoul() for parsing the hugepages=3D= boot parameter. Unlike simple_strtoull(), boot_kstrtoul() performs strict validation and returns an error on invalid inputs instead of silently accepting partial input. Use boot_kstrtoul() to reject and warn about invalid hugepages=3D va= lues. boot_kstrtoul() also converts the input directly to an unsigned long and avoids implicit casting as max_gb_huge_pages *is* an unsigned long. [ bp: Massage commit message. ] Signed-off-by: Thorsten Blum Signed-off-by: Borislav Petkov (AMD) Link: https://patch.msgid.link/20260409161600.152012-2-thorsten.blum@linux.= dev --- arch/x86/boot/compressed/kaslr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/ka= slr.c index 3b0948a..8e4bf53 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c @@ -219,7 +219,8 @@ static void parse_gb_huge_pages(char *param, char *val) =20 if (!strcmp(param, "hugepages") && gbpage_sz) { p =3D val; - max_gb_huge_pages =3D simple_strtoull(p, &p, 0); + if (boot_kstrtoul(p, 0, &max_gb_huge_pages)) + warn("Failed to parse hugepages=3D boot parameter\n"); return; } }