Re: Unlock top part of uvm_fault()

2021-04-27 Thread George Koehler
On Thu, 22 Apr 2021 15:38:53 +0200 Martin Pieuchot wrote: > Diff below remove the KERNEL_LOCK()/UNLOCK() dance from uvm_fault() for > both amd64 and sparc64. That means the kernel lock will only be taken > for lower faults and some amap/anon code will now run without it. I made a similar diff,

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

2021-04-27 Thread Greg Steuck
Vitaliy Makkoveev writes: > On Tue, Apr 27, 2021 at 09:12:56PM +0200, Alexander Bluhm wrote: >> On Tue, Apr 27, 2021 at 12:18:02PM -0600, Theo de Raadt wrote: >> > Actually, your variation seems pretty good. Is there any reason to not >> > use this type of define? >> >> This would look like

Re: arp mbuf delist

2021-04-27 Thread Vitaliy Makkoveev
> On 28 Apr 2021, at 00:45, Alexander Bluhm wrote: > > On Sun, Apr 25, 2021 at 06:08:17PM +1000, Jonathan Matthew wrote: >> On Sun, Apr 25, 2021 at 09:44:16AM +0200, Alexandr Nedvedicky wrote: >> This already exists, it's called mq_delist() > > Here is the diff with mq_delist(). > >> We'd

Re: [External] : arp mbuf delist

2021-04-27 Thread Alexander Bluhm
On Wed, Apr 28, 2021 at 03:19:47AM +0300, Vitaliy Makkoveev wrote: > The code not only breaks loop but also cleans the queue. Should this be > kept? In IPv6 nd6_cache_lladdr() we have neither queue nor loop, just a single mbuf on hold. But we have that discard logic, too.

Re: [External] : arp mbuf delist

2021-04-27 Thread Vitaliy Makkoveev
On Wed, Apr 28, 2021 at 12:10:31AM +0200, Alexandr Nedvedicky wrote: > Hello, > > On Tue, Apr 27, 2021 at 11:45:19PM +0200, Alexander Bluhm wrote: > > On Sun, Apr 25, 2021 at 06:08:17PM +1000, Jonathan Matthew wrote: > > > On Sun, Apr 25, 2021 at 09:44:16AM +0200, Alexandr Nedvedicky wrote: > > >

Re: time to add NET_ASSERT_WLOCKED()

2021-04-27 Thread Alexander Bluhm
On Wed, Apr 28, 2021 at 01:44:42AM +0200, Alexandr Nedvedicky wrote: > Hello, > > with moving towards NET_RLOCK...() shall we add an explicit > assert to state caller owns netlock exclusively? I propose > to introduce NET_ASSERT_WLOCKED() > > NET_ASSERT_WLOCKED() I had exacly the same

Re: [External] : arp locking

