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=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,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 E1646C433DB for ; Fri, 26 Feb 2021 21:00:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 77ED364DE7 for ; Fri, 26 Feb 2021 21:00:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 77ED364DE7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=8IP+YvIas0UoAGg3LlXzMBEQgESAkVHq22Za3XF659k=; b=HZ6eDPcE2Ru/9Hnu9fgYK34hh AmKbHsJjLXBYjjXHJ+U/S1d3lf2fn5F9p0Z3LEQr7J7zz4n31apvnzccHAl7BYU2o5vhmTj0gndn/ VbLRBJi8c670G1Iamg31YeWNzLb1UWjD4u/kQEMwnqfx9A/3N43LMg/I8dDocF/spCdlbIRgPT8NE SUK0Bmsk6B/dTtioVUjdK3fDYFCx9CL3yBxVic3TQXY69BWZefhdmMj2nFkr60MVJ//tBbBkJs9q1 iNL6tYhMk1/GMl4Kbjxh/rE3CGEd7AWv+UH/uY9dWdRRTvbcsyvEy3y8cSN6YypffM4YGWFWhVQCp L6D61UC1w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFkCq-0006om-Qz; Fri, 26 Feb 2021 20:59:24 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFkCn-0006oO-VR for linux-arm-kernel@lists.infradead.org; Fri, 26 Feb 2021 20:59:22 +0000 Received: by mail-pf1-x42b.google.com with SMTP id q204so6012843pfq.10 for ; Fri, 26 Feb 2021 12:59:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=E9OhPeZv8H8l4JzZvthxgzZUD/w6z54EOYcyVm1rrW0=; b=aa5aqPlXyhDLecFMTCRqyuUQfmG+lxSgKd17sNeS/uE2H5yEbSLaUImk4jIGSLxei5 8XQHD2WM7AR2mbq/Xvwqp7b+qRvp6+d5Rn8Az7SyybbQ38O/4seAcwkKSQkxjvRlEhYo poM9On0S83+38WxLIDFqxhvkQ+7cVdW7mizsM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=E9OhPeZv8H8l4JzZvthxgzZUD/w6z54EOYcyVm1rrW0=; b=WEYue47y9t60BNoAr2+o5rSB+Qbpcm9WyId+jPjGuVTupJ453sXnYSV+EROkbyaXnV LsxTJxAC9ZmbytW19oTnTC09OmW+gFdiXnvsWwmwFJDx0ePkrFqn08CA3zBtl8rhuFDA sL6jlG/J39JD6MTdsN7Gycd5k1DY6QJR9ycq8qr+HyDVQ6FnT5tcfwl7G4VpXy8XqnCY RYVM3JGIHHOwpyp5nXwkbNNPPpRH4Io/vzDxdlt4XVLbTI0vXZyg4Qy0Lnh3krtrs1l9 7GDb0W04ICUE8vLcDbb5C4Qzjfgo/sOQIS2LzAuYGr6MwoI+QNGkFXAxj7EnRiYuuTkq MaWQ== X-Gm-Message-State: AOAM533oz5z9NGAOO2et/YomxtI4kMTolg4vgKsSpbKmM0Z58OSH/xc2 vSSxgjt+1g0f12ISoSYNrIH67A== X-Google-Smtp-Source: ABdhPJx/pWtXYYf37/ZE7cjY2XJ0WMrufaOvdsv3WL6SjGATF3YAnG7fog9qk9sHLxvxR9MPfgM+6g== X-Received: by 2002:aa7:9246:0:b029:1ed:cfa4:f1a8 with SMTP id 6-20020aa792460000b02901edcfa4f1a8mr5058315pfp.73.1614373159094; Fri, 26 Feb 2021 12:59:19 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id s138sm11291923pfc.135.2021.02.26.12.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 12:59:18 -0800 (PST) Date: Fri, 26 Feb 2021 12:59:17 -0800 From: Kees Cook To: Arnd Bergmann Subject: Re: [PATCH] arm64: vmlinux.lds.S: keep .entry.tramp.text section Message-ID: <202102261256.AF256702@keescook> References: <20210226140352.3477860-1-arnd@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210226140352.3477860-1-arnd@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210226_155922_060690_7240895C X-CRM114-Status: GOOD ( 22.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Fangrui Song , Arnd Bergmann , Catalin Marinas , linux-kernel@vger.kernel.org, Marc Zyngier , David Brazdil , Will Deacon , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org 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 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 happens when any reference to the trampoline is discarded at link > time. Marking the section as KEEP() avoids the assertion, but I have > not figured out whether this is the correct solution for the underlying > problem. > > Signed-off-by: Arnd Bergmann As a work-around, it seems fine to me. Reviewed-by: Kees Cook -Kees > --- > arch/arm64/kernel/vmlinux.lds.S | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S > index 926cdb597a45..c5ee9d5842db 100644 > --- a/arch/arm64/kernel/vmlinux.lds.S > +++ b/arch/arm64/kernel/vmlinux.lds.S > @@ -96,7 +96,7 @@ jiffies = jiffies_64; > #define TRAMP_TEXT \ > . = ALIGN(PAGE_SIZE); \ > __entry_tramp_text_start = .; \ > - *(.entry.tramp.text) \ > + KEEP(*(.entry.tramp.text)) \ > . = ALIGN(PAGE_SIZE); \ > __entry_tramp_text_end = .; > #else > -- > 2.29.2 > -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel