Skip to contentSkip to conversation

remove timerd() syscall number

PATCH In review Michael Kerrisk 2 participants 3 messages Sep 17, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove timerd() syscall number

Hi Andrew

I hope I've done this right... This patch, against 2.6.23-rc6, removes the timerfd() syscall (which in any case had a bug on its 2.6.22 release) from all architectures, so that we can have some breathing space to think about the API design. All of the existing timerfd() code is left intact.

Please apply, so that 2.6.23 does not expose timerfd().

Cheers,

Michael

include/asm/unistd.h +2 -1
diff -pur linux-2.6.23-rc6/include/asm/unistd.h linux-2.6.23-rc6-new/include/asm/unistd.h
@@ -327,7 +327,8 @@
 #define __NR_epoll_pwait	319
 #define __NR_utimensat		320
 #define __NR_signalfd		321
-#define __NR_timerfd		322
+/* Let's pause a moment before we decide on the final timerfd API */
+/* #define __NR_timerfd		322 */
 #define __NR_eventfd		323
 #define __NR_fallocate		324
 
include/asm-alpha/unistd.h +1 -1
diff -pur linux-2.6.23-rc6/include/asm-alpha/unistd.h linux-2.6.23-rc6-new/include/asm-alpha/unistd.h
@@ -431,7 +431,7 @@
 #define __NR_epoll_pwait		474
 #define __NR_utimensat			475
 #define __NR_signalfd			476
-#define __NR_timerfd			477
+/* #define __NR_timerfd			477 */
 #define __NR_eventfd			478
 
 #ifdef __KERNEL__
include/asm-arm/unistd.h +1 -1
diff -pur linux-2.6.23-rc6/include/asm-arm/unistd.h linux-2.6.23-rc6-new/include/asm-arm/unistd.h
@@ -376,7 +376,7 @@
 #define __NR_kexec_load			(__NR_SYSCALL_BASE+347)
 #define __NR_utimensat			(__NR_SYSCALL_BASE+348)
 #define __NR_signalfd			(__NR_SYSCALL_BASE+349)
-#define __NR_timerfd			(__NR_SYSCALL_BASE+350)
+/* #define __NR_timerfd			(__NR_SYSCALL_BASE+350) */
 #define __NR_eventfd			(__NR_SYSCALL_BASE+351)
 
 /*
include/asm-avr32/unistd.h +1 -1
diff -pur linux-2.6.23-rc6/include/asm-avr32/unistd.h linux-2.6.23-rc6-new/include/asm-avr32/unistd.h
@@ -297,7 +297,7 @@
 
 #define __NR_utimensat		278
 #define __NR_signalfd		279
-#define __NR_timerfd		280
+/* #define __NR_timerfd		280 */
 #define __NR_eventfd		281
 
 #ifdef __KERNEL__
include/asm-frv/unistd.h +1 -1
diff -pur linux-2.6.23-rc6/include/asm-frv/unistd.h linux-2.6.23-rc6-new/include/asm-frv/unistd.h
@@ -328,7 +328,7 @@
 #define __NR_epoll_pwait	319
 #define __NR_utimensat		320
 #define __NR_signalfd		321
-#define __NR_timerfd		322
+/* #define __NR_timerfd		322 */
 #define __NR_eventfd		323
 #define __NR_fallocate		324
 
include/asm-i386/unistd.h +2 -1
diff -pur linux-2.6.23-rc6/include/asm-i386/unistd.h linux-2.6.23-rc6-new/include/asm-i386/unistd.h
@@ -327,7 +327,8 @@
 #define __NR_epoll_pwait	319
 #define __NR_utimensat		320
 #define __NR_signalfd		321
-#define __NR_timerfd		322
+/* Let's pause a moment before we decide on the final timerfd API */
+/* #define __NR_timerfd		322 */
 #define __NR_eventfd		323
 #define __NR_fallocate		324
 
include/asm-ia64/unistd.h +1 -1
diff -pur linux-2.6.23-rc6/include/asm-ia64/unistd.h linux-2.6.23-rc6-new/include/asm-ia64/unistd.h
@@ -297,7 +297,7 @@
 #define __NR_epoll_pwait		1305
 #define __NR_utimensat			1306
 #define __NR_signalfd			1307
-#define __NR_timerfd			1308
+/* #define __NR_timerfd			1308 */
 #define __NR_eventfd			1309
 
 #ifdef __KERNEL__
