CVS: cvs.openbsd.org: src

2016-08-09 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/09 20:58:44

Modified files:
gnu/usr.bin/binutils-2.17/ld: ldmain.c 
gnu/usr.bin/binutils-2.17/ld/emulparams: armelf_obsd.sh 
 elf32ppc_obsd.sh 
 elf64btsmip_obsd.sh 
 elf64ltsmip_obsd.sh 
 hppaobsd.sh 
 shelf_obsd.sh 
gnu/usr.bin/binutils-2.17/ld/scripttempl: elf.sc 

Log message:
Cover your kid's remaining eye and lock up the pets for the great old ones
have been disturbed: rework the linker script and then enable RELRO support
on all but mips64 (something something padding) and m88k (untested).
This extends the RO coverage from just .got and .cdtors to also include
.openbsd.randomdata, .jcr, .dynamic, and .data.rel.ro., and moves more
segments from the text section to the rodata section.  Depends on the
previous csu and ld.so work; reinstall those *before* rebuilding ld, or
just get a snapshot.

clues from kettenis
assistance testing and ok deraadt@



CVS: cvs.openbsd.org: src

2016-08-08 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/08 21:58:35

Modified files:
libexec/ld.so/arm: ldasm.S 
libexec/ld.so  : boot.c 

Log message:
Teach arm to pass &_DYNAMIC to _dl_boot_bind(); can optimize later in tree



CVS: cvs.openbsd.org: src

2016-08-08 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/08 20:25:35

Modified files:
sys/kern   : uipc_syscalls.c 
regress/lib/libpthread/restart/connect: connect.c 

Log message:
When interrupted, connect() should leave the socket connecting in the
background, similar to a non-blocking socket.  Return EALREADY whenever
already connecting, not just for non-blocking sockets.  Fix from {Free,Net}BSD

Prompted by a report from Michael Reed (m.reed (at) mykolab.com)
ok millert@



CVS: cvs.openbsd.org: src

2016-08-08 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/08 16:05:26

Modified files:
lib/csu: boot.h 

Log message:
Look for a PT_GNU_RELRO section and, if present, mprotect that range
instead of the [__got_start, __got_end) range.

Also, instead of mprotecting the [__plt_start, __plt_end) range,
just scan for sections which are both writable and executable and
mprotect them to read-only.  (This part was stolen from kettenis@)

ok kettenis@



CVS: cvs.openbsd.org: src

2016-08-08 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/08 15:59:20

Modified files:
libexec/ld.so  : library.c library_mquery.c loader.c resolve.c 
 resolve.h 

Log message:
Look for a PT_GNU_RELRO section per object and, if present, mprotect that
range instead of the [__got_start, __got_end) range.
On many archs this will cover _DYNAMIC too, so move up the DT_DEBUG handling
to before relocations and the mprotect are done.

ok kettenis@



CVS: cvs.openbsd.org: src

2016-08-07 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/07 14:00:39

Modified files:
gnu/usr.bin/binutils-2.17/ld: genscripts.sh 
gnu/usr.bin/binutils-2.17/ld/emultempl: elf32.em 

Log message:
Since we have kbind(2), we don't need -znow to use -zrelro

ok kettenis@



CVS: cvs.openbsd.org: src

2016-08-07 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/07 13:59:07

Modified files:
gnu/usr.bin/binutils-2.17/ld: ldlang.c 

Log message:
If an output section is skipped because of a constraint, then skip it
when generating the link map output (-M) too

ok kettenis@



CVS: cvs.openbsd.org: src

2016-08-06 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/06 21:05:23

Modified files:
libexec/ld.so  : boot.c 
libexec/ld.so/alpha: ldasm.S 

Log message:
As with csu, alpha passes &_DYNAMIC to _reloc_alpha_got(), so just
save that and pass it to _dl_boot_bind() too



CVS: cvs.openbsd.org: src

2016-08-06 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/06 21:03:44

Modified files:
libexec/ld.so  : boot.c 
libexec/ld.so/i386: ldasm.S 

Log message:
Teach i386 to pass &_DYNAMIC to _dl_boot_bind()



CVS: cvs.openbsd.org: src

2016-08-06 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/06 21:01:53

Modified files:
libexec/ld.so/mips64: ldasm.S 
libexec/ld.so  : boot.c 

Log message:
Teach mips64 to pass &_DYNAMIC to _dl_boot_bind()

mips64be testing by deraadt@



CVS: cvs.openbsd.org: src

2016-08-06 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/06 20:59:27

Modified files:
libexec/ld.so  : boot.c 

Log message:
hahahah: amd64 has been passing &_DYNAMIC to _dl_boot_bind() for
*149 months*



CVS: cvs.openbsd.org: src

2016-08-06 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/06 20:57:19

Modified files:
libexec/ld.so  : boot.c 

Log message:
Flip the #ifdef logic: amd64, arm, i386, and mips64 are the only archs
using the #else case



CVS: cvs.openbsd.org: src

2016-08-06 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/06 20:44:00

Modified files:
lib/csu/mips64 : md_init.h 
lib/csu: boot.h 

Log message:
Teach mips64 to pass &_DYNAMIC to _dl_boot_bind().

mips64be testing by deraadt@



CVS: cvs.openbsd.org: src

2016-08-06 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/06 20:34:52

Modified files:
lib/csu: boot.h 
lib/csu/alpha  : md_init.h 

