Re: Looking for testers for em(4) quirks patch

2018-04-02 Thread Mike Larkin
On Mon, Apr 02, 2018 at 11:52:08AM +0200, Stefan Fritsch wrote: > Hi, > > We have seen problems with em on i219V and i219LM. For example, "Hardware > Initialization Failed" if no cable is plugged in during boot, or watchdog > timeouts / hangs until next boot if the cable is removed while data is

Re: sparc64 softraid boot: workaround for memory leak

2018-04-02 Thread Mike Larkin
On Thu, Mar 29, 2018 at 09:21:16AM +0200, Mark Kettenis wrote: > > Date: Wed, 28 Mar 2018 23:46:49 -0700 > > From: Mike Larkin > > > > On Thu, Mar 29, 2018 at 08:40:27AM +0200, Stefan Sperling wrote: > > > On Mon, Mar 12, 2018 at 11:38:14AM +0100, Stefan Sperling wrote: > > > > I haven't had any

autoconf.9 consistency

2018-04-02 Thread David Gwynne
i landed on this manpage and got confused cos it looked different to the rest of them. this shuffles it a bit to make it less different. the main change is to move the function prototypes up to the synopsis. the other, less important change is to replace some headers with subheaders. ok? Index:

Re: plug a memory leak in diff(1)

2018-04-02 Thread Todd C. Miller
On Mon, 02 Apr 2018 21:17:59 +0200, Ingo Schwarze wrote: > * if (a <= b) for (i = a; i <= b; >doas not make sense to me. >If a > b, we have i > b right away, so the loop isn't entered. > * a > b || >does not make sense either, for the same reason: >The for loop itself takes care

Re: plug a memory leak in diff(1)

2018-04-02 Thread Ingo Schwarze
Hi, Theo Buehler wrote on Mon, Apr 02, 2018 at 08:32:43PM +0200: > On Mon, Apr 02, 2018 at 07:41:55PM +0200, Stefan Sperling wrote: >> Line buffers allocated in preadline() were never freed. > They are freed in ignoreline(). What a beautiful case of obfuscation. How symmetrical. Both the mall

Re: plug a memory leak in diff(1)

2018-04-02 Thread Stefan Sperling
On Mon, Apr 02, 2018 at 08:32:43PM +0200, Theo Buehler wrote: > On Mon, Apr 02, 2018 at 07:41:55PM +0200, Stefan Sperling wrote: > > Line buffers allocated in preadline() were never freed. > > They are freed in ignoreline(). Ooops! Thanks Theo. Please disregard my diff.

Re: plug a memory leak in diff(1)

2018-04-02 Thread Theo Buehler
On Mon, Apr 02, 2018 at 07:41:55PM +0200, Stefan Sperling wrote: > Line buffers allocated in preadline() were never freed. They are freed in ignoreline().

plug a memory leak in diff(1)

2018-04-02 Thread Stefan Sperling
Line buffers allocated in preadline() were never freed. ok? Index: diffreg.c === RCS file: /cvs/src/usr.bin/diff/diffreg.c,v retrieving revision 1.91 diff -u -p -r1.91 diffreg.c --- diffreg.c 1 Mar 2016 20:57:35 - 1.91 ++

Re: dd(1): snprintf+writev -> dprintf

2018-04-02 Thread Todd C. Miller
On Mon, 02 Apr 2018 10:40:15 -0500, Scott Cheloha wrote: > What do you think about the signal race mentioned here: > > https://marc.info/?l=openbsd-tech&m=152260519904692&w=2 > > deraadt pointed out that blocking SIGINT while SIGINFO is in summary() > has the effect of making the process un-INTabl

Re: dd(1): snprintf+writev -> dprintf

2018-04-02 Thread Scott Cheloha
On Mon, Apr 02, 2018 at 05:47:56AM -0600, Todd C. Miller wrote: > On Sat, 31 Mar 2018 13:41:00 -0600, "Theo de Raadt" wrote: > > > Let's see. SIGINFO starts. Imagine if the buffering is small (I > > don't think it is). If it was small, there could be multiple writes > > to the sequence. SIGINT

Re: dodup3() & FREF()

2018-04-02 Thread Alexander Bluhm
On Mon, Apr 02, 2018 at 12:55:43PM +0200, Martin Pieuchot wrote: > dodup3() is already calling FREF(), just before a sleeping point. Diff > below moves it right after fd_getfile() to prepare for unlocking some > syscalls. > > Ok? OK bluhm@ > Index: kern/kern_descrip.c >

Re: Single FRELE() in sys_fstatfs()

2018-04-02 Thread Alexander Bluhm
On Mon, Apr 02, 2018 at 07:46:42AM -0600, Todd C. Miller wrote: > On Mon, 02 Apr 2018 12:51:06 +0200, Martin Pieuchot wrote: > > > I'd like to ease reviews of the FREF()/FRELE() dances by keeping their > > number small. In the case of sys_fstatfs() it's easy to have a single > > FRELE() for the c

Re: Add FREF()/FRELE() in sys_fchdir()

2018-04-02 Thread Alexander Bluhm
On Mon, Apr 02, 2018 at 12:40:15PM +0200, Martin Pieuchot wrote: > Currently sys_fchdir() doesn't need to use FREF()/FRELE() because it > can't sleep until after vref(9). But since our goal is to have some > syscalls manipulating 'struct file *' running without the KERNEL_LOCK(), > we need to make

Re: OpenBSD 6.3 released - Apr 2, 2018

