Received: by 10.223.164.202 with SMTP id h10csp4991841wrb; Wed, 29 Nov 2017 15:42:15 -0800 (PST) X-Google-Smtp-Source: AGs4zMa9fdsqdG0z480icNsy7UdsyhNF//JzG90kMXP9y0UYDVDnc9VbDL9vWwGVRHDjNHDLQglF X-Received: by 10.98.219.198 with SMTP id f189mr4750065pfg.44.1511998935633; Wed, 29 Nov 2017 15:42:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511998935; cv=none; d=google.com; s=arc-20160816; b=ayq0Kti+wnk46WsGiJSjbKj8Kr/cEroiqt4yDNtMWGrJ6E/4cPV6dWMfCG/gT/EMd5 cay/BKv+y4B2kdUUsUO8PadaGnxnYpB5RapLflaR1bf1Bj69h9HpgYLuJ2gVklH2+ONG nJOG8yUVxOi2oYy9hnowu1URW6+XDNgYFlwRpDl+uHnc+zxUKaokLY/aG1hJs/kvaMJk iTvMKoOyNgHW2LraGnHoHLskSAVPw5Mj9ClDTEtB4uoLVKyQ4GQME5CZ25Hr4SNbmskA X6tAeZvmXq0QjF0IRqoQ1/yVpQQ13fAt6yb0+7fJwNv774mrYDPXcU1kkkm/tf7hYYbH UKjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=DJ5jAAW56JT0RfeMTD7FUwuu0EibTH7uWg8W/bzrh0w=; b=cbtc1o6/JWybuEPtG1X3jDtoB0fifCprBTcQnqieCXq4WVcs3TGufqmAM3IJTj9Wfy episDC6c1Nz9lBlfo1gOqibG2xrv0u3x14UiLmYxUJZQES9h2c987sy89KPOwZQfx+xJ WlpbkxSgiofa7Ida1IAq3lPIOxg1lhLs4ctekZLKu+ozCKQur9+fORVi1yZ91R8TLMsI +9MSJI0syv0Vuvcz5IcSO0h5TLul8RDbGik7sEvt7ahGGr1Z4yxrN8ssLF6ezuKj7jkJ Sb4EwKMIkJfhn6MKcRTVCnv0lhXc8n0e8MqwnVJDI+oyeJqLeT9gmgZs/QDFqLXfhD34 eqgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=lM4fvpKy; dkim=pass header.i=@codeaurora.org header.s=default header.b=X4KYJiST; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e12si1979783pgu.744.2017.11.29.15.42.02; Wed, 29 Nov 2017 15:42:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=lM4fvpKy; dkim=pass header.i=@codeaurora.org header.s=default header.b=X4KYJiST; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753411AbdK2Xjv (ORCPT + 99 others); Wed, 29 Nov 2017 18:39:51 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:52328 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752690AbdK2Xju (ORCPT ); Wed, 29 Nov 2017 18:39:50 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 227A860711; Wed, 29 Nov 2017 23:39:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1511998790; bh=W3+/LNhAX06a4GVsLFVWw+sTb2ySduKF1ehSLcdO/jU=; h=From:To:Cc:Subject:Date:From; b=lM4fvpKygZCiB0gYz40krW4w+CQlFK9jKSSDnANiHn3sBmg2P7hq0e7vD8qOGi1AH 34a4jW0fyEs/dL9bsrNfoSR5Pnfg902ygstxw1McD3rbttFubKum8kU35MRtz8A3UA nNWvzlP8dHDns19063Cxy94j8/KRWht776/nArxs= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from sboyd-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id AA28C6024C; Wed, 29 Nov 2017 23:39:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1511998789; bh=W3+/LNhAX06a4GVsLFVWw+sTb2ySduKF1ehSLcdO/jU=; h=From:To:Cc:Subject:Date:From; b=X4KYJiSTWSvS8QYcGPdSb1oHuwQhuOItUAf03b5EVigJBCelPRBDwXZCntzvsODyk qy6RDUTtdsk0x8+rmL1xwvLloagzSvlNzbUv1ms6QxSocBwdNlKGDK8vLKRC3tA2Tb D+bMXJXrL4MLZdnzRRzSZKwvANTwppTq17GvMrAk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org AA28C6024C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org From: Stephen Boyd To: Catalin Marinas , Will Deacon Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64: Inform user if software PAN is in use Date: Wed, 29 Nov 2017 15:39:49 -0800 Message-Id: <20171129233949.1284-1-sboyd@codeaurora.org> X-Mailer: git-send-email 2.15.0.374.g5f9953d2c365 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It isn't entirely obvious if we're using software PAN because we don't say anything about it in the boot log. But if we're using hardware PAN we'll print a nice CPU feature message indicating it. Add a print for software PAN too so we know if it's being used or not. Signed-off-by: Stephen Boyd --- arch/arm64/kernel/cpufeature.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 21e2c95d24e7..c6f8da17146b 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1189,6 +1189,9 @@ void __init setup_cpu_features(void) if (system_supports_32bit_el0()) setup_elf_hwcaps(compat_elf_hwcaps); + if (system_uses_ttbr0_pan()) + pr_info("Emulating Privileged Access Never (PAN) using TTBR0_EL1 switching\n"); + /* Advertise that we have computed the system capabilities */ set_sys_caps_initialised(); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project From 1585476651521206862@xxx Thu Nov 30 07:52:41 +0000 2017 X-GM-THRID: 1583064168827092980 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread