Re: Parameter void cast in non-DIAGNOSTIC lock assertions

2021-10-29 Thread Visa Hankala
On Fri, Oct 22, 2021 at 01:37:37PM +, Visa Hankala wrote: > Mutex and rwlock assertions turn into no-ops when compiling without > the DIAGNOSTIC option, which is the desired outcome. However, in some > peculiar cases, such as klist_mutex_assertlk() and klist_rwlock_assertlk(), > the lock variab

Re: Document when fileno(3) returns -1

2021-10-29 Thread Simon Branch
On Fri, Oct 29, 2021 at 04:17:18PM -0700, Simon Branch wrote: > Here's a simple patch that describes ferror(3)'s error conditions. Feel free > to > change the wording to be more consistent with OpenBSD conventions; for > example, > I wasn't sure whether to use .St when talking about POSIX, since

Document when fileno(3) returns -1

2021-10-29 Thread Simon Branch
Here's a simple patch that describes ferror(3)'s error conditions. Feel free to change the wording to be more consistent with OpenBSD conventions; for example, I wasn't sure whether to use .St when talking about POSIX, since 'IEEE Std 1003.1-2008 ("POSIX.1")' seemed a little long for the main text

Enable Spleen 16x32 and 32x64 on riscv64

2021-10-29 Thread Frederic Cambus
Hi tech@, It has come to my attention that OpenBSD/riscv64 has support for at least radeondrm(4), and can drive a 4k monitor. Therefore, here is a diff to enable spleen16x32 and spleen32x64 on riscv64 for GENERIC kernels, like we do on amd64, arm64, armv7, and i386. Comments? OK? Index: sys/dev

Re: Is getpass(3) really obsolete?

2021-10-29 Thread Joseph Myers
On Fri, 29 Oct 2021, Alejandro Colomar (man-pages) via Libc-alpha wrote: > The broader context is that I was trying to make the deprecation notices more > consistent in the Linux manpages, by using the [[deprecated]] attribute where > appropriate. While doing that, I found a few cases where the >

Re: upd(4) page fault since 7.0

2021-10-29 Thread Anton Lindqvist
On Fri, Oct 29, 2021 at 08:56:36AM +0200, Damien Couderc wrote: > Le 28/10/2021 à 21:09, Anton Lindqvist a écrit : > > > Hi Anton, > > It works great! > > See below the resulting dmesg with option UPD_DEBUG. > > Any chance this fix will come through syspatch? I just committed a slightly tweak

midi: defer selwakeup() calls to softintr to fix locking bug

2021-10-29 Thread Alexandre Ratchov
selwakeup() needs to be protected by KERNEL_LOCK, but we're not allowed to grab KERNEL_LOCK on interrupt context because midi runs at IPL_AUDIO with the audio_lock held. Furthermore, doing so is a locking order bug: syscall code-path grabs KERNEL_LOCK first while interrupt code-path does the oppos

[PATCH] getpass.3: SYNOPSIS: Mark getpass() as [[deprecated]]

2021-10-29 Thread Alejandro Colomar
Suggest readpassphrase(3bsd) as an alternative. See the long discussion in the mailing list for more details (link at the bottom of this commit message). I'll quote some relevant parts here: Eugene Syromyatnikov : { And the only mention of getpass() in POSIX (at least, since the

Re: Is getpass(3) really obsolete?

2021-10-29 Thread rsbecker
On October 29, 2021 10:45 AM, Alejandro Colomar wrote: > On 10/29/21 16:33, rsbec...@nexbridge.com wrote: > > October 29, 2031 10:21 AM, Theo de Raadt will write: > >> wrote: > >> > > getpass() is obsolete in POSIX.2. However, some platforms still > > are on > >>> POSIX.1, > so replac

Re: Is getpass(3) really obsolete?

2021-10-29 Thread Zack Weinberg
On Fri, Oct 29, 2021, at 9:55 AM, Theo de Raadt wrote: > wrote: >> On October 29, 2021 7:29 AM, Alejandro Colomar wrote: >> > On 10/29/21 13:15, Alejandro Colomar wrote: >> > > Hi, >> > > >> > > As the manual pages says, SUSv2 marked it as LEGACY, and POSIX doesn't >> > > have it at all. The manu

Re: Is getpass(3) really obsolete?

2021-10-29 Thread Alejandro Colomar (man-pages)
Hi Randall, Theo, On 10/29/21 16:33, rsbec...@nexbridge.com wrote: October 29, 2031 10:21 AM, Theo de Raadt will write: wrote: getpass() is obsolete in POSIX.2. However, some platforms still are on POSIX.1, so replacing it instead of providing a configure detection/switch for it might ca