2018-04-02 Thread Mohamed Fouad
Congratulations!!! :) On Mon, Apr 2, 2018 at 3:49 PM, Theo de Raadt wrote: > The release was scheduled for April 15, but since all the components > are ready ahead of schedule it is being released now. > > > - OpenBSD 6.3 R

OpenBSD 6.3 released - Apr 2, 2018

2018-04-02 Thread Theo de Raadt
The release was scheduled for April 15, but since all the components are ready ahead of schedule it is being released now. - OpenBSD 6.3 RELEASED - Apr 15, 2018. We are please

Re: Single FRELE() in sys_fstatfs()

2018-04-02 Thread Todd C. Miller
On Mon, 02 Apr 2018 12:51:06 +0200, Martin Pieuchot wrote: > I'd like to ease reviews of the FREF()/FRELE() dances by keeping their > number small. In the case of sys_fstatfs() it's easy to have a single > FRELE() for the corresponding getvnode(). Ok? I actually find the original easier to read

Re: Earlier FREF()s

2018-04-02 Thread Todd C. Miller
On Mon, 02 Apr 2018 12:34:27 +0200, Martin Pieuchot wrote: > Here's a diff to move FREF() just after fd_getfile() in sys_kevent(), > sys_lseek() and getvnode(). Looks fine. OK millert@ - todd

Re: dd(1): snprintf+writev -> dprintf

2018-04-02 Thread Todd C. Miller
On Sat, 31 Mar 2018 13:41:00 -0600, "Theo de Raadt" wrote: > Let's see. SIGINFO starts. Imagine if the buffering is small (I > don't think it is). If it was small, there could be multiple writes > to the sequence. SIGINT arrives. This will result in stderr output > being a bit garbled. This

Re: mfs free

2018-04-02 Thread Todd C. Miller
On Sat, 31 Mar 2018 15:15:34 -0400, David Hill wrote: > Add the free size. (allocated in mfs_vfsops.c) > > mfsp = malloc(sizeof *mfsp, M_MFSNODE, M_WAITOK | M_ZERO); > devvp->v_data = mfsp; OK millert@ - todd

Re: netinet memcpy/free

2018-04-02 Thread Todd C. Miller
On Sat, 31 Mar 2018 15:13:03 -0400, David Hill wrote: > memcpy can be used on freshly allocated memory. Fill in the free size > for it. OK millert@ - todd

Re: dd(1): snprintf+writev -> dprintf

2018-04-02 Thread Todd C. Miller
On Sat, 31 Mar 2018 12:53:52 -0500, Scott Cheloha wrote: > Simpler. OK millert@ - todd

dodup3() & FREF()

2018-04-02 Thread Martin Pieuchot
dodup3() is already calling FREF(), just before a sleeping point. Diff below moves it right after fd_getfile() to prepare for unlocking some syscalls. Ok? Index: kern/kern_descrip.c === RCS file: /cvs/src/sys/kern/kern_descrip.c,v r

Looking for testers for em(4) quirks patch

2018-04-02 Thread Stefan Fritsch
Hi, We have seen problems with em on i219V and i219LM. For example, "Hardware Initialization Failed" if no cable is plugged in during boot, or watchdog timeouts / hangs until next boot if the cable is removed while data is transmitted. This patch adds a bunch of quirks and fixes from freebsd.

Single FRELE() in sys_fstatfs()

2018-04-02 Thread Martin Pieuchot
I'd like to ease reviews of the FREF()/FRELE() dances by keeping their number small. In the case of sys_fstatfs() it's easy to have a single FRELE() for the corresponding getvnode(). Ok? Index: kern/vfs_syscalls.c === RCS file: /cvs

Add FREF()/FRELE() in sys_fchdir()

2018-04-02 Thread Martin Pieuchot
Currently sys_fchdir() doesn't need to use FREF()/FRELE() because it can't sleep until after vref(9). But since our goal is to have some syscalls manipulating 'struct file *' running without the KERNEL_LOCK(), we need to make sure the refcounts are always correct. That's why the diff below introd

Earlier FREF()s

2018-04-02 Thread Martin Pieuchot
Here's a diff to move FREF() just after fd_getfile() in sys_kevent(), sys_lseek() and getvnode(). As explained recently [0], I'd like to make sure all operations manipulating a 'struct file *' do so with a properly refcounted element. [0] https://marc.info/?l=openbsd-tech&m=152214234530708&w=2 O

Re: com@fdt register shift/io-width

2018-04-02 Thread Mark Kettenis
> Date: Mon, 2 Apr 2018 12:07:00 +0200 (CEST) > From: Mark Kettenis > > Diff below avoids using the "a4x" bus tag for the non-console bits of > the armv7 and arm64 glue for com(4). > > ok? Just realized that the raspberry pi console needs 32-bit access as well but doesn't set the reg-io-width a

com@fdt register shift/io-width

2018-04-02 Thread Mark Kettenis
Diff below avoids using the "a4x" bus tag for the non-console bits of the armv7 and arm64 glue for com(4). ok? Index: armv7/dev/com_fdt.c === RCS file: /cvs/src/sys/arch/armv7/dev/com_fdt.c,v retrieving revision 1.10 diff -u -p -r1.

Extraneous carriage return in usr.bin/ssh/log.c

2018-04-02 Thread Lars Noodén
I would propose removing what appears to be an unnecessary carriage return that interferes with debugging output. /Lars Index: src/usr.bin/ssh/log.c === RCS file: /cvs/src/usr.bin/ssh/log.c,v retrieving revision 1.50 diff -u -p -u -r