Log message:
alpha already calculates &_DYNAMIC for the _reloc_alpha_got() call, so
save that and pass it to _dl_boot_bind() too



CVS: cvs.openbsd.org: src

2016-08-06 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/06 20:30:04

Modified files:
lib/csu: boot.h 

Log message:
Psych: amd64 has been passing &_DYNAMIC to _dl_boot_bind() for 19 months



CVS: cvs.openbsd.org: src

2016-08-06 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/06 20:30:55

Modified files:
lib/csu/i386   : md_init.h 
lib/csu: boot.h 

Log message:
Teach i386 to pass &_DYNAMIC to _dl_boot_bind()



CVS: cvs.openbsd.org: src

2016-08-06 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/06 20:28:12

Modified files:
lib/csu: boot.h 

Log message:
Flip the #ifdef logic: amd64, i386, and mips64 were the only static PIE
archs using the #else case



CVS: cvs.openbsd.org: src

2016-08-06 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/06 20:02:57

Modified files:
sys/arch/arm/include: setjmp.h 
lib/libc/arch/arm/gen: _setjmp.S setjmp.S 

Log message:
Add XOR cookies for lr and sp.  Stop saving/restoring r12 to/from the jmpbuf.
Switch from calling obsolete sig{block,setmask} to directly using the
sigprocmask syscall.

ok deraadt@ kettenis@



CVS: cvs.openbsd.org: src

2016-08-06 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/08/06 13:16:09

Modified files:
lib/libc/arch/arm: SYS.h 
lib/libc/arch/arm/gen: _setjmp.S divsi3.S setjmp.S sigsetjmp.S 
lib/libc/arch/arm/string: _memcpy.S bcopy.S bzero.S ffs.S 
  memcmp.S memcpy.S memmove.S memset.S 
  strcmp.S strncmp.S 
lib/libc/arch/arm/sys: Ovfork.S brk.S cerror.S sbrk.S 
   sigpending.S sigprocmask.S sigsuspend.S 
   tfork_thread.S 
Added files:
lib/libc/arch/arm: DEFS.h 

Log message:
Use internal names for __errno, _memcpy, memset, and {,_}{set,long}jmp
Eliminate pointless use of PIC_SYM()
Split out DEFS.h from SYS.h like some other archs

ok kettenis@ deraadt@



CVS: cvs.openbsd.org: src

2016-07-29 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/29 21:25:49

Modified files:
sys/arch/alpha/stand/boot: Makefile 
sys/arch/alpha/stand/bootxx: Makefile 
sys/arch/alpha/stand/netboot: Makefile 
sys/arch/amd64/stand/biosboot: Makefile 
sys/arch/amd64/stand/boot: Makefile 
sys/arch/amd64/stand/cdboot: Makefile 
sys/arch/amd64/stand/cdbr: Makefile 
sys/arch/amd64/stand/mbr: Makefile 
sys/arch/amd64/stand/pxeboot: Makefile 
sys/arch/armish/stand: Makefile.inc 
sys/arch/hppa/stand/boot: Makefile 
sys/arch/hppa/stand/cdboot: Makefile 
sys/arch/i386/stand/biosboot: Makefile 
sys/arch/i386/stand/boot: Makefile 
sys/arch/i386/stand/cdboot: Makefile 
sys/arch/i386/stand/cdbr: Makefile 
sys/arch/i386/stand/mbr: Makefile 
sys/arch/i386/stand/pxeboot: Makefile 
sys/arch/landisk/stand/boot: Makefile 
sys/arch/landisk/stand/mbr: Makefile 
sys/arch/landisk/stand/xxboot: Makefile 
sys/arch/loongson/stand/boot: Makefile 
sys/arch/luna88k/stand/boot: Makefile 
sys/arch/macppc/stand/boot.mac: Makefile 
sys/arch/macppc/stand/ofwboot: Makefile 
sys/arch/octeon/stand/boot: Makefile 
sys/arch/sgi/stand/boot: Makefile 
sys/arch/socppc/stand/boot: Makefile 
sys/arch/socppc/stand/mbr: Makefile 
sys/arch/sparc/stand/boot: Makefile 
sys/arch/sparc/stand/bootxx: Makefile 
sys/arch/sparc64/stand/ofwboot: Makefile 
sys/arch/zaurus/stand/zboot: Makefile 
sys/arch/zaurus/stand/zbsdmod: Makefile 

Log message:
Prep for relro: make sure it's off for any non-PIE stand/ program

ok millert@ kettenis@



CVS: cvs.openbsd.org: src

2016-07-26 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/26 13:07:09

Modified files:
lib/libc/arch/powerpc/gen: flt_rounds.c fpgetround.c 
lib/libc/arch/sh/gen: flt_rounds.c fpgetround.c 
lib/libc/arch/alpha/gen: fpgetround.c 
lib/libc/arch/hppa/gen: fpgetround.c 
lib/libc/arch/m88k/gen: fpgetround.c 
lib/libc/arch/mips64/gen: fpgetround.c 
lib/libc/arch/sparc/gen: fpgetround.c 
lib/libc/arch/sparc64/gen: fpgetround.c 
lib/libc/softfloat: fpgetround.c 
Added files:
lib/libc/hidden: ieeefp.h 

Log message:
Wrap fpgetround() so internal calls to it (seen on arm, powerpc, and sh)
go direct instead of through the PLT.

