<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test/lib/libc/include, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/'/>
<updated>2020-12-16T09:02:09Z</updated>
<entry>
<title>Implement strerror_l().</title>
<updated>2020-12-16T09:02:09Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2020-12-16T09:02:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=675079b1ea61b310f3a42cb0d352a49c1780f89a'/>
<id>urn:sha1:675079b1ea61b310f3a42cb0d352a49c1780f89a</id>
<content type='text'>
Only for the arches that provide user-mode TLS.

PR: 251651
Requested by:	yuri
Discussed with:	emaste, jilles, tijl
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D27495
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>libc: Add pthread_attr_get_np(3) stub, reporting ESRCH.</title>
<updated>2020-11-28T12:19:20Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2020-11-28T12:19:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=412ef5da8a75067e5a31fe626b776451e244fb43'/>
<id>urn:sha1:412ef5da8a75067e5a31fe626b776451e244fb43</id>
<content type='text'>
This seems to be required by recent clang asan.
I do not see other way than put the symbol under FBSD_1.0 version.

PR:	251112
Reported by:	Andrew Stitcher &lt;astitcher@apache.org&gt;
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D27389
</content>
</entry>
<entry>
<title>Add pthread_getname_np() and pthread_setname_np() aliases for</title>
<updated>2020-06-10T22:13:24Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2020-06-10T22:13:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=2ef84b7da9a6c3e23b4a135e6e863581f16d46e1'/>
<id>urn:sha1:2ef84b7da9a6c3e23b4a135e6e863581f16d46e1</id>
<content type='text'>
pthread_get_name_np() and pthread_set_name_np().

This re-applies r361770 after compatibility fixes.

Reviewed by:	antoine, jkim, markj
Tested by:	antoine (exp-run)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D25117
</content>
</entry>
<entry>
<title>Mark closefrom(2) COMPAT12, reimplement in libc to wrap close_range</title>
<updated>2020-04-14T18:07:42Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-04-14T18:07:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=7d03e0811239d6f413d313214dab463af86d2a82'/>
<id>urn:sha1:7d03e0811239d6f413d313214dab463af86d2a82</id>
<content type='text'>
Include a temporarily compatibility shim as well for kernels predating
close_range, since closefrom is used in some critical areas.

Reviewed by:	markj (previous version), kib
Differential Revision:	https://reviews.freebsd.org/D24399
</content>
</entry>
<entry>
<title>Add linux-compatible memfd_create</title>
<updated>2019-09-25T18:03:18Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2019-09-25T18:03:18Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=3e25d1fb6168c7d905230e2effbf7adb20935cd4'/>
<id>urn:sha1:3e25d1fb6168c7d905230e2effbf7adb20935cd4</id>
<content type='text'>
memfd_create is effectively a SHM_ANON shm_open(2) mapping with optional
CLOEXEC and file sealing support. This is used by some mesa parts, some
linux libs, and qemu can also take advantage of it and uses the sealing to
prevent resizing the region.

This reimplements shm_open in terms of shm_open2(2) at the same time.

shm_open(2) will be moved to COMPAT12 shortly.

Reviewed by:	markj, kib
Differential Revision:	https://reviews.freebsd.org/D21393
</content>
</entry>
<entry>
<title>Add libc stub for pthread_getthreadid_np(3).</title>
<updated>2019-06-23T10:50:26Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2019-06-23T10:50:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=2d8c3eeb122361d6eef5773cabc71484cac6af13'/>
<id>urn:sha1:2d8c3eeb122361d6eef5773cabc71484cac6af13</id>
<content type='text'>
Requested by:	jbeich
PR:	238650
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
</content>
</entry>
<entry>
<title>Fix initial exec TLS mode for dynamically loaded shared objects.</title>
<updated>2019-03-29T17:52:57Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2019-03-29T17:52:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=5d00c5a6571cdf533228338fa7ca532c91af1d66'/>
<id>urn:sha1:5d00c5a6571cdf533228338fa7ca532c91af1d66</id>
<content type='text'>
If dso uses initial exec TLS mode, rtld tries to allocate TLS in
static space. If there is no space left, the dlopen(3) fails. If space
if allocated, initial content from PT_TLS segment is distributed to
all threads' pcbs, which was missed and caused un-initialized TLS
segment for such dso after dlopen(3).

The mode is auto-detected either due to the relocation used, or if the
DF_STATIC_TLS dynamic flag is set.  In the later case, the TLS segment
is tried to allocate earlier, which increases chance of the dlopen(3)
to succeed.  LLD was recently fixed to properly emit the flag, ld.bdf
did it always.

