Keyboard resume (zzz) diff

2016-04-10 Thread Mike Larkin
Please test this diff on all machines that you can successfully (today) resume with 'zzz'. Please make sure that after resume, the keyboard still works. This diff re-enables the keyboard on resume. Previously, we were re-enabling the keyboard *controller* but apparently on some machines (notably t

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 the

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 way, since sendsysl

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: > > > Subject

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 eve

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 example

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: ftpd_pope

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 > > > > > > > > +void >

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 *self, struct device *match, int node) > >

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 a

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, tha

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 behavio

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 retr

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 need

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 &= p->p_p

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 s

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 it

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