include/asm-mips/unistd.h +3 -3
diff -pur linux-2.6.23-rc6/include/asm-mips/unistd.h linux-2.6.23-rc6-new/include/asm-mips/unistd.h
@@ -338,7 +338,7 @@
 #define __NR_ioprio_get			(__NR_Linux + 315)
 #define __NR_utimensat			(__NR_Linux + 316)
 #define __NR_signalfd			(__NR_Linux + 317)
-#define __NR_timerfd			(__NR_Linux + 318)
+/* #define __NR_timerfd			(__NR_Linux + 318) */
 #define __NR_eventfd			(__NR_Linux + 319)
 #define __NR_fallocate			(__NR_Linux + 320)
 
@@ -635,7 +635,7 @@
 #define __NR_ioprio_get			(__NR_Linux + 274)
 #define __NR_utimensat			(__NR_Linux + 275)
 #define __NR_signalfd			(__NR_Linux + 276)
-#define __NR_timerfd			(__NR_Linux + 277)
+/* #define __NR_timerfd			(__NR_Linux + 277) */
 #define __NR_eventfd			(__NR_Linux + 278)
 #define __NR_fallocate			(__NR_Linux + 279)
 
@@ -936,7 +936,7 @@
 #define __NR_ioprio_get			(__NR_Linux + 278)
 #define __NR_utimensat			(__NR_Linux + 279)
 #define __NR_signalfd			(__NR_Linux + 280)
-#define __NR_timerfd			(__NR_Linux + 281)
+/* #define __NR_timerfd			(__NR_Linux + 281) */
 #define __NR_eventfd			(__NR_Linux + 282)
 #define __NR_fallocate			(__NR_Linux + 283)
 
include/asm-parisc/unistd.h +1 -1
diff -pur linux-2.6.23-rc6/include/asm-parisc/unistd.h linux-2.6.23-rc6-new/include/asm-parisc/unistd.h
@@ -795,7 +795,7 @@
 #define __NR_kexec_load		(__NR_Linux + 300)
 #define __NR_utimensat		(__NR_Linux + 301)
 #define __NR_signalfd		(__NR_Linux + 302)
-#define __NR_timerfd		(__NR_Linux + 303)
+/* #define __NR_timerfd		(__NR_Linux + 303) */
 #define __NR_eventfd		(__NR_Linux + 304)
 
 #define __NR_Linux_syscalls	(__NR_eventfd + 1)
include/asm-powerpc/unistd.h +1 -1
diff -pur linux-2.6.23-rc6/include/asm-powerpc/unistd.h linux-2.6.23-rc6-new/include/asm-powerpc/unistd.h
@@ -328,7 +328,7 @@
 #define __NR_epoll_pwait	303
 #define __NR_utimensat		304
 #define __NR_signalfd		305
-#define __NR_timerfd		306
+/* #define __NR_timerfd		306 */
 #define __NR_eventfd		307
 #define __NR_sync_file_range2	308
 #define __NR_fallocate		309
include/asm-s390/unistd.h +1 -1
diff -pur linux-2.6.23-rc6/include/asm-s390/unistd.h linux-2.6.23-rc6-new/include/asm-s390/unistd.h
@@ -254,7 +254,7 @@
 #define __NR_fallocate		314
 #define __NR_utimensat		315
 #define __NR_signalfd		316
-#define __NR_timerfd		317
+/* #define __NR_timerfd		317 */
 #define __NR_eventfd		318
 #define NR_syscalls 319
 
include/asm-sh/unistd.h +1 -1
diff -pur linux-2.6.23-rc6/include/asm-sh/unistd.h linux-2.6.23-rc6-new/include/asm-sh/unistd.h
@@ -330,7 +330,7 @@
 #define __NR_epoll_pwait	319
 #define __NR_utimensat		320
 #define __NR_signalfd		321
-#define __NR_timerfd		322
+/* #define __NR_timerfd		322 */
 #define __NR_eventfd		323
 #define __NR_fallocate		324
 
include/asm-sh64/unistd.h +1 -1
diff -pur linux-2.6.23-rc6/include/asm-sh64/unistd.h linux-2.6.23-rc6-new/include/asm-sh64/unistd.h
@@ -372,7 +372,7 @@
 #define __NR_epoll_pwait	347
 #define __NR_utimensat		348
 #define __NR_signalfd		349
-#define __NR_timerfd		350
+/* #define __NR_timerfd		350 */
 #define __NR_eventfd		351
 #define __NR_fallocate		352
 
