From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (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 9D8624A23 for ; Fri, 31 Jul 2026 00:02:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785456181; cv=none; b=CsFLFla5HQVJgwPjgXwFIC5LuPYycfhfmKWhUtxm/jPfNSv9p8MBJBsvf9Gx2DcxnVwUYbeVqt54WXrdBGsqHtKW0ChAzV+nERvsRRGTtdrH+cMRBUMvINuEBTfoHDe+2gVEnF0GTS8ArU57ukpp9raj36EnTIa61QJZEkeSAW0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785456181; c=relaxed/simple; bh=R+UHkxDOsqXlgSTZKwjHZUV8OmDlL0i67o82MmOQGb4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dpB26DcHVASKdz8mEF/qCjQ7yc2o6HbaFzwFB/05+oTuC74RIWdJwJUsdRqR8/XqGa8aDVZQSyRr9E+SQtqqIBC/yD/sG3hB/5pCFwAbiFNxdI1Hli4oUGGBfxEqg7tt3Khe81WM7ueWKjD/cvjRmvgrIfl5t1gMHRVFTDV7GPU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=HgdzzgmV; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="HgdzzgmV" Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 0266240E02C5; Fri, 31 Jul 2026 00:02:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id qtob_R6XCA6g; Fri, 31 Jul 2026 00:02:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1785456162; bh=8tqpSTbN2AS8BBYdPm2F2w9UoVo7Z4Srwu/IW240uJo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HgdzzgmV50Z9/170UuBK+PyJNi7S7rK10VgfVLT5iLEtz6SpBy/HOrCjNjaHyaYxC nyVcnoMrd5uwSUidNfYSexLFknNPDsV0bl0YgupTPr864YQkKQ2riU2WMMDNgox5WR 28lI3Se4L+xYushTR+mFuN5xuP8BdtqaNrvPsADApOPrjul95riHDzwlkMDiXSdH6/ tYiwYdlYmRIxrPWMwiMWn5zh9a4+FaP4TPWz99+Xr78dCnCzJfAy/ynAfkwH9umrof V9w9bGczsQqffOlVSm1Wqr3J9s+hw7VxoB1qrEhWaZ+8wCKKBtcy42naJFBenQ2kp0 12hXs7LRUweaGF438GFNRV/6nYLrjxtSbkpuekUS93/OnITAsDHjFKAxEtXPltsG5D LLzaUu3kHuHxpt7q8LNVgUBk6WqRvVcBsTmvj/kbeTjPQYplelPDeWBQNMUHibsuX3 TbNgHJI7lWv7Zdc268S1v+FUfnC/0xLdpe5LRnls30tI8zKlzckVMAsMIPAprRnZOC OcVmw6qOoe4oQGz54WAcJYt5GZUHIkEJUYxDBnpQzRSZ2uZEjwO4xpVq6K6iodfn/M eoODI4l5EQZs2GYptPfp3JvPzVeNAx6/GUE5K1wU9DJ6yEebK+iyNTlKW7SxarVETg U3CDjrxfC6jY3VSAwibYw4pw= Received: from stx.tnic (unknown [IPv6:2600:1700:38ca:c00::1b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 284A540E02B7; Fri, 31 Jul 2026 00:02:34 +0000 (UTC) Date: Thu, 30 Jul 2026 17:02:31 -0700 From: Borislav Petkov To: Thorsten Blum Cc: Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND] x86/kaslr: Remove redundant if checks from address selection Message-ID: <20260731000231.GHamvmF6EScjVpbxwq@fat_crate.local> References: <20260714205752.133163-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 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20260714205752.133163-2-thorsten.blum@linux.dev> On Tue, Jul 14, 2026 at 10:57:51PM +0200, Thorsten Blum wrote: > The loop in slots_fetch_random() either returns the slot address or > exits with i == slot_area_index, making the if check redundant. > > The if check in choose_random_location() is also unnecessary since > commit 8570978ea030 ("x86/boot/compressed/64: Don't pre-map memory in > KASLR code"). Sorry, you lost me here. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette