Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp77437ybg; Mon, 27 Jul 2020 16:08:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwR7Gid8dK1n7a7b1wGo5v8wH4jTG0Tf4wfkOAuOv6+2tfOR0jOMDnyMzwW+rSq+3EUNWp6 X-Received: by 2002:a05:6402:785:: with SMTP id d5mr7343939edy.370.1595891324922; Mon, 27 Jul 2020 16:08:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595891324; cv=none; d=google.com; s=arc-20160816; b=lqVZUHwmkTi4bH+2ke7dzYpSM6O0tnIxJ6WcAHEjHc0dPbPySNNB862mLDzUMc0dSj ZxTWEEY09fVo/qSl6Rq9ppSmU+c98N4wUCdripjzpf+GeqdvrCdkTOudCmFJsGbbobkp teLDxxXds8WEyFJCk1jK4mBk2CyNfIrjQIF1+EWWt+b+Y0iNnPpUep/xEoiu+2lXSG7J LUUCUzplCQrEH2QSizfZz65ViXlvYbx1l5uzzoJ9qBD+JI/rvn0UXMtCeIX3PyGs5v+v M7xbSv8kEHnJcTBF1zJPxVRHOs0LpNme63dyToojH/jgx/xhdS7WyZcU9xaP4nJQrLDo WvuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=9T+6TTM2jquV/2xo6rzyYgs+MoQ8msgYOchHxJqCp/Q=; b=Ui6+WEBVv9CZqyu3HXqR1PV1sMHZB0+ioFmDoiKteHPVftA3kJtOhydn0NUj/R7rZd C7KITF54iDUaSW/DhRuAp2v9v5tvy+/Sf1rm7yHpplyxkDkr5JLjd4zSQOX2+wi+r1fs NSixUF0o3tzWM3zQn2gLJNEWIRJPQp4MqvFnK1Wwy/PwlPBTEtDVzWWjUhJWHKZ9hZxk Zq+RBZX9KheqHM9pNA74ozckL9yhcgFUEQuDli+TaIiO5kV7ACxEuJ4v/FKxLr2FJbds VsziQaJS0TAugdJguomGV+v6OA0wwJSwVesb4theZ+3042mLE+evGgtTjW7SJrhqmG62 Fn9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a25si6237995edr.589.2020.07.27.16.08.22; Mon, 27 Jul 2020 16:08:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727046AbgG0XIJ (ORCPT + 99 others); Mon, 27 Jul 2020 19:08:09 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:44307 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726967AbgG0XIG (ORCPT ); Mon, 27 Jul 2020 19:08:06 -0400 Received: by mail-qt1-f195.google.com with SMTP id h21so7193589qtp.11 for ; Mon, 27 Jul 2020 16:08:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9T+6TTM2jquV/2xo6rzyYgs+MoQ8msgYOchHxJqCp/Q=; b=UCfGgsf7HM21xyoeS9U+f4v/26YEWbZx2u7n4KD2wkqKkrDtzHAe9sDtlhjn4QZPXj oLuwa9NdcpPkhAyAvUVJDjobXNopGjROipQsPeHw59QdquNaGPDHU3MMRYUvxNCQsBcC qNycqhhD3FhSCy9WHYkdLXodwNZeE35rV+YrHWo2wQaDIQo53tvueMtWQneiEulh6sH1 3f7VlNqq0NXycqwxukgbtSaCtyZSGMuHsZ0CeKnpWRhvAFbj7dolkLJDNMVT+EHlPqaY ZllwUxZomDghz4SAAuogLNQT9zcy7Xy/bD/0i6QUJiRHrILx4lVAJ8G4EBMYOvJ/gZrU 1juA== X-Gm-Message-State: AOAM533gypSP9yvXjiEZ9FHeoxkrrzQOo4RNqgnSmf2f1YlM3vTexUBr oJDMWM7Z+22uBjblv/7FvnI= X-Received: by 2002:ac8:6782:: with SMTP id b2mr4297886qtp.152.1595891285347; Mon, 27 Jul 2020 16:08:05 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id j61sm8216984qtd.52.2020.07.27.16.08.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 16:08:04 -0700 (PDT) From: Arvind Sankar To: Kees Cook , x86@kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH v2 3/8] x86/kaslr: Fix process_efi_entries comment Date: Mon, 27 Jul 2020 19:07:56 -0400 Message-Id: <20200727230801.3468620-4-nivedita@alum.mit.edu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200727215047.3341098-1-nivedita@alum.mit.edu> References: <20200727215047.3341098-1-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 0982adc74673 ("x86/boot/KASLR: Work around firmware bugs by excluding EFI_BOOT_SERVICES_* and EFI_LOADER_* from KASLR's choice") process_efi_entries will return true if we have an EFI memmap, not just if it contained EFI_MEMORY_MORE_RELIABLE regions. Signed-off-by: Arvind Sankar --- arch/x86/boot/compressed/kaslr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c index 21cd9e07f1f6..207fcb7e7b71 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c @@ -741,8 +741,8 @@ static bool process_mem_region(struct mem_vector *region, #ifdef CONFIG_EFI /* - * Returns true if mirror region found (and must have been processed - * for slots adding) + * Returns true if we processed the EFI memmap, which we prefer over the E820 + * table if it is available. */ static bool process_efi_entries(unsigned long minimum, unsigned long image_size) -- 2.26.2