Re: diff: pledge snmpd

2017-08-11 Thread Sebastian Benoit
ok with 2 comments below Rob Pierce(r...@2keys.ca) on 2017.08.11 16:35:21 -0400: > The following diff pledges two of three processes in snmpd: the parent snmpd > process and the trap handler. We cannot currently pledge snmpe as snmp > requests > asking for privileged kernel info are disallowed

rw_enter_write() -> NET_LOCK()

2017-08-11 Thread Martin Pieuchot
Now that NET_LOCK() does not take any argument, we can use it everywhere. ok? Index: net/if_pppx.c === RCS file: /cvs/src/sys/net/if_pppx.c,v retrieving revision 1.62 diff -u -p -r1.62 if_pppx.c --- net/if_pppx.c 11 Aug 2017

fktrace

2017-08-11 Thread Ted Unangst
adds fktrace syscall. currently with same behavior (regular files only) as existing code. tested with ktrace and... #include #include #include #include #include int main() { int fd; fd = open("ledump", O_CREAT, 0666); syscall(113, fd, KTROP_SET, KTRFAC_NAMEI,

Re: amd64: remove clock warning

2017-08-11 Thread Mark Kettenis
> Date: Fri, 11 Aug 2017 17:11:11 -0400 > From: joshua stein > > Removes this useless error that appears on some modern machines: > > RTC BIOS diagnostic error > ff Those bits have lost their meaning a

Re: ksh: remove special handling of export PS1 as root

2017-08-11 Thread Jeremie Courreges-Anglas
On Fri, Aug 11 2017, Philip Guenther wrote: > Currently, if ksh starts as root and PS1 was exported but doesn't contain > '#' or '\$' (which will be expanded to '#') then it'll override it with > the root default of '# '. This is kind of a corner case, because PS1 is > not

Re: slaacd: simplify route message handling

2017-08-11 Thread Jeremie Courreges-Anglas
On Fri, Aug 11 2017, Florian Obser wrote: > When read(2)'ing from the routing socket only one message is returned. > Clue provided by jca and claudio. > > OK? ok jca@ -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

amd64: remove clock warning

2017-08-11 Thread joshua stein
Removes this useless error that appears on some modern machines: RTC BIOS diagnostic error ff Index: sys/arch/amd64/isa/clock.c === RCS file:

Re: rtadvd: open ioctl socket up front

2017-08-11 Thread Jeremie Courreges-Anglas
On Fri, Aug 11 2017, Florian Obser wrote: > No need to constantly re-open a socket. Just open it up front and keep > it around. ok jca@ -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

diff: pledge snmpd

