diff --git a/etc/skel/dot.version b/etc/skel/dot.version index 2f0c57775..3a616a93b 100644 --- a/etc/skel/dot.version +++ b/etc/skel/dot.version @@ -1 +1 @@ -# SecBSD 1.4-7869b2f: Fri Oct 6 03:12:48 UTC 2023 (Tezcatlipoca) +# SecBSD 1.4-772e31c: Sun Oct 8 04:19:53 UTC 2023 (Tezcatlipoca) diff --git a/sys/kern/kern_clockintr.c b/sys/kern/kern_clockintr.c index 39ff19894..712ddfbdb 100644 --- a/sys/kern/kern_clockintr.c +++ b/sys/kern/kern_clockintr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_clockintr.c,v 1.58 2023/09/25 00:29:31 cheloha Exp $ */ +/* $OpenBSD: kern_clockintr.c,v 1.59 2023/10/08 21:08:00 cheloha Exp $ */ /* * Copyright (c) 2003 Dale Rahn * Copyright (c) 2020 Mark Kettenis @@ -41,6 +41,8 @@ void clockqueue_pend_delete(struct clockintr_queue *, struct clockintr *); void clockqueue_pend_insert(struct clockintr_queue *, struct clockintr *, uint64_t); void clockqueue_reset_intrclock(struct clockintr_queue *); +void intrclock_rearm(struct intrclock *, uint64_t); +void intrclock_trigger(struct intrclock *); uint64_t nsec_advance(uint64_t *, uint64_t, uint64_t); /* @@ -492,6 +494,18 @@ clockqueue_reset_intrclock(struct clockintr_queue *cq) intrclock_trigger(&cq->cq_intrclock); } +void +intrclock_rearm(struct intrclock *ic, uint64_t nsecs) +{ + ic->ic_rearm(ic->ic_cookie, nsecs); +} + +void +intrclock_trigger(struct intrclock *ic) +{ + ic->ic_trigger(ic->ic_cookie); +} + /* * Advance *next in increments of period until it exceeds now. * Returns the number of increments *next was advanced. diff --git a/sys/net/ifq.c b/sys/net/ifq.c index 54ecfa5df..e07ddf798 100644 --- a/sys/net/ifq.c +++ b/sys/net/ifq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifq.c,v 1.51 2023/10/05 11:08:56 bluhm Exp $ */ +/* $OpenBSD: ifq.c,v 1.52 2023/10/08 07:44:52 claudio Exp $ */ /* * Copyright (c) 2015 David Gwynne @@ -529,14 +529,6 @@ ifq_hdatalen(struct ifqueue *ifq) return (len); } -void -ifq_set_maxlen(struct ifqueue *ifq, unsigned int maxlen) -{ - mtx_enter(&ifq->ifq_mtx); - ifq->ifq_maxlen = maxlen; - mtx_leave(&ifq->ifq_mtx); -} - unsigned int ifq_purge(struct ifqueue *ifq) { diff --git a/sys/net/ifq.h b/sys/net/ifq.h index d15af37b4..ac06de454 100644 --- a/sys/net/ifq.h +++ b/sys/net/ifq.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ifq.h,v 1.39 2023/10/05 11:08:56 bluhm Exp $ */ +/* $OpenBSD: ifq.h,v 1.40 2023/10/08 07:44:52 claudio Exp $ */ /* * Copyright (c) 2015 David Gwynne @@ -435,7 +435,6 @@ void ifq_deq_commit(struct ifqueue *, struct mbuf *); void ifq_deq_rollback(struct ifqueue *, struct mbuf *); struct mbuf *ifq_dequeue(struct ifqueue *); int ifq_hdatalen(struct ifqueue *); -void ifq_set_maxlen(struct ifqueue *, unsigned int); void ifq_mfreem(struct ifqueue *, struct mbuf *); void ifq_mfreeml(struct ifqueue *, struct mbuf_list *); unsigned int ifq_purge(struct ifqueue *); @@ -449,8 +448,9 @@ int ifq_deq_sleep(struct ifqueue *, struct mbuf **, int, int, const char *, volatile unsigned int *, volatile unsigned int *); -#define ifq_len(_ifq) READ_ONCE((_ifq)->ifq_len) -#define ifq_empty(_ifq) (ifq_len(_ifq) == 0) +#define ifq_len(_ifq) ((_ifq)->ifq_len) +#define ifq_empty(_ifq) (ifq_len(_ifq) == 0) +#define ifq_set_maxlen(_ifq, _l) ((_ifq)->ifq_maxlen = (_l)) static inline int ifq_is_priq(struct ifqueue *ifq) @@ -490,8 +490,8 @@ int ifiq_input(struct ifiqueue *, struct mbuf_list *); int ifiq_enqueue(struct ifiqueue *, struct mbuf *); void ifiq_add_data(struct ifiqueue *, struct if_data *); -#define ifiq_len(_ifiq) READ_ONCE(ml_len(&(_ifiq)->ifiq_ml)) -#define ifiq_empty(_ifiq) (ifiq_len(_ifiq) == 0) +#define ifiq_len(_ifiq) ml_len(&(_ifiq)->ifiq_ml) +#define ifiq_empty(_ifiq) ml_empty(&(_ifiq)->ifiq_ml) #endif /* _KERNEL */ diff --git a/sys/sys/clockintr.h b/sys/sys/clockintr.h index 32185df86..7fe2f63e0 100644 --- a/sys/sys/clockintr.h +++ b/sys/sys/clockintr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: clockintr.h,v 1.20 2023/09/17 15:24:35 cheloha Exp $ */ +/* $OpenBSD: clockintr.h,v 1.21 2023/10/08 21:08:00 cheloha Exp $ */ /* * Copyright (c) 2020-2022 Scott Cheloha * @@ -47,18 +47,6 @@ struct intrclock { void (*ic_trigger)(void *); }; -static inline void -intrclock_rearm(struct intrclock *ic, uint64_t nsecs) -{ - ic->ic_rearm(ic->ic_cookie, nsecs); -} - -static inline void -intrclock_trigger(struct intrclock *ic) -{ - ic->ic_trigger(ic->ic_cookie); -} - /* * Schedulable clock interrupt callback. * diff --git a/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm index c7d1d701b..96cffd79f 100644 --- a/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm +++ b/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: AddCreateDelete.pm,v 1.52 2023/06/13 09:07:16 espie Exp $ +# $OpenBSD: AddCreateDelete.pm,v 1.55 2023/10/08 12:44:58 espie Exp $ # # Copyright (c) 2007-2014 Marc Espie # @@ -55,6 +55,34 @@ sub add_interactive_options($self) return $self; } +my $setup = { + nowantlib => sub() { + eval ' + use OpenBSD::Dependencies::SolverBase; + no warnings qw(redefine); + package OpenBSD::Dependencies::SolverBase; + sub solve_wantlibs($, $) { 1 } + '; + }, + nosystemwantlib => sub() { + eval ' + use OpenBSD::LibSpec; + package OpenBSD::Library::System; + sub no_match_dispatch($library, $spec, $base) + { + return $spec->no_match_name($library, $base); + } + '; + }, + norun => sub() { + eval ' + package OpenBSD::State; + sub _system(@) { 0 } + '; + }, +}; + + sub handle_options($state, $opt_string, @usage) { my $i; @@ -78,6 +106,14 @@ sub handle_options($state, $opt_string, @usage) } } $state->{interactive} = $state->interactive_class($i)->new($state, $i); + if ($state->defines('REGRESSION_TESTING')) { + for my $i (split(',', $state->defines('REGRESSION_TESTING'))) { + $state->{regression}{$i} = 1; + if (defined $setup->{$i}) { + &{$setup->{$i}}(); + } + } + } } sub interactive_class($, $i) diff --git a/usr.sbin/pkg_add/OpenBSD/LibSpec.pm b/usr.sbin/pkg_add/OpenBSD/LibSpec.pm index 9e243056d..a8eb31110 100644 --- a/usr.sbin/pkg_add/OpenBSD/LibSpec.pm +++ b/usr.sbin/pkg_add/OpenBSD/LibSpec.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: LibSpec.pm,v 1.20 2023/06/13 09:07:17 espie Exp $ +# $OpenBSD: LibSpec.pm,v 1.21 2023/10/08 12:45:31 espie Exp $ # # Copyright (c) 2010 Marc Espie # @@ -19,6 +19,11 @@ use v5.36; package OpenBSD::LibObject; +sub systemlibraryclass($self) +{ + return ref($self); +} + sub key($self) { if (defined $self->{dir}) { @@ -142,6 +147,11 @@ sub find_best($repo, $stem) package OpenBSD::Library; our @ISA = qw(OpenBSD::LibObject); +sub systemlibraryclass($) +{ + "OpenBSD::Library::System"; +} + sub from_string($class, $filename) { if (my ($dir, $stem, $major, $minor) = $filename =~ m/^(.*)\/lib([^\/]+)\.so\.(\d+)\.(\d+)$/o) { @@ -160,6 +170,9 @@ sub to_string($self) sub set_origin($self, $origin) { $self->{origin} = $origin; + if ($origin eq 'system') { + bless $self, $self->systemlibraryclass; + } return $self; } @@ -187,6 +200,11 @@ sub is_better($self, $other) return 0; } +# could be used for better reporting +# is used for regression testing +package OpenBSD::Library::System; +our @ISA = qw(OpenBSD::Library); + package OpenBSD::LibSpec; our @ISA = qw(OpenBSD::LibObject); diff --git a/usr.sbin/pkg_add/OpenBSD/Tracker.pm b/usr.sbin/pkg_add/OpenBSD/Tracker.pm index a7d555929..251fd2ff2 100644 --- a/usr.sbin/pkg_add/OpenBSD/Tracker.pm +++ b/usr.sbin/pkg_add/OpenBSD/Tracker.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Tracker.pm,v 1.32 2023/10/07 09:10:03 espie Exp $ +# $OpenBSD: Tracker.pm,v 1.33 2023/10/08 09:16:39 espie Exp $ # # Copyright (c) 2009 Marc Espie # @@ -53,7 +53,7 @@ sub dump2($set) join(",", $set->hint_names)); } -sub dump() +sub dump($) { return unless defined $s; for my $l ('to_install', 'to_update') {