Commit Graph

18915 Commits

Author SHA1 Message Date
mrg 36d3b5214a use "including formerly ATI" for radeon, AMD released many of the cards
that radeon(4) supports.

add Rafal Boni to the authors.

bump date.
2023-10-22 02:23:04 +00:00
msaitoh 0e91f20631 eqos(4): Add initial support for Intel Elkhart Lake internal Ethernet devices.
- Only tested on PSE SGMII 1G Ethernet MAC with MaxLinear GPY115.
 - I don't know why dmat64 doesn't work. eqos_attach() have a special
   code if EQOS_HW_FEATURE_ADDR64_32BIT(sc) is true, but it seems it doesn't
   work.
 - TODO:
 	Multiqueue support.
	Detach support.
2023-10-20 10:09:43 +00:00
riastradh cfc1d4dcae drm(4): Fix thinko -- display configuration, not device configuration. 2023-10-18 10:50:42 +00:00
riastradh c47413609f drm(4): Update man page over the last decade.
While here, credit contributors just to the NetBSD port.  Too many
upstream contributors to list, not even sure where I'd find them all.
2023-10-18 10:28:06 +00:00
yamaguchi 5c438acfe9 Update lagg(4) manual
1. corrected the wrong example
   - lagg(4) can not add multiple port and set its priority at once
      - This is the restriction of ifconfig(8)
2. adapted to changed behavior related to MTU
   - Changed not to copy MTU of the 1st physical interface
     to lagg(4) to prevent locking against myself
2023-10-18 07:59:06 +00:00
mrg ff96b843c4 fix a typo: s/usbent_set_link/usbnet_set_link/. 2023-10-17 03:12:35 +00:00
riastradh fa838d7c8f heimdal: No need for -lm, was only added for -lsqlite3.
PR lib/57406

XXX pullup-10
2023-10-11 14:08:25 +00:00
riastradh 48e4cfe1da bsd.prog.mk: krb5 stuff no longer needs to link against sqlite3.
(Why is this here?  Seems like it should be a .mk fragment under
crypto/external/bsd/heimdal -- that way I would have found it for the
previous commit.)

PR lib/57406

XXX pullup-10
2023-10-11 14:08:17 +00:00
wiz e1088c05eb agr(4): minor cleanups 2023-10-11 11:00:17 +00:00
yamaguchi 714ef6aa93 update history of agr(4)
I proposed to make agr(4) deprecated in NetBSD 10,
and there was not any disagreements.
https://mail-index.netbsd.org/tech-net/2022/06/08/msg008265.html
2023-10-11 09:19:27 +00:00
yamaguchi 1dba28331a Update agr(4) manual page
The driver is marked as obsolete.
2023-10-11 06:46:33 +00:00
jschauma 998e343024 well, kinda have to add CSRF now, don't we?
+CSRF  cross-site request forgery
2023-10-11 01:21:21 +00:00
jschauma e525aaa3c2 +SSRF server-side request forgery 2023-10-11 01:15:16 +00:00
riastradh 1722a083da hier(7): Document /usr/share/certs/mozilla.
XXX pullup-10
2023-10-10 21:51:01 +00:00
nia dd1cd64036 Add an example of connecting to an unsecured network with wpa_supplicant 2023-10-10 07:21:00 +00:00
jschauma 58d481180f +KEK key encryption key
(funny, we already had DEK, those usually come in pairs)
2023-10-10 01:17:19 +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 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
rin 7521c57073 igc(4): Add and hook manpage 2023-10-04 07:51:36 +00:00
riastradh 5cae6dade6 acronyms.comp: SFP -- Small Form-factor Pluggable 2023-10-02 00:16:42 +00:00
riastradh 5abc41edc6 acronyms.comp: Add various CPU- and barrier-related acronyms.
CET, DMB, DSB, HLE, IBT, ISB, MDS, SSB, SSBB, SSBD, TAA, TSX

