From patchwork Wed Nov 29 23:44:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sami Tolvanen X-Patchwork-Id: 10083945 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 A8FA860353 for ; Wed, 29 Nov 2017 23:48:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99DF629C84 for ; Wed, 29 Nov 2017 23:48:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DCF829D55; Wed, 29 Nov 2017 23:48:02 +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.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2C65829C84 for ; Wed, 29 Nov 2017 23:48:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=1mvn9Y74+1MHvQpFY+v8CocnFo5+Ps/njNM7SNENreg=; b=scPTxNa5hiNXcVAn0JoEsNBi7H NzV8/0YIeITooPsdL3tZ+mDDazZxMHEbybXGidcDiMAuSjXBzDhoYBAAaEC5mOZikJ8Rr0PMHgOco m3vr70m0/8Wne9NptVyZCKRv6r5taM00mYOBrk5+pcX2DF1m1ZBURV/V7J2XBA7XCvfoIUmOjfdO8 aW77NMwadZHvEa+INFtYvToidboFkxtVc+DS7Ef1p/9tPmKF7lZx1cQUmKOGG+MLtYekMNB+s3t62 xj6YYdQmEq9IAakgPa+FTDDbBNlnKu+fQUbARtO3Ar4Md4PoLtOY4h0HoY8tudXC0DoRaXaAVve7u t2yzufVg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eKC59-0007L2-PW; Wed, 29 Nov 2017 23:47:59 +0000 Received: from mail-pl0-x244.google.com ([2607:f8b0:400e:c01::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eKC2c-0003gS-Bi for linux-arm-kernel@lists.infradead.org; Wed, 29 Nov 2017 23:45:37 +0000 Received: by mail-pl0-x244.google.com with SMTP id i6so3056504plt.13 for ; Wed, 29 Nov 2017 15:45:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Moej54w+jJd3UH1FNfYz1TSe1vIGd304xnvK4zulol0=; b=Tm2HAkS9h+GKzB4BYtmI9iqwwiZhlraFU4sn2WPj38ZjM5TQT8JRGTlmbgxwRjdM56 nKR5GFTWmFWeGp289JjqyfBvzKkxvqHP3u3qO9U1qR4PEb+goTje/QPkZToiiLeRbyjS hixPhnb6mrbXguHYx4ghRI33+0GnqJiX6+YYaEupxulXu34VW4gphOt0dmO515JFM/FM vizTH5K4jzx+h3w8nqANSPMqU3FrnYzpu66x9aTU34OPjOLpSQvLU4AEnQdRLqx9h0+V Z50D0zfMh7WiCk0dQJHqGzmE3wflrarNX2yyUAvd8chl600qIuxPY4LbvOoqCmDvXVTg sT3g== 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=Moej54w+jJd3UH1FNfYz1TSe1vIGd304xnvK4zulol0=; b=JI+9QGA/Itc90zNTPolOzpOrd6sbiJOgIet7DqL6Z48K17b6ZTvdRHD4fvdSSNQniv VQQ2fdC66+MOgavRdhBwiU4A/pPGP0FU7pSBHjDSkLL+zF4IssxYZdGA1cN+bUxUoKFe 6ETSIg5oiQLh9BLKEW6SSmaPo/7e5+Am/fNti2cpcGV4VVH0lUrbANRMPPKdN8X9wCnx QxWZjT6Cao7n+J8lr+9Q77DaPLOzy1UuHOlrQMIxlmO/jvEtRYoIEFGd9xAjWNtfpw4S ng1S2rsGXvlAgf9SJpSkMVb2qlnajDGQlvcHytXaaEPv/wHiZULU9p2WKFAbrWC+ovSl ENEw== X-Gm-Message-State: AJaThX79o/VBneVrocv5GZ+LEer8KImicVwLshe83TpJ1punLz9tOdOy JxePF556tLJh0vnyVLk9SMggow== X-Google-Smtp-Source: AGs4zMbTM9QiaK7NZcSw7EkOqgFUcma6K7zNiLNY8uIJ9Vi7Ex/MC+od81S5fznLsd7OiDssG51t3g== X-Received: by 10.84.168.198 with SMTP id f64mr584899plb.324.1511999102444; Wed, 29 Nov 2017 15:45:02 -0800 (PST) Received: from samitolvanen.mtv.corp.google.com ([100.98.112.14]) by smtp.gmail.com with ESMTPSA id s14sm5326948pfe.36.2017.11.29.15.45.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Nov 2017 15:45:01 -0800 (PST) From: Sami Tolvanen To: Alex Matveev , Andi Kleen , Ard Biesheuvel , Greg Hackmann , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland , Masahiro Yamada , Maxim Kuvyrkov , Michal Marek , Nick Desaulniers , Yury Norov , Matthias Kaehlcke , Nicholas Piggin Subject: [PATCH 7/7] arm64: add a workaround for GNU gold with ARM64_MODULE_PLTS Date: Wed, 29 Nov 2017 15:44:42 -0800 Message-Id: <20171129234442.655-8-samitolvanen@google.com> X-Mailer: git-send-email 2.15.0.531.g2ccb3012c9-goog In-Reply-To: <20171129234442.655-1-samitolvanen@google.com> References: <20171129234442.655-1-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171129_154523_956708_6DABF541 X-CRM114-Status: GOOD ( 10.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sami Tolvanen MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP All current versions of GNU gold crash when linking kernel modules with ARM64_MODULE_PLTS due to a known bug: https://sourceware.org/bugzilla/show_bug.cgi?id=14592 To work around the problem, this change removes NOLOAD from .plt and .init.plt. Signed-off-by: Sami Tolvanen Acked-by: Ard Biesheuvel --- arch/arm64/kernel/module.lds | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/module.lds b/arch/arm64/kernel/module.lds index f7c9781a9d48..eacb5c67f61e 100644 --- a/arch/arm64/kernel/module.lds +++ b/arch/arm64/kernel/module.lds @@ -1,4 +1,4 @@ SECTIONS { - .plt (NOLOAD) : { BYTE(0) } - .init.plt (NOLOAD) : { BYTE(0) } + .plt : { BYTE(0) } + .init.plt : { BYTE(0) } }