From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-172.mta0.migadu.com (out-172.mta0.migadu.com [91.218.175.172]) (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 D0CC837DE85 for ; Mon, 4 May 2026 10:27:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777890478; cv=none; b=Pf1fKgGlEd6gqAA3aKY5CCv75hFkHwKNxJnx5p7D9EBt0h6vr/59fqXYu9ESZpmK1llRJfac9ly1pWD63LmlU4u44bFGxv/ezXpcsMVWg/4ZZUJN2hTyllwq+xntuIti9xWrC9czPSgFKomyWyxZhiFevqRgOnef55NHjnb2wHU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777890478; c=relaxed/simple; bh=L4ssLTlxN8RE4ZlP/HBl2kkFFCdffIdKQe60vtOuuCQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IpPIIHZpktxZdQYDF6YlxjnQZE5pEQl5mtnfnxJz0+8Hf5tIq42gOkrXfVycb/84gH47R5hZGCRM2daGp8xxHIKDlm3B+0k3rMzlCjpT/PfE1V21KEJxLJ1SaMLCYl4ruvTQoS8+O1Jh1J+TQ6EuGROaBJQKbmJwaRMZgq9OQQM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=gHiJ4sA2; arc=none smtp.client-ip=91.218.175.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="gHiJ4sA2" Date: Mon, 4 May 2026 12:27:50 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1777890475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sX63MPQlOtRdtbUBhO7t8ZraMveB+CXclsLvoYtZ5Ds=; b=gHiJ4sA2QaSkmJsKoKfmW05jrcGZq3TfWmk8pL0kwYxvsCl9EZaCKbTG/di2AKJE8lP2nn XPG5l7xuCNGBwcsgNExPhu0yB1xJ3ZeoNs8ECSfiSFbYMq2kgL1WkqYG79Dn0ynB6dkzTE vHpxzcFJjySFmV8cQtfcgXNJ3YhdkV0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Thorsten Blum To: Borislav Petkov Cc: Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Changyuan Lyu , Andrew Morton , Alexander Graf , "Mike Rapoport (Microsoft)" , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] x86/boot/compressed: use boot_kstrtoul() for hugepages= parsing Message-ID: References: <20260409161600.152012-2-thorsten.blum@linux.dev> <20260504101439.GAafhxjwarRu2Htnny@fat_crate.local> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260504101439.GAafhxjwarRu2Htnny@fat_crate.local> X-Migadu-Flow: FLOW_OUT On Mon, May 04, 2026 at 12:14:39PM +0200, Borislav Petkov wrote: > On Mon, Apr 27, 2026 at 10:17:58AM +0200, Thorsten Blum wrote: > > Could you give this another look now that [1] is in mainline and 'val' > > can no longer be NULL? > > I did but looking at arch/x86/boot/string.c - we have kstrtoull() - notice the > two "ll" - there already because we copied it from kernel proper. > > So, I'm thinking you should rename it to boot_kstrtoull() in a pre-patch and > then use it in kaslr.c. > > Right? Keep in mind that max_gb_huge_pages is an unsigned long (not ull), so I think boot_kstrtoul() is the better fit. The last sentence in my commit message also mentions that boot_kstrtoul() avoids casting the parsed value from ull to ul. Thanks, Thorsten