From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C85F3C433E0 for ; Tue, 16 Mar 2021 16:28:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8FF1A65103 for ; Tue, 16 Mar 2021 16:28:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237708AbhCPQ2N (ORCPT ); Tue, 16 Mar 2021 12:28:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:40222 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238731AbhCPQ1u (ORCPT ); Tue, 16 Mar 2021 12:27:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 43B0B6508E; Tue, 16 Mar 2021 16:27:48 +0000 (UTC) Date: Tue, 16 Mar 2021 16:27:45 +0000 From: Catalin Marinas To: Fangrui Song Cc: Kees Cook , Arnd Bergmann , Will Deacon , Arnd Bergmann , Ard Biesheuvel , Mark Rutland , Marc Zyngier , David Brazdil , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: vmlinux.lds.S: keep .entry.tramp.text section Message-ID: <20210316162745.GA20565@arm.com> References: <20210226140352.3477860-1-arnd@kernel.org> <202102261256.AF256702@keescook> <20210227043257.k3aernmnzsvitp7c@google.com> <20210316104530.GA7309@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210316104530.GA7309@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 16, 2021 at 10:45:32AM +0000, Catalin Marinas wrote: > On Fri, Feb 26, 2021 at 08:32:57PM -0800, Fangrui Song wrote: > > On 2021-02-26, Kees Cook wrote: > > > On Fri, Feb 26, 2021 at 03:03:39PM +0100, Arnd Bergmann wrote: > > > > From: Arnd Bergmann > > > > > > > > When building with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION, > > > > I sometimes see an assertion > > > > > > > > ld.lld: error: Entry trampoline text too big > > > > > > Heh, "too big" seems a weird report for having it discarded. :) > > > > > > Any idea on this Fangrui? > > > > > > ( I see this is https://github.com/ClangBuiltLinux/linux/issues/1311 ) > > > > This diagnostic is from an ASSERT in arch/arm64/kernel/vmlinux.lds > > > > ASSERT((__entry_tramp_text_end - __entry_tramp_text_start) == (1 << 16), > > "Entry trampoline text too big") > > Can we not change the ASSERT to be <= PAGE_SIZE instead? Ah, that won't work as I suspect we still need the trampoline section. Arnd, do you know why this section disappears? I did a simple test with defconfig + LD_DEAD_CODE_DATA_ELIMINATION and the trampoline section is still around. -- Catalin