]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
5 weeks agobpf-helpers.7: Refresh page
Alejandro Colomar [Sat, 16 Mar 2024 21:57:05 +0000 (22:57 +0100)] 
bpf-helpers.7: Refresh page

Scripted change:

$ ~/src/linux/linux/6.8/scripts/bpf_doc.py | rst2man > man7/bpf-helpers.7

Signed-off-by: Alejandro Colomar <alx@kernel.org>
5 weeks agogetgrouplist.3: Use same type in both sides of comparison
Alejandro Colomar [Sat, 16 Mar 2024 01:01:20 +0000 (02:01 +0100)] 
getgrouplist.3: Use same type in both sides of comparison

This removes a warning.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
5 weeks agounix.7: EXAMPLES: server.c: End connection with END
Lili Püspök [Wed, 6 Mar 2024 20:02:47 +0000 (21:02 +0100)] 
unix.7: EXAMPLES: server.c: End connection with END

Client wants to send END while server already closed the connection on
DOWN, so connection is broken instead of the Result = 0 in the sample on
sending a single DOWN.
Now, the server disconnects only on first END. After DOWN, all further
processing of number stops.
Patch does not handle cases of double END sending, multiple clients etc.

Fixes: 15545eb6d7ae ("unix.7: Add example")
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Lili Püspök <poordirtylili@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
5 weeks agoprintf.3: Return the number of bytes printed, not characters
Jeremy Baxter [Fri, 15 Mar 2024 01:07:14 +0000 (14:07 +1300)] 
printf.3: Return the number of bytes printed, not characters

From <https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html>:

    Upon successful completion, the dprintf(), fprintf(), and printf()
    functions shall return the number of bytes transmitted.

Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=218600>
Reported-by: <quirin.blaeser@freenet.de>
Signed-off-by: Jeremy Baxter <jtbx@disroot.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agoutf-8.7: ffix
Alejandro Colomar [Thu, 14 Mar 2024 16:44:12 +0000 (17:44 +0100)] 
utf-8.7: ffix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agoutf-8.7: ffix
Samanta Navarro [Thu, 14 Mar 2024 12:22:42 +0000 (12:22 +0000)] 
utf-8.7: ffix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agoprintf.h.3head: tfix
Samanta Navarro [Thu, 14 Mar 2024 12:21:50 +0000 (12:21 +0000)] 
printf.h.3head: tfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agogetrusage.2, proc_pid_io.5: Crosslink
наб [Wed, 13 Mar 2024 14:26:54 +0000 (15:26 +0100)] 
getrusage.2, proc_pid_io.5: Crosslink

These serve the same purpose from different perspectives.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agogetrusage.2: proc(5) /proc/pid/stat -> proc_pid_stat(5)
наб [Wed, 13 Mar 2024 14:26:52 +0000 (15:26 +0100)] 
getrusage.2: proc(5) /proc/pid/stat -> proc_pid_stat(5)

Fixes: bbc21bc4dbef ("proc.5, proc_pid_stat.5: Split /proc/PID/stat from proc(5)")
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agoproc_pid_io.5: Mention atomicity in atomicity note
наб [Wed, 13 Mar 2024 14:26:50 +0000 (15:26 +0100)] 
proc_pid_io.5: Mention atomicity in atomicity note

And drop "current implementation"
(wording still literal from Documentation/filesystems/proc.rst).
Of course this describes the current implementation.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agoproc_pid_io.5: wfix
наб [Wed, 13 Mar 2024 14:26:48 +0000 (15:26 +0100)] 
proc_pid_io.5: wfix

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agoscripts/LinuxManBook/build.sh, share/mk/: Use command variables
Alejandro Colomar [Tue, 12 Mar 2024 17:45:42 +0000 (18:45 +0100)] 
scripts/LinuxManBook/build.sh, share/mk/: Use command variables

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agologb.3: floor(log2(fabs(x))) has rounding errors
Alejandro Colomar [Tue, 12 Mar 2024 17:25:17 +0000 (18:25 +0100)] 
logb.3: floor(log2(fabs(x))) has rounding errors

Link: <https://inbox.sourceware.org/libc-alpha/20240305150131.GD3653@qaa.vinc17.org/T/#m3ceecda630012995339bcc5448fee451cf277a8b>
Reported-by: Vincent Lefevre <vincent@vinc17.net>
Suggested-by: Vincent Lefevre <vincent@vinc17.net>
Cc: Morten Welinder <mwelinder@gmail.com>
Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agoscripts/LinuxManBook/prepare.pl: Support some autogenerated pages from other projects
Deri [Tue, 12 Mar 2024 13:46:24 +0000 (14:46 +0100)] 
scripts/LinuxManBook/prepare.pl: Support some autogenerated pages from other projects

And remove a warning about an experimental perl feature, by using a
while instead of a for loop.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agoTIMESPEC_TO_TIMEVAL.3, TIMEVAL_TO_TIMESPEC.3: Document these macros
Alejandro Colomar [Thu, 7 Mar 2024 02:21:28 +0000 (03:21 +0100)] 
TIMESPEC_TO_TIMEVAL.3, TIMEVAL_TO_TIMESPEC.3: Document these macros

Reported-by: Guillem Jover <guillem@hadrons.org>
Reviewed-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agoshare/mk/configure/build-depends/cc.mk: Use -Wno-unsafe-buffer-usage with clang(1)
Alejandro Colomar [Thu, 7 Mar 2024 01:58:50 +0000 (02:58 +0100)] 
share/mk/configure/build-depends/cc.mk: Use -Wno-unsafe-buffer-usage with clang(1)

That warning has false positives, such as in unix(7).

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agounix.7: Use a 'ssize_t' for the return value of read(2) and write(2)
Alejandro Colomar [Wed, 6 Mar 2024 11:25:26 +0000 (12:25 +0100)] 
unix.7: Use a 'ssize_t' for the return value of read(2) and write(2)

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agounix.7: Use 'int' to iterate over 'argv'
Alejandro Colomar [Wed, 6 Mar 2024 11:23:32 +0000 (12:23 +0100)] 
unix.7: Use 'int' to iterate over 'argv'

'argc' is an 'int', so we should compare it with a variable of the same
type.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agounix.7: Use int main(void)
Alejandro Colomar [Wed, 6 Mar 2024 11:22:10 +0000 (12:22 +0100)] 
unix.7: Use int main(void)

The arguments were unused.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agounix.7: Remove spurious #include
Alejandro Colomar [Wed, 6 Mar 2024 11:21:37 +0000 (12:21 +0100)] 
unix.7: Remove spurious #include

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agounix.7: Build example programs
Alejandro Colomar [Wed, 6 Mar 2024 11:20:46 +0000 (12:20 +0100)] 
unix.7: Build example programs

Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agoread.2: tfix
Hugo Gabriel Eyherabide [Tue, 5 Mar 2024 05:14:06 +0000 (07:14 +0200)] 
read.2: tfix

Signed-off-by: Hugo Gabriel Eyherabide <hugogabiel.eyherabide@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agolog2.3, log10.3: wfix
Alejandro Colomar [Tue, 5 Mar 2024 01:15:14 +0000 (02:15 +0100)] 
log2.3, log10.3: wfix

Reported-by: Morten Welinder <mwelinder@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agocbrt.3: wfix: Cube roots are rarely representable
Alejandro Colomar [Tue, 5 Mar 2024 01:01:34 +0000 (02:01 +0100)] 
cbrt.3: wfix: Cube roots are rarely representable

On Thu, Feb 29, 2024 at 07:28:10PM -0500, Morten Welinder wrote:
> The phrase "every representable real value has a representable real
> cube root" is wrong.  In fact, a representable cube root is quite
> rare.

Link: <https://lore.kernel.org/linux-man/ZeYKUOKYS7G90SaV@debian/T/#mff0ab388000c6afdb5e5162804d4a0073de481de>
Reported-by: Morten Welinder <mwelinder@gmail.com>
Cowritten-by: Morten Welinder <mwelinder@gmail.com>
Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: Vincent Lefevre <vincent@vinc17.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agosignificand.3: significand() uses FLT_RADIX, not 2
Alejandro Colomar [Tue, 5 Mar 2024 00:44:44 +0000 (01:44 +0100)] 
significand.3: significand() uses FLT_RADIX, not 2

It's implemented using scalb(), which uses FLT_RADIX.

Reported-by: Morten Welinder <mwelinder@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agologb.3: logb(x) is floor(log2(fabs(x)))
Alejandro Colomar [Mon, 4 Mar 2024 23:20:09 +0000 (00:20 +0100)] 
logb.3: logb(x) is floor(log2(fabs(x)))

log2(3) doesn't accept negative input, but it seems logb(3) does accept
it.

Link: <https://lore.kernel.org/linux-man/ZeYKUOKYS7G90SaV@debian/T/#u>
Reported-by: Morten Welinder <mwelinder@gmail.com>
Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: Vincent Lefevre <vincent@vinc17.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
6 weeks agoshare/mk/: dist: Don't package .git/
Alejandro Colomar [Sun, 10 Mar 2024 13:55:54 +0000 (14:55 +0100)] 
share/mk/: dist: Don't package .git/

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 weeks agoclock_getres.2: HISTORY: Clarify that POSIX.1-2008 only makes mandatory the functions
Alejandro Colomar [Mon, 4 Mar 2024 12:02:29 +0000 (13:02 +0100)] 
clock_getres.2: HISTORY: Clarify that POSIX.1-2008 only makes mandatory the functions