PR misc/57636
2023-09-30 13:26:31 +00:00
jschauma 8463add209 +VDP vulnerability disclosure policy 2023-09-29 18:56:14 +00:00
gutteridge 23ab784f3a wpa_supplicant.conf: fix connection string for Eduroam
"MSCHAPV2" must have an uppercase "V" in the connection string.
Reported by nebbionegiuseppe@gmail.com in PR misc/57634.
2023-09-29 14:05:28 +00:00
lukem 2667c642b0 ftpusers(5) example: use IP & DNS examples
Use .example TLD, per IETF RFC 2606.
Use 192.0.2.0/24, per IETF RFC 5737.
Use 127.0.0.1/24 for localguest, not network that ftp.NetBSD.org used to be in.
2023-09-22 22:15:47 +00:00
jschauma 2f6717845f +CVSS Common Vulnerability Scoring System 2023-09-21 13:38:03 +00:00
jschauma bb2c98cdcf +EPP extensible provisioning protocol (RFC5730) 2023-09-20 15:22:41 +00:00
jschauma 9781eaaf8f +CERT computer emergency response team
+[C]SIRT (computer) security incident response team
+SOC security operations center
2023-09-18 15:19:33 +00:00
gutteridge 50bd1065b4 acronyms.comp: add CAN & ODBC 2023-09-16 21:18:29 +00:00
jschauma ac405b3154 +CRQC Cryptanalytically Relevant Quantum Computer 2023-09-13 14:12:21 +00:00
jschauma e64de735dc +RAT remoate access trojan 2023-09-11 15:07:52 +00:00
ad 587ba4d7aa Permit calling cv_signal()/cv_broadcast() after mutex release. 2023-09-07 20:01:43 +00:00
jschauma 514a75e0bc +DAE deterministic authenticated encryption 2023-09-06 19:56:57 +00:00
andvar 96dda13222 config(5): enable NTP option implicitly when PPS_SYNC option is enabled.
PPS_SYNC requires NTP, but some code blocks are ifdef'ed without it,
thus allowing an attempt to build kernel with PPS_SYNC, and without NTP
(and it almost builds with one line change).

Update options(4) man page to reflect the change.

Solution suggested by riastradh.
2023-09-03 19:38:58 +00:00
riastradh 5bfc19640d hier(7): Document /etc/openssl. 2023-09-02 17:40:45 +00:00
lukem 5622c47680 bsd.own.mk: sort the CC_WNO variables 2023-09-02 12:09:10 +00:00
jschauma 3117ed5920 +IAB - Internet Architecture Board 2023-08-28 15:50:17 +00:00
rillig 23ee83f7c0 c.7: mention that C11 and C17 have been published 2023-08-27 15:50:47 +00:00
rillig 7a91345762 tests.*.7: use https URLs, fix grammar 2023-08-27 15:17:50 +00:00
rin f8b4e528be bsd.own.mk: Switch mips64e[bl] to binutils 2.39 again
Potential fix for PR toolchain/57241 has been committed.
Let us see whether this works fine or not.
2023-08-24 06:18:07 +00:00
rin b7377c06a9 bsd.own.mk: Put gdb back for m68000
However, unfortunately, it does not work even if MAXTSIZ is bumped.
It seems to be too large for 24-bit address space.

This is not a regression; gdb.old does not work also.
2023-08-20 02:11:21 +00:00
christos 8f452ed84f Add elfedit (needed to tag binaries as linux) from GSoC 2023 (Theodore Preduta) 2023-08-19 22:58:15 +00:00
andvar b5ec4b2860 s/devicdes/devices/.
The question if those links should stay at all in see also section
(some irrelevant today).
2023-08-19 17:55:42 +00:00
riastradh ec44863e36 options(4), sysctl(7): Document options HEARTBEAT. 2023-08-14 16:51:52 +00:00
wiz adb944c5df fix typo in previous 2023-08-13 21:52:32 +00:00
christos d0b5c4dbc0 sun2 can't make gdb anymore. there is no gmp because no gcc. 2023-08-13 21:17:05 +00:00
christos b25c1038e8 switch everyone to gdb-13.2 2023-08-11 20:29:17 +00:00
christos 945f88fd2e put back the new gdb 2023-08-09 14:57:19 +00:00
mrg 832d47522a introduce new GCC 12 warning disables and use them in a few places
this introduces 4 new warning disable flags:

   CC_WNO_MISSING_TEMPLATE_KEYWORD
   CC_WNO_REGISTER
   CC_WNO_STRINGOP_OVERREAD
   CC_WNO_ARRAY_BOUNDS

