Re: [PATCH 2/2] fs: Wire up sendfd() syscall (all architectures)

2014-12-02 Thread Geert Uytterhoeven
Hi Alex,

On Tue, Dec 2, 2014 at 3:31 PM, Alex Dubov  wrote:
> On Tue, Dec 2, 2014 at 10:42 PM, Michal Simek  wrote:
>> On 12/02/2014 09:01 AM, Geert Uytterhoeven wrote:
>>> This really needs a CC to linux-arch (added).
>>>
>>> On Tue, Dec 2, 2014 at 5:35 AM, Alex Dubov  wrote:
 Signed-off-by: Alex Dubov 
 ---
>
>> The same for microblaze here
>> arch/microblaze/include/asm/unistd.h
>
> This invites the question as to why the __NR_syscalls macro is not
> defined in uapi/asm/unistd.h on those architectures, where it will be
> easier to spot? After all, asm/unistd.h includes uapi/asm/unistd.h
> unconditionally.

Because it's not part of the ABI?

There may be multiple ABIs, with multiple syscall ranges.
Userspace only needs to know if a syscall is available, not what the
valid syscall number range is.
The kernel does need to know the size of the full syscall table.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] fs: Wire up sendfd() syscall (all architectures)

2014-12-02 Thread Alex Dubov
On Tue, Dec 2, 2014 at 10:42 PM, Michal Simek  wrote:
> On 12/02/2014 09:01 AM, Geert Uytterhoeven wrote:
>> This really needs a CC to linux-arch (added).
>>
>> On Tue, Dec 2, 2014 at 5:35 AM, Alex Dubov  wrote:
>>> Signed-off-by: Alex Dubov 
>>> ---

>
> The same for microblaze here
> arch/microblaze/include/asm/unistd.h
>

This invites the question as to why the __NR_syscalls macro is not
defined in uapi/asm/unistd.h on those architectures, where it will be
easier to spot? After all, asm/unistd.h includes uapi/asm/unistd.h
unconditionally.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] fs: Wire up sendfd() syscall (all architectures)

2014-12-02 Thread Michal Simek
On 12/02/2014 09:01 AM, Geert Uytterhoeven wrote:
> This really needs a CC to linux-arch (added).
> 
> On Tue, Dec 2, 2014 at 5:35 AM, Alex Dubov  wrote:
>> Signed-off-by: Alex Dubov 
>> ---
>>  arch/arm/include/uapi/asm/unistd.h|  1 +
>>  arch/arm/kernel/calls.S   |  1 +
>>  arch/arm64/include/asm/unistd32.h |  2 ++
>>  arch/ia64/include/uapi/asm/unistd.h   |  1 +
>>  arch/ia64/kernel/entry.S  |  1 +
>>  arch/m68k/include/uapi/asm/unistd.h   |  1 +
>>  arch/m68k/kernel/syscalltable.S   |  1 +
> 
> You forgot to update NR_syscalls in arch/m68k/include/asm/unistd.h.
> 
>>  arch/microblaze/include/uapi/asm/unistd.h |  1 +
>>  arch/microblaze/kernel/syscall_table.S|  1 +


The same for microblaze here
arch/microblaze/include/asm/unistd.h

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform




signature.asc
Description: OpenPGP digital signature


Re: [PATCH 2/2] fs: Wire up sendfd() syscall (all architectures)

2014-12-02 Thread Alex Dubov
On Tue, Dec 2, 2014 at 7:01 PM, Geert Uytterhoeven  wrote:
> This really needs a CC to linux-arch (added).
>
>
> You forgot to update NR_syscalls in arch/m68k/include/asm/unistd.h.
>

Noted. I would assume that other architectures may have similar
problems (I only tested
my submission on x86_64).

Will try to fix those when/if there's progress toward accepting the
proposed feature.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] fs: Wire up sendfd() syscall (all architectures)

2014-12-02 Thread Geert Uytterhoeven
This really needs a CC to linux-arch (added).