ok millert@ kettenis@



CVS: cvs.openbsd.org: src

2016-07-25 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/25 20:38:12

Modified files:
gnu/usr.bin/binutils-2.17/bfd: elf.c 

Log message:
Make sure there's space for the PT_OPENBSD_WXNEEDED segment, if requested

problem noted by Juan Francisco Cantero Hurtado (iam (at) juanfra.info)
ok deraadt@



CVS: cvs.openbsd.org: www

2016-07-21 Thread Philip Guenther
CVSROOT:/cvs
Module name:www
Changes by: guent...@cvs.openbsd.org2016/07/21 03:57:48

Modified files:
.  : 60.html 

Log message:
Add stuff



CVS: cvs.openbsd.org: www

2016-07-21 Thread Philip Guenther
CVSROOT:/cvs
Module name:www
Changes by: guent...@cvs.openbsd.org2016/07/21 03:12:20

Modified files:
.  : lyrics.html 

Log message:
Put the accent in vis-à-vis



CVS: cvs.openbsd.org: src

2016-07-18 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/18 13:05:22

Modified files:
lib/libc/softfloat: fpgetmask.c fpgetround.c fpgetsticky.c 
fpsetmask.c fpsetround.c fpsetsticky.c 

Log message:
We have __weak_alias() everywhere; remove obsolete #ifdef's

ok deraadt@



CVS: cvs.openbsd.org: src

2016-07-18 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/18 05:48:55

Modified files:
usr.sbin/pstat : pstat.c 

Log message:
Fix VFLAG formatting

ok bluhm@



CVS: cvs.openbsd.org: src

2016-07-18 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/18 03:37:50

Modified files:
usr.sbin/mopd/mopchk: Makefile 
usr.sbin/mopd/mopd: Makefile 
usr.sbin/mopd/mopprobe: Makefile 
usr.sbin/mopd/moptrace: Makefile 

Log message:
Linking against libkvm is unnecessary here

ok mlarkin@



CVS: cvs.openbsd.org: src

2016-07-18 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/18 03:36:50

Modified files:
usr.bin/ktrace : extern.h ktrace.1 ktrace.c ltrace.1 subr.c 
usr.bin/kdump  : kdump.1 kdump.c 

Log message:
Add 'p' trace point for KTRFAC_PLEDGE, as noted by
Michal Mazurek 

While here, fix handling of -t+ in ltrace.



CVS: cvs.openbsd.org: src

2016-07-18 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/18 02:43:16

Modified files:
libexec/ld.so/m88k: ldasm.S 

Log message:
Polish:
- copy #define workaround from mips64 to avoid dangling __CERROR symbol
- remove trap DL_SYSCALL2_NOERR() macro with comment explanation
- make DL_SYSCALL2() self-contained
- add END() and ENTRY() macros to make the symbol table shine

ok miod@



CVS: cvs.openbsd.org: src

2016-07-17 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/17 22:35:57

Modified files:
libexec/ld.so/m88k: ldasm.S 

Log message:
Updated advice^Wcode from miod@ for passing &_DYNAMIC to _dl_boot_bind

ok aoyama@



CVS: cvs.openbsd.org: src

2016-07-15 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/15 03:25:47

Modified files:
libexec/ld.so  : boot.c 
libexec/ld.so/m88k: ldasm.S 

Log message:
Switch m88k to pass &_DYNAMIC to _dl_boot_bind()

probably works: this ASM pattern is already used for _dl_dtors



CVS: cvs.openbsd.org: src

2016-07-14 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/14 00:03:46

Modified files:
sys/sys: exec_elf.h 

Log message:
Add PT_GNU_RELRO, for ld.so work

ok millert@ kettenis@



CVS: cvs.openbsd.org: src

2016-07-13 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/13 23:55:08

Modified files:
sys/kern   : kern_event.c kern_sig.c 
regress/sys/kern/kqueue: kqueue-process.c kqueue-signal.c 

Log message:
Prevent silly states via knotes on pids > 2^32 and on nonexistent signals.

ok tedu@



CVS: cvs.openbsd.org: src

2016-07-13 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/13 21:37:14

Modified files:
sys/ufs/ufs: Tag: OPENBSD_5_9 ufs_vnops.c 

Log message:
backport 1.129

ufs_readdir() buffer was meant to be limited to 64kB; reversed test
permitted very big mallocs to panic the kernel.

reported by Tim Newsham
ok millert@



CVS: cvs.openbsd.org: src

2016-07-13 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/13 21:37:42

Modified files:
sys/ufs/ufs: Tag: OPENBSD_5_8 ufs_vnops.c 

Log message:
backport 1.129

ufs_readdir() buffer was meant to be limited to 64kB; reversed test
permitted very big mallocs to panic the kernel.

reported by Tim Newsham
ok millert@



CVS: cvs.openbsd.org: src

2016-07-13 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/13 21:34:28

Modified files:
sys/ufs/ufs: ufs_vnops.c 

Log message:
ufs_readdir() buffer was meant to be limited to 64kB; reversed test
permitted very big mallocs to panic the kernel.

reported by Tim Newsham
ok millert@



CVS: cvs.openbsd.org: src

2016-07-13 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/13 00:17:11

Modified files:
regress/lib/libc/regex: main.c 

Log message:
Fix usage() output and getopt sorting



