ld.so.8: Clarify LD_PROFILE in secure-execution mode
Different than specified, glibc 2.2.5 does not ignore LD_PROFILE in
secure-execution mode. Instead, it uses the default LD_PROFILE_OUTPUT
(/var/profile) folder.
Axel Rasmussen [Tue, 17 Oct 2023 23:01:08 +0000 (16:01 -0700)]
ioctl_userfaultfd.2: Clarify the state of the uffdio_api structure on error
The old FIXME noted that the zeroing was done to differentiate the two
EINVAL cases. It's possible something like this was true historically,
but in current Linux we zero it in *both* EINVAL cases, so this is at
least no longer true.
After reading the code, I can't determine any clear reason why we zero
it in some cases but not in others. So, some simple advice we can give
userspace is: if an error occurs, treat the contents of the structure as
unspecified. Just re-initialize it before retrying UFFDIO_API again.
Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org> Cc: Peter Xu <peterx@redhat.com> Signed-off-by: Axel Rasmussen <axelrasmussen@google.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Matthew House [Sun, 15 Oct 2023 00:50:27 +0000 (20:50 -0400)]
fanotify.7: Fix field name in struct fanotify_event_info_fid
The final field of this struct as defined in include/uapi/linux/fanotify.h
(and as used in the example program) is called handle, not file_handle.
Fix this, and also replace the zero-length array with a flexible array
member to match the definition in the header.
Fixes: 0a4db6dc742d ("fanotify.7, fanotify_init.2, fanotify_mark.2: Document FAN_REPORT_FID and directory modification events") Signed-off-by: Matthew House <mattlloydhouse@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Don Brace [Wed, 11 Oct 2023 19:00:23 +0000 (14:00 -0500)]
smartpqi.4: Add host attributes
Add in some host level sysfs entries:
enable_stream_detection - Send RAID 5/6 writes down the normal I/O path.
Allow for full-stripe write requests.
ssd_smart_path_enabled - Indicates that our Accelerated I/O (AIO) path
is enabled (AIO).
enable_r5_writes - Allow RAID 5 write operations down the AIO path.
enable_r6_writes - Allow RAID 6 write operations down the AIO path.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Rik van Riel [Thu, 12 Oct 2023 01:46:52 +0000 (21:46 -0400)]
execve.2: execve() also returns E2BIG if a string is too long
The execve syscall returns -E2BIG in 3 cases:
- The total length of the command line arguments and environment is too
large.
- An argument or environment string (including the NUL byte) is longer
than MAX_ARG_STRLEN.
- The full path to the executable (including the NUL byte) exceeds
MAX_ARG_STRLEN.
Spell out all 3 cases in the -E2BIG section.
Discovered by moving a too large commandline parameter to an environment
variable, and finding that things still did not work. Examined the code
in fs/exec.c to get the details.
This simple shell script starts failing at 2^17 on a system with 4kB
page size:
#!/bin/sh
STRING="a"
for loop in `seq 20`; do
STRING="$STRING$STRING"
export STRING
if /bin/true ; then
: # still under the limit
else
echo "fork failed at loop $loop"
fi
done
./exec2big.sh: line 10: /bin/true: Argument list too long
fork failed at loop 17
Suggested-by: Matthew House <mattlloydhouse@gmail.com> Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Don Brace [Tue, 3 Oct 2023 19:54:35 +0000 (14:54 -0500)]
smartpqi.4: FILES: wfix: Change "Logical drives" to "Disk drives" for /dev/sd*.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Allow user to change the length of time that the driver
will wait for the controller to become ready.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Axel Rasmussen [Tue, 3 Oct 2023 19:45:44 +0000 (12:45 -0700)]
ioctl_userfaultfd.2: Correct and update UFFDIO_API ioctl error codes
First, it is not correct that repeated UFFDIO_API calls result in
EINVAL. This is true *if both calls enable features*, but in the case
where we're doing a two-step feature detection handshake, the kernel
explicitly expects 2 calls (one with no features set). So, correct this
description.
Then, some new error cases have been added to the kernel recently, and
the man page wasn't updated to note these. So, add in descriptions of
these new error cases.
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com> Cc: Peter Xu <peterx@redhat.com> Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Fully describe how UFFDIO_API can be used to perform a two-step feature
handshake, and also note the case where this isn't necessary (programs
which don't depend on any extra features).
This lets us clean up an old FIXME asking for this to be described.
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com> Cc: Peter Xu <peterx@redhat.com> Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Replace blank lines by either a no-op '.', the dummy character '\&', or
an appropriate paragraphing macro. I've experimented with two '.' lines
before section headings, which may increase readability.
Xavier asked that his name be removed from the AUTHOR section, and since
we don't use that section in this project, we can just wipe it.
Add copyright notices to the pages, with Xavier as the original author,
and me, who will maintain them from now on. Xavier ACKed the
Linux-man-pages-copyleft license.
Adapt the TH line:
- Specify the date as (date).
- Specify the project name in the 4th arg.
- The first arg, the page name, must be the same as the file name.
pthread_cond_init.3, pthread_condattr_init.3, pthread_key_create.3, pthread_mutex_init.3, pthread_mutexattr_setkind_np.3, pthread_once.3: Update the glibc pages with the debian/glibc version of them
Import debian/local/manpages/pthread_*.3 git history from debian/glibc
I extracted the same pages that we imported from glibc, from the Debian
package history. They were imported from glibc to Debian, so we will be
able to pick those updates too. Below is the process.
Aurelien Jarno [Fri, 29 Nov 2013 11:00:45 +0000 (11:00 +0000)]
* Remove linuxthreads from the tarball:
- rules.d/tarball.mk: don't fetech linuxthreads and linuxthreads_db.
- rules.d/build.mk: don't build linuxthreads manpages.
- rules: don't run make clean in linuxthreads directory.
- patches/any/local-sysctl.diff: drop the linuxthreads part.
- patches/all/local-pthread-manpages.diff: remove.
- local/manpages/pthread_*.3: import the few remaining linuxthreads
manpages.
- debhelper.in/glibc-doc.manpages: update manpage locations.
I extracted the linuxthreads/man/ subdirectory from the glibc git
repository. I also removed from that subdir the pages that we already
have in this project. Then rebased on top of the Linux man-pages HEAD.
Below is the process.
Ulrich Drepper [Wed, 11 Mar 1998 12:42:25 +0000 (12:42 +0000)]
LinuxThreads library.
1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
* linuxthreads/manager.c: Enable resetting of the thread
scheduling policy to SCHED_OTHER when the parent thread
has a different one.
1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
_POSIX_ASYNCHRONOUS_IO.
* sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
mutexes.
* mutex.c: Implement new mutex types.
* internals.h: Include <signal.h>.
* libpthread.map: Add __erno_location and __h_errno_location.
* errno.c: Return pointer to variable actually in use. This might
not be the one in the thread structure.
* internals.h (struct _pthread_descr_struct): Add new fields p_errnop
and p_h_errnop.
* manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
of manager thread structure.
(pthread_handle_create): Set p_errnop and p_h_errnop members for new
thread.
* pthread.c: Adapt initializer for thread structures.
(__pthread_initial_thread): Set p_errnop and p_h_errnop member.
(__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
current thread to global variables.
1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
* rwlock.c: New file.
* Makefile (libpthread-routines): Add rwlock.
* sysdeps/pthread/pthread.h: Define data structures and declare
functions.
* libpthread.map: Add new functions.
1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
* sysdeps/arm/pt-machine.h: New file; add ARM support.
* sysdeps/arm/Implies: likewise.
* README: Document it.
1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* signals.c: Remove unneeded initializer for sigwaited, saving a
1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* semaphore.c (sem_init): Set sem_spinlock only if available.
1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
* mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
* sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
* Makefile: Update from LinuxThreads 0.7.
* internals.h. Likewise.
* manager.c: Likewise.
* mutex.c: Likewise.
* pthread.c: Likewise.
* signals.c: Likewise.
* specific.c: Likewise.
* Examples/ex3.c: Likewise.
1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
* pthread.c (__pthread_reset_main_thread): Close pipe only if still
open.
1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
* wrapsyscall.c: Add socket functions which are also cancelation
points.
* internals.h (struct _pthread_descr_struct): Add definitions for
two-level specific key handling.
* manager.c (pthread_handle_create): Initialize specific memory array.
* specific.c: Implement two-level key handling.
* weaks.c: Don't provide dummy key handling.
* sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
Add definition of __libc_key_t.
* sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
as 1024.
Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
PTHREAD_DESTRUCTOR_ITERATIONS.
* manager.c (pthread_handle_create): Compare mmap result with
MAP_FAILED.
* ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
* sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
* internals.h: Change definition of THREAD_SELF to be an expression,
not a statement that did a return.
* sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
* sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
Follow Solaris and use a "system reserved" register (%g6) to hold
the thread descriptor.
* sysdeps/sparc/sparc64/pt-machine.h: Likewise.
* spinlock.h (acquire): Use __sched_yield not sched_yield.
* queue.h (enqueue): Enqueue thread according to priority.
* internals.c (struct pthread_start_args): New struct for passing
args to cloning function.
(struct _pthread): Rename to _pthread_descr_struct and adapt for
opaque pthread_t.
* Examples/Makefile (clean): Pass -f option to rm.
* sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
and define TEST_FOR_COMPARE_AND_SWAP.
* sysdeps/i386/i486/pt-machine.h: Removed.
* sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
to 1024.
* restart.h (suspend): Clear p_signal before suspending.
(suspend_with_cancellation): Likewise.
Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
* weaks.c: Make __pthread_key_create return 1.
* sysdeps/pthread/libc-lock.h: Define __libc_key_create,
__libc_getspecific, __libc_setspecific, and __libc_key_t.
* sysdeps/pthread/stdio-lock.h: Don't care for implementation not
using libio.
1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
* linuxtheads/pthread.c (__pthread_initial_thread): Correct
initializer.
(__pthread_manager_thread): Likewise.
Reported by Andreas Jaeger.
1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
Since sigset_t no longer fits in a register, we can't pass in the
thread's initial mask so easily. Take this opportunity to simplify
the clone implementation by only accepting a single void* argument.
* linuxthreads/manager.c (__pthread_manager): Put thread vitals
in the thread struct instead of as arguments through clone.
(pthread_start_thread): Look for them there.
* linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
* linuxthreads/pthread.c (pthread_initialize_manager): Revise
clone invocation.
Don Brace [Tue, 26 Sep 2023 19:12:02 +0000 (14:12 -0500)]
smartpqi.4: sas_address contains the SAS address
Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Don Brace [Tue, 26 Sep 2023 19:12:02 +0000 (14:12 -0500)]
smartpqi.4: wfix
Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Don Brace [Wed, 27 Sep 2023 15:45:47 +0000 (10:45 -0500)]
smartpqi.4: SEE ALSO: Add sg(4) entry
The sg driver can interface with smartpqi.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Add in a description for module parameter disable_managed_interrupts.
This module parameter allows users to disable automatic irq affinity
setting by turning off the PCI_IRQ_AFFINITY flag when requesting
interrupts.
When the flag PCI_IRQ_AFFINITY is set, users cannot change the interrupt
affinity through /proc/irq/<irq#>/*affinity*
Some customers would like to change interrupt affinity based on their
requirements.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Don Brace [Tue, 26 Sep 2023 19:11:57 +0000 (14:11 -0500)]
smartpqi.4: Update module parameter descriptions
Minor changes to the descriptions of the following module parameters:
disable_device_id_wildcards
disable_heartbeat
disable_ctrl_shutdown
expose_ld_first
hide_vsep
Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Don Brace [Tue, 26 Sep 2023 19:11:56 +0000 (14:11 -0500)]
smartpqi.4: Update copyright, email addresses, and URLs
Add Copyright entry for Microchip.
Change e-mail addresses from Microsemi to Microchip.
Change URL to Microchip.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Several new features have been added to the kernel recently, and the man
page wasn't updated to describe these new features. So, add in
descriptions of any missing features.
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Axel Rasmussen [Tue, 19 Sep 2023 19:02:00 +0000 (12:02 -0700)]
ioctl_userfaultfd.2: ffix + wfix
- Fix missing paragraph tag. The lack of this tag yielded no blank
line in the rendere dpage, which is inconsistent with style
elsewhere.
- The description of UFFDIO_WRITEPROTECT was a sentence fragment; the
last half of the sentence was left out by mistake. Add it in to fix
the issue.
- Move UFFDIO_WRITEPROTECT 'since' to its own line. All other ioctls
note the kernel version introduced on a separate line from the ioctl
name. Update UFFDIO_WRITEPROTECT to match the existing style.
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Axel Rasmussen [Tue, 19 Sep 2023 19:01:59 +0000 (12:01 -0700)]
userfaultfd.2: Comment on feature detection in the example program
The example program doesn't depend on any extra features, so it does not
make use of the two-step feature handshake process. This is fine, but it
might set a bad example for programs which *do* depend on specific
features (e.g. they may conclude they don't need to do anything to
enable / detect them).
No need to make the example program more complicated: let's just add a
comment indicating why we do it the way we do it in the example, and
describing briefly what a more complicated program would need to do
instead.
The comment is kept rather brief; a full description of this feature
will be included in ioctl_userfaultfd.2 instead.
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Axel Rasmussen [Tue, 19 Sep 2023 19:01:58 +0000 (12:01 -0700)]
userfaultfd.2: Reword to account for new fault resolution ioctls
Basically, reword the sentence to clarify that this isn't a complete
list. I don't believe it's worth maintaining a fully complete list
here, instead ioctl_userfaultfd.2 is the place to do that. Let this just
be an example.
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
ioctl.2: Note "int request" form, HISTORYise a bit
Bit me in <https://github.com/thecoshman/http/issues/155>:
musl (and, thus, bionic) takes an int!
Kill the "POSIX says 'request' is int" comment;
prior to Issue 7, ioctl() is shaded STREAMS,
it's obsolescent in Issue 7,
and gone completely in Issue 8.
The POSIX interface has never been supported by Linux,
and the common ioctl() interface has never existed in POSIX or the SUS.
Note how the interface evolved in HISTORY. The NetBSD CVS has
revision 1.1
date: 1993-03-21 10:45:37 +0100; author: cgd; state: Exp;
branches: 1.1.1;
Initial revision
----------------------------
revision 1.1.1.2
date: 1995-02-27 11:49:43 +0100; author: cgd; state: Exp; lines: +6
-6;
from Lite
----------------------------
revision 1.1.1.1
date: 1993-03-21 10:45:37 +0100; author: cgd; state: Exp; lines: +0
-0;
initial import of 386bsd-0.1 sources
----------------------------
and it's char * in 1.1.1.1 and 1.1.1.2 but ... in 1.1, so hell knows.
Amir Goldstein [Wed, 6 Sep 2023 07:42:51 +0000 (10:42 +0300)]
name_to_handle_at.2,fanotify_mark.2: Document the AT_HANDLE_FID flag
A flag to indicate that the requested file_handle is not intended
to be used for open_by_handle_at(2) and may be needed to identify
filesystem objects reported in fanotify events.
Reviewed-by: Jan Kara <jack@suse.cz> Acked-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Amir Goldstein <amir73il@gmail.com> Cc: Tom Schwindl <schwindl@posteo.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Avinesh Kumar [Tue, 29 Aug 2023 10:30:01 +0000 (16:00 +0530)]
inode.7: tfix: Correct the field name for number of blocks
Fixes: b48c75727c64 ("inode.7: New page with information about inodes") Signed-off-by: Avinesh Kumar <akumar@suse.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Avinesh Kumar [Tue, 29 Aug 2023 10:30:00 +0000 (16:00 +0530)]
inode.7: Remove duplicate field name
Fixes: b48c75727c64 ("inode.7: New page with information about inodes") Signed-off-by: Avinesh Kumar <akumar@suse.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
time(ptr) was wrong here, because struct utmp::ut_time is a int32_t, not
a time_t. Also, the use of time(ptr) is obsolete, and time(NULL) is
always preferred.
getaddrinfo_a.3: EXAMPLES: Use a safer wrapper around *alloc*(3) functions
These wrappers result in cleaner code, and prevent many mistakes that
can happen when using malloc(3), calloc(3), realloc(3), and functions of
that family.
- Arguments to the shell need to go in .SHELLFLAGS.
- env(1) needs -S to split arguments to it.
Maybe it's not necessary in make(1), though; not sure.
- The scripts are passed to the shell as arguments, not via stdin;
thus, we need -c.
Cc: Paul Smith <psmith@gnu.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>