and documents them in README.warnings.  of these, the string op
and array bounds are both problematic (real bugs) and also spurious
(not real bugs), and the other 2 are mostly temporary for older
3rd party code.

add some new uses of CC_WNO_STRINGOP_OVERFLOW.

fix m68k build for gallium and GCC 12.
2023-08-08 06:27:31 +00:00
mrg 69fe22838c put amd64 back to GDB 11. it doesn't build for me, or others.
the first problem is that this rule:

GDBvn.texi: ${DIST}/gdb/version.in
	echo "@set GDBVN $$(${TOOL_CAT} ${.ALLSRC})" > ${.TARGET}

conflicts with the "GDBvn.texi" in the source tree and fail to write
this file with r/o source trees.

the second problem is that gdbserver fails to link because it compiles
the wrong file to create target.o.  this seems like a very bad make or
bsd.*.mk bug -- "SRCS= .. target.cc ...", and yet, make manages to
compile the file "target.c" to create target.o, and then the required
symbols the rest of gdbserver needs are missing.

the third problem is that when you make it build the right target.cc,
it wants bfd.h, and gmp.h, and even after solving those issues, i'm
still getting a fourth issue linking gdbserver and thus reverting.
2023-08-08 03:44:12 +00:00
riastradh ce8aefde95 style(5): Advise against new struct typedefs and explain why.
Proposed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/07/11/msg028950.html

Positive feedback to general concept, negative feedback to specifics
and phrasing of the first iteration but no objections to latest
iteration after several weeks at:
https://mail-index.netbsd.org/tech-kern/2023/07/16/msg028994.html
2023-08-07 18:01:42 +00:00
riastradh 138a94ebea rnd(4): Document `entropy: best effort' in random(4). 2023-08-07 06:27:37 +00:00
christos acba6b74f4 switch gdb to 13.20 for x86_64 2023-08-06 20:44:49 +00:00
jschauma 503ec6d006 +RAT register allocation table 2023-08-04 15:42:09 +00:00
riastradh 3586ae1d3b entropy(9): Simplify stages. Split interrupt vs non-interrupt paths.
- Nix the entropy stage (cold, warm, hot).  Just use the usual kernel
  `cold' (cold: single-core, single-thread; interrupts may happen),
  and don't make any three-way distinction about whether interrupts
  or threads or other CPUs can be running.

  Instead, while cold, use splhigh/splx or forbid paths to come from
  interrupt context, and while warm, use mutex or the per-CPU hard
  and soft interrupt paths for low latency.  This comes at a small
  cost to some interrupt latency, since we may stir the pool in
  interrupt context -- but only for a very short window early at boot
  between configure and configure2, so it's hard to imagine it
  matters much.

- Allow rnd_add_uint32 to run in hard interrupt context or with spin
  locks held, but defer processing to softint and drop samples on the
  floor if buffer is full.  This is mainly used for cheaply tossing
  samples from drivers for non-HWRNG devices into the entropy pool,
  so it is often used from interrupt context and/or under spin locks.

- New rnd_add_data_intr provides the interrupt-like data entry path
  for arbitrary buffers and driver-specified entropy estimates: defer
  processing to softint and drop samples on the floor if buffer is
  full.

- Document that rnd_add_data is forbidden under spin locks outside
  interrupt context (will crash in LOCKDEBUG), and inadvisable in
  interrupt context (but technically permitted just in case there are
  compatibility issues for now); later we can forbid it altogether in
  interrupt context or under spin locks.

- Audit all uses of rnd_add_data to use rnd_add_data_intr where it
  might be used in interrupt context or under a spin lock.

This fixes a regression from last year when the global entropy lock
was changed from IPL_VM (spin) to IPL_SOFTSERIAL (adaptive).  Thought
I'd caught all the problems from that, but another one bit three
different people this week, presumably because of recent changes that
led to more non-HWRNG drivers entering the entropy consolidation
path from rnd_add_uint32.

