OpenBSD/src wvQY22clibexec/snmpd/snmpd_metrics mib.c

   fix a memory leak
   found with clang scan-build, ok martijn@
VersionDeltaFile
1.10+2-1libexec/snmpd/snmpd_metrics/mib.c
+2-11 files

OpenBSD/src k5tD9Khsys/net if_tun.c

   don't call pf_pkt_addr_changed, it's not needed against a new mbuf.

   this means we don't need NPF and pfvar.h

   found by jsg@
VersionDeltaFile
1.256+1-5sys/net/if_tun.c
+1-51 files

OpenBSD/src n57Pp7lsys/dev/usb if_urndisreg.h

   Increase urndis(4) buffer size to 16K.
   Fixes USB tethering issues with Galaxy S20 and S23.

   tested by ratchov@
   ok dlg@ armani@
VersionDeltaFile
1.21+2-2sys/dev/usb/if_urndisreg.h
+2-21 files

OpenBSD/src RVxZgCvsys/arch/arm64/dev smmu_acpi.c

   Skip attaching SMMUv3 on Qualcomm devices like we do for SMMUv2.
VersionDeltaFile
1.11+10-1sys/arch/arm64/dev/smmu_acpi.c
+10-11 files

OpenBSD/src p62VNZcsys/arch/arm64/dev smmu.c

   Fix SMMUv3 StreamID boundary check.  For a StreamID size of 32-bits, the
   upper boundary crosses into 64-bit, so we need to use 1ULL for comparison.
   This fixes use of PCI on Radxa Orion O6 (with SMMUv3 manually enabled).
VersionDeltaFile
1.25+2-2sys/arch/arm64/dev/smmu.c
+2-21 files

OpenBSD/src rw5noG6regress/usr.sbin/bgpd/unittests chash_test.c

   Check that CH_DESTROY works. Also for now check that after CH_DESTROY
   a CH_INSERT still works. This is because the table will be reinitalized
   on first call but it may be something that could change in the long run.
VersionDeltaFile
1.2+7-1regress/usr.sbin/bgpd/unittests/chash_test.c
+7-11 files

OpenBSD/src c7FaJ8busr.sbin/bgpd rde_adjout.c rde_peer.c

   Fix memory leak of the CH tables used by the per-peer pending queues.

   Define CH_DESTROY() and use it in peer_delete() via adjout_peer_free()
   to cleanup the lookup tables used by the pending attribute and prefix
   queues. Also rename adjout_prefix_flush_pending() to
   adjout_peer_flush_pending() since that function does no longer work
   with struct adjout_prefix entries.

   OK tb@
VersionDeltaFile
1.12+29-21usr.sbin/bgpd/rde_adjout.c
1.62+4-4usr.sbin/bgpd/rde_peer.c
1.332+3-2usr.sbin/bgpd/rde.h
1.5+2-1usr.sbin/bgpd/chash.h
+38-284 files

OpenBSD/src dRY8f0Susr.sbin/bgpd chash.c

   fix double free

   found with clang scan-build, ok claudio@
VersionDeltaFile
1.7+1-2usr.sbin/bgpd/chash.c
+1-21 files

OpenBSD/src O5UUHikusr.bin/openssl speed.c

   speed: make hmac(sha256) the default hmac

   MD5 is obsolete. Use a sha256 hash for the HMAC benchmark.

   ok tb@ beck@
VersionDeltaFile
1.50+4-4usr.bin/openssl/speed.c
+4-41 files

OpenBSD/src DNPTq3Bsys/netinet ip_output.c, sys/netinet6 ip6_output.c

   init error to 0 in ip_output_ipsec_send()

   Avoids clang scan-build (false positive) uninitialised var warning.
   ok bluhm@
VersionDeltaFile
1.416+2-2sys/netinet/ip_output.c
1.304+2-2sys/netinet6/ip6_output.c
+4-42 files

OpenBSD/src xmtRMwJsys/net pf.c

   special case mbufs without a ifidx set in pf_match_rcvif.

   this avoids generating a log message saying pf_match_rcvif can't
   resolve an interface if there's no interface to resolve.

   my if_get_smr change in pf_match_rcvif made a lot of logging appear
   on sthen and jesper wallin's firewalls.
VersionDeltaFile
1.1225+4-1sys/net/pf.c
+4-11 files

OpenBSD/src Sj9Esrousr.bin/systat inetname.c

   add missing KAME hack in netstat view

   'systat netstat' would show fe80:1::1:34691 while
   'netstart -n -f inet6' gave fe80::1%rge0.34691 as expected.

   Copy over the infamously scope_id trick from netstat(1) to fix
   displaying IPv6 addresses with embedded interface identifiers.

   OK florian claudio bluhm
VersionDeltaFile
1.4+11-1usr.bin/systat/inetname.c
+11-11 files

