]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 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>
18 months agoCONTRIBUTING, CONTRIBUTING.d/lint: Split CONTRIBUTING file
Alejandro Colomar [Sat, 3 Feb 2024 21:08:01 +0000 (22:08 +0100)] 
CONTRIBUTING, CONTRIBUTING.d/lint: Split CONTRIBUTING file

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

Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agoCONTRIBUTING, CONTRIBUTING.d/bugs, README: Split CONTRIBUTING file
Alejandro Colomar [Sat, 3 Feb 2024 20:48:49 +0000 (21:48 +0100)] 
CONTRIBUTING, CONTRIBUTING.d/bugs, README: Split CONTRIBUTING file

Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agoCONTRIBUTING: neomutt(1) can now be used to sign patches
Alejandro Colomar [Fri, 26 Jan 2024 13:24:50 +0000 (14:24 +0100)] 
CONTRIBUTING: neomutt(1) can now be used to sign patches

Link: <https://github.com/neomutt/neomutt/issues/1471>
Link: <https://github.com/neomutt/neomutt/pull/4134>
Link: <https://neomutt.org/feature/cli-crypto>
Cc: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agofrexp.3: ISO C defines frexp(3) in terms of 2, not FLT_RADIX
Alejandro Colomar [Mon, 29 Jan 2024 12:23:19 +0000 (13:23 +0100)] 
frexp.3: ISO C defines frexp(3) in terms of 2, not FLT_RADIX

Even in systems where FLT_RADIX != 2, frexp(3) would be 2-based.
This was correctly worded in the DESCRIPTION, but the example program
was incorrect.

Link: <https://lore.kernel.org/linux-man/CANv4PNkqQBPn_oyfdYZfOck-7gGwzP6YPPA9hDaiaJPUj+c3xw@mail.gmail.com/T/#u>
Reported-by: Morten Welinder <mwelinder@gmail.com>
Cc: Matthew House <mattlloydhouse@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agoadjtime.3: wfix
Alejandro Colomar [Sun, 28 Jan 2024 20:25:45 +0000 (21:25 +0100)] 
adjtime.3: wfix

Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agocharsets.7: Say ISO/IEC 2375
Alejandro Colomar [Sun, 28 Jan 2024 20:20:07 +0000 (21:20 +0100)] 
charsets.7: Say ISO/IEC 2375

Link: <https://www.iso.org/standard/32184.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agoman*/: Say ISO 3166
Alejandro Colomar [Sun, 28 Jan 2024 20:18:32 +0000 (21:18 +0100)] 
man*/: Say ISO 3166

Link: <https://www.iso.org/iso-3166-country-codes.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agolocale.5: Say ISO 4217
Alejandro Colomar [Sun, 28 Jan 2024 20:16:17 +0000 (21:16 +0100)] 
locale.5: Say ISO 4217

Link: <https://www.iso.org/standard/64758.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agoman*/: Say ISO 639
Alejandro Colomar [Sun, 28 Jan 2024 20:13:25 +0000 (21:13 +0100)] 
man*/: Say ISO 639

Link: <https://www.iso.org/standard/74575.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agoman*/: Say ISO/IEC 646
Alejandro Colomar [Sun, 28 Jan 2024 20:11:50 +0000 (21:11 +0100)] 
man*/: Say ISO/IEC 646

Link: <https://www.iso.org/standard/4777.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agofilesystems.5: Say ISO/IEC 9660
Alejandro Colomar [Sun, 28 Jan 2024 20:03:06 +0000 (21:03 +0100)] 
filesystems.5: Say ISO/IEC 9660

Link: <https://www.iso.org/standard/81979.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agoman*/: Say ISO/IEC 8208
Alejandro Colomar [Sun, 28 Jan 2024 20:00:22 +0000 (21:00 +0100)] 
man*/: Say ISO/IEC 8208

Link: <https://www.iso.org/standard/33080.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agoman*/: Say ISO/IEC 6429
Alejandro Colomar [Sun, 28 Jan 2024 19:57:48 +0000 (20:57 +0100)] 
man*/: Say ISO/IEC 6429

