History log of /openbsd-src/lib/libc/arch/powerpc/sys/tfork_thread.S (Results 1 – 11 of 11)
Revision Date Author Comments
# 83762a71 10-Dec-2023 deraadt <deraadt@openbsd.org>

Populate the non-LOAD openbsd.syscalls section (and PT_OPENBSD_SYSCALL)
with {uint offset, uint syscall#} entries in libc & ld.so.
In libc a few syscall# entries (break, sigprocmask, _tfork, _threxit

Populate the non-LOAD openbsd.syscalls section (and PT_OPENBSD_SYSCALL)
with {uint offset, uint syscall#} entries in libc & ld.so.
In libc a few syscall# entries (break, sigprocmask, _tfork, _threxit)
are duplicated because additional or inline uses occur (that situation
is handled elsewhere)
ok kettenis

show more ...


# 15572fcf 28-Nov-2020 gkoehler <gkoehler@openbsd.org>

Add retguard to macppc kernel locore.S, ofwreal.S, setjmp.S

This changes RETGUARD_SETUP(ffs) to RETGUARD_SETUP(ffs, %r11, %r12)
and RETGUARD_CHECK(ffs) to RETGUARD_CHECK(ffs, %r11, %r12)
to show tha

Add retguard to macppc kernel locore.S, ofwreal.S, setjmp.S

This changes RETGUARD_SETUP(ffs) to RETGUARD_SETUP(ffs, %r11, %r12)
and RETGUARD_CHECK(ffs) to RETGUARD_CHECK(ffs, %r11, %r12)
to show that r11 and r12 are in use between setup and check, and to
pick registers other than r11 and r12 in some kernel functions.

ok mortimer@ deraadt@

show more ...


# d2c5a474 26-Oct-2020 gkoehler <gkoehler@openbsd.org>

Retguard asm macros for powerpc libc, ld.so

Add retguard to some, but not all, asm functions in libc. Edit SYS.h
in libc to remove the PREFIX macros and add SYSENTRY (more like
aarch64 and powerpc6

Retguard asm macros for powerpc libc, ld.so

Add retguard to some, but not all, asm functions in libc. Edit SYS.h
in libc to remove the PREFIX macros and add SYSENTRY (more like
aarch64 and powerpc64), so we can insert RETGUARD_SETUP after
SYSENTRY. Some .S files in this commit don't get retguard, but do
stop using the old prefix macros.

Tested by deraadt@, who put this diff in a macppc snap.

show more ...


# 13df6982 18-Oct-2020 deraadt <deraadt@openbsd.org>

SYS___threxit cannot fail, but this integration looks like a gadget.
Put a hard-trap instruction after the syscall instruction.
ok kettenis mortimer


# 5e1df623 15-May-2016 guenther <guenther@openbsd.org>

TIB conversion is complete, so set errno in the syscall stub and eliminate
__cerror

ok ketternis@


# fe38b55c 07-May-2016 guenther <guenther@openbsd.org>

Use a Thread Information Block in both single and multi-threaded programs.
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a. This is an

Use a Thread Information Block in both single and multi-threaded programs.
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable!

Make libpthread dlopen'able by moving the cancelation wrappers into libc
and doing locking and fork/errno handling via callbacks that libpthread
registers when it first initializes. 'errno' *must* be declared via
<errno.h> now!

Clean up libpthread's symbol exports like libc.

On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.

Testing by various, particularly sthen@ and patrick@
ok kettenis@

show more ...


# aa797096 05-Sep-2015 guenther <guenther@openbsd.org>

Adds hidden _libc_FOO aliases for the system call stubs.
Stop generating _brk and _sbrk symbols: they've already been hidden.
Set the ELF symbol size on the syscall stubs.
Give the __{min,cur}brk sym

Adds hidden _libc_FOO aliases for the system call stubs.
Stop generating _brk and _sbrk symbols: they've already been hidden.
Set the ELF symbol size on the syscall stubs.
Give the __{min,cur}brk symbols a size and type, and hide more jump labels.

ok deraadt@

show more ...


# 33b1d6e2 27-Aug-2015 guenther <guenther@openbsd.org>

fix comment


# a2e13100 23-Aug-2015 kettenis <kettenis@openbsd.org>

Make __cerror() use the per-thread errno location if r2 isn't zero. This way
libpthread no longer has to override it which means that we can use a local
call and can avoid setting up r30 as a _GLOBA

Make __cerror() use the per-thread errno location if r2 isn't zero. This way
libpthread no longer has to override it which means that we can use a local
call and can avoid setting up r30 as a _GLOBAL_OFFSET_TABLE_ pointer, which
is hard the way the powerpc ABI works.

For now we continue to provide __cerror as a weak symbol, but ___cerror is
now protected and internal calls within libc now use ___cerror instead of
__cerror.

discussed with guenther@

show more ...


# 16b62b6a 21-Jun-2012 guenther <guenther@openbsd.org>

__tfork() needs to set the stack address of the new thread in the kernel,
so that it can't get a signal while still running on the parent thread's
stack. Also, pass in sizeof(struct __tfork) to prov

__tfork() needs to set the stack address of the new thread in the kernel,
so that it can't get a signal while still running on the parent thread's
stack. Also, pass in sizeof(struct __tfork) to provide forward compat
when more members are added. This is an ABI change, so switch syscall
numbers and bump lib majors this time.

ok deraadt@ matthew@

show more ...


# c6f64c6f 22-Mar-2012 guenther <guenther@openbsd.org>

Move __tfork_thread() from rthreads (libpthread) to libc so that
it can be used for not-strictly-threading purposes

ok matthew@ kurt@