librthread: don't change thread flags after fork()

2016-04-10 Thread Philip Guenther
The libpthread fork() wrapper makes two changes to the flags for the process: it clears the 'detached' flag and sets the 'original' flag. I now believe those are both wrong and should be left as they are from the original process. For the 'detached' flag, the POSIX spec does *not* mention

remove o58_kill()

2016-04-10 Thread Philip Guenther
It's been five months, a release, and two libc major bumps since we split thrkill(2) out of kill(2), so I think we can remove support for the 5.8 kill(2) syscall. I don't think we *really* support running 5.8 binaries on a -current kernel. ok? Philip Index: syscalls.master

Re: pledge.2: sync list of syscalls with kern_pledge.c

2016-04-10 Thread Philip Guenther
On Sun, Apr 10, 2016 at 9:16 AM, Ingo Schwarze wrote: ... >> The following aren't listed in the manpage. Should some of them be? >> >> [SYS_sendsyslog] = PLEDGE_ALWAYS, /* stack protector reporting */ > > It looks like that's already listed below "stdio". > > By the

Re: Any reason there's no way to persist pledge(2) state across exec?

2016-04-10 Thread Brennan Vincent
Got it. Thanks for the explanation. On Sun, Apr 10, 2016, at 01:36 PM, Stuart Henderson wrote: > On 2016/04/10 20:50, Nicholas Marriott wrote: > > Hi > > > > What's the use for this? What program could use it? > > > > On Sun, Apr 10, 2016 at 08:48:08AM -0700, Brennan Vincent wrote: > > >

Re: Any reason there's no way to persist pledge(2) state across exec?

2016-04-10 Thread Brennan Vincent
I imagine it could be used to provide rudimentary sandboxing (running untrusted or partially-trusted code and limiting what it is allowed to access). Let me know if I am mistaken. On Sun, Apr 10, 2016, at 12:50 PM, Nicholas Marriott wrote: > Hi > > What's the use for this? What program could use

Re: Any reason there's no way to persist pledge(2) state across exec?

2016-04-10 Thread Stuart Henderson
On 2016/04/10 20:50, Nicholas Marriott wrote: > Hi > > What's the use for this? What program could use it? > > On Sun, Apr 10, 2016 at 08:48:08AM -0700, Brennan Vincent wrote: > > Subject basically says it all. I think some could find it useful to have > > `pledge` promises optionally persist

Re: Any reason there's no way to persist pledge(2) state across exec?

2016-04-10 Thread Nicholas Marriott
Hi What's the use for this? What program could use it? On Sun, Apr 10, 2016 at 08:48:08AM -0700, Brennan Vincent wrote: > Subject basically says it all. I think some could find it useful to have > `pledge` promises optionally persist even after the process calls > execve. This could, for

ftpd(8) bin folder

2016-04-10 Thread fritjof
I tried to find out how the ~/ftp/bin folder is used? But after implementing ls(1) by Art internally: - http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/libexec/ftpd/popen.c#rev1.10 it looks like the bin folder becomes some kind of obsolete: - the function that executes a certain program is:

Re: arm: new FDT-enabled mainbus

2016-04-10 Thread Patrick Wildt
On Sun, Apr 10, 2016 at 08:15:08PM +0200, Mark Kettenis wrote: > > Date: Sat, 9 Apr 2016 17:32:33 +0200 > > From: Patrick Wildt > > > > On Fri, Apr 08, 2016 at 09:38:25PM +0200, Mark Kettenis wrote: > > > > Date: Fri, 8 Apr 2016 20:26:14 +0200 > > > > From: Patrick Wildt

Re: arm: new FDT-enabled mainbus

