Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp425674pxa; Fri, 31 Jul 2020 16:19:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4X2VBUWF1iivVt1PECttbyQDabHHtszMWXnBFoD7EHLt6DwUt8jKNCY+iEzGP2Bs2vvAy X-Received: by 2002:a05:6402:b45:: with SMTP id bx5mr6260855edb.22.1596237543772; Fri, 31 Jul 2020 16:19:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596237543; cv=none; d=google.com; s=arc-20160816; b=t6AaskF/5tfxnh5C6VZvETIMhJdNsFOr5FSzV5ZdDgJGy8CP7kBA6fZH3YTfsi+KwE Ybarn7aWhNuWTjjaGqm7ZaIgs8wtBYxOCCo1IYOdjguLUa95DfqpRaZf0rnk5DEBeM+5 2TlXHyQ4R0+XAG/N/9gBIRaYhsWh0srETgPzMMdzgEkNO9768yAVs+LnEgvXOQCLuTUv b1mrXjMvpRVgChjr4gyz6yhZTNS7GQTQGS3W6q46U5W57HYW44rcdJ1u6gNpjnb9burB FP9fD7P7yUemmJ1j9paAVBPQPQQ0BB1yQO9F/imydUZMh5WKeldE/Jw86cmB9b5MYk+R za4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SkeFoLe4SBoT15Xnwf3OcmbBPE6+tbLBkxS1vM74EoU=; b=WSsjvfVjpuqOzOuypWrr3YGjrC50a1qbScE4Gmp9xh8Gm/EzBAoRU9f/mS4ip9iKV8 /rqkmdkMTRpOfwjOz2FhHMv7MDguW7WjEY11YW1h8Bqzp7fVGqWkoYXQ4sCBggb/mjA6 sJhpo5YJtm5XH8NGrHcN1lXvHCCuyi99kvxPk3m02CCFZlqxsIIpRK4FFXxf6jPUrQqz LAmkFeaLeOdeyZTeO/Zhb22YNrXoym/uqrLjCuLDHSMZdnWrwHaAbABM8uvxYr0cqIEc 8MOY9DneqyMZk2KespqFa/6628ucnCFLtQDJjTXN8KFlUBuaxuuO6C7BMw2fvrkUH9rv RGVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lnbNKX0y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id k27si5768376ejb.408.2020.07.31.16.18.41; Fri, 31 Jul 2020 16:19:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lnbNKX0y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727987AbgGaXS1 (ORCPT + 99 others); Fri, 31 Jul 2020 19:18:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727867AbgGaXST (ORCPT ); Fri, 31 Jul 2020 19:18:19 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C32EC06179F for ; Fri, 31 Jul 2020 16:18:19 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id t15so8525731pjq.5 for ; Fri, 31 Jul 2020 16:18:19 -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=SkeFoLe4SBoT15Xnwf3OcmbBPE6+tbLBkxS1vM74EoU=; b=lnbNKX0yrfuIRdUZJkjGlbRNTiMhvfwxVpXDYRKv1uYsZkZJQBZ1H1ftIvtEueMK4i EZzAYJIVCHb4H0GrV5BR0w8igFvwwXmNSxL7atkIcoZ9mdukob58OhhDld9wiWglZIS7 sG3JyHqFSitYo4Uw21wClTSyR/gc5iFGYXNV0= 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=SkeFoLe4SBoT15Xnwf3OcmbBPE6+tbLBkxS1vM74EoU=; b=B9mgpuM6WW15JU3YXKYDF3a+zhNSvjB9irMl7dGk89IHc2yWrvULWFBKsQdjsfh966 mpOhJvVAclb80PSqKZYzVimvfXkRFZiSS1HRql7iUbQZ5ofcnWH+TJyNZ1SmAHXaDGOu TBz6Aqp068KoIYCOC7UCSYwH24vhsI7v6KbLYT8yWDd7UGhMJnH3TCbQ37doudCO4aQa J3bZVO0/NIqCMxj4HGELLk2rx28ufe0HU75TKbA2N6Wvta2hQH+dz9ZrtJf7OQxpV9wQ UwuLaWmoPQyHABjruKxy3fzLXMDOWwdR4OQqrUx5LszUV2WVdVk97mU7EcrhTAXW9fuP 3fNQ== X-Gm-Message-State: AOAM531u23rFf8HpawiJGuHBe4pSTyQ+KUWrf8IgHCobkIcs5TLUx80r 29ibW+xtZVs6t7UcVTcCTVcKxw== X-Received: by 2002:a17:902:a610:: with SMTP id u16mr3670388plq.197.1596237498722; Fri, 31 Jul 2020 16:18:18 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id g15sm4473924pfh.70.2020.07.31.16.18.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2020 16:18:15 -0700 (PDT) From: Kees Cook To: Thomas Gleixner , Will Deacon Cc: Kees Cook , Nick Desaulniers , Catalin Marinas , Mark Rutland , Ard Biesheuvel , Peter Collingbourne , James Morse , Borislav Petkov , Ingo Molnar , Russell King , Masahiro Yamada , Arvind Sankar , 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 23/36] arm/build: Explicitly keep .ARM.attributes sections Date: Fri, 31 Jul 2020 16:08:07 -0700 Message-Id: <20200731230820.1742553-24-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 In preparation for adding --orphan-handling=warn, explicitly keep the .ARM.attributes section by expanding the existing ELF_DETAILS macro into ARM_DETAILS. Suggested-by: Nick Desaulniers Link: https://lore.kernel.org/lkml/CAKwvOdk-racgq5pxsoGS6Vtifbtrk5fmkmnoLxrQMaOvV0nPWw@mail.gmail.com/ Signed-off-by: Kees Cook --- arch/arm/include/asm/vmlinux.lds.h | 4 ++++ arch/arm/kernel/vmlinux-xip.lds.S | 2 +- arch/arm/kernel/vmlinux.lds.S | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/vmlinux.lds.h b/arch/arm/include/asm/vmlinux.lds.h index a08f4301b718..c4af5182ab48 100644 --- a/arch/arm/include/asm/vmlinux.lds.h +++ b/arch/arm/include/asm/vmlinux.lds.h @@ -52,6 +52,10 @@ ARM_MMU_DISCARD(*(__ex_table)) \ COMMON_DISCARDS +#define ARM_DETAILS \ + ELF_DETAILS \ + .ARM.attributes 0 : { *(.ARM.attributes) } + #define ARM_STUBS_TEXT \ *(.gnu.warning) \ *(.glue_7) \ diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S index 904c31fa20ed..57fcbf55f913 100644 --- a/arch/arm/kernel/vmlinux-xip.lds.S +++ b/arch/arm/kernel/vmlinux-xip.lds.S @@ -150,7 +150,7 @@ SECTIONS _end = .; STABS_DEBUG - ELF_DETAILS + ARM_DETAILS } /* diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index bb950c896a67..1d3d3b599635 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -149,7 +149,7 @@ SECTIONS _end = .; STABS_DEBUG - ELF_DETAILS + ARM_DETAILS } #ifdef CONFIG_STRICT_KERNEL_RWX -- 2.25.1