OpenBSD/src SEHU9mEusr.sbin/sensorsd sensorsd.c

   Fix a memory leak on configuration reload, and incorrect termination
   when a sensor fails to read.
   From James J. Lippard
   ok tb
VersionDeltaFile
1.70+7-3usr.sbin/sensorsd/sensorsd.c
+7-31 files

OpenBSD/src tnKGQbhsys/arch/sparc64/sparc64 locore.s

   Fix possible reace in ipi_drop_fpstate()

   ipi_drop_fpstate() needs to check if the current fpu context matches the
   expected one sent via IPI. Only after that %fprs should be cleared.
   Use the same asm in ipi_drop_fpstate() as in the start of ipi_save_fpstate().

   Also simplify ipi_drop_fpstate() and clearfpstate() since there is no need
   to enable the FPU before clearing %fprs.

   OK miod@ kettenis@ deraadt@
VersionDeltaFile
1.232+5-11sys/arch/sparc64/sparc64/locore.s
+5-111 files

OpenBSD/src MeNbzfDsys/arch/sparc64/sparc64 trap.c

   Initialize all FPU registers to all 1 (or -NaN) not only the lower 32.

   OK miod@ kettenis@ deraadt@
VersionDeltaFile
1.130+3-1sys/arch/sparc64/sparc64/trap.c
+3-11 files

OpenBSD/src q28bBrLsbin/disklabel disklabel.8

   remove unneeded escape; \0\10GB -> \010GB
VersionDeltaFile
1.159+3-3sbin/disklabel/disklabel.8
+3-31 files

OpenBSD/src v9d8E9pshare/man/man4 wsmouse.4, usr.sbin/fw_update fw_update.8

   remove whitespace at eol
VersionDeltaFile
1.26+3-3share/man/man4/wsmouse.4
1.10+3-3usr.sbin/fw_update/fw_update.8
+6-62 files

OpenBSD/src rAXFaB4sys/arch/amd64/stand/boot boot.8

   add back leading . required for roff comments
VersionDeltaFile
1.38+2-2sys/arch/amd64/stand/boot/boot.8
+2-21 files

OpenBSD/src aaRSyg6lib/libc/gen getpagesize.3

   remove .Bf matching .Ef removed in previous; fixes unintended bold
VersionDeltaFile
1.14+2-3lib/libc/gen/getpagesize.3
+2-31 files

OpenBSD/src Bxv5GGoshare/man/man4/man4.riscv64 smtcomphy.4

   sort SEE ALSO
VersionDeltaFile
1.2+4-4share/man/man4/man4.riscv64/smtcomphy.4
+4-41 files

OpenBSD/src 3Gv0x4cshare/man/man4/man4.riscv64 smtpmic.4

   SNTPMIC -> SMTPMIC
VersionDeltaFile
1.2+3-3share/man/man4/man4.riscv64/smtpmic.4
+3-31 files

OpenBSD/src axKf6qFshare/man/man4 pfsync.4

   The pfsync manual page has no mention about safety of this protocol.
   Furthermore there are no configuration options for "key negotation",
   so we believe everyone knows to run this on a dedicated wire or on L2 inside
   some sort of encryption tunnel (it is the natural way to do it in anycase).
   Books do mention this detail, because books enjoy being more wordy.
   But the AI's can't figure it out, so put in some words to stop future
   AI's from sending us slop.
VersionDeltaFile
1.40+9-2share/man/man4/pfsync.4
+9-21 files

OpenBSD/src DG5zBkssys/net if_pfsync.c if_pfsync.h

   The pfcksum[] field in the pfsync packet header is not a hash of the
   packet.  It provides absolutely no security benefits, keep reading to
   find out.

   According to dlg, during early development this field was hopefully
   going to be a hash related to the ruleset for optimizing state
   match. That approach was abandoned (I guess because ruleset drift
   between firewalls happens too often during normal practice). As is
   usual in protocol development, at least 6 people were already using
   pfsync in production, so for compatibility the field was not
   removed...  and forgotten.  On send, it was left as zero, due to
   the full-header zero initialization code.

   So there is no useful checksum or hash stored in this field called
   'pfcksum[PF_MD5_DIGEST_LENGTH]'.  Actually there isn't a single line
   of code in the entire tree which writes to this array.  Besides the
   field definition in the structure, there is 1 comment elsewhere
   mentioning the field.  So no code at all.  I said no code, which is
   why there is no code checking it on receive, not even checking if it

    [19 lines not shown]
VersionDeltaFile
1.333+2-2sys/net/if_pfsync.c
1.66+2-2sys/net/if_pfsync.h
+4-42 files

OpenBSD/src xiPfDxllib/libc/sys unveil.2, sys/kern kern_unveil.c

   Before it is disabled, unveil allows you to override the settings on
   any vnode.  A block of #if 0 code suggests this might be different.
   That can be deleted.  This also shows one word "other" in the manual
   page is misleading.
   question asked by Stuart Thomas
   ok beck
