Commit Graph

303590 Commits

Author SHA1 Message Date
simonb e4a6e799a6 Import less-643. Way to many changes and bugfixes over the last ten
years to list.  Look at src/external/bsd/less/dist/version.c for a
complete list of changes.
2023-10-06 04:29:17 +00:00
mrg 21a1f96470 rge(4): check for all errors in rx buffer allocation
should fix a crash seen by by Chavdar Ivanov reported on current-users.

move the rx and tx list clean up into their own functions, and call the
rx clean up function from the init function if something fails.  this
should fix a potential leak in this case, and generally frees up memory
that won't be used without a successful init phase again.

slight application of 'static', much more could be done.
2023-10-05 21:43:02 +00:00
christos a1c3b3aa4a provide a separate pointer that points to the drive sensors (Edgar Fuss) 2023-10-05 21:41:00 +00:00
kre 28b2f4e3f6 If the read builtin is told to read into IFS, we must avoid doing
that until all current uses of IFS are complete (as we have IFS's
value cached in ifs - if IFS alters, ifs might point anywhere).
Handle this by deferring assignments to IFS until everything is done.
This makes us appear to comply with the (currently) proposed requirement
for read by POSIX that field splitting complete before vars are
assigned.   (Other shells, like dash, ksh93, yash, bosh behave like this)

That might end up being unspecified though, as other shells (bosh,
mksh) assign each field to its var as it is delimited (though bosh
appears to have bugs).   If we wanted to go that route, the issue here
could have been handled by re-doing the init of ifs after every
setvar() that is performed here (except the last, after which it is
no longer needed).

XXX pullup -10
2023-10-05 20:33:31 +00:00
ad c55cb7eb1b Update comments to match reality 2023-10-05 19:44:26 +00:00
ad 68fa584377 Arrange to update cached LWP credentials in userret() rather than during
syscall/trap entry, eliminating a test+branch on every syscall/trap.

This wasn't possible in the 3.99.x timeframe when l->l_cred came about
because there wasn't a reliable/timely way to force an ONPROC LWP running on
a remote CPU into the kernel (which is just about the only new thing in
this scheme).
2023-10-05 19:41:03 +00:00
ad 5e6f75a121 Resolve !MULTIPROCESSOR build problem with the nasty kernel lock macros. 2023-10-05 19:28:30 +00:00
ad b316ad652f The idle LWP doesn't need to care about kernel_lock. 2023-10-05 19:10:18 +00:00
ad 01e5be2450 kern_sig.c: remove problematic kernel_lock handling which is unneeded in 2023. 2023-10-05 19:06:30 +00:00
riastradh f103f77a25 lwp_pctr(9): Make this a little more robust.
No substantive change to machine code on aarch64.  (Instructions and
registers got reordered a little but not in a way that matters.)
2023-10-05 13:05:18 +00:00
riastradh 66e19b5cbf arm/gic: Check l_blcnt, not l_biglocks.
l_biglocks is a now-defunct temporary storage used only when
sleeping; l_blcnt is the number of kernel locks held by the lwp when
not sleeping.

