Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp667002ybg; Tue, 28 Jul 2020 16:00:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjJitGkYJwqbT9uVvcr6dDXeB6CcZVKb1+LK6VeSzPKfrvkFmkL1hAJg8+lurY0VVtAVUM X-Received: by 2002:a17:906:3816:: with SMTP id v22mr29039643ejc.332.1595977208775; Tue, 28 Jul 2020 16:00:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595977208; cv=none; d=google.com; s=arc-20160816; b=Zn2PjUyCoPFeadwXOUtiK3LDdy+sHMxZtw04vzfc+WNd5W8fzryxeoj87Mn0zmG+yV viDPXNq+RUEL5kZ1dcfzFMZQXHy32DGFucCEtFCz6cIcX2bibljHbDM7xXgLTcxSFu8y YU/JY7LxJeVq3S9Xnb1wlOkt/ZDDM3BAUnY3w4ADNmsF+Y3mvk/xQplpc/vG7O1MJo1A fs4N25UO5+whx9XPjrtzw49fgGJ8aL8lKgpCPFEaXNJuqyE6eSPt5yJzZrpb8JI4AQme URtONmhGtFglh/O+PV+3nfQnTR8VNgeiErj6MhpmFaeaqSCKbiY4yXGd3UFNhpEX2uC7 WILA== 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=oxsgcjV2U6R0bAkATN4y2iNIyTG55u4DxFZJ6Ep0G0I=; b=tAPMo2Lb0hVl/Fn5/2oh+LAvFe6lLihsp3CCqL8HHmZlJ6JFGYSrejMdJBVzodazxD wo8aoO0q9uHHHGSKKl/EH8Q82jjIyJPL79mejm9dpGaIFou1NbtQ0pRpEJkypziqe4Hk 8tck5euVJ/i2YSltHsj1JI7TzwCU9IE3TnBmzp4XIwfKzei2/6PpGqBxhpVo6a7MFYAX WaCxzUiW+JgEbCbz/UqM0ipfhf7sKlJTgCoDA/sllJ2PnTffjxgBevV9FhEl7vDMUQMo /DkQ4zmG6u3WyF0bmWnkE8rMUmShHZvroZlViUtfES2db8dLj1zhR+LAo7KXxRw4w1gG eLgQ== 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 w6si128679edq.25.2020.07.28.15.59.46; Tue, 28 Jul 2020 16:00:08 -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 S1730000AbgG1W5e (ORCPT + 99 others); Tue, 28 Jul 2020 18:57:34 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:44397 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729908AbgG1W51 (ORCPT ); Tue, 28 Jul 2020 18:57:27 -0400 Received: by mail-qk1-f193.google.com with SMTP id j187so20411594qke.11 for ; Tue, 28 Jul 2020 15:57:26 -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=oxsgcjV2U6R0bAkATN4y2iNIyTG55u4DxFZJ6Ep0G0I=; b=fiB4F64Vudygx8z9EeDsxZPuyIu4EQcFtnI/7XIABQKOEjeKMUTkGLW4ZUUEt4RSRX +Ww5gsjZ3lR8y07EGs3Y3FsjgQ+UnlBw6zNJlzU9kzgujwuEOqSfn92uotueNNEb3Kce Ifg+PRA1iy5FHuGw/IZocadAdaxsNCjI+RPM6v3UtrgS5MCF5H/2znKwygpJ485e5L8B zSEpOuMsq/qdfR1HesdB+EV1PbKE+Vx52kaNODo8VrQi8tw9k/O9nfepQXPRosh/Nd9t g13wxmpjTQt8P4GXqclHSAgm8Z6gEIpaZIZCuO+yyxt4JUMdc/qx6YHGkaoceTnSC9+O nvGA== X-Gm-Message-State: AOAM533onholKI/vMNCRSI5FbThslQLUVKPtpb1UmKcVLgpG0RSLYAlm lzN1/Hx+F4p+GFF+0LndT+M= X-Received: by 2002:ae9:e506:: with SMTP id w6mr28784037qkf.376.1595977046074; Tue, 28 Jul 2020 15:57:26 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id o187sm88118qkd.112.2020.07.28.15.57.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2020 15:57:25 -0700 (PDT) From: Arvind Sankar To: Kees Cook , x86@kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH v3 03/21] x86/kaslr: Fix process_efi_entries comment Date: Tue, 28 Jul 2020 18:57:04 -0400 Message-Id: <20200728225722.67457-4-nivedita@alum.mit.edu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200727230801.3468620-1-nivedita@alum.mit.edu> References: <20200727230801.3468620-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 c31f3a5ab9e4..1ab67a84a781 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c @@ -742,8 +742,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