<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/include/sys, branch v1.2.0</title>
<subtitle>musl - an implementation of the standard library for Linux-based systems</subtitle>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/'/>
<entry>
<title>fix misleading use of _POSIX_VDISABLE in sys/ttydefaults.h</title>
<updated>2020-01-29T15:47:48+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2020-01-29T15:47:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=e6093b5a870a38ebfb3e54382acd48c698bde15d'/>
<id>e6093b5a870a38ebfb3e54382acd48c698bde15d</id>
<content type='text'>
_POSIX_VDISABLE is only visible if unistd.h has already been included,
so conditional use of it here makes no sense. the value is always 0
anyway; it does not vary.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
_POSIX_VDISABLE is only visible if unistd.h has already been included,
so conditional use of it here makes no sense. the value is always 0
anyway; it does not vary.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix unprotected macro argument in sys/ttydefaults.h</title>
<updated>2020-01-29T15:47:19+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2020-01-29T15:47:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=a0217a2ff78ce88fe90e3345d2ee35ab53e3901e'/>
<id>a0217a2ff78ce88fe90e3345d2ee35ab53e3901e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>define RLIMIT_RTTIME, bump RLIMIT_NLIMITS</title>
<updated>2020-01-12T02:10:41+00:00</updated>
<author>
<name>Leah Neukirchen</name>
<email>leah@vuxu.org</email>
</author>
<published>2020-01-11T19:16:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=2507e7f5312e79620f6337935d0a6c9045ccba09'/>
<id>2507e7f5312e79620f6337935d0a6c9045ccba09</id>
<content type='text'>
This macro exists since Linux 2.6.25 and is defined in glibc since 2011.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This macro exists since Linux 2.6.25 and is defined in glibc since 2011.
</pre>
</div>
</content>
</entry>
<entry>
<title>remove gratuitous aligned attribute from __ptrace_syscall_info</title>
<updated>2020-01-01T16:16:56+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2020-01-01T16:10:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=ac89e2ccf5b85137279f6d146e8a6c43f624c83c'/>
<id>ac89e2ccf5b85137279f6d146e8a6c43f624c83c</id>
<content type='text'>
this change was discussed on the mailing list thread for the linux
uapi v5.3 patches, and submitted as a v2 patch, but overlooked when I
applied the patches much later.

revert commit f291c09ec90e2514c954020e9b9bdb30e2adfc7f and apply the
v2 as submitted; the net change is just padding.

notes by Szabolcs Nagy follow:

compared to the linux uapi (and glibc) a padding is used instead of
aligned attribute for keeping the layout the same across targets, this
means the alignment of the struct may be different on some targets
(e.g. m68k where uint64_t is 2 byte aligned) but that should not affect
syscalls and this way the abi does not depend on nonstandard extensions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this change was discussed on the mailing list thread for the linux
uapi v5.3 patches, and submitted as a v2 patch, but overlooked when I
applied the patches much later.

revert commit f291c09ec90e2514c954020e9b9bdb30e2adfc7f and apply the
v2 as submitted; the net change is just padding.

notes by Szabolcs Nagy follow:

compared to the linux uapi (and glibc) a padding is used instead of
aligned attribute for keeping the layout the same across targets, this
means the alignment of the struct may be different on some targets
(e.g. m68k where uint64_t is 2 byte aligned) but that should not affect
syscalls and this way the abi does not depend on nonstandard extensions.
</pre>
</div>
</content>
</entry>
<entry>
<title>sys/wait.h: add P_PIDFD from linux v5.4</title>
<updated>2019-12-30T23:14:08+00:00</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2019-12-22T12:11:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=f296be74d5ab94f6ccac26e129d96e08f1c20538'/>
<id>f296be74d5ab94f6ccac26e129d96e08f1c20538</id>
<content type='text'>
allows waiting on a pidfd, in the future it might allow retrieving the
exit status by a non-parent process, see

  linux commit 3695eae5fee0605f316fbaad0b9e3de791d7dfaf
  pidfd: add P_PIDFD to waitid()
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
allows waiting on a pidfd, in the future it might allow retrieving the
exit status by a non-parent process, see

  linux commit 3695eae5fee0605f316fbaad0b9e3de791d7dfaf
  pidfd: add P_PIDFD to waitid()
