From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752819AbeCPTEQ (ORCPT ); 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 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 X-Google-Smtp-Source: AG47ELv9RLIbNlZXlL1VMAHEdWkU1mfjlP7lioixyLZeE0niR8+6tQ7cwo8iNk2qFzofPonUw7ugRn2ay4QjU4Sv2vg= MIME-Version: 1.0 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 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.