Re: gnu/usr.bin/binutils*: install vs. ${INSTALL}

2016-09-17 Thread Philip Guenther
On Sat, Sep 17, 2016 at 3:38 PM, Martin Natano wrote: > I think we should be using ${INSTALL} here like in all the other > Makefile's. Ok? Looks right. Assuming that works (unlike _my_ last modification to those...) ok guenther@

gnu/usr.bin/binutils*: install vs. ${INSTALL}

2016-09-17 Thread Martin Natano
I think we should be using ${INSTALL} here like in all the other Makefile's. Ok? natano Index: binutils/Makefile.bsd-wrapper === RCS file: /cvs/src/gnu/usr.bin/binutils/Makefile.bsd-wrapper,v retrieving revision 1.84 diff -u -p

cvs: owner of installed files

2016-09-17 Thread Martin Natano
Next round of wrestling with install permissions. This diff adjusts the file owner/group for installed files of cvs(1). Ok? natano Index: Makefile.bsd-wrapper === RCS file: /cvs/src/gnu/usr.bin/cvs/Makefile.bsd-wrapper,v retrieving

Build libc++ and libc++abi with -nostdinc++

2016-09-17 Thread Mark Kettenis
Without this, they don't build with clang++ because it tries to use the installed headers. Doesn't hurt building with eg++. ok? Index: lib/libcxx/Makefile === RCS file: /cvs/src/lib/libcxx/Makefile,v retrieving revision 1.1 diff

Re: merge ping6(8) into ping(8)

2016-09-17 Thread Theo de Raadt
> > this does 2 things: > > [...] > > I may recall what I have sent to you in private email, excerpt from > FreeBSD ping6 manpage: > > 8<8<8<8<8<8< > There have been many discussions on why we separate ping6 and ping(8). > Some people

Re: merge ping6(8) into ping(8)

2016-09-17 Thread Mikhail
> this does 2 things: > [...] I may recall what I have sent to you in private email, excerpt from FreeBSD ping6 manpage: 8<8<8<8<8<8< There have been many discussions on why we separate ping6 and ping(8). Some people argued that it would

Re: fix regress in pstat.c

2016-09-17 Thread Rob Pierce
On Sat, Sep 17, 2016 at 09:20:31PM +0200, Theo Buehler wrote: > While this patch avoids the bug, it isn't quite right: pstat -ft should > be equivalent to "pstat -f && pstat -t" but... > > $ pstat -ft > pstat: kvm_openfiles: /dev/mem: Permission denied > > The actual problem is in ttymode(): if

Re: arm exidx functions

2016-09-17 Thread Philip Guenther
On Sat, 17 Sep 2016, Mark Kettenis wrote: > > Date: Sat, 17 Sep 2016 09:38:46 -0700 > > From: Philip Guenther ... > > Instead of a conditional in the Makefile, can't this all go under > > arch/arm? > > It could. Not sure where exectly I should put it though. In a new >

Re: fix regress in pstat.c

2016-09-17 Thread Theo Buehler
While this patch avoids the bug, it isn't quite right: pstat -ft should be equivalent to "pstat -f && pstat -t" but... $ pstat -ft pstat: kvm_openfiles: /dev/mem: Permission denied The actual problem is in ttymode(): if kd != NULL (which is the case if -f is combined with -t), there are accesses

pstat and pledge

2016-09-17 Thread Theo de Raadt
I wanted to comment on some changes that are happening in pstat, relating to pledge. The commits for pstat are not commited yet, but I find them interesting. They show why pledge was designed to fit into all programs, and why it is worth pledging so many, even trivial programs. Way back at the

fix regress in pstat.c

2016-09-17 Thread Rob Pierce
ttymode() needs nlist, otherwise "pstat -tf" will fail since kd will not be NULL and the calls from ttymode() to KGET will error as follows: pstat: cannot read ntty: invalid address (0) pstat: cannot read tty_head: invalid address (0) KGET(TTY_NTTY, ntty) and KGET(TTY_TTYLIST, tty_head) both