CVS: cvs.openbsd.org: src

2016-07-09 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/09 18:39:23

Modified files:
sys/kern   : kern_pledge.c 

Log message:
Paranoia: check KTRPOINT() before calling ktrpledge() to guarantee we
can't (in the future) loop from ktrace writing hitting a pledge condition.

diff from Michal Mazurek (akfaew (at) jasminek.net)



CVS: cvs.openbsd.org: src

2016-07-05 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/05 22:35:12

Modified files:
lib/libc/gen   : devname.c 

Log message:
Use fstatat() to avoid path surgery.

bug catching and ok millert@



CVS: cvs.openbsd.org: src

2016-07-04 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/04 18:44:41

Modified files:
lib/csu: boot.h 

Log message:
Missed a reference to dl_prebind.h

problem noted by Andrew Ngo (andrew.ngo (at) gmail.com)



CVS: cvs.openbsd.org: src

2016-07-04 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/04 15:15:07

Modified files:
libexec/ld.so  : Makefile ld.so.1 library.c library_mquery.c 
 loader.c resolve.c resolve.h 
libexec/ld.so/alpha: syscall.h 
libexec/ld.so/amd64: syscall.h 
libexec/ld.so/arm: syscall.h 
libexec/ld.so/hppa: syscall.h 
libexec/ld.so/i386: syscall.h 
libexec/ld.so/m88k: syscall.h 
libexec/ld.so/mips64: syscall.h 
libexec/ld.so/powerpc: syscall.h 
libexec/ld.so/sh: syscall.h 
libexec/ld.so/sparc: syscall.h 
libexec/ld.so/sparc64: syscall.h 
Removed files:
libexec/ld.so  : dl_prebind.c dl_prebind.h prebind.h 

Log message:
Remove prebind support: binding to symbol table indices is too fragile
for our development process.

ok kettenis@ deraadt@



CVS: cvs.openbsd.org: src

2016-07-04 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/04 12:01:44

Modified files:
gnu/lib/libobjc: Makefile.bsd-wrapper 
lib/libc/sys   : Makefile.inc 
lib/libcurses  : Makefile 
lib/libform: Makefile 
lib/libmenu: Makefile 
lib/libpanel   : Makefile 
regress/usr.bin/ssh/unittests/test_helper: Makefile 
share/man/man5 : mk.conf.5 
share/mk   : bsd.README bsd.lib.mk bsd.own.mk 
sys/arch/amd64/stand: Makefile.inc 
sys/arch/hppa/stand: Makefile.inc 
sys/arch/i386/stand: Makefile.inc 
usr.bin/ssh/lib: Makefile 

Log message:
DEBUGLIBS has been broken since the gcc4 switch, so delete it.  CFLAGS
contains -g by default anyway

problem noted by Edgar Pettijohn (edgar (at) pettijohn-web.com)
ok millert@ kettenis@ deraadt@



CVS: cvs.openbsd.org: src

2016-07-04 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/04 11:56:54

Modified files:
share/mk   : bsd.own.mk 

Log message:
gcc's -fvisibility=hidden isn't the behavior we wanted when cleaning up
symbol exports, so delete ${VISIBILITY_HIDDEN} as unused

ok kettenis@ deraadt@



CVS: cvs.openbsd.org: src

2016-07-03 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/03 22:33:35

Modified files:
libexec/ld.so/i386: rtld_machine.c 

Log message:
The GOT has been initally mapped RW for *years*; ld.so doesn't need to
mprotect it to RW when filling in the references from the PLT

in snaps for a week, ok deraadt@



CVS: cvs.openbsd.org: src

2016-07-03 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/03 22:05:29

Modified files:
sbin/savecore  : savecore.c 

Log message:
Drop support for the undocumented second argument (same as -N option)

ok deraadt@



CVS: cvs.openbsd.org: src

2016-07-03 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/07/03 21:24:48

Modified files:
usr.bin/mg : fileio.c 
libexec/ftpd   : ftpd.c 

Log message:
Use fstatat() instead of crafting a filename to use with stat()

ok millert@



Re: CVS: cvs.openbsd.org: src

2016-06-28 Thread Philip Guenther
On Mon, Jun 27, 2016 at 11:19 PM, Otto Moerbeek <o...@drijf.net> wrote:
> On Mon, Jun 27, 2016 at 09:33:40AM -0600, Ted Unangst wrote:
>
>> CVSROOT:  /cvs
>> Module name:  src
>> Changes by:   t...@cvs.openbsd.org2016/06/27 09:33:40
>>
>> Modified files:
>>   lib/libc/stdlib: malloc.c
>>
>> Log message:
>> defer munmap to after unlocking malloc. this can (unfortunately) be an
>> expensive syscall, and we don't want to tie up other threads. there's no
>> need to hold the lock, so defer it to afterwards.
>> from Michael McConville
>> ok deraadt
>
> There's a race condtion here. The assignments to d_unmap_me and
> unmap_me_sz are not atomic. A thread leaving could call munmap(2) on
> partiallly assigned data.

Yes, two _MALLOC_LEAVE calls can occur without a _MALLOC_ENTRY between them.

  T1 -> MALLOC_LOCK, do stuff
  T2 -> block in MALLOC_LOCK
  T1 -> MALLOC_LEAVE, MMAP()
