From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kees Cook Subject: Re: [PATCH v2 1/3] vmlinux.lds.h: Add .gnu.version* to DISCARDS Date: Mon, 22 Jun 2020 16:30:18 -0700 Message-ID: <202006221629.5C8CF8AE2@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> <202006221555.45BB6412F@keescook> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728131AbgFVXaW (ORCPT ); Mon, 22 Jun 2020 19:30:22 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C80FC061795 for ; Mon, 22 Jun 2020 16:30:21 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id e8so3736640pgc.5 for ; Mon, 22 Jun 2020 16:30:21 -0700 (PDT) Content-Disposition: inline In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: =?utf-8?B?RsSBbmctcnXDrCBTw7JuZw==?= Cc: Borislav Petkov , Thomas Gleixner , Ingo Molnar , X86 ML , Arnd Bergmann , Nick Desaulniers , Nathan Chancellor , clang-built-linux , linux-arch@vger.kernel.org, LKML On Mon, Jun 22, 2020 at 04:04:40PM -0700, Fāng-ruì Sòng wrote: > On Mon, Jun 22, 2020 at 3:57 PM Kees Cook wrote: > > > > 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 > > :( It deserves a binutils bug > (https://sourceware.org/bugzilla/enter_bug.cgi?product=binutils ) and > a comment.. https://sourceware.org/bugzilla/show_bug.cgi?id=26153 > With the description adjusted to say that this works around a bug > > Reviewed-by: Fangrui Song Adjusted, and thanks! -- Kees Cook