VersionDeltaFile
1.57+5-24sys/kern/kern_unveil.c
1.24+3-3lib/libc/sys/unveil.2
+8-272 files

OpenBSD/src zbxSCJ0sys/arch/amd64/isa clock.c

   wrap the ; on a single while() line
VersionDeltaFile
1.44+3-2sys/arch/amd64/isa/clock.c
+3-21 files

OpenBSD/src JUA2ws0sys/kern exec_elf.c

   A binary without a PT_LOAD exec segment would later read a pinsyscall table
   and damage it strangely.  Such a binary cannot actually run, but we should
   avoid the internal pinsyscall table damage, and fail the execve with EINVAL.
   reported by Stuart Thomas
   ok guenther
VersionDeltaFile
1.196+3-3sys/kern/exec_elf.c
+3-31 files

OpenBSD/src upLfovpsys/arch/amd64/amd64 vmm_machdep.c

   vmm: Handle reserved bits in debug registers

   vmm(4) handles the %dr6 debug register on VMX on its own. It is not
   part of the VMCB. The AMD and Intel SDMs mention that a 'MOV DRn'
   instruction traps with #GP when any of the upper 32 bits of %dr6/%dr7
   is 1. Userland can set arbitrary values in that register, forcing an
   Intel machine to crash. An initial bogus %dr7 fails to launch the VM
   on both platforms.

   Reject such debug register values an all platforms.

   ok mlarkin@

   Reported-by: syzbot+f386e2f64711877025a6 at syzkaller.appspotmail.com
VersionDeltaFile
1.73+9-1sys/arch/amd64/amd64/vmm_machdep.c
+9-11 files

OpenBSD/src o7QRtXXusr.sbin/rpki-client main.c

   Call repo_check_timeout() before colleting the POLLOUT fds. Since
   repo_abort() called by repo_check_timeout() will add messages to
   be sent out.

   This brings back rev 1.263 which was accidentially reverted by rev 1.293

   OK tb@
VersionDeltaFile
1.305+3-3usr.sbin/rpki-client/main.c
+3-31 files