Link: <https://www.iso.org/standard/12782.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agoman3/: Say ISO 8601
Alejandro Colomar [Sun, 28 Jan 2024 19:52:10 +0000 (20:52 +0100)] 
man3/: Say ISO 8601

Link: <https://www.iso.org/standard/70907.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agonl_langinfo.3: ffix
Alejandro Colomar [Sun, 28 Jan 2024 19:45:17 +0000 (20:45 +0100)] 
nl_langinfo.3: ffix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agoman*/: Say ISO/IEC 8859
Alejandro Colomar [Sun, 28 Jan 2024 19:44:20 +0000 (20:44 +0100)] 
man*/: Say ISO/IEC 8859

Link: <https://www.iso.org/standard/28245.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agoman*/: Say ISO/IEC 2022
Alejandro Colomar [Sun, 28 Jan 2024 19:17:56 +0000 (20:17 +0100)] 
man*/: Say ISO/IEC 2022

Link: <https://www.iso.org/standard/22747.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agocharsets.7: Say ISO/IEC 4873
Alejandro Colomar [Sun, 28 Jan 2024 19:08:00 +0000 (20:08 +0100)] 
charsets.7: Say ISO/IEC 4873

Link: <https://www.iso.org/standard/10859.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agoman*/: Use '(date)' in TH line
Alejandro Colomar [Sun, 28 Jan 2024 19:13:35 +0000 (20:13 +0100)] 
man*/: Use '(date)' in TH line

It seems those dates were accidentally hardcoded.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months ago*.mk: Allow pages with the suffix .man and no number
Alejandro Colomar [Mon, 22 Jan 2024 16:26:35 +0000 (17:26 +0100)] 
*.mk: Allow pages with the suffix .man and no number

This adds support for neomutt.man from the neomutt project.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agoopen.2: srcfix
G. Branden Robinson [Tue, 16 Jan 2024 15:33:55 +0000 (09:33 -0600)] 
open.2: srcfix

Migrate man page cross reference in non-filled context to font
alternation macro.  This is to prepare it for `MR` migration.

Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agosyscalls.2: ffix
G. Branden Robinson [Tue, 16 Jan 2024 13:40:20 +0000 (07:40 -0600)] 
syscalls.2: ffix

Refactor table format specification: use column modifiers to set heading
rows in bold instead of populating every entry in them with font
selection escape sequences.  Use a single '_' to indicate a horizontal
rule spanning the table.  Put vertical space before the table
(making it resemble a typographical "display") rather than after the
after the column heading.

Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agomremap.2: wfix
G. Branden Robinson [Tue, 16 Jan 2024 13:39:57 +0000 (07:39 -0600)] 
mremap.2: wfix

Recast to use language paralleling that of the MREMAP_DONTUNMAP
discussion elsewhere in the page.  Spotted these (excessively?)
abbreviated cross references while preparing for the `MR` man(7) macro
migration.

Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agofts.3, div_t.3type: ffix
G. Branden Robinson [Tue, 16 Jan 2024 13:39:40 +0000 (07:39 -0600)] 
fts.3, div_t.3type: ffix

Break lines containing a parametric prefix to a man page name into two
lines, using distinct font alternation macros and the `\c` escape
sequence to "connect" the output.  This prepares for adoption of the
`MR` man(7) macro in groff 1.23.0.

The style seen here assumes that the typeface used for man page names is
bold, which is ahistorical and which the `MR` feature makes
configurable.  It might be better to recast this shorthand into English.

Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 months agosocket.7: Mention CAP_NET_RAW on SO_MARK
Petr Vorel [Tue, 16 Jan 2024 11:04:18 +0000 (12:04 +0100)] 
socket.7: Mention CAP_NET_RAW on SO_MARK

Added in 079925cce1d0 ("net: allow SO_MARK with CAP_NET_RAW") in
Linux 5.17.

Cc: Maciej Żenczykowski <maze@google.com>
Cc: Matthias Gerstner <matthias.gerstner@suse.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agolocale.5: tfix
G. Branden Robinson [Sun, 14 Jan 2024 15:00:16 +0000 (09:00 -0600)] 
locale.5: tfix

...that proved surprisingly tough to troubleshoot.

I got the following output from my working copy.

