Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3148279ybt; Mon, 22 Jun 2020 16:34:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfKSufzrF+SUsrAJT4oyfAfBCdJT5QDF/nURqt6nZpGe8rqs0Xb1KwnkTJKBXSgLsvUEWC X-Received: by 2002:aa7:d698:: with SMTP id d24mr19663232edr.56.1592868885685; Mon, 22 Jun 2020 16:34:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592868885; cv=none; d=google.com; s=arc-20160816; b=QGrQX32ldnI5t6TYdqvbLTt8qRQT3vvIka+1xjNlcUiMWUI4QaGviWA8iwY7nMDzw7 DwsloUuhCJCQtqvmka4dThB2NWIaqn9L6GBSzpD1LpdJeyOCmQrenOyX0PwRK2qusQPB Jo9jmtytcQzPIP5n+ZOEOo8CqkoWTmmgGDR1YiUmZm2oJ+aWspQwmobSD0T+ryhKGQ87 CGRiLd4OTFLX5BErrlrPHWQGXUSfWsty/hUpCGlOTgkfgXqZ+5luunV/29MwutgQkpbd 32R2tzYy2O7ndLPLIowzjwmVoLpAASTixw0475FSVEoiWOloe83GFTsfHCz2iK3efj63 Sg9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=/CEH8VTZP2jm3BrV0iJu7stxsX/cPaPfhD00FUDCJv4=; b=MqXlt71zLDfuSFLo0/X38fxrafdQs4jQ10+Mb2XUU25N5sdWQ3Bzwkh3NcgZloiBKP sKJhBe+T9uTO46rHgjpGx2iTtCK34IqgwvUPy64/HuxwwPsWjtwUqLHYL0hJOTZtAA8Q dBWKEojrUCQ+/+uDUUykWeX8xiRoVZF+Ocw57eI/e+45Q4ozrV7+g5MdolRTAhJt5QL2 kOoekLnxQ4vkspr8G1w6cY78Siq5TNuqO6O4n9lHrQhxngJzE9x/FwVxHjp8Nhkqn6gO SgdDKS5LYXpVFrNGVI+0v/UY8bw9GIpctSG+dYwbkpCWx+HtQEK+LW1skxhf6p+H5Cbx raCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bRwAtSDc; 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 va29si10420530ejb.235.2020.06.22.16.34.22; Mon, 22 Jun 2020 16:34:45 -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=bRwAtSDc; 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 S1730953AbgFVWJV (ORCPT + 99 others); Mon, 22 Jun 2020 18:09:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730882AbgFVWJU (ORCPT ); Mon, 22 Jun 2020 18:09:20 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E667AC061573 for ; Mon, 22 Jun 2020 15:09:19 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id e8so3644497pgc.5 for ; Mon, 22 Jun 2020 15:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/CEH8VTZP2jm3BrV0iJu7stxsX/cPaPfhD00FUDCJv4=; b=bRwAtSDcvMoGuvZ2V7MiZQ2AYZUB+iIZ05GyxDgMaBYPPQr/eNqeta8s9Kj+A1e/w1 UIeNztzPOl4SqKZrPezEvOsyvcurMrLEI/peVpvJ/dmpiL64RCNMDJXaiKzazq8CIRWm Dh5pvxamRTWNQzWILwK3KtEIgH+FDxrwMANd8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/CEH8VTZP2jm3BrV0iJu7stxsX/cPaPfhD00FUDCJv4=; b=fNTcrOcvYlgFdp4FUslUJINvXHHe5t3RsVha1fTl8uBAX6Om907OUQX6iINlTk/1BX 7MUyGhiUDXdE1fZonx0dREPnnoTkMIZqEPjnozWSgWOKcduJmNXYd8l9bYfVUHOpeHM4 5TOingjxXmxyHeKgpWG8HLgZ+HSl86J6asDSsbwf2ChqPbbVnTJCqSFCQoTxIIf6v/ey 2VdaO/dCON5SivypAEu2KagfCSe/+sZrQsaDkDmablVK4FIrO39NDP4qATRidoMC7tSS QGPyrjkQCIue6lLriDQa5CkUsGiQV58CWYuwNM7xYTvU+WXvliN2nQmBmkOkyCguu7oh NHFA== X-Gm-Message-State: AOAM530POCPOV0kyQHoxUtDiGGkOa42GVIuLky10LYhVUjbAgojdWXle 0JKT7FsycrZBgIgUfFHPSETgbh6S0Uk= X-Received: by 2002:a63:181f:: with SMTP id y31mr14845560pgl.47.1592863759529; Mon, 22 Jun 2020 15:09:19 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id cm13sm454470pjb.5.2020.06.22.15.09.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 15:09:18 -0700 (PDT) Date: Mon, 22 Jun 2020 15:09:17 -0700 From: Kees Cook To: Fangrui Song Cc: Borislav Petkov , 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: Re: [PATCH v2 1/3] vmlinux.lds.h: Add .gnu.version* to DISCARDS Message-ID: <202006221508.F3A8D3B9@keescook> References: <20200622205341.2987797-1-keescook@chromium.org> <20200622205341.2987797-2-keescook@chromium.org> <20200622220043.6j3vl6v7udmk2ppp@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200622220043.6j3vl6v7udmk2ppp@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 22, 2020 at 03:00:43PM -0700, Fangrui Song wrote: > On 2020-06-22, Kees Cook wrote: > > 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 > > I wonder what lead to .gnu.version{,_d,_r} sections in the kernel. Here's where I see it: ld: warning: orphan section `.gnu.version_d' from `arch/x86/boot/compressed/kernel_info.o' being placed in section `.gnu.version_d' -- Kees Cook