In my attempt to preserve the rnd(9) API for the (now long-since
abandoned) prospect of pullup to netbsd-9 in my rewrite of the
entropy subsystem in 2020, I didn't introduce a separate entry point
for entering entropy from interrupt context or equivalent, i.e., spin
locks held, and instead made rnd_add_data rely on cpu_intr_p() to
decide whether to process the whole sample under a lock or only take
as much as there's buffer space for before scheduling a softint.  In
retrospect, that was a mistake (though perhaps not as much of a
mistake as other entropy API decisions...), a mistake which is
finally getting rectified now by rnd_add_data_intr.

XXX pullup-10
2023-08-04 07:38:53 +00:00
gutteridge ee4f5428fe acronyms.comp: add ONCE 2023-08-04 03:59:00 +00:00
rin f91ef6a605 bsd.own.mk: Revert CC_WNO_USE_AFTER_FREE
This is an undefined behavior in general. Implementation details of
pointer are not defined in C standards; it is not necessarily address
of memory objects.

Pointed out by uwe@. Thanks!!
2023-08-03 14:55:54 +00:00
rin da04be2518 bsd.own.mk: Introduce CC_WNO_USE_AFTER_FREE for GCC12
-Wuse-after-free for GCC 12 is premature. It fires on a common idiom:

	newbuf = realloc(buf, size);
	p = newbuf + (p - buf);

Let shut this up for GCC 12 (with hoping it gets improved for 13!).
2023-08-03 13:33:26 +00:00
gutteridge c12abbe8a5 acronyms.comp: add MLO, MMC, SPL
It takes a lot of acronyms to boot a kernel!
2023-08-03 02:32:16 +00:00
riastradh c59176887b percpu(9): percpu_create ctor may be called later, not synchronously. 2023-08-02 06:24:46 +00:00
andvar 538aaa59ec s/diabled/disabled/. 2023-08-01 20:41:48 +00:00
andvar 4d6b356985 s/intrerrupt/interrupt/. 2023-08-01 20:39:15 +00:00
mrg 718c7faca0 we skipped GCC 11, so change the test to GCC 12. 2023-08-01 06:52:06 +00:00
rin e38fc7d6bc web2: sort -f, dedup. Fix ATF failure for nbperf(1). 2023-08-01 03:28:53 +00:00
christos ea52ff2b8a we ended up importing 13.2 2023-07-31 17:35:31 +00:00
tsutsui 2d72037083 Use proper variables for interface names in examples. 2023-07-31 16:09:01 +00:00
dholland 1482d081f7 web2: restore snit, accidentally lost in -r1.49 2023-07-31 05:36:41 +00:00
dholland 9252c23337 web2: since we seem to be accumulating personal names in here, add a bunch. 2023-07-31 05:35:44 +00:00
wiz d9edfcdd69 New sentence, new line. 2023-07-30 00:11:32 +00:00
gdt ee36da189c nvmm(4): Document that VMX Unrestricted Guest is required 2023-07-29 23:11:50 +00:00
lukem 07c42e4bc2 bsd.own.mk: force MKSTRIPSYM=no if MKDEBUG=yes
Local symbols are desirable with MKDEBUG=yes, so don't strip them.
Per request from mrg@
2023-07-23 16:52:37 +00:00
lukem cff541e1aa bsd.own.mk: style: block comments, move CC_flag vars
Add #{ .. #} block comments to a long conditional.

Move the CC_flag variables closer to other compiler-related
variables instead of being in the middle of some arch-specific
overrides.
2023-07-23 16:49:29 +00:00
lukem 3575dfc126 bsd.README: sync with mk.conf(5), deduping entries
Remove most duplication of variables already documented in mk.conf(5).
Add lists of supported and obsolete mk.conf(5) variables
so that searches in this document at least find them
(as per BUILDING).

Sync text from mk.conf(5) for entries that remain.
Explicitly document DESTDIR and RELEASEDIR.

