change some drm locks from IPL_TTY to IPL_NONE

2020-07-10 Thread Jonathan Gray
In drm linux spinlocks are mapped to mutex(9). Locks without calls to spin_lock_irqsave(), spin_lock_irq() and the like (which block interrupts) can be changed to IPL_NONE. Index: sys/dev/pci/drm/drm_legacy_misc.c === RCS file: /cvs/

Re: userland clock_gettime proof of concept

2020-07-10 Thread Paul Irofti
În 11 iulie 2020 02:27:50 EEST, Mark Kettenis a scris: >> From p...@irofti.net Sat Jul 11 01:23:20 2020 >> Date: Sat, 11 Jul 2020 02:22:33 +0300 >> >> În 11 iulie 2020 02:15:27 EEST, Mark Kettenis > a scris: >> >> Date: Fri, 10 Jul 2020 19:03:58 -0400 >> >> From: George Koehler >> >> >> >> O

Re: userland clock_gettime proof of concept

2020-07-10 Thread Mark Kettenis
> From p...@irofti.net Sat Jul 11 01:23:20 2020 > Date: Sat, 11 Jul 2020 02:22:33 +0300 > > În 11 iulie 2020 02:15:27 EEST, Mark Kettenis a > scris: > >> Date: Fri, 10 Jul 2020 19:03:58 -0400 > >> From: George Koehler > >> > >> On Wed, 8 Jul 2020 14:26:02 +0200 (CEST) > >> Mark Kettenis wrote

Re: userland clock_gettime proof of concept

2020-07-10 Thread Paul Irofti
În 11 iulie 2020 02:15:27 EEST, Mark Kettenis a scris: >> Date: Fri, 10 Jul 2020 19:03:58 -0400 >> From: George Koehler >> >> On Wed, 8 Jul 2020 14:26:02 +0200 (CEST) >> Mark Kettenis wrote: >> >> > > From: Paul Irofti >> > > Reads OK to me. Please make the adjustments to static functions

Re: userland clock_gettime proof of concept

2020-07-10 Thread Mark Kettenis
> Date: Fri, 10 Jul 2020 19:03:58 -0400 > From: George Koehler > > On Wed, 8 Jul 2020 14:26:02 +0200 (CEST) > Mark Kettenis wrote: > > > > From: Paul Irofti > > > Reads OK to me. Please make the adjustments to static functions that > > > kettenis@ mentioned in the alpha thread. > > > > To ad

Re: userland clock_gettime proof of concept

2020-07-10 Thread George Koehler
On Wed, 8 Jul 2020 14:26:02 +0200 (CEST) Mark Kettenis wrote: > > From: Paul Irofti > > Reads OK to me. Please make the adjustments to static functions that > > kettenis@ mentioned in the alpha thread. > > To add to that: > > * TC_LAST isn't needed, so kill that > * tc_get_timecount > > Also

Re: userland clock_gettime proof of concept

2020-07-10 Thread George Koehler
On Wed, 8 Jul 2020 11:32:09 -0500 Scott Cheloha wrote: > On Wed, Jul 08, 2020 at 09:36:03AM -0600, Theo de Raadt wrote: > > Ugly test program (not showing it) seems to show syncronized clocks on > > powerpc, or at least closely sycronized. It might be one register. > > I guess I'll share mine,

Re: disable libc sys wrappers?

2020-07-10 Thread Theo de Raadt
Ingo Schwarze wrote: > Hi Theo, > > Theo de Raadt wrote on Fri, Jul 10, 2020 at 10:02:46AM -0600: > > > I also don't see the point of the leading _ > > > > Where does that come from? > > > > This isn't a function namespace. What does it signify, considering > > no other environment variable

Re: disable libc sys wrappers?

2020-07-10 Thread Ingo Schwarze
Hi Theo, Theo de Raadt wrote on Fri, Jul 10, 2020 at 10:02:46AM -0600: > I also don't see the point of the leading _ > > Where does that come from? > > This isn't a function namespace. What does it signify, considering > no other environment variable uses _ prefixing. $ man -kO Ev Ev~^_ |

Re: disable libc sys wrappers?

2020-07-10 Thread Theo de Raadt
I also don't see the point of the leading _ Where does that come from? This isn't a function namespace. What does it signify, considering no other environment variable uses _ prefixing. I think you are mixing too much stuff in here...

