From patchwork Thu Mar 19 13:00:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 229112 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=-11.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT 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 673D4C4332E for ; Thu, 19 Mar 2020 13:13:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3FC7321973 for ; Thu, 19 Mar 2020 13:13:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584623620; bh=TrcHvj+t0zhknyADv/MVGhq72AnAb4DxejAlu6KPi50=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=PNMNsA+8bo92lJvo7mz4tE1mtR3Xzom/MpylX5giB3TKvGzJxMlq8dT5MCu10g8gI vvptDCypxthjhzb8H7grF9Y9qzXhwolt5YyufFt4PU8+y5I5By88iJySG4tBXqfdtU 37NFtbkbG53GX5slbmNXNwoENnsMonhlxVHCSSvc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728312AbgCSNNi (ORCPT ); Thu, 19 Mar 2020 09:13:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:60922 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729187AbgCSNNi (ORCPT ); Thu, 19 Mar 2020 09:13:38 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9E0AD21835; Thu, 19 Mar 2020 13:13:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584623617; bh=TrcHvj+t0zhknyADv/MVGhq72AnAb4DxejAlu6KPi50=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e87y+DFN8Wjj0sBxVKLwUUAZohJR2K6w2JqNZ8CpejsgHBcF27xzXOaAoQoRqK/W9 I4TnQBy7qa8cK+U8Nb/XHF7wZgmsk1XbEwZPJ4LD+dNxlgXn2jCReUwkzrQzEyPHl0 Uiochq+5X6ec5vfxUxjsC8XtD0YP/rOh8O94Idc4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kees Cook , Ard Biesheuvel , Nick Desaulniers , Russell King Subject: [PATCH 4.9 88/90] ARM: 8958/1: rename missed uaccess .fixup section Date: Thu, 19 Mar 2020 14:00:50 +0100 Message-Id: <20200319123955.454198038@linuxfoundation.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200319123928.635114118@linuxfoundation.org> References: <20200319123928.635114118@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Kees Cook commit f87b1c49bc675da30d8e1e8f4b60b800312c7b90 upstream. When the uaccess .fixup section was renamed to .text.fixup, one case was missed. Under ld.bfd, the orphaned section was moved close to .text (since they share the "ax" bits), so things would work normally on uaccess faults. Under ld.lld, the orphaned section was placed outside the .text section, making it unreachable. Link: https://github.com/ClangBuiltLinux/linux/issues/282 Link: https://bugs.chromium.org/p/chromium/issues/detail?id=1020633#c44 Link: https://lore.kernel.org/r/nycvar.YSQ.7.76.1912032147340.17114@knanqh.ubzr Link: https://lore.kernel.org/lkml/202002071754.F5F073F1D@keescook/ Fixes: c4a84ae39b4a5 ("ARM: 8322/1: keep .text and .fixup regions closer together") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Ard Biesheuvel Reviewed-by: Nick Desaulniers Signed-off-by: Russell King Signed-off-by: Greg Kroah-Hartman --- arch/arm/lib/copy_from_user.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/arm/lib/copy_from_user.S +++ b/arch/arm/lib/copy_from_user.S @@ -100,7 +100,7 @@ ENTRY(arm_copy_from_user) ENDPROC(arm_copy_from_user) - .pushsection .fixup,"ax" + .pushsection .text.fixup,"ax" .align 0 copy_abort_preamble ldmfd sp!, {r1, r2, r3}