Received: by 10.213.65.68 with SMTP id h4csp461370imn; Sat, 17 Mar 2018 10:23:02 -0700 (PDT) X-Google-Smtp-Source: AG47ELuU7zV5cNFhGBDgWbqZAe3M8a/GlRwMHUkFipkCngdU41ZNbNFLkr1snhpwJwY3PvlFsaNf X-Received: by 10.98.84.193 with SMTP id i184mr1209583pfb.21.1521307382876; Sat, 17 Mar 2018 10:23:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521307382; cv=none; d=google.com; s=arc-20160816; b=svZxepRWj1aKgzjAPXaRJ9kUsGzdqgonvBEgBcbe/vT8lbCWX4khCpvhLJVvp69bV0 zAklOgxWr0womXxMflOH+RUGA+DvY/2EB4UCvJUgnm0+pFoQl2IvvqqL54aiqlXdfneA Qpy0SImmQrymkGJsHDok4ACBGtpWeo11hdfjnEyP+PnK0rqPlndjGGjHKJS60ZzkB7o+ KF3FvisQ6Xhpkw0o6hAqxGzKndZ0UYLT2CyHdtvPFPAUbWzxiwcP9/Y/bXY1PCjveiE4 tsYZkByOlbNt9qAXtaUFyG7ifm+KLLq0pxxTfuD05DjlXg4gXAd2MsTfBHDwQbmCUFrI yDlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=w1ZAGVny8tC/zK3QAcMeVHsq3Cvp67gr/NgOC5mF8os=; b=eoYH7LwjU1ar5t34MOASXySqT7P5XTz7kzau7mCWdzjesmkv9Vk8+SVtqPcvwiv8y5 aIVs+8QjGT/Etj+8fE//jDar5lj/qBT0vB1MrDPZ2/1cYfF40ZDZjQqQJTtsQWIOZxyM V00qOPJg4Al8TPEkH9xdlVeaPgFDxY6LIBfB9LP+sDZo9dj35to/FbxjNDlTqOfQThvN 4P5zpx309RwGpKlsL8dpovaSoZoW5OIMRIfIOboR8dmNAomEPYsSzjp9ZOKNYeHaCKmw v0v6rSXbGbLB+noGul9GzsCABqq9pKwNf6xwS1Giyb2/riTRlKw2tuN2Xa+OOfgMNlP/ Rf4Q== 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 u16si7643885pfl.299.2018.03.17.10.22.49; Sat, 17 Mar 2018 10:23:02 -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 S1753642AbeCQRVa (ORCPT + 99 others); Sat, 17 Mar 2018 13:21:30 -0400 Received: from isilmar-4.linta.de ([136.243.71.142]:35192 "EHLO isilmar-4.linta.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753336AbeCQRVN (ORCPT ); Sat, 17 Mar 2018 13:21:13 -0400 Received: from light.dominikbrodowski.net (isilmar.linta [10.0.0.1]) by isilmar-4.linta.de (Postfix) with ESMTPS id ADBCC200918; Sat, 17 Mar 2018 17:21:10 +0000 (UTC) Received: by light.dominikbrodowski.net (Postfix, from userid 1000) id 92F4D20082; Sat, 17 Mar 2018 17:39:37 +0100 (CET) Date: Sat, 17 Mar 2018 17:39:37 +0100 From: Dominik Brodowski To: Darren Hart Cc: Andy Lutomirski , LKML , Linus Torvalds , Al Viro , Ingo Molnar , Andrew Morton , Arnd Bergmann , Thomas Gleixner , Ingo Molnar , Peter Zijlstra Subject: Re: [PATCH v2 03/36] mm: use do_futex() instead of sys_futex() in mm_release() Message-ID: <20180317163937.GA1619@light.dominikbrodowski.net> References: <20180315190529.20943-1-linux@dominikbrodowski.net> <20180315190529.20943-4-linux@dominikbrodowski.net> <20180316184348.GA20184@localhost.localdomain> <20180316214454.GB20184@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180316214454.GB20184@localhost.localdomain> User-Agent: Mutt/1.9.4 (2018-02-28) 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 02:44:54PM -0700, Darren Hart wrote: > On Fri, Mar 16, 2018 at 07:03:53PM +0000, Andy Lutomirski wrote: > > 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. > > I dug up the cover letter and got the motivation and withdraw my > objection. I understand the motivation to put the motivation in the > cover letter in a large series, but I think there should have been > something indicating the need for this change in the individual patches, > even just a single line like Andy's first sentence above. It's two lines, but I added This patch is part of a series which tries to remove in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. to all commits in these series which remove in-kernel calls to syscalls. Thanks, Dominik