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=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 555F1C43331 for ; Tue, 16 Mar 2021 16:40:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 38F70650D9 for ; Tue, 16 Mar 2021 16:40:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238784AbhCPQkU (ORCPT ); Tue, 16 Mar 2021 12:40:20 -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-Google-Smtp-Source: ABdhPJzeAl41Jwi24YWqYpOc78h0qVKw/yZ/K8mi/08tddOj9P5fGtGAPcO4GEN+V6qGxAp16okTqikWJS8eK3u7p+E= 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 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=-9.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 9B63EC433E0 for ; Tue, 16 Mar 2021 16:41:15 +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 34E1F65124 for ; Tue, 16 Mar 2021 16:41:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34E1F65124 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fGI0Vb8s4RIJfDPd4gapIZjpZNGF+mPJ4gt++YEoBlA=; b=FRElBeXwgoQPHOb65zvkx+iLK JKoNZ0jeZ8eU4r26vZuoQ67pP6YP4IK0oOXDfCmxpbOtF+t8aWmyy3H9KJLUfAruuJKMr/iX3pHae WR/OWOINHw4MIrUW6jC+1njQX/xEcsFaKbXAw7hN4ip/nOPCdzJs4KEx01hvpERRw4CZuyTM3z5Pz AADjIAPtg+osu2K9bJ5pW40gP8KYFlc5+CF7QK+Qz0Talq8lD0rdxW1PjZyEdoKNOIeumcFdqI0C1 mCYgdSDwht9SJDhlY1g5GzXFtW3hmo9qC0uXgXli+whVUA694DKY+ueo5Fgi/LtTaWvbFpwIur3oK Sg20X6XxQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lMCjZ-001G1I-OT; Tue, 16 Mar 2021 16:39:54 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lMCjV-001G0K-2e for linux-arm-kernel@lists.infradead.org; Tue, 16 Mar 2021 16:39:51 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id B17A36510B 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=1615912786; bh=+bc8rjm6GvUDtegkcJ/U/ccnrf6/y7TQkn4U+QZVHoM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XYYENY2+yct9HGRh19oHht8IwhQD2x+sivJQg4CL3re+JIbZsxdXLLBp8iSBB1Guf oo8aQJVRsVihvkL3CGPhPvna0aN7onQnv4Cjcu7mBAHbdEDs5NfCqOZsdTEhoI7idA 1GTpEP8KeQA5y5/9xxTkavLtJl3poBQtngt0nu5ou4+dthfSl9E4D26rnvdcC441OZ RrvMBQqqak8q4y5bPabQUKnwMFDeMhvblHM0W+Z16jvBEznUA4QAYcpviGfFoHXjKO Ey+l/Z78XKZ11NO65miXH+VlUVYfmM+hi+JlBH0p1mQdKA9tmNBtMMs6kEEsuyYXRp ehyan8l0cYrog== Received: by mail-wr1-f48.google.com with SMTP id d15so10815151wrv.5 for ; Tue, 16 Mar 2021 09:39:45 -0700 (PDT) X-Gm-Message-State: AOAM530DoUaPSy1Ry9QCDxU6DuL8OEvoRkYdxW0G9tjiwB+/hMAMKRk4 2zIQn6HcbooIegeGU1MsouF0CIQ8KElcJAFAJ74= X-Google-Smtp-Source: ABdhPJzeAl41Jwi24YWqYpOc78h0qVKw/yZ/K8mi/08tddOj9P5fGtGAPcO4GEN+V6qGxAp16okTqikWJS8eK3u7p+E= 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" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210316_163949_397850_F8196306 X-CRM114-Status: GOOD ( 21.95 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel