Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Better documentation for ERESTARTSYS

Add comment for errnos related to restart syscall to avoid the leakage of
them to user programs.

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Satoru Takeuchi and committed by
Linus Torvalds
62e5b05d d7083174

+6 -1
+6 -1
include/linux/errno.h
··· 5 5 6 6 #ifdef __KERNEL__ 7 7 8 - /* Should never be seen by user programs */ 8 + /* 9 + * These should never be seen by user programs. To return one of ERESTART* 10 + * codes, signal_pending() MUST be set. Note that ptrace can observe these 11 + * at syscall exit tracing, but they will never be left for the debugged user 12 + * process to see. 13 + */ 9 14 #define ERESTARTSYS 512 10 15 #define ERESTARTNOINTR 513 11 16 #define ERESTARTNOHAND 514 /* restart if no handler.. */