Re: reduce double caching in mfs

2016-09-09 Thread Martin Pieuchot
On 08/09/16(Thu) 14:49, Ted Unangst wrote: > Currently, the bufcache doesn't know that mfs is backed by memory. All i/o to > mfs ends up being double cached, once in the userland process and again in the > kernel bufcache. This is wasteful. In particular, it means one can't use mfs > to increase th

smtpd config parsing cleanup

2016-09-09 Thread Eric Faurot
Because of the small ad hoc changes that were made here and there over the years, the listener config code has become a bit convoluted I think. Here is a little cleanup to: - have all listener creation functions take listen_opts as param, and call config_listener() when done, which adds the list

Re: smtpd config parsing cleanup

2016-09-09 Thread Joerg Jung
> On 09 Sep 2016, at 13:35, Eric Faurot wrote: > > Because of the small ad hoc changes that were made here and there over > the years, the listener config code has become a bit convoluted I think. Yes. > Here is a little cleanup to: > > - have all listener creation functions take listen_opts

reduce dependency on _KERNEL

2016-09-09 Thread Ted Unangst
The _KERNEL define is overloaded to mean two things, which results in frequent errors. 1. It means we are compiling the kernel. 2. It means we are compiling a userland program that looks at kernel data structures. Just because we need data structures doesn't mean we want everything else in the ker

Re: Drop main() prototype

2016-09-09 Thread Sevan Janiyan
On 05/09/2016 11:05, Marc Espie wrote: > On Mon, Sep 05, 2016 at 04:04:23AM -0400, Ted Unangst wrote: >> Sevan Janiyan wrote: >>> Hello, >>> Attached patches remove the main() prototype from >>> src/{sbin,usr.bin,usb.sbin} >> >> yes! > > I'm 100% certain I added those prototypes because some ver

[t...@math.ethz.ch: Re: fsdb pledge]

2016-09-09 Thread Theo Buehler
I think the patch below is a bit cleaner than the one I committed. ok? - Forwarded message from Theo Buehler - Date: Sun, 21 Aug 2016 03:27:49 +0200 From: Theo Buehler To: m...@openbsd.org Subject: Re: fsdb pledge > this is kinda gross, but ok for now. I agree that it isn't very nice

Introduce usbd_parse_idesc()

2016-09-09 Thread Martin Pieuchot
Our USB stack is very lazy at validating descriptor. In order to reject device with malformed endpoint descriptors I'd like to introduce a new function, usbd_parse_idesc(), that I will extend with more checks. For now this function only contain the checks present in usbd_fill_iface_data() but it

Do not call usbd_set_config_no()...

2016-09-09 Thread Martin Pieuchot
...and instead let the stack do it for you. Changing the configuration of a device implies fetching and parsing descriptors. If anything bad happen, most of the device below are left attached but unconfigured, and many of them do not even deactivate the device. Test reports and oks welcome. Ind

db_trace.c: use __func__ instead of hardcoding filename

2016-09-09 Thread Jasper Lievisse Adriaanse
Hi, Do we really want the filename to be printed in the message? If so we should use __FILE__. On the other hand, having the function name makes more sense to me. OK? Index: amd64/amd64/db_trace.c === RCS file: /cvs/src/sys/arch/amd

Re: db_trace.c: use __func__ instead of hardcoding filename

2016-09-09 Thread Todd C. Miller
On Fri, 09 Sep 2016 20:38:05 +0200, Jasper Lievisse Adriaanse wrote: > Do we really want the filename to be printed in the message? If so we should > use __FILE__. On the other hand, having the function name makes more sense to > me. Much more useful, OK millert@ - todd

Re: db_trace.c: use __func__ instead of hardcoding filename

2016-09-09 Thread Philip Guenther
On Fri, Sep 9, 2016 at 11:38 AM, Jasper Lievisse Adriaanse wrote: > Do we really want the filename to be printed in the message? If so we should > use __FILE__. On the other hand, having the function name makes more sense to > me. This is a "not found" message in response to an explicit user comm

Re: reduce double caching in mfs

2016-09-09 Thread Bob Beck
I really dislike "CHEAP". and it almost seems like these should actually be NOCACHE.. why the heck can't they be? On Thu, Sep 8, 2016 at 7:49 PM, Ted Unangst wrote: > Currently, the bufcache doesn't know that mfs is backed by memory. All i/o > to > mfs ends up being double cached, once in the

Re: db_trace.c: use __func__ instead of hardcoding filename

2016-09-09 Thread Jasper Lievisse Adriaanse
On Fri, Sep 09, 2016 at 01:54:46PM -0700, Philip Guenther wrote: > On Fri, Sep 9, 2016 at 11:38 AM, Jasper Lievisse Adriaanse > wrote: > > Do we really want the filename to be printed in the message? If so we should > > use __FILE__. On the other hand, having the function name makes more sense >

Re: syslogd validate client certificates

2016-09-09 Thread Alexander Bluhm
On Mon, Sep 05, 2016 at 03:25:22AM +0200, Alexander Bluhm wrote: > Hi, > > Add an option to give syslogd a server CA that is used to validate > client certificates. This prevent that malicious clients can send > fake messages. > > ok? Anyone? > > bluhm > > Index: usr.sbin/syslogd/syslogd.8 >

Re: db_trace.c: use __func__ instead of hardcoding filename

2016-09-09 Thread Philip Guenther
On Fri, Sep 9, 2016 at 3:19 PM, Jasper Lievisse Adriaanse wrote: > On Fri, Sep 09, 2016 at 01:54:46PM -0700, Philip Guenther wrote: >> On Fri, Sep 9, 2016 at 11:38 AM, Jasper Lievisse Adriaanse >> wrote: >> > Do we really want the filename to be printed in the message? If so we >> > should >> >

sparc64: clean up db_trace.c

2016-09-09 Thread Philip Guenther
Noticed while looking at Jasper's diff. - convert declarations from k&r to standard C - delete support for 32bit frame backtracing. I doubt this code has ever been executed on OpenBSD. If a 32bit frame is encountered ((sp&1)==0) then print a warning and stop processing the frames - del

Re: sparc64: clean up db_trace.c

2016-09-09 Thread Philip Guenther
On Fri, 9 Sep 2016, Philip Guenther wrote: > Noticed while looking at Jasper's diff. > - convert declarations from k&r to standard C > - delete support for 32bit frame backtracing. I doubt this code has ever >been executed on OpenBSD. If a 32bit frame is encountered ((sp&1)==0) >then p

sparc64: delete 32bit process support from syscall()

2016-09-09 Thread Philip Guenther
Simplify syscall(): - if the trapframe is of a 32bit process, just call sigexit() instead of returning an error - delete other code for 32bit processes - 64bit processes only, so SYS__syscall can be handled the same as SYS_syscall - delete a superfluous cast builds and runs fine ok?

Fix an infinite loop in iked

2016-09-09 Thread Nikolay Edigaryev
This fixes a bug introduced in revision 1.8 of timer.c that causes evtimer_set() to be called on an already active event, which is an error according to event_add(3): >The event in the ev argument must be already initialized by event_set() >and may not be used in calls to event_set() until it has

gmtime return value

2016-09-09 Thread Carlin Bingham
If gmtime_r(3) fails it should return NULL, it currently returns a pointer to the unitialised tm struct it was given. -- Carlin Index: lib/libc/time/localtime.c === RCS file: /cvs/src/lib/libc/time/localtime.c,v retrieving revisi