<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test/lib/libc/i386, 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>2019-09-25T16:49:22Z</updated>
<entry>
<title>remove obsolete i386 MD memchr implementation</title>
<updated>2019-09-25T16:49:22Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2019-09-25T16:49:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=ef36db58da955412e1afc9c4bb3fee74645c6475'/>
<id>urn:sha1:ef36db58da955412e1afc9c4bb3fee74645c6475</id>
<content type='text'>
bde reports (in a reply to r351700 commit mail):
    This uses scasb, which was last optimal on the 8086, or perhaps the
    original i386.  On freefall, it is several times slower than the
    naive translation of the naive C code.

Reported by:	bde
Reviewed by:	kib, markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D21785
</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>Add usermode helpers for for Intel userspace protection keys feature.</title>
<updated>2019-02-20T09:56:23Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2019-02-20T09:56:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=a2d95495ee82f3ed36051f231e0eedcff708e6d6'/>
<id>urn:sha1:a2d95495ee82f3ed36051f231e0eedcff708e6d6</id>
<content type='text'>
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D18893
</content>
</entry>
<entry>
<title>Unify i386 and amd64 getcontextx.c, and use ifuncs while there.</title>
<updated>2019-02-14T14:02:33Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2019-02-14T14:02:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=071bca67ee8eeca078945099ba4637cefa2ed949'/>
<id>urn:sha1:071bca67ee8eeca078945099ba4637cefa2ed949</id>
<content type='text'>
In particular, use ifuncs for __getcontextx_size(), also calculate the
size of the extended save area in resolver.  Same for __fillcontextx2().

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
</content>
</entry>
<entry>
<title>Remove MD __sys_* private symbols.</title>
<updated>2018-12-05T00:46:09Z</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2018-12-05T00:46:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=db19a093bba2009eaed0fbc545210480a2108dda'/>
<id>urn:sha1:db19a093bba2009eaed0fbc545210480a2108dda</id>
<content type='text'>
No references to any of these exist in the tree. The list was also
erratic with different architectures exporting different things
(arm64 and riscv exported none).

Reviewed by:	kib
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D18425
</content>
</entry>
<entry>
<title>amd64: depessimize userspace memcpy/memmove/bcopy</title>
<updated>2018-09-17T15:49:35Z</updated>
<author>
<name>Mateusz Guzik</name>
<email>mjg@FreeBSD.org</email>
</author>
<published>2018-09-17T15:49:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=23ec0d58bf2008a8dfa6466f0c0dcc27c2312b0f'/>
<id>urn:sha1:23ec0d58bf2008a8dfa6466f0c0dcc27c2312b0f</id>
<content type='text'>
The change resembles what was done in r334537 for kernel routines.
While here take care of i386 variants. Note that primitives remain
suboptimal.

Reviewed by:	kib (previous version)
Approved by:	re (gjb)
Differential Revision:	https://reviews.freebsd.org/D17167
</content>
</entry>
<entry>
<title>Reimplement brk() and sbrk() to avoid the use of _end.</title>
<updated>2018-06-04T19:35:15Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2018-06-04T19:35:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=9f9c9b22ecfd9e87cbe9e1becf946faeb5fbcac6'/>
<id>urn:sha1:9f9c9b22ecfd9e87cbe9e1becf946faeb5fbcac6</id>
<content type='text'>
Previously, libc.so would initialize its notion of the break address
using _end, a special symbol emitted by the static linker following
the bss section.  Compatibility issues between lld and ld.bfd could
cause the wrong definition of _end (libc.so's definition rather than
that of the executable) to be used, breaking the brk()/sbrk()
interface.

Avoid this problem and future interoperability issues by simply not
relying on _end.  Instead, modify the break() system call to return
the kernel's view of the current break address, and have libc
initialize its state using an extra syscall upon the first use of the
interface.  As a side effect, this appears to fix brk()/sbrk() usage
in executables run with rtld direct exec, since the kernel and libc.so
no longer maintain separate views of the process' break address.

PR:		228574
Reviewed by:	kib (previous version)
MFC after:	2 months
Differential Revision:	https://reviews.freebsd.org/D15663
</content>
</entry>
<entry>
<title>Remove support for SYS_sys_exit in favor of SYS_exit.</title>
<updated>2018-06-01T22:09:27Z</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2018-06-01T22:09:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=0141ef6c07ae18694a4e72e9a764057b1cab895c'/>
<id>urn:sha1:0141ef6c07ae18694a4e72e9a764057b1cab895c</id>
<content type='text'>
SYS_exit has been defined in the repo since 1994 except for a brief
window when SYS_sys_exit was defined in 2000.
</content>
</entry>
<entry>
<title>Replace MD assembly exect() with a portable version.</title>
<updated>2018-04-12T18:23:14Z</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2018-04-12T18:23:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=87385baff6b0cf994c68e78965325c910277aafa'/>
<id>urn:sha1:87385baff6b0cf994c68e78965325c910277aafa</id>
<content type='text'>
Originally, on the VAX exect() enable tracing once the new executable
image was loaded.  This was possible because tracing was controllable
through user space code by setting the PSL_T flag.  The following
instruction is a system call that activated tracing (as all
instructions do) by copying PSL_T to PSL_TP (trace pending).  The
first instruction of the new executable image would trigger a trace
fault.

This is not portable to all platforms and the behavior was replaced with
ptrace(PT_TRACE_ME, ...) since FreeBSD forked off of the CSRG repository.
Platforms either incorrectly call execve(), trigger trace faults inside
the original executable, or do contain an implementation of this
function.

The exect() interfaces is deprecated or removed on NetBSD and OpenBSD.

Submitted by:	Ali Mashtizadeh &lt;ali@mashtizadeh.com&gt;
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D14989
</content>
</entry>
<entry>
<title>Remove caching from getlogin(2).</title>
<updated>2018-04-06T17:17:34Z</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2018-04-06T17:17:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=047a2ef6974e4c0ab7b02b6c346f7199983fb0bd'/>
<id>urn:sha1:047a2ef6974e4c0ab7b02b6c346f7199983fb0bd</id>
<content type='text'>
This caching has existed since the CSRG import, but serves no obvious
purpose. Sure, setlogin() is called rarely, but calls to getlogin()
should also be infrequent. The required invalidation was not
implemented on aarch64, arm, mips, amd riscv so updates would never
occur if getlogin() was called before setlogin().

Reported by:	Ali Mashtizadeh &lt;ali@mashtizadeh.com&gt;
Reviewed by:	kib
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D14965
</content>
</entry>
</feed>
