Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5214886imb; Thu, 7 Mar 2019 10:13:04 -0800 (PST) X-Google-Smtp-Source: APXvYqzujDuDDOu7QUd1Awct+w8BhpUltPZHovGn9lwoWJ7NQ8/NFslzeyeiJ/n1Nw4JC2SkKk6b X-Received: by 2002:a17:902:9a4a:: with SMTP id x10mr13664990plv.93.1551982384575; Thu, 07 Mar 2019 10:13:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551982384; cv=none; d=google.com; s=arc-20160816; b=BQyPB9f1fqgiA7xbuluqqA/zTTGcbOWBN/dM5NDGZseMyYgrPI4abcLKFyeTuszpB7 PSHTBABmRuTsXmy6mM5uRQZskSTM5RzzCcfrW7l3wvFOm8vQCqhk7U7VH+PNPg3Fjcos 2A1LZ2TVlWAerhSz6+rQfWDO41+KtL4i20UttCY2UORqS0Mfw9zjiXZGwynZh/3IAyLg o8ZRw2ww4J8QHiJalZCl1jlY9ev9y/aLvWtvGKMvVou9z2CLNJRSqXv+8jYs//fKy3bc SF3xhPcQ1jYC09Sm6v4j7yxp8ycTfun1XkRSN8JXzl3Zxz9vyCywCkGh6e4ZAzCQNkqY Skag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4TohO5bCy2C29bwYKDAneAX4fhE431b/r0k7Uv6KFvI=; b=C8YajBlr29bkvhS8RL61JYx269fxxQ9O+zoJUpVNnnX64wCmGX6wuzzohkJoxup1B7 +OX3uhmsjKxWJt1xg+6CKOr0rAj3q6SITp/nfI1HSklMV8P6Tx+6+/EiyP7teYmBnYQh vfpSnGLTDqk64uqtPNX4mGQC7xsmeX9JjhG40HDu1BNIXSmCF4lqF05XlgIUqk5yzqzt NiVfKZpk++vHhWRGbDxbCmOjHux+UMQnoDAeXaIr/8NY8Im02Zh+Xv2CocxIr+cLtGbu qoDRtoq3isR1KxaL3dKTnrBZJZBRNZuo7jM12o7Z3aQlFQ6b2yr8B/670ON4PU8I5zpg Z/3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hQY8GeKS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m26si4700641pfi.247.2019.03.07.10.12.48; Thu, 07 Mar 2019 10:13:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hQY8GeKS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726413AbfCGSMY (ORCPT + 99 others); Thu, 7 Mar 2019 13:12:24 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:35459 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726180AbfCGSMX (ORCPT ); Thu, 7 Mar 2019 13:12:23 -0500 Received: by mail-pg1-f194.google.com with SMTP id e17so11891508pgd.2 for ; Thu, 07 Mar 2019 10:12:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4TohO5bCy2C29bwYKDAneAX4fhE431b/r0k7Uv6KFvI=; b=hQY8GeKS27ims/24PG1dVIM5DwOHzj1rKCjQIIkdtPFwnmpOGzgq7gdHMa8Q30rqmQ kJ2DMpLIaHg4gm7fkXpoFwuYKw+qvrrxtbYN38L2/UsiC+EemDaQCSFVeb92LxhS+Fyz KH5+iJyLEr3LYKtedD/y850rNdP8+PajlYJRQv4vZeI7a6XdIH0knI//OTEdITM4CQ0o 2LhETDOVpB9j2/4nqzoLkRZAaEzkimaWQ2dLSV1OYuzsuL753Qin7JxWyKVx+oh91GiA EdO1/iIvkFNg68OL/vayGO87/upH8/TddAL6P0F/4vmVNPtYHqFYujf2PPi1qUFbdNkS TOzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4TohO5bCy2C29bwYKDAneAX4fhE431b/r0k7Uv6KFvI=; b=QYJuDmPRcPfXT4NsqqZD7bnDq/AaGO0/twtt/5mExco3v9QjDX2O3LMOjL4BUFq83B uaS4um6+2U0mmbuse9ZBH1d2mqkaaLenKsezdjiohuS8iZh2yyZ2AHvBVWzKwc3xip1e dQ8hG/VTWJqPaXFWupO3NdAOzdsRhreOTdUdHap5Hp8Wk40W2JAhDzDZwmY21nfStes3 b1RVF7Cu6exWC+1ntxQfksXaiMdxa+4Oa5bSDwwswaJIAKnLH/aiaqOJDgNi68joZlKN xgO6F4sAYiD0fUTKjaF7CoqeMlhEXgdNKmuujCbEdnr5tqQTWLQ2IPUw9+q2kRGwn76v hLPg== X-Gm-Message-State: APjAAAU6RNTVoyL6f6Er2aW0Are1VKrrEiPnP5LAOz5j3PYA7xLrlJa+ OzChJ3K8x/sh1lGRFtHMEhtzOTpSs+UtwdfxUOLCIQ== X-Received: by 2002:a62:f20d:: with SMTP id m13mr13878818pfh.174.1551982342542; Thu, 07 Mar 2019 10:12:22 -0800 (PST) MIME-Version: 1.0 References: <20190307091514.2489338-1-arnd@arndb.de> In-Reply-To: <20190307091514.2489338-1-arnd@arndb.de> From: Nick Desaulniers Date: Thu, 7 Mar 2019 10:12:11 -0800 Message-ID: Subject: Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline' To: Arnd Bergmann Cc: Russell King , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , Elena Reshetova , Greg Kroah-Hartman , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 7, 2019 at 1:15 AM Arnd Bergmann wrote: > > On 32-bit ARM, I got a link failure in futex_init() when building > with clang in some random configurations: > > kernel/futex.o:(.text.fixup+0x5c): relocation truncated to fit: R_ARM_JUMP24 against `.init.text' Do we know what function from the fixup text section is calling futex_detect_cmpxchg? I'm curious if this is maybe another case of -Wsection where some function may be in the wrong section? > > As far as I can tell, the problem is that a branch is over 16MB > apart in those configurations, but only if it branches back to > the init text. > > Marking the futex_detect_cmpxchg() function as noinline and > not __init avoids the problem for me. > > Signed-off-by: Arnd Bergmann > --- > kernel/futex.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/futex.c b/kernel/futex.c > index c3b73b0311bc..dda77ed9f445 100644 > --- a/kernel/futex.c > +++ b/kernel/futex.c > @@ -3849,7 +3849,7 @@ SYSCALL_DEFINE6(futex_time32, u32 __user *, uaddr, int, op, u32, val, > } > #endif /* CONFIG_COMPAT_32BIT_TIME */ > > -static void __init futex_detect_cmpxchg(void) > +static noinline void futex_detect_cmpxchg(void) > { > #ifndef CONFIG_HAVE_FUTEX_CMPXCHG > u32 curval; > -- > 2.20.0 > -- Thanks, ~Nick Desaulniers