Received: by 10.213.65.68 with SMTP id h4csp579361imn; Fri, 16 Mar 2018 12:05:42 -0700 (PDT) X-Google-Smtp-Source: AG47ELtxzYbBuFqy34SrhRFl7aJypNMoJUTQS48/R1yI5BJzEkBEEFPDM8oTNRK+J5d9RZe/NMi1 X-Received: by 2002:a17:902:d892:: with SMTP id b18-v6mr3290892plz.241.1521227142483; Fri, 16 Mar 2018 12:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521227142; cv=none; d=google.com; s=arc-20160816; b=qpAEMUQFDzRKUbW+BgHtfatlVi4712rcztfpFsvDqlkGmaE7J6vfAaOobxvdzI53Ui aty24g2f0MNb92HYIcQNTUVI8CMohL17UDKA+LLm8n96d1SfwgiC08b1cq15cs10zV/Y P13REQUpMgsd5BR1WjNEd3/HnhqvKtMSuSuCFbicCHOJxbpSL6/muHPA7K8TThRpjVvD +H7DIAouTVuxfiWODXHXEpPLWcabX8oj8rYG3uHlhDfp1f9328lzMhDvtHMZoEbTkgt8 fo40gWJHw4T8+SE1odlXHUf1uqZOe6ABWec/t4nX9t6wQjjybrUiLFul0+0ls5lMJR9R WXSA== 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 :references:in-reply-to:mime-version:dmarc-filter :arc-authentication-results; bh=OI90dxocOERmuRONYI1EszjtZxYJfx/pnwvX2CAclzQ=; b=BEWjuFoBc5k3yd3GhvzWzbz5UKI7krkcq3nVv0MY+LZdMunbw3+ECTO2eEBJWfOiik mo8LqC1HJB3YFxbDwEPXHdR+1F0uFiF0CnjDow27nF5Tc9/tsE4ocBAYtjncny5WdFwL jU2r+mhRiR3Scpyjyg5oouX0PjIH9hymACaT6D8LBceH8xWOZC3MxOsMXdKJxE1MILYy ILemt+hG6CxQ4rI31mF4gAPfLtkNHai/f1iIFuFVSzK4KlXwYgto1fHaX8aFoJG3UPrK 3B1B4z6usuwav8l0cYpOsUQNf+9+af9etBREXI77Joz4XNAvMcI3KHGBegLx3LNaPmRn pZ+w== 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 c15si5959151pfm.199.2018.03.16.12.05.26; Fri, 16 Mar 2018 12:05:42 -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 S1752810AbeCPTEQ (ORCPT + 99 others); Fri, 16 Mar 2018 15:04:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:49604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751236AbeCPTEO (ORCPT ); Fri, 16 Mar 2018 15:04:14 -0400 Received: from mail-io0-f175.google.com (mail-io0-f175.google.com [209.85.223.175]) (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 3FDC7217D8 for ; Fri, 16 Mar 2018 19:04:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3FDC7217D8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=luto@kernel.org Received: by mail-io0-f175.google.com with SMTP id m22so13788631iob.12 for ; Fri, 16 Mar 2018 12:04:14 -0700 (PDT) X-Gm-Message-State: AElRT7EUax+ISwiBpH6VgPcMnIbttXHtVEqNLwu1uWRI9rOTDICrJ58/ ZiBsVGnyDIXpmNxQ7YnmxqcllksWMccuoKYAmDxRVQ== X-Received: by 10.107.151.209 with SMTP id z200mr3055225iod.150.1521227053558; Fri, 16 Mar 2018 12:04:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.137.101 with HTTP; Fri, 16 Mar 2018 12:03:53 -0700 (PDT) In-Reply-To: <20180316184348.GA20184@localhost.localdomain> References: <20180315190529.20943-1-linux@dominikbrodowski.net> <20180315190529.20943-4-linux@dominikbrodowski.net> <20180316184348.GA20184@localhost.localdomain> From: Andy Lutomirski Date: Fri, 16 Mar 2018 19:03:53 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 03/36] mm: use do_futex() instead of sys_futex() in mm_release() To: Darren Hart Cc: Dominik Brodowski , LKML , Linus Torvalds , Al Viro , Andrew Lutomirski , Ingo Molnar , Andrew Morton , Arnd Bergmann , Thomas Gleixner , Ingo Molnar , Peter Zijlstra 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 Fri, Mar 16, 2018 at 6:43 PM, Darren Hart wrote: > On Thu, Mar 15, 2018 at 08:04:56PM +0100, Dominik Brodowski wrote: >> sys_futex() is a wrapper to do_futex() which does not modify any >> values here: >> >> - uaddr, val and val3 are kept the same >> >> - op is masked with FUTEX_CMD_MASK, but is always set to FUTEX_WAKE. >> Therefore, val2 is always 0. >> >> - as utime is set to NULL, *timeout is NULL >> >> Cc: Thomas Gleixner >> Cc: Ingo Molnar >> Cc: Peter Zijlstra >> Cc: Darren Hart >> Cc: Andrew Morton >> Signed-off-by: Dominik Brodowski > > Hi Dominik, > > I'm missing the "why" part here. What is it you are trying to address? > > do_futex is not currently in use outside of the futex implementation, > while sys_futex is. This decouples the interface from the > implementation. While this is perhaps less critical within the > kernel, I don't see a compelling reason to increase the coupling > between the mm and futex implementations. > > Without a compelling WHY, Nack from me. > We want to make some changes to the way that the syscall entry code invokes syscalls, and these changes will make it impossible to call sys_xyz() functions from the kernel. So we can make sys_futex() be a trivial wrapper around a new ksys_futex(), or we can do a patch like this.