On Tue, Dec 2, 2014 at 5:35 AM, Alex Dubov  wrote:
> Signed-off-by: Alex Dubov 
> ---
>  arch/arm/include/uapi/asm/unistd.h|  1 +
>  arch/arm/kernel/calls.S   |  1 +
>  arch/arm64/include/asm/unistd32.h |  2 ++
>  arch/ia64/include/uapi/asm/unistd.h   |  1 +
>  arch/ia64/kernel/entry.S  |  1 +
>  arch/m68k/include/uapi/asm/unistd.h   |  1 +
>  arch/m68k/kernel/syscalltable.S   |  1 +

You forgot to update NR_syscalls in arch/m68k/include/asm/unistd.h.

>  arch/microblaze/include/uapi/asm/unistd.h |  1 +
>  arch/microblaze/kernel/syscall_table.S|  1 +
>  arch/mips/include/uapi/asm/unistd.h   | 15 +--
>  arch/mips/kernel/scall32-o32.S|  1 +
>  arch/mips/kernel/scall64-64.S |  1 +
>  arch/mips/kernel/scall64-n32.S|  1 +
>  arch/mips/kernel/scall64-o32.S|  1 +
>  arch/parisc/include/uapi/asm/unistd.h |  3 ++-
>  arch/powerpc/include/asm/systbl.h |  1 +
>  arch/powerpc/include/uapi/asm/unistd.h|  1 +
>  arch/s390/include/uapi/asm/unistd.h   |  3 ++-
>  arch/s390/kernel/compat_wrapper.c |  1 +
>  arch/s390/kernel/syscalls.S   |  1 +
>  arch/sparc/include/uapi/asm/unistd.h  |  3 ++-
>  arch/sparc/kernel/systbls_32.S|  2 +-
>  arch/sparc/kernel/systbls_64.S|  4 ++--
>  arch/x86/syscalls/syscall_32.tbl  |  1 +
>  arch/x86/syscalls/syscall_64.tbl  |  1 +
>  arch/xtensa/include/uapi/asm/unistd.h |  5 +++--
>  include/linux/syscalls.h  |  1 +
>  include/uapi/asm-generic/unistd.h |  4 +++-
>  kernel/sys_ni.c   |  3 +++
>  29 files changed, 48 insertions(+), 15 deletions(-)
>
> diff --git a/arch/arm/include/uapi/asm/unistd.h 
> b/arch/arm/include/uapi/asm/unistd.h
> index 705bb76..6428823 100644
> --- a/arch/arm/include/uapi/asm/unistd.h
> +++ b/arch/arm/include/uapi/asm/unistd.h
> @@ -413,6 +413,7 @@
>  #define __NR_getrandom (__NR_SYSCALL_BASE+384)
>  #define __NR_memfd_create  (__NR_SYSCALL_BASE+385)
>  #define __NR_bpf   (__NR_SYSCALL_BASE+386)
> +#define __NR_sendfd(__NR_SYSCALL_BASE+387)
>
>  /*
>   * The following SWIs are ARM private.
> diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
> index e51833f..30bdeb5 100644
> --- a/arch/arm/kernel/calls.S
> +++ b/arch/arm/kernel/calls.S
> @@ -396,6 +396,7 @@
> CALL(sys_getrandom)
>  /* 385 */  CALL(sys_memfd_create)
> CALL(sys_bpf)
> +   CALL(sys_sendfd)
>  #ifndef syscalls_counted
>  .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
>  #define syscalls_counted
> diff --git a/arch/arm64/include/asm/unistd32.h 
> b/arch/arm64/include/asm/unistd32.h
> index 9dfdac4..7f19595 100644
> --- a/arch/arm64/include/asm/unistd32.h
> +++ b/arch/arm64/include/asm/unistd32.h
> @@ -794,3 +794,5 @@ __SYSCALL(__NR_getrandom, sys_getrandom)
>  __SYSCALL(__NR_memfd_create, sys_memfd_create)
>  #define __NR_bpf 386
>  __SYSCALL(__NR_bpf, sys_bpf)
> +#define __NR_sendfd 387
> +__SYSCALL(__NR_sendfd, sys_sendfd)
> diff --git a/arch/ia64/include/uapi/asm/unistd.h 
> b/arch/ia64/include/uapi/asm/unistd.h
> index 4c2240c..55be68c 100644
> --- a/arch/ia64/include/uapi/asm/unistd.h
> +++ b/arch/ia64/include/uapi/asm/unistd.h
> @@ -331,5 +331,6 @@
>  #define __NR_getrandom 1339
>  #define __NR_memfd_create  1340
>  #define __NR_bpf   1341
> +#define __NR_sendfd1342
>
>  #endif /* _UAPI_ASM_IA64_UNISTD_H */
> diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
> index f5e96df..97596a3 100644
> --- a/arch/ia64/kernel/entry.S
> +++ b/arch/ia64/kernel/entry.S
> @@ -1779,6 +1779,7 @@ sys_call_table:
> data8 sys_getrandom
> data8 sys_memfd_create  // 1340
> data8 sys_bpf
> +   data8 sys_sendfd
>
> .org sys_call_table + 8*NR_syscalls // guard against failures to 
> increase NR_syscalls
>  #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */
> diff --git a/arch/m68k/include/uapi/asm/unistd.h 
> b/arch/m68k/include/uapi/asm/unistd.h
> index 2c1bec9..77e7098 100644
> --- a/arch/m68k/include/uapi/asm/unistd.h
> +++ b/arch/m68k/include/uapi/asm/unistd.h
> @@ -360,5 +360,6 @@
>  #define __NR_getrandom 352
>  #define __NR_memfd_create  353
>  #define __NR_bpf   354
> +#define __NR_sendfd355
>
>  #endif /* _UAPI_ASM_M68K_UNISTD_H_ */
> diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S
> index 2ca219e..3ea20d4 100644
> --- a/arch/m68k/kernel/syscalltable.S
> +++ b/arch/m68k/kernel/syscalltable.S
> @@ -375,4 +375,5 @@ ENTRY(sys_call_table)
> .long sys_getrandom
> .long sys_memfd_create
> .long sys_bpf
> +   .long sys_sendfd
>
> diff --git 