Re: Use who = 0 instead getpid(2) in setprioriy(2) call in watchdog(8)

2016-09-17 Thread Rafael Neves
On Sat, Sep 17, 2016 at 02:36:49PM +0100, Rafael Neves wrote: > Hi, > > The patch bellow replaces in watchdog(8), the setpriority(2) + getpid(2) > idiom with a single > setpriority(2) with who = 0. > [snip] Sorry, the patch in the original e-mail does not apply, here follows the corrected one.

In renice(8), replace exit(3) call in main() with return

2016-09-17 Thread Rafael Neves
Hi, The patch bellow replaces an exit(3) call in main() to a return to enable the stack protector. Index: usr.bin/renice/renice.c === RCS file: /cvs/src/usr.bin/renice/renice.c,v retrieving revision 1.19 diff -u -p -r1.19 renice.c

Re: arm exidx functions

2016-09-17 Thread Mark Kettenis
> Date: Sat, 17 Sep 2016 09:38:46 -0700 > From: Philip Guenther > > On Sat, 17 Sep 2016, Mark Kettenis wrote: > > Note that libunwind uses __gnu_Unwind_Find_exidx on Linux, so we could > > follow Linux here and drop the dl_unwind_find_exidx alias. But my > > personal

Manpage for uctuctl(4)

2016-09-17 Thread Rafael Neves
Hi, Here follows a manpage for octuctl(4), based on dwctwo(4) manpage. I am not sure if the title should stop in Controller or in Interface, so I mantained the phrasing of commit. Index: share/man/man4/octuctl.4 === RCS file:

Re: arm exidx functions

2016-09-17 Thread Philip Guenther
On Sat, 17 Sep 2016, Mark Kettenis wrote: > Note that libunwind uses __gnu_Unwind_Find_exidx on Linux, so we could > follow Linux here and drop the dl_unwind_find_exidx alias. But my > personal preference is to follow the other BSDs here. The downside of the name used by the other BSDs is that

Use who = 0 instead getpid(2) in setprioriy(2) call in watchdog(8)

2016-09-17 Thread Rafael Neves
Hi, The patch bellow replaces in watchdog(8), the setpriority(2) + getpid(2) idiom with a single setpriority(2) with who = 0. Index: usr.sbin/watchdogd/watchdogd.c === RCS file: /cvs/src/usr.sbin/watchdogd/watchdogd.c,v retrieving

Change a nice(3) call to setpriority(2) in top(1)

2016-09-17 Thread Rafael Neves
Hi, I found in top(1) a call to nice(3) that I think that should be changed to setpriority(2). When given the -q flag the manpage claims that top will be reniced to -20. This is implemented trough nice(3) taking advantage that a program are loaded with 0 niceness priority, so decrementing 20

Re: little simpler ssh code

2016-09-17 Thread Ted Unangst
Ted Unangst wrote: > no change, but makes the code a little shorter. while here, another similar spot. Index: clientloop.c === RCS file: /cvs/src/usr.bin/ssh/clientloop.c,v retrieving revision 1.287 diff -u -p -r1.287 clientloop.c

Division by zero in ehci(4)

2016-09-17 Thread Martin Pieuchot
One of the non-checked value read from an untrusted descriptor is the "maximum packet size" of an endpoint. If a device reports an incorrect value most of our HC drivers wont work and if this value is 0 ehci(4) will crash the kernel. So here's a diff to validate the value read from the device

Re: merge ping6(8) into ping(8)

2016-09-17 Thread Florian Obser
... and this does things to the build infrastructure. It survives make release on amd64, it survived i386 in the past but I'm currently running another make release. I'm trying armv7, too. Tests on other archs would be very welcome, thanks! diff --git distrib/amd64/common/list

