From patchwork Wed Aug 9 20:07:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tycho Andersen X-Patchwork-Id: 9891885 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 776B660363 for ; Wed, 9 Aug 2017 20:10:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68C3428A84 for ; Wed, 9 Aug 2017 20:10:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5DBC628A91; Wed, 9 Aug 2017 20:10:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id 5176E28A8F for ; Wed, 9 Aug 2017 20:10:07 +0000 (UTC) Received: (qmail 32393 invoked by uid 550); 9 Aug 2017 20:09:14 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 32215 invoked from network); 9 Aug 2017 20:09:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=docker.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eLsE+eNx+aEXi3r1tgS5x4BZk/X6YslbrPT1U9fnk7Q=; b=fGUk5qKEvdw4jZoOSguUzyiax5Mg+tbflHJx+IbW6r547oinaBSNO2k8OX4rQdxWPE bvYRus08yQxa2FyWNVy7uwWviqjqHPI1V4vYV/qfMqj12XRd6aebaK1AWwxUjMIOitwh q81QAmzdP9ScZU1AHqW4Ov67uBjbsC4rx+qJA= 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:in-reply-to :references; bh=eLsE+eNx+aEXi3r1tgS5x4BZk/X6YslbrPT1U9fnk7Q=; b=MySBWjYWMiB+/D0dtNXS05SSvDu9EMqzkGlvVIPRZgvYxlBQbAjc42rSyy/rXBTMkB fPRJClY/NVvywu0RIVdw6Nc/8lcSBq/O3VH4LHAeIkW+R/9kftCBYegv3slcT3xxnXZM LR6Q15LYPXw8gyew/PVPTIu85HrmUS7FIg29TvT9dZspP1geRCWHJKQuq1c1TA5Wff5S hN2RGI5SlNminH0visyQIPpTzp49FgAMmB4f7iiYOM1pUt5KQuvudv/a27qmBjxs9zz+ GaQGwNHpIGB46NDncS8ZxfTnA8Lp60HvlUGDNl5S2K5pd6IZWUnEYfDDHmFNd4rJghdz gSFA== X-Gm-Message-State: AIVw111ecyaYVdFlGWUxgxVT9LQfz78ptCMwgXG/sDFKLeTKpg/bO8lD r9sAx+5Byq/R1qvn X-Received: by 10.36.165.5 with SMTP id k5mr8789072itf.64.1502309338161; Wed, 09 Aug 2017 13:08:58 -0700 (PDT) From: Tycho Andersen To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, kernel-hardening@lists.openwall.com, Marco Benatto , Juerg Haefliger , Juerg Haefliger Date: Wed, 9 Aug 2017 14:07:49 -0600 Message-Id: <20170809200755.11234-5-tycho@docker.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170809200755.11234-1-tycho@docker.com> References: <20170809200755.11234-1-tycho@docker.com> Subject: [kernel-hardening] [PATCH v5 04/10] arm64: Add __flush_tlb_one() X-Virus-Scanned: ClamAV using ClamSMTP From: Juerg Haefliger Add a hook for flushing a single TLB entry on arm64. Signed-off-by: Juerg Haefliger Tested-by: Tycho Andersen --- arch/arm64/include/asm/tlbflush.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h index af1c76981911..8e0c49105d3e 100644 --- a/arch/arm64/include/asm/tlbflush.h +++ b/arch/arm64/include/asm/tlbflush.h @@ -184,6 +184,14 @@ static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end isb(); } +static inline void __flush_tlb_one(unsigned long addr) +{ + dsb(ishst); + __tlbi(vaae1is, addr >> 12); + dsb(ish); + isb(); +} + /* * Used to invalidate the TLB (walk caches) corresponding to intermediate page * table levels (pgd/pud/pmd).