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=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 D1E32C433DF for ; Fri, 31 Jul 2020 23:18:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB51F20672 for ; Fri, 31 Jul 2020 23:18:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="d74fEfH+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728172AbgGaXSu (ORCPT ); Fri, 31 Jul 2020 19:18:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726535AbgGaXSQ (ORCPT ); Fri, 31 Jul 2020 19:18:16 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C1E0C06179F for ; Fri, 31 Jul 2020 16:18:14 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id c6so8085936pje.1 for ; Fri, 31 Jul 2020 16:18:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rx9BNhtOHihN4cC/yR211OAq+faeKI6Zes69oCeQM6w=; b=d74fEfH+AJT4QLl/pweek9M8JQU04VeKWDA6U2gixgr/mciheG5Ezlv7MgN6Rb1HWY 2OBg7xnc3sUVIMCFnR1Y+igiUqbxr8jaR2zt1f0TV1ldOv8LhbyjysXpqao6LAEOouE3 Rwi1z6MIeG7fXDb29GK8Dc5L/EDvqKHqNhytQ= 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:mime-version:content-transfer-encoding; bh=rx9BNhtOHihN4cC/yR211OAq+faeKI6Zes69oCeQM6w=; b=lOgO7cYODi/RlmbouGSn2rBO6mg9n8fSS3+nlJ8GwgPLKTHADmVRifthWz899PiRSa zJKYw6CsXP1E0rfxZzPLq/r+lsU3jd4wYKYGJT2w+M7grjaWWyybJ43RXcwXqY/be4G8 XZB6N1DrGQRXeVweoyEDAOPoORyeFcqsVz2eqM/xRATB0kkoKmjky6mckegzMgAcrjXZ D71aYvcI4sd0CDImkk+J2sLzQV4r8UhF4pn41sDnl5i7wHSGZp1/mqcyyoCARZ2jJd+H AYOhgeT+jWJw6MbgWFLabV3lMWk03iVv3PtMcbX2Sxsuvhd/2STwOScBCDA2LlkAh8Od t9vQ== X-Gm-Message-State: AOAM5313ptXLuuIK3G4IsWb4Kqh/PCx5F2dk7Oj69UkLD5t2RirkOfYb S6MLKDNjIK8YJSEIBSeGQ/MRdw== X-Google-Smtp-Source: ABdhPJy/UWkqz0kX/iI9reViU3q1mzpCLU62ykzIRw2Fvekz5tfwEf5puBHtXUakR6EdYyybPNSt/w== X-Received: by 2002:a17:902:b101:: with SMTP id q1mr5482552plr.136.1596237494096; Fri, 31 Jul 2020 16:18:14 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id z19sm11621350pfa.9.2020.07.31.16.18.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2020 16:18:11 -0700 (PDT) From: Kees Cook To: Thomas Gleixner , Will Deacon Cc: Kees Cook , Catalin Marinas , Mark Rutland , Ard Biesheuvel , Peter Collingbourne , James Morse , Borislav Petkov , Ingo Molnar , Russell King , Masahiro Yamada , Arvind Sankar , Nick Desaulniers , Nathan Chancellor , Arnd Bergmann , x86@kernel.org, clang-built-linux@googlegroups.com, linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 18/36] arm64/build: Use common DISCARDS in linker script Date: Fri, 31 Jul 2020 16:08:02 -0700 Message-Id: <20200731230820.1742553-19-keescook@chromium.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200731230820.1742553-1-keescook@chromium.org> References: <20200731230820.1742553-1-keescook@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the common DISCARDS rule for the linker script in an effort to regularize the linker script to prepare for warning on orphaned sections. Additionally clean up left-over no-op macros. Signed-off-by: Kees Cook Acked-by: Will Deacon --- arch/arm64/kernel/vmlinux.lds.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index b29081d16a70..5c1960406b08 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -6,6 +6,7 @@ */ #define RO_EXCEPTION_TABLE_ALIGN 8 +#define RUNTIME_DISCARD_EXIT #include #include @@ -89,10 +90,8 @@ SECTIONS * matching the same input section name. There is no documented * order of matching. */ + DISCARDS /DISCARD/ : { - EXIT_CALL - *(.discard) - *(.discard.*) *(.interp .dynamic) *(.dynsym .dynstr .hash .gnu.hash) } -- 2.25.1 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=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 B4C26C433DF for ; Fri, 31 Jul 2020 23:21:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8304220791 for ; Fri, 31 Jul 2020 23:21:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="V1CxYzxC"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="d74fEfH+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8304220791 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=iS3edhJTVtsfCO6w83E9cAHv4k3BVuIcHHZMXE1yrG4=; b=V1CxYzxC7hrH8YOPTB8JHLISR cBaX5XW2HWaHj8ZndzJQ7KMjgJ9LOQOkvw8qBHGr+oLm9oaqsxJWgV7UeEFVKUq+hD7c7xRF2A2Tt ZPdUNDvxEyswE1MPdUlnN/yv5YZX+Matr2H/NI143XdOMtbIrhq1bXlFm+ReGHQ2mRpuSFVnLQw+m 72Ox7iHyoPu96AlyG2IXRg9GxQdbK3ccEfET3bql+ruCA8q+AHhRUpnBg/Oz+WGUo+nRSbH4IuIE+ NdfNMAx0FGXOcBgp1HmSo3J1H3rtjjuMmLUgvmJMyV8chVav/v2cT9wmxMiCGOtaeW+xAr4kD1HeL I/1k85ijw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1eJD-0001In-EH; Fri, 31 Jul 2020 23:19:27 +0000 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1eI4-0000im-D5 for linux-arm-kernel@lists.infradead.org; Fri, 31 Jul 2020 23:18:20 +0000 Received: by mail-pj1-x1044.google.com with SMTP id t15so8525670pjq.5 for ; Fri, 31 Jul 2020 16:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rx9BNhtOHihN4cC/yR211OAq+faeKI6Zes69oCeQM6w=; b=d74fEfH+AJT4QLl/pweek9M8JQU04VeKWDA6U2gixgr/mciheG5Ezlv7MgN6Rb1HWY 2OBg7xnc3sUVIMCFnR1Y+igiUqbxr8jaR2zt1f0TV1ldOv8LhbyjysXpqao6LAEOouE3 Rwi1z6MIeG7fXDb29GK8Dc5L/EDvqKHqNhytQ= 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:mime-version:content-transfer-encoding; bh=rx9BNhtOHihN4cC/yR211OAq+faeKI6Zes69oCeQM6w=; b=pbJ5mx4HX8IAvPAnqXh83APfk2GmtKrnEFuflJRGaEXEaPehGAGUP5ZHFVBAq0ziY+ 3tej9qYCs/vOWfKi/vKxxVoxo7QTeF7UO6J+aNoo3Y76Xqftj/Jgz0VFaowBtw3P8cpA /JzHGHrSREbfEa3tMwfAe6k/hRgY7kQzgEGRSLVFdphi/+da9m7H9dVZIFdxNvb88IX9 lO1VLJYMslZJh/qPATGPS8P2otn/axTqLNX3I1HJrWrnbplc+nQnHimbMkf6MjfYxI0p /3XqpuscVZcy9d7RpTfyvKAMbAQGVEJJuqRRGONFBHocD5yk/xyi513pi+4FeRRE3YvC RFiw== X-Gm-Message-State: AOAM530xfQiEJt8mksAvykN955Hj7UGaTAiuPzHTpgVeG5vSmbHWXuIq PvZtsCinWK4ibIYCgFmkgtdr5l0CYq8= X-Google-Smtp-Source: ABdhPJy/UWkqz0kX/iI9reViU3q1mzpCLU62ykzIRw2Fvekz5tfwEf5puBHtXUakR6EdYyybPNSt/w== X-Received: by 2002:a17:902:b101:: with SMTP id q1mr5482552plr.136.1596237494096; Fri, 31 Jul 2020 16:18:14 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id z19sm11621350pfa.9.2020.07.31.16.18.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2020 16:18:11 -0700 (PDT) From: Kees Cook To: Thomas Gleixner , Will Deacon Subject: [PATCH v5 18/36] arm64/build: Use common DISCARDS in linker script Date: Fri, 31 Jul 2020 16:08:02 -0700 Message-Id: <20200731230820.1742553-19-keescook@chromium.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200731230820.1742553-1-keescook@chromium.org> References: <20200731230820.1742553-1-keescook@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200731_191816_494005_A1C5B3E9 X-CRM114-Status: GOOD ( 13.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, Kees Cook , Arnd Bergmann , Catalin Marinas , Masahiro Yamada , x86@kernel.org, Nick Desaulniers , Russell King , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Arvind Sankar , Ingo Molnar , James Morse , Nathan Chancellor , Borislav Petkov , Peter Collingbourne , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use the common DISCARDS rule for the linker script in an effort to regularize the linker script to prepare for warning on orphaned sections. Additionally clean up left-over no-op macros. Signed-off-by: Kees Cook Acked-by: Will Deacon --- arch/arm64/kernel/vmlinux.lds.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index b29081d16a70..5c1960406b08 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -6,6 +6,7 @@ */ #define RO_EXCEPTION_TABLE_ALIGN 8 +#define RUNTIME_DISCARD_EXIT #include #include @@ -89,10 +90,8 @@ SECTIONS * matching the same input section name. There is no documented * order of matching. */ + DISCARDS /DISCARD/ : { - EXIT_CALL - *(.discard) - *(.discard.*) *(.interp .dynamic) *(.dynsym .dynstr .hash .gnu.hash) } -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel