Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1274076ybv; Fri, 7 Feb 2020 18:06:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwECSAYblGy8pPxfYMCiVmE7aZUwkbouUrlyBepxi2W5s6AfN+IfNAXyZH4Y641SRDnHCt4 X-Received: by 2002:a9d:58cb:: with SMTP id s11mr1857538oth.55.1581127576417; Fri, 07 Feb 2020 18:06:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581127576; cv=none; d=google.com; s=arc-20160816; b=RgKta9K2O0z3Qo/PMa5NHyvxQa/AvqSRMfeNfMWERVRzSojqDhm8j7UgBjFPZ48vdP XcJ+7uFZ/qqWWYmV1cKED/C4/REy/E56h55fp//RSq36uNqCcEaq7HhQOQrYStsvs35K M023oDLAiVjSrOKJNkd3iBCcCEkKGPoasi+UOmMiZ9/7mTj9BirPGvBB3a3WwKQchEH+ hZVZDo6M6VmdDjvhWdvLze4WQv6WnojqY36IONeGR5XTRfQJuk8e7Du3i7GhKG7tLCNd KY5PKikcT5vs57/qN8eDJSB4TX5VPv62y73zb9/bbqvQ9rq5/CbAGlsyoMW9DTUJtpXm m3rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=ZL1vw2AXxwnJQ2itrk5zfzZQ8p6ax5CM4oF2dWGGnQc=; b=x/Ux44Sz/IPusz1XjoXy5mGZAMGW7QHihyUTpQOcTd4LihQltszvA3LFpA+zH5rcKv Lcohovk37ycPnvWlbDReVn71jAVUWIUBLuDN5mp1fnz8Wf3rshYRlI2UXuLcslJisgCX BIuKUeLEC4X8DG7rp1M1lNbaqApp/ZF54QOi+rK3ZCK+t3Ji4K4h2i7uPggnFe2wVIQG vT9wc3xGiu8waGOQPwczVZvK4Pqdzt1zBJRWgxo1lDmeaQgS2BCzxZNQoSy/FArEUAj3 4jm5jD+4iD1Iy6BcMLoGoU0EDq9VsmX+eLugvblnnE4Ubqpp3Y2UDGA8pb+OPj0y6OUZ AX6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mSKNR7w2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14si4321241oih.89.2020.02.07.18.05.34; Fri, 07 Feb 2020 18:06:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mSKNR7w2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727595AbgBHCCz (ORCPT + 99 others); Fri, 7 Feb 2020 21:02:55 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:45296 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727585AbgBHCCy (ORCPT ); Fri, 7 Feb 2020 21:02:54 -0500 Received: by mail-ot1-f66.google.com with SMTP id 59so1161055otp.12 for ; Fri, 07 Feb 2020 18:02:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=ZL1vw2AXxwnJQ2itrk5zfzZQ8p6ax5CM4oF2dWGGnQc=; b=mSKNR7w2E2yDs943NNg37EL3/vyyqIeWtfn+pvbMxm6Ppu9/jMXRV5puYVNqkZWAbJ IA++lHgYp8J4Ttq/NxqrwtOg4pJ+0VoUwyelqs6zdwL/XbMeKk2J/+JQwpve+qA+2B6l c6hvByKoNep9vf8QExch1b2nYfgHciDzQmhRo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=ZL1vw2AXxwnJQ2itrk5zfzZQ8p6ax5CM4oF2dWGGnQc=; b=oFmBAOWKVZRcPDCLrAdzJXUMMIhF4Gv2Po2yRIjfd6pxXFNU3MxHfxNVj4QqW61SGp QbD0C8FGf49zAvJR8pdO4LLfsFhEoxBxKy/19QMOK45XDAIKLve8GQXKbvORLhtDS59L p/mRRmIcUdjWhsN3+nHQTElztI+iIYSqcwqtiOuj3VLE0/tX/SxfhDFXlToe7ifhgKrr zDnwnDamCA6rTRZ96kZwINEkCr836sDJIzsqhWx/9y3G0QP9imfHW8aETMIUeTghtSVV Uc8+NZTSh2YIski1PrCaBmPJ2r4dJ6UsWhp9kT1VS4+Uz2xNSvqv8ExPD4QvmqD0Q4SK TiYA== X-Gm-Message-State: APjAAAVYXJYTqkICanc86WY+wxbWEamwQZIPlsO1GPUYbP2TqdP4unEw fO2/2Ioe0LSN0qt4DbA0tBUsig== X-Received: by 2002:a9d:5e9:: with SMTP id 96mr1788864otd.307.1581127373870; Fri, 07 Feb 2020 18:02:53 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id i12sm1803428otk.11.2020.02.07.18.02.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Feb 2020 18:02:53 -0800 (PST) Date: Fri, 7 Feb 2020 18:02:51 -0800 From: Kees Cook To: Nicolas Pitre Cc: Nick Desaulniers , Manoj Gupta , Nathan Chancellor , Ard Biesheuvel , Russell King - ARM Linux , clang-built-linux , Linux ARM , linux-kernel@vger.kernel.org Subject: [PATCH] ARM: rename missed uaccess .fixup section Message-ID: <202002071754.F5F073F1D@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Rename the missed section. 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 Fixes: c4a84ae39b4a5 ("ARM: 8322/1: keep .text and .fixup regions closer together") Cc: stable@vger.kernel.org Reported-by: Nathan Chancellor Reported-by: Manoj Gupta Debugged-by: Nick Desaulniers Signed-off-by: Kees Cook --- I completely missed this the first several times I looked at this problem. Thank you Nicolas for pushing back on the earlier patch! Manoj or Nathan, can you test this? --- arch/arm/lib/copy_from_user.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/lib/copy_from_user.S b/arch/arm/lib/copy_from_user.S index 95b2e1ce559c..f8016e3db65d 100644 --- a/arch/arm/lib/copy_from_user.S +++ b/arch/arm/lib/copy_from_user.S @@ -118,7 +118,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} -- 2.20.1 -- Kees Cook