The different clocks are still optional.

Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=218452>
Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Reported-by: Enrique Garcia <cquike@arcor.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 weeks agocgroups.7: tfix
Alejandro Colomar [Mon, 4 Mar 2024 11:45:24 +0000 (12:45 +0100)] 
cgroups.7: tfix

Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=218105>
Reported-by: Göran Uddeborg <goeran@uddeborg.se>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 weeks agoshare/mk/: Add missing include
Alejandro Colomar [Mon, 4 Mar 2024 11:43:42 +0000 (12:43 +0100)] 
share/mk/: Add missing include

Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 weeks agoclock_nanosleep.2: Use 't' rather than 'request'
Alejandro Colomar [Tue, 5 Mar 2024 01:22:46 +0000 (02:22 +0100)] 
clock_nanosleep.2: Use 't' rather than 'request'

It seems much more clear.

Cc: Elliott Hughes <enh@google.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Cc: Bruno Haible <bruno@clisp.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 weeks agonanosleep.2: Use 'duration' rather than 'request'
Alejandro Colomar [Sun, 3 Mar 2024 12:01:57 +0000 (13:01 +0100)] 
nanosleep.2: Use 'duration' rather than 'request'

It seems much more clear.

Suggested-by: Elliott Hughes <enh@google.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Cc: Bruno Haible <bruno@clisp.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
7 weeks agoman*/: epoll_*(), fcntl(), flock(), ioctl(), msgctl(), *prctl(), ptrace(), quotactl...
Alejandro Colomar [Tue, 31 Oct 2023 21:36:33 +0000 (22:36 +0100)] 
man*/: epoll_*(), fcntl(), flock(), ioctl(), msgctl(), *prctl(), ptrace(), quotactl(), reboot(), semctl(), shmctl(), lockf(): Consistently use 'op' and 'operation'

Reported-by: Bruno Haible <bruno@clisp.org>
Cc: Elliott Hughes <enh@google.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 weeks agoChanges.old: tfix
Jakub Wilk [Wed, 28 Feb 2024 19:08:28 +0000 (20:08 +0100)] 
Changes.old: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 weeks agoshare/mk/: distcheck: Rewrite most of it
Alejandro Colomar [Wed, 28 Feb 2024 12:44:42 +0000 (13:44 +0100)] 
share/mk/: distcheck: Rewrite most of it

This implementation is simpler.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 weeks agoshare/mk/: build-ex-src: Support long $DISTNAME
Alejandro Colomar [Wed, 28 Feb 2024 12:49:55 +0000 (13:49 +0100)] 
share/mk/: build-ex-src: Support long $DISTNAME

When $DISTNAME is too long, mandoc(1) breaks the last line.  The last
two lines can always be removed safely, which makes it work also in this
case.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 weeks agoshare/mk/: Fix path
Alejandro Colomar [Wed, 28 Feb 2024 10:42:17 +0000 (11:42 +0100)] 
share/mk/: Fix path

Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 weeks agoprocess_madvise.2: Fix comments about commit ids
Alejandro Colomar [Tue, 27 Feb 2024 23:10:23 +0000 (00:10 +0100)] 
process_madvise.2: Fix comments about commit ids

Move the comment about the Linux commit id, specify that it's a Linux
commit, and add the glibc commit id too.

Link: <https://sourceware.org/bugzilla/show_bug.cgi?id=27380>
Link: <https://lore.kernel.org/linux-man/Zd5fMGvIlmhQyONs@thunder.hadrons.org/T/#m9129640e1293a94ff1606a2f973522f40c968306>
Fixes: 28628d826661 ("process_madvise.2: Document the glibc wrapper")
Reported-by: Guillem Jover <guillem@hadrons.org>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 weeks agoCONTRIBUTING.d/lint: Rewrite now that we have $SKIP_XFAIL
Alejandro Colomar [Mon, 26 Feb 2024 17:00:43 +0000 (18:00 +0100)] 
CONTRIBUTING.d/lint: Rewrite now that we have $SKIP_XFAIL

Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 weeks agoshare/mk/, man*/: build-ex: Skip expected failures
Alejandro Colomar [Mon, 26 Feb 2024 13:14:02 +0000 (14:14 +0100)] 
share/mk/, man*/: build-ex: Skip expected failures

Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 weeks agoetc/cppcheck/cppcheck.suppress: Silence report
Alejandro Colomar [Mon, 26 Feb 2024 12:28:54 +0000 (13:28 +0100)] 
etc/cppcheck/cppcheck.suppress: Silence report

Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 weeks agoshare/mk/, etc/: Fix dependencies
Alejandro Colomar [Mon, 26 Feb 2024 12:28:29 +0000 (13:28 +0100)] 
share/mk/, etc/: Fix dependencies

Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 weeks agoshare/mk/: lint-c: Skip expected failures
Alejandro Colomar [Mon, 26 Feb 2024 11:50:34 +0000 (12:50 +0100)] 
share/mk/: lint-c: Skip expected failures

Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 weeks agoman3/: Say cancelation instead of cancellation
Alejandro Colomar [Mon, 26 Feb 2024 11:48:32 +0000 (12:48 +0100)] 
man3/: Say cancelation instead of cancellation