unmap_me is still set, but to an already unmaped region
  T2 -> return from MALLOC_LOCK, do stuff
  T1 -> block in MALLOC_ENTRY
  T2 -> MALLOC_LEAVE
   this unmaps the same unmap_me from above, which may have
already been mapped by some other thread

MALLOC_LEAVE must clear unmap_me after copying the value into local
variables and before releasing the lock, MALLOC_ENTRY shouldn't touch
them at all.

However, doing this only for the unlock/lock around MMAP() seems weird
and probably wrong.  If you don't take the MMAP() path, then
LEAVE/ENTRY won't be used, unmap_me won't be cleared, and _MUNMAP()
will degenerate back into munmap() holding the lock.

So this needs a clear invariant, perhaps
   "umap_me is only altered or examined when the lock is held and is
always NULL when the malloc lock is release"

...and then to implement that do the full dance (transfer to local
variable, set to NULL, then munmap after unlock) on *every* unlock,
and maybe throw in an assert(umap_me == NULL) when locking.

Other invariants are possible, but that one seems sufficient to get
the desired optimization and simple to implement.


Philip Guenther



CVS: cvs.openbsd.org: src

2016-06-20 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/06/20 20:55:57

Modified files:
gnu/usr.bin/binutils-2.17/bfd: elflink.c 
gnu/usr.bin/binutils-2.17/include: bfdlink.h 
gnu/usr.bin/binutils-2.17/ld: ld.texinfo ldmain.c 
gnu/usr.bin/binutils-2.17/ld/emultempl: elf32.em 

Log message:
Make creation of text-relocations a fatal error by default, with -znotext
to permit it and -ztext to reenable the default of forbidding it.

ok kettenis@



CVS: cvs.openbsd.org: src

2016-06-19 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/06/19 16:57:53

Modified files:
gnu/usr.bin/binutils-2.17/binutils: readelf.c 
gnu/usr.bin/binutils-2.17/include/elf: common.h 

Log message:
At least display the DT_GNU_HASH tag nicely

ok kettenis@



CVS: cvs.openbsd.org: src

2016-06-19 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/06/19 16:35:43

Modified files:
gnu/usr.bin/binutils-2.17/bfd/doc: bfdio.texi bfdt.texi 

Log message:
Update docs to match our local time_t changes



CVS: cvs.openbsd.org: src

2016-06-19 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/06/19 15:41:51

Modified files:
share/man/man9 : ktrace.9 

Log message:
KTRPOINT() takes a KTR_* value, not a KTRFAC_* value.

problem noted and based on diff by Michal Mazurek (akfaew (at) jasminek.net)
ok jmc@



CVS: cvs.openbsd.org: www

2016-06-18 Thread Philip Guenther
CVSROOT:/cvs
Module name:www
Changes by: guent...@cvs.openbsd.org2016/06/18 11:42:02

Modified files:
faq: current.html 

Log message:
Extra work is required of those that skip some of the ABI steps



CVS: cvs.openbsd.org: src

2016-06-18 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/06/18 11:39:44

Modified files:
sys/sys: ktrace.h 

Log message:
KTRPOINT() is only useful in the kernel, so move it behind #ifdef _KERNEL

ok mpi@ kettenis@



CVS: cvs.openbsd.org: src

2016-06-17 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/06/17 22:21:24

Modified files:
lib/libc/sys   : ktrace.2 

Log message:
Document KTRFAC_{PLEDGE,EXEC{ARGS,ENV}}



CVS: cvs.openbsd.org: src

2016-06-17 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/06/17 20:40:46

Modified files:
libexec/ld.so/mips64: rtld_machine.c 

Log message:
Make mips64 like all the others: only make mappings writable during relocation
if DT_TEXTREL was set on the object.  If that's needed, only set the mapping
to READ+WRITE to avoid W^X violation.

ok kettenis@



CVS: cvs.openbsd.org: src

2016-06-17 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/06/17 13:20:19

Modified files:
sys/conf   : files 

Log message:
urtwn device now needs rtwn.c, even if rtwn device isn't built

ok mpi@ jca@ mglocker@



Re: CVS: cvs.openbsd.org: src

2016-06-17 Thread Philip Guenther
On Fri, Jun 17, 2016 at 9:40 AM, Marcus Glocker  wrote:
> On Fri, Jun 17, 2016 at 04:53:55AM -0600, Stefan Sperling wrote:
>
>> CVSROOT:  /cvs
>> Module name:  src
>> Changes by:   s...@cvs.openbsd.org2016/06/17 04:53:55
>>
>> Modified files:
>>   sys/dev/ic : rtwn.c rtwnvar.h
>>   sys/dev/pci: if_rtwn.c
>>   sys/dev/usb: if_urtwn.c
>>
>> Log message:
>> Merge a lot of code from urtwn(4) into rtwn(4). Both drivers now share code
>> in the file sys/dev/ic/rtwn.c. This reduces kernel bloat and will make it
>> easier to have both drivers benefit from future enhancements.
>> ok mpi@
>
> I think this breaks archs where urtwn is enabled, but rtwn isn't.

Looks like a one line file to conf/files:

--- ./conf/files3 May 2016 14:52:39 -   1.619
+++ ./conf/files17 Jun 2016 17:35:57 -
@@ -396,7 +396,7 @@ filedev/ic/rtw.crtw

 # Realtek RTL8188CE 802.11
 device rtwn: ifnet, wlan, firmload