Re: [PATCH 2/2] fs: Wire up sendfd() syscall (all architectures)

2014-12-02 Thread Geert Uytterhoeven
This really needs a CC to linux-arch (added).

On Tue, Dec 2, 2014 at 5:35 AM, Alex Dubov alex.du...@gmail.com wrote:
 Signed-off-by: Alex Dubov oa...@yahoo.com
 ---
  arch/arm/include/uapi/asm/unistd.h|  1 +
  arch/arm/kernel/calls.S   |  1 +
  arch/arm64/include/asm/unistd32.h |  2 ++
  arch/ia64/include/uapi/asm/unistd.h   |  1 +
  arch/ia64/kernel/entry.S  |  1 +
  arch/m68k/include/uapi/asm/unistd.h   |  1 +
  arch/m68k/kernel/syscalltable.S   |  1 +

You forgot to update NR_syscalls in arch/m68k/include/asm/unistd.h.

  arch/microblaze/include/uapi/asm/unistd.h |  1 +
  arch/microblaze/kernel/syscall_table.S|  1 +
  arch/mips/include/uapi/asm/unistd.h   | 15 +--
  arch/mips/kernel/scall32-o32.S|  1 +
  arch/mips/kernel/scall64-64.S |  1 +
  arch/mips/kernel/scall64-n32.S|  1 +
  arch/mips/kernel/scall64-o32.S|  1 +
  arch/parisc/include/uapi/asm/unistd.h |  3 ++-
  arch/powerpc/include/asm/systbl.h |  1 +
  arch/powerpc/include/uapi/asm/unistd.h|  1 +
  arch/s390/include/uapi/asm/unistd.h   |  3 ++-
  arch/s390/kernel/compat_wrapper.c |  1 +
  arch/s390/kernel/syscalls.S   |  1 +
  arch/sparc/include/uapi/asm/unistd.h  |  3 ++-
  arch/sparc/kernel/systbls_32.S|  2 +-
  arch/sparc/kernel/systbls_64.S|  4 ++--
  arch/x86/syscalls/syscall_32.tbl  |  1 +
  arch/x86/syscalls/syscall_64.tbl  |  1 +
  arch/xtensa/include/uapi/asm/unistd.h |  5 +++--
  include/linux/syscalls.h  |  1 +
  include/uapi/asm-generic/unistd.h |  4 +++-
  kernel/sys_ni.c   |  3 +++
  29 files changed, 48 insertions(+), 15 deletions(-)

 diff --git a/arch/arm/include/uapi/asm/unistd.h 
 b/arch/arm/include/uapi/asm/unistd.h
 index 705bb76..6428823 100644
 --- a/arch/arm/include/uapi/asm/unistd.h
 +++ b/arch/arm/include/uapi/asm/unistd.h
 @@ -413,6 +413,7 @@
  #define __NR_getrandom (__NR_SYSCALL_BASE+384)
  #define __NR_memfd_create  (__NR_SYSCALL_BASE+385)
  #define __NR_bpf   (__NR_SYSCALL_BASE+386)
 +#define __NR_sendfd(__NR_SYSCALL_BASE+387)

  /*
   * The following SWIs are ARM private.
 diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
 index e51833f..30bdeb5 100644
 --- a/arch/arm/kernel/calls.S
 +++ b/arch/arm/kernel/calls.S
 @@ -396,6 +396,7 @@
 CALL(sys_getrandom)
  /* 385 */  CALL(sys_memfd_create)
 CALL(sys_bpf)
 +   CALL(sys_sendfd)
  #ifndef syscalls_counted
  .equ syscalls_padding, ((NR_syscalls + 3)  ~3) - NR_syscalls
  #define syscalls_counted
 diff --git a/arch/arm64/include/asm/unistd32.h 
 b/arch/arm64/include/asm/unistd32.h
 index 9dfdac4..7f19595 100644
 --- a/arch/arm64/include/asm/unistd32.h
 +++ b/arch/arm64/include/asm/unistd32.h
 @@ -794,3 +794,5 @@ __SYSCALL(__NR_getrandom, sys_getrandom)
  __SYSCALL(__NR_memfd_create, sys_memfd_create)
  #define __NR_bpf 386
  __SYSCALL(__NR_bpf, sys_bpf)
 +#define __NR_sendfd 387
 +__SYSCALL(__NR_sendfd, sys_sendfd)
 diff --git a/arch/ia64/include/uapi/asm/unistd.h 
 b/arch/ia64/include/uapi/asm/unistd.h
 index 4c2240c..55be68c 100644
 --- a/arch/ia64/include/uapi/asm/unistd.h
 +++ b/arch/ia64/include/uapi/asm/unistd.h
 @@ -331,5 +331,6 @@
  #define __NR_getrandom 1339
  #define __NR_memfd_create  1340
  #define __NR_bpf   1341
 +#define __NR_sendfd1342

  #endif /* _UAPI_ASM_IA64_UNISTD_H */
 diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
 index f5e96df..97596a3 100644
 --- a/arch/ia64/kernel/entry.S
 +++ b/arch/ia64/kernel/entry.S
 @@ -1779,6 +1779,7 @@ sys_call_table:
 data8 sys_getrandom
 data8 sys_memfd_create  // 1340
 data8 sys_bpf
 +   data8 sys_sendfd

 .org sys_call_table + 8*NR_syscalls // guard against failures to 
 increase NR_syscalls
  #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */
 diff --git a/arch/m68k/include/uapi/asm/unistd.h 
 b/arch/m68k/include/uapi/asm/unistd.h
 index 2c1bec9..77e7098 100644
 --- a/arch/m68k/include/uapi/asm/unistd.h
 +++ b/arch/m68k/include/uapi/asm/unistd.h
 @@ -360,5 +360,6 @@
  #define __NR_getrandom 352
  #define __NR_memfd_create  353
  #define __NR_bpf   354
 +#define __NR_sendfd355

  #endif /* _UAPI_ASM_M68K_UNISTD_H_ */
 diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S
 index 2ca219e..3ea20d4 100644
 --- a/arch/m68k/kernel/syscalltable.S
 +++ b/arch/m68k/kernel/syscalltable.S
 @@ -375,4 +375,5 @@ ENTRY(sys_call_table)
 .long sys_getrandom
 .long sys_memfd_create
 .long sys_bpf
 +   .long sys_sendfd

 diff --git a/arch/microblaze/include/uapi/asm/unistd.h 
 b/arch/microblaze/include/uapi/asm/unistd.h