2017-08-11 Thread Rob Pierce
The following diff pledges two of three processes in snmpd: the parent snmpd process and the trap handler. We cannot currently pledge snmpe as snmp requests asking for privileged kernel info are disallowed by pledge. I have included a commented pledge block in snmpe.c below (which will not be

Re: Implement __cxa_thread_atexit

2017-08-11 Thread Joerg Sonnenberger
On Fri, Aug 11, 2017 at 04:31:44PM +0200, Mark Kettenis wrote: > The diff below implements __cxa_thread_atexit(). Calls to this > function are emitted by the compiler to schedule running desctructors > for thread_local objects when a thread terminates or calls exit(3). > The Linux implementation

Re: csu: _dl_printf no longer needed

2017-08-11 Thread Mark Kettenis
> Date: Fri, 11 Aug 2017 10:13:16 -0700 > From: Philip Guenther > > The _dl_printf() used to be used in libexec/ld.so/*/archdep.h if an > unexpected type of relocation was encountered in ld.so itself. Those went > away (we test ld.so before installing it; _dl_exit() is

Re: solock() & nfs_connect

2017-08-11 Thread Martin Pieuchot
On 11/08/17(Fri) 20:31, Alexander Bluhm wrote: > On Fri, Aug 11, 2017 at 01:18:48PM -0400, Martin Pieuchot wrote: > > Diff below merge all solock()/sounlock() dances inside nfs_connect(). > > Now we sleep for memory while holding the lock. Is this a good > idea? As long as a subsystem outside

csu: _dl_printf no longer needed

2017-08-11 Thread Philip Guenther
The _dl_printf() used to be used in libexec/ld.so/*/archdep.h if an unexpected type of relocation was encountered in ld.so itself. Those went away (we test ld.so before installing it; _dl_exit() is enough) so the static pie bits in lib/csu/*/md_init.h no longer need to supply a no-op

Re: NET_LOCK() w/o argument

2017-08-11 Thread Hrvoje Popovski
On 11.8.2017. 19:56, Martin Pieuchot wrote: > Two weeks ago I remove the splsoftnet()/splx() dance inside the > NET_LOCK(). Turns out we found a single bug, a missing splx() > in net/if_spppsubr.c. > > I believe it's time to move forward and completely remove the > argument. This will allow us

Re: NET_LOCK() w/o argument

2017-08-11 Thread Alexander Bluhm
On Fri, Aug 11, 2017 at 01:56:28PM -0400, Martin Pieuchot wrote: > I believe it's time to move forward and completely remove the > argument. This will allow us to do more funky dances with the > NET_LOCK(). OK bluhm@ > diff --git sys/dev/usb/if_umb.c sys/dev/usb/if_umb.c > index

Re: solock() & nfs_connect

2017-08-11 Thread Alexander Bluhm
On Fri, Aug 11, 2017 at 01:18:48PM -0400, Martin Pieuchot wrote: > Diff below merge all solock()/sounlock() dances inside nfs_connect(). Now we sleep for memory while holding the lock. Is this a good idea? What is the advantage of changing it? The label names "bad" and "out" are confusing.

Re: bsd.regress.mk.5 typo fix

2017-08-11 Thread Alexander Bluhm
On Fri, Aug 11, 2017 at 12:40:24PM -0400, Rob Pierce wrote: > I just ran across this. Ok? OK bluhm@ > Index: bsd.regress.mk.5 > === > RCS file: /cvs/src/share/man/man5/bsd.regress.mk.5,v > retrieving revision 1.14 > diff -u -p

NET_LOCK() w/o argument

2017-08-11 Thread Martin Pieuchot
Two weeks ago I remove the splsoftnet()/splx() dance inside the NET_LOCK(). Turns out we found a single bug, a missing splx() in net/if_spppsubr.c. I believe it's time to move forward and completely remove the argument. This will allow us to do more funky dances with the NET_LOCK(). ok? diff

Re: Implement __cxa_thread_atexit

2017-08-11 Thread Philip Guenther
On Fri, 11 Aug 2017, Todd C. Miller wrote: > On Fri, 11 Aug 2017 16:31:44 +0200, Mark Kettenis wrote: > > > I've chosen to implement __cxa_thread_atexit() directly instead of > > __cxa_thread_atexit_impl(). I think that is cleaner. It means we > > don't need to make changes to libc++ for this

Re: Implement __cxa_thread_atexit

2017-08-11 Thread Todd C. Miller
On Fri, 11 Aug 2017 16:31:44 +0200, Mark Kettenis wrote: > I've chosen to implement __cxa_thread_atexit() directly instead of > __cxa_thread_atexit_impl(). I think that is cleaner. It means we > don't need to make changes to libc++ for this to start working. It > looks like modern libstdc++

ksh: remove special handling of export PS1 as root

2017-08-11 Thread Philip Guenther
Currently, if ksh starts as root and PS1 was exported but doesn't contain '#' or '\$' (which will be expanded to '#') then it'll override it with the root default of '# '. This is kind of a corner case, because PS1 is not normally exported. phessler's research seems to indicate that we're

solock() & nfs_connect

2017-08-11 Thread Martin Pieuchot
Diff below merge all solock()/sounlock() dances inside nfs_connect(). ok? Index: nfs/nfs_socket.c === RCS file: /cvs/src/sys/nfs/nfs_socket.c,v retrieving revision 1.122 diff -u -p -r1.122 nfs_socket.c --- nfs/nfs_socket.c10 Aug

Re: pfctl -N: no dns resolution

2017-08-11 Thread Florian Obser
On Fri, Aug 11, 2017 at 06:05:09PM +0200, Sebastian Benoit wrote: > Hi, > > this adds a -N option to pfctl that turns of dns resolution for all the > things where a dns entry is a possible thing, i.e. in rules ("pass in from > www.openbsd.org") or table entries. > > Its usefull to make sure the

bsd.regress.mk.5 typo fix

2017-08-11 Thread Rob Pierce
I just ran across this. Ok? Index: bsd.regress.mk.5 === RCS file: /cvs/src/share/man/man5/bsd.regress.mk.5,v retrieving revision 1.14 diff -u -p -r1.14 bsd.regress.mk.5 --- bsd.regress.mk.53 Jul 2017 18:19:55 - 1.14 +++

Re: Implement __cxa_thread_atexit

2017-08-11 Thread Philip Guenther
On Fri, 11 Aug 2017, Mark Kettenis wrote: > The diff below implements __cxa_thread_atexit(). Calls to this function > are emitted by the compiler to schedule running desctructors for > thread_local objects when a thread terminates or calls exit(3). The > Linux implementation prevents unloading

pfctl -N: no dns resolution

2017-08-11 Thread Sebastian Benoit
Hi, this adds a -N option to pfctl that turns of dns resolution for all the things where a dns entry is a possible thing, i.e. in rules ("pass in from www.openbsd.org") or table entries. Its usefull to make sure the configuration will load when DNS is not available. ok? diff --git

slaacd: simplify route message handling

2017-08-11 Thread Florian Obser
When read(2)'ing from the routing socket only one message is returned. Clue provided by jca and claudio. OK? diff --git frontend.c frontend.c index f78c9802292..4193517e37b 100644 --- frontend.c +++ frontend.c @@ -536,11 +536,9 @@ route_receive(int fd, short events, void *arg) { static

Implement __cxa_thread_atexit

2017-08-11 Thread Mark Kettenis
The diff below implements __cxa_thread_atexit(). Calls to this function are emitted by the compiler to schedule running desctructors for thread_local objects when a thread terminates or calls exit(3). The Linux implementation prevents unloading of shared libraries that registered such destructors

Re: openssl(1) not error exiting on full file system

2017-08-11 Thread Craig Skinner
Ping: On Tue, 11 Apr 2017 11:28:38 +0100 Craig Skinner wrote: > Hi again, > > On 2017-04-10 Mon 14:31 PM |, Craig Skinner wrote: > > On Mon, 10 Apr 2017 12:46:03 +0100 Craig Skinner wrote: > > > $ openssl enc -bf -salt \ > > > -pass file:/etc/myname -in /bsd \ > > > -out