It's the most common spelling in this project.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
8 weeks agoshare/mk/: $SKIP_XFAIL: Add variable to allow skipping expected failures
Alejandro Colomar [Mon, 26 Feb 2024 10:30:45 +0000 (11:30 +0100)] 
share/mk/: $SKIP_XFAIL: Add variable to allow skipping expected failures

Default to 'yes'.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: distcheck: string_copying.7 fails 'check-catman'
Alejandro Colomar [Mon, 26 Feb 2024 02:32:07 +0000 (03:32 +0100)] 
share/mk/: distcheck: string_copying.7 fails 'check-catman'

Except with groff(1) from git HEAD, which will be 1.24.0 eventually.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agombsrtowcs.3: ffix
Alejandro Colomar [Sun, 25 Feb 2024 22:20:18 +0000 (23:20 +0100)] 
mbsrtowcs.3: ffix

With groff-1.23.0, which has a base paragraph indentation of 7, this
line was longer than 80 columns.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/configure/version.mk: $DISTDATECMD: Use committer date, not author date
Alejandro Colomar [Mon, 26 Feb 2024 00:10:41 +0000 (01:10 +0100)] 
share/mk/configure/version.mk: $DISTDATECMD: Use committer date, not author date

Comitter date is always increasing, while author date may jump
backwards, which is problematic with make(1).

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: Simplify code
Alejandro Colomar [Sun, 25 Feb 2024 23:26:55 +0000 (00:26 +0100)] 
share/mk/: Simplify code

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: distcheck: Ignore fanotify_init.2 build errors
Alejandro Colomar [Sun, 25 Feb 2024 17:05:20 +0000 (18:05 +0100)] 
share/mk/: distcheck: Ignore fanotify_init.2 build errors

In groff from git HEAD, it doesn't fail, but in 1.23.0, which still
has the default base paragraph indentation set to 7, it reports

troff:man2/fanotify_init.2:322: warning [p 4, 0.7i]: cannot adjust line

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoman*/: srcfix
Alejandro Colomar [Sun, 25 Feb 2024 15:45:30 +0000 (16:45 +0100)] 
man*/: srcfix

Found with:

$ grep -rn '"""' man* \
| grep -v '"""""""""""' \
| sed 's/:.*//' \
| sort \
| uniq;
man2/add_key.2
man2/getrlimit.2
man2/keyctl.2
man2/pivot_root.2
man2/request_key.2
man3/isalpha.3
man3/setlocale.3
man3/toupper.3
man7/capabilities.7
man7/cgroups.7
man7/keyrings.7
man7/locale.7
man7/user_namespaces.7

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoman*/: ffix
Alejandro Colomar [Sun, 25 Feb 2024 14:56:46 +0000 (15:56 +0100)] 
man*/: ffix

Found with:

$ grep -rn '^\.[BI] .* [.,:;)]*$' man*
man2/prctl.2:382:.B FR=1 .
man2/openat2.2:377:.B EAGAIN .
man2/openat2.2:424:.I how.resolve .
man5/elf.5:788:.B PF_R .
man5/networks.5:18:.I name number aliases ...
man5/protocols.5:31:.I protocol number aliases ...
man7/cgroups.7:980:.I """max""" .

Cc: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: distcheck-*: Add targets to run 'distcheck' partially
Alejandro Colomar [Sun, 25 Feb 2024 13:31:50 +0000 (14:31 +0100)] 
share/mk/: distcheck-*: Add targets to run 'distcheck' partially

This is mainly for debugging purposes.  I won't document it in
'make help' for now, as it will clutter the output, and isn't so useful
for normal users.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agovsock.7: ffix
наб [Tue, 20 Feb 2024 18:11:25 +0000 (19:11 +0100)] 
vsock.7: ffix

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoprocess_madvise.2: Rename parameter, and use array syntax
Alejandro Colomar [Sun, 25 Feb 2024 12:21:20 +0000 (13:21 +0100)] 
process_madvise.2: Rename parameter, and use array syntax

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoprocess_madvise.2: Document the glibc wrapper
Alejandro Colomar [Sun, 25 Feb 2024 12:15:13 +0000 (13:15 +0100)] 
process_madvise.2: Document the glibc wrapper

