From patchwork Tue Jul 21 09:44:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Brazdil X-Patchwork-Id: 11675263 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5BB2C13A4 for ; Tue, 21 Jul 2020 09:46:28 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 34929206E9 for ; Tue, 21 Jul 2020 09:46:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uEv+k/hS"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="pKahYClp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34929206E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Rv51BY91SNtkINAy1J+5eSAgqmra72bXU73aNd6Cr5I=; b=uEv+k/hSQvn9H7i2zH0mtkqUJ4 mEOmjzQnZzyaZUzBvEz+V0UO1iqZ2xP4t8f19zI1bTRIXsBg4RJUtn9xBs2xSllBhjEWmlgtAwS// iPRrlG1h0jvhuSSdgHGgvZjPzAPkqMt1MC/pL7HozwFDu/OcV50VQL9dYul1P7oK5IYxxrSQ2G7K/ F20ZTOg3RyAzKPHQBukdedpiAj1jRj3umXHEGLizZvOHFaeTK9hkzQFqEmsR8STtKf/PvIbGbmsog imb/KWahtfRmcAg3TZVPz5T+jeqdamdgk9GzhDeQIVJO94iDev2BfBswBqKPSTQlbK4eARzFWEcMD YGNedw3Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxopY-0002FA-Sp; Tue, 21 Jul 2020 09:45:00 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxopW-0002Dg-Eu for linux-arm-kernel@lists.infradead.org; Tue, 21 Jul 2020 09:44:59 +0000 Received: by mail-wm1-x344.google.com with SMTP id o2so2217936wmh.2 for ; Tue, 21 Jul 2020 02:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oay/q/Jq6u5HCNMFK6qus7veTfF7oH0EkEyRRbWbBuo=; b=pKahYClpT7rbPBcaiNecELPYrFpNr1sOL/KBnAvFlQ/TUhvOxhwaV1ieuOvT9p1us4 7pAMGHA/F5puU5alUBQzKCc28k+Z7+mKr70H2brQsauG36WtQ6blvcQgr3ZF1Dr6dJaS NL9Gt6qiOUhFlbqwCHXnO0ZA2YCc5HCN5QvsQ1TrMrhwSb8hvm+Wwew6xBo0PTh1NWvE zM7e0VS6eULENmw536jEVb8MBPO5pzsXLmYGcyVGyt6wLUAOk9SdqPLtQfySwLojPCT1 RxEs3sxrFuQdRj/H1OeiHeUP39Z3NLk78zuf6JvG/zOh96HuCYNOv3II/OKGccw/SIin tgEg== 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:mime-version :content-transfer-encoding; bh=oay/q/Jq6u5HCNMFK6qus7veTfF7oH0EkEyRRbWbBuo=; b=PB2R6M1mNz1MvnAhdxeoBWJcA+Cacxnhl1WX7c+RXAA4YpZun6DvVxifbO2ZK4b4lY UUvtxBu80UxjA19k6Irvxa13XnGrau+qkYy0H0O50bIwm/MTEgPaexqHp4rGvnhkH2TH yZPNBWx2+4rF9SyVXIrfULLpLrPIqJE+O+i2GWgv3futKLppbTaRN/fU9IWfY8cUbx0r P3q7BxynrgAJzddxbDb1jWA9ipB7nqCj35gmvsFuQKeoJvo8uaSnJmWNiVjGSZQEFKnH gTV27UJfHI0v9G8RFskhKaqBzkWIEj63UuoNC2XzNl2F8N4NF/cMnh6cJqe6dec+eMp0 5h9A== X-Gm-Message-State: AOAM5329PgF+nSV6cplocq7gcb4goe9DlR9EVqDEXVV4TIOiwRy6d7zr 73LCQmiDrDbHMuLBltW2s/DnXQ== X-Google-Smtp-Source: ABdhPJxngyOwJYmlqV/5VQl0CDeLGpyMwcxXJSKOOd8cTePn/msAa3i6Sezc+NNalflZifuYHyrtpQ== X-Received: by 2002:a7b:c090:: with SMTP id r16mr3007999wmh.143.1595324695605; Tue, 21 Jul 2020 02:44:55 -0700 (PDT) Received: from localhost ([2a01:4b00:8523:2d03:cd93:4ca4:af31:19e5]) by smtp.gmail.com with ESMTPSA id t3sm5442414wre.41.2020.07.21.02.44.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Jul 2020 02:44:54 -0700 (PDT) From: David Brazdil To: Marc Zyngier , Will Deacon , Catalin Marinas , James Morse , Julien Thierry , Suzuki K Poulose Subject: [PATCH 0/2] Unify non-VHE ASLR features behind CONFIG_RANDOMIZE_BASE Date: Tue, 21 Jul 2020 10:44:43 +0100 Message-Id: <20200721094445.82184-1-dbrazdil@google.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200721_054458_545215_9B505A57 X-CRM114-Status: GOOD ( 11.61 ) X-Spam-Score: -15.7 (---------------) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-15.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:344 listed in] [list.dnswl.org] -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list -7.5 USER_IN_DEF_SPF_WL From: address is in the default SPF white-list 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.5 ENV_AND_HDR_SPF_MATCH Env and Hdr From used in default SPF WL Match -0.0 DKIMWL_WL_MED DKIMwl.org - Medium sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: android-kvm@google.com, linux-kernel@vger.kernel.org, David Brazdil , kernel-team@android.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There is currently no way to disable nVHE ASLR, e.g. for debugging, so the first patch in this series makes it conditional on RANDOMIZE_BASE, same as KASLR. Note that the 'nokaslr' command line flag has no effect here. Second patch unifies the HARDEN_EL2_VECTORS errate for A57 and A72 behind the same Kconfig for simplicity. Happy to make it just depend on RANDOMIZE_BASE if having an option to keep randomization on but hardenning off is preferred. David Brazdil (2): KVM: arm64: Make nVHE ASLR conditional on RANDOMIZE_BASE KVM: arm64: Substitute RANDOMIZE_BASE for HARDEN_EL2_VECTORS arch/arm64/Kconfig | 16 ---------------- arch/arm64/include/asm/mmu.h | 6 ++---- arch/arm64/kernel/cpu_errata.c | 4 ++-- arch/arm64/kvm/Kconfig | 2 +- arch/arm64/kvm/va_layout.c | 2 +- 5 files changed, 6 insertions(+), 24 deletions(-)