adjfreq(2): limit adjustment to prevent overflow during tc_windup()

2020-07-02 Thread Scott Cheloha
Hi, When we recompute the scaling factor during tc_windup() there is an opportunity for arithmetic overflow/underflow when we add the NTP adjustment into the scale: 649 scale = (u_int64_t)1 << 63; 650 scale += \ 651 ((th->th_adjustment + th->th_counter->tc_

Re: userland clock_gettime proof of concept

2020-07-02 Thread Scott Cheloha
On Fri, Jun 26, 2020 at 04:53:14PM +0300, Paul Irofti wrote: > On Wed, Jun 24, 2020 at 11:53:23AM +0200, Robert Nagy wrote: > > On 22/06/20 19:12 +0300, Paul Irofti wrote: > > > New iteration: > > > > > > - ps_timekeep should not coredump, pointed by deraadt@ > > > - set ps_timekeep to 0 befor

Re: sensorsd bad unveil

2020-07-02 Thread Alexander Bluhm
On Thu, Jul 02, 2020 at 12:39:47PM -0600, Theo de Raadt wrote: > The unveil("/", "x") is to support command executation: Of course. Forgot that. bluhm Index: usr.sbin/sensorsd/sensorsd.c === RCS file: /data/mirror/openbsd/cvs/src/u

Re: sensorsd bad unveil

2020-07-02 Thread Theo de Raadt
The unveil("/", "x") is to support command executation: daemon facility. Optionally, an alert can be configured to execute a command. Your proposal breaks that. It will need to be added back. Alexander Bluhm wrote: > Hi, > > sensorsd(8) reports an unveil failure due to chdir / .

sensorsd bad unveil

2020-07-02 Thread Alexander Bluhm
Hi, sensorsd(8) reports an unveil failure due to chdir / . An additional "r" permission would be necessary. - chdir before unveil, do not unveil / - use absolute config path after chdir, also necessary for SIGHUP - /etc/sensorsd.conf.db must be unveiled, cgetent(3) tries to open it ok? bluhm

Re: imt/hidmt: work better with dual touchpad/trackstick devices

2020-07-02 Thread Dave Voutila
joshua stein writes: > I have confirmation that these fix the touchpad and trackstick on > one Dell laptop and I'd like more testing to make sure they don't > break other laptops. Seems to be fine on my Lenovo x270. pms0 at pckbc0 (aux slot) wsmouse0 at pms0 mux 0 wsmouse1 at pms0 mux 0 pms0:

imt/hidmt: work better with dual touchpad/trackstick devices

2020-07-02 Thread joshua stein
On some laptops that have a Windows Precision Touchpad (imt) but also have a trackstick, imt was claiming all report ids of the ihidev device preventing the trackstick from attaching as a separate mouse (ims) device. (This probably doesn't affect Thinkpads because their trackstick attaches as