-file   dev/ic/rtwn.c   rtwn
+file   dev/ic/rtwn.c   rtwn | urtwn

 # Ralink RT2500/RT2600 802.11
 device ral: ether, ifnet, ifmedia, firmload, wlan


ok?



CVS: cvs.openbsd.org: src

2016-06-15 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/06/15 21:21:09

Modified files:
lib/libc/arch/m88k: SYS.h 

Log message:
PSEUDO_NOERROR() is used for syscalls that return now, so need to put
a nop in the slot skipped by the kernel on success



CVS: cvs.openbsd.org: src

2016-06-12 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/06/12 22:59:56

Modified files:
libexec/ld.so/powerpc: rtld_machine.c 

Log message:
Only need to sync the icache on the GOT for the old BSS PLT format

ok kettenis@



Re: CVS: cvs.openbsd.org: src

2016-06-06 Thread Philip Guenther
On Mon, Jun 6, 2016 at 6:34 PM, Ted Unangst <t...@openbsd.org> wrote:
> CVSROOT:/cvs
> Module name:src
> Changes by: t...@cvs.openbsd.org2016/06/06 19:34:39
>
> Modified files:
> usr.bin/kdump  : ktrstruct.c
>
> Log message:
> add a hack to avoid printing the long string format for times in the 70s.
> this is usually a result of a timestamp which hasn't been identified as
> "relative" and decoding them to precise dates long in the past is a
> distraction. (eagerly awaiting a cleaner, better diff to do the same.)

I blame tedu for any dental problems caused by gritting one's teeth.


Philip Guenther



CVS: cvs.openbsd.org: src

2016-05-31 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/31 23:09:27

Modified files:
gnu/usr.bin/binutils-2.17/bfd: elflink.c 

Log message:
Until we get relro working, we need the __{got,plt}_{start,end} symbols
to always be exported so ld.so can use them.  This isn't the Right Thing,
but pushing strict W^X is usefully turning up issues, so unbreak stuff
until we can slog into binutils and do the Right Thing

ok kettenis@



CVS: cvs.openbsd.org: src

2016-05-31 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/31 22:53:54

Modified files:
sys/sys: mman.h 
sys/uvm: uvm_mmap.c 

Log message:
Delete the kernel compat bits for old mmap() MAP_OLD* flags

ok deraadt@ matthew@ jca@



CVS: cvs.openbsd.org: src

2016-05-30 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/30 15:35:08

Modified files:
lib/libc/sys   : Makefile.inc 

Log message:
Move __getcwd from ASM to HIDDEN: we don't want the literal __getcwd symbol

ok millert@ deraadt@



CVS: cvs.openbsd.org: src

2016-05-30 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/30 00:48:21

Modified files:
lib/libc/sys   : syscall.2 

Log message:
We no longer have syscalls with multiple return values.  Whine about
long long alignment instead.



CVS: cvs.openbsd.org: src

2016-05-29 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/29 23:18:52

Modified files:
lib/libc/arch/arm: Symbols.list 
lib/libc/arch/arm/sys: brk.S sbrk.S 
lib/libc/arch/hppa: Symbols.list 
lib/libc/arch/hppa/sys: brk.S sbrk.S 
lib/libc/arch/mips64: Symbols.list 
lib/libc/arch/mips64/sys: brk.S sbrk.S 
lib/libc/arch/powerpc: Symbols.list 
lib/libc/arch/powerpc/sys: brk.S sbrk.S 
lib/libc/arch/sh: Symbols.list 
lib/libc/arch/sh/sys: brk.S sbrk.S 

Log message:
Consistently reference '_end' instead of 'end' in the brk/sbrk implementation

ok deraadt@



CVS: cvs.openbsd.org: src

2016-05-29 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/29 21:06:58

Modified files:
lib/libc/stdlib: icdb.c 

Log message:
The icdb magic number doesn't need to be visible to static links

ok tedu@



CVS: cvs.openbsd.org: src

2016-05-29 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/29 20:53:29

Modified files:
include/rpcsvc : yp_prot.h ypclnt.h 
lib/libc/hidden/rpcsvc: ypclnt.h 
lib/libc/yp: yp_bind.c ypexclude.h 

Log message:
Stop publicly declaring _yp_dobind() and struct dom_binding, closing out
a rant Theo wrote 24 years ago.  Mark __ypexclude_{add,is,free}() as hidden

"get off my lawn!" deraadt@



CVS: cvs.openbsd.org: src

2016-05-29 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/29 20:11:21

Modified files:
lib/libc/arch/i386/gen: _setjmp.S setjmp.S sigsetjmp.S 

Log message:
Do setjmp cookies for eip, esp, and ebp.  For bonus points, mix how
the cookies are used in setjmp/_setjmp/sigsetjmp so that mixing
calls (e.g., longjmp on a _setjmp buffer) will scramble all three
registers and jump you to a random location on a random stack!

ok deraadt@



CVS: cvs.openbsd.org: src

2016-05-29 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/29 20:06:03

Modified files:
lib/libc/arch/mips64/gen: _setjmp.S setjmp.S 

Log message:
Do setjmp cookies for gp, sp, and ra

endian testing and ok deraadt@
ok visa@



CVS: cvs.openbsd.org: src

2016-05-29 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/29 16:42:24

Modified files:
lib/libc/yp: yp_bind.c ypinternal.h 

