Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3120770ybt; Mon, 22 Jun 2020 15:46:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDpEuNuoFfyPn2vsEPqIs+57RIlQSTmBrOrcFRxWOKt/kIDDaiQIeIoujMzpMjS6PVPJC8 X-Received: by 2002:a17:906:5006:: with SMTP id s6mr17155883ejj.294.1592865983685; Mon, 22 Jun 2020 15:46:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592865983; cv=none; d=google.com; s=arc-20160816; b=cUU/vLyFm9QwhiaYTz8Ot5b2ExoC/o4j5e20+v12+auEX9RjZe4NYRWdCnuOer4J+p KDSS06+D5y4SJcDpE7Zghc97aiNqFvCXvG4MYm5OcI2Sea1JVFDkWGfEMfXf5RT3sBzQ Dq09F9zDSvwnZtE2vjOeaYIBD+874yIIOJ9KJRoHxRSZyB4zGBSObhMOdezekhDMSBJB DX9mgqw9X+rcmidtHSS5o1XAxm7EnAWXiWW2iDa1t9EKm8nMmTnJhKwuDcND61SAWseQ 9yhW68Bj9fsAFGdxfje+PqWE2hfrxPyffi9fp6SBfgZWUtTK2LAVanJSxthiEMrBWw4Q Cdlw== 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=mOfL9Rbfa1j0SjGQbfLe+co+fpbObqYEOOANsb7QdZc=; b=UmlDbsOgwpl65kYVxkj5TetUBten3pfDD0B0DL7fSeqsmyW0KBg5OXySPhHjJDBr2S +a16QsmkLOu04sHglFfybBw6tDoECYT+a2+MjtTebj2FIBg2+FDco+z7j5kW9xPUCmjJ +Po0VaxtKpr53aB9wvVoEzXXDlh85OwWvbmBllcJy1nP3EZNRenJgZdlTRWXO6jJ6P4t BPx0fziY2L3iP3viFnNfkYHhe1TIKlHrXwPIOSZrOIpuZkia2Z32cZuJ9zjwCdANo1w1 NXz+HUXEFXHXfSTJrJusrQW5TrTNspwsuikh47D89LN0UxK0wlxmBQhZukgu6hplJHgt xjVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gimWoMj2; 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 rp25si2193681ejb.366.2020.06.22.15.46.01; Mon, 22 Jun 2020 15:46:23 -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=gimWoMj2; 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 S1731417AbgFVWnl (ORCPT + 99 others); Mon, 22 Jun 2020 18:43:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731363AbgFVWnj (ORCPT ); Mon, 22 Jun 2020 18:43:39 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D1EFC061573 for ; Mon, 22 Jun 2020 15:43:39 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id j1so9099611pfe.4 for ; Mon, 22 Jun 2020 15:43:39 -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=mOfL9Rbfa1j0SjGQbfLe+co+fpbObqYEOOANsb7QdZc=; b=gimWoMj2Ct00U6evnt7HxrSzc6GeTAvOoICOsHyx4pF6AbgddWeXDK5Q6KvH9IqNn2 gHwo3IN3YST6IUoObLJdUmDfGXmKoHkIx1FNlHiVWRqXRSJNa9l+964dbINMSoNCS7OW 1ITThEbh/ZfveaIpPagnSOlyLx7r5lAqYgzOY= 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=mOfL9Rbfa1j0SjGQbfLe+co+fpbObqYEOOANsb7QdZc=; b=l/PKwRLVlAG/09mEW94NS/K7VM1l9FW5swqyittll7EvSmxwFEa6ArrYn6slii43IZ /w12CYyRFXa0FmuzqDTKe16v93AVIL4x1HgBB4eH06UbduH/l2GlkPh6nUXaZxNwGoPx USTT8cgmtncZdWgz9TFUtPT+B2Cf7uvtWKWvuygRPy0ZvVIBZ+dHAe617lFH39upzFPh p1sZs3gOtrgi0bSpymuAtnq5fZsP+dT6dVmc0gxZGXZNfS7xxJyNWmXC+HAGLGFTWoPw zHVRPWkcyWhNvy3vON1FkCUThf9TqEWPQ2MQ5xLktbxUE6CavXqcjw8MXokVYgJeePBi vbzA== X-Gm-Message-State: AOAM532TVBlflGdqZV5B1fpXbIVPwHxUbd9BeNucKMCe/AXyNqJVlUI+ PoA+TMbe6AiIwVqL8/9W57g0vg== X-Received: by 2002:a62:ea0b:: with SMTP id t11mr9201925pfh.276.1592865818848; Mon, 22 Jun 2020 15:43:38 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id i14sm14708966pfo.14.2020.06.22.15.43.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 15:43:38 -0700 (PDT) Date: Mon, 22 Jun 2020 15:43:37 -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 3/3] x86/boot: Warn on orphan section placement Message-ID: <202006221543.EA2FCFA2FF@keescook> References: <20200622205341.2987797-1-keescook@chromium.org> <20200622205341.2987797-4-keescook@chromium.org> <20200622220628.t5fklwmbtqoird5f@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200622220628.t5fklwmbtqoird5f@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:06:28PM -0700, Fangrui Song wrote: > LLD may report warnings for 3 synthetic sections if they are orphans: > > ld.lld: warning: :(.symtab) is being placed in '.symtab' > ld.lld: warning: :(.shstrtab) is being placed in '.shstrtab' > ld.lld: warning: :(.strtab) is being placed in '.strtab' > > Are they described? Perhaps: diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index db600ef218d7..57e9c142e401 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -792,6 +792,9 @@ .stab.exclstr 0 : { *(.stab.exclstr) } \ .stab.index 0 : { *(.stab.index) } \ .stab.indexstr 0 : { *(.stab.indexstr) } \ + .symtab 0 : { *(.symtab) } \ + .strtab 0 : { *(.strtab) } \ + .shstrtab 0 : { *(.shstrtab) } \ .comment 0 : { *(.comment) } #ifdef CONFIG_GENERIC_BUG -- Kees Cook