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=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 5E789C55179 for ; Fri, 30 Oct 2020 08:52:16 +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 B468622210 for ; Fri, 30 Oct 2020 08:52:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fsMLfciH"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="aGJ/V60/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B468622210 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=tbmtcfjheFdAmtQZWvV3rHdtDmHDZpTAaIciBQAYvWk=; b=fsMLfciH/SOykebSsc3gzs5JS NNcavv3gOpvpYreBlA5no2iLU/jqZa++nn11I8JzgdSMalyNEBJ95EYxdKJoQX7CYScuknGGA0tGb tEOd1ZfKkwBJaUlrGfBcAiiWG7/SAvXvOdEDZxGYqEXWlGXMCUbXLCQI9dFMRwNUYqjBoPrC4f1Av +JevPUMqxgvl4zi9v4VunpBXWoMYrp0Ib9C8wesiIAK4z47Mby6F6f4Efq30fxxSxtNLKN63st2nU LkXLc+X/vP4CP1HvfvcgQOZglOyHed5iLlEaP29TMECw3M1GzI4Tny9dSxyEGdK3C4b/MEH0wL0+8 ZeHMsRa/g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYQ8S-0000VA-S6; Fri, 30 Oct 2020 08:51:48 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYQ8P-0000UP-ND for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 08:51:46 +0000 Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AE5B320704 for ; Fri, 30 Oct 2020 08:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604047904; bh=9gaVk25cwUl+6DwGE1kuCpjD1a2IMlja6EqtvOELKXI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=aGJ/V60/MPHpK1bl9gZjlU6Y4IbrIw1MYKOZLhhJ/IoB58H3Ezz8chr9ueGA3tkyJ /AKWFHYLkl5KWq74ketAxRQ06LATFeIfbZ4n+tYA3Uuxc6CMd7DJcMXD8dIKF452jM q0xmGudO39XsRKTVq8bQbZkZSjtjY5r1lb7cj1l8= Received: by mail-qk1-f180.google.com with SMTP id k9so4183595qki.6 for ; Fri, 30 Oct 2020 01:51:44 -0700 (PDT) X-Gm-Message-State: AOAM532CwqOi4PGBOR6SnmLVve49RmJsx4xZd1Oz4XHDt1Pv1dJXrq5o fkfsw+LODc8eKXvnfy6xz79u+eWy6U1dMcePHso= X-Google-Smtp-Source: ABdhPJzbeiAI696fvA0qCIhpdAYNj4nSl8yzeE8CwwZsQ2UZ4Kp9l9JL//C69WIigOvLG+3rsTMWdOG5F4zzQ5SQjZY= X-Received: by 2002:a05:620a:b13:: with SMTP id t19mr991177qkg.3.1604047903779; Fri, 30 Oct 2020 01:51:43 -0700 (PDT) MIME-Version: 1.0 References: <20201019084140.4532-1-linus.walleij@linaro.org> <20201030002900.GA2248731@ubuntu-m3-large-x86> <20201030013228.GA2519055@ubuntu-m3-large-x86> <20201030075655.GA1848109@ubuntu-m3-large-x86> <20201030080438.GA1849056@ubuntu-m3-large-x86> <20201030084519.GA3748061@ubuntu-m3-large-x86> In-Reply-To: <20201030084519.GA3748061@ubuntu-m3-large-x86> From: Arnd Bergmann Date: Fri, 30 Oct 2020 09:51:27 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/5 v16] KASan for Arm To: Nathan Chancellor X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201030_045145_929253_89373905 X-CRM114-Status: GOOD ( 17.68 ) 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: Florian Fainelli , Arnd Bergmann , Abbott Liu , Linus Walleij , Nick Desaulniers , Russell King , Mike Rapoport , clang-built-linux , Andrey Ryabinin , Will Deacon , Ard Biesheuvel , Linux ARM 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, Oct 30, 2020 at 9:45 AM Nathan Chancellor wrote: > On Fri, Oct 30, 2020 at 09:10:56AM +0100, Ard Biesheuvel wrote: > 4043 futex_hashsize = 1UL << futex_shift; > (gdb) > 4045 futex_detect_cmpxchg(); > (gdb) I can't explain it, but I'd point out that futex_detect_cmpxchg() has caused problems in the past, with multiple patches for it proposed in the past and none of them merged. One of the patches I had sent for it was: commit 8232a8ffc332fa6a50296a51c4d85200a747256c Author: Arnd Bergmann Date: Mon Mar 4 17:33:00 2019 +0100 [SUBMITTED 20190307] futex: mark futex_detect_cmpxchg() as 'noinline' 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' 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 diff --git a/kernel/futex.c b/kernel/futex.c index e646661f6282..6fbbed45f51b 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -4061,7 +4061,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; I forgot what the problem was, but you might try that patch, or find the previous discussions in the archive. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel