Re: [PATCH v2 1/2] vfs: Define new syscall getumask.
From: Mathieu Desnoyers
Date: Wed Apr 13 2016 - 11:27:23 EST
----- On Apr 13, 2016, at 9:57 AM, Richard W.M. Jones rjones@xxxxxxxxxx wrote:
> On Wed, Apr 13, 2016 at 04:20:32PM +0300, Cyrill Gorcunov wrote:
>> On Wed, Apr 13, 2016 at 01:57:51PM +0100, Richard W.M. Jones wrote:
>> > Define a system call for reading the current umask value.
>> >
>> > Signed-off-by: Richard W.M. Jones <rjones@xxxxxxxxxx>
>>
>> Btw don't we have to declare it in include/uapi/asm-generic/unistd.h as well?
>
> Yes, I think I do. I was following pwritev2 which wasn't added
> to this file, but other recent system calls (mlock2, copy_file_range)
> were added.
>
> TBH the documentation for this file is not very clear...
asm-generic/unistd.h defines the system call for a few
architectures.
grep -r asm-generic/unistd.h arch/*/include/
arch/arc/include/uapi/asm/unistd.h:#include <asm-generic/unistd.h>
arch/arc/include/uapi/asm/unistd.h:/* Generic syscall (fs/filesystems.c - lost in asm-generic/unistd.h */
arch/arm64/include/uapi/asm/unistd.h:#include <asm-generic/unistd.h>
arch/c6x/include/uapi/asm/unistd.h:#include <asm-generic/unistd.h>
arch/h8300/include/uapi/asm/unistd.h:#include <asm-generic/unistd.h>
arch/hexagon/include/uapi/asm/unistd.h:#include <asm-generic/unistd.h>
arch/metag/include/uapi/asm/unistd.h:#include <asm-generic/unistd.h>
arch/nios2/include/uapi/asm/unistd.h:#include <asm-generic/unistd.h>
arch/openrisc/include/uapi/asm/unistd.h:#include <asm-generic/unistd.h>
arch/score/include/uapi/asm/unistd.h:#include <asm-generic/unistd.h>
arch/tile/include/uapi/asm/unistd.h:#include <asm-generic/unistd.h>
arch/unicore32/include/uapi/asm/unistd.h:#include <asm-generic/unistd.h>
Wiring up the system call in this header means adding
support for this system call on all those architectures.
Thanks,
Mathieu
>
> Rich.
>
> --
> Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
> Read my programming and virtualization blog: http://rwmj.wordpress.com
> virt-df lists disk usage of guests without needing to install any
> software inside the virtual machine. Supports Linux and Windows.
> http://people.redhat.com/~rjones/virt-df/
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com