2016-04-10 Thread Mark Kettenis
> Date: Sat, 9 Apr 2016 17:32:33 +0200 > From: Patrick Wildt > > On Fri, Apr 08, 2016 at 09:38:25PM +0200, Mark Kettenis wrote: > > > Date: Fri, 8 Apr 2016 20:26:14 +0200 > > > From: Patrick Wildt > > > > > > +void > > > +mainbus_iterate(struct device

Re: pledge.2: sync list of syscalls with kern_pledge.c

2016-04-10 Thread Theo Buehler
Thanks a lot for your quick and very helpful input, Ingo and Sebastien! Here's the part of the initial diff that seems uncontentious. I changed break to brk and removed the chflags, chmod and chown families from rpath and wpath. I intend to commit this a bit later. After this is in, I'll send a

Re: pledge.2: sync list of syscalls with kern_pledge.c

2016-04-10 Thread Sebastien Marie
On Sun, Apr 10, 2016 at 01:43:17PM +0200, Theo Buehler wrote: > This is a first stab at updating the list of syscalls in the pledge(2) > manpage and at the same time I'd like to clarify some simple things. I agree some update/cleanup is needed. But I think we shouldn't try to document the whole

add/use macros for CP14/CP15 on arm

2016-04-10 Thread Jonathan Gray
Adapt FreeBSD's sysreg.h definitions for cp14/cp15 and make use of it in .S files. Matched and changed by a script, verified to cause no binary change with armv7, armish, and zaurus kernels. Index: arm/arm/bcopyinout.S === RCS file:

Re: pledge.2: sync list of syscalls with kern_pledge.c

2016-04-10 Thread Ingo Schwarze
Hi, Theo Buehler wrote on Sun, Apr 10, 2016 at 01:43:17PM +0200: > This is a first stab at updating the list of syscalls in the pledge(2) > manpage and at the same time I'd like to clarify some simple things. I sympathise a lot with the idea to make this page as accurate as possible. To me,

Any reason there's no way to persist pledge(2) state across exec?

2016-04-10 Thread Brennan Vincent
Subject basically says it all. I think some could find it useful to have `pledge` promises optionally persist even after the process calls execve. This could, for example, be implemented with an `exec_noreset` pledge that gives access to the same syscalls as `exec`, but with this restricted

Bug#812810: fill-paragraph: Leaves a space at the end of the paragraph

2016-04-10 Thread Mark Lumsden
This diff changes mg's behaviour to not put a space at the end of a paragraph when using the fill-paragraph function as reported by Harald Dunkel. ok/comments? Index: paragraph.c === RCS file: /cvs/src/usr.bin/mg/paragraph.c,v

Re: uvm amap: Simplify amap traversal in amap_swap_off

2016-04-10 Thread Stefan Kempf
I'd like to commit this soon unless there are objections. Stefan Kempf wrote: > The recent uvm commits fixed hangs because machines went out of memory > because of using too much space for amap slots. > > It's possible to shrink memory requirements for amaps even more, > but the current code

pledge: simplify check for "allow only reductions"

2016-04-10 Thread Sebastien Marie
Hi, The following diff simplifies the check for allowing only promises reductions. Please review it carefully: it implies several bitwise operations. I will try also to explain the diff step-by-step because even if it is small in size, it manipulates lot of things. 1. removing: flags &=

pledge: remove unneeded check in sys_pledge()

2016-04-10 Thread Sebastien Marie
Hi, The following diff removes an unneeded check on flags. It was used historically, when tame(2) promises were passed as bitflags, in order to avoid userland to be able to set flags normally managed by kernel. Nowadays, flags is build using pledgereq_flags() function which returns bitflag from

pledge.2: sync list of syscalls with kern_pledge.c

2016-04-10 Thread Theo Buehler
This is a first stab at updating the list of syscalls in the pledge(2) manpage and at the same time I'd like to clarify some simple things. I'm wondering about the chflags(2), chown(2) and chmod(2) families of system calls. They are currently listed up to four times: once at the beginning where

Re: smtpd.conf(5): comma in filter chains

2016-04-10 Thread david+bsd
> On 10 Apr 2016, at 08:49, Jason McIntyre wrote: > > fair enough. but since "..." already means optional i went further and > removed the []: > >filter name chain filter ... Ack. Thanks. David

Re: smtpd.conf(5): comma in filter chains

2016-04-10 Thread Jason McIntyre
On Sun, Apr 10, 2016 at 08:08:21AM +0200, Joerg Jung wrote: > > > Am 09.04.2016 um 21:33 schrieb Jason McIntyre : > > > >> On Sat, Apr 09, 2016 at 11:42:58AM +0200, david+bsd@dahlberg.cologne wrote: > >> After quite some debugging of why the heck my smtpd.conf was not > >>

use libtls in ldapd

2016-04-10 Thread Jonathan Matthew
A while back (s2k15?), reyk@ suggested I take a look at converting ldapd to use libtls rather than the openssl api. Today I finally got around to it, resulting in the diff below. Most of the diff just removes ssl.c and ssl_privsep.c, and replaces some of it with evbuffer_tls.c (copied from

Re: smtpd.conf(5): comma in filter chains

2016-04-10 Thread Joerg Jung
> Am 09.04.2016 um 21:33 schrieb Jason McIntyre : > >> On Sat, Apr 09, 2016 at 11:42:58AM +0200, david+bsd@dahlberg.cologne wrote: >> After quite some debugging of why the heck my smtpd.conf was not >> working after upgrading to 5.9 and substituting clamsmtp and dkim- >>