Re: Skylake m5/m7 Xorg to black screen after Jul 10 snapshot

2017-07-24 Thread Bryan Vyhmeister
On Mon, Jul 24, 2017 at 10:20:22PM +0200, Mark Kettenis wrote: > > Date: Mon, 24 Jul 2017 12:55:25 -0700 > > From: Bryan Vyhmeister > > > > On Mon, Jul 24, 2017 at 09:42:41PM +0200, Mark Kettenis wrote: > > > > From: Bryan Vyhmeister > > > > > > > >

Re: kill: Use __dead, declare functions static

2017-07-24 Thread Klemens Nanni
On Mon, Jul 24, 2017 at 04:17:46PM -0600, Theo de Raadt wrote: > > I know, this sounds silly. Isn't bringing the code up to modern standards > > part > > of maintaining it? > > I suppose that's my question: > > What is it about __dead that makes it part of "modern standards", when it > isn't

Re: kill: Use __dead, declare functions static

2017-07-24 Thread Klemens Nanni
On Mon, Jul 24, 2017 at 06:11:32PM -0400, Ted Unangst wrote: > Klemens Nanni wrote: > > usage() never returns, all functions are to be used within this unit > > only. > > > > Since changes are conflicting, I'll wait for this diff first, but I'd > > like to remove the void casts for fprintf and

Re: test: Add "<" and ">" to grammar comment, adjust alignment

2017-07-24 Thread Jeremie Courreges-Anglas
On Mon, Jul 24 2017, Klemens Nanni wrote: > Add missing operators and make the grammar more readable while using > spaces and tabs consistently. > > Feedback? Comments? I have added < and > but didn't touch anything else. I believe that the existing comment is readable ebnf

Re: kill: Use __dead, declare functions static

2017-07-24 Thread Theo de Raadt
> > What is it about __dead that makes it part of "modern standards", when it > > isn't dead, and an actual keyword. __no_return isn't a standards mandated > > keyword either. > > The standard mandated spelling is _Noreturn or noreturn with > stdnoreturn.h. Just saying. You are wrong. OpenBSD

Re: kill: Use __dead, declare functions static

2017-07-24 Thread Theo de Raadt
> I know, this sounds silly. Isn't bringing the code up to modern standards part > of maintaining it? I suppose that's my question: What is it about __dead that makes it part of "modern standards", when it isn't dead, and an actual keyword. __no_return isn't a standards mandated keyword either.

Re: kill: Use __dead, declare functions static

2017-07-24 Thread Ted Unangst
Klemens Nanni wrote: > usage() never returns, all functions are to be used within this unit > only. > > Since changes are conflicting, I'll wait for this diff first, but I'd > like to remove the void casts for fprintf and use getprogname(3) over > __progname as well. > > Feedback? Comments? I

Re: kill: Use __dead, declare functions static

2017-07-24 Thread Theo de Raadt
No, I actually don't see the point. It isn't a natural of C. It isn't fixing any bugs. What is it helping? I don't see any help. It looks like meaningless churn. > On Mon, Jul 24, 2017 at 03:27:05PM -0600, Theo de Raadt wrote: > > this addiction to static is entirely pointless. > Consider it

Re: kill: Use __dead, declare functions static

2017-07-24 Thread Klemens Nanni
On Mon, Jul 24, 2017 at 03:27:05PM -0600, Theo de Raadt wrote: > this addiction to static is entirely pointless. Consider it a matter of taste and leave it out, then. I assume you're fine with __dead, though? Index: kill.c === RCS

Re: kill: Use __dead, declare functions static

2017-07-24 Thread Theo de Raadt
this addiction to static is entirely pointless.

kill: Use __dead, declare functions static

2017-07-24 Thread Klemens Nanni
usage() never returns, all functions are to be used within this unit only. Since changes are conflicting, I'll wait for this diff first, but I'd like to remove the void casts for fprintf and use getprogname(3) over __progname as well. Feedback? Comments? Index: kill.c

armv7 more pliable boot? rootdev != bootdev

2017-07-24 Thread Artturi Alm
Hi, i'm finding the boot as is too restricted, for no good reason, imo.. I'm not sure about what part of the bootstrap to blame this for, but almost certain that making this better will require touching efiloader too. I was quite surprised to findout it didnt work when i tried to have my cubie

