vmd(8): simplify vcpu logic, removing uart & net reads

2021-06-27 Thread Dave Voutila
Looking for some broader testing of the following diff. It cleans up some complicated logic predominantly left over from the early days of vmd prior to its having a dedicated device thread. In summary, this diff: - Removes vionet "rx pending" state handling and removes the code path for the vcp

Re: [RFC] strcpys(): New function for copying strings safely

2021-06-27 Thread Alejandro Colomar (man-pages)
On 6/27/21 9:26 PM, Alejandro Colomar (man-pages) wrote: It is designed so that usage requires the minimum number of lines of code for complete usage (including error handling checks): [[ // When we already checked that 'size' is >= 1 // and truncation is not an issue: strcpys_np(size, dest,

[RFC] strcpys(): New function for copying strings safely

2021-06-27 Thread Alejandro Colomar (man-pages)
Hi, I recently re-read the discussions about strscpy() and strlcpy(). https://lwn.net/Articles/612244/ https://sourceware.org/legacy-ml/libc-alpha/2000-08/msg00052.html https://mafford.com/text/the-many-ways-to-copy-a-string-in-c/ https://lkml.org/lkml/2017/7/14/637 https://lwn.net/Articles/6592

Re: recvmsg returns MSG_DONTWAIT

2021-06-27 Thread Klemens Nanni
On Sun, Jun 27, 2021 at 01:25:34PM -0600, Todd C. Miller wrote: > On Sun, 27 Jun 2021 15:59:48 -, Klemens Nanni wrote: > > > On Sun, Jun 27, 2021 at 05:28:09PM +0200, Mark Kettenis wrote: > > > I think this points out that diff wasn't quite right. I mean, > > > changing the man page doesn't f

Re: recvmsg returns MSG_DONTWAIT

2021-06-27 Thread Todd C . Miller
On Sun, 27 Jun 2021 15:59:48 -, Klemens Nanni wrote: > On Sun, Jun 27, 2021 at 05:28:09PM +0200, Mark Kettenis wrote: > > I think this points out that diff wasn't quite right. I mean, > > changing the man page doesn't fix the Haskell test does it? > > Of course it doesn't fix the test but it

Re: recvmsg returns MSG_DONTWAIT

2021-06-27 Thread Todd C . Miller
On Sun, 27 Jun 2021 18:16:34 +0200, Claudio Jeker wrote: > On Sun, Jun 27, 2021 at 05:28:09PM +0200, Mark Kettenis wrote: > > > Date: Sun, 27 Jun 2021 13:36:03 + > > > From: Klemens Nanni > > > > > > On Sat, Jun 12, 2021 at 11:54:58PM -0700, Greg Steuck wrote: > > > > I started with a failin

Re: recvmsg returns MSG_DONTWAIT

2021-06-27 Thread Klemens Nanni
On Sun, Jun 27, 2021 at 05:28:09PM +0200, Mark Kettenis wrote: > I think this points out that diff wasn't quite right. I mean, > changing the man page doesn't fix the Haskell test does it? Of course it doesn't fix the test but it documents the status quo so kernel and test hackers can actually us

Re: mandoc style warning about text lines > 80 bytes

2021-06-27 Thread Ingo Schwarze
Hi Jason, Jason McIntyre wrote on Sat, Jun 26, 2021 at 06:55:44PM +0100: > i count mkhybrid as 3rd party. the man page is still old style, and has > only 2 commits in 20 years. if it is ours, it needs considerable work. Fair enough, you are probably right about that. > i have no strong opinions

Re: Patch: ksh: fix input handling for 4 byte UTF-8 sequences

2021-06-27 Thread Sören Tempel
Ingo Schwarze wrote: > It would, and in principle, that would be an improvement. > But i think editline(3) code quality is insufficent for use in a > shell. It's all quite messy and hastily and sloppily written. > I tried to polish some of it in the past, but got distracted, > so editline(3) code

Re: Patch: ksh: fix input handling for 4 byte UTF-8 sequences

2021-06-27 Thread Theo de Raadt
> But i think editline(3) code quality is insufficent for use in a > shell. It's all quite messy and hastily and sloppily written. I also mistrust it. It may be tempting to use a library, but the shell is quite standalone code, and benefits from internal purpose-built code.

Re: Patch: ksh: fix input handling for 4 byte UTF-8 sequences

2021-06-27 Thread Ingo Schwarze
Hi Soeren, Soeren Tempel wrote on Mon, Jun 07, 2021 at 07:02:25PM +0200: > Nice, wasn't aware that you also had a patch ready. Yeah, that was due to the fact that we, as developers, often use the lists but sometimes also send comments and patches privately, to reduce the mail volume for everybod

Re: recvmsg returns MSG_DONTWAIT

2021-06-27 Thread Claudio Jeker
On Sun, Jun 27, 2021 at 05:28:09PM +0200, Mark Kettenis wrote: > > Date: Sun, 27 Jun 2021 13:36:03 + > > From: Klemens Nanni > > > > On Sat, Jun 12, 2021 at 11:54:58PM -0700, Greg Steuck wrote: > > > I started with a failing test for Haskell network package on 6.9-current > > > amd64 > > > (

Re: Patch: ksh: fix input handling for 4 byte UTF-8 sequences

2021-06-27 Thread Ingo Schwarze
Hi Jeremie, Jeremie Courreges-Anglas wrote on Thu, Jun 03, 2021 at 11:17:08PM +0200: > On Wed, Jun 02 2021, Ingo Schwarze wrote: >> I'm also adding a few comments as suggested by jca@. Parsing of UTF-8 >> is less trivial than one might think, witnessed once again by the fact >> that i got this

Re: recvmsg returns MSG_DONTWAIT

2021-06-27 Thread Mark Kettenis
> Date: Sun, 27 Jun 2021 13:36:03 + > From: Klemens Nanni > > On Sat, Jun 12, 2021 at 11:54:58PM -0700, Greg Steuck wrote: > > I started with a failing test for Haskell network package on 6.9-current > > amd64 > > (cabal get network-3.1.2.1 && cabal v2-test) > > > > network-3.1.2.1/build/sp

Re: recvmsg returns MSG_DONTWAIT

2021-06-27 Thread Klemens Nanni
On Sat, Jun 12, 2021 at 11:54:58PM -0700, Greg Steuck wrote: > I started with a failing test for Haskell network package on 6.9-current amd64 > (cabal get network-3.1.2.1 && cabal v2-test) > > network-3.1.2.1/build/spec/spec --match > "/Network.Socket.ByteString/recvMsg/works well/" > > tests/

Re: btrace kstack userland

2021-06-27 Thread Klemens Nanni
On Sat, Jun 26, 2021 at 01:17:33PM +0200, Alexander Bluhm wrote: > Hi, > > I would like to show the time spent in userland also when analyzing > kernel stack in flame graph. Here are examples when building a bsd > kernel on a 4 core machine. > > kernel only > http://bluhm.genua.de/perform/result

Re: mandoc style warning about text lines > 80 bytes

2021-06-27 Thread Klemens Nanni
On Sat, Jun 26, 2021 at 08:06:58PM +0200, Theo Buehler wrote: > On Sat, Jun 26, 2021 at 07:20:52PM +0200, Ingo Schwarze wrote: > > Hi Jason and Theo, > > > > Jason McIntyre wrote on Tue, Jun 22, 2021 at 06:37:27AM +0100: > > > On Tue, Jun 22, 2021 at 04:48:39AM +0200, Theo Buehler wrote: > > > >