OpenBSD/src dX4JHNfsys/uvm uvm_pdaemon.c

   When the pagedaemon is triggered to create free memory, there may be
   sleeping pmemrange allocations with multi-page alignment requirements
   which can't be satisfied by the simplistic freeing of (solo) pages
   which the pagedaemon performs.  As we near starvation, fragmentation
   is the main problem.  Our free list could be large enough that the
   pagedaemon sees no reason to do more work, but also too fragmented to
   satisfy a pending allocation request with complex requirements
   (imagine asking for 512K of physically linear memory which is DMA
   reachable).  When the requirement isn't satisfied, the pagedaemon is
   told to try again, but again doesn't mean harder because it has no
   mechanism to try harder.  It's tracking variables do not show the
   fragmentation problem.  It spins a lot.  Often this becomes a
   deadlock.
   Time to change strategy: Overshoot creation of (both) inactive and
   free pages each time through the loop. After inspecting existing
   variables, we generate minumum 128 inactive pages (which may be
   dynamically drawn down asyncronously by accesses), and then try to
   convert minumum 128 inactives into free pages (different pages
   get freed different ways, including via swapcluster which has been

    [7 lines not shown]
VersionDeltaFile
1.156+14-11sys/uvm/uvm_pdaemon.c
+14-111 files

OpenBSD/src jQ5yTjmsys/uvm uvm_swap.c uvm_pdaemon.c

   To support swapencrypt, the swapcluster code has a memory allocation codepath.
   Since this is runs inside the pagedaemon that is unworkable.  We'd like to
   encrypt the pages inplace for IO, but there are architectures not ready for
   a high-mem page to be written to a dma-restricted device (work in progress).
   So for now we need to bounce through dma-reachable memory buffer.  A previous
   attempt had 1 extra bounce buffer, but then slept on allocation inside the
   pagedaemon context which is also unworkable.  This version contains 32
   pre-allocated swapclusters (64K each), and through a counter signals to the
   pagedaemon when it should stop trying to create memory.  32 swap clusters
   is comfortably more than the minimum we expect the pagedaemon frantically
   generate.  This crummy solution is good enough until we the dma reach problem
   is solved (soon)
   ok kettenis kirill (who looked into other solutions) beck
VersionDeltaFile
1.180+61-12sys/uvm/uvm_swap.c
1.155+12-1sys/uvm/uvm_pdaemon.c
1.22+3-1sys/uvm/uvm_swap.h
+76-143 files

OpenBSD/src a8leN0Dsys/arch/riscv64/conf GENERIC RAMDISK

   Actually smtpinctrl(4) should attach early; messed that up when
   transplanting things into a different tree for commit.
VersionDeltaFile
1.63+2-2sys/arch/riscv64/conf/GENERIC
1.55+2-2sys/arch/riscv64/conf/RAMDISK
+4-42 files

OpenBSD/src Yfhy4Lesys/arch/riscv64/conf files.riscv64 RAMDISK, sys/arch/riscv64/dev smtpinctrl.c

   Add smtpinctrl(4), a driver for the pin controller on the SpacemiT K1 SoC.

   ok mlarkin@, jsing@
VersionDeltaFile
1.1+225-0sys/arch/riscv64/dev/smtpinctrl.c
1.37+6-1sys/arch/riscv64/conf/files.riscv64
1.54+2-1sys/arch/riscv64/conf/RAMDISK
1.62+2-1sys/arch/riscv64/conf/GENERIC
+235-34 files

OpenBSD/src KDe7rNEsys/arch/amd64/amd64 acpi_machdep.c

   Apparently we shouldn't touch the RTC immediately after restarting the
   i8254 clock either when coming out of S3 suspend.  So move the code
   that checks whether the RTC alarm went off and clears it all the way to
   the end of acpi_cpu_resume.  This fixes a lockup seen on the x220.

   Figured out by mlarkin@ who write the initial diff; I just tweaked it.

   ok mlarkin@, deraadt@
VersionDeltaFile
1.115+10-11sys/arch/amd64/amd64/acpi_machdep.c
+10-111 files

OpenBSD/src hKS7JACsys/kern vfs_biomem.c

   sys/vfs_biomem: add missed atop() in buf_alloc_pages()

   bufbackoff() operates in pages, but size at this call site was a byte
   count; the old loop therefore asked for far too much backoff and
   compared reclaimed pages against bytes.

   On a low memory machine that made the NOWAIT retry path much less likely
   to succeed, so the code dropped into the WAITOK allocation below and
   slept.

   Using atop() puts the units back in line; backoff can now satisfy the
   intended request, and the subsequent NOWAIT retry again has a realistic
   chance of success. The WAITOK path remains possible, but it should be
   reached less often.

   OK deraadt@, beck@
VersionDeltaFile
1.54+2-2sys/kern/vfs_biomem.c
+2-21 files

OpenBSD/src ccyORY3usr.bin/watch watch.c

   Remove unnecessary free before exit calls

   OK deraadt@
VersionDeltaFile
1.39+1-3usr.bin/watch/watch.c
+1-31 files

OpenBSD/src hjFRBkGusr.sbin/rpki-client http.c

   At the end of parsing the http response header do some sanity checks
   to ensure that the response includes all needed data.

   Right now only the presence of a Location header is checked if a HTTP
   redirect was returned (e.g. a 301 status).

   Different fix for a report from Daniel Anderson
   OK tb@
VersionDeltaFile
1.102+8-3usr.sbin/rpki-client/http.c
+8-31 files

OpenBSD/src 03YC6XQsys/arch/powerpc/ddb db_trace.c

   In powerpc stacktrace_save(), start at correct return address

   I got an empty trace.  It was reading garbage as the 1st return
   address and might have accidentally taken the "if (lr & 3) break;".
   By using __builtin_return_address(0) and pointing to the correct
   frame, I get a trace where #0 is the function calling
   stacktrace_save().
VersionDeltaFile
1.22+11-4sys/arch/powerpc/ddb/db_trace.c
+11-41 files

OpenBSD/src Ve06m8Tusr.bin/watch watch.c

   Check cleared memory allocation and free before exit for consistency

   From Jan Schreiber, input from Patrick Keshishian

   OK tb@
VersionDeltaFile
1.38+5-2usr.bin/watch/watch.c
+5-21 files

OpenBSD/src 2uvca3Usys/dev/fdt xhci_fdt.c

   Enable Vbus regulator if there is one

   Needed on the Banana Pi F3 to power USB devices.

   ok jsing@
VersionDeltaFile
1.29+10-3sys/dev/fdt/xhci_fdt.c
+10-31 files

OpenBSD/src hClEnMmusr.sbin/rpki-client as.c

   rpki-client: fix pointer used in as_check_overlap()

   from Daniel Anderson
   ok claudio
VersionDeltaFile
1.18+3-3usr.sbin/rpki-client/as.c
+3-31 files

OpenBSD/src H3Ymj29sbin/pfctl pfctl.c pfctl_parser.h

   fix how source and state limiters are wired into rbtrees inside pfctl.

   i messed up when we added support for names on these things. the
   id and names are each supposed to be unique, which is checked by
   putting the one limiter into an rb tree based on their id and another
   based on their name. unfortunately i used the same RBT_ENTRY fields
   for both trees, which meant using both trees on the same limiter
   corrupted the topology, which goes badly when you want to use
   multiple limiters.

   found by, tested, and ok dgl@ (who is not me, this is not a typo)
   ok jmatthew@
VersionDeltaFile
1.402+13-10sbin/pfctl/pfctl.c
1.124+5-3sbin/pfctl/pfctl_parser.h
+18-132 files

OpenBSD/src 06u9cwOsys/arch/loongson/include apmvar.h

   Revert r1.7; these defines are required to build apm(8) and apmd(8).
VersionDeltaFile
1.8+2-0sys/arch/loongson/include/apmvar.h
+2-01 files