grotty:...:(man5/locale.5):32291: error: output above first line discarded
grotty:...:(man5/locale.5):32291: error: output above first line discarded
grotty:...:(man5/locale.5):32291: error: output above first line discarded
grotty:...:(man5/locale.5):32291: error: output above first line discarded
grotty:...:(man5/locale.5):32291: error: output above first line discarded
grotty:...:(man5/locale.5):32291: error: output above first line discarded
grotty:...:(man5/locale.5):32291: error: output above first line discarded
grotty:...:(man5/locale.5):32291: error: output above first line discarded
grotty:...:(man5/locale.5):32291: error: output above first line discarded
grotty:...:(man5/locale.5):32292: error: output above first line discarded
grotty:...:(man5/locale.5):32294: error: output above first line discarded
grotty:...:(man5/locale.5):32294: error: output above first line discarded
grotty:...:(man5/locale.5):32294: error: output above first line discarded
grotty:...:(man5/locale.5):32294: error: output above first line discarded
grotty:...:(man5/locale.5):32294: error: output above first line discarded

`\r` is a perfectly legal *roff escape sequence, but one generally never
sees it in man pages.  In that case, the input line in question was at
the top of the "page" in continuous rendering mode, and so the attempt
at a reverse vertical motion did indeed put the drawing position above
the top of the page.

grepping reveals no other occurrences of '\r' in the man-pages corpus.

Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agocpuid.4: Note which CPUs don't support CPUID and what happens
наб [Thu, 4 Jan 2024 22:31:21 +0000 (23:31 +0100)] 
cpuid.4: Note which CPUs don't support CPUID and what happens

"Early 486" comes from an uncited wikipedia table, added in
<https://en.wikipedia.org/w/index.php?title=CPUID&diff=prev&oldid=592047209>
<https://en.wikipedia.org/w/index.php?title=CPUID&diff=prev&oldid=592047978>
but I spot-checked the rest of the table accurate to CPUs in my house
(the oldest of which is an original Celeron, so no 486),
and "early 486" is better than "early x86" which can mean anything.

This does leave earlier x86 unmentioned,
but Linux hasn't targeted those in over a decade,
so they're out of scope anyway.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agosched_getcpu.3: tfix
Alejandro Colomar [Mon, 1 Jan 2024 12:09:58 +0000 (13:09 +0100)] 
sched_getcpu.3: tfix

Fixes: 2b65a83f2983 ("Documents sched_getcpu(3), a wrapper for getcpu(2), provided since glibc 2.6.")
Reported-by: Shahab Ouraie <shahabouraie@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agofaccessat(2), utimensat(2): Document AT_EMPTY_PATH flag
Renzo Davoli [Sun, 10 Dec 2023 08:07:52 +0000 (09:07 +0100)] 
faccessat(2), utimensat(2): Document AT_EMPTY_PATH flag

utimensat() and faccessat() support the flag AT_EMPTY_PATH since
Linux 5.8.

(actually Linux 5.8 added faccessat2(): glibc wrapper for faccessat()
 uses faccessat2(), and faccessat2() does support AT_EMPTY_PATH).

Reuse the standard text used in many other -at manual pages.

Signed-off-by: Renzo Davoli <renzo@cs.unibo.it>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agofopencookie.3, stdio.3: wfix
наб [Fri, 29 Dec 2023 13:39:25 +0000 (14:39 +0100)] 
fopencookie.3, stdio.3: wfix

Suggested-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agostdio.3: Note down fmemopen(3), fopencookie(3), and open_[w]memstream(3)
наб [Tue, 26 Dec 2023 16:03:37 +0000 (17:03 +0100)] 
stdio.3: Note down fmemopen(3), fopencookie(3), and open_[w]memstream(3)

I was looking for fmemopen() to remember I was actually looking for
open_memstream(), and it was much more difficult than it ought to've
been.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agoopen_memstream.3: ffix
наб [Tue, 26 Dec 2023 16:04:14 +0000 (17:04 +0100)] 
open_memstream.3: ffix

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agoCONTRIBUTING: Reduce strength of encouragement
Alejandro Colomar [Fri, 22 Dec 2023 11:44:05 +0000 (12:44 +0100)] 
CONTRIBUTING: Reduce strength of encouragement

