public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Carlos O'Donell via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: The GNU C Library Manual - Authoritative or not?
Date: Fri, 22 May 2020 14:54:19 +0200	[thread overview]
Message-ID: <87ftbs3zb8.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <875300cf-92ca-c115-c42d-19dda5de5a4a@redhat.com> (Carlos O'Donell via Libc-alpha's message of "Thu, 21 May 2020 11:53:04 -0400")

* Carlos O'Donell via Libc-alpha:

> "What is the authoritative source for public glibc APIs?"
> https://sourceware.org/glibc/wiki/FAQ#What_is_the_authoritative_source_for_public_glibc_APIs.3F

Current text:

| The GNU C Library manual is the authoritative place for such
| information that is related to the implementation of functions in
| glibc.
|
| The Linux Man Pages are non-authoritative, but they are incredibly
| useful, easy to use, and often the first source of such information.
|
| The Linux Man Pages is generally authoritative on kernel syscalls, and
| we have worked hard in cases like futex to ensure the documentation is
| clear enough for all C libraries.
|
| We should all work together to keep both the manual (glibc manual) and
| the shorter form API references (linux man pages) up to date with the
| most accurate information we have.
|
| Where you find issues with the manual or the linux man pages please
| reach out to discuss the issue.

> "What other sources of documentation about glibc are available?"
> https://sourceware.org/glibc/wiki/FAQ#What_other_sources_of_documentation_about_glibc_are_available.3F

| The glibc manual is part of glibc, it is also available online.
|
| The Linux man-pages project documents the Linux kernel and the C
| library interfaces.
|
| The Open Group maintains the POSIX Standard which is the authoritative
| reference for the POSIX APIs.
|
| The ISO JTC1 SC22 WG14 maintains the C Standard which is the
| authoritative reference for the ISO C APIs.
|
| The official home page of glibc is at http://www.gnu.org/software/libc.
|
| The glibc wiki is at http://sourceware.org/glibc/wiki/HomePage.
|
| For bugs, the glibc project uses the sourceware bugzilla with
|component 'glibc'.

I don't think this is very helpful.  It paints a simple picture which is
turns out to be rather misleading when inspected closely.  For example,
POSIX often claims that ISO C takes precedence, but then proceeds to
specify conflicting requirements with ISO C.  What does that even mean?
After fall, it's not possible to have multiple authoritative sources for
the behavior of a single function.

Practically speaking, I see the following problems.

The GNU C Library manual is not often consulted by developers.  I don't
know why.  One reason may be that it is not readily installable from
package repositories on Debian or Ubuntu (at least not in current
versions from the main archive).  But our experience at Red Hat suggests
that our developers do not read the manual, either, although we do ship
it.  I base this on the paucity of bug reports against the manual
compared to what we receive for the man-pages package (which are often
misfiled initially against glibc).  In my opinion, a manual that is not
actually used by the people who benefit from the information in it has
at best a dubious claim to authority.

Reading our manual requires considerable skill.  You need to know the
history of the project, the lingering Linux vs Hurd conflict, the late
arrival of threading support in UNIX-like environments, the tension
between the POSIX and C standards, the lack of maintenance of both, and
so on.  Without such knowledge, it is often not possible to reach the
right conclusions.  Even senior developers can easily get confused.
(For a recent example, consider Kees Cook's misinterpretation of the
O_EXEC documentation in the manual.)  Part of the problem here is that
we do not have a team that combs through the manual from time to time
and keeps it up to date, as our understanding of the documented matter
evolves.

When it comes to Linux interfaces, any claim about authority of the
manual is very misleading.  It does not matter if the system call is
described by POSIX.  For example, if Linux developers change the signal
that waitpid reports after a failed execve, and our manual documents
something else, then the manual is now wrong.  And not the kernel.  If
the manual were authoritative, it would be the other way round.  (The
man-pages project is not authoritative in that sense, either—it did
document the SIGKILL signal and had to be updated.)

Many of these issues are beyond our control.  Some of the issues which
are in our area would need a tremendous amount of work to address.

Thanks,
Florian


  parent reply	other threads:[~2020-05-22 12:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20 16:20 question about Glibc extensions Martin Sebor
2020-05-20 16:38 ` Florian Weimer
2020-05-20 17:30   ` Martin Sebor
2020-05-20 17:32 ` Andreas Schwab
2020-05-20 19:35   ` Martin Sebor
2020-05-20 20:22     ` Andreas Schwab
2020-05-21  1:00       ` Rich Felker
2020-05-21 15:53 ` The GNU C Library Manual - Authoritative or not? Carlos O'Donell
2020-05-21 17:46   ` Martin Sebor
2020-05-21 22:11     ` Carlos O'Donell
2020-05-22  0:22       ` Martin Sebor
2020-05-22 12:35         ` Carlos O'Donell
2020-05-22 21:02           ` Joseph Myers
2020-05-23 20:24             ` Michael Kerrisk
2020-05-25 16:15               ` Carlos O'Donell
2020-05-25  8:58           ` Michael Kerrisk
2020-05-25 15:51             ` J William Piggott
2020-05-25 16:21               ` Carlos O'Donell
2020-05-22  0:20     ` Rich Felker
2020-05-22 10:30       ` Michael Kerrisk
2020-05-22 12:21         ` Carlos O'Donell
2020-05-22 12:54   ` Florian Weimer [this message]
2020-05-22 16:23     ` Carlos O'Donell
2020-05-25  9:04     ` Michael Kerrisk
2020-05-25 10:52       ` Florian Weimer
2020-05-25 19:52       ` J William Piggott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ftbs3zb8.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).