Re: Skylake m5/m7 Xorg to black screen after Jul 10 snapshot

2017-07-24 Thread Mark Kettenis
> Date: Mon, 24 Jul 2017 12:55:25 -0700 > From: Bryan Vyhmeister > > On Mon, Jul 24, 2017 at 09:42:41PM +0200, Mark Kettenis wrote: > > > From: Bryan Vyhmeister > > > > > > Running wsconsctl display.brightness also hangs. I have machdep.kbdreset > >

pcxrtc(4)

2017-07-24 Thread Mark Kettenis
A driver for the NXP PCF8563 RTC. It is similar to the pcfrtc(4) driver, but the register layout and i2c protocol to read/write the registers differ enough to warrant a separate driver. ok? Index: dev/i2c/files.i2c === RCS file:

Re: pflogd: cope with interface departure

2017-07-24 Thread Sebastian Benoit
Jeremie Courreges-Anglas(j...@wxcvbn.org) on 2017.07.22 21:40:53 +0200: > > If you destroy the interface pflogd(8) listens on, you get killed > because socket(2) is denied by the current pledge(2) restrictions: > > pflogd(15868): syscall 97 "inet" > > The ioctl(SIOCGIFDATA) call would be

Re: test: Add "<" and ">" to grammar comment, adjust alignment

2017-07-24 Thread Klemens Nanni
On Mon, Jul 24, 2017 at 08:31:26PM +0200, Klemens Nanni wrote: > Add missing operators and make the grammar more readable while using > spaces and tabs consistently. Missing bits: operands can be more than "any legacy UNIX file name" of course, correct that as well. One might just say or but I

tech: use getprogname(3)

2017-07-24 Thread Klemens Nanni
As done in other places already, replace __progname with getprogname(3). Feedback? Comments? Index: test.c === RCS file: /cvs/src/bin/test/test.c,v retrieving revision 1.17 diff -u -p -r1.17 test.c --- test.c 21 Jan 2017

test: Add "<" and ">" to grammar comment, adjust alignment

2017-07-24 Thread Klemens Nanni
Add missing operators and make the grammar more readable while using spaces and tabs consistently. Feedback? Comments? Index: test.c === RCS file: /cvs/src/bin/test/test.c,v retrieving revision 1.17 diff -u -p -r1.17 test.c ---

ksh: use RB trees as freelists

2017-07-24 Thread Jeremie Courreges-Anglas
This is not ripe yet, but I figured I'd share it. Since some time I find ksh(1) slow at startup. I use HISTFILE=~/.ksh_history and HISTSIZE=2; currently my ksh_history is 24487 lines long. Even if you're above HISTSIZE lines, ksh will avoid truncating your HISTFILE until it has grown by

test: Catch integer overflow, fail on trailing whitespaces

2017-07-24 Thread Klemens Nanni
test's internal getn() makes integers out of strings although boundaries are checked for long which leads to wrong test results when operands are greater than INT_MAX but smaller than LONG_MAX: $ t() { /bin/test "$1" -lt 0 && : overflow; } $ t 1 + /bin/test 1 -lt 0

Re: apm(8): remove TRUE/FALSE defines

2017-07-24 Thread Anton Lindqvist
Hi, On Sun, Jul 23, 2017 at 03:53:14PM +0200, Otto Moerbeek wrote: > On Sun, Jul 23, 2017 at 03:04:54PM +0200, Anton Lindqvist wrote: > > > Hi, > > Fairly straightforward and no intended functional change. If changes > > like this one is not encouraged I would advocate on at least using > >

Re: sorwakeup() missing KERNEL_LOCK()

2017-07-24 Thread Alexander Bluhm
On Mon, Jul 24, 2017 at 12:54:31PM +0200, Martin Pieuchot wrote: > divert/divert6 might end up calling sorwakeup() w/o KERNEL_LOCK() since > pf_test() is not always executed with it. Diff below fixes that and > put two asserts where selwakup() is called in the socket layer. I think calling

Re: pfkeyv2 rename struct keycb pointer