That paragraph may be confusing to those who don't know about PGP, so
reduce strength of encouragement.  But to those that know about PGP, and
know how to use it, please, please use it.

Suggested-by: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agoCONTRIBUTING: Accept patches in attachments
Alejandro Colomar [Fri, 22 Dec 2023 11:08:13 +0000 (12:08 +0100)] 
CONTRIBUTING: Accept patches in attachments

I use mutt(1), which works fine with patches as attachments, and the
mailing list archives also work fine with attachments.  Let's accept
attachments.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agoCONTRIBUTING: The Majordomo has been fired
Alejandro Colomar [Fri, 22 Dec 2023 10:57:10 +0000 (11:57 +0100)] 
CONTRIBUTING: The Majordomo has been fired

The infrastructure of the list was recently modified.  Now, all the
information to subscribe, unsubscribe, or other actions, are in
<https://subspace.kernel.org/vger.kernel.org.html>.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agoswapon.2: MAX_SWAPFILES: Clarify limit after decrease
Yang Xu [Fri, 22 Dec 2023 03:07:08 +0000 (22:07 -0500)] 
swapon.2: MAX_SWAPFILES: Clarify limit after decrease

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agoioctl_console.2: Document new CAP_SYS_ADMIN restrictions (since Linux 6.7)
Günther Noack [Fri, 1 Dec 2023 12:26:45 +0000 (13:26 +0100)] 
ioctl_console.2: Document new CAP_SYS_ADMIN restrictions (since Linux 6.7)