Log message:
_yp_bind(), _ypbindlist, _yp_domain, and _yplib_timeout are no longer
exported, so declare them as hidden to avoid pointless GOT relocations

ok millert@ deraadt@



CVS: cvs.openbsd.org: src

2016-05-29 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/29 16:39:21

Modified files:
lib/libc/arch/amd64/gen: setjmp.S sigsetjmp.S 

Log message:
Switch from calling obsolete sig{block,setmask} to directly using the
sigprocmask syscall

ok kettenis@



CVS: cvs.openbsd.org: src

2016-05-29 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/29 14:49:39

Added files:
lib/libc/hidden/machine: sysarch.h 

Log message:
Wrap  to prevent overriding internal calls, for
alpha and mips64

ok millert@



CVS: cvs.openbsd.org: src

2016-05-29 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/29 14:48:31

src/lib/libc/hidden/machine

Update of /cvs/src/lib/libc/hidden/machine
In directory cvs.openbsd.org:/tmp/cvs-serv40405/machine

Log Message:
Directory /cvs/src/lib/libc/hidden/machine added to the repository



CVS: cvs.openbsd.org: src

2016-05-29 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/29 14:47:49

Modified files:
lib/libc/hidden: db.h 
lib/libc/stdlib: hcreate.c 
lib/libc/db/hash: extern.h hash_func.c 

Log message:
Remove dead support for changing BDB hash algorithm and cache of alternatives

ok natano@ millert@ deraadt@



CVS: cvs.openbsd.org: src

2016-05-29 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/29 01:59:36

Modified files:
lib/libc/arch/hppa/gen: setjmp.S 
lib/libc/arch/powerpc/gen: setjmp.S 

Log message:
Only require 4 byte alignment on ILP32 archs



CVS: cvs.openbsd.org: src

2016-05-29 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/29 00:16:52

Modified files:
lib/libc/arch/powerpc/gen: setjmp.S 

Log message:
Use .balign instead of .align; only need 8 byte alignment not 2^8



CVS: cvs.openbsd.org: src

2016-05-29 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/29 00:01:24

Modified files:
lib/libc/net   : getaddrinfo.3 
lib/libc/sys   : socketpair.2 

Log message:
Prefer AF_* over PF_* and 'address family' over 'protocol family'

ok jung@



CVS: cvs.openbsd.org: src

2016-05-28 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/28 20:19:02

Modified files:
usr.sbin/rbootd: Makefile parseconf.c rbootd.c utils.c 

Log message:
Delete blocking/unblocking of signals, as the handlers now just set flags
that are tested by the main loop.

ok jca@ deraadt@



CVS: cvs.openbsd.org: src

2016-05-23 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/23 03:42:09

Modified files:
lib/libc/arch/sparc/gen: setjmp.S 

Log message:
More fixes from miod



CVS: cvs.openbsd.org: src

2016-05-23 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/23 02:57:20

Modified files:
lib/libc/arch/sparc/gen: setjmp.S 

Log message:
Include SYS.h instead of DEFS.h now that this does a direct syscall



CVS: cvs.openbsd.org: src

2016-05-22 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/22 18:27:18

Modified files:
lib/libc   : shlib_version 

Log message:
Major bump for the removal of the various locale, ruserok, and
longjmperror symbols



CVS: cvs.openbsd.org: src

2016-05-22 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/22 18:24:50

Modified files:
lib/libc/arch/hppa/gen: setjmp.S 

Log message:
Add XOR cookies for rp and sp.  Switch from calling obsolete
sig{block,setmask} to directly using the sigprocmask syscall.
Remove longjmperror()-if-passed-real-sigcontext checks and the
filling in of sigcontext fields that longjmp ignores.

in snaps; ok deraadt@



CVS: cvs.openbsd.org: src

2016-05-22 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/22 18:21:48

Modified files:
lib/libc/stdio : fwalk.c local.h 

Log message:
Make _fwalk and _cleanup completely internal to libc

ok deraadt@



CVS: cvs.openbsd.org: src

2016-05-22 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/22 18:18:57

Modified files:
include: setjmp.h 
lib/libc   : Symbols.list 
lib/libc/gen   : Makefile.inc setjmp.3 
lib/libc/arch/arm/gen: _setjmp.S setjmp.S 
lib/libc/arch/m88k/gen: _setjmp.S setjmp.S sigsetjmp.S 
lib/libc/arch/mips64/gen: _setjmp.S setjmp.S 
Removed files:
lib/libc/gen   : setjmperr.c 

Log message:
Stop supporting longjmperror(); it's not used, not portable, and the checks
longjmp performs can't really be relied upon, even after we got rid of the
false positives...

ok millert@ deraadt@



CVS: cvs.openbsd.org: src

2016-05-22 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/22 18:12:58

Modified files:
lib/libc   : Symbols.list 
include: unistd.h 
lib/libc/hidden: unistd.h 
lib/libc/net   : ruserok.c rcmd.3 

Log message:
Remove iruserok(_sa)? and __ivaliduser(sa)?

ok millert@ deraadt@



CVS: cvs.openbsd.org: src

2016-05-22 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/22 18:08:23

Modified files:
lib/libc   : Symbols.list 
lib/libc/net   : ruserok.c 

Log message:
Eliminate __check_rhosts_file and __rcmd_errstr: they were only used by
rlogind and rshd (remember them?)

