From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 936ACC4361B for ; Wed, 9 Dec 2020 11:01:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E4AA225AC for ; Wed, 9 Dec 2020 11:01:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730313AbgLILBP (ORCPT ); Wed, 9 Dec 2020 06:01:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:57260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730217AbgLILBO (ORCPT ); Wed, 9 Dec 2020 06:01:14 -0500 Date: Wed, 9 Dec 2020 12:01:51 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1607511634; bh=WWnHgxoLW2MH6iA9QG/UVeTB42+Fb4FGIoIsrat/bWg=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=z5/M5WhVtPxcm6TU6GooGPDC5E0xzJeNYqb+GxEtdSleGqWn8MsZCgbVOCP/NDwfp BhAg/DU18ft3mQtuM4hKqupRAmurPys2sWGiYA8YghzhlIGx3YJAsagzYTghf58rjn De/Vz74/KTnaEaSOwgMNnOxqtCDBAy3V23VthZFY= From: Greg Kroah-Hartman To: dann frazier Cc: stable@vger.kernel.org, Michael Schaller , Ard Biesheuvel , Matthew Garrett , Jeremy Kerr , linux-efi@vger.kernel.org Subject: Re: [PATCH 4.4] arm64: assembler: make adr_l work in modules under KASLR Message-ID: References: <20201208011034.3015079-1-dann.frazier@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201208011034.3015079-1-dann.frazier@canonical.com> Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org On Mon, Dec 07, 2020 at 06:10:34PM -0700, dann frazier wrote: > From: Ard Biesheuvel > > commit 41c066f2c4d436c535616fe182331766c57838f0 upstream > > When CONFIG_RANDOMIZE_MODULE_REGION_FULL=y, the offset between loaded > modules and the core kernel may exceed 4 GB, putting symbols exported > by the core kernel out of the reach of the ordinary adrp/add instruction > pairs used to generate relative symbol references. So make the adr_l > macro emit a movz/movk sequence instead when executing in module context. > > While at it, remove the pointless special case for the stack pointer. > > Acked-by: Mark Rutland > Acked-by: Will Deacon > Signed-off-by: Ard Biesheuvel > Signed-off-by: Catalin Marinas > [ dannf: backported to v4.4 by replacing the 3-arg adr_l macro in head.S > with it's output, as this commit drops the 3-arg variant ] > Fixes: c042dd600f4e ("crypto: arm64/sha - avoid non-standard inline asm tricks") > Signed-off-by: dann frazier > --- > arch/arm64/include/asm/assembler.h | 36 +++++++++++++++++++++++++++--------- > arch/arm64/kernel/head.S | 3 ++- > 2 files changed, 29 insertions(+), 10 deletions(-) Now queued up, thanks! greg k-h