Re: sys/systm.h: drop read_symtab_from_file() proto

2016-09-17 Thread Mark Kettenis
> Date: Sat, 17 Sep 2016 13:05:01 +0200 > From: Jasper Lievisse Adriaanse > > This seems to be a leftover from when the actual function itself was removed > at some point? ok kettenis@ > Index: systm.h > === >

remove more unreachable code from audio drivers

2016-09-17 Thread Alexandre Ratchov
Last year we made AUDIO_GETDEV ioctl driver independent but forgot to remove the getdev() methods of all the drivers. OK? Index: share/man/man9/audio.9 === RCS file: /cvs/src/share/man/man9/audio.9,v retrieving revision 1.25 diff -u

merge ping6(8) into ping(8)

2016-09-17 Thread Florian Obser
this does 2 things: 1) copy missing things from ping6(8) over to ping(8) 2) add if (v6flag) { /* do new original v6 stuff */ } else { /* re-indent already present v4 stuff and wrap else around it /* } feel free to review and OK while I fight

Re: teach BFD how to send route messages, again

2016-09-17 Thread Peter Hessler
On 2016 Sep 17 (Sat) at 04:50:29 -0600 (-0600), Theo de Raadt wrote: :> route(8) for the ramdisks is not built with SMALL, so adding SMALL :> won't help. : :Then you'll help it. By compiling them SMALL. Happilly. Tested on an amd64 bsd.rd. dhclient, route add, route del, route show, all still

sys/systm.h: drop read_symtab_from_file() proto

2016-09-17 Thread Jasper Lievisse Adriaanse
This seems to be a leftover from when the actual function itself was removed at some point? Index: systm.h === RCS file: /cvs/src/sys/sys/systm.h,v retrieving revision 1.117 diff -u -p -r1.117 systm.h --- systm.h 13 Sep 2016

Re: teach BFD how to send route messages, again

2016-09-17 Thread Theo de Raadt
> route(8) for the ramdisks is not built with SMALL, so adding SMALL > won't help. Then you'll help it. By compiling them SMALL. Otherwise they won't fit, and bfd gets ripped out.

Re: fix clang types on arm

2016-09-17 Thread Patrick Wildt
On Fri, Sep 16, 2016 at 09:04:58PM +0200, Mark Kettenis wrote: > On OpenBSD we use a consistent set of typedefs across platforms for > the types specified by the C standard. In some cases these deviate > from what the processor-specific ABI says. The diff below fixes the > ones relevant for arm,

teach BFD how to send route messages, again

2016-09-17 Thread Peter Hessler
This is a 2nd pass at having BFD send route messages. I fixed the things pointed out in the first thread, with the following comments: route(8) for the ramdisks is not built with SMALL, so adding SMALL won't help. rt_bfdmsg() is named in the same style, and is in the same place, as the other

Re: fix clang types on arm

2016-09-17 Thread Jonathan Gray
On Fri, Sep 16, 2016 at 09:04:58PM +0200, Mark Kettenis wrote: > On OpenBSD we use a consistent set of typedefs across platforms for > the types specified by the C standard. In some cases these deviate > from what the processor-specific ABI says. The diff below fixes the > ones relevant for arm,

Re: little simpler ssh code

2016-09-17 Thread Martin Natano
On Fri, Sep 16, 2016 at 09:19:40PM -0400, Ted Unangst wrote: > no change, but makes the code a little shorter. Reads fine to me. arc4random() is already used in other places in ssh, so this shouldn't be an issue for portable. > > > Index: clientloop.c >

Re: clang makefiles for arm

2016-09-17 Thread Jonathan Gray
On Fri, Sep 16, 2016 at 08:23:27PM +0200, Mark Kettenis wrote: > I'm working on arm support for the in-tree llvm. I've got it working > well enough to build "Hello, World", but I still have some exception > handling issues. > > As a first step, this adds the build infrastructure. > > ok? ok