Add missing `IFXF_CLONED' to pseudo-interfaces

2020-07-10 Thread Vitaliy Makkoveev
Some pseudo interfaces have missing `IFXF_CLONED' flag. Diff below fixes this. Index: sys/net/if_ppp.c === RCS file: /cvs/src/sys/net/if_ppp.c,v retrieving revision 1.114 diff -u -p -r1.114 if_ppp.c --- sys/net/if_ppp.c24 Jun 2020

Re: pppac(4): fix races in pppacopen()

2020-07-10 Thread Vitaliy Makkoveev
On Fri, Jul 10, 2020 at 01:22:40PM +0200, Martin Pieuchot wrote: > On 10/07/20(Fri) 14:07, Vitaliy Makkoveev wrote: > > We have some races in pppac(4) > > 1. malloc(9) can sleep so we must check `sc' presence after malloc(9) > > Makes sense. > > > 2. we can sleep between `sc' insertion to `sc_ent

pppac(4): fix races in pppacopen()

2020-07-10 Thread Vitaliy Makkoveev
We have some races in pppac(4) 1. malloc(9) can sleep so we must check `sc' presence after malloc(9) 2. we can sleep between `sc' insertion to `sc_entry' list and `sc_pipex_iface' initialization. Concurrent pppacioctl() can touch this incomplete `sc'. Index: sys/net/if_pppx.c

Re: pppx_if_output() don't lock `pppx_devs_lk'

2020-07-10 Thread Vitaliy Makkoveev
On Fri, Jul 10, 2020 at 10:45:54AM +0200, Martin Pieuchot wrote: > On 08/07/20(Wed) 12:05, Vitaliy Makkoveev wrote: > > `pppx_devs_lk' used to protect `pxd_entry' list. We lock `pppx_devs_lk' > > in pppx_if_output() to be sure `pxd' is not destroyed by concurrent > > pppxclose() but it's useless. W

Re: [PATCH] fast conditional console scrolling

2020-07-10 Thread Frederic Cambus
On Fri, Jun 26, 2020 at 07:49:55AM -0700, jo...@armadilloaerospace.com wrote: > I should have been more rigorous -- I had two different changes running > on my system, as well as forcing it to use the 12x24 font for a 160x45 > console. > > If you apply the "Optimized rasops32 putchar" patch I just

Re: remove compat macros IFQ_ENQUEUE, IFQ_DEQUEUE and IFQ_LEN

2020-07-10 Thread Vitaliy Makkoveev
> On 10 Jul 2020, at 12:13, Patrick Wildt wrote: > > Hi, > > this is a rather mechanical diff, done using vim and some regex, > to remove and replace IFQ_ENQUEUE, IFQ_DEQUEUE and IFQ_LEN. > > There are more, but I didn't want the diff to get too big. I'll > do that after this one is committ

Re: xhci(4) isoc: fix bogus handling of chained TRBs

2020-07-10 Thread Marcus Glocker
On Fri, 10 Jul 2020 14:19:00 +0200 Patrick Wildt wrote: > On Fri, Jul 10, 2020 at 01:00:31PM +0200, Marcus Glocker wrote: > > Hi All, > > > > Laurence Tratt was reporting about corrupted video images when using > > uvideo(4) on xhci(4) with MJPEG and higher resolutions, e.g. when > > using ffpla

pmaps and reference bit emulation

2020-07-10 Thread Mark Kettenis
So it seems that hardware reference and change bit updates are busted on POWER9 CPUs. Or at least they don't work the way I'm reading the specs. So I've changed the pmap for OpenBSD/powerpc64 to emulate them instead. While implementing this code I wondered how this is supposed to work for pages

Re: xhci(4) isoc: fix bogus handling of chained TRBs

2020-07-10 Thread Patrick Wildt
On Fri, Jul 10, 2020 at 01:00:31PM +0200, Marcus Glocker wrote: > Hi All, > > Laurence Tratt was reporting about corrupted video images when using > uvideo(4) on xhci(4) with MJPEG and higher resolutions, e.g. when using > ffplay: > > $ ffplay -f v4l2 -input_format mjpeg -video_size 1280x720 -f /

Re: panic on inteldrm attach in braswell device

2020-07-10 Thread Ricardo Mestre
the machine is still not properly setup and I didn't want to "pollute" bugs@ without a proper sendbug(1), sorry about that. that being said just tested booting the machine without the hdmi cable to stop inteldrm from attaching, but after everything is booted then attaching the cable makes inteldrm

Re: pppac(4): fix races in pppacopen()

2020-07-10 Thread Martin Pieuchot
On 10/07/20(Fri) 14:07, Vitaliy Makkoveev wrote: > We have some races in pppac(4) > 1. malloc(9) can sleep so we must check `sc' presence after malloc(9) Makes sense. > 2. we can sleep between `sc' insertion to `sc_entry' list and > `sc_pipex_iface' initialization. Concurrent pppacioctl() can to

