<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test/lib/libc/powerpc, 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-05T00:33:28Z</updated>
<entry>
<title>Add CFI start/end proc directives to arm64, i386, and ppc</title>
<updated>2020-12-05T00:33:28Z</updated>
<author>
<name>Conrad Meyer</name>
<email>cem@FreeBSD.org</email>
</author>
<published>2020-12-05T00:33:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=78599c32efed3247d165302a1fbe8d9203e38974'/>
<id>urn:sha1:78599c32efed3247d165302a1fbe8d9203e38974</id>
<content type='text'>
Follow-up to r353959 and r368070: do the same for other architectures.

arm32 already seems to use its own .fnstart/.fnend directives, which
appear to be ARM-specific variants of the same thing.  Likewise, MIPS
uses .frame directives.

Reviewed by:	arichardson
Differential Revision:	https://reviews.freebsd.org/D27387
</content>
</entry>
<entry>
<title>[PowerPC64LE] Fix gdtoa configurations on LE.</title>
<updated>2020-09-23T02:05:44Z</updated>
<author>
<name>Brandon Bergren</name>
<email>bdragon@FreeBSD.org</email>
</author>
<published>2020-09-23T02:05:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=b25731010333d1b7654d31a1a58c2bf1d3b6a177'/>
<id>urn:sha1:b25731010333d1b7654d31a1a58c2bf1d3b6a177</id>
<content type='text'>
gdtoa wins the award for "most outdated endianness naming convention"
with its IEEE_8087 vs IEEE_MC68k defines. I had a good chuckle.

Update softfloat and arith.h to adjust to BE or LE automatically
based on the low level preprocessor defines.

Fixes printf/scanf on PowerPC64LE, although there is still a problem
lurking regarding Signalling NaNs...

Sponsored by:	Tag1 Consulting, Inc.
</content>
</entry>
<entry>
<title>[PowerPC] Implement VDSO timebase access on powerpc*</title>
<updated>2020-09-08T03:00:31Z</updated>
<author>
<name>Brandon Bergren</name>
<email>bdragon@FreeBSD.org</email>
</author>
<published>2020-09-08T03:00:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=328b5f2570452d1b4bc0d00d052d693977ea60ea'/>
<id>urn:sha1:328b5f2570452d1b4bc0d00d052d693977ea60ea</id>
<content type='text'>
Implement the remaining pieces needed to allow userland timestamp reading.

Rewritten based on an intial essay into the problem by Justin Hibbits.
(Copyright changed to my own on his request.)

Tested on ppc64 (POWER9 Talos II), powerpcspe (e500v2 RB800), and
powerpc (g4 PowerBook).

Reviewed by:	jhibbits (in irc)
Sponsored by:	Tag1 Consulting, Inc.
Differential Revision:	https://reviews.freebsd.org/D26347
</content>
</entry>
<entry>
<title>[PowerPC] Fix typo in _ctx_start on ppc32</title>
<updated>2019-11-23T23:41:21Z</updated>
<author>
<name>Brandon Bergren</name>
<email>bdragon@FreeBSD.org</email>
</author>
<published>2019-11-23T23:41:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=0ee420b6082c15bcb55765c0b15a72193991ce82'/>
<id>urn:sha1:0ee420b6082c15bcb55765c0b15a72193991ce82</id>
<content type='text'>
Theoretically, this was breaking the size calculation for the symbol.

Noticed when doing a readthrough.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D22525
</content>
</entry>
<entry>
<title>powerpc: Transition to Secure-PLT, like most other OSs</title>
<updated>2019-06-25T00:40:44Z</updated>
<author>
<name>Justin Hibbits</name>
<email>jhibbits@FreeBSD.org</email>
</author>
<published>2019-06-25T00:40:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=f62da49b2f17f279ddba946bf4bc7ba7247273a5'/>
<id>urn:sha1:f62da49b2f17f279ddba946bf4bc7ba7247273a5</id>
<content type='text'>
Summary:
PowerPC has two PLT models: BSS-PLT and Secure-PLT.  BSS-PLT uses runtime
code generation to generate the PLT stubs.  Secure-PLT was introduced with
GCC 4.1 and Binutils 2.17 (base has GCC 4.2.1 and Binutils 2.17), and is a
more secure PLT format, using a read-only linkage table, with the dynamic
linker populating a non-executable index table.

This is the libc, rtld, and kernel support only.  The toolchain and build
parts will be updated separately.

Reviewed By: nwhitehorn, bdragon, pfg
Differential Revision: https://reviews.freebsd.org/D20598
MFC after:	1 month
</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>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>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>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>
