Re: ukbd(4): support apple brightness keys

2020-10-27 Thread Tobias Heider
> What about KS_Cmd_BrightnessUp and KS_Cmd_BrightnessDown? Right, here's a new diff using those wskbd commands. I couldn't find any standardized UHID key codes for brightness keys so I chose 232 and 233 which are currently unused and in the RESERVED range. I also included the regenerated

setitimer(2): protect per-process ITIMER_REAL state with ps_mtx

2020-10-27 Thread Scott Cheloha
Hi, The last step before unlocking setitimer(2) and getitimer(2) is protecting the per-process ITIMER_REAL state with something other than the kernel lock. Because the ITIMER_REAL timeout runs at IPL_SOFTCLOCK I think the per-process mutex ps_mtx is appropriate. Changing the setitimer() routine

Re: snapshot boot fails with error "entry point at 0x1001000"

2020-10-27 Thread Sven Wolf
Hi Mark, on my Lenovo V130 the patch works. Now I'm able to boot the current kernel again, without the need to remove the radeon and amdgpu driver (https://marc.info/?l=openbsd-misc=159276382718317=2) Thanks and best regards, Sven On 10/27/20 1:40 PM, Mark Kettenis wrote: Hi Kastus,

[PATCH] tcpdump: special case dumping of layer 3 packets

2020-10-27 Thread Jason A. Donenfeld
Different link types get different printers. But until now, different link types would get the same pcap dumper. This is mostly fine, except for on LOOP-type interfaces, which have raw layer 3 packets. On these, the first four bytes of the packet represent the AF family, which the pcap data format

Re: [PATCH] ifconfig: keep track of allowed ips pointer correctly

2020-10-27 Thread Philip Guenther
On Tue, Oct 27, 2020 at 9:18 AM Jason A. Donenfeld wrote: ... > @@ -5721,16 +5720,18 @@ growwgdata(size_t by) > if (wg_aip != NULL) > wg_aip = (void *)wg_interface + aip_offset; > > - ret = (void *)wg_interface + wgdata.wgd_size - by; > - bzero(ret, by); > - >

Re: libagentx add agentx_varbind_unsigned32

2020-10-27 Thread Theo Buehler
On Tue, Oct 27, 2020 at 07:09:40PM +0100, Martijn van Duren wrote: > To prevent any future confusion around unsigned ints I'd like to add > agentx_varbind_unsigned32 as an alias to agentx_varbind_gauge32. > > According to RFC 2578 section 2: > -- an unsigned 32-bit quantity > -- indistinguishable

[PATCH] ifconfig: keep track of allowed ips pointer correctly

2020-10-27 Thread Jason A. Donenfeld
Somebody on IRC mentioned that using ifconfig to set wgallowedips wasn't working on macppc. I don't have a macppc to test this on, but it seems like the code is assuming that the two values printed out by this test program must always be the same: struct s { int i; }; struct p {

Re: libagentx add agentx_varbind_unsigned32

2020-10-27 Thread Martijn van Duren
On Tue, 2020-10-27 at 19:09 +0100, Martijn van Duren wrote: > To prevent any future confusion around unsigned ints I'd like to add > agentx_varbind_unsigned32 as an alias to agentx_varbind_gauge32. > > According to RFC 2578 section 2: > -- an unsigned 32-bit quantity > -- indistinguishable from

libagentx add agentx_varbind_unsigned32

2020-10-27 Thread Martijn van Duren
To prevent any future confusion around unsigned ints I'd like to add agentx_varbind_unsigned32 as an alias to agentx_varbind_gauge32. According to RFC 2578 section 2: -- an unsigned 32-bit quantity -- indistinguishable from Gauge32 OK? Still OK to ride yesterdays bump? martijn@ Index:

Re: macppc: fix wsconsctl for non-vgafb

2020-10-27 Thread Klemens Nanni
On Mon, Oct 26, 2020 at 06:20:25PM +0100, Tobias Heider wrote: > The diff below wires the ofw backlight commands to ws_get_param/ws_set_param > and makes wsconsctl backlight/brightness work on my machine using radeondrm. This commit fixed brightness on my PowerBook5,8 but broke display.contract

Re: ukbd(4): support apple brightness keys

2020-10-27 Thread Klemens Nanni
On Tue, Oct 27, 2020 at 02:58:55PM +0100, Tobias Heider wrote: > I think you're missing the previous diff, see > https://marc.info/?l=openbsd-tech=160373302219962=2 Right, my bad. -CURRENT with your diff works as expected in all regards.

Re: ukbd(4): support apple brightness keys

2020-10-27 Thread Mark Kettenis
> Date: Tue, 27 Oct 2020 00:16:16 +0100 > From: Tobias Heider > > Hi, > > the diff below makes the brightness keys work on apple powerbooks > 5,6 > where the keyboard attaches via ukbd(4). > I'm wondering if it would be better to go through wskbd as is done with > audio, but we don't have

Re: ukbd(4): support apple brightness keys

2020-10-27 Thread Tobias Heider
On Tue, Oct 27, 2020 at 02:22:24PM +0100, Klemens Nanni wrote: > On Tue, Oct 27, 2020 at 12:16:16AM +0100, Tobias Heider wrote: > > the diff below makes the brightness keys work on apple powerbooks > 5,6 > > where the keyboard attaches via ukbd(4). > > I'm wondering if it would be better to go

Re: ukbd(4): support apple brightness keys

2020-10-27 Thread Klemens Nanni
On Tue, Oct 27, 2020 at 12:16:16AM +0100, Tobias Heider wrote: > the diff below makes the brightness keys work on apple powerbooks > 5,6 > where the keyboard attaches via ukbd(4). > I'm wondering if it would be better to go through wskbd as is done with > audio, but we don't have keycodes

Re: snapshot boot fails with error "entry point at 0x1001000"

2020-10-27 Thread Mark Kettenis
Hi Kastus, Please don't have technical discussions on misc@; some developers, like me, only read it sporadically. The tech@ list is a much better place. The problem with your approach is that you allocate memory at a fixed address, and we can't be sure that memory is available. We may have to

Re: radeondrm(4) unaligned access fix

2020-10-27 Thread David Higgs
On Mon, Oct 26, 2020 at 3:18 PM Mark Kettenis wrote: > > Date: Sun, 25 Oct 2020 10:42:38 +0100 (CET) > > From: Mark Kettenis > > > > While making radeondrm(4) work on powerpc64 I'm running into an > > interesting unaligned access issue. > > > > Modern POWER CPUs generally support unaligned

Re: httpd(8): add location access tests

2020-10-27 Thread Denis Fondras
On Tue, Oct 27, 2020 at 12:02:18PM +0100, Matthias Pressfreund wrote: > True. Updated patch below. > Thanks, I have been using the diff (from your GH account) since a few weeks. OK denis@ I will commit tonight if nobody stands against. > > > Index: usr.sbin/httpd/httpd.conf.5 >

Re: httpd(8): add location access tests

2020-10-27 Thread Matthias Pressfreund
True. Updated patch below. On 2020-10-27 11:29, Denis Fondras wrote: > Thanks Matthias, > > comment below. > > On Tue, Oct 27, 2020 at 08:37:39AM +0100, Matthias Pressfreund wrote: >> Index: usr.sbin/httpd/httpd.conf.5 >> === >>

Re: httpd(8): add location access tests

2020-10-27 Thread Denis Fondras
Thanks Matthias, comment below. On Tue, Oct 27, 2020 at 08:37:39AM +0100, Matthias Pressfreund wrote: > Index: usr.sbin/httpd/httpd.conf.5 > === > RCS file: /cvs/src/usr.sbin/httpd/httpd.conf.5,v > retrieving revision 1.113 > diff

Re: amap: introduce amap_adjref_anons()

2020-10-27 Thread Mark Kettenis
> Date: Fri, 23 Oct 2020 10:31:21 +0200 > From: Martin Pieuchot > > More refactoring. This time let's introduce a helper to manipulate > references. The goal is to reduce the upcoming diff adding locking. > > This is extracted from a bigger diff from guenther@ as well as some > bits from

httpd(8): add location access tests

2020-10-27 Thread Matthias Pressfreund
The patch below adds access tests ('found' or 'not found') for 'location' resource paths via httpd.conf(5). This enables WordPress Pretty Permalinks (https://wordpress.org/support/article/using-permalinks/) just like on an Apache web server with 'mod_rewrite' installed: server "www.example.com"