From patchwork Tue May 13 09:25:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 30027 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f199.google.com (mail-yk0-f199.google.com [209.85.160.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0801220369 for ; Tue, 13 May 2014 10:42:27 +0000 (UTC) Received: by mail-yk0-f199.google.com with SMTP id 200sf279334ykr.10 for ; Tue, 13 May 2014 03:42:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=xVrfm8cL3Aj5ryyfqFiuUDCwS5pwaXQC3Hz89ipkvDY=; b=gDI8Kzv1TB8HNmTTO6kqCiJNu/dYwmlYVOG50OdUg+gbUuiNey4rNHRWZZjYmVb1Bq kU7bcL8Q69Fcf6P+I6C1B9JQGkB/Rww4G6b0HSopEkBAhAwkZs+xNjdVtp5yUeqisAlY 124S0kxQXBE+5aqpuelMkP6pok/QU0UvqnO9NrO5xqHY3KU5XEChiTMvXJLIC6QUzIDn 6iCVBTANuTHli8Fm/b7UCrIqdEpv5P4eaBj0AKdHTc2D3Zgb10t9l/MwQFMfPOOkVm+X eWh7YTPKT6RePGDD+9Cdq+hPfFb2u2/IrQHecmeNhzoIBqPBsDAfYHFi0tX7p0HZ3bAr CyvQ== X-Gm-Message-State: ALoCoQlrwFk5aSs88lRFkQi4ivZSSd4Pjk+taI0QJqelIDikqOlaoJur6xTHfX/+hAXJV1qHufor X-Received: by 10.236.123.68 with SMTP id u44mr15025166yhh.19.1399977746937; Tue, 13 May 2014 03:42:26 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.31.33 with SMTP id e30ls1969428qge.89.gmail; Tue, 13 May 2014 03:42:26 -0700 (PDT) X-Received: by 10.221.40.193 with SMTP id tr1mr6555730vcb.31.1399977746855; Tue, 13 May 2014 03:42:26 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id sg6si2569842vdc.63.2014.05.13.03.42.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 03:42:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so173960vcb.29 for ; Tue, 13 May 2014 03:42:26 -0700 (PDT) X-Received: by 10.58.23.6 with SMTP id i6mr28035004vef.12.1399977746767; Tue, 13 May 2014 03:42:26 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp140540vcb; Tue, 13 May 2014 03:42:26 -0700 (PDT) X-Received: by 10.68.222.105 with SMTP id ql9mr4304515pbc.4.1399977745744; Tue, 13 May 2014 03:42:25 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fx8si12869765pac.125.2014.05.13.03.42.25; Tue, 13 May 2014 03:42:25 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933604AbaEMKk0 (ORCPT + 27 others); Tue, 13 May 2014 06:40:26 -0400 Received: from ip4-83-240-18-248.cust.nbox.cz ([83.240.18.248]:60767 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760037AbaEMJ2z (ORCPT ); Tue, 13 May 2014 05:28:55 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.80.1) (envelope-from ) id 1Wk914-0002mj-4L; Tue, 13 May 2014 11:28:54 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Catalin Marinas , Jiri Slaby Subject: [PATCH 3.12 006/182] arm64: Do not synchronise I and D caches for special ptes Date: Tue, 13 May 2014 11:25:58 +0200 Message-Id: X-Mailer: git-send-email 1.9.3 In-Reply-To: <7aa1bde8f6143b2db33e6567a8c3a4debaa246f4.1399973152.git.jslaby@suse.cz> References: <7aa1bde8f6143b2db33e6567a8c3a4debaa246f4.1399973152.git.jslaby@suse.cz> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linux-kernel-owner@vger.kernel.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Catalin Marinas 3.12-stable review patch. If anyone has any objections, please let me know. =============== commit 71fdb6bf61bf0692f004f9daf5650392c0cfe300 upstream. Special pte mappings are not intended to be executable and do not even have an associated struct page. This patch ensures that we do not call __sync_icache_dcache() on such ptes. Signed-off-by: Catalin Marinas Reported-by: Steve Capper Tested-by: Laura Abbott Tested-by: Bharat Bhushan Signed-off-by: Jiri Slaby --- arch/arm64/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 82d95a7e9466..62713586d6e3 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -168,7 +168,7 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte) { if (pte_valid_user(pte)) { - if (pte_exec(pte)) + if (!pte_special(pte) && pte_exec(pte)) __sync_icache_dcache(pte, addr); if (!pte_dirty(pte)) pte = pte_wrprotect(pte);