Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3058681ybt; Mon, 22 Jun 2020 13:57:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZxL1+r3IEahKt8TrLpfZp+mVAEEwttBOL9oTbI8kz6wKIMHetBGSqMkZnW0q5mRod6bwK X-Received: by 2002:a05:6402:3106:: with SMTP id dc6mr18360499edb.375.1592859460778; Mon, 22 Jun 2020 13:57:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592859460; cv=none; d=google.com; s=arc-20160816; b=MPj3/Jx81o1EkGShcS7mfQQIL42VapvOx6+2L9eK8Fq7mFtevoylwY8frOf0YS+Eam 6ifXPVSdu3vCnq/RrMog4GDdRhF6zpnvgacDBUeFOszBUqiPBIkXpU4TErp7fP0jsmQ+ SoSXQaZJJkoFjmU/TRGPV6TOtA4Mw2KsvlsRHcrObKYc9Y+rMnNxFQ+U+5CGY2fkSkX5 hPLtJvMMEAhTt/SIz8sugcyKIB4E0oU9fxn1HYN7kljl7sIDDDl+jOpnm0lCBBNTlhiw 2MBrJnRrfAU8rya6nj3I/UH7zwJDZZt5COfZ1O/NepNtGyxGfYBl0+rxM+knf/8b3txP WYrQ== 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=0f9fJa8OA2NYK/yNB2OP/HZmbwcQdR1u3azDKPTOctw=; b=liCuB80fKpyvIMOEvteY2uwd7m167SaDLjFBaabHXXH+X2vKDpHY4Fvt/MwkhK7tkH tqBiV2zMc5rqKHL/C3wnJM8W71aXijq4sYwEn6U7uPZDE5qAgEI6Xe/kk4mifUFiwfg1 QWt9VSqXRha7hvphNgGrpDdREj3pcsJjVxIECRvGxVmGd4uSKVBbwWqnF8TnER+1XtWP qlWtbnldVIvAdk2OaSNZM0Ch4DiSIHcxh+3UWDHZpdRe4vuAMZHa9nX8uM2rs4U46He9 rEeLSQ36ByFOA3gAQbeYmwiIggp1mSmE6HVclYJ+2hj6EZPD0l5yXp4EOjzajgBhrqAa J1Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Hd+JD6CB; 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 gr2si9972602ejb.454.2020.06.22.13.56.27; Mon, 22 Jun 2020 13:57:40 -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=Hd+JD6CB; 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 S1730388AbgFVUx6 (ORCPT + 99 others); Mon, 22 Jun 2020 16:53:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728545AbgFVUxs (ORCPT ); Mon, 22 Jun 2020 16:53:48 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04B0BC061796 for ; Mon, 22 Jun 2020 13:53:48 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id y17so8096627plb.8 for ; Mon, 22 Jun 2020 13:53:48 -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=0f9fJa8OA2NYK/yNB2OP/HZmbwcQdR1u3azDKPTOctw=; b=Hd+JD6CBzuK2BqDJ7ALVYyglKxpkRCQl/0Pa2q6BAjhgJ3NHdrXKo6F4eQ6/jyDStH FIVqU3u47cOdbudkrx208IcOhncwoGH1jnGAJADb0o2PduIem6t5sPc9hr2tyZhQYq1l 95xaMVXc58L8xguf+zEj8rW6zjssA+PybgqA0= 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=0f9fJa8OA2NYK/yNB2OP/HZmbwcQdR1u3azDKPTOctw=; b=MnfmAXPmRsRc9CNlr8uWoGbOvzDIYk0/D6e32+XAXHBxbfxW9l2eTBqswIoDIN3Buq r3RIgxpesUW1COoT57j6Ly41+Kc8pA6hROclkUhzGUE8SDhTeuVz8H7k6XPsr2/7R7Q4 qio4XGjfaq5WAj8a1kiaMmbb6v1qjiqydC5nlJYnr+FNwCIf949xGI4OflsfLehH8jPj O0XKKy7aQD1Po+sk6aOtp6VN0KD0ySARlSO0ABKube4JX0lJWQeWjy5DKpbGdaFsL56l bEKqrH9+eD5HnI+5M9lUJO0CH2MZCfKI00YYbx6wPnB8fKtSl3/Vx21KZB8MJ4gxTLAW lyTA== X-Gm-Message-State: AOAM532ZZIdnuGdu0xJnmMb5K2WXf1eUcs5hUnrHIlszO7FGf5nH/XVc C9EMGmvh+HJaIsCvu4WL/HW7kQ== X-Received: by 2002:a17:902:d916:: with SMTP id c22mr21722171plz.145.1592859227557; Mon, 22 Jun 2020 13:53:47 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id c1sm13934721pfo.197.2020.06.22.13.53.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 13:53:46 -0700 (PDT) From: Kees Cook To: Borislav Petkov Cc: Kees Cook , Thomas Gleixner , Ingo Molnar , x86@kernel.org, Arnd Bergmann , Nick Desaulniers , Nathan Chancellor , clang-built-linux@googlegroups.com, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] vmlinux.lds.h: Add .gnu.version* to DISCARDS Date: Mon, 22 Jun 2020 13:53:39 -0700 Message-Id: <20200622205341.2987797-2-keescook@chromium.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200622205341.2987797-1-keescook@chromium.org> References: <20200622205341.2987797-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 For vmlinux linking, no architecture uses the .gnu.version* section, so remove it via the common DISCARDS macro in preparation for adding --orphan-handling=warn more widely. Signed-off-by: Kees Cook --- include/asm-generic/vmlinux.lds.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index db600ef218d7..6fbe9ed10cdb 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -934,6 +934,7 @@ *(.discard) \ *(.discard.*) \ *(.modinfo) \ + *(.gnu.version*) \ } /** -- 2.25.1