On Wed, Feb 12, 2020 at 09:22:20PM +0100, Jan Stary wrote: > Hi, > > On Feb 09 13:13:02, [email protected] wrote: > > cd /usr/src > > patch -p0 <1.diff > > patch -p0 <2.diff > > patch -p0 <3.diff > > cd /usr/src/include && doas make includes > > cd /usr/src/lib/libsndio && make obj && make && doas make install > > cd /usr/src/lib/libossaudio && make obj && make && doas make install > > cd /usr/src/usr.bin/sndiod && make obj && make && doas make install > > cd /usr/src/usr.bin/sndioctl && make obj && make && doas make install > > doas rcctl restart sndiod > > > > I'm very interested in any regression. > > After restarting sndiod (with empty flags), > starting sndioctl -m makes sndiod crash with > > Feb 12 21:02:31 box /bsd: sndiod[95433]: pledge "tty", syscall 54 > > That's ioctl(2). I don't see that in any of the three pledge(2) calls > revealed by a grep in (the patched) .../sndiod/, but apparently > the new code does call ioctl().
sndiod does unauthorized ioctls on this kernel, see below > > Strangely, this happens on > > OpenBSD 6.6-current (GENERIC.MP) #0: Tue Feb 4 17:33:19 CET 2020 > [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP > > but not on > > OpenBSD 6.6-current (GENERIC.MP) #0: Sun Feb 9 17:30:47 CET 2020 > [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP > > (Did I miss somethong pledge() related in that window?) > Yes, there was a kernel commit to allow programs with the "audio" promise (like sndiod) to use the mixer ioctl()s.
