Stylistic Cleanup Removing Magic Numbers for STDIN_FILENO

2021-04-25 Thread Smccalib
Greetings, While reading the source code for ed, I noticed a small stylistic inconsistency in main.c whereby "isatty(0)" is called followed by a series of calls to functions that take a fd being called with STDIN_FILENO. Although this has little impact on readability, and should make no

Re: Stylistic Cleanup Removing Magic Numbers for STDIN_FILENO

2021-04-25 Thread Bryan Steele
On Sun, Apr 25, 2021 at 08:58:35PM +, Smccalib wrote: > Greetings, > > While reading the source code for ed, I noticed a small stylistic > inconsistency in main.c whereby "isatty(0)" is called followed by a > series of calls to functions that take a fd being called with > STDIN_FILENO.

Re: sysctl net.inet.ip.arpqueued read only

2021-04-25 Thread Vitaliy Makkoveev
> On 26 Apr 2021, at 01:43, Theo de Raadt wrote: > > I am not a fan of this strange behaviour, where the min+max values > have additional behaviours. It is too surprising, and surprising > often turns into error-prone. Agreed. Also according sysctl_int_bounded() code this behaviour looks

Re: sysctl net.inet.ip.arpqueued read only

2021-04-25 Thread Theo de Raadt
I am not a fan of this strange behaviour, where the min+max values have additional behaviours. It is too surprising, and surprising often turns into error-prone. Alexander Bluhm wrote: > On Sun, Apr 25, 2021 at 10:08:08AM -0700, Greg Steuck wrote: > > - { IPCTL_ARPQUEUED, _hold_total, 0,

Re: sysctl net.inet.ip.arpqueued read only

2021-04-25 Thread Alexander Bluhm
On Sun, Apr 25, 2021 at 10:08:08AM -0700, Greg Steuck wrote: > - { IPCTL_ARPQUEUED, _hold_total, 0, 1000 }, > + { IPCTL_ARPQUEUED, _hold_total, 1, 0 }, > > Will make la_hold_total read-only via sysctl. This feature surprises me. When reading the caller, is is not clear what it does.

Make sti(4) use km_alloc(9)

2021-04-25 Thread Mark Kettenis
This is one of the last users of uvm_km_alloc(9) in the tree. Converting to km_alloc(9) is a bit tricky though since we deliberately don't allow making the allocated memory executable through uvm interfaces. But since km_alloc(9) uses pmap_kenter_pa(9) anyway, we can just use that to change to

Re: malloc vs emacs

2021-04-25 Thread Theo Buehler
On Sun, Apr 25, 2021 at 05:53:31PM +0200, Otto Moerbeek wrote: > Hi, > > A local test and jca@ confirm the special casing isn't needed anymore. > > Two things: > > - This could do with a ports bulk build to find other offenders I have started an amd64 bulk that includes this diff. Will report

Re: sysctl net.inet.ip.arpqueued read only

2021-04-25 Thread Greg Steuck
Hi Alexander, Quick bike-shed followup below. Alexander Bluhm writes: > Index: netinet/ip_input.c > === > RCS file: /data/mirror/openbsd/cvs/src/sys/netinet/ip_input.c,v > retrieving revision 1.356 > diff -u -p -r1.356 ip_input.c

Re: malloc vs emacs

2021-04-25 Thread Mark Kettenis
> Date: Sun, 25 Apr 2021 17:53:31 +0200 > From: Otto Moerbeek > > Hi, > > A local test and jca@ confirm the special casing isn't needed anymore. > > Two things: > > - This could do with a ports bulk build to find other offenders > > - Would this require a libc bump? Unless I'm mistaken,

Re: Patch: USB-N10 Nano B1 support - wifi usb dongle

2021-04-25 Thread Stefan Sperling
On Thu, Apr 22, 2021 at 07:41:30PM +0200, Jan Vlach wrote: > Hello tech@, > > following patch enables urtwn driver to attach to USB wifi adapter > ASUS USB-N10 Nano (Wireless-N150) Your changes have been committed. Thank you! For the future, note that usbdevs.h and usbdevs_data.h are generated

malloc vs emacs

2021-04-25 Thread Otto Moerbeek
Hi, A local test and jca@ confirm the special casing isn't needed anymore. Two things: - This could do with a ports bulk build to find other offenders - Would this require a libc bump? -Otto Index: hidden/stdlib.h ===

Re: re-enable A-MSDU support with iwm(4) and iwx(4) fixed

2021-04-25 Thread trondd
Stefan Sperling wrote: > This patch adds A-MSDU rx offloading support for both iwm(4) and iwx(4) > and re-enables net80211's software A-MSDU Rx support for all 11n drivers. > > Meaning iwn(4) and athn(4) will also be receiving A-MSDUs again. > This feature has been turned off since July 2019: >

scandir: arraysz signed vs unsigned

2021-04-25 Thread Omar Polo
Hello tech@, I was stealing^W borrowing some code from scandir.c when I noticed some warnings when compiling with -Wall -Wextra. It's probably nitpicking, but wouldn't be better declare arraysz as size_t instead of long? Or there is something that I'm missing and it actually makes sense to keep

Re: [External] : arp mbuf queue

2021-04-25 Thread Jonathan Matthew
On Sun, Apr 25, 2021 at 09:44:16AM +0200, Alexandr Nedvedicky wrote: > Hello, > > I think this should go in as-is. Though I have one question/idea > to share at the moment. > > > > @@ -672,20 +666,18 @@ arpcache(struct ifnet *ifp, struct ether > > > > la->la_asked = 0; > >

Re: [External] : arp mbuf queue

2021-04-25 Thread Alexandr Nedvedicky
Hello, I think this should go in as-is. Though I have one question/idea to share at the moment. > @@ -672,20 +666,18 @@ arpcache(struct ifnet *ifp, struct ether > > la->la_asked = 0; > la->la_refreshed = 0; > - while ((len = ml_len(>la_ml)) != 0) { > - struct mbuf