From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) (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 7D0A625EF9C for ; Fri, 19 Jun 2026 01:01:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781830875; cv=none; b=Mzzl2k/h6HfG5wOf1XGGf5zHxUrm3oQFml9++8oO9r2Ed3uaxo5k59ikrrU78Lpf5FJyGsD/Sfw9zUMBJxqG+QpFVyUwQcHbzVNfhS7p5M7kmKccYvZvr0doSry3tOcZtf/TAAnFfC4dtZHVXThwoOTef8prPgf9Ok6GpJRscFs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781830875; c=relaxed/simple; bh=vWU4y/9AUwfNOdg2vbkKpg4qleT4xl+5ON1cDJ/l6Ig=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uluhR1UEduBDVpSpfdV2pvQDqKlgnPye5auMVm89Y3u+qggG5MLAoXuGSIa8vrs2N9pt70OWBQikqr/ByGPdptkJQlV0qGU1xZwS6kZ8ntfjnyowryIHNDBn2gmqvFACETSWs0gpoL8vIrx44POrbN7aU1nUFqzvtG8dzMow5ZI= 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=DLwpcMpM; arc=none smtp.client-ip=95.215.58.177 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="DLwpcMpM" Date: Fri, 19 Jun 2026 03:00:54 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1781830868; 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=k70ZMLfJI+DKF1FXErvBW/4C1x6uSAeAHxGByuIt5xE=; b=DLwpcMpM4y9iG8awrzT+a/8u5cte2oTBpPBV/H6DtydKXo/6OAoraWaFbvFgCNgffIW4Kx p8VQCb4t7FhawgSyC1fed4smex+TQTYTjnvAQBvXw1bsMAHhlV6epoESkCOHwEWMwvnrHm ZrUp2GNfhOrjYEl/eyvph6UEBPuUibM= 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" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/boot: Reject truncated acpi_rsdp= values Message-ID: References: <20260617130417.36651-4-thorsten.blum@linux.dev> <20260618045400.GCajN56AKctO0qB-sF@fat_crate.local> <20260618163856.GAajQfIDh0s31VINiS@fat_crate.local> <20260618180412.GBajQzHB3Rj0SrS1Eo@fat_crate.local> <20260618193409.GFajRIMdiw-2WGJRKN@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: <20260618193409.GFajRIMdiw-2WGJRKN@fat_crate.local> X-Migadu-Flow: FLOW_OUT On Thu, Jun 18, 2026 at 12:34:09PM -0700, Borislav Petkov wrote: > On Thu, Jun 18, 2026 at 08:57:56PM +0200, Thorsten Blum wrote: > > Only far enough to avoid using a value the user didn't actually enter. > > But the user did enter it. > > And nothing in there tells her/him that they entered a wrong value. Only that > the value she entered magically turned into a 0. > > So how is that helping said user fix the input? > > And is there a real use case you're fixing here or is this something > hypothetical that *might* happen? > > > A user can still shoot themselves in the foot by using a syntactically > > valid but wrong address. The check only rejects an overlong acpi_rsdp= > > value after cmdline_find_option() reports that it didn't fit in the > > buffer. > > My question still stands paraphrazed: what *actual*, real use case are you > fixing here? > > And how does your fix make anything better? Without this patch, the decompressor acts on a truncated address. The result is undefined and crashed my setup during early boot (an internal broken script surfaced this). With this patch, a user at least has a chance to see the main kernel's log message: [ 0.000000] Malformed early option 'acpi_rsdp' You can reproduce this with QEMU using the malformed example from before: acpi_rsdp=0x0123456789abcdefx