$ grepc -n process_madvise /usr/include/
/usr/include/x86_64-linux-gnu/bits/mman_ext.h:25:
extern __ssize_t process_madvise (int __pid_fd, const struct iovec *__iov,
  size_t __count, int __advice,
  unsigned __flags)
  __THROW;

Reported-by: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agosigaction.2: HISTORY: Some constants are or were XSI extensions
Alejandro Colomar [Sun, 25 Feb 2024 11:45:32 +0000 (12:45 +0100)] 
sigaction.2: HISTORY: Some constants are or were XSI extensions

Link: <https://lore.kernel.org/linux-man/20240214095707.1824c25c@plasteblaster/T/>
Reported-by: Thomas Orgis <thomas@orgis.org>
Cc: Eric Blake <eblake@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agosigaction.2: HISTORY: SA_NOCLDSTOP wasn't added in POSIX.1-2001
Alejandro Colomar [Sun, 25 Feb 2024 11:25:03 +0000 (12:25 +0100)] 
sigaction.2: HISTORY: SA_NOCLDSTOP wasn't added in POSIX.1-2001

It already existed in POSIX.1-1996, according to just a few lines above.

Link: <https://lore.kernel.org/linux-man/20240214095707.1824c25c@plasteblaster/T/>
Cc: Thomas Orgis <thomas@orgis.org>
Cc: Eric Blake <eblake@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agogetdents.2: Add note to misleading field "d_off" in struct linux_dirent64
Vinícius Schütz Piva [Tue, 13 Feb 2024 16:23:55 +0000 (13:23 -0300)] 
getdents.2: Add note to misleading field "d_off" in struct linux_dirent64

The getdents.2 man page details a pair syscalls: getdents() and
getdents64(), both of which are used to get the entries of a directory.
The results are populated into a structure, with the difference between
both syscalls being mostly bitwidth related.

However, the behaviour or the 'd_off' field in both struct linux_dirent
and linux_dirent64 is wrongly documented in this man page.

According to the current manual page, 'd_off' is used to store the
"Offset to the next linux_dirent [...] the distance from the start of
the directory to the start of the next linux_dirent."

This value, though, is filesystem dependent, and much of the time it
stores no such offset.

According to readdir.3 [1] manpage:

 > The value returned in d_off is the same as would be returned by
 > calling telldir(3) at the current position in the directory stream.
 > Be aware that despite its type and name, the d_off field is seldom
 > any kind of directory offset on modern filesystems.  Applications
 > should treat this field as an opaque value, making no assumptions
 > about its contents; see also telldir(3).

Of course, readdir(3) is a glibc function with no ties to
getdents(2), but it was implemented with such syscall and considering
that readdir(3) doesn't process the data from getdents(2) my belief is
that it inherited said behaviour from it [2].  telldir(3) tells a
similar story.

On the example provided at the end of getdents.2, notable is the d_off
value of the very last entry:

--------------- nread=120 ---------------
inode#    file type  d_reclen  d_off   d_name
       2  directory    16         12  .
       2  directory    16         24  ..
      11  directory    24         44  lost+found
      12  regular      16         56  a
  228929  directory    16         68  sub
   16353  directory    16         80  sub2
  130817  directory    16       4096  sub3

which makes a very sudden jump that is obviously not where the entry is
located.

Rerunning this same example but on a ext4 partition gives you garbage
values:

--------------- nread=176 ---------------
inode#    file type  d_reclen  d_off   d_name
    2050  directory    24 4842312636391754590  sub2
       2  directory    24 4844777444668968292  ..
    2051  directory    24 7251781863886579875  sub3
      12  regular      24 7470722685224223838  a
    2049  directory    24 7653193867028490235  sub
      11  directory    32 7925945214358802294  lost+found
       2  directory    24 9223372036854775807  .

In fact, I've had a hard time reproducing nice d_off values on ext2 too,
so what the filesystem does with d_off must have change since then.

On tmpfs it's a count:

--------------- nread=144 ---------------
inode#    file type  d_reclen  d_off   d_name
       1  directory    24          1  .
       1  directory    24          2  ..
       5  directory    24          3  sub3
       4  directory    24          4  sub2
       3  directory    24          5  sub
       2  regular      24          6  a

I've also not been the first to notice this, as you can see from this
stackoverflow issue opened last year:

https://stackoverflow.com/q/75119224

Safe to say, it's a very unreliable field.

Below is a patch that adds a warning besides the d_off field in both
structures, plus a brief explanation on why this field can be mislea-
ding (while also directing the user towards the readdir.3 man page).

