pf route-to ttl

2018-01-13 Thread Alexander Bluhm
Hi, When pf(4) forwards incoming packets with route-to or reply-to, it should decrement the time-to-live or hop-limit field. This makes traceroute work and prevents routing loops. For outgoing packets ip_forward() has already done this. ok? bluhm Index: net/pf.c ==

amd64 Intel cpu microcode

2018-01-13 Thread Theo de Raadt
Patrick and others commited amd64 Intel cpu microcode update code over the last few days. The approach isn't perfect, but it is good enough for a start. I want to explain the situation. When you fw_update, you'll get the firmware files. Upon a reboot, it will attempt to update the microcode on

powernow abs unsigned

2018-01-13 Thread Alexander Bluhm
Hi, I have seen a warning that "while (abs(vco_fid - vco_cfid) > 2)" is operating on unsigned values. As our kernel's abs() takes a signed integer as parameter, I think this codes works anyway. The unsigned is converted to signed before it is passed to abs(). Using singned values seems better n

Re: Spectre defence for armv7

2018-01-13 Thread Dimitris Papastamos
> + case CPU_ID_CORTEX_A15: > + case CPU_ID_CORTEX_A57: > + case CPU_ID_CORTEX_A72: > + /* > + * Vulnerable; BPIALL is "not effective" so must use > + * ICIALLU and hope the firmware set the magic bit in > + * the ACTLR that actually fo

Spectre defence for armv7

2018-01-13 Thread Mark Kettenis
The diff below improves our resiliency against "variant 2". Like on x86 the defence is based on flushing the branch predictor cache at the appropriate points. It turns out we are already in pretty good shape as we are already flushing on context switches. I believe we're forced to do that becaus

Re: stack pointer checking

2018-01-13 Thread Theo de Raadt
Does it not free it somewhere eventually? How is that handled. > lang/sbcl will need a small patch: > > $OpenBSD$ > > Index: src/runtime/thread.c > --- src/runtime/thread.c.orig > +++ src/runtime/thread.c > @@ -636,9 +636,16 @@ create_thread_struct(lispobj initial_function) { > * on the

Re: nsd 4.1.19

2018-01-13 Thread Florian Obser
On Fri, Jan 12, 2018 at 11:28:48AM -0700, Todd C. Miller wrote: > On Fri, 12 Jan 2018 18:20:58 +0100, Florian Obser wrote: > > > so, here is 4.1.19. I haven't gotten around to reading the diff yet. > > But I tossed it in production. > > > > When trying to re-gen config.h.in autheader bombs out: >

Re: stack pointer checking

2018-01-13 Thread Josh Elsasser
On Thu, Jan 11, 2018 at 08:39:25PM -0700, Theo de Raadt wrote: > Stefan (stefan@) and I have been working for a few months on this > diff, with help from a few others. > > At every trap and system call, it checks if the stack-pointer is on a > page that is marked MAP_STACK. execve() is changed to

Re: httpd response mimetype bug

2018-01-13 Thread Sebastian Benoit
Hiltjo Posthuma(hil...@codemadness.org) on 2018.01.13 13:08:38 +0100: > On Sat, Jan 13, 2018 at 09:39:44AM +0100, Anton Lindqvist wrote: > > On Tue, Jan 09, 2018 at 05:38:57PM +0100, Hidv?gi G?bor wrote: > > > >Synopsis: httpd reports wrong mimetype when item is in the browser cache > > > >Category

Re: httpd response mimetype bug

2018-01-13 Thread Anton Lindqvist
On Sat, Jan 13, 2018 at 01:08:38PM +0100, Hiltjo Posthuma wrote: > On Sat, Jan 13, 2018 at 09:39:44AM +0100, Anton Lindqvist wrote: > > On Tue, Jan 09, 2018 at 05:38:57PM +0100, Hidvégi Gábor wrote: > > > >Synopsis: httpd reports wrong mimetype when item is in the browser cache > > > >Category: htt

Re: request for testing: malloc bitmap scanning

2018-01-13 Thread Otto Moerbeek
On Sat, Jan 13, 2018 at 11:14:27AM +0100, Otto Moerbeek wrote: > On Sat, Jan 13, 2018 at 09:39:35AM +0100, Otto Moerbeek wrote: > > > Hi, > > > > This diff is based upon kshe's diff, but there's one differene: I am > > using the __builtin_ffs instead of ffs(3). Looking at the assembly > > genera

Re: jot: allow %F conversion?

2018-01-13 Thread Todd C. Miller
On Sat, 13 Jan 2018 09:28:42 +0100, Theo Buehler wrote: > while 'jot -w '%f' 11 0 1' works just fine. Granted, jot isn't going to > print inf or nan, so there is no visible difference between '%f' and > '%F', but the above command seems perfectly legitimate to me. I see no reason to disallow this

Re: implement linux request_firmware() api in drm

2018-01-13 Thread Mark Kettenis
> Date: Fri, 12 Jan 2018 15:05:31 +1100 > From: Jonathan Gray > > Tested on radeon. > > This should cause no change in behaviour on inteldrm systems that require > firmware (ie skylake, kabylake, broxton) until a mountroot hook is > added and firmware installed but I have no way of testing that

Re: IPL_MPFLOOR

2018-01-13 Thread Mark Kettenis
> Date: Sat, 13 Jan 2018 13:04:59 +0100 > From: Martin Pieuchot > > Diff below introduces IPL_MPFLOOR for all our archs. It will be used by > the MI mutex implementation to prevent deadlocks. All interrupt handlers > established with an ipl > IPL_MPFLOOR must not grab the KERNEL_LOCK(). > > Th

Re: [PATCH] usr.bin/calendar/calendars/calendar.uk - Burns' Night -> Burns Night

2018-01-13 Thread Raf Czlonka
On Sat, Jan 13, 2018 at 01:17:35AM GMT, Andras Farkas wrote: > On Fri, Jan 12, 2018 at 3:11 PM, Jason McIntyre wrote: > > hilariously, i just realised the apostrophe in the quote above is in the > > wrong place! maybe it should be "Burns Hog Weighing Method" ;) > I'd also like to note that while s

NET_LOCK() & if_start

2018-01-13 Thread Martin Pieuchot
As reported recently by Jason Tubnor [0], calling ip_output() in if_start() triggers splassert() because the NET_LOCK() might not always be held. dlg@'s TX mitigation diff also assumed the NET_LOCK() wasn't required for if_start(). I believe this is the way to move forward. if_start() is a drive

Re: httpd response mimetype bug

2018-01-13 Thread Hiltjo Posthuma
On Sat, Jan 13, 2018 at 09:39:44AM +0100, Anton Lindqvist wrote: > On Tue, Jan 09, 2018 at 05:38:57PM +0100, Hidvégi Gábor wrote: > > >Synopsis: httpd reports wrong mimetype when item is in the browser cache > > >Category: httpd > > >Environment: > > System : OpenBSD 6.2 > > De

IPL_MPFLOOR

2018-01-13 Thread Martin Pieuchot
Diff below introduces IPL_MPFLOOR for all our archs. It will be used by the MI mutex implementation to prevent deadlocks. All interrupt handlers established with an ipl > IPL_MPFLOOR must not grab the KERNEL_LOCK(). This value could also be using in interrupt handlers. ok? Index: alpha/include

Re: request for testing: malloc bitmap scanning

2018-01-13 Thread Otto Moerbeek
On Sat, Jan 13, 2018 at 09:39:35AM +0100, Otto Moerbeek wrote: > Hi, > > This diff is based upon kshe's diff, but there's one differene: I am > using the __builtin_ffs instead of ffs(3). Looking at the assembly > generated by calling ffs(3) produces a function call, while the > __builtin_ffs prod

ksh: remove BRACE_EXPAND

2018-01-13 Thread Anton Lindqvist
Hi, Looks like all variants of ksh in the tree is compiled with BRACE_EXPAND defined, therefore remove it. No binary change. While here, fix an endif typo. Comments? OK? Index: config.h === RCS file: /cvs/src/bin/ksh/config.h,v retri

Re: httpd response mimetype bug

2018-01-13 Thread Anton Lindqvist
On Tue, Jan 09, 2018 at 05:38:57PM +0100, Hidvégi Gábor wrote: > >Synopsis: httpd reports wrong mimetype when item is in the browser cache > >Category: httpd > >Environment: > System : OpenBSD 6.2 > Details : OpenBSD 6.2 (GENERIC) #91: Wed Oct 4 00:35:21 MDT > 2017 > > de

request for testing: malloc bitmap scanning

2018-01-13 Thread Otto Moerbeek
Hi, This diff is based upon kshe's diff, but there's one differene: I am using the __builtin_ffs instead of ffs(3). Looking at the assembly generated by calling ffs(3) produces a function call, while the __builtin_ffs produces just a few machine instructions on all the platforms I've checked. __bu

jot: allow %F conversion?

2018-01-13 Thread Theo Buehler
I see no reason to disallow %F: $ jot -w '%F' 11 0 1 jot: illegal or unsupported format '%F' while 'jot -w '%f' 11 0 1' works just fine. Granted, jot isn't going to print inf or nan, so there is no visible difference between '%f' and '%F', but the above command seems perfectly legitimate to me.