Re: Unhibernation broken with boot.conf

2021-09-09 Thread hagen
> The hibernate check does: > > bootdev_has_hibernate(void) > { > return ((bootdev_dip->bios_info.flags & BDI_HIBVALID)? 1 : 0); > > > Someone could have a boot.conf that changes their default disk because > they want to boot from a non-standard disk. Hibernate store will occur > to

Re: Unhibernation broken with boot.conf

2021-09-09 Thread lists
Fri, 10 Sep 2021 01:19:23 + ha...@sdf.org > > The hibernate check does: > > > > bootdev_has_hibernate(void) > > { > > return ((bootdev_dip->bios_info.flags & BDI_HIBVALID)? 1 : 0); > > > > > > Someone could have a boot.conf that changes their default disk because > > they want to

Unhibernation broken with boot.conf

2021-09-09 Thread hagen
Hello tech@, Currently unhibernating doesn't work with this configuration: # echo "boot" > /etc/boot.conf The original kernel is booted instead of the hibernated one. This was fixed a few years ago for sysupgrade's /bsd.upgrade kernel but unhibernation was overlooked at the time. Before:

Diff: Function Length Reduction

2021-09-09 Thread VARIK VALEFOR
Sir or Madam: The attached diff significantly decreases the length of a function... and potentially increases the readability of this function. Don't stop skankin', Varik "NOT A COMPUTER PROGRAMMER!!!" Valefor diff --git a/usr.bin/vi/vi/v_put.c b/usr.bin/vi/vi/v_put.c index

Re: Unhibernation broken with boot.conf

2021-09-09 Thread Theo de Raadt
The hibernate check does: bootdev_has_hibernate(void) { return ((bootdev_dip->bios_info.flags & BDI_HIBVALID)? 1 : 0); Someone could have a boot.conf that changes their default disk because they want to boot from a non-standard disk. Hibernate store will occur to swap on the

Re: Unhibernation broken with boot.conf

2021-09-09 Thread Theo de Raadt
that is a demo. It breaks hibernate. Lots of things in boot.conf could break hibernate. Why is that so surprising? You haven't explained why you need to use boot.conf But furthermore, you want to skip boot.conf parsing entirely, in the hibernate case. I believe you have ignored the potential

Re: Unhibernation broken with boot.conf

2021-09-09 Thread Theo de Raadt
Disagree. There is no justification for what you have in /etc/boot.conf ha...@sdf.org wrote: > Hello tech@, > > Currently unhibernating doesn't work with this configuration: > > # echo "boot" > /etc/boot.conf > > The original kernel is booted instead of the hibernated one. > This was fixed a

Re: iwx(4) firmware memory fixes

2021-09-09 Thread Mike Larkin
On Wed, Sep 08, 2021 at 02:08:36PM +0200, Stefan Sperling wrote: > Add a missing call to iwx_ctxt_info_free_fw_img() in an error path > of iwx_ctxt_info_init() which should always free on error. > > Also, free firmware paging DMA memory in case loading firmware has failed. > If we don't free

Re: let iwx(4) resume in the acpi thread

2021-09-09 Thread Mike Larkin
On Wed, Sep 08, 2021 at 03:25:20PM +0200, Stefan Sperling wrote: > On Wed, Sep 08, 2021 at 02:19:00PM +0200, Stefan Sperling wrote: > > This patch applies on top of all the other iwx(4) diffs I've sent today. > > It makes iwx(4) initialize the device completely in the acpi thread. > > > > We now

libagentx(3): Don't deallocate dynamic indices

2021-09-09 Thread Martijn van Duren
When calling agentx_index_start we short-circuit the call to the agentx master when the index is dynamic. This is in accordance with the RFC. At the moment we don't do the same thing when calling agentx_index_close. Diff below addresses this. Largest part is a reindent of

Re: Change vm_dsize to vsize_t

2021-09-09 Thread Theo de Raadt
Stuart Henderson wrote: > On 2021/09/09 06:47, Greg Steuck wrote: > > Mark Kettenis writes: > > > > >> From: "Theo de Raadt" > > >> Date: Tue, 07 Sep 2021 07:08:19 -0600 > > >> > > >> Or we could coordinate the Greg approach as a sysctl ABI change near a > > >> libc major bump. On the other

Re: Change vm_dsize to vsize_t

2021-09-09 Thread Stuart Henderson
On 2021/09/09 06:47, Greg Steuck wrote: > Mark Kettenis writes: > > >> From: "Theo de Raadt" > >> Date: Tue, 07 Sep 2021 07:08:19 -0600 > >> > >> Or we could coordinate the Greg approach as a sysctl ABI change near a > >> libc major bump. On the other side of such a bump, all kernel + base +

OpenBSD's experience with writing secure c/c++ code.

2021-09-09 Thread el3ctr0lyte
Dear OpenBSD developers. I am just a hobbyist programmer looking at the programming landscape. I value safety and security in software and i admire and appreciate the OpenBSD project. Out of interest i am look at learning a new programming language, specifically a systems programming language.

Re: wakeup_n() w/o DIAGNOSTIC fix

2021-09-09 Thread Mark Kettenis
> Date: Thu, 9 Sep 2021 17:03:54 +0200 > From: Martin Pieuchot > > The check to avoid a panic for contented rwlock(9) should be outside of > #ifdef DIAGNOSTIC. > > ok? ok kettenis@ > Index: kern//kern_synch.c > === > RCS file:

Re: rpki-client add back keep-alive to http requests

2021-09-09 Thread Bob Beck
ok beck@ On Thu, Sep 09, 2021 at 09:35:51AM +0200, Claudio Jeker wrote: > While Connection: keep-alive should be the default it seems that at least > some of the CA repositories fail to behave like that. Adding back the > Connection header seems to fix this and delta downloads go faster again.

Re: Turn SCHED_LOCK() into a mutex

2021-09-09 Thread Bob Beck
> > This work has been started by art@ more than a decade ago and I'm > > willing to finish it This is possibly one of the scariest things you can say in OpenBSD. I am now calling my doctor to get a giant bag of flintstones chewable zoloft prescribed to me just so I can recover from seeing

avoid sched lock recursion in sleep_signal_check()

2021-09-09 Thread Patrick Wildt
Hi, one step to (at some point) change the sched lock to a mutex is to start avoiding recursion on the sched lock. single_thread_check() always takes the sched lock. If we want to avoid recursion, we need to call the locked version and take the sched lock ourselves if we need to. Another

wakeup_n() w/o DIAGNOSTIC fix

2021-09-09 Thread Martin Pieuchot
The check to avoid a panic for contented rwlock(9) should be outside of #ifdef DIAGNOSTIC. ok? Index: kern//kern_synch.c === RCS file: /cvs/src/sys/kern/kern_synch.c,v retrieving revision 1.177 diff -u -p -r1.177 kern_synch.c ---

Re: [please test] amd64: schedule clock interrupts against system clock

2021-09-09 Thread Patrick Wildt
Am Thu, Sep 09, 2021 at 04:10:31PM +0200 schrieb Mark Kettenis: > > Date: Mon, 6 Sep 2021 21:43:29 +0200 > > From: Patrick Wildt > > > > Am Fri, Jul 30, 2021 at 07:55:29PM +0200 schrieb Alexander Bluhm: > > > On Mon, Jul 26, 2021 at 08:12:39AM -0500, Scott Cheloha wrote: > > > > On Fri, Jun 25,

Re: [please test] amd64: schedule clock interrupts against system clock

2021-09-09 Thread Mark Kettenis
> Date: Mon, 6 Sep 2021 21:43:29 +0200 > From: Patrick Wildt > > Am Fri, Jul 30, 2021 at 07:55:29PM +0200 schrieb Alexander Bluhm: > > On Mon, Jul 26, 2021 at 08:12:39AM -0500, Scott Cheloha wrote: > > > On Fri, Jun 25, 2021 at 06:09:27PM -0500, Scott Cheloha wrote: > > > 1 month bump. I really

Re: Change vm_dsize to vsize_t

2021-09-09 Thread Greg Steuck
Mark Kettenis writes: >> From: "Theo de Raadt" >> Date: Tue, 07 Sep 2021 07:08:19 -0600 >> >> Or we could coordinate the Greg approach as a sysctl ABI change near a >> libc major bump. On the other side of such a bump, all kernel + base + >> packages are updated to use the new storage ABI.

Re: mutex(9): initialize some more mutexes before use?

2021-09-09 Thread Mark Kettenis
> Date: Thu, 9 Sep 2021 15:17:25 +0200 > From: Patrick Wildt > > Am Thu, Sep 09, 2021 at 12:55:13PM +0200 schrieb Mark Kettenis: > > > Date: Wed, 8 Sep 2021 10:45:53 +0200 > > > From: Martin Pieuchot > > > > > > On 07/09/21(Tue) 14:19, Patrick Wildt wrote: > > > > Hi, > > > > > > > > I was

Re: rpki-client compare oid with OBJ_cmp

2021-09-09 Thread Theo Buehler
On Thu, Sep 09, 2021 at 02:51:24PM +0200, Claudio Jeker wrote: > Trying to remove work that is done over and over again. > One of those checks are the various OID compares. > Instead of converting the ASN1_OBJECT into a string and comparing the > strings, convert the string into an ASN1_OBJECT

Re: riscv64: icache flush using sysarch(2)

2021-09-09 Thread Mark Kettenis
> From: Jeremie Courreges-Anglas > Date: Sun, 05 Sep 2021 21:41:35 +0200 > > On Sat, Sep 04 2021, Jeremie Courreges-Anglas wrote: > > The first problem I was able to diagnose using egdb on riscv was > > lang/python/2.7 using libffi and aborting in libcompiler-rt (the > > compilerrt_abort() call

Re: Turn SCHED_LOCK() into a mutex

2021-09-09 Thread Patrick Wildt
Am Wed, Nov 04, 2020 at 09:13:22AM -0300 schrieb Martin Pieuchot: > Diff below removes the recursive attribute of the SCHED_LOCK() by > turning it into a IPL_NONE mutex. I'm not intending to commit it > yet as it raises multiple questions, see below. > > This work has been started by art@ more

Re: mutex(9): initialize some more mutexes before use?

2021-09-09 Thread Patrick Wildt
Am Thu, Sep 09, 2021 at 12:55:13PM +0200 schrieb Mark Kettenis: > > Date: Wed, 8 Sep 2021 10:45:53 +0200 > > From: Martin Pieuchot > > > > On 07/09/21(Tue) 14:19, Patrick Wildt wrote: > > > Hi, > > > > > > I was playing around a little with the mutex code and found that on > > > arm64 there

rpki-client compare oid with OBJ_cmp

2021-09-09 Thread Claudio Jeker
Trying to remove work that is done over and over again. One of those checks are the various OID compares. Instead of converting the ASN1_OBJECT into a string and comparing the strings, convert the string into an ASN1_OBJECT once and then compare these objects with OBJ_cmp(). Any comments about

Re: mutex(9): initialize some more mutexes before use?

2021-09-09 Thread Mark Kettenis
> Date: Wed, 8 Sep 2021 10:45:53 +0200 > From: Martin Pieuchot > > On 07/09/21(Tue) 14:19, Patrick Wildt wrote: > > Hi, > > > > I was playing around a little with the mutex code and found that on > > arm64 there some uninitialized mutexes out there. > > > > I think the arm64 specific one is

rpki-client add back keep-alive to http requests

2021-09-09 Thread Claudio Jeker
While Connection: keep-alive should be the default it seems that at least some of the CA repositories fail to behave like that. Adding back the Connection header seems to fix this and delta downloads go faster again. -- :wq Claudio Index: http.c