Re: [PATCH 2/2] fs: Wire up sendfd() syscall (all architectures)

2014-12-02 Thread Alex Dubov
On Tue, Dec 2, 2014 at 7:01 PM, Geert Uytterhoeven ge...@linux-m68k.org wrote:
 This really needs a CC to linux-arch (added).


 You forgot to update NR_syscalls in arch/m68k/include/asm/unistd.h.


Noted. I would assume that other architectures may have similar
problems (I only tested
my submission on x86_64).

Will try to fix those when/if there's progress toward accepting the
proposed feature.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] fs: Wire up sendfd() syscall (all architectures)

2014-12-02 Thread Michal Simek
On 12/02/2014 09:01 AM, Geert Uytterhoeven wrote:
 This really needs a CC to linux-arch (added).
 
 On Tue, Dec 2, 2014 at 5:35 AM, Alex Dubov alex.du...@gmail.com wrote:
 Signed-off-by: Alex Dubov oa...@yahoo.com
 ---
  arch/arm/include/uapi/asm/unistd.h|  1 +
  arch/arm/kernel/calls.S   |  1 +
  arch/arm64/include/asm/unistd32.h |  2 ++
  arch/ia64/include/uapi/asm/unistd.h   |  1 +
  arch/ia64/kernel/entry.S  |  1 +
  arch/m68k/include/uapi/asm/unistd.h   |  1 +
  arch/m68k/kernel/syscalltable.S   |  1 +
 
 You forgot to update NR_syscalls in arch/m68k/include/asm/unistd.h.
 
  arch/microblaze/include/uapi/asm/unistd.h |  1 +
  arch/microblaze/kernel/syscall_table.S|  1 +


