Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp36234ybg; Mon, 27 Jul 2020 14:52:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIik899AA2PmJkd2SAIdDpuQRChSoA1lXGu6lAlbqR7OLMuJG0SEJQgcIK+WyeYtRCjD06 X-Received: by 2002:a17:906:3bd5:: with SMTP id v21mr18347935ejf.329.1595886766795; Mon, 27 Jul 2020 14:52:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595886766; cv=none; d=google.com; s=arc-20160816; b=SZBmVAhUiWU50aE1bNbxjHIlXJRDInpu5bn35/Bal0lx836Y3A7wGCW+7F7NtqUcO7 +M2/pXJsd7bCJYoIRhdUVfVcEjcp4T1l0vmJnvK/MwfoYgNg+aua6zc9W+dLOrJkOLYM OVnUrdFI5dOwMUxypsTs0ox5tIIsKQDhDQVHYNg1Fw5NGzH19KvCz4zh16pAXysjDOde lBsONuA3BiaIB0imZr0bQYE5kzZW4V/AdkNummiYBXIekpl233ah26AGF3gHrJtGKnZl T7ffpKnNuXvvPxrI4Y1RBD0Cs8RQWN5MnFTlhX4C/muYB0G6QPuomAMYx0s9BvU0xrEl Aa1g== 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=P/jqZ4tEnbfy6DoWKKpK/eTW4CnnTgY0f8UViv0746E8PbElayBODsZ1auxmTdwDjn NWT5jwOh3c8Y9JwvvsT+0JZcoiudn8JwfHZMmBB8/wUfSaQXhxvmwtJ31bTVy8PeDqBF FlFBBqtzKOlNm5KO3YTeH3LByXTu9zTQf01XgByOD5II0p8Bo/DSS0snD9uVlrt7zpMv WbGDXunqP1jxP2UTmLZet4I6i88IWL+tG14O2NhEXBfASIZChvN8V+WTlWh0kUEsNJ6j ebtZd8rbV7ycPRngfuhr3TmoMPOz0cVN5AM3VTS+IvZBndy2LVv/uHoBdjwUhlTcDXSq t58g== 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 i8si6170534edx.405.2020.07.27.14.52.24; Mon, 27 Jul 2020 14:52:46 -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 S1727080AbgG0VvP (ORCPT + 99 others); Mon, 27 Jul 2020 17:51:15 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:35009 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726140AbgG0Vux (ORCPT ); Mon, 27 Jul 2020 17:50:53 -0400 Received: by mail-qk1-f194.google.com with SMTP id 11so16846936qkn.2 for ; Mon, 27 Jul 2020 14:50:52 -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=Z3loWG6KW4RGWDf4uzs1B9sGWN8tCuCnVqN5LYnzHINGICtmxejLHnYHJs4AzE5ePa raMkj5wJZCEQJxZZRNxgMKHetFnQUDQr7CEfgQ6+lftn7s4Xjim7s0uvDTERW521J2lg eWCUd6CEIWXxrlaCYfH2pKt+aG1zCGoYK/V4/1zw1n0CKWygwORNhHc0FDlDQYHagFsu b/MLJjITRrNuXKSudKJhrtgl1fTU86sfklyKhP2p9e4fe+ymQDsNcuIyzF0OvnRAI8Eh XaQOjVNyT5K7qWkC1+PkaJO4l1VVhHnco79YmCfkkQY64MtrSl0eeJ1ZmcJw0y0qVN0G GpZw== X-Gm-Message-State: AOAM530URolssWvkbGjfGhHW0Yt9D1RZ9KcNOdTom2OqmGsclJWsLmSa QKBInX0b8ucBD602sHdFYYga0v1w X-Received: by 2002:a37:9ccf:: with SMTP id f198mr25740900qke.168.1595886652252; Mon, 27 Jul 2020 14:50:52 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id n90sm15629338qte.21.2020.07.27.14.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 14:50:51 -0700 (PDT) From: Arvind Sankar To: Kees Cook , x86@kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 3/8] x86/kaslr: Fix process_efi_entries comment Date: Mon, 27 Jul 2020 17:50:42 -0400 Message-Id: <20200727215047.3341098-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