Re: Is getpass(3) really obsolete?

2021-10-29 Thread rsbecker
On October 29, 2021 9:56 AM, Theo de Raadt wrote: > Subject: Re: Is getpass(3) really obsolete? > wrote: > > > On October 29, 2021 7:29 AM, Alejandro Colomar wrote: > > > On 10/29/21 13:15, Alejandro Colomar wrote: > > > > Hi, > > > > > > > > As the manual pages says, SUSv2 marked it as LEGACY, a

Re: Is getpass(3) really obsolete?

2021-10-29 Thread Theo de Raadt
wrote: > > > getpass() is obsolete in POSIX.2. However, some platforms still are on > POSIX.1, > > so replacing it instead of providing a configure detection/switch for it > might > > cause issues. > > > > > > The community finally had the balls to get rid of gets(3). > > > > getpass(3) shares

Re: demystify vport(4) in vport(4) and ifconfig(8)

2021-10-29 Thread Theo de Raadt
Please don't do this. Ingo Schwarze wrote: > Hi Stuart, > > Stuart Henderson wrote on Fri, Oct 29, 2021 at 01:59:38PM +0100: > > On 2021/10/29 14:08, Ingo Schwarze wrote: > >> Stuart Henderson wrote on Fri, Oct 29, 2021 at 10:53:41AM +0100: > >>> On 2021/10/28 23:19, Klemens Nanni wrote: > >>>

Re: demystify vport(4) in vport(4) and ifconfig(8)

2021-10-29 Thread Ingo Schwarze
Hi Stuart, Stuart Henderson wrote on Fri, Oct 29, 2021 at 01:59:38PM +0100: > On 2021/10/29 14:08, Ingo Schwarze wrote: >> Stuart Henderson wrote on Fri, Oct 29, 2021 at 10:53:41AM +0100: >>> On 2021/10/28 23:19, Klemens Nanni wrote: On Fri, Oct 29, 2021 at 12:57:54AM +0200, Ingo Schwarze wro

Re: Is getpass(3) really obsolete?

2021-10-29 Thread Eugene Syromyatnikov
On Fri, Oct 29, 2021 at 2:40 PM wrote: > getpass() is obsolete in POSIX.2. However, some platforms still are on > POSIX.1, so replacing it instead of providing a configure detection/switch > for it might cause issues. POSIX.2 is not a newer POSIX version, but rather a book (“Shell and utilities

Re: Is getpass(3) really obsolete?

2021-10-29 Thread Theo de Raadt
wrote: > On October 29, 2021 7:29 AM, Alejandro Colomar wrote: > > On 10/29/21 13:15, Alejandro Colomar wrote: > > > Hi, > > > > > > As the manual pages says, SUSv2 marked it as LEGACY, and POSIX doesn't > > > have it at all. The manual page goes further and says "This function > > > is obsolete

Re: Is getpass(3) really obsolete?

2021-10-29 Thread rsbecker
On October 29, 2021 7:29 AM, Alejandro Colomar wrote: > On 10/29/21 13:15, Alejandro Colomar wrote: > > Hi, > > > > As the manual pages says, SUSv2 marked it as LEGACY, and POSIX doesn't > > have it at all. The manual page goes further and says "This function > > is obsolete. Do not use it." in it

Re: fix uchcom(4) handling of parity and character size config

2021-10-29 Thread Patrick Wildt
Am Wed, Oct 27, 2021 at 06:46:38AM +1000 schrieb David Gwynne: > i bought some random usb to rs485 serial adapters so i can talk > modbus to a thing, but then discovered i can't talk to the modbus > thing because uchcom doesn't support configuring parity. > > this ports the functionality to suppor

Re: Please test: full poll/select(2) switch

2021-10-29 Thread Martin Pieuchot
On 29/10/21(Fri) 14:48, Alexandre Ratchov wrote: > On Fri, Oct 29, 2021 at 01:12:06PM +0100, Martin Pieuchot wrote: > > On 29/10/21(Fri) 13:12, Alexandre Ratchov wrote: > > > On Sat, Oct 23, 2021 at 10:40:56AM +0100, Martin Pieuchot wrote: > > > > Diff below switches both poll(2) and select(2) to t

Re: demystify vport(4) in vport(4) and ifconfig(8)

2021-10-29 Thread Stuart Henderson
On 2021/10/29 14:08, Ingo Schwarze wrote: > Hi Stuart, > > Stuart Henderson wrote on Fri, Oct 29, 2021 at 10:53:41AM +0100: > > On 2021/10/28 23:19, Klemens Nanni wrote: > >> On Fri, Oct 29, 2021 at 12:57:54AM +0200, Ingo Schwarze wrote: > > >>> MANPAGER=firefox man -T html $(ifconfig -C) > >

Re: Please test: full poll/select(2) switch

2021-10-29 Thread Alexandre Ratchov
On Fri, Oct 29, 2021 at 01:12:06PM +0100, Martin Pieuchot wrote: > On 29/10/21(Fri) 13:12, Alexandre Ratchov wrote: > > On Sat, Oct 23, 2021 at 10:40:56AM +0100, Martin Pieuchot wrote: > > > Diff below switches both poll(2) and select(2) to the kqueue-based > > > implementation. > > > > > > In add

Re: demystify vport(4) in vport(4) and ifconfig(8)

2021-10-29 Thread Crystal Kolipe
On Fri, Oct 29, 2021 at 02:08:32PM +0200, Ingo Schwarze wrote: > Then, much later, because firefox is a monster and a slug: > > 12. firefox attempts to open "$tmpfile", > which was already deleted long before Set the user immutable flag on the temporary file ;-)