The same for microblaze here
arch/microblaze/include/asm/unistd.h

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP - KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform




signature.asc
Description: OpenPGP digital signature


Re: [PATCH 2/2] fs: Wire up sendfd() syscall (all architectures)

2014-12-02 Thread Alex Dubov
On Tue, Dec 2, 2014 at 10:42 PM, Michal Simek mon...@monstr.eu wrote:
 On 12/02/2014 09:01 AM, Geert Uytterhoeven wrote:
 This really needs a CC to linux-arch (added).

 On Tue, Dec 2, 2014 at 5:35 AM, Alex Dubov alex.du...@gmail.com wrote:
 Signed-off-by: Alex Dubov oa...@yahoo.com
 ---


 The same for microblaze here
 arch/microblaze/include/asm/unistd.h


This invites the question as to why the __NR_syscalls macro is not
defined in uapi/asm/unistd.h on those architectures, where it will be
easier to spot? After all, asm/unistd.h includes uapi/asm/unistd.h
unconditionally.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] fs: Wire up sendfd() syscall (all architectures)

2014-12-02 Thread Geert Uytterhoeven
Hi Alex,

On Tue, Dec 2, 2014 at 3:31 PM, Alex Dubov alex.du...@gmail.com wrote:
 On Tue, Dec 2, 2014 at 10:42 PM, Michal Simek mon...@monstr.eu wrote:
 On 12/02/2014 09:01 AM, Geert Uytterhoeven wrote:
 This really needs a CC to linux-arch (added).

 On Tue, Dec 2, 2014 at 5:35 AM, Alex Dubov alex.du...@gmail.com wrote:
 Signed-off-by: Alex Dubov oa...@yahoo.com
 ---

 The same for microblaze here
 arch/microblaze/include/asm/unistd.h

 This invites the question as to why the __NR_syscalls macro is not
 defined in uapi/asm/unistd.h on those architectures, where it will be
 easier to spot? After all, asm/unistd.h includes uapi/asm/unistd.h
 unconditionally.

Because it's not part of the ABI?

There may be multiple ABIs, with multiple syscall ranges.
Userspace only needs to know if a syscall is available, not what the
valid syscall number range is.
The kernel does need to know the size of the full syscall table.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say programmer or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] fs: Wire up sendfd() syscall (all architectures)

