From patchwork Wed Nov 15 21:34:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sami Tolvanen X-Patchwork-Id: 10060403 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 B8E2C60231 for ; Wed, 15 Nov 2017 21:40:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A892F29F30 for ; Wed, 15 Nov 2017 21:40:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D4542A2DA; Wed, 15 Nov 2017 21:40:52 +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 655BD29F30 for ; Wed, 15 Nov 2017 21:40:52 +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=PoDZpaPh9o3DS/U59UuW6SvJiYAvNB70gfP7UacE674=; b=nPU2/2FSpyuaFhbAwF+p/5LySj vczfEOFKLTg6PacF3MbgnEg549himbsp47gQ9ko9TDO32syCbffc9EW6KoOg/KpM7S2eRvVinuVIW wQBALDIlTg8A5GCGb/skpF6sFWjRK7uClUXB3YTn2ifCmEMd4S0O1GnuVd1o4bn+hIDAzeXDaB3M1 swWCoD5zT/3sjdk/vf4n5t+9q2zOu7AzdQHbtkOPFQ+eBcbo0x7A4w6U0PMXbt3pbQLpB/KL45dVL czLm/MX3YgrWcnr4OCQV318RjMXWwLgNCSZenR9xMh4v1Vh7XIA77HH7JsFsciPauV6P2yCrEz3LT s0ebPOig==; 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 1eF5QR-0006CB-Gx; Wed, 15 Nov 2017 21:40:51 +0000 Received: from mail-it0-x241.google.com ([2607:f8b0:4001:c0b::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eF5LI-0000Zn-Ge for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2017 21:35:37 +0000 Received: by mail-it0-x241.google.com with SMTP id b5so3450554itc.3 for ; Wed, 15 Nov 2017 13:35:12 -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=GfXdJL96beDafyXaRME+sTc9mBQiGtyGahNhhgmTWGo=; b=Akh/767MIyoPZjtlmr3Qm2oxsXwqnFcWHxBAq2K4EkgkV0lxD0uO4zM1XRIeg5lqs2 yrlD+VoqvxpQbNRjVBYJDFZWfuPgN6wpM+MGtaz7BmQIY+jh1DTQ8GEsa4XchB83lI/N jl5Nz699I9N4PwVt/RwlEMueo8kKNDTOdROKyhanD48Skosreluj41THOB22iD9ZImHZ QL2YSAVmjpQXWz7B2l7d6B4mzpm9HohBsaYdmBDWWYGUSKDPayhRIR4/x7UzIguctFYV d6hyy5kk1t0E8tpIN+3S37vHBdAf6ikOmyySLa04q+ZD2KPkwT5HH8vku3sfAA/8PQHr nSlg== 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=GfXdJL96beDafyXaRME+sTc9mBQiGtyGahNhhgmTWGo=; b=hunRQ8dWiO4MsheZ567AyzSrgCM8rasm4lY6XiRnnOAS05S0GyM9DyWQqZo7GZ61ju o8MmXKakLDTcs52a3mW9A5z6tUHS/XmojjqbVd+MQU7GrXQL6FwBYNHfHb8vnallqaK4 ZMsdxPjOaden6h7YjzOoN2eDBTtm0yNWlSALFp17f642tnx8cOP94A9ePxmls1YrRuyc /AYoyxEh4ci5t4PWBogGRM+0zp+gSo2IIDgtYTL3y4bbneWGyFrYqjlatBzGHfHLgiXv 9Od0/mxoJM7a62bWvaIwYDyFqjs3650/Hz/SfQqfEApAytspMblYRJ6+HSKc4y0JDCwG zO7g== X-Gm-Message-State: AJaThX6N4NFGA/dhKOK/63QSxZ0yKfsnJvW1HJ2en505enw4bX2+AJsd 0uQFdQiUvY5EwpkvMNLLAPjZIg== X-Google-Smtp-Source: AGs4zMZi5jjfqYaBfWlY+QdBSD5bK26656zzsEPRYTncWveEemuutbR5qlHWJM1pfpwblqVKGJhR2Q== X-Received: by 10.36.105.65 with SMTP id e62mr23258939itc.6.1510781712054; Wed, 15 Nov 2017 13:35:12 -0800 (PST) Received: from samitolvanen.mtv.corp.google.com ([100.98.112.14]) by smtp.gmail.com with ESMTPSA id 68sm9735197iov.2.2017.11.15.13.35.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Nov 2017 13:35:11 -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 Subject: [PATCH v2 17/18] arm64: disable RANDOMIZE_MODULE_REGION_FULL with LTO_CLANG Date: Wed, 15 Nov 2017 13:34:27 -0800 Message-Id: <20171115213428.22559-18-samitolvanen@google.com> X-Mailer: git-send-email 2.15.0.448.gf294e3d99a-goog In-Reply-To: <20171115213428.22559-1-samitolvanen@google.com> References: <20171115213428.22559-1-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171115_133533_326766_7B6C60E1 X-CRM114-Status: GOOD ( 10.37 ) 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 RANDOMIZE_MODULE_REGION_FULL results in "overflow in relocation type 275" when loading a module linked with GNU gold. As a workaround, disable when LTO_CLANG is selected. Signed-off-by: Sami Tolvanen --- arch/arm64/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index ba6aab55d464..3a70f763e18a 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1064,7 +1064,7 @@ config RANDOMIZE_BASE config RANDOMIZE_MODULE_REGION_FULL bool "Randomize the module region independently from the core kernel" - depends on RANDOMIZE_BASE + depends on RANDOMIZE_BASE && !LTO_CLANG default y help Randomizes the location of the module region without considering the