Re: panic on inteldrm attach in braswell device

2020-07-10 Thread Jonathan Gray
On Fri, Jul 10, 2020 at 08:31:29AM +0100, Ricardo Mestre wrote: > Hi, > > Since my edgerouter decided to commit seppuku, then to replace it, the cheap > bastard in me bought a crappy braswell based device which after 2 months > finally arrived, but of course it had to have at least one problem. >

xhci(4) isoc: fix bogus handling of chained TRBs

2020-07-10 Thread Marcus Glocker
Hi All, Laurence Tratt was reporting about corrupted video images when using uvideo(4) on xhci(4) with MJPEG and higher resolutions, e.g. when using ffplay: $ ffplay -f v4l2 -input_format mjpeg -video_size 1280x720 -f /dev/video1 When trying to re-produce the issue on my side, the video images w

replace IFQ_SET_MAXLEN and IFQ_IS_EMPTY

2020-07-10 Thread Patrick Wildt
Hi, based on the previous diffs, this removes the last remaining users of the compat API. IFQ_SET_MAXLEN is simply now lowercase, and IFQ_IS_EMPTY is lowercase and got its _IS removed. Pretty mechanical diff. ok? Patrick diff --git a/sys/arch/armv7/omap/if_cpsw.c b/sys/arch/armv7/omap/if_cpsw

Re: remove compat macros IFQ_ENQUEUE, IFQ_DEQUEUE and IFQ_LEN

2020-07-10 Thread Patrick Wildt
On Fri, Jul 10, 2020 at 12:20:53PM +0300, Vitaliy Makkoveev wrote: > > > > On 10 Jul 2020, at 12:13, Patrick Wildt wrote: > > > > Hi, > > > > this is a rather mechanical diff, done using vim and some regex, > > to remove and replace IFQ_ENQUEUE, IFQ_DEQUEUE and IFQ_LEN. > > > > There are more

replace IFQ_PURGE with ifq_purge

2020-07-10 Thread Patrick Wildt
Hi, based on the previous diff, this rids the compat API from IFQ_PURGE. ok? Patrick diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c index c469269eb4e..47505b6b733 100644 --- a/sys/dev/ic/ath.c +++ b/sys/dev/ic/ath.c @@ -737,7 +737,7 @@ ath_stop(struct ifnet *ifp) } else {

remove compat macros IFQ_ENQUEUE, IFQ_DEQUEUE and IFQ_LEN

2020-07-10 Thread Patrick Wildt
Hi, this is a rather mechanical diff, done using vim and some regex, to remove and replace IFQ_ENQUEUE, IFQ_DEQUEUE and IFQ_LEN. There are more, but I didn't want the diff to get too big. I'll do that after this one is committed. ok? Patrick diff --git a/sys/arch/armv7/omap/if_cpsw.c b/sys/ar

Re: pipex(4): kill pipexintr()

2020-07-10 Thread Martin Pieuchot
On 07/07/20(Tue) 01:01, Vitaliy Makkoveev wrote: > On Mon, Jul 06, 2020 at 08:47:23PM +0200, Martin Pieuchot wrote: > > On 06/07/20(Mon) 19:23, Vitaliy Makkoveev wrote: > > > > On 6 Jul 2020, at 17:36, Martin Pieuchot wrote: > > > [...] > > > Unfortunately you can’t be sure about NET_LOCK() statu

Re: pppx_if_output() don't lock `pppx_devs_lk'

2020-07-10 Thread Martin Pieuchot
On 08/07/20(Wed) 12:05, Vitaliy Makkoveev wrote: > `pppx_devs_lk' used to protect `pxd_entry' list. We lock `pppx_devs_lk' > in pppx_if_output() to be sure `pxd' is not destroyed by concurrent > pppxclose() but it's useless. We destroy all corresponding `pxi' before > `pxd' and `ifnet's are already

panic on inteldrm attach in braswell device

2020-07-10 Thread Ricardo Mestre
Hi, Since my edgerouter decided to commit seppuku, then to replace it, the cheap bastard in me bought a crappy braswell based device which after 2 months finally arrived, but of course it had to have at least one problem. As soon as inteldrm attach I get the below panic, but with inteldrm disable