Initial test by:	dumbbell
Tested by:	emaste (amd64), ian (arm)
Tested by:	Gerald Aryeetey &lt;aryeeteygerald_rogers.com&gt; (arm64)
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D19072
</content>
</entry>
<entry>
<title>Bump sys_errlist size to keep ABI backward-compatible for some time.</title>
<updated>2018-12-27T13:02:15Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2018-12-27T13:02:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=cd49e866fcf9b07db5e0e79c2ed8b07e4e21a9c1'/>
<id>urn:sha1:cd49e866fcf9b07db5e0e79c2ed8b07e4e21a9c1</id>
<content type='text'>
Addition of the new errno values requires adding new elements to
sys_errlist array, which is actually ABI-incompatible, since ELF
records the object size.  Expand array in advance to 150 elements so
that we have our users to go over the issue only once, at least until
more than 53 new errors are added.

I did not bumped the symbol version, same as it was not done for
previous increases of the array size.  Runtime linker only copies as
much data into binary object on copy relocation as the binary'object
specifies.  This is not fixable for binaries which access sys_errlist
directly.

While there, correct comment and calculation of the temporary buffer
size for the message printed for unknown error.  The on-stack buffer
is used only for the number and delimiter since r108603.

Requested by:	mckusick
Reviewed by:	mckusick, yuripv
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D18656
</content>
</entry>
<entry>
<title>Update userland arc4random() with OpenBSD's Chacha20 based arc4random().</title>
<updated>2018-08-19T17:40:50Z</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2018-08-19T17:40:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=c1e80940f3b4030df0aaed73028053af057e476d'/>
<id>urn:sha1:c1e80940f3b4030df0aaed73028053af057e476d</id>
<content type='text'>
  ObsoleteFiles.inc:

    Remove manual pages for arc4random_addrandom(3) and
    arc4random_stir(3).

  contrib/ntp/lib/isc/random.c:
  contrib/ntp/sntp/libevent/evutil_rand.c:

    Eliminate in-tree usage of arc4random_addrandom().

  crypto/heimdal/lib/roken/rand.c:
  crypto/openssh/config.h:

    Eliminate in-tree usage of arc4random_stir().

  include/stdlib.h:

    Remove arc4random_stir() and arc4random_addrandom() prototypes,
    provide temporary shims for transistion period.

  lib/libc/gen/Makefile.inc:

    Hook arc4random-compat.c to build, add hint for Chacha20 source for
    kernel, and remove arc4random_addrandom(3) and arc4random_stir(3)
    links.

  lib/libc/gen/arc4random.c:

    Adopt OpenBSD arc4random.c,v 1.54 with bare minimum changes, use the
    sys/crypto/chacha20 implementation of keystream.

  lib/libc/gen/Symbol.map:

    Remove arc4random_stir and arc4random_addrandom interfaces.

  lib/libc/gen/arc4random.h:

    Adopt OpenBSD arc4random.h,v 1.4 but provide _ARC4_LOCK of our own.

  lib/libc/gen/arc4random.3:

    Adopt OpenBSD arc4random.3,v 1.35 but keep FreeBSD r114444 and
    r118247.

  lib/libc/gen/arc4random-compat.c:

    Compatibility shims for arc4random_stir and arc4random_addrandom
    functions to preserve ABI.  Log once when called but do nothing
    otherwise.

  lib/libc/gen/getentropy.c:
  lib/libc/include/libc_private.h:

    Fold __arc4_sysctl into getentropy.c (renamed to arnd_sysctl).
    Remove from libc_private.h as a result.

  sys/crypto/chacha20/chacha.c:
  sys/crypto/chacha20/chacha.h:

    Make it possible to use the kernel implementation in libc.

PR:		182610
Reviewed by:	cem, markm
Obtained from:	OpenBSD
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D16760
</content>
</entry>
<entry>
<title>Add pthread_get_name_np(3).</title>
<updated>2018-08-17T18:34:07Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2018-08-17T18:34:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=4627d47bc83903d3bf89828e32f3a4c3322a31d2'/>
<id>urn:sha1:4627d47bc83903d3bf89828e32f3a4c3322a31d2</id>
<content type='text'>
The function retrieves the thread name previously set by
pthread_set_name_np(3). The name is cached in the process memory.

Requested by:	Willem Jan Withagen &lt;wjw@digiware.nl&gt;
Man page update:	Yuri Pankov &lt;yuripv@yuripv.net&gt;
Reviewed by:	ian (previous version)
Discussed with:	arichardson, bjk (man page)
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D16702
</content>
</entry>
</feed>
