Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp809164imm; Fri, 28 Sep 2018 07:12:10 -0700 (PDT) X-Google-Smtp-Source: ACcGV62Z6upT6TM5Qsr7ribSlAUb63rW5wYZepuESqRHLkSvGspTZGkY4tCsQCn7xBf03N8FldBX X-Received: by 2002:a17:902:292b:: with SMTP id g40-v6mr16422714plb.223.1538143929995; Fri, 28 Sep 2018 07:12:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538143929; cv=none; d=google.com; s=arc-20160816; b=C8hcTDUqOLlQfl3mm6fXqyF3JwoUsRhxOkv2JcEvNA1/lnAqIwruhtbOu7xJcVPtdb g4mEDbhR2PLixBhvNrk7/xbdhYn2OakSrpOxLJt5cMP7Cb12Qx7OsEv/nj/OaMfD8ALJ w4+zWxDaq8SLjU4rc0HdPfIdsqYd/0YyyuZZl9+BsSJgoRNkKT8WulIK/eJQ/zb6Di9a zo0KqAclCEmOszlbC/3aUy2cyghnKDzdw1FjTSulwxWc+MUbecewpTPk78B+oKZkTFF6 Y1fP3qhIi35E3WKpRJJpAZqNB/cNfXDHQaBdlmVxW3q4wuKXuT/GS8tYL5H0aD+CCIDZ sATw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=3N8yfkIrpBSEevfe1Y2pYDq7wRXxT17HdmFhv74hm7w=; b=L7K1vPssHIWqLd6ARgyGP1PmAlLqKHBa6G9tLXl2WfQZKBWlVuWrzxDkr44zJguxO6 ZZBROnAbOdN8mggHmC1C74XwYiYLKDr2rDqwTGHJPpUAh3wEtDo5orJ4J/laTahlYRLn aB3ZJg8v59OBdHNWdQY38nemvsY/qedOh1wNF1oOKICYAWiV6FroDLa2hycU7E9OTOv7 Cbpiep36Un9p5NadpYIcNQLf37Yl0cBr6QCDidGVcAQwjBT1sS7edaIMl8MEk72ipDEY U/MjQFtpTVlPMvzjHs2sESsn/c0p/+xDzl448pkc3B+tCKQpeA/O7vFBtj9kZrtzhL/r GY7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=iVFEFBTR; 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 h32-v6si4877156pgb.290.2018.09.28.07.11.53; Fri, 28 Sep 2018 07:12:09 -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; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=iVFEFBTR; 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 S1728792AbeI1Ufq (ORCPT + 99 others); Fri, 28 Sep 2018 16:35:46 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:46449 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbeI1Ufp (ORCPT ); Fri, 28 Sep 2018 16:35:45 -0400 Received: by mail-pg1-f193.google.com with SMTP id b129-v6so4547345pga.13 for ; Fri, 28 Sep 2018 07:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3N8yfkIrpBSEevfe1Y2pYDq7wRXxT17HdmFhv74hm7w=; b=iVFEFBTRjCrLbF6wB2HQo8GLV0NjohO2/TcepI11PjTXZC5DBQLu0uobBTDwZudPoI pDXggnH/G69Eo5UV4LVT95ejcQobIYPLSIzEaXnTSIfI9S8zCmxoG4LbV2P8NO/vjBAQ 4y9v7uJKM+KJy6ooZpo+Fd1/W+1NO74xzG+a4clTOnR6cg4MxejZdx5mbVdT25yrb+qK /z0Eu6sovfo02G0BY0oCtAA2GuO+aHuJX6fmmO2+5pkaLxjeXsRaaXUGz718lQtZ9HPE uyLpbdv9rwK7lRhCyqV/EK8u0gM9MsdvLvz59Y3CBD3LVCmHXpc5ncizGBY1FMbMcGF5 bq2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3N8yfkIrpBSEevfe1Y2pYDq7wRXxT17HdmFhv74hm7w=; b=fUMWZI15uaNeWm77DJnO5m6eAEKREIiXTLLsLa+YJpPDOG8SUJ7jNSzW7Cs2FVHYPq zvHT8a/gXbmY3RHf2nj1c4KWAtQY3bapBD/qU5acZI+ls+/DPpimYPlFdyynnwdA929U vWCcuqBT/4jAMy5MnH9Ad9eSm/ZSTujIC3fCeeIF05NSjJXL25OOaxElQ8qKFzMM+SoW aGX/gAK67bkRgur+Y2kG1tX2SNn21lCwULrzCQbPezDQE2AcIM3AEANb7wVvdZVdqHls qcf+6aiH+DD+/M9EcHSpC6FMS+NdcB2+cDuIMgOQHstUv7d5PX7B+FxC0QG4qdF464tC J+OQ== X-Gm-Message-State: ABuFfoho0CIpiKbHbEgeFfMooZaYRkqzc5oXmCXqn4e3a2u8Dis2s+Ix XR+6jFx5dlS27lrWTpxl/gzxKw== X-Received: by 2002:a63:db44:: with SMTP id x4-v6mr15397792pgi.285.1538143906695; Fri, 28 Sep 2018 07:11:46 -0700 (PDT) Received: from ?IPv6:2601:646:c200:7429:11d5:3956:df08:f0eb? ([2601:646:c200:7429:11d5:3956:df08:f0eb]) by smtp.gmail.com with ESMTPSA id f184-v6sm12706825pfc.88.2018.09.28.07.11.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Sep 2018 07:11:45 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] futex: Set USER_DS for the futex_detect_cmpxchg() test From: Andy Lutomirski X-Mailer: iPhone Mail (16A366) In-Reply-To: Date: Fri, 28 Sep 2018 07:11:44 -0700 Cc: Martin Schwidefsky , Geert Uytterhoeven , Andy Lutomirski , the arch/x86 maintainers , Peter Zijlstra , Ingo Molnar , Darren Hart , Linux Kernel Mailing List , linux-s390 , Heiko Carstens , Finn Thain Content-Transfer-Encoding: quoted-printable Message-Id: <0B38810F-3E22-45A8-9D5D-EDEABD214148@amacapital.net> References: <74fb6ce22f62e0fb48b91ca9918b74cedbcecaf1.1538096323.git.luto@kernel.org> <20180928103726.07761672@mschwideX1> To: Thomas Gleixner Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Sep 28, 2018, at 1:42 AM, Thomas Gleixner wrote: >=20 >> On Fri, 28 Sep 2018, Martin Schwidefsky wrote: >> On Fri, 28 Sep 2018 09:12:10 +0200 >> Geert Uytterhoeven wrote: >>> I don't know if that has happened, and whether it would work on s390 now= . >>=20 >> commit 03b8c7b623c80af264c4c8d6111e5c6289933666 >> Author: Heiko Carstens >> Date: Sun Mar 2 13:09:47 2014 +0100 >>=20 >> futex: Allow architectures to skip futex_atomic_cmpxchg_inatomic() tes= t >>=20 >> If an architecture has futex_atomic_cmpxchg_inatomic() implemented and= there >> is no runtime check necessary, allow to skip the test within futex_ini= t(). >>=20 >> This allows to get rid of some code which would always give the same r= esult, >> and also allows the compiler to optimize a couple of if statements awa= y. >>=20 >> Signed-off-by: Heiko Carstens >> Cc: Finn Thain >> Cc: Geert Uytterhoeven >> Link: http://lkml.kernel.org/r/20140302120947.GA3641@osiris >> Signed-off-by: Thomas Gleixner >>=20 >>=20 >> Heiko created the CONFIG_HAVE_FUTEX_CMPXCHG to get around this issue. >> We just skip the runtime check as well as arc, m68k and sh. Not sure >> about xtensa, the set it config option only for !MMU. >=20 > Duh. grep would have told me. -ENOTENOUGHCOFFEE >=20 >=20 There=E2=80=99s another way to skin this cat: keep KERNEL_DS but pass a vali= d pointer. I don=E2=80=99t suppose you remember why you didn=E2=80=99t do th= at?=