Re: Is getpass(3) really obsolete?

2021-10-29 Thread Alejandro Colomar (man-pages)
Hi Ævar, On 10/29/21 13:40, Ævar Arnfjörð Bjarmason wrote: On Fri, Oct 29 2021, Alejandro Colomar (man-pages) wrote: [Add a few CCs, since I mentioned them.] [I'm not sure what the full context of this thread is, but just replying from the POV of git@ being CC'd on this] The first message

Re: Please test: full poll/select(2) switch

2021-10-29 Thread Martin Pieuchot
On 29/10/21(Fri) 13:12, Alexandre Ratchov wrote: > On Sat, Oct 23, 2021 at 10:40:56AM +0100, Martin Pieuchot wrote: > > Diff below switches both poll(2) and select(2) to the kqueue-based > > implementation. > > > > In addition it switches libevent(3) to use poll(2) by default for > > testing purpo

Re: demystify vport(4) in vport(4) and ifconfig(8)

2021-10-29 Thread Ingo Schwarze
Hi Stuart, Stuart Henderson wrote on Fri, Oct 29, 2021 at 10:53:41AM +0100: > On 2021/10/28 23:19, Klemens Nanni wrote: >> On Fri, Oct 29, 2021 at 12:57:54AM +0200, Ingo Schwarze wrote: >>> MANPAGER=firefox man -T html $(ifconfig -C) >> This doesn't work if firefox is already running as the MA

Re: Is getpass(3) really obsolete?

2021-10-29 Thread Alejandro Colomar (man-pages)
[Add a few CCs, since I mentioned them.] On 10/29/21 13:15, Alejandro Colomar wrote: Hi, As the manual pages says, SUSv2 marked it as LEGACY, and POSIX doesn't have it at all.  The manual page goes further and says "This function is obsolete. Do not use it." in its first lines. But, glibc d

Re: Please test: full poll/select(2) switch

2021-10-29 Thread Alexandre Ratchov
On Sat, Oct 23, 2021 at 10:40:56AM +0100, Martin Pieuchot wrote: > Diff below switches both poll(2) and select(2) to the kqueue-based > implementation. > > In addition it switches libevent(3) to use poll(2) by default for > testing purposes. > > I don't have any open bug left with this diff and I

Re: snmpd(8): don't allocate memory for system mib

2021-10-29 Thread Theo de Raadt
Stuart Henderson wrote: > > Diff below calls uname(3) only a single time and if the variables > > aren't snmpd.conf I simply rebuild it every time. > > I'm in two minds about this. While it's not something that will happen > very often, hostnames do get changed sometimes, and it would be nice to

Re: demystify vport(4) in vport(4) and ifconfig(8)

2021-10-29 Thread Stuart Henderson
On 2021/10/28 23:19, Klemens Nanni wrote: > On Fri, Oct 29, 2021 at 12:57:54AM +0200, Ingo Schwarze wrote: > > MANPAGER=firefox man -T html $(ifconfig -C) > > This doesn't work if firefox is already running as the MANPAGER firefox > process exits immediately after sending the file/link to the ru

quotaon(8): small improvements

2021-10-29 Thread Martin Vahlensieck
Hi Here are some small changes to quotaon(8). If you want I can split them up, but since they are small I am sending one diff. Here is a list of changes roughly in the order they appear in the diff: - Constify some function arguments - Use __progname instead of separate whoami variable + sma