2014-12-01 Thread Alex Dubov
Signed-off-by: Alex Dubov 
---
 arch/arm/include/uapi/asm/unistd.h|  1 +
 arch/arm/kernel/calls.S   |  1 +
 arch/arm64/include/asm/unistd32.h |  2 ++
 arch/ia64/include/uapi/asm/unistd.h   |  1 +
 arch/ia64/kernel/entry.S  |  1 +
 arch/m68k/include/uapi/asm/unistd.h   |  1 +
 arch/m68k/kernel/syscalltable.S   |  1 +
 arch/microblaze/include/uapi/asm/unistd.h |  1 +
 arch/microblaze/kernel/syscall_table.S|  1 +
 arch/mips/include/uapi/asm/unistd.h   | 15 +--
 arch/mips/kernel/scall32-o32.S|  1 +
 arch/mips/kernel/scall64-64.S |  1 +
 arch/mips/kernel/scall64-n32.S|  1 +
 arch/mips/kernel/scall64-o32.S|  1 +
 arch/parisc/include/uapi/asm/unistd.h |  3 ++-
 arch/powerpc/include/asm/systbl.h |  1 +
 arch/powerpc/include/uapi/asm/unistd.h|  1 +
 arch/s390/include/uapi/asm/unistd.h   |  3 ++-
 arch/s390/kernel/compat_wrapper.c |  1 +
 arch/s390/kernel/syscalls.S   |  1 +
 arch/sparc/include/uapi/asm/unistd.h  |  3 ++-
 arch/sparc/kernel/systbls_32.S|  2 +-
 arch/sparc/kernel/systbls_64.S|  4 ++--
 arch/x86/syscalls/syscall_32.tbl  |  1 +
 arch/x86/syscalls/syscall_64.tbl  |  1 +
 arch/xtensa/include/uapi/asm/unistd.h |  5 +++--
 include/linux/syscalls.h  |  1 +
 include/uapi/asm-generic/unistd.h |  4 +++-
 kernel/sys_ni.c   |  3 +++
 29 files changed, 48 insertions(+), 15 deletions(-)

diff --git a/arch/arm/include/uapi/asm/unistd.h 
b/arch/arm/include/uapi/asm/unistd.h
index 705bb76..6428823 100644
--- a/arch/arm/include/uapi/asm/unistd.h
+++ b/arch/arm/include/uapi/asm/unistd.h
@@ -413,6 +413,7 @@
 #define __NR_getrandom (__NR_SYSCALL_BASE+384)
 #define __NR_memfd_create  (__NR_SYSCALL_BASE+385)
 #define __NR_bpf   (__NR_SYSCALL_BASE+386)
+#define __NR_sendfd(__NR_SYSCALL_BASE+387)
 
 /*
  * The following SWIs are ARM private.
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index e51833f..30bdeb5 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -396,6 +396,7 @@
CALL(sys_getrandom)
 /* 385 */  CALL(sys_memfd_create)
CALL(sys_bpf)
+   CALL(sys_sendfd)
 #ifndef syscalls_counted
 .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
 #define syscalls_counted
diff --git a/arch/arm64/include/asm/unistd32.h 
b/arch/arm64/include/asm/unistd32.h
index 9dfdac4..7f19595 100644
--- a/arch/arm64/include/asm/unistd32.h
+++ b/arch/arm64/include/asm/unistd32.h
@@ -794,3 +794,5 @@ __SYSCALL(__NR_getrandom, sys_getrandom)
 __SYSCALL(__NR_memfd_create, sys_memfd_create)
 #define __NR_bpf 386
 __SYSCALL(__NR_bpf, sys_bpf)
+#define __NR_sendfd 387
+__SYSCALL(__NR_sendfd, sys_sendfd)
diff --git a/arch/ia64/include/uapi/asm/unistd.h 
b/arch/ia64/include/uapi/asm/unistd.h
index 4c2240c..55be68c 100644
--- a/arch/ia64/include/uapi/asm/unistd.h
+++ b/arch/ia64/include/uapi/asm/unistd.h
@@ -331,5 +331,6 @@
 #define __NR_getrandom 1339
 #define __NR_memfd_create  1340
 #define __NR_bpf   1341
