<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libthr/thread/thr_stack.c, branch releng/11.3</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F11.3</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F11.3'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2018-03-29T02:50:57Z</updated>
<entry>
<title>Revert r330897:</title>
<updated>2018-03-29T02:50:57Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-29T02:50:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4ab2e064d7950be84256d671a7ae93f87cc6aa36'/>
<id>urn:sha1:4ab2e064d7950be84256d671a7ae93f87cc6aa36</id>
<content type='text'>
This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)
</content>
</entry>
<entry>
<title>Partial merge of the SPDX changes</title>
<updated>2018-03-14T03:19:51Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-14T03:19:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=be5d0b9566b13fdf8cabebb63334cbec12bfc409'/>
<id>urn:sha1:be5d0b9566b13fdf8cabebb63334cbec12bfc409</id>
<content type='text'>
These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from:	pfg
</content>
</entry>
<entry>
<title>Use __FBSDID() for .c files from lib/libthr/thread.</title>
<updated>2016-04-08T11:15:26Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2016-04-08T11:15:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3279301186099f2fe0a3b98f05944434d84c056a'/>
<id>urn:sha1:3279301186099f2fe0a3b98f05944434d84c056a</id>
<content type='text'>
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>If libthr.so is dlopened without RTLD_GLOBAL flag, the libthr symbols</title>
<updated>2016-02-08T19:24:13Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2016-02-08T19:24:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=bd43f0691c95603818dd7df72f24ee318bb0f29f'/>
<id>urn:sha1:bd43f0691c95603818dd7df72f24ee318bb0f29f</id>
<content type='text'>
do not participate in the global symbols namespace, but rtld locks are
still replaced and functions are interposed.  In particular,
__pthread_map_stacks_exec is resolved to the libc version.  If a
library is loaded later, which requires adjustment of the stack
protection mode, rtld calls into libc __pthread_map_stacks_exec due to
the symbols scope.  The libc version might recurse into binder and
recursively acquire rtld bind lock, causing the hang.

Make libc __pthread_map_stacks_exec() interposed, which synchronizes
rtld locks and version of the stack exec hook when libthr loaded,
regardless of the symbol scope control or symbol resolution order.

The __pthread_map_stacks_exec() symbol is removed from the private
version in libthr since libc symbol now operates correctly in presence
of libthr.

Reported and tested by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>Add a knob LIBPTHREAD_BIGSTACK_MAIN, which instructs libthr to leave</title>
<updated>2014-08-13T05:53:41Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2014-08-13T05:53:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6c8ce3bfce090eafcf06d293b9deb46f232cea38'/>
<id>urn:sha1:6c8ce3bfce090eafcf06d293b9deb46f232cea38</id>
<content type='text'>
the whole RLIMIT_STACK-sized region of the kernel-allocated stack as
the stack of main thread.

By default, the main thread stack is clamped at 2MB (4MB on 64bit
ABIs) and the rest is used for other threads stack allocation.  Since
there is no programmatic way to adjust the size of the main thread
stack, pthread_attr_setstacksize() is too late, the knob allows user
to manage the main stack size both for single-threaded and
multi-threaded processes with the rlimit.

Reported by:	"Ivan A. Kosarev" &lt;ivan@ivan-labs.com&gt;
Tested by:	dim
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
</content>
</entry>
<entry>
<title>Style.</title>
<updated>2014-08-13T05:47:49Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2014-08-13T05:47:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f6abec6c6464285617dbc33e8cb8e4bec7401527'/>
<id>urn:sha1:f6abec6c6464285617dbc33e8cb8e4bec7401527</id>
<content type='text'>
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
</content>
</entry>
<entry>
<title>For the process that already loaded libthr but still not initialized</title>
<updated>2011-01-10T16:10:25Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2011-01-10T16:10:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fad128db86ae3b5790eef4f400720822b8754df1'/>
<id>urn:sha1:fad128db86ae3b5790eef4f400720822b8754df1</id>
<content type='text'>
threading, fall back to libc method of performing
__pthread_map_stacks_exec() job.

Reported and tested by:	Mykola Dzham &lt;i levsha me&gt;
</content>
</entry>
<entry>
<title>Implement the __pthread_map_stacks_exec() for libthr.</title>
<updated>2011-01-09T12:38:40Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2011-01-09T12:38:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=da2fcff746a151ab3ea26c237953a90236cfc176'/>
<id>urn:sha1:da2fcff746a151ab3ea26c237953a90236cfc176</id>
<content type='text'>
Stack creation code is changed to call _rtld_get_stack_prot() to get
the stack protection right. There is a race where thread is created
during dlopen() of dso that requires executable stacks. Then,
_rtld_get_stack_prot() may return PROT_READ | PROT_WRITE, but thread
is still not linked into the thread list. In this case, the callback
misses the thread stack, and rechecks the required protection
afterward.

Reviewed by:	davidxu
</content>
</entry>
<entry>
<title>Convert thread list lock from mutex to rwlock.</title>
<updated>2010-09-13T07:03:01Z</updated>
<author>
<name>David Xu</name>
<email>davidxu@FreeBSD.org</email>
</author>
<published>2010-09-13T07:03:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a9b764e218bfdbf5f746d64ff503348a2363db6e'/>
<id>urn:sha1:a9b764e218bfdbf5f746d64ff503348a2363db6e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>WARNS level 4 cleanup.</title>
<updated>2006-04-04T02:57:49Z</updated>
<author>
<name>David Xu</name>
<email>davidxu@FreeBSD.org</email>
</author>
<published>2006-04-04T02:57:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=37a6356bbed1e94fd2b0d9d02a29508465584c19'/>
<id>urn:sha1:37a6356bbed1e94fd2b0d9d02a29508465584c19</id>
<content type='text'>
</content>
</entry>
</feed>