</pre>
</div>
</content>
</entry>
<entry>
<title>sys/prctl.h: add PR_*_TAGGED_ADDR_* from linux v5.4</title>
<updated>2019-12-30T23:14:08+00:00</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2019-12-22T10:51:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=5675aaa5595619135baf33923de52a44307af9fb'/>
<id>5675aaa5595619135baf33923de52a44307af9fb</id>
<content type='text'>
per thread prctl commands to relax the syscall abi such that top bits
of user pointers are ignored in the kernel. this allows the use of
those bits by hwasan or by mte to color pointers and memory on aarch64:

  linux commit 63f0c60379650d82250f22e4cf4137ef3dc4f43d
  arm64: Introduce prctl() options to control the tagged user addresses ABI
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
per thread prctl commands to relax the syscall abi such that top bits
of user pointers are ignored in the kernel. this allows the use of
those bits by hwasan or by mte to color pointers and memory on aarch64:

  linux commit 63f0c60379650d82250f22e4cf4137ef3dc4f43d
  arm64: Introduce prctl() options to control the tagged user addresses ABI
</pre>
</div>
</content>
</entry>
<entry>
<title>sys/mman.h: add MADV_COLD and MADV_PAGEOUT from linux v5.4</title>
<updated>2019-12-30T23:14:08+00:00</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2019-12-22T10:26:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=d95ead261e25282192e2291411740b94c2c76db3'/>
<id>d95ead261e25282192e2291411740b94c2c76db3</id>
<content type='text'>
These were mainly introduced so android can optimize the memory usage
of unused apps.

MADV_COLD hints that the memory range is currently not needed (unlike
with MADV_FREE the content is not garbage, it needs to be swapped):

  linux commit 9c276cc65a58faf98be8e56962745ec99ab87636
  mm: introduce MADV_COLD

MADV_PAGEOUT hints that the memory range is not needed for a long time
so it can be reclaimed immediately independently of memory pressure
(unlike with MADV_DONTNEED the content is not garbage):

  linux commit 1a4e58cce84ee88129d5d49c064bd2852b481357
  mm: introduce MADV_PAGEOUT
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These were mainly introduced so android can optimize the memory usage
of unused apps.

MADV_COLD hints that the memory range is currently not needed (unlike
with MADV_FREE the content is not garbage, it needs to be swapped):

  linux commit 9c276cc65a58faf98be8e56962745ec99ab87636
  mm: introduce MADV_COLD

MADV_PAGEOUT hints that the memory range is not needed for a long time
so it can be reclaimed immediately independently of memory pressure
(unlike with MADV_DONTNEED the content is not garbage):

  linux commit 1a4e58cce84ee88129d5d49c064bd2852b481357
  mm: introduce MADV_PAGEOUT
</pre>
</div>
</content>
</entry>
<entry>
<title>sys/ptrace.h: add PTRACE_GET_SYSCALL_INFO from linux v5.3</title>
<updated>2019-12-30T23:12:49+00:00</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2019-11-03T22:45:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=f291c09ec90e2514c954020e9b9bdb30e2adfc7f'/>
<id>f291c09ec90e2514c954020e9b9bdb30e2adfc7f</id>
<content type='text'>
ptrace API to get details of the syscall the tracee is blocked in, see

  linux commit 201766a20e30f982ccfe36bebfad9602c3ff574a
  ptrace: add PTRACE_GET_SYSCALL_INFO request

the align attribute was used to keep the layout the same across targets
e.g. on m68k uint32_t is 2 byte aligned, this helps with compat ptrace.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ptrace API to get details of the syscall the tracee is blocked in, see

  linux commit 201766a20e30f982ccfe36bebfad9602c3ff574a
  ptrace: add PTRACE_GET_SYSCALL_INFO request

the align attribute was used to keep the layout the same across targets
e.g. on m68k uint32_t is 2 byte aligned, this helps with compat ptrace.
</pre>
</div>
</content>
</entry>
<entry>
<title>sys/socket.h: add SO_DETACH_REUSEPORT_BPF from linux v5.3</title>
<updated>2019-12-30T23:12:46+00:00</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2019-11-03T22:27:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=06636c55428fe220ec4bdeecca723a95a75839ce'/>
<id>06636c55428fe220ec4bdeecca723a95a75839ce</id>
<content type='text'>
see

  linux commit 99f3a064bc2e4bd5fe50218646c5be342f2ad18c
  bpf: net: Add SO_DETACH_REUSEPORT_BPF
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
see

  linux commit 99f3a064bc2e4bd5fe50218646c5be342f2ad18c
  bpf: net: Add SO_DETACH_REUSEPORT_BPF
</pre>
</div>
</content>
</entry>
<entry>
<title>fix elf_prstatus regression on time64, existing wrong definition on x32</title>
<updated>2019-12-22T16:20:44+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2019-12-22T16:20:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=3f959f6f76f16b7d954a6d8a134f3c30228d3be0'/>
<id>3f959f6f76f16b7d954a6d8a134f3c30228d3be0</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
</feed>