+#define __NR_sendfd1342
 
 #endif /* _UAPI_ASM_IA64_UNISTD_H */
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index f5e96df..97596a3 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -1779,6 +1779,7 @@ sys_call_table:
data8 sys_getrandom
data8 sys_memfd_create  // 1340
data8 sys_bpf
+   data8 sys_sendfd
 
.org sys_call_table + 8*NR_syscalls // guard against failures to 
increase NR_syscalls
 #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */
diff --git a/arch/m68k/include/uapi/asm/unistd.h 
b/arch/m68k/include/uapi/asm/unistd.h
index 2c1bec9..77e7098 100644
--- a/arch/m68k/include/uapi/asm/unistd.h
+++ b/arch/m68k/include/uapi/asm/unistd.h
@@ -360,5 +360,6 @@
 #define __NR_getrandom 352
 #define __NR_memfd_create  353
 #define __NR_bpf   354
+#define __NR_sendfd355
 
 #endif /* _UAPI_ASM_M68K_UNISTD_H_ */
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S
index 2ca219e..3ea20d4 100644
--- a/arch/m68k/kernel/syscalltable.S
+++ b/arch/m68k/kernel/syscalltable.S
@@ -375,4 +375,5 @@ ENTRY(sys_call_table)
.long sys_getrandom
.long sys_memfd_create
.long sys_bpf
+   .long sys_sendfd
 
diff --git a/arch/microblaze/include/uapi/asm/unistd.h 
b/arch/microblaze/include/uapi/asm/unistd.h
index c712677..f69e30a 100644
--- a/arch/microblaze/include/uapi/asm/unistd.h
+++ b/arch/microblaze/include/uapi/asm/unistd.h
@@ -403,5 +403,6 @@
 #define __NR_getrandom 385
 #define __NR_memfd_create  386
 #define __NR_bpf   387
+#define __NR_sendfd388
 
 #endif /* 

[PATCH 2/2] fs: Wire up sendfd() syscall (all architectures)

2014-12-01 Thread Alex Dubov
Signed-off-by: Alex Dubov oa...@yahoo.com
---
 arch/arm/include/uapi/asm/unistd.h|  1 +
 arch/arm/kernel/calls.S   |  1 +
 arch/arm64/include/asm/unistd32.h |  2 ++
 arch/ia64/include/uapi/asm/unistd.h   |  1 +
 arch/ia64/kernel/entry.S  |  1 +
 arch/m68k/include/uapi/asm/unistd.h   |  1 +
 arch/m68k/kernel/syscalltable.S   |  1 +
 arch/microblaze/include/uapi/asm/unistd.h |  1 +
 arch/microblaze/kernel/syscall_table.S|  1 +
 arch/mips/include/uapi/asm/unistd.h   | 15 +--
 arch/mips/kernel/scall32-o32.S|  1 +
 arch/mips/kernel/scall64-64.S |  1 +
 arch/mips/kernel/scall64-n32.S|  1 +
 arch/mips/kernel/scall64-o32.S|  1 +
 arch/parisc/include/uapi/asm/unistd.h |  3 ++-
 arch/powerpc/include/asm/systbl.h |  1 +
 arch/powerpc/include/uapi/asm/unistd.h|  1 +
 arch/s390/include/uapi/asm/unistd.h   |  3 ++-
 arch/s390/kernel/compat_wrapper.c |  1 +
 arch/s390/kernel/syscalls.S   |  1 +
 arch/sparc/include/uapi/asm/unistd.h  |  3 ++-
 arch/sparc/kernel/systbls_32.S|  2 +-
 arch/sparc/kernel/systbls_64.S|  4 ++--
 arch/x86/syscalls/syscall_32.tbl  |  1 +
 arch/x86/syscalls/syscall_64.tbl  |  1 +
 arch/xtensa/include/uapi/asm/unistd.h |  5 +++--
 include/linux/syscalls.h  |  1 +
 include/uapi/asm-generic/unistd.h |  4 +++-
 kernel/sys_ni.c   |  3 +++
 29 files changed, 48 insertions(+), 15 deletions(-)

