Fix gdb "target kvm" on amd64

2019-01-21 Thread YASUOKA Masahiko
Hi, Currently gdb "target kvm bsd.0.core" on amd64 doesn't work. It can't read the registers and can't follow the stack frames. The diff follows fixes those problems. ok? comment? Fix gdb can handle prologues which has the retguard. Also teach gdb that alltraps_kern() is a trap function.

Re: replacing timeout_add() with timeout_add_msec()

2019-01-21 Thread Miod Vallat
> The intent was to wait a 30th of a second. In practice it has always > fired 30ms hence. It's a magic number, so I'd just call it 30ms. > miod might have an opinion on whether those extra milliseconds would > be useful in the event that sparc64 is ever able to timeout with > millisecond or

Re: sensors hiding with pledge

2019-01-21 Thread Theo de Raadt
This approach seems backwards. It is hiding sensors from programs which are pledged (ie. we put effort into security, therefore a fig leaf for privacy) But.. in programs we cannot pledge, we continue exporting. Yes chrome is pledged so permanently has no access to the information. I am not

Re: sensors hiding with pledge

2019-01-21 Thread Constantine A. Murenin
Wouldn't this break sensorsd? (It's already been converted to use pledge.) C. On Mon, 21 Jan 2019 at 20:19, Ted Unangst wrote: > > We recently had a thread about adding more sensors, but then the browser will > use them to spy on us, and everybody was sad. We allow hw.sensors even for > pledge

Re: replacing timeout_add() with timeout_add_msec()

2019-01-21 Thread Scott Cheloha
On Mon, Jan 21, 2019 at 09:05:19PM -0500, Ted Unangst wrote: > Scott Cheloha wrote: > > > > diff --git sys/arch/sparc64/dev/fd.c sys/arch/sparc64/dev/fd.c > > > > index 8d548062f83..654d8c95524 100644 > > > > --- sys/arch/sparc64/dev/fd.c > > > > +++ sys/arch/sparc64/dev/fd.c > > > > @@ -1632,7

rework tcp md5sig config in ldpd

2019-01-21 Thread David Gwynne
currently ldpd only lets you specify md5 params with neighbors (not targeted neighbors). this is awkward is you want to peer with arbitrary hosts on a network since you'll have a to generate a lot of config for each potential peer on that net. both cisco and juniper let you set up keys for

sensors hiding with pledge

2019-01-21 Thread Ted Unangst
We recently had a thread about adding more sensors, but then the browser will use them to spy on us, and everybody was sad. We allow hw.sensors even for pledge processes because ntpd needs to read the time. However, ntpd only needs to read the time. This diff zeroes out sensors other than

Re: replacing timeout_add() with timeout_add_msec()

2019-01-21 Thread Ted Unangst
Scott Cheloha wrote: > > > diff --git sys/arch/sparc64/dev/fd.c sys/arch/sparc64/dev/fd.c > > > index 8d548062f83..654d8c95524 100644 > > > --- sys/arch/sparc64/dev/fd.c > > > +++ sys/arch/sparc64/dev/fd.c > > > @@ -1632,7 +1632,7 @@ loop: > > > fdc->sc_state = RECALCOMPLETE; > > >

Re: replacing timeout_add() with timeout_add_msec()

2019-01-21 Thread Scott Cheloha
On Mon, Jan 21, 2019 at 04:59:38AM +0100, Claudio Jeker wrote: > On Sat, Jan 12, 2019 at 10:40:35PM -0600, Amit Kulkarni wrote: > > > [...] > > > > Thanks for the feedback Claudio and Mark! > > > > Here is a new diff based on your suggestions, [...] > > > > diff --git

Re: qsort comparision function bug

2019-01-21 Thread Damien Miller
On Mon, 21 Jan 2019, Dariusz Sendkowski wrote: > Wouldn't it lead to undefined behavior? > According to the standard: "... The value of the result of an integer > arithmetic or conversion function cannot be represented (7.8.2.1, 7.8.2.2, > 7.8.2.3, 7.8.2.4, 7.22.6.1, 7.22.6.2, 7.22.1) ..." > This

Re: video(1) pledge

2019-01-21 Thread Landry Breuil
On Mon, Jan 21, 2019 at 09:44:59PM +0100, Matthieu Herrb wrote: > On Mon, Jan 21, 2019 at 09:27:57PM +0100, Landry Breuil wrote: > > Hi, > > > > Hi, > > > now that the 'video' promise is in, looking for okays to pledge > > video(1). > > > > with help & hints from semarie@. > > One comment

Re: video(1) pledge

2019-01-21 Thread Matthieu Herrb
On Mon, Jan 21, 2019 at 09:27:57PM +0100, Landry Breuil wrote: > Hi, > Hi, > now that the 'video' promise is in, looking for okays to pledge > video(1). > > with help & hints from semarie@. One comment in-line. > > Index: video.c >

Re: qsort comparision function bug

2019-01-21 Thread Dariusz Sendkowski
Wouldn't it lead to undefined behavior? According to the standard: "... The value of the result of an integer arithmetic or conversion function cannot be represented (7.8.2.1, 7.8.2.2, 7.8.2.3, 7.8.2.4, 7.22.6.1, 7.22.6.2, 7.22.1) ..." This dump case is not compiled with -fwrapv flag, so I guess

video(1) pledge

2019-01-21 Thread Landry Breuil
Hi, now that the 'video' promise is in, looking for okays to pledge video(1). with help & hints from semarie@. Index: video.c === RCS file: /cvs/xenocara/app/video/video.c,v retrieving revision 1.25 diff -u -r1.25 video.c ---

Re: [PATCH] Huawei E8372 USB Mobile Broadband in HiLink Mode, Generic HiLink Mode Logic

2019-01-21 Thread James Hebden
I've been doing some more testing on newer OpenBSD releases (namely 6.4) and have picked up a couple of problems with this patch. There are a couple of cleanups needed (a duplicated conditional in umsm.c for example, and small formatting issues ) as a result of bringing this patch forward, and

qsort comparision function bug

2019-01-21 Thread Otto Moerbeek
Hi, This code is buggy, since subtraction and then casting to int will not produce the right result if the values are too far apart. There must be more like this in the tree any volunteers? In general, you don't want to do subtraction, even for ints. For example: compare INT_MIN and 1.

Re: Adapt to Allwinner device tree changes in linux >= 5.0-rc1

2019-01-21 Thread Mark Kettenis
> Date: Mon, 21 Jan 2019 11:39:42 +1100 > From: Jonathan Gray > > Adapt to allwinner device tree changes in linux >= 5.0-rc1 > "allwinner,sun6i-a31-rtc" has been removed from h3/h5/r40/a64 > > 507c6e89d6c4b2cd68a8e7ff69d1a00cf74b15dd > ARM: dts: sunxi: h3/h5: Fix up RTC device node and clock

Re: bwfm(4): show media mode, TX rate, and RSSI

2019-01-21 Thread Stefan Sperling
On Sat, Jan 19, 2019 at 10:52:01PM +0100, Patrick Wildt wrote: > > + case IEEE80211_M_HOSTAP: > > + ieee80211_iterate_nodes(ic, bwfm_update_node, sc); > > + break; > > I think HOSTAP needs > > #ifndef IEEE80211_STA_ONLY > > otherwise ramdisk kernels don't compile. Yes,