Quoting Florian:
This does not work because libm.so can be a linker script:
handle = dlopen("libm.so", RTLD_LAZY);
The proper way to do this is to include <gnu/lib-names.h>
and use LIBM_SO.
See https://bugzilla.kernel.org/show_bug.cgi?id=108821
Reported-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
As noted by Florian Weimer:
The manual daemon(3) manual page talks about the "calling
process's current working directory". I think this is
misleading because the function exits the calling process
before changing the current directory.
Reported-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Employ a pseudo-alphabetical order, ordering options after removal
of any "PR_", "PR_SET_", or "PR_GET" prefix.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The PR_SET_SECCOMP EPERM error path was never reachable in strict
mode, and the actual kernel code was removed in Linux 3.5.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
s/la_pltenter()/la_pltexit()/
la_pltenter() is called regardless of the value of
framesizep but la_pltexit() is called only if la_pltenter()
returns with non-zero framesizep set. I spent long time to
figure out why la_pltexit() is not called at all.
Quoting comments in glibc/sysdeps/x86_64/dl-trampoline.h:
/* There's nothing in the frame size, so there
will be no call to the _dl_call_pltexit. */
and
/* At this point we need to prepare new stack for the function
which has to be called. We copy the original stack to a
temporary buffer of the size specified by the 'framesize'
returned from _dl_profile_fixup */
I think it's because it needs to preserve 'inregs' to be passed to
la_pltexit().
The _dl_profile_fixup() sets the '*framesizep' to maximum value of
what la_pltenter() sets. Please see glibc/elf/dl-runtime.c file.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Kernel 4.4 added two new core dump filtering flags,
MMF_DUMP_DAX_PRIVATE and MMF_DUMP_DAX_SHARED.
These flags allow us to explicitly filter DAX mappings.
This is desirable because DAX mappings, like hugetlb
mappings, have the potential to be very large.
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This is not mentioned anywhere. Users can assume that the file
being read is something like /etc/$DATABASE, but that's not
always the case. It's better to explicitly specify which
file is read for each respective database. The list of
files was acquired from glibc source code.
Signed-off-by: Nikola Forró <nforro@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
As far as the patch author knows, at least the following
alternative C libraries for linux also provide the
1-argument variant:
* uclibc: all public releases.
* dietlibc: 0.7.2 and all later releases; reboot() was not provided in
0.7.1 and earlier releases.
* musl: all public releases.
* klibc: all public releases.
* bionic: all public releases.
... which should already cover most use cases.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>