Should fix arm builds.
2023-10-05 12:30:59 +00:00
riastradh c6e0728e36 kern_cctr.c: Fix broken indentation.
No functional change intended.
2023-10-05 12:05:59 +00:00
abs 011f078b4d Add support to npf_rules to rc.conf
- Allows overriding default from /etc/npf.conf
- Indicate rules file used in output
- Drop check for file presence in script - rely on npf exiting with error
2023-10-05 08:19:27 +00:00
blymn fc8a227a5a Update check files affected by a fix to addbyte.c in libcurses. 2023-10-05 06:15:58 +00:00
blymn 95dcd6ac86 Fix for install/56467
Set x to 0 before calling scroll based on a  proposed fix by RVP (thanks!)
2023-10-05 06:15:03 +00:00
ad c43491e4bf pipe1(): call getnanotime() once not twice. 2023-10-04 22:41:56 +00:00
jschauma da44aa9e30 +DOH DNS over HTTPS
+DOQ	DNS over QUIC
+DOT	DNS over TLS
+DRN	Discovery of Network-designated Resolvers
+QUIC	Quick UDP Internet Connections
2023-10-04 22:34:23 +00:00
ad 2c21032618 pipe->pipe_waiters isn't needed on NetBSD, kernel condvars do this for free. 2023-10-04 22:19:58 +00:00
ad 0f335007fe kauth_cred_hold(): return cred verbatim so that donating a reference to
another data structure can be done more elegantly.
2023-10-04 22:17:09 +00:00
ad d96d10fff5 pipe_read(): try to skip locking the pipe if a non-blocking fd is used, as
is very often the case with BSD make (from FreeBSD/mjg@).
2023-10-04 22:12:23 +00:00
ad 790e75e09b rump now needs lwp_need_userret() 2023-10-04 21:56:15 +00:00
ad 8787d87e58 p->p_stat is actually locked by proc_lock so document it that way and
shuffle some fields around so it's not next to p->p_trace_enabled (that
needs some attention too, in a later change).
2023-10-04 20:52:07 +00:00
ad 66fdfe9cee match_process(): most of the fields being inspected are covered by proc_lock
so don't grab p->p_lock so much.
2023-10-04 20:48:13 +00:00
ad 3d1cabfdfe Do cv_broadcast(&p->p_lwpcv) after dropping p->p_lock in a few places, to
reduce contention.
2023-10-04 20:46:33 +00:00
ad ce3debcbe5 lwp_wait(): restart the loop if p->p_lock dropped to reap zombie (paranoid). 2023-10-04 20:45:13 +00:00
ad 27711c94c3 Sprinkle a bunch more calls to lwp_need_userret(). There should be no
functional change but it does get rid of a bunch of assumptions about how
mi_userret() works making it easier to adjust in that in the future, and
works as a kind of documentation too.
2023-10-04 20:44:15 +00:00
ad 725adb2afe Sprinkle a bunch more calls to lwp_need_userret(). There should be no
functional change but it does get rid of a bunch of assumptions about how
mi_userret() works making it easier to adjust in that in the future, and
works as a kind of documentation too.
2023-10-04 20:42:38 +00:00
ad 9a587cc997 Turnstiles: use the syncobj name for ps/top wmesg when sleeping since it's
more informative than "tstile".
2023-10-04 20:39:35 +00:00
ad 9b39d561f0 Remove unneeded test of ci->ci_want_resched. 2023-10-04 20:34:19 +00:00
ad 00a46cfb51 NetBSD 10.99.10: struct lwp and related things changed. 2023-10-04 20:29:59 +00:00
ad 0a6ca13bec Eliminate l->l_biglocks. Originally I think it had a use but these days a
local variable will do.
2023-10-04 20:29:18 +00:00
ad a355028fa4 Eliminate l->l_ncsw and l->l_nivcsw. From memory think they were added
before we had per-LWP struct rusage; the same is now tracked there.
2023-10-04 20:28:05 +00:00
rin 7521c57073 igc(4): Add and hook manpage 2023-10-04 07:51:36 +00:00
rin fc07489de4 igc(4): Added to kernel config files for tested platforms
I.e., aarch64, amd64, and evbppc/DHT, at the moment.

Please feel free to add to other config files, and report us back
if you find problems :)
2023-10-04 07:48:55 +00:00
rin 2e96519a48 igc(4): XXX: Temporally disable 64-bit DMA for aarch64
Until PR port-arm/57643 is properly addressed.
2023-10-04 07:41:55 +00:00
rin fb38d839b4 igc(4): Add support to Intel I225 / I226 series ethernet devices
Originally written by kevlo@o for OpenBSD, and ported by knakahara@,
msaitoh@, and myself.

The driver is *EXPERIMENTAL* at the moment, as some minor error
handling paths are not fully implemented.

Hardware VLAN tagging and TSO are not supported yet.

Although, we have never observed strange behaviors at least on amd64,
aarch64{,eb}, and evbppc (IBM405), except for PR port-arm/57643.

We will send pullup request to netbsd-10, after successful snapshot
build for -current.
2023-10-04 07:35:27 +00:00
rin 1539a125cd Regen for pcidevs rev 1.1494 2023-10-04 07:19:36 +00:00
rin 2e8fd522f2 pcidevs: Add missing I225/I226 series devices 2023-10-04 07:17:59 +00:00
rin d0d8f2a5ac Import igc(4) from OpenBSD-current as of 2023-10-04 2023-10-04 07:15:13 +00:00
msaitoh e3cc6fa5ef ixgbe: Fix typo in comment. No functional change. 2023-10-04 04:31:25 +00:00
msaitoh b60a6f40fe Regen. 2023-10-04 03:10:07 +00:00
msaitoh 5de8a063ce Add Intel 82599 LS. 2023-10-04 03:09:42 +00:00
gutteridge b23f276898 resize_root: quote $rootdev consistently in resize_ffs(8) calls 2023-10-04 00:04:42 +00:00
martin aecd65a013 PR 57628: at the end of _rtld_init() explicitly initialize the ld.elf_so
local copy of the atomic access support functions for machines that do not
implement all required ops in hardware (like 32bit sparc).

XXX would be better to figure out a way to share this copy with libc
(thereby using half as many RAS sections). But even if we would share it,
we have to init it early enough for ld.elf_so internal uses.
2023-10-03 09:48:18 +00:00
macallan c29ca8b2f5 add xhci 2023-10-03 08:23:07 +00:00
msaitoh 4162da18d2 Remove obsolete comment. 2023-10-03 06:06:50 +00:00
ad 9fc55e2ba8 Tweak a couple of comments. 2023-10-02 21:50:18 +00:00
ad 2246c1eb4d Use kmem_intr_*() variants for lock objects since aiodoned was done away
with and we process these I/Os in soft interrupt context now.
2023-10-02 21:03:55 +00:00
ad 089029363e kauth_cred_groupmember(): check egid before a tedious scan of groups. 2023-10-02 20:59:12 +00:00
riastradh 4caf62b3a6 armpmu(4): Add missing newline to error message. 2023-10-02 08:42:20 +00:00