2021-04-27 Thread Alexandr Nedvedicky
Hello, On Wed, Apr 28, 2021 at 01:49:27AM +0200, Alexander Bluhm wrote: > On Wed, Apr 28, 2021 at 12:46:31AM +0200, Alexandr Nedvedicky wrote: > > looks good in general. I have just two nits/questions. > > mvs@ has asked the same questions. > > > > struct llinfo_arp { > > > -

Re: [External] : arp locking

2021-04-27 Thread Alexander Bluhm
On Wed, Apr 28, 2021 at 12:46:31AM +0200, Alexandr Nedvedicky wrote: > looks good in general. I have just two nits/questions. mvs@ has asked the same questions. > > struct llinfo_arp { > > - LIST_ENTRY(llinfo_arp) la_list; > > - struct rtentry *la_rt; /* backpointer to

time to add NET_ASSERT_WLOCKED()

2021-04-27 Thread Alexandr Nedvedicky
Hello, with moving towards NET_RLOCK...() shall we add an explicit assert to state caller owns netlock exclusively? I propose to introduce NET_ASSERT_WLOCKED() NET_ASSERT_WLOCKED() thanks and regards sashan 8<---8<---8<--8< diff

Re: enable dt(4)

2021-04-27 Thread Alexander Bluhm
On Mon, Apr 26, 2021 at 05:13:55PM +0200, Sebastien Marie wrote: > > I can't vouch that it builds for all architectures... Did anyone do > > that? Number 1 rule: don't break Theo's build. > > One test would be to build on i386 (with full release process): we are > near the limit currently, so it

Re: arp locking

2021-04-27 Thread Vitaliy Makkoveev
On Tue, Apr 27, 2021 at 07:27:43PM +0200, Alexander Bluhm wrote: > Hi, > > I would like to document the locking mechanism of the global variables > in ARP. > > The global arp_list is protected by net lock. This is not sufficent > when we switch to shared netlock. So I added a mutex for

Re: [External] : arp locking

2021-04-27 Thread Alexandr Nedvedicky
Hello, looks good in general. I have just two nits/questions. > ok? > > bluhm > > Index: netinet/if_ether.c > === > RCS file: /data/mirror/openbsd/cvs/src/sys/netinet/if_ether.c,v > retrieving revision 1.246 > diff -u -p -r1.246

iscsictl.8: Update man page to reflect new behavior of reload command

2021-04-27 Thread Ashton Fagg
Hi all, Attached is a diff which update iscsictl.8 to reflect the recent change in behavior of iscsictl's reload command. Thanks, Ash diff --git a/usr.sbin/iscsictl/iscsictl.8 b/usr.sbin/iscsictl/iscsictl.8 index 5886a0f8f1b..1d27978eac5 100644 --- a/usr.sbin/iscsictl/iscsictl.8 +++

Re: [External] : arp mbuf delist

2021-04-27 Thread Alexandr Nedvedicky
Hello, On Tue, Apr 27, 2021 at 11:45:19PM +0200, Alexander Bluhm wrote: > On Sun, Apr 25, 2021 at 06:08:17PM +1000, Jonathan Matthew wrote: > > On Sun, Apr 25, 2021 at 09:44:16AM +0200, Alexandr Nedvedicky wrote: > > This already exists, it's called mq_delist() > > Here is the diff with

arp mbuf delist

2021-04-27 Thread Alexander Bluhm
On Sun, Apr 25, 2021 at 06:08:17PM +1000, Jonathan Matthew wrote: > On Sun, Apr 25, 2021 at 09:44:16AM +0200, Alexandr Nedvedicky wrote: > This already exists, it's called mq_delist() Here is the diff with mq_delist(). > We'd need some other way to do the 'mbuf is back in queue' detection, > but

Re: Respect X-Forwarded-Proto in httpd

2021-04-27 Thread Raymond E. Pasco
On Tue Apr 27, 2021 at 4:55 PM EDT, Stuart Henderson wrote: > It's the other way round, this (or proto= in the newer standardised > Forwarded header) would be set by a reverse proxy to indicate the > protocol that the client request came in on so that something running on > the webserver could

Re: Respect X-Forwarded-Proto in httpd

2021-04-27 Thread Stuart Henderson
On 2021/04/27 16:23, Raymond E. Pasco wrote: > On Tue Apr 27, 2021 at 3:40 PM EDT, Stuart Henderson wrote: > > How does this work with other web servers? For example, I don't see the > > string X-Forwarded-Proto in nginx or Apache httpd (and the use of other > > X-Forwarded headers in them are

Re: Respect X-Forwarded-Proto in httpd

2021-04-27 Thread Raymond E. Pasco
On Tue Apr 27, 2021 at 3:40 PM EDT, Stuart Henderson wrote: > How does this work with other web servers? For example, I don't see the > string X-Forwarded-Proto in nginx or Apache httpd (and the use of other > X-Forwarded headers in them are only for adding to requests when running > as a proxy

Re: Respect X-Forwarded-Proto in httpd

2021-04-27 Thread Dave Voutila
Stuart Henderson writes: > On 2021/04/27 10:40, Vincent Lee wrote: >> >> Hi all, >> >> Consider the following situation. A reverse proxy which performs TLS >> termination is deployed in front of httpd, which listens unencrypted on >> localhost. >> >> There is code in httpd to handle the case

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

2021-04-27 Thread Vitaliy Makkoveev
On Tue, Apr 27, 2021 at 09:12:56PM +0200, Alexander Bluhm wrote: > On Tue, Apr 27, 2021 at 12:18:02PM -0600, Theo de Raadt wrote: > > Actually, your variation seems pretty good. Is there any reason to not > > use this type of define? > > This would look like this. > > I think sysctl_int() and

Re: Respect X-Forwarded-Proto in httpd

2021-04-27 Thread Stuart Henderson
On 2021/04/27 10:40, Vincent Lee wrote: > > Hi all, > > Consider the following situation. A reverse proxy which performs TLS > termination is deployed in front of httpd, which listens unencrypted on > localhost. > > There is code in httpd to handle the case where a directory is accessed, > but

Re: Respect X-Forwarded-Proto in httpd

2021-04-27 Thread Dave Voutila
Vincent Lee writes: > Hi all, > > Consider the following situation. A reverse proxy which performs TLS > termination is deployed in front of httpd, which listens unencrypted on > localhost. > > There is code in httpd to handle the case where a directory is accessed, > but the path named does

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

2021-04-27 Thread Alexander Bluhm
On Tue, Apr 27, 2021 at 12:18:02PM -0600, Theo de Raadt wrote: > Actually, your variation seems pretty good. Is there any reason to not > use this type of define? This would look like this. I think sysctl_int() and sysctl_rdint() should be the primitive functions. This brings us back the

[PATCH] df(1): add -m, -g to display megabyte and gigabyte blocks

2021-04-27 Thread Raymond E. Pasco
For parity with NetBSD/FreeBSD df(1). I made them incompatible with -P, as -h is; NetBSD also only supports 512/1024 with -P and FreeBSD uses -P to force 512. --- bin/df/df.1 | 30 +- bin/df/df.c | 33 - 2 files changed, 53

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

2021-04-27 Thread Theo de Raadt
Alexander Bluhm wrote: > On Tue, Apr 27, 2021 at 10:37:25AM -0600, Theo de Raadt wrote: > > > Would 0, 0 min, max be a simple and obvious way to say "read only" ? > > > > That is not as terrible. > > Yes. But it has another undocumented side effect. I think > sysctl_bounded_arr() inherits

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

2021-04-27 Thread Alexander Bluhm
On Tue, Apr 27, 2021 at 10:37:25AM -0600, Theo de Raadt wrote: > > Would 0, 0 min, max be a simple and obvious way to say "read only" ? > > That is not as terrible. Yes. But it has another undocumented side effect. I think sysctl_bounded_arr() inherits the minimum == maximum check from

Respect X-Forwarded-Proto in httpd

2021-04-27 Thread Vincent Lee
Hi all, Consider the following situation. A reverse proxy which performs TLS termination is deployed in front of httpd, which listens unencrypted on localhost. There is code in httpd to handle the case where a directory is accessed, but the path named does not end with a slash. In this case,

arp locking

2021-04-27 Thread Alexander Bluhm
Hi, I would like to document the locking mechanism of the global variables in ARP. The global arp_list is protected by net lock. This is not sufficent when we switch to shared netlock. So I added a mutex for insertion and removal if netlock is not exclusive. ok? bluhm Index:

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

2021-04-27 Thread Theo de Raadt
Chris Cappuccio wrote: > Vitaliy Makkoveev [m...@openbsd.org] wrote: > > > > > > > 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

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

2021-04-27 Thread Chris Cappuccio
Vitaliy Makkoveev [m...@openbsd.org] wrote: > > > > 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.

softraid(4) crypto/raid1c refactoring

2021-04-27 Thread Stefan Sperling
Refactor softraid crypto code to allow use of a discipline-specific data structure for RAID1C volumes, as requested by jsing@ during review of my initial RAID1C patch. This patch should effectively be a cosmetic change. The whole point of this patch is to allow the data structure changes made

Re: Driver for Zynq-7000 system-level control registers

2021-04-27 Thread Visa Hankala
On Mon, Apr 26, 2021 at 05:25:18PM +0200, Mark Kettenis wrote: > > Date: Mon, 26 Apr 2021 14:19:38 + > > From: Visa Hankala > > > > The following diff adds a preliminary driver for the system-level > > control registers of Xilinx Zynq-7000. It enables system reset. It also > > adds clock

net80211 RA: gather more stats per probe attempt

2021-04-27 Thread Stefan Sperling
This patch tweaks the heuristic RA is using to decide whether enough statistics have been gathered for a candidate Tx rate. The goal is to avoid Tx rate choices that might turn out to be too optimistic. In my testing RA now scales upwards a little bit more slowly while the distance towards the AP

iwn/iwm/iwx: keep track of beacon parameter changes

2021-04-27 Thread Stefan Sperling
Christian Ehrhardt reported an issue where changes in the ERP protection settings in beacons caused noticeable packet loss on iwm(4). I've found that there are a few parameters in beacons which can change at run-time but don't get updated in hardware, simply because the drivers do not implement