Link: [1] <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/man3/readdir.3>
Link: [2] <https://elixir.bootlin.com/glibc/glibc-2.39/source/sysdeps/unix/sysv/linux/readdir.c>
Signed-off-by: Vinícius Schütz Piva <vinicius.vsczpv@outlook.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: srcfix
Alejandro Colomar [Sun, 25 Feb 2024 10:10:51 +0000 (11:10 +0100)] 
share/mk/: srcfix

Use a variable for the options passed to recursive make(1), to avoid
repetition.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: dist: Show CP instead of INSTALL
Alejandro Colomar [Sat, 24 Feb 2024 00:19:43 +0000 (01:19 +0100)] 
share/mk/: dist: Show CP instead of INSTALL

We're using install(1), but it's just an implementation detail.
Since we're not installing into the system, CP is less confusing.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: dist: FORCE regeneration of version file if necessary
Alejandro Colomar [Sat, 24 Feb 2024 00:15:13 +0000 (01:15 +0100)] 
share/mk/: dist: FORCE regeneration of version file if necessary

If any of $DISTVERSION, $DISTNAME, or $DISTDATE have changed since the
last 'make dist', force regeneration of the version file, even if it
wouldn't change due to normal dependencies.  This makes sure that the
tarball has correct values.

It doesn't need to depend on all $DISTFILES.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: $DISTDATE: If the repository is "dirty", use the newest timestamp
Alejandro Colomar [Sat, 24 Feb 2024 00:10:35 +0000 (01:10 +0100)] 
share/mk/: $DISTDATE: If the repository is "dirty", use the newest timestamp

Otherwise, the files within the 'dist' tarball will have a timestamp
older than their last actual modification, which is problematic with
'distcheck'.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: dist: Preserve links with cp(1)
Alejandro Colomar [Fri, 23 Feb 2024 21:07:31 +0000 (22:07 +0100)] 
share/mk/: dist: Preserve links with cp(1)

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: Consistently use 'cp -T'
Alejandro Colomar [Fri, 23 Feb 2024 21:04:31 +0000 (22:04 +0100)] 
share/mk/: Consistently use 'cp -T'

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/configure/version.mk: $DISTNAME: Pass --dirty to git-describe(1)
Alejandro Colomar [Fri, 23 Feb 2024 14:38:59 +0000 (15:38 +0100)] 
share/mk/configure/version.mk: $DISTNAME: Pass --dirty to git-describe(1)

This makes sure we don't accidentally produce release tarballs from a
dirty repository.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/configure/version.mk: $DISTNAME: Don't hide git(1) errors
Alejandro Colomar [Fri, 23 Feb 2024 14:30:23 +0000 (15:30 +0100)] 
share/mk/configure/version.mk: $DISTNAME: Don't hide git(1) errors

We don't call git(1) inside tarballs anymore to get the $DISTNAME, so we
can safely assume that git(1) should never fail, and if it fails, we
better get an error message.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: distcheck: Remove old directory before untarring the new tarball
Alejandro Colomar [Thu, 22 Feb 2024 17:10:30 +0000 (18:10 +0100)] 
share/mk/: distcheck: Remove old directory before untarring the new tarball

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: distcheck: Fix dependencies
Alejandro Colomar [Thu, 22 Feb 2024 17:01:39 +0000 (18:01 +0100)] 
share/mk/: distcheck: Fix dependencies

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: Fix path
Alejandro Colomar [Thu, 22 Feb 2024 15:16:21 +0000 (16:16 +0100)] 
share/mk/: Fix path

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: distcheck: Support an absolute path in $builddir
Alejandro Colomar [Thu, 22 Feb 2024 14:12:53 +0000 (15:12 +0100)] 
share/mk/: distcheck: Support an absolute path in $builddir

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: distcheck: Use temporary dirs within $builddir
Alejandro Colomar [Thu, 22 Feb 2024 11:19:28 +0000 (12:19 +0100)] 
share/mk/: distcheck: Use temporary dirs within $builddir

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoclose_range.2: srcfix
Alejandro Colomar [Thu, 22 Feb 2024 11:04:29 +0000 (12:04 +0100)] 
close_range.2: srcfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: Use a variable to prefix recursive make(1) output
Alejandro Colomar [Thu, 22 Feb 2024 10:52:39 +0000 (11:52 +0100)] 
share/mk/: Use a variable to prefix recursive make(1) output

Piping the output to sed(1) didn't behave well with -Orecurse.  Using a
variable behaves well, keeping output synchronized.  The length of the
variable name is specific, so that `$(INFO_)` uses exactly 8 characters,
a tab.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoGNUmakefile: help: Document 'distcheck'
Alejandro Colomar [Sun, 18 Feb 2024 15:51:59 +0000 (16:51 +0100)] 
GNUmakefile: help: Document 'distcheck'

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoclose_range.2: Add _GNU_SOURCE and <unistd.h> to SYNOPSIS
Mark Wielaard [Mon, 12 Feb 2024 12:07:04 +0000 (13:07 +0100)] 
close_range.2: Add _GNU_SOURCE and <unistd.h> to SYNOPSIS

