From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3584 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: Linux manpages (was Re: [musl] Request for volunteers) Date: Mon, 8 Jul 2013 22:53:30 -0400 Message-ID: <20130709025329.GM29800@brightrain.aerifal.cx> References: <20130701174411.GA1631@gauss> <20130706215227.GC26987@newbook> <20130707000324.GU29800@brightrain.aerifal.cx> <51DB56CD.6050306@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1373338424 30696 80.91.229.3 (9 Jul 2013 02:53:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Jul 2013 02:53:44 +0000 (UTC) Cc: "Michael Kerrisk (man-pages)" To: musl@lists.openwall.com Original-X-From: musl-return-3588-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jul 09 04:53:46 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UwO3j-0007TQ-VS for gllmg-musl@plane.gmane.org; Tue, 09 Jul 2013 04:53:44 +0200 Original-Received: (qmail 30467 invoked by uid 550); 9 Jul 2013 02:53:43 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 30459 invoked from network); 9 Jul 2013 02:53:43 -0000 Content-Disposition: inline In-Reply-To: <51DB56CD.6050306@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3584 Archived-At: On Tue, Jul 09, 2013 at 02:18:21AM +0200, Michael Kerrisk wrote: > > However my feeling is that this would be a very big project > > and I'm not sure if Michael would want to go in that direction. I do > > think it would greatly improve the quality of Linux software > > development, though. > > > >> The man(2) section is rather glibc specific and makes the syscall details > >> rather subsidiary. I will try to send some patches if these would be > >> welcome. > > > > I think it's an error to have anything glibc-specific in section 2 of > > the manual, which should be documenting the kernel, not userspace. > > What would be useful in the section 2 man pages is to document where > > ("useful" to who? Few users care about the naked > syscall behavior.) Admittedly, part of the answer is "to me". However I can think of a good number of others: 1. Anyone doing pure asm programming on Linux. I think this is a rather bad idea, but there are people who do it. 2. People reading strace output. (For instance, if the kernel returns a bogus error code and userspace has to translate it, that's relevant to someone who sees the strace output and errno value in their program mismatching.) 3. Implementors of any component that uses or provides the syscall. That includes not only libc, but also qemu app-level emulation, BSD Linux-syscall ABI emulation, Zvi's psxcalls layer (intended to eventually allow using musl as the first-ever conforming Windows libc that's actually deployable, unlike cygwin), ... 4. Anyone trying to understand what libc (musl, glibc, or otherwise) is doing munging the syscall inputs/results. 5. Kernel developers who want to know the actual contract their interfaces are supposed to satisfy and preserve. I suspect there are others, but those are the ones that came to mind right off. > > the syscall is insufficient to provide POSIX semantics, which are left > > to userspace to provide. Such section 2 pages could then have > > corresponding section 3 pages that document the library behavior. > > See https://www.kernel.org/doc/man-pages/todo.html#migrate_to_kernel_source > I think it would be a retrograde step to split syscall pages into > Sections 2 and 3. Yes, that's understandable. I somewhat question why we even still have a "section 2" in the manual, though... Rich