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.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,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 A64C6C4363A for ; Wed, 21 Oct 2020 23:42:00 +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 24CCF2415A for ; Wed, 21 Oct 2020 23:42:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fDozlQag"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="YRDA3LM3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24CCF2415A 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=WDZTEQkXbkRBF+cre9BIufPVVtD7SLbaLNkxcAvk4CI=; b=fDozlQagoRxwM079Xwo0KsCl0 TQ9m0Nsoc3KdkWvYmTkeleE41ZuY+Oswj1yN+EYWgodWXr0bhkHlJOpFz6qHARpkno3a5DQ2aOM8P QXsDeeO/oDHhMrEZhiEm+DbZgiwP0YqdcBf9RT5I8Gx1FayHVHvMeEqdQQAqJj+wfJ826nUwgzxKl VpSZ1AZnZABQ9zGoxftSIhWTID+aWMnjcsDeVqU977k75gnW3HXVTN6CRdhj+5RloFQCSFSWl7ssj dFjyAn6J4na/K54MJ09Sh44VdvV4/eSC2wqrYwkt8lsiTVWzl3FcqWjiezWhLk/9YfulH9sd4fK++ hK97hTnFQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVNim-000234-UD; Wed, 21 Oct 2020 23:40:44 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVNii-000211-1Q for linux-arm-kernel@lists.infradead.org; Wed, 21 Oct 2020 23:40:41 +0000 Received: by mail-pf1-x442.google.com with SMTP id e10so2441437pfj.1 for ; Wed, 21 Oct 2020 16:40:38 -0700 (PDT) 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=O9rYzRnSkF2UD97oO4EZ0NEFG4S2m4ydCre3ge1rKBo=; b=YRDA3LM3mSoV+qVHj0WcfDRccqbiy+Vs53VdVmWN0gDDOWE6TRTrOq4P3bSYMsJL/M LN90r/7t5oX/RYXLEIlYtQCjBeFpuifOz/VJKj8mxFU09fTHL+CdmKdb9Cbv/ziL8gH2 AUnMcPagIb2YvtdIKujUiCI5d4Jnei3Tvi53U= 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=O9rYzRnSkF2UD97oO4EZ0NEFG4S2m4ydCre3ge1rKBo=; b=dWbJ+zPV44faCzzZXYZ2WMlwvVJ8Y4IeUww4k1L7P7a2k6NDaa0bSu/kIIy1q18e2z AcZJlYpxjIqzI5S4VoJUW7+UGnfAc64YSHdwonfe5vj+19HDbZ83erjw6mpsOUbhf7QI 4e8gxmY+w7zqhs/9wL9ZAY5UbwUaboIZDbT8B8gVwTZy1jP9PWgoNoY8rSPF38yYgSog B4edrWE5mdTLuwb6p4/TmfBgNNXogCCDNdCaNCHSsjAJa+qU16+9EtzMXkmxSWAfXuzP /QC2ZeftDs6AzX5PIq3eaYyWzvc9RMHzyh29Gzo/PxpOHrsqH5c6EAUwNRf8fg2EPQ30 Kmgw== X-Gm-Message-State: AOAM533Dn9oElCpwGcanAy9l1I3jA2F4oMQzwYvvSyGmJtfhtP8k1DoC tzhmYl8s3UIu8sTk3QOlalHJtg== X-Google-Smtp-Source: ABdhPJzanjxc4NIOzF2s4oNQAJsI/jJirh6Lls2RWMsMFJPP35SrjVOC4hEaHo0pft8xghEOjUn6LQ== X-Received: by 2002:a63:c806:: with SMTP id z6mr21407pgg.430.1603323636408; Wed, 21 Oct 2020 16:40:36 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id ne16sm12877pjb.11.2020.10.21.16.40.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 16:40:35 -0700 (PDT) Date: Wed, 21 Oct 2020 16:40:34 -0700 From: Kees Cook To: Dmitry Osipenko Subject: Re: [PATCH v1] ARM: vfp: Use long jump to fix THUMB2 kernel compilation error Message-ID: <202010211637.7CFD8435@keescook> References: <20201021225737.739-1-digetx@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201021225737.739-1-digetx@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201021_194040_107119_C1BCA885 X-CRM114-Status: GOOD ( 20.10 ) 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: Nick Desaulniers , linux-kernel@vger.kernel.org, Russell King , clang-built-linux@googlegroups.com, Ingo Molnar , 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 Thu, Oct 22, 2020 at 01:57:37AM +0300, Dmitry Osipenko wrote: > The vfp_kmode_exception() function now is unreachable using relative > branching in THUMB2 kernel configuration, resulting in a "relocation > truncated to fit: R_ARM_THM_JUMP19 against symbol `vfp_kmode_exception'" > linker error. Let's use long jump in order to fix the issue. Eek. Is this with gcc or clang? > > Fixes: eff8728fe698 ("vmlinux.lds.h: Add PGO and AutoFDO input sections") Are you sure it wasn't 512dd2eebe55 ("arm/build: Add missing sections") ? That commit may have implicitly moved the location of .vfp11_veneer, though I thought I had chosen the correct position. > Signed-off-by: Dmitry Osipenko > --- > arch/arm/vfp/vfphw.S | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S > index 4fcff9f59947..6e2b29f0c48d 100644 > --- a/arch/arm/vfp/vfphw.S > +++ b/arch/arm/vfp/vfphw.S > @@ -82,7 +82,8 @@ ENTRY(vfp_support_entry) > ldr r3, [sp, #S_PSR] @ Neither lazy restore nor FP exceptions > and r3, r3, #MODE_MASK @ are supported in kernel mode > teq r3, #USR_MODE > - bne vfp_kmode_exception @ Returns through lr > + ldr r1, =vfp_kmode_exception > + bxne r1 @ Returns through lr > > VFPFMRX r1, FPEXC @ Is the VFP enabled? > DBGSTR1 "fpexc %08x", r1 This seems like a workaround though? I suspect the vfp11_veneer needs moving? -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel