From patchwork Wed Jun 24 01:49:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 11622199 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6B9BE1392 for ; Wed, 24 Jun 2020 01:52:04 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 42C0620702 for ; Wed, 24 Jun 2020 01:52:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JsIDjrN6"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="jOZxT2Ps" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 42C0620702 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pABjlQfEiwlPMyycXgaez9GlR5fBaIXoB3c2RZ+T4J4=; b=JsIDjrN6JXGECaWrGxIMHIyDM 5aiHg8rFDwSK+4x24glKCXUd+vfKdUAXv/VyN7uQ7vwaHmOhJ8SjxCUbAQ7GsE6BIqzKCNB2bd5my 9gqEymc0T5opqklGUbKBmtoQ/AyHm5pvowtJD2mwaGLJaWOFM17qRU5KecVuD5+uh6J8LvIcSPpvv NZJm+2X3nGJu500U9YVLPZ1K8MSGNdMTYCE7+rQtUinl5K7KNBHImmPq1VW+kI5feQgQcwww5Vwiu RQIVJMLR8tt6mtOKMnU8O1EkITkp+ZEhYrGmz7kI2qJE4okXs3UzgIvhN6JL1TgPYHKJfXDbZ0dnZ lbq3FeGdg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnuYQ-0006aJ-Gi; Wed, 24 Jun 2020 01:50:22 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnuXw-0006LP-Nn for linux-arm-kernel@lists.infradead.org; Wed, 24 Jun 2020 01:49:56 +0000 Received: by mail-pl1-x644.google.com with SMTP id x11so330723plo.7 for ; Tue, 23 Jun 2020 18:49:52 -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=VSVwVb1orBbLFpFmeZIdSYi3mA1O04kaneM/R6F0kQA=; b=jOZxT2PsX3nKe4zH42N/7mgdsHTdSxEFNsbLeqc6pGXimNBN5J3e1ZkCRvQrZu8na0 cWve30mGcnqoMlaLMT1Ce1TpJEMtZxmmZjcsXYz1KZNH95VEN1ccmVg7kI1Df/7OKFy6 dhDqrJzrptyGZivwT5bc3eEkH/YfH7b4ARBb8= 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=VSVwVb1orBbLFpFmeZIdSYi3mA1O04kaneM/R6F0kQA=; b=P3xleHDWhUyPcJyMU7B/TUdZ3LwoudIyZoriMbqOBH9IjM2WehaRL170RgCbC6cW1x 5DUJIqZtMyIM6Uh3tPoAqkeN5RC8jBWc86vtHgSUqRBSPP8Xypnoeu/eICtJ1fRZ4JEk wwOckxGfJ33U1SIVudEcPjIQPmiazjVbJnvb+Rb+s7G5TGgAzNKoyw1zxe011JifUzEb 0zzaz8eIqIHqeE8EcrDzzmkjifl8Ua28vZweuM5zXfTC6aH6cP8l5zB2jbOITJY5gplF 6a8oIP5WGacE5gTUzOr0hYIAw3ziyDSdEEbFqY60dypncBQ1quEkaDbhRuKc3isiQeBB LV5w== X-Gm-Message-State: AOAM531m/MddOzKVPE3Q1WmOGePiY51K5fWGL7oFFEO2UYqulZaFCyQa vvQHkh4+Ijn7aIb/Ex4qSvgdtA== X-Google-Smtp-Source: ABdhPJzLaOL5AabR46i7dKIOpQgrWYhTN0r11reBT85HgNmb6nhvZaSkN85dJfkjWvQbtPthllw43w== X-Received: by 2002:a17:902:7408:: with SMTP id g8mr24719845pll.143.1592963390847; Tue, 23 Jun 2020 18:49:50 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id y9sm17907206pfr.184.2020.06.23.18.49.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2020 18:49:46 -0700 (PDT) From: Kees Cook To: Will Deacon Subject: [PATCH v3 2/9] vmlinux.lds.h: Add .symtab, .strtab, and .shstrtab to STABS_DEBUG Date: Tue, 23 Jun 2020 18:49:33 -0700 Message-Id: <20200624014940.1204448-3-keescook@chromium.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200624014940.1204448-1-keescook@chromium.org> References: <20200624014940.1204448-1-keescook@chromium.org> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:644 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-efi@vger.kernel.org, Catalin Marinas , Arvind Sankar , Thomas Gleixner , linux-arch@vger.kernel.org, Fangrui Song , Masahiro Yamada , x86@kernel.org, Russell King , Ard Biesheuvel , clang-built-linux@googlegroups.com, Ingo Molnar , Borislav Petkov , Kees Cook , Arnd Bergmann , Nathan Chancellor , Peter Collingbourne , linux-arm-kernel@lists.infradead.org, Nick Desaulniers , linux-kernel@vger.kernel.org, James Morse Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org When linking vmlinux with LLD, the synthetic sections .symtab, .strtab, and .shstrtab are listed as orphaned. Add them to the STABS_DEBUG section so there will be no warnings when --orphan-handling=warn is used more widely. (They are added above comment as it is the more common order[1].) 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' [1] https://lore.kernel.org/lkml/20200622224928.o2a7jkq33guxfci4@google.com/ Reported-by: Fangrui Song Reviewed-by: Fangrui Song Signed-off-by: Kees Cook --- include/asm-generic/vmlinux.lds.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 1248a206be8d..8e71757f485b 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -792,7 +792,10 @@ .stab.exclstr 0 : { *(.stab.exclstr) } \ .stab.index 0 : { *(.stab.index) } \ .stab.indexstr 0 : { *(.stab.indexstr) } \ - .comment 0 : { *(.comment) } + .comment 0 : { *(.comment) } \ + .symtab 0 : { *(.symtab) } \ + .strtab 0 : { *(.strtab) } \ + .shstrtab 0 : { *(.shstrtab) } #ifdef CONFIG_GENERIC_BUG #define BUG_TABLE \