Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4308965pxf; Tue, 16 Mar 2021 10:14:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk/gm82wLDOa9A8KF4lyx5rc8opvVRK+yM7s8j4kloli1NnbJB4wSmciNsXYwCjiKwtXY8 X-Received: by 2002:a17:907:2b03:: with SMTP id gc3mr31079966ejc.448.1615914885012; Tue, 16 Mar 2021 10:14:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615914885; cv=none; d=google.com; s=arc-20160816; b=jqlrEXCj8iisdHlTlKx4sARbcwX8u9mgwb1q5cyca9xSxnnqC4N4zW4F9u+QNaCVtR sMV3Qgxjzl08H0TOsRGYLGOHShdtKrKI0BH7YKNhGvIR8Leb+tqksA5DxQuFn+DdYpuM 73/JTuavPyb7jcIGRD35CgF5zpG5sqLG9byYdUp6lxmx4M3uJemiNdZ/MekOZbwKid8O A+9J0wYtJ0NUkaNwnmH5dUwbsLN25r09GF0hg4lavDi7pH10s4Vxs3WPjo+N92Ni195T GVdfdKNPmLH35VmZ+WKJsnP17LzPjxRI27zKTofNvavClQqvoYWgmWXc0qcWmrYIB9EK K0PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RqJWwd3y04rTuNGZJ2lbSMwTo4IAPEa2nEvf7hPtW0w=; b=wj9jJMehESAwyrIDPis8xYPwhmJY2a+BaqNwRyxfZNtuoT8E3d7tXqrC78S9E3uDYI FKpTFH2SdXR43pd0OqJ8CBvdKTVfcswSr13ShSMALy4EHYyD7NQqVP9eACCF4Wx+5Rz7 Jc/Gknspt6W4c/lKQI/tlAFXTgCD7oPgPulfELVryKgOQEDADVDJoTA/uF1k1kkzx+va /Z/pnDM0/A1+Pp5BoEhwcOK9rToFuiFxvQeaCa9vDNuAdsvt7/UlaU4TF7t/m75uNGXg AjzrES5dmjM28yqOQRgEt6oOLrlzopbZXyDJp/188JQHJ8nhu5EDu/ySZH5rneT+wgV3 ywzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="o+MZlll/"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m21si14186519ejx.725.2021.03.16.10.14.22; Tue, 16 Mar 2021 10:14:45 -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=@kernel.org header.s=k20201202 header.b="o+MZlll/"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238777AbhCPQkO (ORCPT + 99 others); Tue, 16 Mar 2021 12:40:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:43496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238769AbhCPQjq (ORCPT ); Tue, 16 Mar 2021 12:39:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A3AA265101 for ; Tue, 16 Mar 2021 16:39:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615912785; bh=+bc8rjm6GvUDtegkcJ/U/ccnrf6/y7TQkn4U+QZVHoM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=o+MZlll/oz7EPpc929HIHT4jdPJcciANrn1W5BByuJ/1XO5HX54JdbDeeifDOoTY8 /zRRIPyaOmqJi5HyypjXWHX3Wf2F61o5hMwSN/hqiE6gfj/B9X6SQedALcprFx3PTu KiZ8DsHfkuyDLkglY4kCsy+mWTRNPYy7qOaz7h7FmZQDREO6JnTAxbfAUjandEBcij 3aVC1YTIpas/Ii3O+h5tGbcDiMniS1ZjZhPFifrBpEj5Ot5FBLRfq1nMJzZxduFccy zh+59DB0+R/ty1SGEzf9EC+it7UWib2LmttFwkeMM4xtWeZwMoWY3vYjmWVNvF7QZo pHMvCaZxCCsTg== Received: by mail-wr1-f52.google.com with SMTP id t9so7772980wrn.11 for ; Tue, 16 Mar 2021 09:39:45 -0700 (PDT) X-Gm-Message-State: AOAM531G9/0ius6t9TSlyiNVxizeKxPHJNRBdjkCtrpKMqo4NQckfFdN +SSYApOReTMQXAXBZymoO7X5SgawRnDyIwvorSU= X-Received: by 2002:adf:c641:: with SMTP id u1mr5898155wrg.332.1615912784336; Tue, 16 Mar 2021 09:39:44 -0700 (PDT) MIME-Version: 1.0 References: <20210226140352.3477860-1-arnd@kernel.org> <202102261256.AF256702@keescook> <20210227043257.k3aernmnzsvitp7c@google.com> <20210316104530.GA7309@arm.com> <20210316162745.GA20565@arm.com> In-Reply-To: <20210316162745.GA20565@arm.com> From: Arnd Bergmann Date: Tue, 16 Mar 2021 17:39:27 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] arm64: vmlinux.lds.S: keep .entry.tramp.text section To: Catalin Marinas Cc: Fangrui Song , Kees Cook , Will Deacon , Ard Biesheuvel , Mark Rutland , Marc Zyngier , David Brazdil , Linux ARM , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 16, 2021 at 5:27 PM Catalin Marinas wrote: > > 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. If I remember correctly, this showed up when CONFIG_ARM_SDE_INTERFACE is disabled, which dropped the only reference into this section. If that doesn't make sense, I can try digging through the old build logs to reproduce the problem. Arnd