Skip to content

flag parameters

Ulrich Drepper lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest18 patches 35 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18flag parameters: helper functioninclude/linux/flagsremap.h lib/Makefile lib/flagsremap.c+33 -16 replies
2/18flag parameters: socket and socketpairinclude/linux/net.h net/9p/trans_fd.c net/sctp/socket.c +1 more+29 -1114 replies
3/18flag parameters: pacceptinclude/asm-x86/unistd_64.h include/linux/net.h include/linux/syscalls.h +2 more+124 -121 reply
4/18flag parameters: anon_inode_getfd extensionfs/anon_inodes.c fs/eventfd.c fs/eventpoll.c +3 more+11 -91 reply
5/18flag parameters: signalfdarch/x86/ia32/ia32entry.S arch/x86/kernel/syscall_table_32.S fs/compat.c +5 more+39 -61 reply
6/18flag parameters: eventfdarch/x86/ia32/ia32entry.S arch/x86/kernel/syscall_table_32.S fs/eventfd.c +4 more+27 -21 reply
7/18flag parameters: timerfd_createfs/timerfd.c include/linux/timerfd.h+13 -31 reply
8/18flag parameters: epoll_createarch/x86/ia32/ia32entry.S arch/x86/kernel/syscall_table_32.S fs/eventpoll.c +4 more+26 -25 replies
9/18flag parameters: dup2arch/x86/ia32/ia32entry.S arch/x86/kernel/syscall_table_32.S fs/fcntl.c +3 more+19 -20 replies
10/18flag parameters: pipearch/cris/kernel/sys_cris.c arch/ia64/ia32/sys_ia32.c arch/ia64/kernel/sys_ia64.c +14 more+35 -160 replies
11/18flag parameters: inotify_initarch/x86/ia32/ia32entry.S arch/x86/kernel/syscall_table_32.S fs/inotify_user.c +4 more+27 -20 replies
12/18flag parametersi: NONBLOCK in anon_inode_getfdfs/anon_inodes.c+1 -11 reply
13/18flag parameters: NONBLOCK in socket and socketpairinclude/linux/net.h net/socket.c+8 -61 reply
14/18flag parameters: NONBLOCK in signalfdfs/signalfd.c include/linux/signalfd.h+2 -01 reply
15/18flag parameters: NONBLOCK in eventfdfs/eventfd.c include/linux/eventfd.h+2 -01 reply
16/18flag parameters: NONBLOCK in timerfd_createfs/timerfd.c include/linux/timerfd.h+2 -01 reply
17/18flag parameters: NONBLOCK in pipefs/pipe.c include/linux/fs.h kernel/kmod.c+11 -110 replies
18/18flag parameters: NONBLOCK in inotify_initfs/inotify_user.c include/linux/inotify.h+3 -10 replies

Reviews trailers per patch

13 of 18 patches have a Reviewed-by or Acked-by.

PatchDavide LibenziDavid S. Miller
1/18A-b
2/18A-b
3/18A-b
4/18A-b
5/18A-b
6/18A-b
7/18A-b
8/18A-b
9/18
10/18
11/18
12/18A-b
13/18A-b
14/18A-b
15/18A-b
16/18A-b
17/18
18/18

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/18] flag parameters

This series replaces the individual patches I sent out before. They introduce changes for all the file descriptor-generating syscalls which do not have a flags parameter (or where it is not handled).

I think I addressed all the comments people made on the previous patches. New in this series is support for pipe and inotify_init. These are straight-forward extensions like the rest. Both require new userlevel interfaces, though. We need new userlevel interfaces for:

- paccept
- epoll_create2
- dup3
- pipe2
- inotify_init1

We do /not/ need new interfaces for

- signalfd4
- eventfd2
- timerfd_create
- socket
- socketpair

These either have flags parameters in the interface exported by glibc or (in case of the socket functions) overload a parameter with a bitset.

In addition to support for setting the close-on-exec flag I also added support to set the non-blocking mode. This is how most modern, scalable code should work and adding the support comes almost for free. Support to enable non-blocking is not added for dup3 (for obvious reasons) and epoll_create2. For the latter I have not found any support in the kernel. In case I missed something let me know and I'll add the few lines of code.

Each semantic change has a test program. For archs other than x86 and x86-64 you'll have to add the appropriate syscall number.

The patches all apply individually in sequence and the source tree remains compilable and runnable.

Regarding the little mapping tables for the flags. There are multiple copies with the same values (for now). We could play tricks for mergable ELF sections to avoid this minimal duplication.