2017-07-24 Thread Alexander Bluhm
On Sat, Jul 22, 2017 at 12:47:55PM +0200, Claudio Jeker wrote: > Suggested by bluhm@, switch from struct keycb *pk to struct keycb *kp. > > OK? OK bluhm@, this is more consistent with other PCB code. > @@ -942,7 +942,7 @@ pfkeyv2_send(struct socket *so, void *me > struct radix_node_head

Re: make: clarify an error string

2017-07-24 Thread Todd C. Miller
On Mon, 24 Jul 2017 13:02:12 +0200, Marc Espie wrote: > Here's a proper error message: OK millert@ - todd

Re: NET_LOCK() w/o SPL

2017-07-24 Thread Alexander Bluhm
On Mon, Jul 24, 2017 at 04:39:14PM +0200, Martin Pieuchot wrote: > Here's a simpler diff. I'd like to move forward with this since it's > the first but blocking step to split the NET_LOCK() and socket locks. OK bluhm@ > > Index: sys/systm.h >

Re: ospfd: add IMSG_IFADDRADD to deal with "sh /etc/netstart if"

2017-07-24 Thread Remi Locherer
On Fri, Jul 21, 2017 at 06:24:06PM +0200, Remi Locherer wrote: > On Fri, Jul 21, 2017 at 02:45:03PM +0200, Florian Riehm wrote: > > On 06/25/17 23:47, Remi Locherer wrote: > > > Hi, > > > > > > ospfd does not react nicely when running "sh /etc/netstart if". > > > > > > This is because adding the

Re: NET_LOCK() w/o SPL

2017-07-24 Thread Martin Pieuchot
On 03/07/17(Mon) 12:23, Martin Pieuchot wrote: > All network processing contexts, with the exception of hardware > interrupt handlers, are now process contexts. That means the SPL > protection is no longer needed inside the NET_LOCK(). > > So the diff below removes the splsofnet()/splx() dance

Re: connect(2), KERNEL_LOCK() vs socket lock

2017-07-24 Thread Alexander Bluhm
On Mon, Jul 24, 2017 at 03:06:06PM +0200, Martin Pieuchot wrote: > So here's a fixed diff. OK bluhm@ > Index: kern/uipc_socket.c > === > RCS file: /cvs/src/sys/kern/uipc_socket.c,v > retrieving revision 1.196 > diff -u -p -r1.196

Re: connect(2), KERNEL_LOCK() vs socket lock

2017-07-24 Thread Martin Pieuchot
On 24/07/17(Mon) 14:34, Alexander Bluhm wrote: > On Mon, Jul 24, 2017 at 11:56:20AM +0200, Martin Pieuchot wrote: > > Updated diff addressing your comments. > > Yes, previous issues are fixed. But static code analysis shows > that you missed a lock in sys_socketpair() for soconnect2(). > >

Re: connect(2), KERNEL_LOCK() vs socket lock

2017-07-24 Thread Alexander Bluhm
On Mon, Jul 24, 2017 at 11:56:20AM +0200, Martin Pieuchot wrote: > Updated diff addressing your comments. Yes, previous issues are fixed. But static code analysis shows that you missed a lock in sys_socketpair() for soconnect2(). Analyzing locks for soconnect2 No lock: [soconnect2,

Re: make netstart a variable

2017-07-24 Thread Theo de Raadt
No way, that doesn't serve anyone else's purposes. You can maintain that as a diff in your own tree. > Hello, > personally, I prefer using my short script, over the stock /etc/netstart, > so why not let everybody use what they prefer? > > diff --git a/etc/rc b/etc/rc > index

Re: broken base build at src/usr/lib/libpcap?

2017-07-24 Thread Rob Pierce
> From: "Marc Espie" > To: "Rob Pierce" > Cc: "tech" > Sent: Sunday, July 23, 2017 7:36:29 PM > Subject: Re: broken base build at src/usr/lib/libpcap? > On Sun, Jul 23, 2017 at 05:40:24PM -0400, Rob Pierce wrote: > > yacc -ppcap_yy -d grammar.y

Re: newsyslog: simplify mail sending

2017-07-24 Thread Ingo Schwarze
Hi Jeremie, Jeremie Courreges-Anglas wrote on Sat, Jul 22, 2017 at 09:27:29PM +0200: > I have nothing against asprintf(3), but the openmail function looks > needlessly complicated. > > ok? Looks like a nice simplification, works for me, and looks good to code inspection, so OK schwarze@.

Re: make netstart a variable

2017-07-24 Thread Gregory Edigarov
Hello, Martin, hello, Ingo. ok, so here's more background as to why I propose this change. my setup is even simpler then stock setup. I just use the script that usually reads: #!/bin/sh /bin/hostname /sbin/ifconfig lo0 127.0.0.1/8 /sbin/ifconfig /sbin/route add -net default ...

Re: make: clarify an error string

2017-07-24 Thread Ingo Schwarze
Hi Marc, Marc Espie wrote on Mon, Jul 24, 2017 at 01:02:12PM +0200: > On Mon, Jul 24, 2017 at 10:43:03AM +0200, Marc Espie wrote: >> On Mon, Jul 24, 2017 at 03:15:32PM +0800, Michael W. Bombardieri wrote: >>> In make(1), do_run_command() has a sanity check for a null command string. >>> The

Re: make: clarify an error string

2017-07-24 Thread Marc Espie
On Mon, Jul 24, 2017 at 10:43:03AM +0200, Marc Espie wrote: > On Mon, Jul 24, 2017 at 03:15:32PM +0800, Michael W. Bombardieri wrote: > > Hi, > > > > In make(1), do_run_command() has a sanity check for a null command string. > > The error message passes the null string to printf(). Is this any

sorwakeup() missing KERNEL_LOCK()

2017-07-24 Thread Martin Pieuchot
divert/divert6 might end up calling sorwakeup() w/o KERNEL_LOCK() since pf_test() is not always executed with it. Diff below fixes that and put two asserts where selwakup() is called in the socket layer. ok? Index: kern/uipc_socket.c

Re: make netstart a variable

2017-07-24 Thread Ingo Schwarze
Hi, Gregory Edigarov wrote on Mon, Jul 24, 2017 at 01:22:55PM +0300: > personally, I prefer using my short script, over the stock > /etc/netstart, so why not let everybody use what they prefer? Hell no. This is directly contrary to project goals. KISS. No useless knobs. That said, OpenBSD is

Re: [patch] Remove binc from vi(1)

2017-07-24 Thread Ingo Schwarze
Hi Martijn, On 06/22/17 21:32, Martijn van Duren wrote: > Attached a patch to remove the binc function from vi > and replace it with recallocarray. In principle, the memory handling in vi is very ugly, and getting it into a more standard form seems desirable - but likely to cause quite some

Re: connect(2), KERNEL_LOCK() vs socket lock

2017-07-24 Thread Martin Pieuchot
On 18/07/17(Tue) 15:49, Alexander Bluhm wrote: > On Tue, Jul 18, 2017 at 09:03:00AM +0200, Martin Pieuchot wrote: > > Diff below extends the scope of the socket lock. It has been previously > > introduced in sys_connect(), first as NET_LOCK() then renamed, where old > > splsofnet() were used.

Re: make: clarify an error string

2017-07-24 Thread Marc Espie
On Mon, Jul 24, 2017 at 03:15:32PM +0800, Michael W. Bombardieri wrote: > Hi, > > In make(1), do_run_command() has a sanity check for a null command string. > The error message passes the null string to printf(). Is this any better? > > - Michael > > > Index: engine.c >

make: clarify an error string

2017-07-24 Thread Michael W. Bombardieri
Hi, In make(1), do_run_command() has a sanity check for a null command string. The error message passes the null string to printf(). Is this any better? - Michael Index: engine.c === RCS file: /cvs/src/usr.bin/make/engine.c,v

efiboot: improve cd9660 support

2017-07-24 Thread FUKAUMI Naoki
Hi tech@, With this patch, - 'cd0' is used for the name of the disk for CD-ROM - 'cd0a' is used for the 'device' variable when it's booted from CD-ROM probing: pc0 com0 com1 mem[640K 3049M 16M 4M 64K 1024M] disk: hd0* cd0 >> OpenBSD/amd64 BOOTX64 3.33 boot> set >> OpenBSD/amd64 BOOTX64

makefs(8): add support for UEFI

2017-07-24 Thread FUKAUMI Naoki
Hi tech@, This adds support for UEFI. >From NetBSD >http://mail-index.netbsd.org/source-changes/2017/01/24/msg081292.html you can make BIOS/UEFI dual boot ISO image like this, mkdir -p efiboot/EFI/BOOT cp /usr/mdec/BOOT*.EFI efiboot/EFI/BOOT/ makefs -M 1m -t msdos efiboot.img efiboot