OpenBSD/src rrTfjlnusr.sbin/bgpd rde.c rde_adjout.c

   Perpare the adjout_prefix_dump upcalls for the next round of Adj-RIB-Out rework.

   Both the peer and the pt_entry are now passed to the upcall since these
   values will be removed from struct adjout_prefix.
   Adjust all upcalls accordingly and also adjust other code parts of the
   'show rib out' control message handling. Since now the pt_entry is passed
   to the callbacks the other code also should do direct pt_lookup calls.
   With this adjout_prefix_lookup() and adjout_prefix_match() become unused.

   In up_generate_default() the adjout_prefix_lookup() can be removed and
   replaced with a adjout_prefix_first() call after the pte is fetched.

   OK tb@
VersionDeltaFile
1.675+36-33usr.sbin/bgpd/rde.c
1.11+10-49usr.sbin/bgpd/rde_adjout.c
1.331+7-8usr.sbin/bgpd/rde.h
1.61+4-8usr.sbin/bgpd/rde_peer.c
1.189+2-2usr.sbin/bgpd/rde_update.c
+59-1005 files

OpenBSD/src 4AJhVgIusr.bin/fstat fstat.c fstat.1

   fstat: display close-on-fork flag as 'f' in R/W column

   Initial diff from Ricardo Branco with fixes from guenther and me.

   ok guenther jca millert
VersionDeltaFile
1.104+7-5usr.bin/fstat/fstat.c
1.60+3-1usr.bin/fstat/fstat.1
+10-62 files

OpenBSD/src To4Yhgusys/kern kern_lock.c subr_witness.c, sys/sys mutex.h

   replace the cas spinlock in kernel mutexes with a "parking" lock.

   this is motivated because cas based locks are unfair, meaning that
   no effort is made by the algorithm to try and give CPUs access to
   the critical section in the order that they tried to acquire them.
   cas based locks can also generate a lot of work for the cache
   subsystem on a computer because every cpu ends up hammering the
   same cacheline.

   the combination of these effects for heavily contended mutexes can
   get some systems into a situation where they don't make progress,
   and are effectively livelocked.

   this parking mutex mitigates against these problems.

   it's called parking because it was very heavily influnced by what's
   described in https://webkit.org/blog/6161/locking-in-webkit/. the
   big influence is that the lock itself only has to record it's state,
   but the machinery for waiting for the lock is external to the lock.

    [82 lines not shown]
VersionDeltaFile
1.85+262-51sys/kern/kern_lock.c
1.26+10-7sys/sys/mutex.h
1.58+2-2sys/kern/subr_witness.c
+274-603 files

OpenBSD/src SBcBRuRsys/arch/riscv64/conf GENERIC

   Enable USBVERBOSE like we do on other modern architectures

   ok jsg@, mlarkin@, jca@
VersionDeltaFile
1.56+2-1sys/arch/riscv64/conf/GENERIC
+2-11 files

OpenBSD/src abbUGhLusr.sbin/bgpd rde_adjout.c rde.h

   PREFIX_ADJOUT_FLAG_DEAD is no longer needed and can be replaced with
   a check that the attrs pointer is NULL. Refactor the code now a bit
   since the logic got a bit simpler.

   OK tb@
VersionDeltaFile
1.10+10-19usr.sbin/bgpd/rde_adjout.c
1.330+2-4usr.sbin/bgpd/rde.h
+12-232 files

OpenBSD/src oFjrO4asys/kern sys_process.c, sys/sys ptrace.h

   Extend ptrace(2) PT_GET_THREAD_* to include thread names.
   Use a new define larger then _MAXCOMLEN to avoid that define from
   propagating to ptrace.h. Ensure that pts_name is large enough with
   a compile time assert.

   okay claudio@ jca@
VersionDeltaFile
1.107+5-2sys/kern/sys_process.c
1.17+4-1sys/sys/ptrace.h
+9-32 files

OpenBSD/src NhiRmn4lib/libcrypto/x509 x509.h

   x509.h: add missing spaces after ,
VersionDeltaFile
1.125+63-63lib/libcrypto/x509/x509.h
+63-631 files

OpenBSD/src pE8Ozh1regress/usr.sbin/bgpd/unittests bitmap_test.c Makefile

   Add some unit tests for the bitmap api.
VersionDeltaFile
1.1+125-0regress/usr.sbin/bgpd/unittests/bitmap_test.c
1.15+3-1regress/usr.sbin/bgpd/unittests/Makefile
+128-12 files

OpenBSD/src 11TgC0zusr.sbin/bgpd bitmap.c bgpd.h

   Introduce a bitmap API that scales dynamically up but is also minimal for
   the common case.

   Functions include:
   - set, test, clear: set, test and clear a bit in the map
   - empty: check if a bitmap is empty (has no bit set).
   - id_get: return the lowest free id in map
   - id_put: return an id to the map, aka clear
   - init, reset: initialize and free a map

   The first 127 elements are put directly into struct bitmap without further
   allocation. For maps with more than 127 elements external memory is allocated
   in the set function. This memory is only freed by reset which must be called
   before an object is removed containing a bitmap.
   It is not possible to set bit 0 of a bitmap since that bit is used to
   differentiate between access modes. In my use cases this is perfectly fine
   since most code already treats 0 in a special way.

   OK tb@