close_range() is defined in <unistd.h> when _GNU_SOURCE is defined.
The <linux/close_range.h> header file only defines the (linux-specific)
flags constants.  The flags argument is an int, not an unsigned int, in
the glibc wrapper.  Use the close_range() library call in the example
code instead of syscall().

Fixes: 71a62d6c3c56 ("close_range.2: Glibc added a wrapper recently")
Fixes: c2356ba085ed ("close_range.2: Glibc 2.34 has added a close_range() wrapper")
Reported-by: Alexandra Hájková <ahajkova@redhat.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
[alx: ffix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agogetaddrinfo.3: tfix
Štěpán Němec [Mon, 12 Feb 2024 09:09:03 +0000 (10:09 +0100)] 
getaddrinfo.3: tfix

(Incidentally, the glibc function source does name the parameter
"name" rather than "node", unlike this man page.  (The POSIX man
page uses "nodename".))

Signed-off-by: Štěpán Němec <stepnem@smrk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoman*/: tfix
Štěpán Němec [Mon, 12 Feb 2024 09:09:02 +0000 (10:09 +0100)] 
man*/: tfix

Signed-off-by: Štěpán Němec <stepnem@smrk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agopath_resolution.7: Work around groff(1) bug
Alejandro Colomar [Sun, 18 Feb 2024 00:35:11 +0000 (01:35 +0100)] 
path_resolution.7: Work around groff(1) bug

Link: <https://savannah.gnu.org/bugs/?65320>
Link: <https://savannah.gnu.org/bugs/?65322>
Link: <https://lists.gnu.org/archive/html/groff/2024-02/msg00039.html>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: clean: Also remove 'distcheck' tmp dirs
Alejandro Colomar [Sat, 17 Feb 2024 03:32:47 +0000 (04:32 +0100)] 
share/mk/: clean: Also remove 'distcheck' tmp dirs

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: $(info ...): Make output more consistent
Alejandro Colomar [Sat, 17 Feb 2024 02:41:34 +0000 (03:41 +0100)] 
share/mk/: $(info ...): Make output more consistent

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: Use $(TRUE) instead of ':'
Alejandro Colomar [Thu, 15 Feb 2024 23:26:03 +0000 (00:26 +0100)] 
share/mk/: Use $(TRUE) instead of ':'

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/dist/: dist: Support recursive 'dist'
Alejandro Colomar [Wed, 14 Feb 2024 23:00:55 +0000 (00:00 +0100)] 
share/mk/dist/: dist: Support recursive 'dist'

Hardcode the version and date, and don't use git(1) for selecting the
distribution files.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: distcheck: Add target
Alejandro Colomar [Wed, 14 Feb 2024 22:14:19 +0000 (23:14 +0100)] 
share/mk/: distcheck: Add target

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: Reorganize build system
Alejandro Colomar [Wed, 14 Feb 2024 13:22:29 +0000 (14:22 +0100)] 
share/mk/: Reorganize build system

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: Move configuration variables to share/mk/configure/
Alejandro Colomar [Wed, 14 Feb 2024 01:17:53 +0000 (02:17 +0100)] 
share/mk/: Move configuration variables to share/mk/configure/

Some variables are only part of the implementation of our build system,
and users should not modify them; others are designed to be set by users
when they invoke make(1).  Define the latter in share/mk/configure/, so
that they are more visible.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: Move '.SILENT:' to GNUmakefile
Alejandro Colomar [Wed, 14 Feb 2024 01:23:34 +0000 (02:23 +0100)] 
share/mk/: Move '.SILENT:' to GNUmakefile

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoshare/mk/: Reorganize build dependencies
Alejandro Colomar [Tue, 13 Feb 2024 21:34:17 +0000 (22:34 +0100)] 
share/mk/: Reorganize build dependencies

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months ago.gitignore: Widen glob
Alejandro Colomar [Wed, 14 Feb 2024 23:02:17 +0000 (00:02 +0100)] 
.gitignore: Widen glob

There are other similar files generated by checkpatch.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoStart of man-pages-NEXT: Move Changes to Changes.old
Alejandro Colomar [Mon, 12 Feb 2024 01:56:17 +0000 (02:56 +0100)] 
Start of man-pages-NEXT: Move Changes to Changes.old

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agolsm: Released 6.06
Alejandro Colomar [Mon, 12 Feb 2024 01:25:57 +0000 (02:25 +0100)] 
lsm: Released 6.06

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoChanges: Ready for 6.06 man-pages-6.06
Alejandro Colomar [Mon, 12 Feb 2024 00:59:38 +0000 (01:59 +0100)] 
Changes: Ready for 6.06

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agold.so.8: srcfix
Alejandro Colomar [Mon, 12 Feb 2024 01:08:02 +0000 (02:08 +0100)] 
ld.so.8: srcfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoman*/: ffix
Alejandro Colomar [Mon, 12 Feb 2024 01:04:29 +0000 (02:04 +0100)] 
man*/: ffix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agopthread_create.3: Re-do the architecture/default stack size mapping
наб [Sun, 11 Feb 2024 22:27:46 +0000 (23:27 +0100)] 
pthread_create.3: Re-do the architecture/default stack size mapping

Currently, the page lists 2 of the 3 x86 architectures, no ARM(!),
old PowerPC only, and most egregiously itanium,
which linux doesn't target.

Per glibc 2.38:
  $ git grep ARCH_STACK_DEFAULT_SIZE
  aarch64     #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  arc         #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  arm         #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  csky        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  loongarch   #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  m68k        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  microblaze  #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  mips        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  nios2       #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  or1k        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  riscv       #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  s390        #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  sh          #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  sparc32     #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)
  x86         #define ARCH_STACK_DEFAULT_SIZE  (2 * 1024 * 1024)

  alpha       #define ARCH_STACK_DEFAULT_SIZE  (4 * 1024 * 1024)
  powerpc     #define ARCH_STACK_DEFAULT_SIZE  (4 * 1024 * 1024)
  sparc64     #define ARCH_STACK_DEFAULT_SIZE  (4 * 1024 * 1024)

  hppa        #define ARCH_STACK_DEFAULT_SIZE  (8 * 1024 * 1024)

  ia64        #define ARCH_STACK_DEFAULT_SIZE (32 * 1024 * 1024)

I cut PA-RISC and the Alpha. They have 10 and 6 popcon entries,
respectively, and AFAICT they haven't seen a processor released
in over a decade, they aren't relevant to any modern reader.

Similarly, use "POWER" instead of "PowerPC" ‒ the consensus branding
is "POWER"+version (POWER8/POWER9); PowerPC is itself a POWER variant
and doesn't really deserve its own special mention, especially in 2024.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoseteuid.2: glibc implements seteuid() calling setresuid(), not setreuid()
Štěpán Němec [Wed, 7 Feb 2024 20:13:36 +0000 (21:13 +0100)] 
seteuid.2: glibc implements seteuid() calling setresuid(), not setreuid()

Analogously with set*gid().

This has been the case since more than two decades, e.g.:

  commit eae59a5681a6 glibc-2.3.2-793-geae59a5681a6
  Commit: Ulrich Drepper <drepper@redhat.com>
  CommitDate: Sun Jun 8 22:37:53 2003 +0000

  Update.

          * sysdeps/unix/sysv/linux/seteuid.c (seteuid): Use setresuid32
          syscall directly if possible.  If __ASSUME_SETRESUID_SYSCALL is
          defined drop compatibility code.
  [...]

The change in implementation from setreuid()/setregid() is also
already mentioned two paragraphs earlier in the same man page.

Fixes: a36b2bb0eca4 ("seteuid.2: seteuid() and setegid() are implemented as library functions")
Fixes: 8554dd0324b0 ("seteuid.2: tfix")
Signed-off-by: Štěpán Němec <stepnem@smrk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoREADME: Use <kernel.org> URL
Petr Vorel [Tue, 23 Jan 2024 11:04:24 +0000 (12:04 +0100)] 
README: Use <kernel.org> URL

<https://kernel.org/pub/> is redirected to
<https://mirrors.edge.kernel.org/pub/>, but it's better not rely on that
and use the primary URL.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoCONTRIBUTING, CONTRIBUTING.d/mail: Split file, and rewrite CONTRIBUTING as an intro
Alejandro Colomar [Sat, 3 Feb 2024 21:39:03 +0000 (22:39 +0100)] 
CONTRIBUTING, CONTRIBUTING.d/mail: Split file, and rewrite CONTRIBUTING as an intro

CONTRIBUTING is now an intro to all the files in CONTRIBUTING.d/

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoCONTRIBUTING, CONTRIBUTING.d/patches: Split CONTRIBUTING file
Alejandro Colomar [Sat, 3 Feb 2024 21:20:23 +0000 (22:20 +0100)] 
CONTRIBUTING, CONTRIBUTING.d/patches: Split CONTRIBUTING file

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 months agoCONTRIBUTING, CONTRIBUTING.d/style: Split CONTRIBUTING file
Alejandro Colomar [Sat, 3 Feb 2024 21:13:07 +0000 (22:13 +0100)] 
CONTRIBUTING, CONTRIBUTING.d/style: Split CONTRIBUTING file

Signed-off-by: Alejandro Colomar <alx@kernel.org>