Age | Commit message (Collapse) | Author | Files | Lines |
|
Previously, many people confused these for actual parameters, since it's
hard to distinguish a ',' from ';'. By removing bold/italics from
these, it will be easier to distinguish them.
The cases have been found with a script:
$ find -type f \
| xargs grep -l '^\.TH ' \
| sort \
| xargs mansect SYNOPSIS \
| man /dev/stdin \
| grep -e '^[^ ]' -e '[^ ]( [^ )].*[^)];' \
| less;
Reported-by: Mark Naughton <mnaughto@redhat.com>
Suggested-by: Mark Harris <mark.hsj@gmail.com>
Acked-by: Mark Naughton <mnaughto@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
I don't know when this was exacly broken, since we didn't have such
pages until now.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cc: Aaron Ballman <aaron@aaronballman.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cc: Aaron Ballman <aaron@aaronballman.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Put 4.2BSD first and mention that POSIX.1-2001 marked this function as
LEGACY.
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Message-ID: <fcc66f4d8694f933a71688ad529e6f4f43024658.1750646692.git.collin.funk1@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Historically, Linux systems did not support the AT_SYMLINK_NOFOLLOW flag
to fchmodat(2). glibc added userspace emulation support in glibc 2.32,
and Linux gained native support in 6.5. See glibc.git 6b89c385d8bd
(2020-02-12; "io: Implement lchmod using fchmodat [BZ #14578]") and
linux.git 09da082b07bb (2023-07-27; "fs: Add fchmodat2()").
Signed-off-by: Benjamin Peterson <benjamin@locrian.net>
Message-ID: <20250619051342.145412-2-benjamin@locrian.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
XFS supports atomic writes - or untorn writes - based on two different
methods:
- HW offload in the disk
- FS method based on out-of-place writes
The value reported in stx_atomic_write_unit_max will be the max size of the
FS-based method.
The max atomic write unit size of the FS-based atomic writes will
typically be much larger than what is capable from the HW offload. However,
FS-based atomic writes will also be typically much slower.
Advertise this HW offload size limit to the user in a new statx member,
stx_atomic_write_unit_max_opt.
We want STATX_WRITE_ATOMIC to get this new member in addition to the
already-existing members, so mention that a value of 0 in
stx_atomic_write_unit_max_opt means that stx_atomic_write_unit_max holds
this optimised limit.
Linux will zero unused statx members, so stx_atomic_write_unit_max_opt
will always hold 0 for older kernel versions which do not support
this FS-based atomic write method (for XFS).
Signed-off-by: John Garry <john.g.garry@oracle.com>
Message-ID: <20250619154455.321848-3-john.g.garry@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Align this member in struct statx with the members above it.
Signed-off-by: John Garry <john.g.garry@oracle.com>
Message-ID: <20250619154455.321848-2-john.g.garry@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Add clarification that for SHT_SYMTAB sections, the associated string
table section index can be found in the sh_link member, following the
same pattern documented for section header string tables.
This was discovered while writing an ELF parser, where the sh_link
field is needed to locate the string table for symbol name lookups
in SHT_SYMTAB sections.
Signed-off-by: Dacian Pascu <pascu.dacian@gmail.com>
Message-ID: <78e41dade449bafddfb730b39226f8d9cb3fefdb.1750427945.git.pascu.dacian@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The text was converted from the commit message in linux.git
cf264e1329fb (2023-06-09; "cachestat: implement cachestat syscall").
Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cf264e1329fb0307e044f7675849f9f38b44c11a>
Signed-off-by: Nhat Pham <nphamcs@gmail.com>
Signed-off-by: Matteo Croce <teknoraver@meta.com>
Message-ID: <20250611141350.1829-1-technoboy85@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Jelle van der Waa <jvanderw@redhat.com>
Message-ID: <20250616133212.131064-1-jvanderwaa@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The documentation and behaviour is indentical to the equivalent flag for
fchownat(2).
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Message-ID: <20250619-fchmod-empty-path-v1-1-feff2c63abe4@cyphar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
We don't use ?= anymore (except for MANWIDTH). We'd like to use ?:=
eventually, but for now we use := surrounded by conditionals.
This reverts commit e18c21096714545db6c4855e20c43bbb1541489c.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Message-ID: <1cd0d5aa80cdc10a6c03dc8f3f2827d38bc86767.1749795252.git.collin.funk1@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Message-ID: <20250602140104.2769223-2-bigeasy@linutronix.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
And that input decoding failures are treated as errors.
Exiting with status 0 is a POSIX conformance issue that was fixed
in glibc 2.41.
Signed-off-by: Florian Weimer <fweimer@redhat.com>
Message-ID: <87msamxso9.fsf@oldenburg.str.redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Corresponding code is in drivers/tty/vt/vt_ioctl.c.
New in Linux v6.16.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Message-ID: <4n723o1q-pr52-319q-nsr7-6442387s12s2@onlyvoer.pbz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Corresponding code is in drivers/tty/vt/vt.c:tioclinux().
New in Linux v6.16.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Message-ID: <o5p79351-1ops-on58-3o20-rp142r6s4o21@onlyvoer.pbz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
It suggest 'cancellation' instead of 'cancelation', but we want the
latter. Since it hasn't caught anything useful, AFAIR, turn it off.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cc: Alex Celeste <alexg.nvfp@gmail.com>
Reported-by: Jorenar <dev@jorenar.com>
Suggested-by: "Fred J. Tydeman" <tydeman@tybor.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 0569afbbccd6 (2023-08-17; "proc*.5: Make sashimi")
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Message-ID: <c28f98b90ff40c3944aaa3189627d795e0c2d9f6.1748714599.git.nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
sysctl_hugetlb_shm_group is the name of the variable in "mm/hugetlb.c".
Fixes: 090fdddb4342 (2021-05-17; "memfd_create.2, mmap.2, shmget.2: Document the EPERM for huge page allocations")
Fixes: 6cee0ddeb414 (2021-05-17; "proc.5: Document /proc/sys/vm/sysctl_hugetlb_shm_group")
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Message-ID: <22436441b7bac0177213c99c55187c4af085d4ca.1748714599.git.nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
ar
|
|
Although Linux kernels before 5.7 would create a regular file when
opening a nonexistent file with O_CREAT | O_DIRECTORY, this behavior
was changed to something deeply buggy in 5.7, and when the bug was
fixed in 6.4 this combination of open flags became invalid.
Adjust the documentation to match the 6.4+ behavior,
which makes more sense anyway.
Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
Message-ID: <20250530072029.344532-1-eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
FUTEX_WAIT_REQUEUE_PI from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
FUTEX_CMP_REQUEUE_PI from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
FUTEX_UNLOCK_PI from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
FUTEX_TRYLOCK_PI from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
FUTEX_CMP_REQUEUE from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
from futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
futex(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
And be more explicit about the one case that's different.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
- Remove dead code (redundant .P).
- Adjust white space.
- Remove redundant note.
- Use the same language as always about returning -1 and setting errno.
- Split errors.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
getpid() is superfluous here.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Message-ID: <v5p4zfqrepnrorszmuie47aiulivcykicxuhtxfkqhrq5t3cis@tarta.nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
proc(5) was split into many small pages recently.
Reported-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Suggested-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 3dfcc11d4630 (2015-12-15; "futex.2: Expand description of FUTEX_CMP_REQUEUE")
Fixes: 8297383e9eeb (2015-12-15; "futex.2: Clean-ups and FIXME removeal after feedback from Thomas Gleixner")
Reported-by: Jens Gustedt <jens.gustedt@inria.fr>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Carsten Grohmann <carstengrohmann@gmx.de>
Message-ID: <20250523122617.48cf9feb@max.localdomain>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The kernel sign-extends eax before dispatching syscalls.
From arch/x86/entry/entry_64.S:
> movslq %eax, %rsi
> IBRS_ENTER
> UNTRAIN_RET
> CLEAR_BRANCH_HISTORY
>
> call do_syscall_64 /* returns with IRQs disabled */
This patch updates syscall.2 to document this. ARM64 exhibits a
similar behavior (w8 is extended), which is already documented.
Signed-off-by: Ben Kallus <benjamin.p.kallus.gr@dartmouth.edu>
Message-ID: <20250518234507.404608-1-benjamin.p.kallus.gr@dartmouth.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Steffen Nurpmeso <steffen@sdaoden.eu>
Message-ID: <f90b33d398ccf814083e300454df88e0937b94d3.1747784310.git.steffen@sdaoden.eu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The printf family of functions set errno if a negative value is returned.
Source is POSIX.1, see
<https://pubs.opengroup.org/onlinepubs/9799919799/functions/fprintf.html>
<https://pubs.opengroup.org/onlinepubs/9799919799/functions/fwprintf.html>
Also see manual pages of FreeBSD and OpenBSD.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Message-ID: <34octlcodbwm3kfqlouvrvhriiftmlzzobbohgzivlkgi53nfs@7gxajeb56klz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Add the entry for UFFDIO_MOVE ioctl in UFFDIO_API man page.
Fixes: d7dec35a3b19 ("man/man2/ioctl_userfaultfd.2, man/man2const/UFFDIO_MOVE.2const: Document UFFDIO_MOVE")
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-ID: <20250514172630.569788-3-peterx@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
There's a confusing paragraph in the man page on two-steps handshake for
userfaultfd UFFDIO_API ioctl. In reality, after a successful UFFDIO_API
ioctl, the userfaultfd will be locked up on the features and any further
UFFDIO_API on top of an initialized userfaultfd would fail.
Modify the UFFDIO_API(2const) man page to reflect the reality. Instead,
add a paragraph explaining the right way to probe userfaultfd features.
Add that only after the "Before Linux 4.11" paragraph, as the old kernel
doesn't support any feature anyway.
Fixes: a252b3345 ("ioctl_userfaultfd.2: Describe two-step feature handshake")
Reviewed-by: Kyle Huey <khuey@kylehuey.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-ID: <20250514172630.569788-2-peterx@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Scripted change:
$ grep -rl 'The authors of the Linux man-pages' \
| xargs sed -i '/Copyright, The authors of the Linux man-pages project/s/The/the/';
Reported-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Suggested-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
- Rename the file CREDITS => AUTHORS
- Say 'authors' in the copyright notice. Scripted change:
$ grep -rn 'The contributors to the Linux man-pages' -l \
| xargs sed -i '/Copyright, The contributors to the Linux man-pages project/s/contributors to/authors of/'
Suggested-by: Dave Martin <Dave.Martin@arm.com>
Acked-by: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
support it
Link: <https://lore.kernel.org/all/20200515160342.GE23230@ZenIV.linux.org.uk/>
Cc: Mateusz Guzik <mjguzik@gmail.com>
Cc: Jeff Layton <jlayton@kernel.org>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: <linux-fsdevel@vger.kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
And use 'pathname' in the descriptions.
'pathname' is the POSIXly correct term, and 'path' is a reasonable
abbreviation for it in parameter names.
Cc: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The type _Bool perfectly models these APIs. Conversion from any scalar
type to _Bool results in true if the value is non-zero, and false if it
is zero.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Scripted change:
$ ~/src/linux/linux/v6.14/scripts/bpf_doc.py \
| rst2man \
>man/man7/bpf-helpers.7;
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://lore.kernel.org/linux-man/jpin2dbnp5vpitnh7l4qmvkamzq3h3xljzsznrudgioox3nn72@57uybxbe3h4p/T/#u>
Link: <https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects>
Cc: "G. Branden Robinson" <branden@debian.org>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://lore.kernel.org/linux-man/jpin2dbnp5vpitnh7l4qmvkamzq3h3xljzsznrudgioox3nn72@57uybxbe3h4p/T/#u>
Link: <https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects>
Cc: "G. Branden Robinson" <branden@debian.org>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
"cannot adjust line", which is due to the long URI added to See also.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This information is better placed in the git logs, not in the source
code itself. For people interested in the old history of pages, before
we used git, they will probably look at old versions of these pages,
like for example man-pages-1.70, or the 'prehistory' branch, and there
they'll find these notes.
Keep the names and emails of contributors in a new CREDITS file.
Link: <https://lore.kernel.org/linux-man/jpin2dbnp5vpitnh7l4qmvkamzq3h3xljzsznrudgioox3nn72@57uybxbe3h4p/T/#u>
Link: <https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects>
Cc: "G. Branden Robinson" <branden@debian.org>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
One can still enable it by setting an empty MANROFFOPT.
Suggested-by: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
TIOCL_SETSEL modes
CAP_SYS_ADMIN was previously required for the entire TIOCL_SETSEL
subcode, but is now only needed for a subset of the selection modes,
since linux.git 2f83e38a095f (2025-01-13; "tty: Permit some
TIOCL_SETSEL modes without CAP_SYS_ADMIN").
The CAP_SYS_ADMIN requirement for TIOCL_SELMOUSEREPORT was further
corrected in linux.git ee6a44da3c87 (2025-04-11; "tty: Require
CAP_SYS_ADMIN for all usages of TIOCL_SELMOUSEREPORT").
Admittedly, there are kernels where CAP_SYS_ADMIN was briefly not
required for TIOCL_SELMOUSEREPORT, even after Linux v6.7, but this was
a mistake which is now fixed in all up-to-date stable kernels.
Therefore, we still document CAP_SYS_ADMIN as required "since Linux
6.7" in this case.
Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=2f83e38a095f8bf7c6029883d894668b03b9bd93>
Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=ee6a44da3c87cf64d67dd02be8c0127a5bf56175>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Message-ID: <20250502102405.4891-2-gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
In linux.git b758fe6df50d (2023-06-09; "mm/secretmem: make it on by
default") memfd_secret was updated to be enabled by default.
Signed-off-by: Thiébaud Weksteen <tweek@google.com>
Message-ID: <20250428020252.1569621-1-tweek@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The output shown for the example program listed /tmp/b twice;
the second /tmp/b should be /tmp/c.
Fixes: 336bd62ba24c (2021-03-21; "close_range.2: Include a better example program")
Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
Message-ID: <e8519ea77798c68944717bc6437052a1119a911f.camel@armitage.org.uk>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
References:
- C99 draft: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf
section "6.5.6 Additive operators", paragraph 9
- object size restriction in GCC:
https://gcc.gnu.org/legacy-ml/gcc/2011-08/msg00221.html
- glibc malloc restricts object size to <=PTRDIFF_MAX in
checked_request2size() since glibc v2.30 (released in 2019, as pointed
out by Jakub Wilk):
https://sourceware.org/cgit/glibc/commit/?id=9bf8e29ca136094f
Signed-off-by: Jann Horn <jannh@google.com>
Message-ID: <20250429164359.2699330-1-jannh@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
UFFDIO_MOVE
Documentation was extracted from the original patch written by Andrea
Arcangeli and upstreamed in [1]. Minor edits were made to maintain
the same documentation style as other userfaultfd ioctl commands.
[1] <https://lore.kernel.org/all/20231206103702.3873743-3-surenb@google.com/>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Message-ID: <20250423195309.2841410-1-surenb@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Lightweight guard region support has been extended in Linux 6.15,
permitting the use of these features for file-backed and read-only
mappings.
Update the description for these operations in the madvise manpage to
describe the changed behaviour.
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Message-ID: <20250423183105.116978-1-lorenzo.stoakes@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: bb8164dec0c4 (2020-10-22; "slist.3: ffix: Use man markup")
Signed-off-by: Solomon Tan <wjsota@icloud.com>
Message-ID: <20250420124447.1552510-2-wjsota@icloud.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This change adds a brief description for the new Management Component
Transport Protocol (MCTP) support added to Linux as of
linux.git bc49d8169aa7 (2021-07-29; "mctp: Add MCTP base").
This is a fairly regular sockets-API implementation, so we're just
describing the semantics of socket(2), bind(2), sendto(2), and
recvfrom(2) for the new protocol.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Message-ID: <20250417-mctp-v3-1-07fff4d26f73@codeconstruct.com.au>
[alx: minor tweaks]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This seems to be about implementation details that are unimportant to
programmers. It is widely understood that compilers may optimize some
libc calls.
Cc: Anton Zellerhoff <wg14@ascz.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cc: Anton Zellerhoff <wg14@ascz.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
C2Y adds unsigned versions of the abs functions (see C2Y draft N3467 and
proposal N3349). Support for these functions will be included in GCC 15
and glibc 2.42.
Link: <https://www.open-std.org/JTC1/SC22/WG14/www/docs/n3467.pdf>
Link: <https://www.open-std.org/JTC1/SC22/WG14/www/docs/n3349.pdf>
Link: <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117024>
Link: <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=5b132ec2b7712dbc055838b3b538b83ad1196414>
Signed-off-by: Anton Zellerhoff <wg14@ascz.de>
Message-ID: <28a36070fe18707ab9fa26b91c88e6fd87a72097.1744566285.git.wg14@ascz.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Used to subscribe for notifications for when mounts
are attached/detached from a mount namespace.
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250404104723.1709188-2-amir73il@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The order of FAN_FS_ERROR entry in the event section was rather
arbitrary inside the group of fid info events.
FAN_FS_ERROR is a special event with error info, so place its entry
after the entries for fid info events and before the entries for
permission events.
Reduce unneeded newlines in the FAN_FS_ERROR entry.
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250404104723.1709188-1-amir73il@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Document FAN_RESPONSE_INFO_AUDIT_RULE extended response info record
that was added in v6.3.
Cc: Jan Kara <jack@suse.cz>
Cc: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250331082759.1424401-2-amir73il@gmail.com>
[alx: ffix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The new FAN_PRE_ACCESS events are created before access to a file range,
to provides an opportunity for the event listener to modify the content
of the object before the user can accesss it.
Those events are available for group in class FAN_CLASS_PRE_CONTENT
They are reported with FAN_EVENT_INFO_TYPE_RANGE info record.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250330125536.1408939-1-amir73il@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This flag from v6.13 allows reporting detailed errors on failure to
open a file descriptor for an event.
This API was backported to LTS kernels v6.12.4 and v6.6.66.
Cc: Krishna Vivek Vitta <kvitta@microsoft.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250331133959.1436376-1-amir73il@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Miroslav Cimerman <mc@doas.su>
Message-ID: <wsk_s0nLv-HYkjBgAMVkOJW4DSkT5iYYr2anB6R-7X8ftiYyEKKOuNqJlE1jtRjeZjSvnlkxJ4Lm50DmcuS9ftSR_OQxu-8RcySOD5vTaKk=@doas.su>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Document FAN_DENY_ERRNO(), which was added in Linux 6.13 to
report specific errors on file access.
Cc: Jan Kara <jack@suse.cz>
Cc: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250331082759.1424401-3-amir73il@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Since the introduction of the FAN_AUDIT response flag,
the response field of fanotify_response is no longer an enum
it is now a bitmask, so fix the wording around FAN_ALLOW and
FAN_DENY.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250331082759.1424401-1-amir73il@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
AT_HANDLE_CONNECTABLE flag
A flag since Linux 6.13 to indicate that the requested file_handle is
intended to be used for open_by_handle_at(2) to obtain an open file
with a known path.
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: Jeff Layton <jlayton@poochiereds.net>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250331081642.1423812-2-amir73il@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
AT_HANDLE_MNT_ID_UNIQUE flag
A flag since Linux 6.12 to indicate that the requested mount_id is
a 64-bit unique id.
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: Jeff Layton <jlayton@poochiereds.net>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-ID: <20250331081642.1423812-1-amir73il@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
modes: TIOCL_SELPOINTER, TIOCL_SELCLEAR, TIOCL_SELMOUSEREPORT
Documents the following TIOCL_SETSEL sub-operations:
* TIOCL_SELPOINTER
* TIOCL_SELCLEAR
* TIOCL_SELMOUSEREPORT
These previously undocumented selection modes for the Linux console
are implemented in <drivers/tty/vt/selection.c>. The name "selection
mode" is slightly misleading as not all of them actually manipulate
the kernel's mouse selection buffer.
Includes clarified semantics pointed out by Jared Finder.
Cc: Hanno Böck <hanno@hboeck.de>
Cc: Jann Horn <jannh@google.com>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Message-ID: <20250330143038.4184-5-gnoack3000@gmail.com>
Acked-by: Jared Finder <jared@finder.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
selection modes
* Indent the documented selection modes into tagged paragraphs.
* Document constants from the header file <tiocl.h> instead of numbers.
* Clarify expansion semantics as suggested by Jared Finder.
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Message-ID: <20250330143038.4184-4-gnoack3000@gmail.com>
Acked-by: Jared Finder <jared@finder.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
It's just as informative, and takes less space.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
While doing this global change, fix other minor issues found nearby.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
It was probably a typo, since in sendto(2) this is (..., NULL, 0).
Signed-off-by: Peter Radisson <radisson97@web.de>
Message-ID: <189ef077-18f4-43a3-9008-286a75e7bd91@web.de>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 18e7c4597c4e (2024-11-17; "man/: Terminology consistency reforms (n, size, length)")
Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=219921>
Reported-by: Paul Pluzhnikov <ppluzhnikov@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=64924422a99690d147a166b4de3103f3bf3eaf6c>
Reported-by: Bruno Haible <bruno@clisp.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
strtol(3) mentiones both, but this page somehow forgot the uppercase
variant.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Bruno Haible <bruno@clisp.org>
Co-authored-by: Bruno Haible <bruno@clisp.org>
Signed-off-by: Bruno Haible <bruno@clisp.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://stackoverflow.com/questions/60955490/strtoul-what-is-the-correct-return-value-for-very-negative-strings>
Reported-by: Bruno Haible <bruno@clisp.org>
Co-authored-by: Bruno Haible <bruno@clisp.org>
Signed-off-by: Bruno Haible <bruno@clisp.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Add the missing length requirement about MB_CUR_MAX to wcrtomb(3).
Change the wording on the MB_CUR_MAX requirement in wctomb(3). If
programmers know the wide character to convert beforehand, they are
allowed to use a buffer smaller than MB_CUR_MAX bytes, as long as it
"fits" the sequence.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Message-ID: <CADDzAfN7_kdv4iQtH=OpgSWtRuqOZXYhxsBiz_OF8Zqf-zy4_Q@mail.gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
for sizes of array parameters
I forgot to include this change in the global change applied recently.
Fixes: d2c2db8830f8 (2025-03-14; "man/: SYNOPSIS: Use GNU forward-declarations of parameters for sizes of array parameters")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
array parameters
This syntax has been proposed for standardization in N3433.
Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3433.pdf>
Cc: Christopher Bazley <chris.bazley.wg14@gmail.com>
Cc: Martin Uecker <uecker@tugraz.at>
Cc: Joseph Myers <josmyers@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
For example, in backtrace(3) we don't want to use 'static'.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
It causes false positives:
CPPCHECK .tmp/man/man2/open_by_handle_at.2.d/t_name_to_handle_at.c.lint-c.cppcheck.touch
.tmp/man/man2/open_by_handle_at.2.d/t_name_to_handle_at.c:35:5: warning: inconclusive: If memory allocation fails, then there is a possible null pointer dereference: fhp [nullPointerOutOfMemory]
fhp->handle_bytes = 0;
^
.tmp/man/man2/open_by_handle_at.2.d/t_name_to_handle_at.c:26:17: note: Assuming allocation function fails
fhp = malloc(fhsize);
^
.tmp/man/man2/open_by_handle_at.2.d/t_name_to_handle_at.c:26:17: note: Assignment 'fhp=malloc(fhsize)', assigned value is 0
fhp = malloc(fhsize);
^
.tmp/man/man2/open_by_handle_at.2.d/t_name_to_handle_at.c:35:5: note: Null pointer dereference
fhp->handle_bytes = 0;
^
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
See the non-wide equivalent functions.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
CAP_NET_ADMIN has been overkill to use setsockopt(IP_TRANSPARENT)
since a discussion on LKML[1] and a patch[2] in 2011. All that is
left to do is to let devs know they don't need CAP_NET_ADMIN.
[2] linux.git 6cc7a765c298 (2011-10-20; "net: allow CAP_NET_RAW to set socket options IP{,V6}_TRANSPARENT")
Link: [1] <https://lore.kernel.org/netdev/20111020.182214.629562655202957174.davem@davemloft.net/T/>
Signed-off-by: Matthieu Buffet <matthieu@buffet.re>
Message-ID: <20250307222244.597006-1-matthieu@buffet.re>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
With this ABI version, Landlock can restrict outgoing interactions with
higher-privileged Landlock domains through Abstract Unix Domain sockets
and signals.
Terminology:
* The *IPC Scope* of a Landlock domain is that Landlock domain and its
nested domains.
* An *operation* (e.g., signaling, connecting to abstract UDS) is said
to be *scoped within a domain* when the flag for that operation was
set at ruleset creation time. This means that for the purpose of
this operation, only processes within the domain's IPC scope are
reachable.
Link: <https://lore.kernel.org/all/20250303194510.135506-4-gnoack@google.com/>
Signed-off-by: Günther Noack <gnoack@google.com>
Cc: Mickaël Salaün <mic@digikod.net>
Cc: Tahera Fahimi <fahimitahera@gmail.com>
Cc: Tanya Agarwal <tanyaagarwal25699@gmail.com>
Cc: Daniel Burgener <dburgener@linux.microsoft.com>
Cc: <linux-security-module@vger.kernel.org>
Message-ID: <20250303195056.136777-4-gnoack@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Copy over the existing wording from kernel documentation,
as it was introduced in Linux commit
51442e8d64bc (2023-10-26, "landlock: Document network support").
Landlock rules are not only about the filesystem any more
and the new wording is more appropriate.
Signed-off-by: Günther Noack <gnoack@google.com>
Cc: Mickaël Salaün <mic@digikod.net>
Cc: Tahera Fahimi <fahimitahera@gmail.com>
Cc: Tanya Agarwal <tanyaagarwal25699@gmail.com>
Cc: Daniel Burgener <dburgener@linux.microsoft.com>
Cc: <linux-security-module@vger.kernel.org>
Message-ID: <20250303195056.136777-2-gnoack@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 2904e040ded2 (2025-02-02; "man/man2/mkdir.2: ERRORS: Add EOVERFLOW")
Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
Message-ID: <6DF9A4EE0A868FB4+20250303095057.92138-1-chenlinxuan@uniontech.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
We need to escape the # for old versions of make(1). However, new
versions of grep(1) diagnose if it receives an escaped #. To keep both
make(1) and grep(1) happy in both their old and new versions, we need to
take advantage of # not being a comment in bash(1) when not preceeded by
a space, and also of \# being translated into # by bash(1).
alx@debian:~$ echo ''\#
#
alx@debian:~$ echo ''#
#
Fixes: 76f12e3fd3ea (2025-02-10; "share/mk/: Escape '#' in regexes")
Reported-by: Sergei Trofimovich <slyich@gmail.com>
Cc: Florian Weimer <fw@deneb.enyo.de>
Cc: Boris Pigin <boris.pigin@gmail.com>
Suggested-by: Jakub Wilk <jwilk@jwilk.net>
References: <20250227162800.36exbwmqky6d7z4t@jwilk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Browsing a header file in the kernel source and saw the memory policy
enum used for mbind() and set_mempolicy() using an entry that I didn't
recognize. I man 2'd both system calls and didn't see an entry for
MPOL_PREFERRED_MANY. The commit on the enum entry:
linux.git b27abaccf8e8 (2021-09-02; "mm/mempolicy: add
MPOL_PREFERRED_MANY for multiple preferred nodes")
The commit message gives the rationale as to why the MPOL_PREFERRED_MANY
mode would be beneficial. Giving the ability to set the memory policy
to target different tiers of memory over various NUMA nodes.
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Matthew Cassell <mcassell411@gmail.com>
Message-ID: <20250220225232.2138-1-mcassell411@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Askar Safin <safinaskar@zohomail.com>
Message-ID: <20250220091926.3985504-3-safinaskar@zohomail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
modern glibc wrapper cannot
I verified using an expirement (see below) that the modern glibc wrapper
getcwd() actually never returns "(unreachable)". I have also read the
modern glibc sources for all three functions documented here. None of
them return "(unreachable)".
Now let me describe my expirement:
d-user@comp:/tmp$ cat getcwd.c
#include <unistd.h>
#include <stdio.h>
#include <sys/syscall.h>
int
main(void)
{
char buf[1000];
if (syscall(SYS_getcwd, buf, sizeof(buf)) == -1)
perror("SYS_getcwd");
else
printf("SYS_getcwd: %s\n", buf);
if (getcwd(buf, sizeof(buf)) == NULL)
perror("getcwd");
else
printf("getcwd: %s\n", buf);
return 0;
}
d-user@comp:/tmp$ gcc -Wall -Wextra -o getcwd getcwd.c
d-user@comp:/tmp$ sudo unshare --mount bash
d-root@comp:/tmp# mkdir /tmp/dir
d-root@comp:/tmp# mount -t tmpfs tmpfs /tmp/dir
d-root@comp:/tmp# cd /tmp/dir
d-root@comp:/tmp/dir# umount -l .
d-root@comp:/tmp/dir# /tmp/getcwd
SYS_getcwd: (unreachable)/
getcwd: No such file or directory
d-root@comp:/tmp/dir# exit
exit
Link: <https://sourceware.org/bugzilla/show_bug.cgi?id=18203>
Link: <https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=52a713fdd0a30e1bd79818e2e3c4ab44ddca1a94>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Askar Safin <safinaskar@zohomail.com>
Message-ID: <20250220091926.3985504-2-safinaskar@zohomail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
In the example showing how locked mounts in a less privileged mount
namespace can not be split, first </etc/shadow> is bind mounted, then an
attempt is done to unmount </mnt/dir>, which gives an error complaining
that </etc/shadow> is not mounted. The unmount should also refer to
</etc/shadow>.
Fixes: 906ab4945cd3 (2021-08-20; "mount_namespaces.7: Rewrite locked mounts examples to use/etc/shadow")
Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=217709>
Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
Cc: Rajesh <r.pandian@gmail.com>
Message-ID: <26546.13734.573762.288144@gargle.gargle.HOWL>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The semantics of '?=' are similar to those of '=', but we need simple
assignment as if ':=', so we can't use '?='. In the future, we'll be
able to use '?:='. For now, let's use ifndef.
Fixes: 0d69e51cd4b8 (2025-02-10; "share/mk/: Use ?= assignments for user-facing variables")
Link: <https://lore.kernel.org/linux-man/378a2eba-c973-4de9-a362-6e25123bf75b@systematicsw.ab.ca/T/#m3be93ab6b875569178981b034b4a874632db2fa9>
Reported-by: Brian Inglis <brian.inglis@systematicsw.ab.ca>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The DESCRIPTION says:
If *sig* is 0, then no signal is sent, but existence and
permission checks are still performed; this can be used to
check for the existence of a process ID.
On the other hand, the `RETURN VALUE` section contradicted that.
On success (at least one signal was sent), zero is returned. On
error, -1 is returned...
How can I get 0 when providing sig=0, if no signal was actually
sent, which is the criteria for success of this call???
Reported-by: Amit Pinhas <amitpinhass@gmail.com>
Co-authored-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Amit Pinhas <amitpinhass@gmail.com>
Message-ID: <a4fa37e0fc89a3c99982ace3fe381991ebe85b00.1739393685.git.amitpinhass@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Scripted change:
$ ~/src/linux/linux/v6.13/scripts/bpf_doc.py \
| rst2man \
>man7/bpf-helpers.7;
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The others are internal stuff that most likely shouldn't be touched.
Cc: Sam James <sam@gentoo.org>
Cc: Paul Smith <psmith@gnu.org>
Cc: Guenther Noack <gnoack@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This allows users specifying them as environment variables.
Cc: Sam James <sam@gentoo.org>
Cc: Paul Smith <psmith@gnu.org>
Cc: Guenther Noack <gnoack@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
And everyone's make(1) is too old. :-)
This will allow us to use ?= assignments. Once a new GNU make(1)
release is done, we'll be able to rely on our setting of MAKEFLAGS+=-R
at the top of the GNUMakefile, but currently, that's not enough, and the
user must specify -R to unset implicit variables.
Cc: Sam James <sam@gentoo.org>
Cc: Paul Smith <psmith@gnu.org>
Cc: Guenther Noack <gnoack@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
GNU make(1) 4.2 seems to be interpreting those characters as the start
of a comment, so we need to escape them. That seems to calm those old
versions of make(1), and doesn't affect negatively the newer ones, and
doesn't affect negatively grep(1) either.
Fixes: 35a780a99bd8 (2024-07-20; "share/mk/: CPPFLAGS: Only define _FORTIFY_SOURCE if it's not already defined")
Fixes: 2130162900ab (2024-11-03; "share/mk/, etc/shellcheck/: lint-sh: Add target to lint shell scripts")
Reported-by: Boris Pigin <boris.pigin@gmail.com>
Cc: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
- 0, not -1, is returned for an unsupported time base or error
(C23 7.29.2.6, 7.29.2.7; POSIX.1-2024 line 74358).
- Clarify that any supported value of base is always nonzero (i.e.,
there is no overlap between the two return value cases that may
require errno or some other source to disambiguate)
(C23 7.29.2.6, 7.29.2.7; POSIX.1-2024 line 74357).
- Clarify that timespec_getres(NULL, base) is a valid call to check
whether the specified time base is supported (C23 7.29.2.7).
- Clarify that the resolution for a particular time base is constant
for the lifetime of the process (i.e., there is no need to retrieve
it repeatedly) (C23 7.29.2.7).
- Calls to these functions are not technically equivalent to any
clock_* function call; at least the return value will be different.
Clarify that it is the time and resolution that are the same.
- The ERRORS section is removed, because it states only what is true
for every function that does not state otherwise (i.e., errno might
be affected by underlying system calls).
Fixes: 7bda5119fe5e (2024-09-08; "timespec_get.3, timespec_getres.3: Add page and link page")
Cc: наб <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
Message-ID: <5f8dc5d2dc51f080a18de53e98610df43389b98b.1739063937.git.mark.hsj@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Personally, I prefer tabs for actual programming. But for manual pages,
we can live with 4 spaces for $reasons.
Reported-by: "G. Branden Robinson" <branden@debian.org>
Reported-by: Jason Yundt <jason@jasonyundt.email>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This makes room for adding <style/c>, a C coding style guide.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
GCC and Clang print warnings:
$ clang main.c -Wall
main.c:30:23: warning: format specifies type 'size_t' (aka 'unsigned long') but the argument has type 'unsigned int' [-Wformat]
30 | printf("#%zu:\n", i);
| ~~~ ^
| %u
1 warning generated.
$ gcc main.c -Wall
main.c: In function ‘main’:
main.c:30:16: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 2 has type ‘unsigned int’ [-Wformat=]
30 | printf("#%zu:\n", i);
| ~~^ ~
| | |
| | unsigned int
| long unsigned int
| %u
Fixes: b42296e4feaf (2022-09-15; "Various pages: EXAMPLES: Use unsigned types for loop iterators")
Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
Message-ID: <20250207211628.25164-1-arkadiusz@drabczyk.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Reported-by: Chen Linxuan <chenlinxuan@uniontech.com>
Message-ID: <647EBDB1A8DE7507+20250121031351.548052-1-chenlinxuan@uniontech.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
mkdir(2) and mkdirat(2) might set errno to EOVERFLOW when UID or GID
mapping has not been configured.
Here's a small program that shows this behavior:
#define _GNU_SOURCE
#include <err.h>
#include <sched.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <unistd.h>
static int
childFunc(void *_)
{
if (mount("tmpfs", "/tmp", "tmpfs", 0, NULL))
err(EXIT_FAILURE, "mount");
if (mkdir("/tmp/test", 0755) == -1)
err(EXIT_FAILURE, "mkdir");
return 0;
}
#define STACK_SIZE (1024 * 1024)
int
main(void)
{
char *stack; /* Start of stack buffer */
char *stackTop; /* End of stack buffer */
pid_t pid;
stack = mmap(NULL, STACK_SIZE, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK,
-1, 0);
if (stack == MAP_FAILED)
err(EXIT_FAILURE, "mmap");
stackTop = stack + STACK_SIZE;
pid = clone(childFunc, stackTop, CLONE_NEWUSER |
CLONE_NEWNS | SIGCHLD, NULL);
if (munmap(stack, STACK_SIZE) == -1)
err(EXIT_FAILURE, "munmap");
if (pid == -1)
err(EXIT_FAILURE, "clone");
if (waitpid(pid, NULL, 0) == -1)
err(EXIT_FAILURE, "waitpid");
exit(EXIT_SUCCESS);
}
Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=036d523641c66bef713042894a17f4335f199e49>
Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
Message-ID: <F22A2B1500170B63+20250202135733.11800-1-chenlinxuan@uniontech.com>
[alx: wfix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This is an XSI extension supported by Linux.
Link: <https://unix.stackexchange.com/q/790116/72304>
Link: <https://lore.kernel.org/linux-man/Z5U0Wh_KF3Ki62Pk@comp../>
Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
Message-ID: <20250202130331.20320-1-arkadiusz@drabczyk.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The autogroup feature can be contolled at runtime when built into the
kernel. Disabling it in this case still creates autogroups and still
shows the autogroup membership for the task in /proc. The scheduler
code will just not use the the autogroup task group. This can be
confusing to users. Add a sentence to this effect to sched.7 to point
this out.
The kernel code shows how this is used. The sched_autogroup_enabled
toggle is only used in one place.
kernel/sched/autogroup.h:
static inline struct task_group *
autogroup_task_group(struct task_struct *p, struct task_group *tg)
{
extern unsigned int sysctl_sched_autogroup_enabled;
int enabled = READ_ONCE(sysctl_sched_autogroup_enabled);
if (enabled && task_wants_autogroup(p, tg))
return p->signal->autogroup->tg;
return tg;
}
task_wants_autogroup() is in kernel/sched/autogroup.c:
bool task_wants_autogroup(struct task_struct *p, struct task_group *tg)
{
if (tg != &root_task_group)
return false;
...
return true;
}
One can see that any group set other than root also bypasses the use of
the autogroup. All of the machinery around the creation of the
autogroup is not effected by the toggle.
From userspace:
0
/autogroup-112 nice 0
Note, systemd based system these days is not really using autogroups at
all anyway because any task in a non-root cgroup bypasses the autogroup
as well.
Cc: Carlos O'Donell <codonell@redhat.com>
Signed-off-by: Phil Auld <pauld@redhat.com>
Message-ID: <20250116143747.2366152-1-pauld@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Askar Safin <safinaskar@zohomail.com>
Message-ID: <20250130050625.3356602-1-safinaskar@zohomail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: "Tomerius, Kai" <Kai.Tomerius@elektrobit.com>
Fixes: 07c3768e9db8 (2023-08-15; "proc.5, proc_pid_limits.5: Split /proc/PID/limits from proc(5)")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
On Mon, Jan 27, 2025 at 07:27:59PM +0100, наб wrote:
> Skimming the thread: UNIX paths are sequences of non-NUL bytes.
>
> It is never correct to expect to be able to have a (parse, unparse)
> operation pair for which unparse(parse(x)) = x for path x.
>
> It's obviously wrong to reject a pathname just because you dont like it.
>
> Thus, when displaying a path, either (a) dump it directly to the output
> (the user has configured their display device to understand the paths they use),
> or if that's not possible (b) setlocale(LC_ALL, "") + mbrtowc() loop
> and render the result (applying usual ?/� substitutions for mbrtowc()
> errors makes sense here).
>
> There are very few operations on paths that are actually reasonable
> to do, ever; those are: appending stuff, prepending stuff
> (this is just appending stuff with the arguments backwards),
> and cleaving at /es;
> the "stuff" better be copied whole-sale from some other path
> or an unprocessed argument (or, sure, the PFCS).
>
> If you're getting bytes to append to a path, do that directly.
>
> If you're getting characters to append to a path,
> then wctomb(3) is the only non-invalid solution,
> since that (obviously) turns characters into bytes in the current
> locale, which (ex def) is the operation desired.
>
> I don't understand what the UTF-32 dance is supposed to be.
>
> If you're recommending transcoding paths, don't.
>
> To re-iterate: paths are not character sequences.
> They do not represent characters.
> You can't meaningfully coerce them thusly without loss of precision
> (this is ok to do for display! and nothing else).
> If at any point you find yourself turning wchar_t -> char
> you are doing something wrong;
> if you find yourself doing char -> wchar_t for anything beside display
> you should probably reconsider.
>
> This is different under Win32 of course. But that concerns us naught.
Suggested-by: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: Jason Yundt <jason@jasonyundt.email>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The ASCII filename was too simple to actually show anything useful.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The goal of this new manual page is to help people create programs that
do the right thing even in the face of unusual paths. The information
that I used to create this new manual page came from these sources:
Link: <https://unix.stackexchange.com/a/39179/316181>
Link: <https://sourceware.org/pipermail/libc-help/2024-August/006737.html>
Link: <https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/fs/ext4/ext4.h?h=v6.12.9#n2288>
Link: <man:unix(7)>
Link: <https://unix.stackexchange.com/q/92426/316181>
Cc: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Jason Yundt <jason@jasonyundt.email>
Message-ID: <20250121133523.24606-1-jason@jasonyundt.email>
Cc: "G. Branden Robinson" <branden@debian.org>
[alx: wfix, ffix, and other tweaks]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Wyatt Carpenter <wyattscarpenter@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
These sponsors started sponsoring this project in 2024-11-01.
Thanks a lot for that!
For anyone interested in sponsoring this project, please contact the
maintainer and/or mailing list.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Recently, I submitted my first patch to the Linux man-pages project. In
my patch, I had created a new manual page. On the manual page’s title
line, I had written the title of my new page in all caps because
man-pages(7) said that I should write it that way. It turns out that
man-pages(7) was wrong and that the title on the title line should have
matched the title in the manual page’s filename [1][2]. This commit
corrects man-pages(7) so that it does not tell contributors to use all
caps when writing titles on title lines.
Link: [1] <https://lore.kernel.org/linux-man/rph24kz36vysoeix4qoxxxcwq3c3fskws2vmxkkgcb2lpits3f@ysm7ug66svzh/T/#mc84250a6634d7f776118879021331001cceccbe5>
Link: [2] <https://lore.kernel.org/linux-man/mog6nnwzwl2dmlrec5b7l76wbxlsnklvdulok644x6o557trib@3zwtoz47r4x3/T/#mf71422d0e159210a7ca2798f2bba50a668e1410e>
Message-ID: <20250114211427.160509-1-jason@jasonyundt.email>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The _exit(2) function is a better choice for exiting a child in many
cases. Most prominently it avoids calls of functions registered with
atexit(3) by the parent.
There are valid reasons to call exit(3) and the example is actually one
of them: flush FILE-based output. Since atexit(3) is never called, we
could just stay with exit(3).
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Message-ID: <tngwcffbrzbfkj6vrxgxpekrp3bzuftdy2mzow56xyfkrcna2w@nbgr2ourerxo>
Link: <https://github.com/shadow-maint/shadow/pull/1171>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
types
Due to different spacing, I had missed these ones in the previous
commits of this kind.
Suggested-by: Jorenar <dev@jorenar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 8c74a1cea495 (2016-07-07; "user_namespaces.7: Clarify details of CAP_SYS_ADMIN and cgroup v1 mounts")
Signed-off-by: Alexander Stepchenko <geochip@altlinux.org>
Message-ID: <bc17315eff26eb31ecc78a2c44b89dfb077813df.1736444255.git.geochip@altlinux.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Document the new STATX_DIO_READ_ALIGN flag and the new
stx_dio_read_offset_align field guarded by it.
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Chandan Babu R <chandan.babu@oracle.com>
Cc: Hongbo Li <lihongbo22@huawei.com>
Cc: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: <linux-nilfs@vger.kernel.org>
Cc: <linux-fsdevel@vger.kernel.org>
Cc: <linux-xfs@vger.kernel.org>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Message-ID: <20250109083226.GA22264@lst.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
It was useful for implementing duffman(1), but now it doesn't use it
anymore. Drop this program.
Users can do this instead:
$ MAN_KEEP_FORMATTING=1 diff -u <(man page1) <(man page2);
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|