diff --git a/arch/arm/include/uapi/asm/unistd.h 
b/arch/arm/include/uapi/asm/unistd.h
index 705bb76..6428823 100644
--- a/arch/arm/include/uapi/asm/unistd.h
+++ b/arch/arm/include/uapi/asm/unistd.h
@@ -413,6 +413,7 @@
 #define __NR_getrandom (__NR_SYSCALL_BASE+384)
 #define __NR_memfd_create  (__NR_SYSCALL_BASE+385)
 #define __NR_bpf   (__NR_SYSCALL_BASE+386)
+#define __NR_sendfd(__NR_SYSCALL_BASE+387)
 
 /*
  * The following SWIs are ARM private.
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index e51833f..30bdeb5 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -396,6 +396,7 @@
CALL(sys_getrandom)
 /* 385 */  CALL(sys_memfd_create)
CALL(sys_bpf)
+   CALL(sys_sendfd)
 #ifndef syscalls_counted
 .equ syscalls_padding, ((NR_syscalls + 3)  ~3) - NR_syscalls
 #define syscalls_counted
diff --git a/arch/arm64/include/asm/unistd32.h 
b/arch/arm64/include/asm/unistd32.h
index 9dfdac4..7f19595 100644
--- a/arch/arm64/include/asm/unistd32.h
+++ b/arch/arm64/include/asm/unistd32.h
@@ -794,3 +794,5 @@ __SYSCALL(__NR_getrandom, sys_getrandom)
 __SYSCALL(__NR_memfd_create, sys_memfd_create)
 #define __NR_bpf 386
 __SYSCALL(__NR_bpf, sys_bpf)
+#define __NR_sendfd 387
+__SYSCALL(__NR_sendfd, sys_sendfd)
diff --git a/arch/ia64/include/uapi/asm/unistd.h 
b/arch/ia64/include/uapi/asm/unistd.h
index 4c2240c..55be68c 100644
--- a/arch/ia64/include/uapi/asm/unistd.h
+++ b/arch/ia64/include/uapi/asm/unistd.h
@@ -331,5 +331,6 @@
 #define __NR_getrandom 1339
 #define __NR_memfd_create  1340
 #define __NR_bpf   1341
+#define __NR_sendfd1342
 
 #endif /* _UAPI_ASM_IA64_UNISTD_H */
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index f5e96df..97596a3 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -1779,6 +1779,7 @@ sys_call_table:
data8 sys_getrandom
data8 sys_memfd_create  // 1340
data8 sys_bpf
+   data8 sys_sendfd
 
.org sys_call_table + 8*NR_syscalls // guard against failures to 
increase NR_syscalls
 #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */
diff --git a/arch/m68k/include/uapi/asm/unistd.h 
b/arch/m68k/include/uapi/asm/unistd.h
index 2c1bec9..77e7098 100644
--- a/arch/m68k/include/uapi/asm/unistd.h
+++ b/arch/m68k/include/uapi/asm/unistd.h
@@ -360,5 +360,6 @@
 #define __NR_getrandom 352
 #define __NR_memfd_create  353
 #define __NR_bpf   354
+#define __NR_sendfd355
 
 #endif /* _UAPI_ASM_M68K_UNISTD_H_ */
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S
index 2ca219e..3ea20d4 100644
--- a/arch/m68k/kernel/syscalltable.S
+++ b/arch/m68k/kernel/syscalltable.S
@@ -375,4 +375,5 @@ ENTRY(sys_call_table)
.long sys_getrandom
.long sys_memfd_create
.long sys_bpf
+   .long sys_sendfd
 
diff --git a/arch/microblaze/include/uapi/asm/unistd.h 
b/arch/microblaze/include/uapi/asm/unistd.h
index c712677..f69e30a 100644
--- a/arch/microblaze/include/uapi/asm/unistd.h
+++ b/arch/microblaze/include/uapi/asm/unistd.h
@@ -403,5 +403,6 @@
 #define __NR_getrandom 385
 #define __NR_memfd_create  386
 #define __NR_bpf   387
+#define __NR_sendfd388