ok deraadt@



CVS: cvs.openbsd.org: src

2016-05-22 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/22 18:05:15

Modified files:
lib/libc   : Symbols.list 
lib/libc/time  : strptime.c 
lib/libc/locale: __mb_cur_max.c _def_messages.c _def_monetary.c 
 _def_numeric.c _def_time.c localeconv.c 
 nl_langinfo.c rune.h setlocale.c 
Added files:
lib/libc/include: localedef.h 
Removed files:
sys/sys: localedef.h 

Log message:
Stop exposing  and various symbols internal to the libc
locale implementation: _{Current,Default}*Locale, __[mn]locale_changed,
__mb_len_max_runtime

ok millert@ schwarze@ deraadt@



CVS: cvs.openbsd.org: src

2016-05-22 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/22 17:56:30

Modified files:
lib/libc/arch/powerpc/gen: setjmp.S sigsetjmp.S 

Log message:
Add XOR cookies for r1 (stack) and lr.  Switch from calling obsolete
sig{block,setmask} to directly using the sigprocmask syscall.  Rewrite
sig{set,long}jmp based on {set,long}jmp to avoid the deprecated
store/load-multiple instructions.

in snaps; ok deraadt@



CVS: cvs.openbsd.org: src

2016-05-22 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/22 17:02:28

Modified files:
usr.bin/kdump  : ktrstruct.c 

Log message:
On hppa, function pointer comparison can require dereferencing them.
kdump can't do that for a sigaction sa_handler pointer from the trace,
so cast to void* to suppress it.

ok deraadt@



CVS: cvs.openbsd.org: src

2016-05-22 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/22 16:52:01

Modified files:
sys/uvm: uvm_amap.c uvm_amap.h 
lib/libkvm : kvm_proc.c 

Log message:
Revert previous: breaks i386 and powerpc, probably all non-PMAP_DIRECT archs



CVS: cvs.openbsd.org: src

2016-05-21 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/21 20:47:33

Removed files:
lib/libc/arch/powerpc/sys: cerror.S 

Log message:
Oh right, actually delete this now that __cerror is unused



CVS: cvs.openbsd.org: src

2016-05-20 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/20 20:11:02

Modified files:
sys/ddb: db_structinfo.c 

Log message:
 isn't needed for ddb structinfo

ok millert@ deraadt@ schwarze@



CVS: cvs.openbsd.org: src

2016-05-19 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/19 21:41:44

Modified files:
lib/libc   : Symbols.list 
lib/librthread : Symbols.map 

Log message:
Delete the _SDA_BASE and _SDA2_BASE symbols: they're unnecessary in
shared libraries...and I misspelled them anyway



CVS: cvs.openbsd.org: src

2016-05-19 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/19 19:28:43

Modified files:
usr.sbin/crunchgen: crunched_main.c 

Log message:
Restore support for 'instbin program args...'

problem noted by and ok deraadt@



CVS: cvs.openbsd.org: src

2016-05-19 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/19 14:07:43

Modified files:
libexec/ld.so  : tib.c 

Log message:
Give the caller a chance to handle the failure if unable to allocate
the TIB for a new thread

ok jca@ millert@ deraadt@



CVS: cvs.openbsd.org: src

2016-05-19 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/19 12:50:01

Modified files:
libexec/ld.so  : malloc.c 

Log message:
ld.so can now be entered by multiple threads via _dl_{allocate,free}_tib(),
so do locking in ld.so's malloc subsystem, (re)using the existing
_dl_thread_kern_{stop,go}() callbacks.

problem diagnosed by jsing@ in the 'go' port; fix tested there and by
semarie@ in the 'rust' port



CVS: cvs.openbsd.org: src

2016-05-18 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/18 23:31:22

Modified files:
lib/libc/sys   : Makefile.inc 

Log message:
Add ASM_NOERR for syscalls that never fail and thus don't need the errno
setting logic...which can significantly reduce the size of the stub on
some archs; 20 syscalls get a trim with this.

in snaps for a bit and ok deraadt@



CVS: cvs.openbsd.org: src

2016-05-18 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/18 14:21:14

Modified files:
sys/arch/sh/include: frame.h locore.h proc.h tcb.h 
sys/arch/sh/sh : db_interface.c sh_machdep.c 
lib/libc/arch/sh: Makefile.inc SYS.h 
lib/libc/arch/sh/sys: brk.S sbrk.S sigprocmask.S sigsuspend.S 
  tfork_thread.S 
Removed files:
lib/libc/arch/sh/sys: cerror.S 

Log message:
Save and restore 'gbr' register when enter/leaving the kernel, and use
it for the TCB pointer.  Eliminate __cerror.

"looks good" kettenis@, testing and ok deraadt@



CVS: cvs.openbsd.org: src

2016-05-16 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/16 10:25:06

Modified files:
lib/libc/arch/alpha: SYS.h 

Log message:
...and delete the GP setup.  Should have been in previous commit



CVS: cvs.openbsd.org: src

2016-05-16 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2016/05/16 10:20:58

Modified files:
lib/libc/arch/alpha: Makefile.inc SYS.h 
Removed files:
lib/libc/arch/alpha/sys: cerror.S 

Log message:
Eliminate cerror: use PAL_rdunique to get the TCB address directly

ok deraadt@ kettenis@



<    5   6   7   8   9   10   11   12   13   14   >