<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/src/misc, branch v1.0.5</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 bad character checking in wordexp</title>
<updated>2015-03-30T05:45:20+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2015-02-11T06:37:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=e2063ac08b6d7a9b7049e41a399e639b738a6510'/>
<id>e2063ac08b6d7a9b7049e41a399e639b738a6510</id>
<content type='text'>
the character sequence '$((' was incorrectly interpreted as the
opening of arithmetic even within single-quoted contexts, thereby
suppressing the checks for bad characters after the closing quote.

presently bad character checking is only performed when the WRDE_NOCMD
is used; this patch only corrects checking in that case.

(cherry picked from commit 594ffed82f4e6ee7da85e9c5da35e32946ae32c9)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the character sequence '$((' was incorrectly interpreted as the
opening of arithmetic even within single-quoted contexts, thereby
suppressing the checks for bad characters after the closing quote.

presently bad character checking is only performed when the WRDE_NOCMD
is used; this patch only corrects checking in that case.

(cherry picked from commit 594ffed82f4e6ee7da85e9c5da35e32946ae32c9)
</pre>
</div>
</content>
</entry>
<entry>
<title>check for connect failure in syslog log opening</title>
<updated>2015-03-30T05:41:33+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2015-01-09T05:09:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=5087ba67af3bef48ef8872e1b2ffda04623fc65b'/>
<id>5087ba67af3bef48ef8872e1b2ffda04623fc65b</id>
<content type='text'>
based on patch by Dima Krasner, with minor improvements for code size.
connect can fail if there is no listening syslogd, in which case a
useless socket was kept open, preventing subsequent syslog call from
attempting to connect again.

(cherry picked from commit c574321d75f035ff6d2c18dfb7e3f70db60ba7bd)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
based on patch by Dima Krasner, with minor improvements for code size.
connect can fail if there is no listening syslogd, in which case a
useless socket was kept open, preventing subsequent syslog call from
attempting to connect again.

(cherry picked from commit c574321d75f035ff6d2c18dfb7e3f70db60ba7bd)
</pre>
</div>
</content>
</entry>
<entry>
<title>fix the %m specifier in syslog</title>
<updated>2014-07-28T04:27:59+00:00</updated>
<author>
<name>Clément Vasseur</name>
<email>clement.vasseur@gmail.com</email>
</author>
<published>2014-07-09T12:34:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=bdd4c57e2588bf3cf273bcc3ff04a7584aa3391c'/>
<id>bdd4c57e2588bf3cf273bcc3ff04a7584aa3391c</id>
<content type='text'>
errno must be saved upon vsyslog entry, otherwise its value could be
changed by some libc function before reaching the %m handler in
vsnprintf.

(cherry picked from commit da27118157c2942d7652138b8d8b0056fc8f872f)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
errno must be saved upon vsyslog entry, otherwise its value could be
changed by some libc function before reaching the %m handler in
vsnprintf.

(cherry picked from commit da27118157c2942d7652138b8d8b0056fc8f872f)
</pre>
</div>
</content>
</entry>
<entry>
<title>fix for broken kernel side RLIM_INFINITY on mips</title>
<updated>2014-06-06T21:57:36+00:00</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2014-05-30T06:47:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=94100a0115af03d478c93b8875aae0409a62186f'/>
<id>94100a0115af03d478c93b8875aae0409a62186f</id>
<content type='text'>
On 32 bit mips the kernel uses -1UL/2 to mark RLIM_INFINITY (and
this is the definition in the userspace api), but since it is in
the middle of the valid range of limits and limits are often
compared with relational operators, various kernel side logic is
broken if larger than -1UL/2 limits are used. So we truncate the
limits to -1UL/2 in get/setrlimit and prlimit.

Even if the kernel side logic consistently treated -1UL/2 as greater
than any other limit value, there wouldn't be any clean workaround
that allowed using large limits:
* using -1UL/2 as RLIM_INFINITY in userspace would mean different
infinity value for get/setrlimt and prlimit (where infinity is always
-1ULL) and userspace logic could break easily (just like the kernel
is broken now) and more special case code would be needed for mips.
* translating -1UL/2 kernel side value to -1ULL in userspace would
mean that -1UL/2 limit cannot be set (eg. -1UL/2+1 had to be passed
to the kernel instead).

(cherry picked from commit 8258014fd1e34e942a549c88c7e022a00445c352)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On 32 bit mips the kernel uses -1UL/2 to mark RLIM_INFINITY (and
this is the definition in the userspace api), but since it is in
the middle of the valid range of limits and limits are often
compared with relational operators, various kernel side logic is
broken if larger than -1UL/2 limits are used. So we truncate the
limits to -1UL/2 in get/setrlimit and prlimit.