Since Linux commit 8d1b43f6a6df7bce ("tty: Restrict access to TIOCLINUX'
copy-and-paste subcommands"), the TIOCL_SETSEL, TIOCL_PASTESEL and
TIOCL_SELLOADLUT subcommands require CAP_SYS_ADMIN.

Cc: Hanno Böck <hanno@hboeck.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Günther Noack <gnoack@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agosendfile.2: Pull in_fd type requirements up to 6.7
наб [Thu, 21 Dec 2023 01:31:35 +0000 (02:31 +0100)] 
sendfile.2: Pull in_fd type requirements up to 6.7

But this does mean that since 5.12, it supports
(5.12 has ISREG|ISBLK, this actually matches 6.0 semantics):
  any      -> pipe  via splice
  seekable -> any

Also, there are many seekable files which aren't regular,
and the offset is updated regardless.
This is obvious, but the wording is clumsy.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agounix.7: SO_PEERCRED: Mention listen(2)
Alexey Tikhonov [Wed, 20 Dec 2023 17:28:34 +0000 (18:28 +0100)] 
unix.7: SO_PEERCRED: Mention listen(2)

In case of connected AF_UNIX stream sockets, server-side credentials are
set at the time of a call to listen(2), not when client-side calls
connect(2).

This is important if server side process changes UID/GID after listen(2)
and before connect(2).

Reproducer is available in [1].
Behavior was confirmed in the email thread [2].

Link: [1] <https://bugzilla.redhat.com/show_bug.cgi?id=2247682>
Link: [2] <https://lore.kernel.org/linux-man/CABPeg3a9L0142gmdZZ+0hoD+Q3Vgv0BQ21g8Z+gf2kznWouErA@mail.gmail.com/>
Signed-off-by: Alexey Tikhonov <atikhono@redhat.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agostrtol.3, strtoul.3: If the base is not supported, endptr may be left untouched
Alejandro Colomar [Tue, 19 Dec 2023 12:23:14 +0000 (13:23 +0100)] 
strtol.3, strtoul.3: If the base is not supported, endptr may be left untouched

Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agoREADME: Versions: Document the online pages in man7.org
Alejandro Colomar [Sun, 17 Dec 2023 13:37:20 +0000 (14:37 +0100)] 
README: Versions: Document the online pages in man7.org

Michael's online pages seem to be more-or-less up-to-date now.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agostring_copying.7: EXAMPLES: st[rp]ncpy(3): Use fwrite(3) instead of a loop
Alejandro Colomar [Sun, 17 Dec 2023 12:56:39 +0000 (13:56 +0100)] 
string_copying.7: EXAMPLES: st[rp]ncpy(3): Use fwrite(3) instead of a loop

Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agostring_copying.7: Use NITEMS() instead of sizeof()
Alejandro Colomar [Sun, 17 Dec 2023 12:45:15 +0000 (13:45 +0100)] 
string_copying.7: Use NITEMS() instead of sizeof()

For these byte functions, sizeof() works as well as NITEMS(), since
CHAR_BIT == 1.  However, equivalent wide-character functions need
NITEMS(), which is semantically more appropriate, and also safer (it
cannot be applied to pointers).

Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agostring_copying.7: EXAMPLES: Update stpecpy() example
Alejandro Colomar [Sun, 17 Dec 2023 12:41:22 +0000 (13:41 +0100)] 
string_copying.7: EXAMPLES: Update stpecpy() example

The function was changed recently to return NULL on truncation; update
the example of use accordingly.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agostring_copying.7: stpecpy(): Reimplement as a wrapper of strtcpy()
Alejandro Colomar [Fri, 15 Dec 2023 14:25:36 +0000 (15:25 +0100)] 
string_copying.7: stpecpy(): Reimplement as a wrapper of strtcpy()

Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agostring_copying.7: stpecpy(): Return NULL on truncation
Alejandro Colomar [Fri, 15 Dec 2023 14:18:15 +0000 (15:18 +0100)] 
string_copying.7: stpecpy(): Return NULL on truncation

This makes it simpler to test the return value, and since it sets errno
to find out the reason, we don't need a complex return value.

Now that (dst == end) shouldn't happen, use ENOBUFS to report that
error.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agostring_copying.7: stpecpy(), strtcpy(): Set errno on failure
Alejandro Colomar [Fri, 15 Dec 2023 13:52:58 +0000 (14:52 +0100)] 
string_copying.7: stpecpy(), strtcpy(): Set errno on failure

Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agoswapon.2: Adjust decreased value under CONFIG_PTE_MARKER
Yang Xu [Tue, 5 Dec 2023 06:30:17 +0000 (01:30 -0500)] 
swapon.2: Adjust decreased value under CONFIG_PTE_MARKER

Since linux 5.19[1], MAX_SWAPFILES will be futher decreased
1 if kernel built with CONFIG_PTE_MARKER.

Link: [1] <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/linux/swap.h?id=679d10331>
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
19 months agoswapon.2: Adjust decreased value under CONFIG_MIGRATION
Yang Xu [Tue, 5 Dec 2023 06:30:16 +0000 (01:30 -0500)] 
swapon.2: Adjust decreased value under CONFIG_MIGRATION

Since Linux 5.19[1], the limit is decreased by 3 instead of 2.

Link: [1] <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/linux/swap.h?id=6c287605f>
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
20 months agoscanf.3: BUGS: It's impossible to know how many characters were consumed
Alejandro Colomar [Sat, 9 Dec 2023 12:35:19 +0000 (13:35 +0100)] 
scanf.3: BUGS: It's impossible to know how many characters were consumed

Suggested-by: Zack Weinberg <zack@owlfolio.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
20 months agoscanf.3, sscanf.3: These functions scan formatted input
Alejandro Colomar [Sat, 9 Dec 2023 11:50:22 +0000 (12:50 +0100)] 
scanf.3, sscanf.3: These functions scan formatted input

Suggested-by: Lee Griffiths <poddster@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
20 months agombind.2: Add mode flag MPOL_F_NUMA_BALANCING
Yafang Shao [Fri, 8 Dec 2023 09:05:53 +0000 (09:05 +0000)] 
mbind.2: Add mode flag MPOL_F_NUMA_BALANCING

In Linux Kernel 5.12, a new mode flag, MPOL_F_NUMA_BALANCING, was
added to set_mempolicy() to optimize the page placement among the
NUMA nodes with the NUMA balancing mechanism even if the memory of
the applications is bound with MPOL_BIND.

In Linux Kernel 5.15, this mode flag was extended to mbind(2). Let's
also add man-page for mbind(2). It is copied from set_mempoicy(2)
man-page with subtle modifications.

Related kernel commits:
bda420b985054a3badafef23807c4b4fa38a3dff
6d2aec9e123bb9c49cb5c7fc654f25f81e688e8c

Suggested-by: "Huang, Ying" <ying.huang@intel.com>
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>