From patchwork Mon Aug 14 12:53:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 9898821 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 3C20D602D9 for ; Mon, 14 Aug 2017 12:57:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31452285E3 for ; Mon, 14 Aug 2017 12:57:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25B13285FD; Mon, 14 Aug 2017 12:57:20 +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 420B828602 for ; Mon, 14 Aug 2017 12:57:17 +0000 (UTC) Received: (qmail 25990 invoked by uid 550); 14 Aug 2017 12:55:37 -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 23585 invoked from network); 14 Aug 2017 12:55:20 -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=YzUoPUQqcEcJbkiFZ0qCr2UMWJZbhmbo5FdGEYWqW0ZpTyWd9BtoI59IwTzhs7lMv5 XskIzTKv7LfZRUr64gjYtXzMJapkbd0O3nv9cRQNDANY8tjK7gg4+iS8FI/MR4SJIhjV usErIToCA06ljhPFMq99bc17LeZWrB+ml6SSw= 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=A6VXu+vlYPluVTHtxLXsXh+LFbVNfhzRorF20E0kdlMAQGilcNnKe/u6By5zrJegB+ MB4kgEkdJ2VFH491YPA0YvbUktoz0xmKR1stokYLC3OZBeC23iPzMghH5kMikkPRYMGy S6qRVMwMVJ7uHUbKylzqIbUIRhpLJYfeDqoDAqM24ibVS3W81jJrEmTpnkos6FRA8zT3 G/kEI+kXg5JwsRQ8mUpBiYa7QxWNyq4IhabQ9QpBtFLsBUDTard5F2sSFHN015kKe0C9 lsE9B+SNElXB87GOzQhQkTcJhHnAP66FUKHkpcoKDjcY8jFG2DNjwDJk/D1MKCuMWksc s93A== X-Gm-Message-State: AHYfb5h4vv20Fv6Si9MK1+SWDuwzKur5VnwDRtvHBdm8zK4hvafgLaYw 96sMgZ/SGIiAhsO0oGtjYw== X-Received: by 10.28.71.206 with SMTP id m75mr4653622wmi.13.1502715308967; Mon, 14 Aug 2017 05:55:08 -0700 (PDT) From: Ard Biesheuvel To: kernel-hardening@lists.openwall.com Cc: linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Arnd Bergmann , Nicolas Pitre , Russell King , Kees Cook , Thomas Garnier , Marc Zyngier , Mark Rutland , Tony Lindgren , Matt Fleming , Dave Martin Date: Mon, 14 Aug 2017 13:53:54 +0100 Message-Id: <20170814125411.22604-14-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170814125411.22604-1-ard.biesheuvel@linaro.org> References: <20170814125411.22604-1-ard.biesheuvel@linaro.org> Subject: [kernel-hardening] [PATCH 13/30] 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 --- 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 - .