Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758218AbXEaBzd (ORCPT ); Wed, 30 May 2007 21:55:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754468AbXEaBz0 (ORCPT ); Wed, 30 May 2007 21:55:26 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:44819 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752514AbXEaBzZ (ORCPT ); Wed, 30 May 2007 21:55:25 -0400 Date: Thu, 31 May 2007 10:55:22 +0900 Message-ID: <87vee9ah9x.wl%takeuchi_satoru@jp.fujitsu.com> From: Satoru Takeuchi To: Roland McGrath Cc: Satoru Takeuchi , Oleg Nesterov , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH] tty: fix leakage of -ERESTARTSYS to userland In-Reply-To: <20070531010855.DE2AC1F8512@magilla.localdomain> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/21.4 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1643 Lines: 45 At Wed, 30 May 2007 18:08:55 -0700 (PDT), Roland McGrath wrote: > > Aside from typos, I think it should be more clearly and strongly worded. > > "These should never be seen by user programs. To return one of these > codes, signal_pending() MUST be set. Note that ptrace can observe these at > syscall exit tracing, but they will never be left for the debugged user > process to see." Thanks, is that better? Satoru --- Add comment for errnos related to restart syscall to avoid the leakage of them to user programs. Signed-off-by: Satoru Takeuchi Cc: Oleg Nesterov Cc: Roland McGrath Index: linux-2.6.22-rc3/include/linux/errno.h =================================================================== --- linux-2.6.22-rc3.orig/include/linux/errno.h 2007-04-26 12:08:32.000000000 +0900 +++ linux-2.6.22-rc3/include/linux/errno.h 2007-05-31 10:47:40.000000000 +0900 @@ -5,7 +5,12 @@ #ifdef __KERNEL__ -/* Should never be seen by user programs */ +/* + * These should never be seen by user programs. To return one of ERESTART* + * codes, signal_pending() MUST be set. Note that ptrace can observe these + * at syscall exit tracing, but they will never be left for the debugged user + * process to see. + */ #define ERESTARTSYS 512 #define ERESTARTNOINTR 513 #define ERESTARTNOHAND 514 /* restart if no handler.. */ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/