Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4308801pxf; Tue, 16 Mar 2021 10:14:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzK7WgRuVNGcOh443nE4WWFyz13LTY23rJXSYtqJIMv5Eki2LLBiW9GTfq9gNIax4r3fSmA X-Received: by 2002:a17:906:cb0a:: with SMTP id lk10mr25930523ejb.479.1615914867788; Tue, 16 Mar 2021 10:14:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615914867; cv=none; d=google.com; s=arc-20160816; b=gZJPzBUgBgch0RFrydDaC/uCmMW5iXtFtBoWDorxaqWjW+ABK+BY8wB/YX54sV2Xr/ nZTmhQNu+SgoNpujZBUpFSh7LwGsHK49xMxMrBHhO5BvRuIT9wDFhWfXNycdvtvDtC9d Ka6ypFrCwgrQFGfwjaIAru6YaEF2TvAG275/86PMisK+kS5na+rbu1wAE6yZR4FRFZvn 4NVU4IVkqKWkP45+K/ExH2XO8sEalsYx4yiRSTPXtJZfbVBOY/sBl2JU1vrFswMQO82W QjP0o4P/5Q+fGLSN+DxrKC5PC2/VuRGRdwH+SIkZ/AWgfvVAmb5mJ88dnQZCyx5ZEuRW 8RGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=YunCcoMdByv7UoR5Zz9SUyAvufNdGlc2xdxahWYA26c=; b=ptbiOVnCDRySN6bLKrkz8oilWxJQSljoMNHGKFMjXd8GAnuR/P7eyOce2g2o6dcRcg TRoMHk2ygh52ZI6JfejV0cmSRZbL7ArLXdfGb8jAGAOzzeB8ot6DyG6JyhJjdxmU/8mB OTOW1cemdkj5Jthxv+kTyHRzvvTyALyJmu2SbhISsrCgpnluJ7v/zROyvXEPTlx6sCf6 Qs3jSigdPPxljMQmVGjeG3qnHNTSnldtnMJJGfUIONZh0edU+faDQbKVfmV8mw3Ystkp +JHYZGb2NJSc/YPTYIYCyvPH9Bde2kauW89T6gJTWW8aumFt8JCSvbTHWEg81nTQgf89 SmKw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z7si14286242ede.30.2021.03.16.10.14.04; Tue, 16 Mar 2021 10:14:27 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236716AbhCPQ2D (ORCPT + 99 others); Tue, 16 Mar 2021 12:28:03 -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