Replace MKMAN=no antipattern with NOMAN=.

Consistently use "option" versus "flag"; option is more generic,
and may include a flag with an argument.
2023-07-22 18:50:31 +00:00
lukem e19f50d0d4 mk.conf(5): tweak BUILDID and option. sort MKKDEBUG
Clarify BUILDID behaviour with OBJMACHINE, and remove unnecessary sentence.
Use option not flag; option may include a flag with an argument.
Sort MKKDEBUG before MKKERBEROS4.
2023-07-22 18:49:40 +00:00
riastradh 17503da2a0 bsd.own.mk: Use MACHINE_ARCH for default MKCTF/MKDTRACE=yes x86.
The substantive impact of this is that it enables MKCTF=yes for Xen
kernels.  This is a change because, when building a Xen kernel
(XEN3_DOM0, XEN3_DOMU), MACHINE is set to `xen', not to `i386' or
`amd64', so the conditional never took effect.

(The side effect of setting MKDTRACE=yes when building Xen kernels is
unlikely to matter; that affects module and userland builds.)

PR port-xen/57535

XXX pullup-10
2023-07-21 20:03:13 +00:00
gutteridge 7a42da0231 entropy.7: add a missing word to a sentence
While here, bump the date to reflect when substantive changes were last
made.
2023-07-20 04:16:14 +00:00
riastradh 17cc32643c signal(7): Clarify semantics of SIGCHLD with SIG_IGN or SA_NOCLDWAIT.
The semantics is not just a nonportable hack for SysV compatibility;
it is enshrined in POSIX.

Related: PR 57527
2023-07-17 14:20:19 +00:00
riastradh 5524172f85 kern: Make time_second and time_uptime macros that work atomically.
These use atomic load on platforms with atomic 64-bit load, and
seqlocks on platforms without.

This has the unfortunate side effect of slightly reducing the real
times available on 32-bit platforms, from ending some time in the
year 584942417218 AD, available on 64-bit platforms, to ending some
time in the year 584942417355 AD.  But during that slightly shorter
time, 32-bit platforms can avoid bugs arising from non-atomic access
to time_uptime and time_second.

Note: All platforms still have non-atomic access problems for
bintime, binuptime, nanotime, nanouptime, &c.  This can be addressed
by putting a seqlock around timebasebin and possibly some other
variable -- to be done in a later change.

XXX kernel ABI change -- deleting symbols
2023-07-17 12:55:20 +00:00
riastradh 5aec88eaa6 signal(7): Clarify quirky SysV-inspired SIGCHLD semantics.
Suggest a portable alternative approach for detaching subprocesses.

Break wall of text into paragraphs while here.
2023-07-15 13:49:26 +00:00
rillig 7c7ed4e6a2 versioningsyscalls.9: fix typo 2023-07-14 09:03:37 +00:00
uwe d412d6c0f7 versioningsyscalls(9): wrap long line in the example 2023-07-10 23:55:13 +00:00
christos 63191be3a4 Forgot to commit the expanded userland portion 2023-07-10 15:54:18 +00:00
riastradh 70ecadb004 ddb: New `show all tstiles' command.
Shows who's waiting for which locks and what the owner is up to.

XXX pullup-10
2023-07-09 17:10:47 +00:00
uwe e200f46a48 versioningsyscalls(9): markup fixes
While here, fix the pasto for the new ino_t and time_t size.
2023-07-09 00:29:49 +00:00
christos e706571b76 Document how system call versioning is done. From this summer's compat-linux
GSoC, by Theodore Preduta.
2023-07-08 16:14:11 +00:00
riastradh 3271fbd4fa curcpu_stable(9): New function for asserting curcpu() is stable. 2023-07-08 13:59:05 +00:00
uwe 92446808ba heartbeat(9): markup fixes
Use .Cd for options.  Don't use the usual <space><tab>, which is
superfluous in the man page.  Paragraph break after the config section
of synopsis, before the C API section.
2023-07-07 15:56:31 +00:00
riastradh 10acd8549e heartbeat(9): Fix grammaro in man page. 2023-07-07 13:19:30 +00:00
wiz 04c9d4b262 Replace main(9) reference with code location 2023-07-07 13:15:00 +00:00
wiz 7057286892 Sort SEE ALSO 2023-07-07 12:59:45 +00:00
riastradh 12861a663c heartbeat(9): New mechanism to check progress of kernel.
This uses hard interrupts to check progress of low-priority soft
interrupts, and one CPU to check progress of another CPU.