include/asm-sparc/unistd.h +1 -1
diff -pur linux-2.6.23-rc6/include/asm-sparc/unistd.h linux-2.6.23-rc6-new/include/asm-sparc/unistd.h
@@ -327,7 +327,7 @@
 #define __NR_epoll_pwait	309
 #define __NR_utimensat		310
 #define __NR_signalfd		311
-#define __NR_timerfd		312
+/* #define __NR_timerfd		312 */
 #define __NR_eventfd		313
 #define __NR_fallocate		314
 
include/asm-sparc64/unistd.h +1 -1
diff -pur linux-2.6.23-rc6/include/asm-sparc64/unistd.h linux-2.6.23-rc6-new/include/asm-sparc64/unistd.h
@@ -329,7 +329,7 @@
 #define __NR_epoll_pwait	309
 #define __NR_utimensat		310
 #define __NR_signalfd		311
-#define __NR_timerfd		312
+/* #define __NR_timerfd		312 */
 #define __NR_eventfd		313
 #define __NR_fallocate		314
 
include/asm-x86_64/unistd.h +2 -2
diff -pur linux-2.6.23-rc6/include/asm-x86_64/unistd.h linux-2.6.23-rc6-new/include/asm-x86_64/unistd.h
@@ -626,8 +626,8 @@ __SYSCALL(__NR_utimensat, sys_utimensat)
 __SYSCALL(__NR_epoll_pwait, sys_epoll_pwait)
 #define __NR_signalfd		282
 __SYSCALL(__NR_signalfd, sys_signalfd)
-#define __NR_timerfd		283
-__SYSCALL(__NR_timerfd, sys_timerfd)
+/* #define __NR_timerfd		283
+__SYSCALL(__NR_timerfd, sys_timerfd) */
 #define __NR_eventfd		284
 __SYSCALL(__NR_eventfd, sys_eventfd)
 #define __NR_fallocate		285
#1 lore raw
Quoted 5 lines · On Mon, 17 Sep 2007 18:58:58 +0200 Michael Kerrisk <[email protected]> wrote:

I hope I've done this right... This patch, against 2.6.23-rc6, removes the timerfd() syscall (which in any case had a bug on its 2.6.22 release) from all architectures, so that we can have some breathing space to think about the API design. All of the existing timerfd() code is left intact.

I think a minimally-intrusive implementation would be

fs/timerfd.c renamed from fs/timerfd.c~a +2 -0
@@ -159,6 +159,8 @@ asmlinkage long sys_timerfd(int ufd, int
 	struct inode *inode;
 	struct itimerspec ktmr;
 
+	return -ENOSYS;
+
 	if (copy_from_user(&ktmr, utmr, sizeof(ktmr)))
 		return -EFAULT;
 

_

or, better,

init/Kconfig renamed from init/Kconfig~a +1 -0
@@ -491,6 +491,7 @@ config SIGNALFD
 
 config TIMERFD
 	bool "Enable timerfd() system call" if EMBEDDED
+	depends on BROKEN
 	select ANON_INODES
 	default y
 	help

_

#2 lore raw
Quoted 33 lines
Quoted 5 lines

I hope I've done this right... This patch, against 2.6.23-rc6, removes the timerfd() syscall (which in any case had a bug on its 2.6.22 release) from all architectures, so that we can have some breathing space to think about the API design. All of the existing timerfd() code is left intact.

I think a minimally-intrusive implementation would be

fs/timerfd.c renamed from fs/timerfd.c~a +2 -0
@@ -159,6 +159,8 @@ asmlinkage long sys_timerfd(int ufd, int
 	struct inode *inode;
 	struct itimerspec ktmr;
 
+	return -ENOSYS;
+
 	if (copy_from_user(&ktmr, utmr, sizeof(ktmr)))
 		return -EFAULT;
 

_

or, better,

init/Kconfig renamed from init/Kconfig~a +1 -0
@@ -491,6 +491,7 @@ config SIGNALFD
 
 config TIMERFD
 	bool "Enable timerfd() system call" if EMBEDDED
+	depends on BROKEN
 	select ANON_INODES
 	default y
 	help
Quoted 1 line

_

Cough! Right then. I take it you'll apply one of those then?

Signature · 8 lines
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7 

Want to help with man page maintenance?  
Grab the latest tarball at
http://www.kernel.org/pub/linux/docs/manpages , 
read the HOWTOHELP file and grep the source 
files for 'FIXME'.