On Fri, Mar 16, 2018 at 6:43 PM, Darren Hart <[email protected]> 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 <[email protected]>
>> Cc: Ingo Molnar <[email protected]>
>> Cc: Peter Zijlstra <[email protected]>
>> Cc: Darren Hart <[email protected]>
>> Cc: Andrew Morton <[email protected]>
>> Signed-off-by: Dominik Brodowski <[email protected]>
>
> 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.

Reply via email to