Even if the kernel side logic consistently treated -1UL/2 as greater
than any other limit value, there wouldn't be any clean workaround
that allowed using large limits:
* using -1UL/2 as RLIM_INFINITY in userspace would mean different
infinity value for get/setrlimt and prlimit (where infinity is always
-1ULL) and userspace logic could break easily (just like the kernel
is broken now) and more special case code would be needed for mips.
* translating -1UL/2 kernel side value to -1ULL in userspace would
mean that -1UL/2 limit cannot be set (eg. -1UL/2+1 had to be passed
to the kernel instead).

(cherry picked from commit 8258014fd1e34e942a549c88c7e022a00445c352)
</pre>
</div>
</content>
</entry>
<entry>
<title>use syscall_arg_t for arguments in public syscall() function</title>
<updated>2014-03-18T21:08:15+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-03-18T21:08:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=5f95f965e933c5b155db75520ac27c92ddbcf400'/>
<id>5f95f965e933c5b155db75520ac27c92ddbcf400</id>
<content type='text'>
on x32, this change allows programs which use syscall() with pointers
or 64-bit values as arguments to work correctly, i.e. without
truncation or incorrect sign extension. on all other supported archs,
syscall_arg_t is defined as long, so this change is a no-op.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
on x32, this change allows programs which use syscall() with pointers
or 64-bit values as arguments to work correctly, i.e. without
truncation or incorrect sign extension. on all other supported archs,
syscall_arg_t is defined as long, so this change is a no-op.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix negated error codes from ptsname_r</title>
<updated>2014-03-17T04:25:23+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-03-17T04:25:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=66193171648ea34ad5acf08fcca48c8f0a850030'/>
<id>66193171648ea34ad5acf08fcca48c8f0a850030</id>
<content type='text'>
the incorrect error codes also made their way into errno when
__ptsname_r was called by plain ptsname, which reports errors via
errno rather than a return value.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the incorrect error codes also made their way into errno when
__ptsname_r was called by plain ptsname, which reports errors via
errno rather than a return value.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix nftw FTW_MOUNT flag</title>
<updated>2014-02-01T19:33:33+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-02-01T19:33:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=73871ee3f21b13b88f2f20a39a1d9bc751bcc1df'/>
<id>73871ee3f21b13b88f2f20a39a1d9bc751bcc1df</id>
<content type='text'>
the incorrect check for crossing device boundaries was preventing nftw
from traversing anything except the initially provided pathname.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the incorrect check for crossing device boundaries was preventing nftw
from traversing anything except the initially provided pathname.
</pre>
</div>
</content>
</entry>
<entry>
<title>optimize get_current_dir_name to reduce stack bloat</title>
<updated>2013-12-13T07:25:09+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2013-12-13T07:25:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=2b7cf6dbb9d56c5fac8f673e7c9d06c81d312af5'/>
<id>2b7cf6dbb9d56c5fac8f673e7c9d06c81d312af5</id>
<content type='text'>
our getcwd already (as an extension) supports allocation of a buffer
when the buffer argument is a null pointer, so there's no need to
duplicate the allocation logic in this wrapper function. duplicating
it is actually harmful in that it doubles the stack usage from
PATH_MAX to 2*PATH_MAX.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
our getcwd already (as an extension) supports allocation of a buffer
when the buffer argument is a null pointer, so there's no need to
duplicate the allocation logic in this wrapper function. duplicating
it is actually harmful in that it doubles the stack usage from
PATH_MAX to 2*PATH_MAX.
</pre>
</div>
</content>
</entry>
<entry>
<title>include cleanups: remove unused headers and add feature test macros</title>
<updated>2013-12-12T05:09:18+00:00</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2013-12-12T05:09:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=571744447c23f91feb6439948f3a619aca850dfb'/>
<id>571744447c23f91feb6439948f3a619aca850dfb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix and refactor child reaping logic in wordexp</title>
<updated>2013-11-22T21:29:31+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2013-11-22T21:29:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=aeea71dc042d8d0a05f4293a0e98c9cd009ffc16'/>
<id>aeea71dc042d8d0a05f4293a0e98c9cd009ffc16</id>
<content type='text'>
loop condition was incorrect and confusing and caused an infinite loop
when (broken) applications reaped the pid from a signal handler or
another thread before wordexp's call to waitpid could do so.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
loop condition was incorrect and confusing and caused an infinite loop
when (broken) applications reaped the pid from a signal handler or
another thread before wordexp's call to waitpid could do so.
</pre>
</div>
</content>
</entry>
</feed>
