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 AA268C433E0 for ; Tue, 16 Mar 2021 10:46:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7806F64FA5 for ; Tue, 16 Mar 2021 10:46:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236831AbhCPKqG (ORCPT ); Tue, 16 Mar 2021 06:46:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:43752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236907AbhCPKph (ORCPT ); Tue, 16 Mar 2021 06:45:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 498E664F4C; Tue, 16 Mar 2021 10:45:35 +0000 (UTC) Date: Tue, 16 Mar 2021 10:45:32 +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: <20210316104530.GA7309@arm.com> References: <20210226140352.3477860-1-arnd@kernel.org> <202102261256.AF256702@keescook> <20210227043257.k3aernmnzsvitp7c@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210227043257.k3aernmnzsvitp7c@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -- Catalin 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.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 895A2C433E0 for ; Tue, 16 Mar 2021 10:49:18 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 5ADB564FB1 for ; Tue, 16 Mar 2021 10:49:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5ADB564FB1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=K6v3vFe631jeUmg7Y76nqGOw/pGyZs2gG9zN15ElKgs=; b=npoxGvNpjQn3vGNXCDX8MwylF aDUnQA6pSPW3CF/rhU9R8FNnVR3JK0QpS0J7NiOswtMkEcDrFJ92C5y3SetAx6824phCxTtE3tjKB k1blCbubqirF/JqH5Qy9W5QGncf2i0k5Pwo1tfhx73IWuYhDT7nWY0ssHZlTdJCOK7WQDxhaML+Lx rRmGacprJXqNLRam9Bp7fSEepZS5oMyjpGFs/5ykloGX+/qCUr8w2R++VXrRsoQ1nnirDrK03dXKe qXsru0zynVEVfE/XjRPevsKuCK8iq/GaCKv5pQzKwgPyos7lF2i/IcOKRUqqjbJUOXxDFodYuD8Cl Tw6HtvAGw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lM7Ep-000SqX-FG; Tue, 16 Mar 2021 10:47:47 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lM7Ck-000S5u-T3 for linux-arm-kernel@lists.infradead.org; Tue, 16 Mar 2021 10:45:43 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 498E664F4C; Tue, 16 Mar 2021 10:45:35 +0000 (UTC) Date: Tue, 16 Mar 2021 10:45:32 +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: <20210316104530.GA7309@arm.com> References: <20210226140352.3477860-1-arnd@kernel.org> <202102261256.AF256702@keescook> <20210227043257.k3aernmnzsvitp7c@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210227043257.k3aernmnzsvitp7c@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210316_104539_876204_36C670B7 X-CRM114-Status: GOOD ( 14.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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? -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel