Re: [RFC] acpi: add acpitimer_delay(), acpihpet_delay()

2022-08-16 Thread Jonathan Gray
On Tue, Aug 16, 2022 at 11:53:51AM -0500, Scott Cheloha wrote: > On Sun, Aug 14, 2022 at 11:24:37PM -0500, Scott Cheloha wrote: > > > > In the future when the LAPIC timer is run in oneshot mode there will > > be no lapic_delay(). > > > > [...] > > > > This is *very* bad for older amd64 machines,

Re: Add Intel Optane 900P/905P NVMe

2022-08-16 Thread Jonathan Gray
On Tue, Aug 16, 2022 at 07:46:22PM +1000, Jonathan Matthew wrote: > > 0x2522 was for the 16/32GB Optane Memory devices. https://ark.intel.com/content/www/us/en/ark/products/99742/intel-optane-memory-series-32gb-m-2-80mm-pcie-3-0-20nm-3d-xpoint.html https://www.intel.com/content/dam/www/public/us/

Re: Add Intel Optane 900P/905P NVMe

2022-08-16 Thread Jonathan Gray
On Tue, Aug 16, 2022 at 10:11:03AM +0200, Andreas Bartelt wrote: > On 8/16/22 05:22, Jonathan Gray wrote: > > On Sun, Aug 14, 2022 at 04:03:59PM +0200, Andreas Bartelt wrote: > > > Hi, > > > > > > Intel Optane 905p NVMe devices were not yet recog

Re: Add Intel Optane 900P/905P NVMe