VersionDeltaFile
1.1+229-0usr.sbin/bgpd/bitmap.c
1.526+17-1usr.sbin/bgpd/bgpd.h
1.45+2-1usr.sbin/bgpd/Makefile
+248-23 files

OpenBSD/src rxfIU4Vusr.bin/openssl speed.c

   Remove unused algorithms from speed.c

   Removed unused algorithms (MD2, SEED, RC5) from the algorithm
   enum and the `names[]` table.

   The current results for these algorithms were always:

   md2                  0.00   0.00   0.00   0.00   0.00
   seed cbc             0.00   0.00   0.00   0.00   0.00
   rc5-32/12 cbc        0.00   0.00   0.00   0.00   0.00

   indicating that they are no longer unused.

   ok tb@
VersionDeltaFile
1.49+3-6usr.bin/openssl/speed.c
+3-61 files

OpenBSD/src SCybGD3usr.bin/openssl speed.c

   Convert D_, R_ macro indices to enums in speed.c

   Replaced many `#define` based index constants with enums by adding ALGOR_NUM,
   DSA_NUM, RSA_NUM, and EC_NUM to the enum definitions.

   This makes it easier to add or remove new entries.

   ok tb@
VersionDeltaFile
1.48+58-48usr.bin/openssl/speed.c
+58-481 files

OpenBSD/src iphd4o4usr.bin/openssl speed.c

   speed: remove unused counters and dead parameters

   In the speed implementation, a number of unused variables and
   parameters (save_count, c[][], rsa_c, dsa_c, ecdsa_c, ecdh_c, and
   the num argument of print_message()/pkey_print_message()) were
   still left behind.

   These values are no longer referenced and cannot affect the
   time-based benchmark logic, so remove them.

   Functional behaviour of speed remains unchanged.

   ok tb@
VersionDeltaFile
1.47+77-92usr.bin/openssl/speed.c
+77-921 files

OpenBSD/src oEnskHmsys/net if_tun.c

   let tun pretend it's a softnet thread with it's own tun_input_process.

   this largely reimplements if_vinput and if_input_process in tun so
   packets pushed through the stack from a tun/tap write can operate
   largely like they're being processed by a softnet thread.

   there's a couple of important differences between tun/tap and softnet
   thought. firstly, multiple threads/processes can write to a single
   tun/tap descriptor concurrently, so each thread has its own netstack
   struct on the stack. secondly, these tun/tap threads are not the
   softnet threads, so they can't avoid taking real interface references
   when processing requeued packets.

   the alternative to this woudl be letting tun/tap writes queue packets
   for processing in a softnet thread, but that adds latency and
   requires a lot of thought about a backpressure mechanism when a
   thread writes too fast for the stack to process.
VersionDeltaFile
1.255+87-4sys/net/if_tun.c
+87-41 files

OpenBSD/src 30erTUHsys/net if.c

   let if_vinput and if_input_proto requeue packets on a struct netstack.

   this moves us from directly calling into different layers of the
   network stack to moving the call back up to if_input_process to
   dispatch. this reduces the kernel thread stack usage, but also makes
   it safe(r) to dispatch this work from an smr critical section. it
   also allows us to dispatch work without holding netlock, and
   eventually getting if_input_process to amortise the locking over
   bundles of these different dispatch calls.
VersionDeltaFile
1.760+20-7sys/net/if.c
+20-71 files

OpenBSD/src 6gHxU4Usys/net if.c if_var.h

   extend struct netstack to queue packet processing in the existing context

   at the moment if_input_process runs packets in an mbuf_list, generally
   produced by an ifiq, through the network stack. as the headers on
   the packet are parsed, subsequent protocol handlers are called to
   process the next layer of the packet. currently these handlers are
   dispatched by by directly calling functions, which consumes the
   stack on the kernel threads running the network stack. if you have
   a deep topology of virtual interfaces (eg, carp on vlan on aggr on
   physical ports), you have a deep call stack.

   the usual alternative to this is to queue packets handled by virtual
   interfaces and get them processed by their own ifiq and their own
   if_input_process call. this is what the stack used to do, but the
   cost of locking and queueing and dispatching it to a softnet thread
   to process (even if it was the same thread) adds significant overhead,
   so we moved to direct dispatch to speed things up.

   this change is kind of a hybrid approach, where input handling is

    [21 lines not shown]
VersionDeltaFile
1.759+34-8sys/net/if.c
1.144+16-4sys/net/if_var.h
+50-122 files

OpenBSD/src aUD5x0vsys/net if.c

   call input handlers in if_input_local and p2p_input via if_input_proto
VersionDeltaFile
1.758+7-5sys/net/if.c
+7-51 files

OpenBSD/src WYcvmossys/net if_ethersubr.c

   call the ip and mpls input handlers in if_ether_input via if_input_proto.
VersionDeltaFile
1.307+2-2sys/net/if_ethersubr.c
+2-21 files

OpenBSD/src Cp4qMCOsys/net if_rport.c

   call the protocol input handlers via if_input_proto.
VersionDeltaFile
1.9+9-5sys/net/if_rport.c
+9-51 files