Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1248962imc; Mon, 11 Mar 2019 09:30:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcDJ7iV7lQwxgsYg7QusgJ0U7xRmqJI4hHHnzytVcRm+ExqAP/7wWUxuzDs0YVgI0RO70S X-Received: by 2002:a17:902:7c8f:: with SMTP id y15mr34259135pll.44.1552321859320; Mon, 11 Mar 2019 09:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552321859; cv=none; d=google.com; s=arc-20160816; b=Eive9bGVeMKmb9xwjaerY17U0BtlEw+PFlijD9KzS90wyJlVnXiynoWpyRB1FSlNlx AcyX8sJqrGq4zj9xUgCT99XQDVODO/TnN98dbfXrOm4U4pexIiuWXkYY8gRV6XW+fCuJ f3bfUqW60K5yHBWGJtFcZwCseoTNrTGP6jT0rXE347uOcakWYBDLOEMeW8kTWoG/60vL ARoeQrhbuTJGixwDGvAyZctVzcv9x/XpIwtN7niNvYxPpyOsUlQaTdKh+r0oMyN1cbe0 MZRJvSBYKtfXAR3T1Ay82CZPMRVKP/VNSySylsQ6R8tL4TNIegVFkdFtK5FSa01Q3I6L e0Aw== 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; bh=GyZWQWfp/FJXoGFvDb0qXMDwCtW0Mjc5FVARq4ddSlU=; b=bQT2gBtCJuBHo9c+6q+Ya3KP3NOP0wTsRsQd9GanwtIIZ34DE1U1pgQ9ZQlL9/Sq1y rjf5v0mpyryNq2AQF4ldJNeGXEIP1TSEB9B0EQkrl4llefKC2Am5G4YwW42E/z0EVR2L thWj34JT43VRGyYciN/RTIXTWFw6E9sMOYyLyazb68qZW6zOhHedSxCxiN3fcaApjXp5 MkANJXllVW9rnBd7njeMwr/ASe1JuU3hsdqwqi8G4uSHLs1dn5sRyBgKQ/fGrj6WXjD6 jvvK7zVyTTp8+RiaOdUP7VhxAoxp/wAzQ8rc5MQ8BDiJnP6GW4csWhGt7DOg9FBNyPjg FgXw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w8si5018159pgp.320.2019.03.11.09.30.41; Mon, 11 Mar 2019 09:30:59 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727548AbfCKQaO (ORCPT + 99 others); Mon, 11 Mar 2019 12:30:14 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:44453 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726864AbfCKQaO (ORCPT ); Mon, 11 Mar 2019 12:30:14 -0400 Received: by mail-qk1-f193.google.com with SMTP id u22so3067998qkj.11 for ; Mon, 11 Mar 2019 09:30:14 -0700 (PDT) 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=GyZWQWfp/FJXoGFvDb0qXMDwCtW0Mjc5FVARq4ddSlU=; b=a04yXCqGMgiPlXAOb96aq2y7n+BpwdwVEOnzko/6XQ08f0/H/vXfOuPRLZ4c48squk iLqpHNy2jFFXaXzd/CAiZxvZu0v0GQDrmfQ0v3e04zNSlMmMLJLiWMH+7MCIqOwbqT/h MCUoD+den/g3DsdG8MBIFT/axxbFN/SMk+L1ujsYU2WXZFyzLzGKeI4tVktFudebEvH8 /LrAvFDnxv0DEfHA6hkSLUDV1NU0GasujTcSFvEhoAo4FBhOWIVrFDdRLLCFQVLMqZTw y14RDKbg+hhoTAYGY1tgpp+VzhbOdG1DWbq4dCSBnfipb4sgRrvY5VWHjKN6SMknJWSd YrUg== X-Gm-Message-State: APjAAAVf/8YBAKTFpjxO7KoPup8/0VJlbnCwZyZCPQthNrpDUwoDfIVq 4IstOoIQww//GhWBdWsmEdOtTYQSNvf/gBNA+0M= X-Received: by 2002:ae9:e10d:: with SMTP id g13mr11670288qkm.343.1552321813736; Mon, 11 Mar 2019 09:30:13 -0700 (PDT) MIME-Version: 1.0 References: <20190307091514.2489338-1-arnd@arndb.de> <20190307091514.2489338-2-arnd@arndb.de> <20190307234850.nsbpkfcit3lnmytu@shell.armlinux.org.uk> <20190308095308.hjjrzdp4fzbbtnnv@shell.armlinux.org.uk> <20190308103429.ycasmpt6tcpsoqps@shell.armlinux.org.uk> <20190308105835.tovswk5rwxusmxdu@shell.armlinux.org.uk> In-Reply-To: From: Arnd Bergmann Date: Mon, 11 Mar 2019 17:29:56 +0100 Message-ID: Subject: Re: [PATCH 2/2] ARM: futex: make futex_detect_cmpxchg more reliable To: Ard Biesheuvel Cc: Russell King - ARM Linux admin , Mikael Pettersson , Peter Zijlstra , Nick Desaulniers , LKML , Ingo Molnar , Darren Hart , Thomas Gleixner , Dave Martin , Linux ARM 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 Mon, Mar 11, 2019 at 3:36 PM Ard Biesheuvel wrote: > On Mon, 11 Mar 2019 at 15:34, Arnd Bergmann wrote: > > On Fri, Mar 8, 2019 at 12:56 PM Ard Biesheuvel > > wrote: > > > On Fri, 8 Mar 2019 at 11:58, Russell King - ARM Linux admin wrote: > > > > On Fri, Mar 08, 2019 at 11:45:21AM +0100, Ard Biesheuvel wrote: > > > > My first attempt (before finding the original patch from Mikael Pettersson) > > was to change the probe to pass '1' as the value instead of '0', that > > worked fine. > > > > Which probe is that? diff --git a/kernel/futex.c b/kernel/futex.c index c3b73b0311bc..19615ad3c4f7 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -3864,7 +3864,7 @@ static void __init futex_detect_cmpxchg(void) * implementation, the non-functional ones will return * -ENOSYS. */ - if (cmpxchg_futex_value_locked(&curval, NULL, 0, 0) == -EFAULT) + if (cmpxchg_futex_value_locked(&curval, NULL, 1, 1) == -EFAULT) futex_cmpxchg_enabled = 1; #endif } Arnd