2022-08-15 Thread Jonathan Gray
On Sun, Aug 14, 2022 at 04:03:59PM +0200, Andreas Bartelt wrote: > Hi, > > Intel Optane 905p NVMe devices were not yet recognized in CURRENT (e.g., > https://ark.intel.com/content/www/us/en/ark/products/148607/intel-optane-ssd-905p-series-380gb-m-2-110mm-pcie-x4-20nm-3d-xpoint.html > ). > > I've

Re: [RFC] acpi: add acpitimer_delay(), acpihpet_delay()

2022-08-15 Thread Jonathan Gray
On Sun, Aug 14, 2022 at 11:24:37PM -0500, Scott Cheloha wrote: > Hi, > > In the future when the LAPIC timer is run in oneshot mode there will > be no lapic_delay(). > > This is fine if you have a constant TSC, because we have tsc_delay(). > > This is *very* bad for older amd64 machines, because

Re: alpha: remove misaligned access emulation code

2022-08-09 Thread Jonathan Gray
On Tue, Aug 09, 2022 at 07:39:31PM +, Miod Vallat wrote: > The alpha part contains code in the kernel to handle unaligned memory > accesses from userland programs, to prevent them from dying in horrible > SIGBUS. > > This made sense in the '90s, but since then people have learned to work > wit

Re: What is ieee80211com->ic_ibss_chan?

2022-08-08 Thread Jonathan Gray
On Mon, Aug 08, 2022 at 11:40:17AM -0400, Farhan Khan wrote: > Hi all, > > I am trying to understand the different channels in `struct ieee80211com`. I > see 2 types of ieee80211_channel values: > * ic_ibss_chan > * ic_des_chan - Desired channel, pretty straight forward > > What is ic_ibss_chan

Re: match recent Intel CPUs in fw_update(8)

2022-08-05 Thread Jonathan Gray
On Fri, Aug 05, 2022 at 11:06:06AM -0700, Andrew Hewus Fresh wrote: > On Tue, Jun 21, 2022 at 02:58:46PM +1000, Jonathan Gray wrote: > > Intel CPUs used to have strings like > > cpu0: Intel(R) Pentium(R) M processor 1200MHz ("GenuineIntel" 686-class) > > 1.20 GHz

Re: inteldrm: fix build without intagp

2022-07-30 Thread Jonathan Gray
On Sat, Jul 30, 2022 at 07:51:07AM +, Klemens Nanni wrote: > Pull inteldrm_refcnt out of NINTAGP > 0, otherwise it remains undefined but > still used in inteldrm_attachhook(): > > if (inteldrm_refcnt == 0) { > i915_init(); > } > inteldrm_refcnt++; > > OK? ok j

Re: remove pre-486 code from i386 platform

2022-07-28 Thread Jonathan Gray
On Fri, Jul 29, 2022 at 06:58:08AM +0200, Tomasz Rola wrote: > On Thu, Jul 28, 2022 at 08:06:28PM -0400, Daniel Dickman wrote: > > On Thu, Jul 28, 2022 at 3:37 AM Jeroen Massar wrote: > > > > [...] > > > > > > I personally would not touch the .h definitions: > > > > > > > > > > > Index: i386/inclu

Re: remove pre-486 code from i386 platform

2022-07-28 Thread Jonathan Gray
On Wed, Jul 27, 2022 at 10:18:55PM -0400, Daniel Dickman wrote: > The diff below removes support for 386SX/DX processors. We already claim > we don't support anything older than a Pentium so there's no point to keep > this code. > > The main code change is in locore0.S and is to stop checking if

Re: include cpuid 0 string in dmesg for fw_update

2022-07-27 Thread Jonathan Gray
On Wed, Jul 27, 2022 at 04:15:36PM +0200, Alexander Hall wrote: > > > On July 27, 2022 3:47:56 PM GMT+02:00, Andrew Hewus Fresh > wrote: > >On Wed, Jul 27, 2022 at 11:06:39AM +0200, Alexander Hall wrote: > >> I think replacing '*' with '*([![:cntrl:]])' can be the droid your looking > >> for.

Re: Xorg hanging on StarLabs Lite IV - infinite sleep in ioctl drm_syncobj_array_wait_timeout

2022-07-25 Thread Jonathan Gray
On Mon, Jul 25, 2022 at 12:21:00PM +0100, Chris Narkiewicz wrote: > > to see ioctls you can use ktrace/kdump > > Thank you for the hints. I'll try ktrace/kdump and I'll come back with > the results, probably somehere tomorrow. > > > what value do you mean by infinite? > > libiris sends ioctl()

Re: Xorg hanging on StarLabs Lite IV - infinite sleep in ioctl drm_syncobj_array_wait_timeout

2022-07-25 Thread Jonathan Gray
On Sun, Jul 24, 2022 at 12:09:50PM +0100, Chris Narkiewicz wrote: > Hi, > > Some time ago I posted a bug on bugs@ (subject: X11 hangs on StarLabs Mk IV - > snapshot 06-06-2022). > We did some checks with help of one of the developers, but we could not find > a cause then. > > I started digging

Re: include cpuid 0 string in dmesg for fw_update

2022-07-24 Thread Jonathan Gray
On Sun, Jul 24, 2022 at 08:05:26AM -0600, Theo de Raadt wrote: > Why not match on cpu0: .*Intel I sent a diff a month ago with ^cpu0:*Intel(R) semarie mentioned false positives as it could match another Intel device on another line on a non-Intel CPU https://marc.info/?l=openbsd-tech&m=165579653

Re: remove rise detection from i386

2022-07-23 Thread Jonathan Gray
On Sun, Jul 24, 2022 at 02:16:23AM -0400, Daniel Dickman wrote: >http://datasheets.chipdb.org/Rise/ > >Quoting the data sheet from this link: > >“The CMPXCHG8B instruction is supported and always enabled on the Rise >mP6 processor; however, the default CPUID function bit is set to

Re: remove rise detection from i386

2022-07-23 Thread Jonathan Gray
On Sun, Jul 24, 2022 at 02:25:02PM +1000, Jonathan Gray wrote: > On Sat, Jul 23, 2022 at 02:13:27PM -0400, Daniel Dickman wrote: > > The Rise mp6 was a short lived processor that was announced around 20+ > > years and didn't make it to market. > > > > I think we c

include cpuid 0 string in dmesg for fw_update

2022-07-23 Thread Jonathan Gray
include cpuid 0 string in dmesg for fw_update Intel CPUs used to have brand strings such as cpu0: Intel(R) Pentium(R) M processor 1200MHz ("GenuineIntel" 686-class) 1.20 GHz cpu0: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz, 2494.61 MHz, 06-3d-04 recent CPUs use cpu0: 11th Gen Intel(R) Core(TM) i5-1

Re: remove rise detection from i386

2022-07-23 Thread Jonathan Gray
On Sat, Jul 23, 2022 at 02:13:27PM -0400, Daniel Dickman wrote: > The Rise mp6 was a short lived processor that was announced around 20+ > years and didn't make it to market. > > I think we can delete the cpu identification for this cpu at this point. > > ok? I am ok with removing it, but I thi

Re: Replace struct selinfo with klist in bpf, kqueue and pipes

2022-07-08 Thread Jonathan Gray
On Fri, Jul 08, 2022 at 03:39:59PM +, Visa Hankala wrote: > Replace struct selinfo with direct use of struct klist in bpf, kqueue > and pipes. These subsystems no longer utilize selwakeup(). > > OK? ok jsg@ > > Index: kern/kern_event.c > =

Re: Remove leftovers of old poll/select

2022-07-04 Thread Jonathan Gray
On Sat, Jul 02, 2022 at 02:12:56PM +, Visa Hankala wrote: > Remove the leftovers of the old poll/select mechanism. > This includes the fields si_seltid and si_flags in struct selinfo. > They should now always be zero because nothing calls selrecord(). > > selwakeup() becomes a wrapper for KNOT

Re: [patch] remove nexgen detection from i386

2022-07-04 Thread Jonathan Gray
On Mon, Jul 04, 2022 at 08:04:14PM -0400, Daniel Dickman wrote: > The patch below removes the (small) amount of code used to identify NexGen > CPUs. I'm doubtful that these CPUs would be supported anymore and we don't > do anything with the information once we identify a NexGen CPU. > > The code

Re: Remove device poll functions

2022-07-01 Thread Jonathan Gray
On Fri, Jul 01, 2022 at 02:06:46PM +, Visa Hankala wrote: > Remove unused device poll functions. > > This also removes unneeded includes of and > from the kernel. Some includes of are removed as well, > but another cleanup will come related to that header. > > After this, most of the remna

Re: rewrite amd64 cache printing

2022-06-29 Thread Jonathan Gray
On Tue, Jun 28, 2022 at 10:37:31PM +1000, Jonathan Gray wrote: > On Sat, Jun 25, 2022 at 04:21:54AM -0700, Mike Larkin wrote: > > On Fri, Jun 24, 2022 at 07:19:47PM +1000, Jonathan Gray wrote: > > > +void > > > +amd_cpu_cacheinfo(struct cpu_info *ci) > > >

Re: rewrite amd64 cache printing

2022-06-28 Thread Jonathan Gray
On Sat, Jun 25, 2022 at 04:21:54AM -0700, Mike Larkin wrote: > On Fri, Jun 24, 2022 at 07:19:47PM +1000, Jonathan Gray wrote: > > +void > > +amd_cpu_cacheinfo(struct cpu_info *ci) > > +{ > > + u_int eax, ebx, ecx, edx; > > + > > + /* used by vmm */ >

Re: xhci@acpi

2022-06-27 Thread Jonathan Gray
On Mon, Jun 27, 2022 at 05:54:03PM +0200, Mark Kettenis wrote: > So ACPI uses separate HIDs/CIDs for xhci(4) with and without debug > support. PNP0D15 is the one without. Seen on the Lenovo x13s. > > ok? > Might as well add PNP0D25 to ehci_hids[] also. ok jsg@ for both > > Index: xhci_acpi.

Re: bwfm: fix ifconfig media display on rpi2 usb wifi dongle

2022-06-26 Thread Jonathan Gray
On Sun, Jun 26, 2022 at 12:23:14PM +0200, Stefan Sperling wrote: > On Sun, Jun 26, 2022 at 07:48:46PM +1000, Jonathan Gray wrote: > > sta.rssi is later used which is 'Fields valid for ver >= 4' > > but it seems with the earlier zeroing the use here should be fine

Re: checksum offloading for em

2022-06-26 Thread Jonathan Gray
On Sun, Jun 26, 2022 at 04:43:59PM +0200, Moritz Buhl wrote: > On Sun, Jun 26, 2022 at 12:23:58PM +0200, Moritz Buhl wrote: > > Hi, > > > > I noticed that for some offloading-capable em controllers checksum > > offloading is still disabled and I couldn't find a reason for that. > > > > It was ass

Re: bwfm: fix ifconfig media display on rpi2 usb wifi dongle

2022-06-26 Thread Jonathan Gray
On Sat, Jun 25, 2022 at 10:07:21PM +0200, Stefan Sperling wrote: > There is an off-by-one in bwfm_update_node(). This function reads > the tx_rate field from station information returned by firmware. > > According to a comment in the Linux driver, this field is valid > for sta_info command version

more unused parts of dig

2022-06-25 Thread Jonathan Gray
Index: lib/dns/gen.c === RCS file: /cvs/src/usr.bin/dig/lib/dns/gen.c,v retrieving revision 1.15 diff -u -p -r1.15 gen.c --- lib/dns/gen.c 14 Sep 2020 08:40:43 - 1.15 +++ lib/dns/gen.c 25 Jun 2022 10:43:28 - @@

rewrite amd64 cache printing

2022-06-24 Thread Jonathan Gray
@@ -1,32 +1,19 @@ /* $OpenBSD: cacheinfo.c,v 1.9 2020/12/22 03:42:03 jsg Exp $ */ -/*- - * Copyright (c) 2000 The NetBSD Foundation, Inc. - * All rights reserved. +/* + * Copyright (c) 2022 Jonathan Gray * - * This code is derived from software contributed to The NetBSD Foundation - * by

Re: match recent Intel CPUs in fw_update(8)

2022-06-21 Thread Jonathan Gray
On Tue, Jun 21, 2022 at 09:29:13AM +0200, Sebastien Marie wrote: > On Tue, Jun 21, 2022 at 02:58:46PM +1000, Jonathan Gray wrote: > > Intel CPUs used to have strings like > > cpu0: Intel(R) Pentium(R) M processor 1200MHz ("GenuineIntel" 686-class) > > 1.20 GHz >

allow HW_USERMEM64 in sysctl pledge

2022-06-20 Thread Jonathan Gray
chromium loads vulkan when going to chrome://gpu on Intel Mesa uses HW_USERMEM64 chrome(44801): pledge sysctl 2: 6 20 chrome[44801]: pledge "", syscall 202 Index: sys/kern/kern_pledge.c === RCS file: /cvs/src/sys/kern/kern_pledge.c,v

match recent Intel CPUs in fw_update(8)

2022-06-20 Thread Jonathan Gray
Intel CPUs used to have strings like cpu0: Intel(R) Pentium(R) M processor 1200MHz ("GenuineIntel" 686-class) 1.20 GHz cpu0: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz, 2494.61 MHz, 06-3d-04 recent CPUs use cpu0: 11th Gen Intel(R) Core(TM) i5-1130G7 @ 1.10GHz, 30009.37 MHz, 06-8c-01 cpu0: 12th Gen I

Re: Only scan device 0 on pcie downstream ports

2022-06-17 Thread Jonathan Gray
On Fri, Jun 17, 2022 at 10:38:08AM +0200, Mark Kettenis wrote: > > Date: Fri, 17 Jun 2022 17:22:58 +1000 > > From: Jonathan Gray > > > > On Fri, Jun 17, 2022 at 12:33:47AM +0200, Mark Kettenis wrote: > > > On the Ampere Altra machines, some PCIe devices show

Re: Only scan device 0 on pcie downstream ports

2022-06-17 Thread Jonathan Gray
On Fri, Jun 17, 2022 at 12:33:47AM +0200, Mark Kettenis wrote: > On the Ampere Altra machines, some PCIe devices show up 32 times; once > for each possible PCI device number. This is a hardware bug, since a > downstream switch port (or root port) is supposed to terminate > configuration request ta

Re: [PATCH 1/1] drm/amdgpu: Fix double free of dmabuf

2022-06-15 Thread Jonathan Gray
As mentioned earlier, you should send these patches to the linux maintainers. We don't even build this file. On Wed, Jun 15, 2022 at 11:29:31AM +0800, Xiaohui Zhang wrote: > amdgpu_amdkfd_gpuvm_free_memory_of_gpu drop dmabuf reference increased in > amdgpu_gem_prime_export. > amdgpu_bo_destroy dr

Re: pcidevs update for AMD Sensor Fusion Hub

2022-05-05 Thread Jonathan Gray
On Thu, May 05, 2022 at 12:34:33PM +0200, Frederic Cambus wrote: > On Thu, May 05, 2022 at 08:04:16PM +1000, Jonathan Gray wrote: > > On Thu, May 05, 2022 at 11:26:23AM +0200, Frederic Cambus wrote: > > > Hi tech@, > > > > > > Here is a diff to add ID for t

Re: pcidevs update for AMD Sensor Fusion Hub

2022-05-05 Thread Jonathan Gray
On Thu, May 05, 2022 at 11:26:23AM +0200, Frederic Cambus wrote: > Hi tech@, > > Here is a diff to add ID for the AMD Sensor Fusion Hub found on my > Ryzen-based ZBOX CA621. Full dmesg below. > > Comments? OK? Can the string instead be "17h/1xh SFH"? > > Index: sys/dev/pci/pcidevs > ==

Re: Potential NULL dereference id_entry

2022-04-30 Thread Jonathan Gray
On Sat, Apr 30, 2022 at 07:54:12PM -0600, Ted Bullock wrote: > in radeondrm_attach_kms:508 could potentially fail and result in a NULL > dereference at line 510. Check this with KASSERT(). This can not happen. drm_pciprobe() uses drm_find_description() if it returned NULL the driver would not mat

Re: xenodm and login_fbtab

2022-04-20 Thread Jonathan Gray
On Wed, Apr 20, 2022 at 05:17:58PM -0500, joshua stein wrote: > xenodm supports login_fbtab(3) to chown devices but it currently > doesn't do anything because /etc/fbtab does not list /dev/ttyC4. It > uses the GiveConsole and TakeConsole scripts in /etc/X11/xenodm/ to > do this manually, but th

Re: amd64: do CPU identification before TSC sync test

2022-03-28 Thread Jonathan Gray
On Mon, Mar 28, 2022 at 10:52:09PM -0500, Scott Cheloha wrote: > I want to use the IA32_TSC_ADJUST MSR where available when testing TSC > synchronization. We note if it's available during CPU identification. > > Can we do CPU identification earlier in cpu_hatch() and > cpu_start_secondary(), befo

Re: riscv64: simplify

2022-03-21 Thread Jonathan Gray
On Mon, Mar 21, 2022 at 07:51:25PM +, Miod Vallat wrote: > The riscv64 was likely copied from an architecture > providing optimized byte-swapping code (I'd bet arm64), but doesn't have > any such optimization, and copies the MI code. > > Acknowledge this by dropping the __HAVE_MD_SWAP define

Re: riscv64: faster setregs()

2022-03-21 Thread Jonathan Gray
On Mon, Mar 21, 2022 at 08:00:56PM +, Miod Vallat wrote: > The current state of the kernel starts userland processes with register > a0 pointing to the stack, with a comment mentioning this is copied from > FreeBSD. > > But while FreeBSD userland startup code (lib/csu) depends on this, > OpenB

Re: riscv64: minor tweaks to sig_machdep.c

2022-03-21 Thread Jonathan Gray
On Mon, Mar 21, 2022 at 08:24:05PM +, Miod Vallat wrote: > Two simple changes here: > - dumpframe() is not used by anything. I opted to remove it, but it > could be wrapped in #if 0 or #ifdef DEBUG if people want to keep it > around. > - the /* NOTREACHED */ comment in sendsig() is obviousl

Re: riscv64: fix kernel longjmp

2022-03-21 Thread Jonathan Gray
On Mon, Mar 21, 2022 at 08:03:40PM +, Miod Vallat wrote: > Unlike userland, the OpenBSD kernel longjmp() function does not take a > return value for setjmp as second argument, but is guaranteed to return > nonzero. > > The following diff makes sure the code matches this expectation. > > Compl

Re: sdmmc: simplify devlist2h

2022-03-17 Thread Jonathan Gray
On Thu, Mar 17, 2022 at 08:03:20AM +, Miod Vallat wrote: > sys/dev/sdmmc/devlist2h.awk was based upon sys/dev/pcmcia/devlist2h.awk. > The latter contains code to define optional CIS tuple overrides, which > are not used in sdmmc - there is only one override and it is applied in > sdmmc_check_ci

Re: bwfm@sdmmc: use symbolic constants for matching

2022-03-17 Thread Jonathan Gray
On Thu, Mar 17, 2022 at 08:05:38AM +, Miod Vallat wrote: > The following diff declares the various devices bwfm@sdmmc checks for, > and introduces no functional change. > > Index: if_bwfm_sdio.c > === > RCS file: /OpenBSD/src/sys/

Re: add -k / --keep for gzip(1)

2022-03-03 Thread Jonathan Gray
On Thu, Mar 03, 2022 at 01:13:16PM +0100, Solene Rapenne wrote: > The following diff adds support for -k flag to keep the input file for > gzip / compress when compressing, and the input file (the compressed > one) for gunzip / uncompress what case is not covered by -c > file ? > > This will imp

Re: Multiple issues with radeondrm startup code

2022-02-13 Thread Jonathan Gray
On Mon, Feb 14, 2022 at 12:05:44AM -0700, Ted Bullock wrote: > > On 2022-02-13 11:02 p.m., Jonathan Gray wrote: > > On Sun, Feb 13, 2022 at 12:22:38PM -0700, Ted Bullock wrote: > > > On 2022-02-12 6:46 p.m., Jonathan Gray wrote: > > > > I will review f

Re: Multiple issues with radeondrm startup code

2022-02-13 Thread Jonathan Gray
On Sun, Feb 13, 2022 at 12:22:38PM -0700, Ted Bullock wrote: > On 2022-02-12 6:46 p.m., Jonathan Gray wrote: > > I will review further when you drop the function. > > Alright try this again, I have committed some parts of this, with one commit per specific issue. pa_memex NU

Re: mvpcie(4): fix panic if "reset-gpios" is not available

2022-02-13 Thread Jonathan Gray
On Sun, Feb 13, 2022 at 03:17:27PM +0100, Theo Buehler wrote: > On Sun, Feb 13, 2022 at 02:30:21PM +0100, Tobias Heider wrote: > > OF_getproplen() will return -1 if "reset-gpios" is not found which > > currently causes a panic: > > > > panic: malloc: allocation too large, type = 2, size = 42949672

Re: Import seq(1) from FreeBSD

2022-02-13 Thread Jonathan Gray
On Sun, Feb 13, 2022 at 12:07:31PM -0800, Greg Steuck wrote: > Ingo Schwarze writes: > > > Hi Todd, > > > > in view of your arguments and sthen@'s OK, i'm also OK with this > > going in. I think a bit of code cleanup and copy editing in the > > manual page may be useful afterwards, but that can

Re: mvpcie(4): fix panic if "reset-gpios" is not available

2022-02-13 Thread Jonathan Gray
On Mon, Feb 14, 2022 at 01:31:57AM +1100, Jonathan Gray wrote: > On Sun, Feb 13, 2022 at 03:17:27PM +0100, Theo Buehler wrote: > > On Sun, Feb 13, 2022 at 02:30:21PM +0100, Tobias Heider wrote: > > > OF_getproplen() will return -1 if "reset-gpios" is not found which &g

Re: mvpcie(4): fix panic if "reset-gpios" is not available

2022-02-13 Thread Jonathan Gray
On Sun, Feb 13, 2022 at 03:17:27PM +0100, Theo Buehler wrote: > On Sun, Feb 13, 2022 at 02:30:21PM +0100, Tobias Heider wrote: > > OF_getproplen() will return -1 if "reset-gpios" is not found which > > currently causes a panic: > > > > panic: malloc: allocation too large, type = 2, size = 42949672

Re: Multiple issues with radeondrm startup code

2022-02-12 Thread Jonathan Gray
On Sat, Feb 12, 2022 at 02:42:16PM -0700, Ted Bullock wrote: > On 2022-02-11 7:16 p.m., Jonathan Gray wrote: > > I'm not so keen on another function and putting bar information into > > local arrays seems odd. > > Are there technical reasons for not wanting a function

Re: Multiple issues with radeondrm startup code

2022-02-11 Thread Jonathan Gray
On Fri, Feb 11, 2022 at 06:42:11PM -0700, Ted Bullock wrote: > Hey, > > I've found some problems with the radeondrm initialization > codepath (radeon_kms.c). Before I start, I should mention that I am > working on some diffs to remove a bunch of the sparc64 MD ifdef's as > well. In radeondrm_attac

Re: Adding POSIX c99 compiler wrapper script

2022-02-11 Thread Jonathan Gray
On Fri, Feb 11, 2022 at 04:13:22PM -0600, Joe Nelson wrote: > > I noticed that OpenBSD lacks the POSIX "c99" compiler wrapper. > https://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html "[CD] C-Language Development Utilities  The functionality described is optional." I don't see the

Re: explicit_bzero vs ASAN on linux

2022-02-09 Thread Jonathan Gray
On Wed, Feb 09, 2022 at 09:09:35AM +0100, Theo Buehler wrote: > In libressl-portable we run the explicit_bzero tests as part of the > builds. If we enable ASAN on linux, this test segfaults in > __interceptor_memmem() in the two test_with{,out}_bzero() functions, > presumably because the sigaltstac

Re: Use km_alloc(9) in drm

2022-02-06 Thread Jonathan Gray
On Sat, Feb 05, 2022 at 02:26:48PM +0100, Mark Kettenis wrote: > > Date: Sat, 5 Feb 2022 22:34:10 +1100 > > From: Jonathan Gray > > > > On Sat, Feb 05, 2022 at 11:44:03AM +0100, Mark Kettenis wrote: > > > We want to get rid of the uvm_km_valloc() interfaces in

drop please from manual pages

2022-02-05 Thread Jonathan Gray
drop please from manual pages excluding third party parts of tree suggested by multiple documentation style guides diff --git lib/libc/stdlib/atexit.3 lib/libc/stdlib/atexit.3 index a95a45b92e4..891641489e3 100644 --- lib/libc/stdlib/atexit.3 +++ lib/libc/stdlib/atexit.3 @@ -68,7 +68,7 @@ that mat

Re: Use km_alloc(9) in drm

2022-02-05 Thread Jonathan Gray
On Sat, Feb 05, 2022 at 11:44:03AM +0100, Mark Kettenis wrote: > We want to get rid of the uvm_km_valloc() interfaces in favour of > km_alloc(). This changes the calls in drm(4) over. The kv_physwait > struct is made static to prevent collission with a symbol in > vm_machdep.c on some architectur

Re: Fix a bug in sfcc_cache_wbinv_range()

2022-01-15 Thread Jonathan Gray
On Sat, Jan 15, 2022 at 12:21:59PM +, Visa Hankala wrote: > If the ending address in sfcc_cache_wbinv_range(), pa + len, is not > cache-line-aligned, the function spins because len wraps around. > The following patch fixes this. > > There still is a subtle detail. If len is zero but pa is non-

fix some spelling mistakes in sys/*fs

2022-01-10 Thread Jonathan Gray
diff --git sys/isofs/cd9660/cd9660_lookup.c sys/isofs/cd9660/cd9660_lookup.c index 3b56a930349..19f2773600e 100644 --- sys/isofs/cd9660/cd9660_lookup.c +++ sys/isofs/cd9660/cd9660_lookup.c @@ -133,7 +133,7 @@ cd9660_lookup(void *v) lockparent = flags & LOCKPARENT; /* -

Re: fix some spelling mistakes in sys/dev

2022-01-08 Thread Jonathan Gray
On Sat, Jan 08, 2022 at 09:59:10AM +, Jason McIntyre wrote: > On Sat, Jan 08, 2022 at 02:38:05PM +1100, Jonathan Gray wrote: > > dwc2, drm and microcode purposefully excluded > > > > morning. > > no need for breakfast after reading this one! > > the spellin

remove unused make defines

2022-01-03 Thread Jonathan Gray
DEFMAXLOCAL unused since 2007 'kill local/jobs distinction. Correctly this time...' https://github.com/openbsd/src/commit/f01cd4cc8e1908cec38b82298fe3fc96c7421321 RANLIBMAG unused since 2012 'more changes, discussed and tested by various people' https://github.com/openbsd/src/commit/1bae8e1fd6d145

Re: remove references to prism54.org

2022-01-03 Thread Jonathan Gray
On Mon, Jan 03, 2022 at 11:37:41AM +0100, Stefan Sperling wrote: > On Mon, Jan 03, 2022 at 12:20:37PM +1100, Jonathan Gray wrote: > > the prism54.org domain is long abandoned > > don't give any traffic to whoever registered it afterwards > > > > ok stsp@ > &g

fix aac(4) build

2022-01-03 Thread Jonathan Gray
or perhaps we just remove aac entirely? /sys/dev/ic/aac.c:1282:6: error: variable 'error' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (sc->total_fibs == 0) ^~~ Index: aac.c ==

remove references to prism54.org

2022-01-02 Thread Jonathan Gray
the prism54.org domain is long abandoned don't give any traffic to whoever registered it afterwards Index: share/man/man4/upgt.4 === RCS file: /cvs/src/share/man/man4/upgt.4,v retrieving revision 1.29 diff -u -p -r1.29 upgt.4 --- shar

fix some spelling mistakes in sys/net*

2022-01-02 Thread Jonathan Gray
diff --git sys/net/fq_codel.c sys/net/fq_codel.c index e5d103cdf57..e614f4c56a7 100644 --- sys/net/fq_codel.c +++ sys/net/fq_codel.c @@ -188,7 +188,7 @@ static const int64_t codel_target = 500; /* Grace period after last drop, 16 100ms intervals */ static const int64_t codel_grace = 16000

Re: syzkaller vnd ioctl unlock

2021-12-22 Thread Jonathan Gray
On Wed, Dec 22, 2021 at 11:56:38PM +0100, Alexander Bluhm wrote: > Hi, > > syzkaller found a missing unlock in vnd ioctl error path. > > https://syzkaller.appspot.com/bug?id=b35a411a91f835fffb793df63aa8bcd7be99ad87 > > ok? ok jsg@ > > bluhm > > Index: dev/vnd.c >

Re: dev/videomode/vesagtf.c: -Werror,-Wunused-but-set-variable fix

2021-12-19 Thread Jonathan Gray
On Sun, Dec 19, 2021 at 08:56:41PM +0900, SASANO Takayoshi wrote: > Hi, > > recently, using -Werror,-Wunused-but-set-variable option makes compile error. > at least vesagtf.c needs fix but some (many?) other codes need do so. clang kernels are built with -Wno-unused-but-set-variable try running '

Re: syzkaller nd6_dad_duplicated

2021-12-12 Thread Jonathan Gray
On Sun, Dec 12, 2021 at 11:57:54PM +0100, Alexander Bluhm wrote: > Hi, > > Syskaller has found a NULL deref in nd6_dad_duplicated(). > > https://syzkaller.appspot.com/bug?id=f2ee1cc75911fa580176b09e7c1ab9d867590994 > > The code in nd6_dad_ns_input() looks fishy. It checks dp in two > of three p

Re: Handle multi-port CP2108 devices in uslcom(4)

2021-12-12 Thread Jonathan Gray
On Sun, Dec 12, 2021 at 03:18:21PM +, Visa Hankala wrote: > Silicon Labs CP2108 USB device can implement up to four COM ports. Each > port appears as a separate USB virtual COM interface under the device. > > Currently, uslcom(4) always uses the device's first interface, which is > wrong when

Re: uvn_reference(): correct printf() argument order

2021-12-06 Thread Jonathan Gray
On Mon, Dec 06, 2021 at 08:46:57PM -0600, Scott Cheloha wrote: > The arguments to printf() here are backwards. > > ok? ok jsg@ > > Index: uvm_vnode.c > === > RCS file: /cvs/src/sys/uvm/uvm_vnode.c,v > retrieving revision 1.119 > di

Re: em(4) vlan tagging support for 82576

2021-12-06 Thread Jonathan Gray
On Mon, Dec 06, 2021 at 10:07:47AM +, Stuart Henderson wrote: > On 2021/12/05 19:22, Yury Shefer wrote: > > Hi all, > > > > I have quad-port Intel ET2 NIC based on 82576[1] controller. The manual > > says that hardware VLAN tagging should be supported but ifconfig output > > shows VLAN_MTU onl

Re: Xserver 21.1 mode selection fixes

2021-12-05 Thread Jonathan Gray
On Sun, Dec 05, 2021 at 10:28:53PM +0100, Matthieu Herrb wrote: > Hi, > > steven@ reported that, using xf68-video-nv X server 21.1 is dumping > core on startup. > > The following patch fixes it. While here I also fixed another bug on > drivers that don't intialize a private structure. > > If yo

Re: Stop building the kernel with -Wno-uninitialized on clang archs

2021-11-26 Thread Jonathan Gray
On Fri, Nov 26, 2021 at 05:41:20PM +0100, Jan Stary wrote: > > > Stop building the kernel with -Wno-uninitialized on clang archs. > > > This hides real problems like the recently fixed uninitialised memory > > > use in pf and igc. > > > > > > [-Wsometimes-uninitialized] /sys/arch/arm/arm/cpu.c:352

Re: [External] : Stop building the kernel with -Wno-uninitialized on clang archs

2021-11-26 Thread Jonathan Gray
On Fri, Nov 26, 2021 at 12:04:21PM +0100, Alexandr Nedvedicky wrote: > Hello, > > On Fri, Nov 26, 2021 at 04:32:59PM +1100, Jonathan Gray wrote: > > Stop building the kernel with -Wno-uninitialized on clang archs. > > This hides real problems like the recently fixed uniniti

Stop building the kernel with -Wno-uninitialized on clang archs

2021-11-25 Thread Jonathan Gray
Stop building the kernel with -Wno-uninitialized on clang archs. This hides real problems like the recently fixed uninitialised memory use in pf and igc. After visa's recent commit the remaining warnings are [-Wsometimes-uninitialized] /sys/arch/arm/arm/cpu.c:352:6: warning: variable 'ci' is use

Re: ifconfig: zap dead code

2021-11-03 Thread Jonathan Gray
On Tue, Nov 02, 2021 at 11:47:33PM +, Klemens Nanni wrote: > No idea what it was supposed to do back then; cvs blame points at > > revision 1.19 > date: 1998/09/03 06:24:18; author: jason; state: Exp; lines: +502 > -38; > o OpenBSD gets if_media support (from NetBSD) >

Re: Stop mentioning ld(1) warning messages in mktemp.3 and tmpnam.3

2021-10-24 Thread Jonathan Gray
On Sun, Oct 24, 2021 at 02:27:55PM +0200, Frederic Cambus wrote: > Hi tech@, > > This diff removes mentions of ld warning messages for mktemp(3), > tmpnam(3), and tempnam(3). > > LLD doesn't emit warnings when encountering .gnu.warning.* sections, so > those warnings are not emitted anymore for a

Re: use NULL instead of 0 for pointers in sys/net

2021-10-23 Thread Jonathan Gray
t; > Thanks > -- > Sebastien Marie > > > > On Sun, Oct 24, 2021 at 12:14:22PM +1100, Jonathan Gray wrote: > > diff --git sys/net/bpf.c sys/net/bpf.c > > index 87a9d726423..87418c3dc17 100644 > > --- sys/net/bpf.c > > +++ sys/net/bpf.c > &

libc ansi

2021-10-23 Thread Jonathan Gray
Index: db/btree/bt_close.c === RCS file: /cvs/src/lib/libc/db/btree/bt_close.c,v retrieving revision 1.10 diff -u -p -r1.10 bt_close.c --- db/btree/bt_close.c 16 Jan 2015 16:48:51 - 1.10 +++ db/btree/bt_close.c 24 Oct 2021 03:

use NULL instead of 0 for pointers in sys/{crypto,nfs,scsi,uvm}

2021-10-23 Thread Jonathan Gray
excluding sys/crypto/xform_ipcomp.c:76:23 as zlib has Z_NULL as 0 diff --git sys/crypto/cryptosoft.c sys/crypto/cryptosoft.c index dcb815aaa17..be1f3f1ec5c 100644 --- sys/crypto/cryptosoft.c +++ sys/crypto/cryptosoft.c @@ -424,7 +424,7 @@ swcr_authcompute(struct cryptop *crp, struct cryptodesc *c

use NULL instead of 0 for pointers in sys/ddb

2021-10-23 Thread Jonathan Gray
diff --git sys/ddb/db_break.c sys/ddb/db_break.c index dfe2f3af912..85354e32987 100644 --- sys/ddb/db_break.c +++ sys/ddb/db_break.c @@ -46,8 +46,8 @@ #defineNBREAKPOINTS100 struct db_breakpoint db_break_table[NBREAKPOINTS]; db_breakpoint_tdb_next_free_breakpoint =

use NULL instead of 0 for pointers in sys/netinet*

2021-10-23 Thread Jonathan Gray
diff --git sys/netinet/in_pcb.c sys/netinet/in_pcb.c index cd60f66b50a..d3b6e4a1015 100644 --- sys/netinet/in_pcb.c +++ sys/netinet/in_pcb.c @@ -756,7 +756,7 @@ in_rtchange(struct inpcb *inp, int errno) { if (inp->inp_route.ro_rt) { rtfree(inp->inp_route.ro_rt); -

use NULL instead of 0 for pointers in sys/net

2021-10-23 Thread Jonathan Gray
diff --git sys/net/bpf.c sys/net/bpf.c index 87a9d726423..87418c3dc17 100644 --- sys/net/bpf.c +++ sys/net/bpf.c @@ -1019,7 +1019,7 @@ bpf_setf(struct bpf_d *d, struct bpf_program *fp, int wf) KERNEL_ASSERT_LOCKED(); - if (fp->bf_insns == 0) { + if (fp->bf_insns == NULL) {

Re: pcidevs: intel gemini lake mei

2021-10-21 Thread Jonathan Gray
On Thu, Oct 21, 2021 at 11:17:56PM +0200, Felix Kronlage-Dammers wrote: > hi, > > found this mei pci device id in a gemini lake based shuttle pc. thanks, committed

Re: patch: nullify v_data with NULL (and not with 0)

2021-10-19 Thread Jonathan Gray
On Tue, Oct 19, 2021 at 07:37:36AM -0600, Todd C. Miller wrote: > On Tue, 19 Oct 2021 18:08:04 +1100, Jonathan Gray wrote: > > > There are many others along those lines in the kernel, for example > > sparse complains about these in vfs_subr.c > > > > /sys/kern/vfs

Re: patch: nullify v_data with NULL (and not with 0)

2021-10-19 Thread Jonathan Gray
On Tue, Oct 19, 2021 at 08:32:57AM +0200, Sebastien Marie wrote: > Hi, > > Simple online diff for properly nullify v_data (which is `void *`) > with NULL instead of 0. > > Comments or OK ? > -- > Sebastien Marie > There are many others along those lines in the kernel, for example sparse compla

Re: [diff] usr.sbin/smtpd add missing includes

2021-10-17 Thread Jonathan Gray
On Sun, Oct 17, 2021 at 04:23:50PM +0200, Philipp wrote: > Hello > > I'm currently working on getting OpenSMTPD-portable build. During this > I found some missing includes. It would help if you could describe the platform you are building on and show the compile errors. > > diff --git a/usr.sbi

Re: missing newlines in est.c printfs

2021-08-11 Thread Jonathan Gray
On Thu, Aug 12, 2021 at 07:47:36AM +0200, Theo Buehler wrote: > On Thu, Aug 12, 2021 at 03:01:37PM +1000, Jonathan Gray wrote: > > On Thu, Aug 12, 2021 at 06:44:51AM +0200, Theo Buehler wrote: > > > There doesn't seem to be a good reason for omitting the newlines here. >

Re: missing newlines in est.c printfs

2021-08-11 Thread Jonathan Gray
On Thu, Aug 12, 2021 at 06:44:51AM +0200, Theo Buehler wrote: > There doesn't seem to be a good reason for omitting the newlines here. > If those are ever hit, it will look odd. Am I missing something? See the i386 p3_get_bus_clock() which is where this came from. i386 prints the msr value and a n

remove efibind.h cruft

2021-07-26 Thread Jonathan Gray
Follow what was done with riscv64 and replace efibind.h with just the defines we need. Tested on armv7 arm64 and amd64 (bootx64). Index: sys/stand/efi/include/amd64/efibind.h === RCS file: /cvs/src/sys/stand/efi/include/amd64/efibind

Re: iwm(4): enable on riscv64

2021-07-24 Thread Jonathan Gray
On Fri, Jul 23, 2021 at 04:36:57PM -0400, Ashton Fagg wrote: > The following diffs adds iwm(4) to the riscv64 kernel config. > > I tested this with the following device: > > iwm0 at pci5 dev 0 function 0 "Intel Dual Band Wireless-AC 9260" rev 0x29, > intx > > icarus$ ifconfig iwm0 > iwm0: flags

Re: ix(4)/riscv64: Make ix(4) work when MSI-X interrupts aren't available

2021-07-24 Thread Jonathan Gray
On Thu, Jul 22, 2021 at 09:04:29PM -0400, Ashton Fagg wrote: > Jonathan Matthew writes: > > > Yes, on second look that makes sense. Here's a better diff with that > > change, and that also doesn't break arches without __HAVE_PCI_MSIX. > > ok? > > Jonathan/Mark, > > Thank you for your help here

Re: sleep.3: miscellaneous cleanup and rewrites

2021-07-24 Thread Jonathan Gray
On Sat, Jul 24, 2021 at 10:39:49PM -0500, Scott Cheloha wrote: > Okay, the nanosleep.2 changes are committed, let's do sleep.3 next. > > Here's a changelist by section. I have some questions in there at end > of sections where I'm unsure about something. > > NAME > > - This is clunky. Tighten

update xf86-video-amdgpu to latest git

2021-07-08 Thread Jonathan Gray
The latest xf86-video-amdgpu release was in 2019. xf86-video-amdgpu-19.1.0..origin/master minus commits we already have cb27a5b Handle NULL fb_ptr in pixmap_get_fb e2cd67a Bail from amdgpu_pixmap_get_handle with ShadowFB edcbe5f Fix link failure with gcc 10 With a X_PRIVSEP path added to amdgpu_

Re: arm9 support?

2021-06-30 Thread Jonathan Gray
On Tue, Jun 29, 2021 at 10:38:33PM -0700, pion wrote: > I’m interested in porting OpenBSD to the Nuvoton NUC980, which uses an > ARM926EJ-S core. I discovered that arm9 support was removed in 2016 and found > the relevant patches in tech@. It seems that the rationale was that arm8/9 > platforms

<    1   2   3   4   5   6   7   8   9   >