systat(1) counter overflow

2021-07-01 Thread Anindya Mukherjee
Hi, I noticed that if I leave the system running for more than about a month, some of the counters in the uvm view of systat(1) overflow and become negative. This is because the members of struct uvmexp in sys/uvm/uvmexp.h are ints. The kernel's internal counters are of course uint64_t so they

netlock ktrace nfs

2021-07-01 Thread Alexander Bluhm
Hi, Writing ktrace files to NFS must no be done while holding the net lock. accept(2) panics, connect(2) dead locks. Additionally copy in or out must not hold the net lock as it may be a mmapped file on NFS. - Simplify dns_portcheck(), it does not modify namelen anymore. - In doaccept()

Re: ualarm.3: cleanup

2021-07-01 Thread Scott Cheloha
On Thu, Jul 01, 2021 at 08:50:12AM -0600, Todd C. Miller wrote: > On Thu, 01 Jul 2021 08:14:51 -0600, "Todd C. Miller" wrote: > > > Aha, I see. It is because delay can be a float. > > Here's a diff to use nanosleep/setitimer instead of usleep/ualarm. > Is it worth it? Yes I think something

Re: [patch] Add support for Wacom One (CTL-472) to uwacom(4)

2021-07-01 Thread Stefan Hagen
I'm still happily using this diff with the CTL-472. Ping? Stefan Hagen wrote: > Hello, > > I managed to get the Wacom One, aka CTL-472 working. It's a small > graphics tablet with no extra buttons. I's more recent than the already > supported CTL-490. > > Changes: > - It reports little endian

Re: ualarm.3: cleanup

2021-07-01 Thread Todd C . Miller
On Thu, 01 Jul 2021 08:14:51 -0600, "Todd C. Miller" wrote: > Aha, I see. It is because delay can be a float. Here's a diff to use nanosleep/setitimer instead of usleep/ualarm. Is it worth it? - todd Index: usr.bin/systat/engine.c

Re: ualarm.3: cleanup

2021-07-01 Thread Todd C . Miller
On Thu, 01 Jul 2021 08:10:49 -0600, "Todd C. Miller" wrote: > It looks like systat is the only consumer of ualarm(3) in the tree. > I don't think it even makes sense there since the actual delay is > in seconds, not microseconds. The change to ualarm/usleep was made > by canacar@ in 2008. I

Re: ualarm.3: cleanup

2021-07-01 Thread Todd C . Miller
On Wed, 30 Jun 2021 17:24:28 -0600, "Theo de Raadt" wrote: > Scott Cheloha wrote: > > > FWIW, the manpage has literally always led with this bolded > > implementation detail. From January of 1986: > > > > https://svnweb.freebsd.org/csrg/lib/libc/gen/ualarm.3?revision=25789=m > arkup > > I'm

Re: style(9) identifier alignment

2021-07-01 Thread Theo de Raadt
I disagree with this change. I don't see that specific indent as prevailing. But more importantly, the specification is overly proscriptive. Developers type a variety of things in their variable declaration blocks, some of this is due to editor assist, and being exceedingly strict about a few

Re: ualarm.3: cleanup

2021-07-01 Thread Theo de Raadt
Calling more than one of the interfaces setitimer(2), alarm(3), and ualarm(3) in the same program results in unspecified behaviour. I don't think it is unspecified. It will behave precisely as expected...

Re: ualarm.3: cleanup

2021-07-01 Thread Ingo Schwarze
Hi, fair enough. When there are good reasons to not merge manual pages - in this case, causing confusion about types and encouraging type conversion, overflow, and truncation bugs, and alarm(3) and ualarm(3) not being part of the same subsystem in the first place (if i understand deraadt@

close net80211 hardware crypto set_key races

2021-07-01 Thread Stefan Sperling
Some wifi drivers defer installation of keys into a process context. There was a noticable race in the past which was fixed thanks to krw@ where link state was set to UP before key installation had completed in hardware. This race could result in dhclient failing to get a lease. Other races

style(9) identifier alignment

2021-07-01 Thread Charlie Burnett
Hi @tech, Currently the prevailing style in the kernel seems to have identifiers (minus their pointers) aligned. style(9) however indicates that the first qualifiers should be aligned. This patch fixes the style guide to match the predominant style. I tried to give it a bit more of an OpenBSD