aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2022-12-28charsets.7: tfixLennart Jablonka1-1/+1
Signed-off-by: Lennart Jablonka <humm@ljabl.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-24string_copying.7: Remove stpecpyx()Alejandro Colomar1-49/+16
And give stpecpy() with the semantics of stpecpyx(). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-24scripts/LinuxManBook/: Add Deri's script for producing the man-pages bookAlejandro Colomar15-0/+23242
Deri is the author of all of this great work! I expect to be able to hook it into the build system, so that we can run `make book-pdf` (or something like that). Cc: Deri James <deri@chuzzlewit.myzen.co.uk> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-22string_copying.7: tfixAlejandro Colomar1-1/+1
Reported-by: "G. Branden Robinson" <g.branden.robinson@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-22RELEASE: Fix commandAlejandro Colomar1-1/+3
git-push(1) needs a remote for pushing a tag. Specify korg, my name for the git.kernel.org remote. $ git remote -v | grep korg korg git@gitolite.kernel.org:pub/scm/docs/man-pages/man-pages (fetch) korg git@gitolite.kernel.org:pub/scm/docs/man-pages/man-pages (push) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-22Start of man-pages-NEXT: Move Changes to Changes.oldAlejandro Colomar2-132/+172
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-22lsm: Released 6.02Alejandro Colomar1-3/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-22Changes: Ready for 6.02man-pages-6.02Alejandro Colomar1-2/+132
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-21strncat.3: EXAMPLES: Check the return of malloc(3)Alejandro Colomar1-0/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-21strcpy.3: EXAMPLES: Check the return of malloc(3)Alejandro Colomar1-0/+5
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-20string_copying.7: tfixAlejandro Colomar1-1/+1
Reported-by: Stefan Puiu <stefan.puiu@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-20suffixes.7: Improve table formatG. Branden Robinson1-216/+216
Apparently the original author(s) of this table did not know how to start a table entry in the first column of a tbl(1) table with a dot. (If you try, the *roff formatter will interpret it as a control line, and try to invoke a request or call a macro.) Start every row of the table with the *roff dummy character `\&` instead of leading space. Not only is this more idiomatic, but it recovers some of the line length for content. This patch does not attempt to correct any errors in the table contents, nor bring it up to date from its year 2000 vintage. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-20suffixes.7: Drop diagnostic-suppressing hackG. Branden Robinson1-3/+0
The extension of the page length is workaround for <https://savannah.gnu.org/bugs/?63449>, which is a very old groff bug, possibily dating back to groff 1.00 or beyond. It is fixed in groff Git. But waiting for a groff release is not necessary; man-db man(1) nowadays conceals diagnostic messages from the formatter and output drivers. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-20strncat.3: Rewrite to be consistent with string_copying.7Alejandro Colomar1-100/+57
Cc: Martin Sebor <msebor@redhat.com> Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com> Cc: Douglas McIlroy <douglas.mcilroy@dartmouth.edu> Cc: Jakub Wilk <jwilk@jwilk.net> Cc: Serge Hallyn <serge@hallyn.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Cc: Andrew Pinski <pinskia@gmail.com> Cc: Stefan Puiu <stefan.puiu@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-20stpncpy.3, strncpy.3: Document in a single pageAlejandro Colomar2-194/+102
Rewrite to be consistent with the new string_copying.7 page. Cc: Martin Sebor <msebor@redhat.com> Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com> Cc: Douglas McIlroy <douglas.mcilroy@dartmouth.edu> Cc: Jakub Wilk <jwilk@jwilk.net> Cc: Serge Hallyn <serge@hallyn.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Cc: Andrew Pinski <pinskia@gmail.com> Cc: Stefan Puiu <stefan.puiu@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-20stpcpy.3, strcpy.3, strcat.3: Document in a single pageAlejandro Colomar3-360/+152
Rewrite to be consistent with the new string_copying.7 page. Cc: Martin Sebor <msebor@redhat.com> Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com> Cc: Douglas McIlroy <douglas.mcilroy@dartmouth.edu> Cc: Jakub Wilk <jwilk@jwilk.net> Cc: Serge Hallyn <serge@hallyn.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Cc: Andrew Pinski <pinskia@gmail.com> Cc: Stefan Puiu <stefan.puiu@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-20stpecpy.3, stpecpyx.3, ustpcpy.3, ustr2stp.3, zustr2stp.3, zustr2ustp.3: Add ↵Alejandro Colomar6-0/+6
new links to string_copying(7) Cc: Martin Sebor <msebor@redhat.com> Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com> Cc: Douglas McIlroy <douglas.mcilroy@dartmouth.edu> Cc: Jakub Wilk <jwilk@jwilk.net> Cc: Serge Hallyn <serge@hallyn.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Cc: Andrew Pinski <pinskia@gmail.com> Cc: Stefan Puiu <stefan.puiu@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-20string_copying.7: Add page to document all string-copying functionsAlejandro Colomar1-0/+855
This is an opportunity to use consistent language across the documentation for all string-copying functions. It is also easier to show the similarities and differences between all of the functions, so that a reader can use this page to know which function is needed for a given task. Alternative functions not provided by libc have been given in the same page, with reference implementations. Cc: Martin Sebor <msebor@redhat.com> Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com> Cc: Douglas McIlroy <douglas.mcilroy@dartmouth.edu> Cc: Jakub Wilk <jwilk@jwilk.net> Cc: Serge Hallyn <serge@hallyn.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Cc: Andrew Pinski <pinskia@gmail.com> Cc: Stefan Puiu <stefan.puiu@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-17lint-man.mk: Fix bogus stderr redirectionAlejandro Colomar1-6/+6
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-16utmp.5: STANDARDS: Specify that it's an XSI extensionAlejandro Colomar1-1/+2
Cc: Serge Hallyn <serge@hallyn.com> Cc: Iker Pedrosa <ipedrosa@redhat.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-15Many pages: Add '\" t' comment where necessaryAlejandro Colomar592-0/+592
Scripted change: $ grep -l -x '^[.]TS$' man*/* | sort -u | xargs sed -i -e "1i'\\\\\" t" Link: <https://lore.kernel.org/linux-man/07a7d4e7-79a6-b2c3-6892-1e39a0679f27@gmail.com/T/#mcf36c8a387fd5ff4f800dc220e3dbdd229b556bd> Reported-by: Jakub Wilk <jwilk@jwilk.net> Cc: Mike Frysinger <vapier@gentoo.org> Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Stefan Puiu <stefan.puiu@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-15INSTALL, Makefile, cmd.mk, lint-man.mk: Lint about '\" t' comment for tbl(1)Alejandro Colomar4-1/+29
This is to make sure that we have correct \" t comments in the pages, which are necessary for the Debian package checker: On 8/19/22 22:21, Jakub Wilk wrote: > * Michael Kerrisk <mtk.manpages@gmail.com>, 2020-07-24 12:13: >> For 15 years or at least, I've not paid any attention to adding the >> 't' comments when I added tables to pages, and I do recall anyone >> reporting ill effects. So, I'm inclined to apply Mike's patch, but >> will hold off a moment, in case there's other feedback. > > I'm a bit late, but... > > Lintian, the Debian package checker, sets the MANROFFSEQ environment > variable to empty string as a speed optimization. This turns off > loading preprocessors that weren't explicitly declared in the source. > The lack of '\" comments can cause false positives (and maybe also > false negatives?) in Lintian. > > The use of $MANROFFSEQ for Lintian was proposed here: > https://bugs.debian.org/677874 > > Beware that the man(1) man page does not correctly explain what > $MANROFFSEQ does: <https://bugs.debian.org/971009> Also update the dependencies list, since now we also need head(1) and tail(1) for linting man(7) source. Link: <https://lore.kernel.org/linux-man/07a7d4e7-79a6-b2c3-6892-1e39a0679f27@gmail.com/T/#mcf36c8a387fd5ff4f800dc220e3dbdd229b556bd> Reported-by: Jakub Wilk <jwilk@jwilk.net> Cc: Mike Frysinger <vapier@gentoo.org> Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Stefan Puiu <stefan.puiu@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-15man-pages.7: tfixEric Biggers1-4/+4
Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-15ioctl_userfaultfd.2: tfixEric Biggers1-1/+1
Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-15INSTALL: tfixEric Biggers1-1/+1
Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-15utimensat.2: tfixJakub Wilk1-1/+1
Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-14copy_file_range.2: wfixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-14copy_file_range.2: Fix wrong kernel version informationAmir Goldstein1-6/+11
commit d7ba612d0 ("copy_file_range.2: Update cross-filesystem support for 5.12") prematurely documented kernel 5.12 as the version that changes the cross-fs copy_file_range() behavior, but that behavior change was only merged in kernel version 5.19. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-12scanf.3: Do not mention the ERANGE errorIan Abbott1-7/+0
The `scanf()` function does not intentionally set `errno` to `ERANGE`. That is just a side effect of the code that it uses to perform conversions. It also does not work as reliably as indicated in the 'man' page when the target integer type is narrower than `long`. Typically (at least in glibc) for target integer types narrower than `long`, the number has to exceed the range of `long` (for signed conversions) or `unsigned long` (for unsigned conversions) for `errno` to be set to `ERANGE`. Documenting `ERANGE` in the ERRORS section kind of implies that `scanf()` should return `EOF` when an integer overflow is encountered, which it doesn't (and doing so would violate the C standard). Just remove any mention of the `ERANGE` error to avoid confusion. Fixes: 646af540e467 ("Add an ERRORS section documenting at least some of the errors that may occur for scanf().") Link: <https://lore.kernel.org/linux-man/5af4f708-337f-fddf-9a2d-e0e4602d3a72@mev.co.uk/T/#m900a1b1741afefab008a69e6b76919cd94aa81ef> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Zack Weinberg <zack@owlfolio.org> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-12scanf.3: Deprecate unsafe conversion specifiersAlejandro Colomar1-0/+11
Use of numeric conversion specifiers can produce Undefined Behvaior under conditions that the program doesn't control; therefore, there's no way to use them safely. Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Zack Weinberg <zack@owlfolio.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-12core.5: Clarify that RLIMIT_CORE is ignored when piping.Alejandro Colomar1-0/+3
Reported-by: Luca Versari <veluca93@gmail.com> Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=216648> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-12intro.3: Document subsections of man3Alejandro Colomar1-0/+31
Cowritten-by: "G. Branden Robinson" <g.branden.robinson@gmail.com> Cc: Ingo Schwarze <schwarze@openbsd.org> Cc: Douglas McIlroy <douglas.mcilroy@dartmouth.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-11shm_open.3: tfixAlejandro Colomar1-2/+2
Reported-by: 1092615079 <1092615079@qq.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-11socket.7: Be explicit that accept(2) respects SO_*TIMEOAlejandro Colomar1-0/+1
See the previous commit. Reported-by: Luis Javier Merino <ninjalj@gmail.com> Cc: Tycho Andersen <tycho@tycho.pizza> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-09socket.7: be explicit that connect(2) respects SO_*TIMEOTycho Andersen1-0/+1
Our group recently had some confusion around this. Although f327722042df ("socket.7: Explain effect of SO_SNDTIMEO for connect()") adds a mention of connect(2), the wording around "Timeouts only have effect for system calls that perform socket I/O" is slightly confusing: is connect(2) I/O?. Let's just add connect(2) to the list of things that time out explicitly to avoid any confusion. Test program for grins: #include <stdio.h> #include <sys/socket.h> #include <netinet/ip.h> #include <arpa/inet.h> int main(void) { struct sockaddr_in servaddr = { /* tycho.pizza */ .sin_addr.s_addr = inet_addr("192.241.255.151"), .sin_port = htons(443), .sin_family = AF_INET, }; int fd; struct timeval timeout = { .tv_sec = 0, .tv_usec = 100, }; fd = socket(AF_INET, SOCK_STREAM, 0); if (fd < 0) { perror("socket"); return 1; } if (setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)) < 0) { perror("setsockopt"); return 1; } if (connect(fd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { perror("connect"); return 1; } printf("connect successful\n"); return 0; } $ ./so_sndtimeo connect: Operation now in progress Signed-off-by: Tycho Andersen <tycho@tycho.pizza> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-06stpncpy.3, strncpy.3: wfixAlejandro Colomar2-4/+4
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-06strncat.3: Overrunning the dest buffer is not that badAlejandro Colomar1-117/+28
With the right function call, that is, one that always copies the same amount of bytes, and is so simple that can be inlined, the behavior will be consistent enough to be warned by the compiler in most cases of overrun, and crash quite consistently in the remaining. Prefer simplicity over correctness, so suggest the simpler ustr2stp(). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-06string.3, strncat.3: Undeprecate strncat(3)Alejandro Colomar2-36/+198
After some investigation, I found a case where this function is useful: Concatenating an unterminated string into a string. It's not an ideal API for that, but there's no other API that does it. The closest thing, and something that some projects use instead of strncat(3), is calling mempcpy(3) directly. However mempcpy(3) isn't ideal either (it's faster; just that). It even requires a multiline pattern to use correctly, which is a source of bugs. So, suggest using a custom alternative that needs to be defined by the programmer, which handles all the subtle details much better than any of the conventional functions: ustr2stpe(). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-06string.3, strncat.3: Fix typo in prototype of strncat(3)Alejandro Colomar2-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-06string.3: strncpy(3), strncat(3): Obsolete, and fixAlejandro Colomar1-28/+29
The prototype for strncat(3) was wrong. Fix it. Mark the functions as obsolete. Fix the descriptions, to remove misleading text. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-06strncat.3: tfixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-05strncat.3: BUGS: TruncationAlejandro Colomar1-0/+7
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-05strcat.3, strncat.3: RIP strncat(3)Alejandro Colomar2-72/+95
Never use this function. Really. Cc: <pkg-shadow-devel@alioth-lists.debian.net> Cc: <libc-alpha@sourceware.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-05strcat.3: SYNOPSIS: Fix the size of 'dest'Alejandro Colomar1-3/+2
I had a mistake when adding VLA syntax to this prototype. From this fixed prototype, it's visible how broken the design for this function is. Next move is to kill this function. Cc: <libc-alpha@sourceware.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-05stpncpy.3: Clarify what this function is forAlejandro Colomar1-34/+48
Use concise wording to make the points more direct. This function is rarely used for its only valid purpose. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-05filesystems.5: Don't refer to dead software; use a more generic termAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Reported-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-05strncpy.3: Rename CAVEATS to BUGSAlejandro Colomar1-2/+2
Those are not caveats, but actual bugs. This function was misdesigned. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-05strncpy.3: wfixAlejandro Colomar1-1/+0
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-05strncpy.3: NAME: Clarify what this function isAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-05strncpy.3: SEE ALSO: Remove some referencesAlejandro Colomar1-3/+0
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-05strncpy.3: Deprecate strncpy(3) in favor of stpncpy(3)Alejandro Colomar1-6/+15
It is equivalent, but reports truncation. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04strncpy.3: Move description of valid use upAlejandro Colomar1-8/+9
To make it more visible; and refer CAVEATS to still discourage its use. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04strncpy.3: CAVEATS: It can't detect truncationAlejandro Colomar1-0/+7
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04strncpy.3: ffixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04strncpy.3: Fix TH, and add myself to copyrightAlejandro Colomar1-2/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04strcpy.3, strncpy.3: Split the page and document them separatelyAlejandro Colomar2-118/+122
strncpy(3) is completely unrelated to strcpy(3). Rewrite its documentation to be more explicit about this. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04path_resolution.7: ffixAlejandro Colomar1-1/+3
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04credentials.7: tfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04credentials.7: tfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04console_codes.4: tfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04cpow.3: tfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04connect.2: ffixAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04connect.2: tfixAlejandro Colomar1-1/+0
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04wcsspn.3: NAME: Fix summary-descriptionAlejandro Colomar1-2/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04wavelan.4: tfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04uts_namespaces.7: wfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04user_namespaces.7: Add missing wordAlejandro Colomar1-2/+2
Cc: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04user_namespaces.7: ffixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04user_namespaces.7: wfixAlejandro Colomar1-2/+2
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04towctrans.3: wfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04ttytype.5: tfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04time_namespaces.7: tfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04symlink.2: tfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04proc.5: tfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04Many pages: wfixAlejandro Colomar422-1091/+1086
Refer consistently to software versions. In most cases, it is done as <software> <version>. In the case of Linux and glibc, use the project name, instead of other terms such as 'kernel' or 'library'. I found the uses of inconsistent language with the following: $ find man* -type f \ | xargs grep -i '\(since\|before\|after\|until\|to\|from\|in\|between\|version\|with\) \(kernel\|version\|2\.\|3\.\|4\.\|5\.\)' \ | sort However, I might have missed some cases. Anyway, 99% consistency is pretty good consistency. We'll fix the remaining cases as we see them. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04passwd.5: ffixAlejandro Colomar1-2/+6
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04network_namespaces.7: wfixAlejandro Colomar1-1/+2
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04mount_namespaces.7: tfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04mq_close.3: tfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04malloc.3: ffixAlejandro Colomar1-1/+3
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04mount_namespaces.7: ffixAlejandro Colomar1-16/+62
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04mount_namespaces.7: tfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04keyrings.7: wfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04iswctype.3: wfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04filesystems.5: wfixAlejandro Colomar1-1/+1
ext2 is not a high performance fs by today's standards. And it's not used in Linux by default. Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04errno.3: wfixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-04dsp56k.4: ffixAlejandro Colomar1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Cc: Mario Blättermann <mario.blaettermann@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03wait4.2: SYNOPSIS: Add _NullableAlejandro Colomar1-3/+4
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03wait.2: SYNOPSIS: Add _NullableAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03utimensat.2: SYNOPSIS: Add _NullableAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03utime.2: SYNOPSIS: Add _NullableAlejandro Colomar1-2/+4
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03timerfd_create.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03timer_settime.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03timer_create.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03time.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03splice.2: SYNOPSIS: Add _NullableAlejandro Colomar1-3/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03sigwaitinfo.2: SYNOPSIS: Add _NullableAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03sigprocmask.2: SYNOPSIS: Add _NullableAlejandro Colomar1-7/+8
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03sigaltstack.2: SYNOPSIS: Add _NullableAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03sigaction.2: SYNOPSIS: Add _NullableAlejandro Colomar1-2/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03shmop.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03sendfile.2: SYNOPSIS: Add _NullableAlejandro Colomar1-2/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03semop.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03select.2: SYNOPSIS: Add _NullableAlejandro Colomar1-7/+9
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03request_key.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03recv.2: SYNOPSIS: Add _NullableAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03quotactl.2: SYNOPSIS: Add _NullableAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03poll.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03pidfd_send_signal.2: SYNOPSIS: Add _NullableAlejandro Colomar1-3/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03nanosleep.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03mount.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03listxattr.2: SYNOPSIS: Add _NullableAlejandro Colomar1-3/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03gettimeofday.2: SYNOPSIS: Add _NullableAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03getrlimit.2: SYNOPSIS: Add _NullableAlejandro Colomar1-2/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03getitimer.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03getgroups.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03getcpu.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03fanotify_mark.2: SYNOPSIS: Add _NullableAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03execveat.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03execve.2: SYNOPSIS: Add _NullableAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03epoll_wait.2: SYNOPSIS: Add _NullableAlejandro Colomar1-3/+4
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03epoll_ctl.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03copy_file_range.2: SYNOPSIS: Add _NullableAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03clone.2: SYNOPSIS: Add _NullableAlejandro Colomar1-4/+6
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03clock_nanosleep.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03clock_getres.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03acct.2: SYNOPSIS: Add _NullableAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03accept.2: SYNOPSIS: Add _NullableAlejandro Colomar1-4/+4
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-03select_tut.2: tfixJakub Wilk1-1/+1
Add missing comma. Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-02_Static_assert.3, static_assert.3: Add documentation for static_assert()Alejandro Colomar2-0/+119
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-02CONTRIBUTING, README, lsm: Remove mtk as maintainerAlejandro Colomar3-4/+2
He's been AWOL for more than a year. Let's document reality. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-28confstr.3: srcfixJakub Wilk1-1/+1
At least on Debian systems, there's no "confstr" in the info directory node, so the command "info confstr" either fails with: info: No menu item 'confstr' in node '(dir)Top' or shows you this very man page. Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-22.mailmap, README: Add .mailmap fileAlejandro Colomar2-0/+7
See gitmailmap(5). Map my addresses to "Alejandro Colomar <alx@kernel.org>". Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-22sendfile.2, vfork.2, alloca.3, getcontext.3, tmpfs.5, ttytype.5, spufs.7: ffixAlejandro Colomar7-10/+25
Break lines containing two man page references into a line for each. This is not only more consistent with our guidelines (man-pages(7)); it also helps prepare for the future adoption of the MR man(7) macro. Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-22bash_aliases: Remove grep_syscall(), grep_syscall_def(), and ↵Alejandro Colomar1-80/+0
grep_glibc_prototype() The functionality of those shell functions is covered by the grepc(1) program: <http://www.alejandro-colomar.es/src/alx/alx/grepc.git/>. The program has several bug fixes that these shell functions didn't receive. It also has more useful features. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-22CONTRIBUTING, MAINTAINER_NOTES: Remove MAINTAINER_NOTESAlejandro Colomar2-11/+9
That file is also interesting to contributors, and fits nicely into CONTRIBUTING. Move the text there, and remove the file. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-22CONTRIBUTING: Move style guide to descriptionAlejandro Colomar1-8/+10
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-18CONTRIBUTING: tfixThomas Voss1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-17syscall.2: add loongarchXi Ruoyao1-0/+2
Link: https://lore.kernel.org/loongarch/1f353678-3398-e30b-1c87-6edb278f74db@xen0n.name/ Link: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/loongarch/sysdep.h Signed-off-by: Xi Ruoyao <xry111@xry111.site> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-17INSTALL, RELEASE, cmd.mk, lint-man.mk: Use expr(1) instead of bc(1)Alejandro Colomar4-4/+4
Both bc(1) and expr(1) are in POSIX. However, expr(1) is provided by GNU coreutils, and seems simpler to use. This will simplify the dependencies required to package the project. Document the change in dependencies too. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-17README: tfixAlejandro Colomar1-1/+1
Reported-by: Andries E. Brouwer <aeb@cwi.nl> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-17EXIT_SUCCESS.3const, EXIT_FAILURE.3const: Add page and linkThomas Voss2-0/+61
Signed-off-by: Thomas Voss <mail@thomasvoss.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-12_Generic.3: EXAMPLES: Add sockaddr_cast() macroAlejandro Colomar1-1/+90
This macro is an example of how C++-style casts can be implemented in C. They are better than C's casts because they only allow certain conversions, while disallowing most. This adds considerable type safety. They also make code more greppable. A macro similar to const_cast() can also be implemented in a similar manner: /* This code is in the public domain. */ #define qual_cast(t, p) \ _Generic(typeof_unqual(&*(p)), \ typeof_unqual(t): \ _Generic(&*(p), \ const t: (t) (p), \ volatile t: (t) (p), \ const volatile t: (t) (p), \ default: (p)) \ default: \ (p) \ ) Note that typeof_unqual() is yet unsupported by GCC and Clang, and will be added to C23. Similar behavior can be achieved by combining GNU builtins. Cc: Andrew Clayton <andrew@digital-domain.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-11memmem.3: Add list of known systems where this is availableAndrew Clayton1-1/+4
While looking at which systems provide memmem(3) I have been able to discern the following: musl libc since v0.9.7 (2012) bionic since Android 9 (2018) FreeBSD since 6.0 (2005) OpenBSD since 5.4 (2013) NetBSD macOS Illumos For macOS and Illumos I checked the memmem(3) man page on those systems. For the rest there are links below to on-line man pages or commit logs. Where I could determine what version memmem(3) was introduced, I've noted that in the man page. Link: <http://git.musl-libc.org/cgit/musl/commit/src/string/memmem.c?id=c86f2974e2acd330be2d587173dd4dd56db82e22> Link: <https://android.googlesource.com/platform/bionic/+/android-9.0.0_r3/libc/bionic/memmem.cpp> Link: <https://www.freebsd.org/cgi/man.cgi?query=memmem&sektion=3&format=html> Link: <https://man.openbsd.org/memmem.3> Link: <https://anonhg.netbsd.org/src/diff/96a37d536271/common/lib/libc/string/memmem.c> Suggested-by: Alejandro Colomar <alx@kernel.org> Signed-off-by: Andrew Clayton <andrew@digital-domain.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-10Various pages: SYNOPSIS: Use VLA syntax in 'void *' function parametersAlex Colomar59-128/+162
Use VLA syntax also for void *, even if it's a bit more weird. Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2611.htm> Cc: Ingo Schwarze <schwarze@openbsd.org> Cc: JeanHeyd Meneide <wg14@soasis.org> Cc: Martin Uecker <uecker@tugraz.at> Cc: <gcc@gcc.gnu.org> Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
2022-11-10get_mempolicy.2, mbind.2: SYNOPSIS: Use VLA syntax in function parametersAlex Colomar2-3/+6
Use it also with more complex expressions. Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2611.htm> Cc: Ingo Schwarze <schwarze@openbsd.org> Cc: JeanHeyd Meneide <wg14@soasis.org> Cc: Martin Uecker <uecker@tugraz.at> Cc: <gcc@gcc.gnu.org> Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
2022-11-10Various pages: SYNOPSIS: Use VLA syntax in function parametersAlejandro Colomar72-147/+186
The WG14 charter for C23 added one principle to the ones in previous standards: [ 15. Application Programming Interfaces (APIs) should be self-documenting when possible. In particular, the order of parameters in function declarations should be arranged such that the size of an array appears before the array. The purpose is to allow Variable-Length Array (VLA) notation to be used. This not only makes the code's purpose clearer to human readers, but also makes static analysis easier. Any new APIs added to the Standard should take this into consideration. ] ISO C doesn't allow using VLA syntax when the parameter used for the size of the array is declared _after_ the parameter that is a VLa. That's a minor issue that could be easily changed in the language without backwards-compatibility issues, and in fact it seems to have been proposed, and not yet discarded, even if it's not going to change in C23. Since the manual pages SYNOPSIS are not bounded by strict C legal syntax, but we already use some "tricks" to try to convey the most information to the reader even if it might not be the most legal syntax, we can also make a small compromise in this case, using illegal syntax (at least not yet legalized) to add important information to the function prototypes. If we're lucky, compiler authors, and maybe even WG14 members, may be satisfied by the syntax used in these manual pages, and may decide to implement this feature to the language. It seems to me a sound syntax that isn't ambiguous, even if it deviates from the common pattern in C that declarations _always_ come before use. But it's a reasonable tradeoff. This change will make the contract between the programmer and the implementation clearer just by reading a prototype. For example, size_t strlcpy(char *restrict dst, const char *restrict src, size_t size); vs size_t strlcpy(char dst[restrict .size], const char *restrict src, size_t size); the second prototype above makes it clear that the 'dst' buffer will be safe from overflow, but the 'src' one clearly needs to be NUL-terminated, or it might cause UB, since nothing tells the function how long it is. Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2611.htm> Cc: Ingo Schwarze <schwarze@openbsd.org> Cc: JeanHeyd Meneide <wg14@soasis.org> Cc: Martin Uecker <uecker@tugraz.at> Cc: <gcc@gcc.gnu.org> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2022-11-10lint-man.mk: lint-man-mandoc: Silence warnings about unsupported tbl(1) featuresAlejandro Colomar1-0/+1
It's bad that the features are not supported, but we can do nothing about it but wait. Let's silence the warnings. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-10lint-man.mk: lint-man-mandoc: Silence warnings about empty UR blocksAlejandro Colomar1-0/+1
That's a perfectly fine man(7) construct. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-10lint-man.mk: lint-man-mandoc: Silence warnings about lowercase in THAlejandro Colomar1-0/+1
The warning will be removed soon, since Ingo, Branden, and I agreed to move forward to a better letter case in the page title. Let's just ignore it while it still exists. Cc: Ingo Schwarze <schwarze@openbsd.org> Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-10lint-man.mk: lint-man-mandoc: Silence warnings about the dateAlejandro Colomar1-1/+5
Yes, mandoc(1), I know the date is not a date, it's a placeholder to be filled at 'make dist' time. Let's be friends :) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-10lint-man.mk: lint-man-groff: Prefix error message with file nameAlejandro Colomar1-1/+1
Otherwise, it's a bit unreadable, and sometimes looks like an error in the linter. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-10ioctl_tty.2: ffixAlejandro Colomar1-2/+4
Reported-by: lint-man-mandoc - mandoc(1) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-10errno.3: srcfixAlejandro Colomar1-3/+3
Reported-by: lint-man-groff - groff(1) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-05Various pages: Replace noreturn by [[noreturn]]Alejandro Colomar7-12/+12
ISO C23 will declare the noreturn macro and the _Noreturn function specifier as obsolescent features. They are replaced by the C++-compatible [[noreturn]] attribute. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-05nsswitch.conf.5: Current glibc reloads this configuration fileFlorian Weimer1-5/+7
The implementation happened across multiple glibc commits, but the work was completed for glibc 2.33. Signed-off-by: Florian Weimer <fweimer@redhat.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-01madvise.2: add documentation for MADV_COLLAPSEZach O'Keefe2-2/+99
Linux 6.1 introduced MADV_COLLAPSE in upstream commit 7d8faaf15545 ("mm/madvise: introduce MADV_COLLAPSE sync hugepage collapse") and upstream commit 34488399fa08 ("mm/madvise: add file and shmem support to MADV_COLLAPSE"). Update the man-pages for madvise(2) and process_madvise(2). Link: https://lore.kernel.org/linux-mm/20220922224046.1143204-1-zokeefe@google.com/ Link: https://lore.kernel.org/linux-mm/20220706235936.2197195-1-zokeefe@google.com/ Signed-off-by: Zach O'Keefe <zokeefe@google.com> [ alx: Change use of hyphens in 3-word compound adjective ] Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-01keyrings.7: tfix hexadecimal number prefixGrzegorz Szymaszek1-1/+1
In the DESCRIPTION, where the Permissions column of /proc/keys is explained, the 0x02 value was written as Ox02. In case one cannot spot the difference: the first character was letter o (U+004F), while it should be digit zero (U+0030). It seems the source tree does not contain any other "Ox" instances except at the beginning of "Oxford". Signed-off-by: Grzegorz Szymaszek <gszymaszek@short.pl> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-31CONTRIBUTING: tfixAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-31madvise.2: srcfixAlejandro Colomar1-1/+1
Reported-by: 'make lint-man-groff' Cc: Zach O'Keefe <zokeefe@google.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-31process_madvise.2: fix capability and ptrace requirementsZach O'Keefe1-4/+17
The initial commit of process_madvise(2) to Linux, commit ecb8ac8b1f14 ("mm/madvise: introduce process_madvise() syscall: an external memory hinting API"), relied on PTRACE_MODE_ATTACH_FSCREDS (see ptrace(2)), but was amended by commit 96cfe2c0fd23 ("mm/madvise: replace ptrace attach requirement for process_madvise") which replaced this with a combination of PTRACE_MODE_READ and CAP_SYS_NICE (PTRACE_MODE_READ to prevent leaking ASLR metadata and CAP_SYS_NICE for influencing process performance). The initial commit of process_madvise(2) to man-pages project, made after the second patch, included two errors: 1) CAP_SYS_ADMIN instead of CAP_SYS_NICE 2) PTRACE_MODE_READ_REALCREDS instead of PTRACE_MODE_READ_FSCREDS Correct this in the man-page for process_madvise(2). Fixes: a144f458b ("process_madvise.2: Document process_madvise(2)") Cc: Minchan Kim <minchan@kernel.org> Signed-off-by: Zach O'Keefe <zokeefe@google.com> Reviewed-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-31build-src.mk: Fix use of variable containing a regexAlejandro Colomar1-1/+1
The variable already contains the $ anchor. Don't repeat it. Fixes: 15c80a5081ea "src.mk: Fix regex for manual page files" Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-31CONTRIBUTING: Add Lint subsectionAlejandro Colomar1-0/+32
Detail how linters can be run effectively by contributors. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-31errno.3: tfixAlejandro Colomar1-1/+1
Reported-by: Jun Ishiguro <algon.0320@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-31Changes: Use a placeholder for the locationAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-31INSTALL: Rewrite and expandAlejandro Colomar1-14/+177
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-31RELEASE: Add Files, Versions, Caveats, and Description::DependenciesAlejandro Colomar1-0/+56
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-31RELEASE: Reformat like a manual pageAlejandro Colomar1-96/+103
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-30get_nprocs.3, get_nprocs_conf.3, program_invocation_name.3, sysvipc.7: Match ↵Alejandro Colomar4-98/+98
page title with file name and NAME section Manually tweak a few pages that weren't covered by the scripts used in the 2 previous commits. On 10/30/22 23:00, G. Branden Robinson wrote: > For those to whom this change is coming as an unpleasant surprise, the > forthcoming groff 1.23.0 features an option that will reverse this > change at rendering time. > > From groff_man(7): > > -rCT=1 Capitalize titles, setting the man page title (the first > argument to .TH) in full capitals in headers and footers. > This transformation is off by default because it discards > case distinction information. > > This register can also be set in a site-local "man.local" file to force > it on for all pages. On Debian-based systems, this file is in > /etc/groff. The following line will do the trick. > > .nr CT 1 > > The groff_man_style(7) man page offers further examples of such > rendering customization. > > /usr/local/share/groff/site-tmac/man.local > Put site‐local changes and customizations into this file. > > .\" Use narrower indentation on terminals and similar. > .if n .nr IN 4n > .\" Put only one space after the end of a sentence. > .ss 12 0 \" See groff(7). > .\" Keep pages narrow even on wide terminals. > .if n .if \n[LL]>78n .nr LL 78n > .\" Ensure hyperlinks are enabled for terminals. > .nr U 1 > > On multi‐user systems, it is more considerate to users whose > preferences may differ from the administrator’s to be less > aggressive with such settings, or to permit their override > with a user‐specific man.local file. This can be achieved by > placing one or both of following requests at the end of the > site‐local file. > .soquiet \V[XDG_CONFIG_HOME]/man.local > .soquiet \V[HOME]/.man.local > However, a security‐sandboxed man(1) program may lack > permission to open such files. Cc: Ingo Schwarze <schwarze@openbsd.org> Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-30Various pages: Use correct letter case in page titles (TH)Alejandro Colomar8-8/+8
Semi-scripted change: $ find man* -type f \ | xargs grep -L '\.so' \ | while read f; do P=$(basename $f); T=$(grep '\.TH ' $f | cut -f2,3 -d' ' | sed 's/ /./'); p=$(echo $P | tr '[:upper:]' '[:lower:]'); t=$(echo $T | tr '[:upper:]' '[:lower:]'); Tn=$(echo $T | sed 's/\.[^.]\+$//') Pn=$(echo $P | sed 's/\.[^.]\+$//') N=$(man_section $f NAME \ | sed -n '/NAME/,/ - /p' \ | sed 's/ - .*//' \ | grep -v '^NAME$' \ | tr ', ' '\n' \ | grep -i "^$Pn$" \ | head -n1) test $P = $T \ && test -n $N \ && continue; if test "x$p" != "x$t"; then echo 1 $P $T $N; elif test -z "$N"; then sed -i "/\.TH /s/$Tn/$Pn/" $f; fi; done; Most of the changes produced by this script needed to be reverted, but the some of them were good. On 10/30/22 23:00, G. Branden Robinson wrote: > For those to whom this change is coming as an unpleasant surprise, the > forthcoming groff 1.23.0 features an option that will reverse this > change at rendering time. > > From groff_man(7): > > -rCT=1 Capitalize titles, setting the man page title (the first > argument to .TH) in full capitals in headers and footers. > This transformation is off by default because it discards > case distinction information. > > This register can also be set in a site-local "man.local" file to force > it on for all pages. On Debian-based systems, this file is in > /etc/groff. The following line will do the trick. > > .nr CT 1 > > The groff_man_style(7) man page offers further examples of such > rendering customization. > > /usr/local/share/groff/site-tmac/man.local > Put site‐local changes and customizations into this file. > > .\" Use narrower indentation on terminals and similar. > .if n .nr IN 4n > .\" Put only one space after the end of a sentence. > .ss 12 0 \" See groff(7). > .\" Keep pages narrow even on wide terminals. > .if n .if \n[LL]>78n .nr LL 78n > .\" Ensure hyperlinks are enabled for terminals. > .nr U 1 > > On multi‐user systems, it is more considerate to users whose > preferences may differ from the administrator’s to be less > aggressive with such settings, or to permit their override > with a user‐specific man.local file. This can be achieved by > placing one or both of following requests at the end of the > site‐local file. > .soquiet \V[XDG_CONFIG_HOME]/man.local > .soquiet \V[HOME]/.man.local > However, a security‐sandboxed man(1) program may lack > permission to open such files. Cc: Ingo Schwarze <schwarze@openbsd.org> Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-30Many pages: Use correct letter case in page titles (TH)Alejandro Colomar986-986/+986
Scripted change: $ find man* -type f \ | xargs grep -L '\.so' \ | while read f; do P=$(basename $f); T=$(grep '\.TH ' $f | cut -f2,3 -d' ' | sed 's/ /./'); p=$(echo $P | tr '[:upper:]' '[:lower:]'); t=$(echo $T | tr '[:upper:]' '[:lower:]'); Tn=$(echo $T | sed 's/\.[^.]\+$//') Pn=$(echo $P | sed 's/\.[^.]\+$//') N=$(man_section $f NAME \ | sed -n '/NAME/,/ - /p' \ | sed 's/ - .*//' \ | grep -v '^NAME$' \ | tr ', ' '\n' \ | grep -i "^$Pn$" \ | head -n1) test $P = $T \ && test -n $N \ && continue; if test "x$p" != "x$t"; then echo 1 $P $T $N; elif test -z "$N"; then echo 2 $P $T $N; else sed -i "/\.TH /s/$Tn/$N/" $f; fi; done; On 10/30/22 23:00, G. Branden Robinson wrote: > For those to whom this change is coming as an unpleasant surprise, the > forthcoming groff 1.23.0 features an option that will reverse this > change at rendering time. > > From groff_man(7): > > -rCT=1 Capitalize titles, setting the man page title (the first > argument to .TH) in full capitals in headers and footers. > This transformation is off by default because it discards > case distinction information. > > This register can also be set in a site-local "man.local" file to force > it on for all pages. On Debian-based systems, this file is in > /etc/groff. The following line will do the trick. > > .nr CT 1 > > The groff_man_style(7) man page offers further examples of such > rendering customization. > > /usr/local/share/groff/site-tmac/man.local > Put site‐local changes and customizations into this file. > > .\" Use narrower indentation on terminals and similar. > .if n .nr IN 4n > .\" Put only one space after the end of a sentence. > .ss 12 0 \" See groff(7). > .\" Keep pages narrow even on wide terminals. > .if n .if \n[LL]>78n .nr LL 78n > .\" Ensure hyperlinks are enabled for terminals. > .nr U 1 > > On multi‐user systems, it is more considerate to users whose > preferences may differ from the administrator’s to be less > aggressive with such settings, or to permit their override > with a user‐specific man.local file. This can be achieved by > placing one or both of following requests at the end of the > site‐local file. > .soquiet \V[XDG_CONFIG_HOME]/man.local > .soquiet \V[HOME]/.man.local > However, a security‐sandboxed man(1) program may lack > permission to open such files. Cc: Ingo Schwarze <schwarze@openbsd.org> Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-30madvise.2: document reliable probe for advice supportZach O'Keefe1-0/+5
EINVAL is an overloaded error code for madvise(2) and it's not clear under what context it means "advice is not valid" vs another error. Explicitly document that madvise(0, 0, advice) can reliably be used to probe for kernel support for "advice", returning zero iff "advice" is supported by the kernel. Signed-off-by: Zach O'Keefe <zokeefe@google.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-30madvise.2: update THP file/shmem documentation for +5.4Zach O'Keefe1-3/+36
Since Linux 5.4, Transparent Huge Pages now support both file-backed memory and shmem memory. Update MADV_HUGEPAGE advice description to reflect this. Additionally, expand the description of requirements for memory to be considered eligible for THP: alignment / mapping requirements, VMA flags, prctl(2) settings, inode status, etc. Signed-off-by: Zach O'Keefe <zokeefe@google.com> [ alx: ffix ] Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-30FILE.3type: Move page to correct subsectionAlejandro Colomar1-3/+4
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-30Change alx's email addressAlejandro Colomar61-67/+67
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-29ioctl_tty.2: Document TIOCSERGETLSR/TIOCSER_TEMTPali Rohár1-1/+15
Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-29man-pages.7: Document how to write listsAlejandro Colomar1-0/+58
Reported-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Douglas McIlroy <douglas.mcilroy@dartmouth.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-29Many pages: Use a consistent style for listsAlejandro Colomar169-1408/+1408
There are different kinds of lists: Tagged paragraphs These are fixed in a separate commit (the previous one). They are used for a list of tags and their descriptions. An example is this commit message itself. Ordered lists Elements are preceeded by a number in parentheses. These represent a set of steps that have an order. When there are substeps, they will be numbered like (4.2). Positional lists Elements are preceeded by a number in square brackets (index). These represent fields in a set. The index will start at: 0 fields of a C data structure, to be consistent with arrays. 1 fields of a file, to be consistent with tools like cut(1). Alternatives list Elements are preceeded by a letter in parentheses. These represent a set of (normally) exclusive alternatives. Bullet lists Elements are preceeded by bullet symbols. Anything that doesn't fit elsewhere usually is covered by this type of list. Notes Not really a list, but the syntax is identical to "positional lists". There should always be 2 spaces between the list symbol and the elements. This doesn't apply to "tagged paragraphs", which use the default indentation rules. Reported-by: Mike Frysinger <vapier@gentoo.org> Cc: <groff@gnu.org> Acked-by: Douglas McIlroy <douglas.mcilroy@dartmouth.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-29Many pages: Use .TP for tagged paragraphsAlejandro Colomar32-258/+441
Reported-by: Mike Frysinger <vapier@gentoo.org> Cc: <groff@gnu.org> Acked-by: Douglas McIlroy <douglas.mcilroy@dartmouth.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-25ascii.7: Chase down History to earliestнаб1-3/+1
Cf., well, the UNIX Programmer's Manual: https://www.tuhs.org/Archive/Distributions/Research/Dennis_v1/UNIX_ProgrammersManual_Nov71.pdf PDF page 191; yes, the typographical convention here is insane, and the contemprary-correct way to refer to this page from within the manual would be /just/ "/etc/ascii", but, given the context, "/etc/ascii (VII)" makes the most sense to me Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-25st.4: srcfixAlejandro Colomar1-4/+4
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-23capabilities.7: ffixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-23cpuset.7: tfixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-23locale.7: srcfixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-23man-pages.7: ffixAlejandro Colomar1-15/+17
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-23src.mk: Fix regex for manual page filesAlejandro Colomar1-1/+1
Without the $, vim(1) temporary files are also found. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-22man-pages.7: Use . consistently in bulleted listMike Frysinger1-1/+1
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-22man-pages.7: Add missing . before macroMike Frysinger1-1/+1
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-21CONTRIBUTING: Rewrite and expandAlejandro Colomar1-29/+166
Put most of the relevant information from the website in the repo. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-21dist.mk: Force adding version to tarball man pagesat 'make dist'Alejandro Colomar1-1/+1
When creating a tarball with 'make dist', force the addition of the date and version to the pages. Otherwise, if a tarball had already been created from a previous commit, and the page hasn't been touched, make will consider the one in the tarball up-to-date, and will keep the old version. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-21RELEASE: tfixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-21Makefile: Remove unnecessary includeAlejandro Colomar1-3/+0
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-21Makefile: Remove installdirs* and builddirs* targetsAlejandro Colomar10-61/+9
Since our makefiles correctly state the dependencies of all targets, and allow fully-parallel builds and installs, there's no reason at all to allow creating the directories separately. That was an old recommendation for when makefiles were buggy, and you couldn't fully trust in them not having races or incorrect dependencies. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-20README: tfixAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-20RELEASE: ffixAlejandro Colomar1-5/+5
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-20README, RELEASE, lsm: Rename man-pages.lsm to lsmAlejandro Colomar3-6/+6
It's obvious that it belongs to man-pages, since it's inside the repository tree. Also, since the file is emailed to the LSM project, it doesn't matter what name we give to it. Let's simplify the name. Now only MANDIRS start with 'man*', which is a good thing. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-20README: Remove version from LSM file nameAlejandro Colomar1-1/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-20RELEASE, man-pages.lsm: Remove version from LSM file nameAlejandro Colomar2-10/+5
It's not necessary, and removing it simplifies maintenance. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-20RELEASE, man-pages-6.01.Announce: Remove .Announce fileAlejandro Colomar2-86/+6
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-10-20README: Rewrite and expandAlejandro Colomar1-15/+89
Let's start making the repository self-contained. The README should be enough to guide a user into everything that has to do with the project. The website should be a secondary source, for those who don't know about the repository yet. I merged some of the information found in the .Announce file, which I'll remove. Signed-off-by: Alejandro Colomar <alx@kernel.org>