Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp78655ybh; Tue, 14 Jul 2020 18:31:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+PgjviKCa1u0Ccv+2HUjEKct4B6td/cDjuQUGTL7RT6NxEXm5RhJLrgDixgBc3nUyNcbd X-Received: by 2002:a17:906:8157:: with SMTP id z23mr7339380ejw.349.1594776665977; Tue, 14 Jul 2020 18:31:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594776665; cv=none; d=google.com; s=arc-20160816; b=MZo6leSStaMbPmCSAKRvkmNOCmT84osC9XCtB4zQCKElzAeCsHIPTHyRXeheZIAcNo RCHB5P7O1V/b05uAfianJj022ynxim7iql5/LjUpB7EF7+1qdzjjRl7K1xb9GjtW2U86 J9bTLvQnoEhEiYj6RV9G9aPteeuYrnO2DeyVMNp2x3OLqhQksfTOOBfjzUpWBaL7nYC4 mgxAgzV6HhCcZqpbqdb56P5IKx7fdRxEU/cOhErjLG2qw6mn2JSYOohLXdXOJSdLsmW7 3JSJAiurWQNy5+KAdIAGlDomFuh2jV/ndCtQSKZDT17yRlN4skrcnDvKypCtVUaqBfKD y7Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=MV9eZ5OBgqTWIWwL9zpqkY6z/89bNn4vF0SnKjjFgTo=; b=vuZba+iDyJDewCN69bydDVZZXD1uXPfO5ohcgdz+RfLigsMCLnsxbrFi8nLgcA3WQp 1UkoB2OU0fp8zUcNYKK4qea4X/s0ZMGdYyb/QiR0CsEZZYnf0Gg6BH+e58gVd7pinXYd yohuG/QphIZNk74CrFUbitZMm4CyaZLsZ4C9sz3A7F4PKprBhZt0y4/kcMDKNt8kKWeQ 1AHUR5LnAGRxKts1CbP6B/emcJZL/cIGci+iiMLewjjiNSFXWF4W4LaqctdO8ePXCzJ1 BJ02Tl9Gl6D5SOxnqFxOPNjcTVYHvy86mJvbSqnExR/DnHG1x2C4IWK4mmg6qTXAB2Vp NqPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=As6jd7uW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp17si417802ejc.285.2020.07.14.18.30.42; Tue, 14 Jul 2020 18:31:05 -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=pass header.i=@chromium.org header.s=google header.b=As6jd7uW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728149AbgGOBYr (ORCPT + 99 others); Tue, 14 Jul 2020 21:24:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726472AbgGOBYq (ORCPT ); Tue, 14 Jul 2020 21:24:46 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79EC2C061794 for ; Tue, 14 Jul 2020 18:24:46 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id m9so676370pfh.0 for ; Tue, 14 Jul 2020 18:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=MV9eZ5OBgqTWIWwL9zpqkY6z/89bNn4vF0SnKjjFgTo=; b=As6jd7uWVm/c/uXeyIWNIkQkotsGzxOaaLvAOys2HbOeY1PyGOtFGLeOpMzbRY5fBW 7CLyuBD/uXM+ETluLcq0AobqVWwAOu6WOxc9qIb+eJ501gis6a1t3VHFTz+mJN4Shyf5 csynOX1q6Nqq6cA0TTETd6QbQtBcx5uQ7Pwsc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=MV9eZ5OBgqTWIWwL9zpqkY6z/89bNn4vF0SnKjjFgTo=; b=KtI48aersHZbdUbtPVDLqOmc9ZPZwSYDw4jjY3VRvIv30l4yiyDyaiSp92POfYeJxu pcV6O2eUr6sko6fyw4cyUp5cH9U6yJFHyR70w/bbwf8sFaHi1UYT42MHtIw29sRPdjtr XqeobrHYt4yatwW9ThyWriBjO94gquXQwroH7/ZWkqKoyIgkuEtA+f58KyzBGwg+LUYQ RnFZXBAKNgF9vOYKLAqxCTOkYnDtdEm97YAFPzFTzil80pgwDO0/NKWLz313faaAd3Yf bXgF0ydwOAi03p0RBufqedt8XADFGq2VCgvQs3sEPwsRNj8r4vbmRg+3t+TRV1cg6mJ8 OCVQ== X-Gm-Message-State: AOAM530rIKN26wpYCX0PuXOJB8w0UKsB0FTN2JIv7zU1QrE8HIwsKZj6 9KWmkPl2yWOODtxnbWbEDiB6Ew== X-Received: by 2002:a63:eb52:: with SMTP id b18mr5523396pgk.434.1594776286032; Tue, 14 Jul 2020 18:24:46 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id z2sm328776pfq.67.2020.07.14.18.24.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 18:24:45 -0700 (PDT) Date: Tue, 14 Jul 2020 18:24:44 -0700 From: Kees Cook To: Joerg Roedel Cc: x86@kernel.org, Joerg Roedel , hpa@zytor.com, Andy Lutomirski , Dave Hansen , Peter Zijlstra , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Mike Stunes , Sean Christopherson , Martin Radev , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v4 17/75] x86/boot/compressed/64: Change add_identity_map() to take start and end Message-ID: <202007141824.909CAE9EB@keescook> References: <20200714120917.11253-1-joro@8bytes.org> <20200714120917.11253-18-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200714120917.11253-18-joro@8bytes.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 14, 2020 at 02:08:19PM +0200, Joerg Roedel wrote: > From: Joerg Roedel > > Changing the function to take start and end as parameters instead of > start and size simplifies the callers, which don't need to calculate > the size if they already have start and end. > > Signed-off-by: Joerg Roedel Reviewed-by: Kees Cook -- Kees Cook