From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sphereful.davidgow.net (sphereful.davidgow.net [203.29.242.92]) (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 334A833D6FC for ; Thu, 16 Apr 2026 07:08:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.29.242.92 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776323284; cv=none; b=qLSt8RO1j8M+ZpCyrhHgWBrFBuZKVBErUsbwkcyv+WbQGvXZYb7PndWpDWJgJ8lqPOsBzPa3NG9GGESivMprTsoDrL4HTCIOumxGsi67lUHglX9u70Y+sRuEhaw2UbjeISo2nrDobxu/qtyI2fqsDhEwSqQTlEpDdL09y5BE2c4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776323284; c=relaxed/simple; bh=9KnHs2gsaOFjnalhTTusojpXwWf7aeFK6kkzup6dxRQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VkB5u77kmr0OYolP7r6NywNKhmreiNICuUVwyibnF4AKUnRh6KcYzTSZ/lbDkEg09EXQuqOpi6xN+LXG2hIhgsKEg1g1d6ut8t0S+9mZwYZz1JubaIL4rF0nX4zzli3xZFAX8m1dBXzeZJ4tl1IZ+O6JVPjpcN61czRea+hyQDU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=davidgow.net; spf=pass smtp.mailfrom=davidgow.net; dkim=pass (4096-bit key) header.d=davidgow.net header.i=@davidgow.net header.b=cCTVhNhi; dkim=pass (4096-bit key) header.d=davidgow.net header.i=@davidgow.net header.b=UQHTIjOi; arc=none smtp.client-ip=203.29.242.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=davidgow.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=davidgow.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=davidgow.net header.i=@davidgow.net header.b="cCTVhNhi"; dkim=pass (4096-bit key) header.d=davidgow.net header.i=@davidgow.net header.b="UQHTIjOi" DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=davidgow.net; s=201606; t=1776323280; bh=9KnHs2gsaOFjnalhTTusojpXwWf7aeFK6kkzup6dxRQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=cCTVhNhiNThugTU6/xXsTtDQlDZ8jABOQEBR9plpg3y6ToOT9dyTo/Qu81+OZy3ei 4BMUsXUMmRSqHIAsxSjyCmjShwn6yfe5j2cO6V1oQ9pj6aCf40QnmW62EnuqwWf8XG 2PaBD2EikHBuKDKd1Df83VlpQ1N4Gn1XctRCIBESAdEo3XP0h5a1V3bonwcts2+veQ KWEqM91TpBdUgg4TG+uQVJgWiwEuRbHMbnZcOcTcBR/EG1vMhWfKT+ryicUjHLY7yS vIRhfaY1jgEgUzmloEuTuAgr66otysBghb28jGnXnHlyVxAXuWj5Bsw/71xgz1CMlG GQIsETqYJnREij45V9bPnDTl6qWlvCY5CZb+eGB3VrXgorPlMh5PZHoMaYzvrD4eUj mwC++HhrOuDKT8Kyi7H0orfMfrzIj7hTC9e57dUz9/DJuCkpL8USMtMEGrpKQEvwVe k7MNElgZV3AuBD9pQZUaH9CPcwImX3komj3vb2RfYO5fxc9998Fqwe2bN0OdsQuTAS Lv3Xc7xVaq4lhDcs5PFcuDOa2MEwvJpr6Bh+n0IFZ5XL0S2tEjUEiqpHpGvTaSpJnM eEyXQ9ukeMAUPqjjjM5fFkAG7sF4DEO6Z7bCl3E9T7FRAWK0ZINvvJ5Q0QiqvoM6Sr r4pP9lN1+0pv3xIu4+ugtWcw= Received: by sphereful.davidgow.net (Postfix, from userid 119) id E83971E68EA; Thu, 16 Apr 2026 15:08:00 +0800 (AWST) X-Spam-Level: DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=davidgow.net; s=201606; t=1776323250; bh=9KnHs2gsaOFjnalhTTusojpXwWf7aeFK6kkzup6dxRQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=UQHTIjOimR4FfHz1MdMYHA1PUHIz88EcZDlTHeuDFL2mpbG35LV38AkA4bZLBzH7o WhqojOYF1MnafBIG97yT2U31hdIH0JtO6rCPelQEPzTzgYR2A0bqpGmIG17II/7kw3 xEq+rNjuXGPYlfufFLGEimvGs/ke3Xw44fXzy55OEoGhZgRS8+CNGNvxbUnYXoC0Gh 0VtNDxtWL7Rs8pPqfeQ83MIVhJgQHvtfiyLA3phB+gsQP/wdMhjojHrkK7ibztZSWq uyMxubh3S4qsRwhmbnzgq4n2gON+Ba1swQHjN4LIMNEiFaZJQ1f+v9RbIHBIQpBrS1 eISJFvWy97xP8uDmgy+xdLJbS8riJLtdkk/Yv0JXICzGyguj7t1lo472T53qpYbI09 ttgURhgLucbgFpeP/53LKBgdu5Uc8NN0PkmmcZD5VrNISa7THt5RLxpeHh+P2OZwBH KwK05yp8b31o3qOnNopg5wzH3Xc7dHMsVKTkBsTBPoX8+18q1DfjSqfWH0f/1sc3Qg 6+ROJ3i+b5bkC5zn909eJf5QYyzZ5PZYjaIRgC05Gs4urLzrnl79wHCz3lfRNcgh+M qjWrHgH/CV6+xIo6Plab0H6follqcQUZDgHpzufr3i8MpbCPlIvRWn/kRXaIbnm/2R 030kZj5E+gE3ZqKm3X7MOv4o= Received: from [IPV6:2001:8003:8810:ea00:ed87:ca88:5326:e11d] (unknown [IPv6:2001:8003:8810:ea00:ed87:ca88:5326:e11d]) by sphereful.davidgow.net (Postfix) with ESMTPSA id 56D971E68E3; Thu, 16 Apr 2026 15:07:30 +0800 (AWST) Message-ID: <65a1963f-5d9c-4b11-8983-9806ce94cbe1@davidgow.net> Date: Thu, 16 Apr 2026 15:07:28 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] x86/boot/e820: Re-enable fallback if e820 table is empty To: Andy Shevchenko Cc: Ingo Molnar , Thomas Gleixner , Borislav Petkov , Dave Hansen , x86@kernel.org, Andy Shevchenko , Arnd Bergmann , Nikolay Borisov , "H . Peter Anvin" , linux-kernel@vger.kernel.org References: <20260415003021.1543723-1-david@davidgow.net> <5eed2487-4ccc-46d1-9227-46d729087505@davidgow.net> Content-Language: fr From: David Gow In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 15/04/2026 à 10:26 PM, Andy Shevchenko a écrit : > On Wed, Apr 15, 2026 at 09:50:32PM +0800, David Gow wrote: >> Le 15/04/2026 à 4:51 PM, Andy Shevchenko a écrit : >>> On Wed, Apr 15, 2026 at 08:30:18AM +0800, David Gow wrote: > > ... > >>>> struct boot_e820_entry *entry = entries; >>>> + /* If there aren't any entries, we'll want to fall-back to another source. */ >>>> + if (!nr_entries) >>>> + return -1; >>> >>> Can we return -ENODATA or -ENOENT here? >> >> Sounds like a good idea. The previous code (like this) used -1 for both >> "there are no entires" and "there are entries which look bogus". Maybe we >> should replace the latter with -EINVAL, too. > > Maybe, but is it related to (coupled with) this change? If not, we can do it > later if needed. > I think it's probably related enough: append_e820_table() only has the one other error return. That being said, I don't think it matters too much either way: there's exactly one caller which checks the return value, and it only cares that it's nonzero. We could just replace the whole thing with a bool. (Or, if we wanted to be more brave, with the count of entries added, though that'd complicate the caller a bit if we wanted to preserve the same behaviour.) Regardless, I've sent out v2 here: https://lore.kernel.org/all/20260416065746.1896647-1-david@davidgow.net/ Cheers, -- David