Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1799223pxa; Thu, 6 Aug 2020 16:41:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJsfJaPWGxGaDyEGyTDpQlGAt2fgDIE1znMXd/YB6Wc58RctANFpRDbU7VynfvI1GecCzV X-Received: by 2002:a05:6402:2285:: with SMTP id cw5mr6276095edb.242.1596757281834; Thu, 06 Aug 2020 16:41:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596757281; cv=none; d=google.com; s=arc-20160816; b=NJeCm4cVWBn7B6au7mM2ksYX6FCfXpZp5I3F//s3nDnyIzUwOq/jK6c82uDySS1Yu3 /kVl/o5bYXyIFVMDPBITLpdNg0NypviuC9tgQ5r8dRm18nLcTQESdhCITYDI3EmqBQNK FIjORZHszE1JIkBEvGwtnHI1h4qvTnyr0QHcXeuhP9Z6MXk1PyyiDnCYU+VEyF9X+VMQ rFtlFCDDQP9x+BWsPoKzoYJzqfG44V7/Sz7bxwKEMpSMfgj57Kd1l+Pzg7NPBKn1uvQv ds6Jvc59zOaZtoYaUKNHapGF37E6CTzVOkkalem1YSrwWbWf4pgfdt+8Di+xK4xwF/Yk CgDw== 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 :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:dkim-signature :dkim-signature:date; bh=F7CWj2s6SdgROMAEjUATGzwAp9kEOqwvACXgDBJ+znM=; b=sgu0J4dO8NadKRYvOwQjtn9UsPC6pwaf33k6LjAaqf9ce7m5LqckwMyv7BQlG4xgBs 0aax7Ev2uPoEiKWtpbvAmtD3SjxTeO2ZP4QKpIxQwTBRTg/MNOdn58rWXhtFj3FY3RQX nv/ElrzOdVX8WjSorgv1ZikkwfRG4Q1wtRH0E0lO6nxDSXfCTYk/5rQY7hxAvSQPt5Oo cIcpbocG9kfv9tQAJoP/JJZYS5P2gZzoMNvTyqLRlf9JwrcvAhHKmdU3sPtcNjY/CzfY IHwrxF26CayPBpv0gKRLPUTzclcR5tXU+6SuysyLIVguB4FEwewyYaQDJCvMz2Z567Ss fcAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=RdoINPRK; dkim=neutral (no key) header.i=@vger.kernel.org; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e6si2251050eje.588.2020.08.06.16.40.59; Thu, 06 Aug 2020 16:41:21 -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; dkim=fail header.i=@linutronix.de header.s=2020 header.b=RdoINPRK; dkim=neutral (no key) header.i=@vger.kernel.org; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726985AbgHFXju (ORCPT + 99 others); Thu, 6 Aug 2020 19:39:50 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:60966 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726448AbgHFXjB (ORCPT ); Thu, 6 Aug 2020 19:39:01 -0400 Date: Thu, 06 Aug 2020 23:38:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1596757139; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F7CWj2s6SdgROMAEjUATGzwAp9kEOqwvACXgDBJ+znM=; b=RdoINPRKm8exJ7V047pI9pgadbenh2F/pLl8oOpRxrtkdq/15A3WojCRgNxK+rwV6wryTa qPre490dxMZpHVfpO1G3WDtqLcwdc6xq7ROYKDXwbSB5oAdoVa7bddk3H6bTlIH0SdhTCD tgYymQNEb5P5qVoxicGZU2/6nI5KNRrdAICQeaRa3hZvel/2Z3HjK97hh7x43VJcMZ38I7 48frSKc82TJYJxUwVGWl5k2eL2B1C8SR2aF6xVJ4DJ7QDSo0r1hFrvJ17Fn8tOTauHi3qw 0QqjnYoaBTu+ESejDCX8D2HmSKdVHSZEQjyeVlespfT5UeDk4y+/iVaKOaYz0A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1596757139; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F7CWj2s6SdgROMAEjUATGzwAp9kEOqwvACXgDBJ+znM=; b=L5nXBHIPh4BUGzON5HzJq4O8516ZtVddALeS1yvqvG0ofFM+xr/uDbyjeHHZenxpOZquFs BucY7oTgj67Z1EAA== From: "tip-bot2 for Arvind Sankar" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/kaslr] x86/kaslr: Drop redundant variable in __process_mem_region() Cc: Arvind Sankar , Ingo Molnar , x86 , LKML In-Reply-To: <20200728225722.67457-9-nivedita@alum.mit.edu> References: <20200728225722.67457-9-nivedita@alum.mit.edu> MIME-Version: 1.0 Message-ID: <159675713888.3192.5122154999856550965.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/kaslr branch of tip: Commit-ID: ef7b07d59e2f18042622cecde0c7a89b60f33a89 Gitweb: https://git.kernel.org/tip/ef7b07d59e2f18042622cecde0c7a89b60f33a89 Author: Arvind Sankar AuthorDate: Tue, 28 Jul 2020 18:57:09 -04:00 Committer: Ingo Molnar CommitterDate: Fri, 31 Jul 2020 11:08:17 +02:00 x86/kaslr: Drop redundant variable in __process_mem_region() region.size can be trimmed to store the portion of the region before the overlap, instead of a separate mem_vector variable. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-9-nivedita@alum.mit.edu --- arch/x86/boot/compressed/kaslr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c index e978c35..8cc47fa 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c @@ -664,11 +664,8 @@ static void __process_mem_region(struct mem_vector *entry, /* Store beginning of region if holds at least image_size. */ if (overlap.start >= region.start + image_size) { - struct mem_vector beginning; - - beginning.start = region.start; - beginning.size = overlap.start - region.start; - process_gb_huge_pages(&beginning, image_size); + region.size = overlap.start - region.start; + process_gb_huge_pages(®ion, image_size); } /* Return if overlap extends to or past end of region. */