musl/include/sys/procfs.h, branch master musl - an implementation of the standard library for Linux-based systems fix elf_prstatus regression on time64, existing wrong definition on x32 2019年12月22日T16:20:44+00:00 Rich Felker dalias@aerifal.cx 2019年12月22日T16:20:44+00:00 3f959f6f76f16b7d954a6d8a134f3c30228d3be0 the elf_prstatus structure is used in core dumps, and the timeval structures in it are longs matching the elf class, *not* the kernel "old timeval" for the arch. this means using timeval here for x32 was always wrong, despite kernel uapi headers and glibc also exposing it this way, and of course it's wrong for any arch with 64-bit time_t. rather than just changing the type on affected archs, use a tagless struct containing long tv_sec and tv_usec members in place of the timevals. this intentionally breaks use of them as timevals (e.g. assignment, passing address, etc.) on 64-bit archs as well so that any usage unsafe for 32-bit archs is caught even in software that only gets tested on 64-bit archs. from what I could gather, there is not any software using these members anyway. the only reason they need to be fixed to begin with is that the only members which are commonly used, the saved registers, follow the time members and have the wrong offset if the time members are sized incorrectly.
the elf_prstatus structure is used in core dumps, and the timeval
structures in it are longs matching the elf class, *not* the kernel
"old timeval" for the arch. this means using timeval here for x32 was
always wrong, despite kernel uapi headers and glibc also exposing it
this way, and of course it's wrong for any arch with 64-bit time_t.
rather than just changing the type on affected archs, use a tagless
struct containing long tv_sec and tv_usec members in place of the
timevals. this intentionally breaks use of them as timevals (e.g.
assignment, passing address, etc.) on 64-bit archs as well so that any
usage unsafe for 32-bit archs is caught even in software that only
gets tested on 64-bit archs. from what I could gather, there is not
any software using these members anyway. the only reason they need to
be fixed to begin with is that the only members which are commonly
used, the saved registers, follow the time members and have the wrong
offset if the time members are sized incorrectly.
make brace placement in public header struct definitions consistent 2016年07月03日T19:02:25+00:00 Rich Felker dalias@aerifal.cx 2016年07月03日T18:40:11+00:00 befa5866ee30d09c0c96e88af2eabff5911342ea placing the opening brace on the same line as the struct keyword/tag is the style I prefer and seems to be the prevailing practice in more recent additions. these changes were generated by the command: find include/ arch/*/bits -name '*.h' \ -exec sed -i '/^struct [^;{]*$/{N;s/\n/ /;}' {} + and subsequently checked by hand to ensure that the regex did not pick up any false positives.
placing the opening brace on the same line as the struct keyword/tag
is the style I prefer and seems to be the prevailing practice in more
recent additions.
these changes were generated by the command:
find include/ arch/*/bits -name '*.h' \
-exec sed -i '/^struct [^;{]*$/{N;s/\n/ /;}' {} +
and subsequently checked by hand to ensure that the regex did not pick
up any false positives.
fix misplaced indention in sys/procfs.h 2016年07月03日T19:02:24+00:00 Rich Felker dalias@aerifal.cx 2016年07月03日T18:38:53+00:00 093288dcb37a30c634b0a00eb7e2a0dbe72ebf95
in sys/procfs.h, avoid using __WORDSIZE macro 2014年03月08日T05:50:19+00:00 Rich Felker dalias@aerifal.cx 2014年03月08日T05:50:19+00:00 73f5b096056e03d8e27965040faee0af778517fc this was problematic because several archs don't define __WORDSIZE. we could add it, but I would rather phase this macro out in the long term. in our version of the headers, UINTPTR_MAX is available here, so just use it instead.
this was problematic because several archs don't define __WORDSIZE. we
could add it, but I would rather phase this macro out in the long
term. in our version of the headers, UINTPTR_MAX is available here, so
just use it instead.
make sys/procfs.h mostly work on most archs 2012年11月26日T03:28:18+00:00 Rich Felker dalias@aerifal.cx 2012年11月26日T03:28:18+00:00 4b75f4ed8d08b26d4bf2ac96191b395218ad888e these structures are purely for use by trace/debug tools and tools working with core files. the definition of fpregset_t, which was previously here, has been removed because it was wrong; fpregset_t should be the type used in mcontext_t, not the type used in ptrace/core stuff.
these structures are purely for use by trace/debug tools and tools
working with core files. the definition of fpregset_t, which was
previously here, has been removed because it was wrong; fpregset_t
should be the type used in mcontext_t, not the type used in
ptrace/core stuff.
fix some details in ugly stuff that doesn't belong in libc 2011年10月17日T16:23:04+00:00 Rich Felker dalias@aerifal.cx 2011年10月17日T16:23:04+00:00 03860303c298f2ec7a9c0de683a68f4ab61697f0 patches by sh4rm4, presumably needed to make gdb or some similar junk happy...
patches by sh4rm4, presumably needed to make gdb or some similar junk
happy...
initial check-in, version 0.5.0 2011年02月12日T05:22:29+00:00 Rich Felker dalias@aerifal.cx 2011年02月12日T05:22:29+00:00 0b44a0315b47dd8eced9f3b7f31580cf14bbfc01

AltStyle によって変換されたページ (->オリジナル) /