If no progress has been made after a configurable number of seconds
(kern.heartbeat.max_period, default 15), then the system panics --
preferably on the CPU that is stuck so we get a stack trace in dmesg
of where it was stuck, but if the stuckness was detected by another
CPU and the stuck CPU doesn't acknowledge the request to panic within
one second, the detecting CPU panics instead.

This doesn't supplant hardware watchdog timers.  It is possible for
hard interrupts to be stuck on all CPUs for some reason too; in that
case heartbeat(9) has no opportunity to complete.

Downside: heartbeat(9) relies on hardclock to run at a reasonably
consistent rate, which might cause trouble for the glorious tickless
future.  However, it could be adapted to take a parameter for an
approximate number of units that have elapsed since the last call on
the current CPU, rather than treating that as a constant 1.

XXX kernel revbump -- changes struct cpu_info layout
2023-07-07 12:34:49 +00:00
jschauma becf7fe907 +CAC - cryptographic access control 2023-07-06 21:10:15 +00:00
lukem 0ae90b729a mk.conf(5): document rump variables
Update mk.conf(5) with the rump variables from
- lib/librumpuser/README.compileopts
- sys/rump/README.compileopts

Add cross-references back to mk.conf(5) in those files.

Ensure that the Default: is listed last in a description,
for consistency with the convention in this file.
2023-07-05 16:40:33 +00:00
riastradh e857694c31 rc.conf(5): Set entropy=wait by default.
We no longer block indefinitely -- if nothing else, the hardclock
timer should yield enough samples to unblock /dev/random on all but
the most severely deterministic machines -- so it should be generally
safe for availability to set entropy=wait.

This doesn't guarantee that HWRNG/seed has been provided before you
run ssh-keygen or call getentropy(3) in a user application, but it
does raise the security above netbsd<=9.

PR security/55659
PR lib/56905

XXX pullup-10
2023-06-30 21:44:09 +00:00
riastradh 96b2c7de8d entropy(9): Reintroduce netbsd<=9 time-delta estimator for unblocking.
The system will (in a subsequent change) by default block for this
condition before almost all of userland is running (including
/etc/rc.d/sshd key generation).  That way, a never-blocking
getentropy(3) API will never return any data without at least
best-effort entropy like netbsd<=9 did to applications except in
single-user mode (where you have to be careful about everything
anyway) or in the few processes that run before a seed can even be
loaded (where blocking indefinitely, e.g. when generating a stack
protector cookie in libc, could pose a severe availability problem
that can't be configured away, but where the security impact is low).

However, (in another subsequent change) we will continue to use
_only_ HWRNG driver estimates and seed estimates, and _not_
time-delta estimator, for _warning_ about security in motd, daily
security report, etc.  And if HWRNG/seed provides enough entropy
before time-delta estimator does, that will unblock /dev/random too.

The result is:

- Machines with HWRNG or seed won't warn about entropy and will
  essentially never block -- even on first boot without a seed, it
  will take only as long as the fastest HWRNG to unblock.

- Machines with neither HWRNG nor seed:
  . will warn about entropy, giving feedback about security;
    and
  . will avoid returning anything more predictable than netbsd<=9;
    but
  . won't block (much) longer than netbsd<=9 would (and won't block
    again after blocking once, except with kern.entropy.depletion=1 for
    testing).

  (The threshold for unblocking is now somewhat higher than before:
  512 samples that pass the time-delta estimator, rather than 80 as
  it used to be.)

  And, of course, adding a seed (or HWRNG) will prevent both warnings
  and blocking.

The mechanism is:

1. /dev/random will block until _either_

   (a) enough bits of entropy (256) from reliable sources have been
       added to the pool, _or_

   (b) enough samples have been added from any sources (512), passing
       the old time-delta entropy estimator, that the possible
       security benefit doesn't justify holding up availability any
       longer (`best effort'), except on systems with higher security
       requirements like securelevel=2 which can disable non-HWRNG,
       non-seed sources with rndctl_flags in rc.conf(5).

2. dmesg will report `entropy: ready' when 1(a) is satisfied, but if
   1(b) is satisfied first, it will report `entropy: best effort', so
   the concise log messages will reflect the timing and whether in
   any period of time any of the system might be relying on best
   effort entropy.

3. The sysctl knob kern.entropy.needed (and the ioctl RNDGETPOOLSTAT
   variable rndpoolstat_t::added) still reflects the number of bits
   of entropy from reliable sources, so we can still use this to
   suggest regenerating ssh keys.

   This matters on platforms that can only be reached, after flashing
   an installation image, by sshing in over a (private) network, like
   small network appliances or remote virtual machines without
   (interactive) serial consoles.  If we blocked indefinitely at boot
   when generating ssh keys, such platforms would be unusable.  This
   way, platforms are usable, but operators can still be advised at
   login time to regenerate keys as soon as they can actually load
   entropy onto the system, e.g. with rndctl(8) on a seed file copied
   from a local machine over the (private) network.

4. On machines without HWRNG, using a seed file still suppresses
   warnings for users who need more confident security.  But it is no
   longer necessary for availability.

This is a compromise between availability and security:

- The security mechanism of blocking indefinitely on machines without
  HWRNG hurts availability too much, as painful experience over the
  multiple years since I made the mistake of introducing it have
  shown.  (Sorry!)

- The other main alternative, not having a blocking path at all (as I
  pushed for, and as OpenBSD has done for a long time) could
  potentially reduce security vs netbsd<=9, and would run against the
  expectations set by many popular operating systems to the severe
  detriment of public perception of NetBSD security.

Even though we can't _confidently_ assess enough entropy from, e.g.,
sampling interrupt timings, this is the traditional behaviour that
most operating systems provide -- and the result here is a net
nondecrease in security over netbsd<=9, because all paths from the
entropy pool to userland now have at least as high a standard before
returning data as they did in netbsd<=9.

PR kern/55641
PR pkg/55847
PR kern/57185
https://mail-index.netbsd.org/current-users/2020/09/02/msg039470.html
https://mail-index.netbsd.org/current-users/2020/11/21/msg039931.html
https://mail-index.netbsd.org/current-users/2020/12/05/msg040019.html

XXX pullup-10
2023-06-30 21:42:05 +00:00
gutteridge 5388ce56e6 Add npflog.4 to sets 2023-06-30 00:48:03 +00:00
gutteridge c5615faf33 npflog.4: add and adjust some details
Add details about the header structure (though the if_npflog.h file is
not presently installed and has a _KERNEL guard). Also adjust some
sentences (requested by riastradh@), and include the original OpenBSD
RCS ID, since much of this content shares that origin.
2023-06-29 23:20:02 +00:00
gutteridge 8960a02553 npflog.4: add a man page for the npflog device
Addresses PR misc/57441 from Taylor R Campbell. (Not yet hooked into
source sets, will be done separately.)

(Borrows heavily from the equivalent pflog.4 man page already in tree,
and so retains the original copyright attribution as well.)
2023-06-20 01:02:46 +00:00
riastradh 6a95326040 sysctl(7): Note nodev,nosuid requirement for user-mounted fs.
While here, tidy up language and markup a smidge.
2023-06-18 18:16:40 +00:00
jschauma af9bcbd29f +CNA (CVE Numbering Authority) 2023-06-15 13:11:20 +00:00
hannken c6f338e399 VOP_IOCTL() is a wrapper around spec_ioctl() aka Xdev_ioctl() and
protected with spec_io_enter()/spec_io_exit() so there is no need
to force specific vnode locking.

Set locking requirement to '= = =' (unchanged, locked or unlocked).

PR kern/57450 (unplugging hung USB disk triggers panic via _vstate_assert)
2023-06-15 09:13:36 +00:00