From patchwork Sun Sep 3 12:07:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 9936141 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 E22526037D for ; Sun, 3 Sep 2017 12:11:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D42DC286A9 for ; Sun, 3 Sep 2017 12:11:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C905D286B3; Sun, 3 Sep 2017 12:11:03 +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 DC6DC286A9 for ; Sun, 3 Sep 2017 12:11:02 +0000 (UTC) Received: (qmail 13995 invoked by uid 550); 3 Sep 2017 12:09:13 -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 13880 invoked from network); 3 Sep 2017 12:09:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=u3I3Jk6wrJK6+7ea8yX3xVYVsbsP1/6JexLXk9d8LqI=; b=YDrufHehNmomk3YftZfG+wWmE1esTvpbap5X4fT9aMSy1WCJ3jwRV+14KccGBgtD9i CFuQRbxzdFQ+mgH+avqrJWKJsxMASNhMWoUpWDjqsS/15HIKdzsuaZnk57vRbml1CfV3 50TIXjPWLcHuYHlre0J4iVmcf8MuF4b6zE/ZY= 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=u3I3Jk6wrJK6+7ea8yX3xVYVsbsP1/6JexLXk9d8LqI=; b=KlUsKQCl/DVOxI9Nz/8Xh+R3CxZDuOyNVE5Pyy/s7LjwOMZDOsob0aIPJlowCz5bGr aSWvwJPWMOgdCC2qj2Bp7hxwHy8UkXZHovZzQzMk6BSOWvmv5BDOdSbuF/ifRXEGxLeo aUz72jYTXZoUFFi+3XY4BBrV/zMXMQlDdkF+MJVlbQ35RLRIdO/k+NON9FDgedr0qZus 6twXdIqutWe36vqd+ZkmIR3iB5+XkhP3E3pETQjBHrG2uVB+20oUDiyur1/TsJp77Fcu gxrZSgm8wUb58uwX2j3Mx1VCjv+tHuZhIsQSNAH9VltERM2Ul+roCicuHvlhs/4kMO7w 3bTQ== X-Gm-Message-State: AHPjjUg4tRoz4cT2vLvC/7y01vUZ9y5nBAthitYCpU/DBaNnoj6ZBW2c PURwM6teOMTod4v4 X-Google-Smtp-Source: ADKCNb7Ow62BOa1H5MzMFB+4vCSLpCa830CMvxWwJggApd77Xu6nEY7OSEITlilzfiNbjEmMI9bPQw== X-Received: by 10.28.228.195 with SMTP id b186mr2515862wmh.137.1504440541114; Sun, 03 Sep 2017 05:09:01 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, kernel-hardening@lists.openwall.com Cc: Ard Biesheuvel , Arnd Bergmann , Nicolas Pitre , Russell King , Kees Cook , Thomas Garnier , Marc Zyngier , Mark Rutland , Tony Lindgren , Matt Fleming , Dave Martin Date: Sun, 3 Sep 2017 13:07:42 +0100 Message-Id: <20170903120757.14968-15-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170903120757.14968-1-ard.biesheuvel@linaro.org> References: <20170903120757.14968-1-ard.biesheuvel@linaro.org> Subject: [kernel-hardening] [PATCH v2 14/29] arm-soc: mvebu: replace open coded VA->PA conversion X-Virus-Scanned: ClamAV using ClamSMTP This replaces an open coded calculation to obtain the physical address of a far symbol with a call to the new ldr_l etc macro. Signed-off-by: Ard Biesheuvel Acked-by: Nicolas Pitre --- arch/arm/mach-mvebu/coherency_ll.S | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/arm/mach-mvebu/coherency_ll.S b/arch/arm/mach-mvebu/coherency_ll.S index 8b2fbc8b6bc6..df0ccb5cef1d 100644 --- a/arch/arm/mach-mvebu/coherency_ll.S +++ b/arch/arm/mach-mvebu/coherency_ll.S @@ -42,9 +42,7 @@ ENTRY(ll_get_coherency_base) ldr r1, =coherency_base cmp r1, #0 beq 2f - adr r1, 3f - ldr r3, [r1] - ldr r1, [r1, r3] + ldr_l r1, coherency_phys_base b 2f 1: /* @@ -160,7 +158,3 @@ ENTRY(ll_disable_coherency) dsb ret lr ENDPROC(ll_disable_coherency) - - .align 2 -3: - .long coherency_phys_base - .