Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3149813ybt; Mon, 22 Jun 2020 16:38:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMa4gt3DeZO/zopCLSioFtz9jUmou1DMy3hxbEanOEOPp5xsAhonf6L/sSiOOdAPR69y79 X-Received: by 2002:a50:ed08:: with SMTP id j8mr19558524eds.58.1592869087268; Mon, 22 Jun 2020 16:38:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592869087; cv=none; d=google.com; s=arc-20160816; b=hfKPC3u7B1i+O+fZoY3cCMUMHHTsDs9UQfgEn/4WoSTvKKylLAL/qEh+PTmMP3/8Y5 jCPOwXRwBs1l3QRbg6CU2BE7RhOq3uZFJzwXn0HVXpfCD7hnFONKLrICRE8w+dCWTK4N L62RXGc3UGaKMelWoXHPJDKB5JwEx/aNyFijuJxUejpVj1FJNFHZEGhzmhSH2IRbrc93 mvZS3aVU/fv4fv/cbs4wAnxlAK+5Ca+jWmyQYgQDPRRjd//wlHBTp4Jo/kLAQmgWlNDL D12baBHHvHPdGFpWPjHtrZKLbjGvJeEytfvIu3rUIt1LxcXLA5JUw/kqVjoU254Xfwxj 01ZQ== 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=cdRwgYs2euyKw8bTCBrzUHli8NY3UiEE1Wa/LcdrQTo=; b=YD23W/954Jgq1k4pTmHTlxYIM+0YX6ByAyDAfOUFf5wgO8ayt9gSb4jMi2BCAmZ/Mg j0mgkhSXLAiWuBFuvAblDNVt1qLn4NvGoBg6Ws8exqVhC5H//RSFLO92ygqSJtDNtgZr l3f+pCV3yyYr4JGuEkJf3o5cMeqcI/8HJS2lReyZydBSJSSw+cz7dREk9XX2gsBQdeoP w4NpxFwyw6KqeC1YDzSXQ2crj6PTfhloI7G+bQeUeFmVX9SuWEZZY4JNoTBm0koJaWWK CYxiH002h+L6e5JoHwzJyEPoDU+XnTnr4LXlwNW50jIP8V2NYBPEpgrxcx1XgA7vCBvt kcWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=b3SrdlZM; 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 l10si10715545edi.562.2020.06.22.16.37.44; Mon, 22 Jun 2020 16:38:07 -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=b3SrdlZM; 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 S1731291AbgFVW5Y (ORCPT + 99 others); Mon, 22 Jun 2020 18:57:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730785AbgFVW5Y (ORCPT ); Mon, 22 Jun 2020 18:57:24 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04F3EC061573 for ; Mon, 22 Jun 2020 15:57:24 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id d12so2255271ply.1 for ; Mon, 22 Jun 2020 15:57:24 -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=cdRwgYs2euyKw8bTCBrzUHli8NY3UiEE1Wa/LcdrQTo=; b=b3SrdlZMA3OwpMQIscFhEzhRPCuOr1V97xBfjXVZkYc3YMUDejQVPuRcdTtWIIw0Ff oy5WdYFKy5O7WwtUYju01f9ihLztFN6LmfBm8fHiye/gwLYOd/HQqsOw0/s9WT+eeE2e l7M7HMf/UigmLsKBZdm6hUoSt0smOEmplljEc= 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=cdRwgYs2euyKw8bTCBrzUHli8NY3UiEE1Wa/LcdrQTo=; b=mvnsaunPgfOg1zhAFB610xBcBHH+0Ulc0OxYKU5G8sZPTxZlLyweNdh4lFzBj4IsHF 5NktDm1+RYcgN8KP6g2lz/GdqPfD10+c9x3cYUQoF0oW23D2lxtVHa2IgR43iaovMgW/ i4dnxXSnoJAPFoywyWjr+EoZoUpf+0STzdZdor1KElpQnEeLMBcT5mfvurwv9xsUbk3+ gkDDqpw6deMF6jHevKTzVxfVTOVRl6ljbsES9VH39dT8cUMsZwf76EsCLwMl38nsB9VB NdWBKFdBXalCxSDt+PHn2Tr6CdVLSbYoLZj6hZwntfwojmgg8l0QmOpI9bWKUDo3mup3 90CA== X-Gm-Message-State: AOAM530M87Tle7n1wKqZzK7Bmv4kIIDls7vH6hod0nynGNhPrAnT7Js7 2+pJ4EsK+Sjle6SCBGMA3CJvNA== X-Received: by 2002:a17:90a:db91:: with SMTP id h17mr20306954pjv.6.1592866643631; Mon, 22 Jun 2020 15:57:23 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id w10sm12181783pgm.70.2020.06.22.15.57.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 15:57:22 -0700 (PDT) Date: Mon, 22 Jun 2020 15:57:21 -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: <202006221555.45BB6412F@keescook> References: <20200622205341.2987797-1-keescook@chromium.org> <20200622205341.2987797-2-keescook@chromium.org> <20200622220043.6j3vl6v7udmk2ppp@google.com> <202006221524.CEB86E036B@keescook> <20200622225237.ybol4qmz4mhkmlqc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200622225237.ybol4qmz4mhkmlqc@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:52:37PM -0700, Fangrui Song wrote: > > And it's not in the output: > > > > $ readelf -Vs arch/x86/boot/compressed/vmlinux | grep version > > No version information found in this file. > > > > So... for the kernel we need to silence it right now. > > Re-link with -M (or -Map file) to check where .gnu.version{,_d,_r} input > sections come from? It's not reporting it correctly: .gnu.version_d 0x00000000008966b0 0x0 .gnu.version_d 0x00000000008966b0 0x0 arch/x86/boot/compressed/kernel_info.o .gnu.version 0x00000000008966b0 0x0 .gnu.version 0x00000000008966b0 0x0 arch/x86/boot/compressed/kernel_info.o .gnu.version_r 0x00000000008966b0 0x0 .gnu.version_r 0x00000000008966b0 0x0 arch/x86/boot/compressed/kernel_info.o it just reports whatever file is listed on the link command line first. > If it is a bug, we should probably figure out which version of binutils > has fixed the bug. I see this with binutils 2.34... -- Kees Cook