Commit Graph

305261 Commits

Author SHA1 Message Date
skrll dc3c095de0 Steal the sync operation descriptions from FreeBSD and improve other
wording in this area.

Inspired by jmcneill@
2024-02-17 08:27:46 +00:00
tsutsui fadaceb783 Fix another fatal typo that causes zskbd_cngetc() to stall as dzkbd.
Tested on my DEC 3000/300 and LK421.
Should be pulled up to netbsd-10 and netbsd-9.

XXX: sys/arch/vax/uba/qvkbd.c seems missed in the following lk201 changes:
 https://mail-index.netbsd.org/source-changes/2015/01/02/msg062024.html
2024-02-17 06:35:25 +00:00
uwe 02f7676d3a getnameinfo(3): fix/prettify markup 2024-02-16 22:50:33 +00:00
andvar bd86d05e3e Replace obsolete pv_dump() call with pmap_db_mdpg_print().
It was rewritten on rev 1.107, but not replaced with new implementation in
PMAP_PV_DEBUG guarded block.
2024-02-16 21:32:17 +00:00
rillig e8d4427725 snprintb: do not modify bufsize when producing multiple lines 2024-02-16 21:25:46 +00:00
rillig 0b94bf4814 snprintb: eliminate two local variables, allow zero-size buffer
Like snprintf, the buffer size may be zero. Unlike snprintf, the buffer
must not be NULL.
2024-02-16 19:53:40 +00:00
jkoshy 548a68cebb Remove obsolete code.
Per src/doc/CHANGES.prev support for the NI_WITHSCOPEID flag was removed
in NetBSD 1.6.
2024-02-16 19:32:38 +00:00
rillig 9d8f0ef5b5 snprintb: use size_t for buffer sizes and positions 2024-02-16 19:31:25 +00:00
rillig c277ab1882 snprintb: fix integer overflow when writing past a small buffer
Previously, snprintb returned -1 in this case, assuming that the
snprintf used in FMTSTR validates against an overly large buffer size.
2024-02-16 19:20:38 +00:00
rillig 8fe8a849c2 snprintb: use unsigned integers for parsing the bitfmt 2024-02-16 18:17:10 +00:00
rillig 9ec1abff9d tests/snprintb: fix test for 8-bit field value
The previous version tested the behavior on a platform with signed
'char' before the portability fix.
2024-02-16 18:13:47 +00:00
rillig 889b1738f6 snprintb: fix '=' and ':' for 8-bit values on platforms with signed char
Previously, '=' and ':' worked only on platforms where plain 'char' is
unsigned. On platforms where plain 'char' is signed, only 7-bit values
worked.
2024-02-16 18:09:15 +00:00
rillig 8548878b97 snprintb: eliminate a few local variables 2024-02-16 18:03:16 +00:00
rillig 798cb1a74f snprintb: rename local variables
The single-letter variables 't', 's', 'l' and 'c' were too hard to
decipher.

The variable 'f_len' was used for two independent purposes.

Use a narrow scope for some variables, to avoid having to keep track of
22 individual variables at the same time.

No binary change.
2024-02-16 17:42:49 +00:00
andvar b2b7d154b5 Fix closing bracket for strdisasm() function.
Fixes KOBJ_MACHDEP_DEBUG enabled build for aarch64.
2024-02-16 17:18:19 +00:00
skrll 790f4cb583 Retire BCM53XX_CONSOLE_EARLY in favour of EARLYCONS 2024-02-16 16:28:49 +00:00
skrll 040169d509 Test sc->sc_soft_ih (not sc->sc_ih) to see if the soft interrupt got
established correctly.

From Mori Hiroki.

Fix some error recovery while I'm here.
2024-02-16 15:40:09 +00:00
skrll 14ad16f026 Trailing whitespace 2024-02-16 15:11:17 +00:00
skrll dd6dd1a64b Fix non-DIAGNOSTIC build 2024-02-16 12:08:29 +00:00
jkoshy fbaf967b8e Note that the NI_WITHSCOPEID flag is obsolete. 2024-02-16 11:13:59 +00:00
rillig 64ace9d638 snprintb: clean up
Remove redundant parentheses and casts.

Indent statement-like macros consistently, use separate lines for each
statement, add parentheses to macro definitions.

Remove CONSTCOND comments as lint doesn't need them anymore.

No binary change.
2024-02-16 01:57:50 +00:00
rillig 935bb26983 tests/snprintb: clean up existing tests, add more tests
Due to the check that any bytes beyond the expected output must be
unmodified, there's no need anymore to explicitly write the "ZZZ" at the
end of the expected output. While here, remove the redundant trailing
"\0".

Add more tests to cover possible situations where an out-of-bounds write
may have occurred. In some cases, the line length specified in
snprintb_m is exceeded.
2024-02-16 01:19:53 +00:00
rillig 26844513e8 snprintb: fix string termination (since today)
In the previous commit, I had accidentally only run the tests for
snprintb_m but not those for snprintb, thereby missing a newly
introduced bug that would not null-terminate the resulting strings.

Add more tests to cover similar situations in which the buffer is too
small to contain the complete output.
2024-02-15 23:48:51 +00:00
rillig 6f937561f5 snprintb: rename buflen to bufsize, following the wording in snprintf 2024-02-15 22:48:58 +00:00
rillig 795d5f45da snprintb: fix out-of-bounds write 2024-02-15 22:37:10 +00:00
macallan 949bc4d76d blitter time!
everything except drawing characters i now done by hardware
next step - glyphcache
2024-02-15 16:17:32 +00:00
jkoshy 262fc961f4 Document the NI_NUMERICSCOPE flag.
PR lib/57832
2024-02-15 15:08:23 +00:00
rillig 1fb4457e9f tests/libutil/snprintb_m: add tests for small line length 2024-02-14 20:51:17 +00:00
nia 6025177e40 doc: Fix syntax 2024-02-14 19:20:29 +00:00
christos d231a5d255 sprinkle unused. 2024-02-14 18:00:02 +00:00
martin 4013f0cf31 PR 57927: when comparing old and new partition state during renumbering,
ignore differences in the install target flag - the backend might have
flipped it off already to ensure only a single partition is marked
as install target.
2024-02-14 13:52:11 +00:00
tsutsui 8de5b505c8 Use proper macro for return values and remove #if 0'ed out block.
Mostly from OpenBSD/vax. No binary changes.
2024-02-14 12:59:44 +00:00
tsutsui aec2656993 Fix a fatal typo that causes dzkbd_cngetc() to stall.
Should be pulled up to netbsd-10 and netbsd-9.
2024-02-14 12:49:47 +00:00
andvar 0a9a5be13b s/Enque/Enqueue/ in comment. 2024-02-13 21:40:02 +00:00
andvar 27b381f479 s/enqueing/enqueuing/ in debug messages (took a bait from recent Nick's commit)
s/occaision/occasion/ in comment.
2024-02-13 21:39:02 +00:00
skrll acd01736ee Define KERNEL_VOFFSET_RUNTIME=1 to fix build of BCM5301X and BCM56340 2024-02-13 19:07:42 +00:00
christos 74cc861970 https://www.phoronix.com/news/IWD-WPA-WiFi-Auth-Vulns
https://www.top10vpn.com/research/wifi-vulnerabilities/

PEAP client: Update Phase 2 authentication requirements

The previous PEAP client behavior allowed the server to skip Phase 2
authentication with the expectation that the server was authenticated
during Phase 1 through TLS server certificate validation. Various PEAP
specifications are not exactly clear on what the behavior on this front
is supposed to be and as such, this ended up being more flexible than
the TTLS/FAST/TEAP cases. However, this is not really ideal when
unfortunately common misconfiguration of PEAP is used in deployed
devices where the server trust root (ca_cert) is not configured or the
user has an easy option for allowing this validation step to be skipped.

Change the default PEAP client behavior to be to require Phase 2
authentication to be successfully completed for cases where TLS session
resumption is not used and the client certificate has not been
configured. Those two exceptions are the main cases where a deployed
authentication server might skip Phase 2 and as such, where a more
strict default behavior could result in undesired interoperability
issues. Requiring Phase 2 authentication will end up disabling TLS
session resumption automatically to avoid interoperability issues.

Allow Phase 2 authentication behavior to be configured with a new phase1
configuration parameter option:
'phase2_auth' option can be used to control Phase 2 (i.e., within TLS
tunnel) behavior for PEAP:
 * 0 = do not require Phase 2 authentication
 * 1 = require Phase 2 authentication when client certificate
   (private_key/client_cert) is no used and TLS session resumption was
   not used (default)
 * 2 = require Phase 2 authentication in all cases
2024-02-13 18:43:45 +00:00
christos 2b27d363b9 Allow overriding the language standard to something newer. 2024-02-13 16:15:59 +00:00
christos 07c75f64fb Mention bind security patches 2024-02-13 15:40:28 +00:00
christos ed3bb99ed9 make things compile again. 2024-02-13 15:34:22 +00:00
nia b7765955d2 doc: Changes since 20/01 2024-02-13 15:28:41 +00:00
christos aaa4e2aabf Apply patch for CVE-2023-50387 and CVE-2023-50868:
No public information has been posted (that I can find)
2024-02-13 15:27:20 +00:00
christos f120c4bc4d Apply patch for CVE-2023-6516:
To keep its cache database efficient, `named` running as a recursive
resolver occasionally attempts to clean up the database. It uses
several methods, including some that are asynchronous: a small
chunk of memory pointing to the cache element that can be cleaned
up is first allocated and then queued for later processing. It was
discovered that if the resolver is continuously processing query
patterns triggering this type of cache-database maintenance, `named`
may not be able to handle the cleanup events in a timely manner.
This in turn enables the list of queued cleanup events to grow
infinitely large over time, allowing the configured `max-cache-size`
limit to be significantly exceeded. This issue affects BIND 9
versions 9.16.0 through 9.16.45 and 9.16.8-S1 through 9.16.45-S1.
2024-02-13 15:24:47 +00:00
christos 5a76d1fd2a Apply patch for CVE-2023-5679:
A bad interaction between DNS64 and serve-stale may cause `named`
to crash with an assertion failure during recursive resolution,
when both of these features are enabled. This issue affects BIND
9 versions 9.16.12 through 9.16.45, 9.18.0 through 9.18.21, 9.19.0
through 9.19.19, 9.16.12-S1 through 9.16.45-S1, and 9.18.11-S1
through 9.18.21-S1.
2024-02-13 15:23:15 +00:00
christos 4d97841ec1 Apply patch for CVE-2023-5517:
A flaw in query-handling code can cause `named` to exit prematurely
with an assertion failure when: - `nxdomain-redirect <domain>;` is
configured, and - the resolver receives a PTR query for an RFC 1918
address that would normally result in an authoritative NXDOMAIN
response. This issue affects BIND 9 versions 9.12.0 through 9.16.45,
9.18.0 through 9.18.21, 9.19.0 through 9.19.19, 9.16.8-S1 through
9.16.45-S1, and 9.18.11-S1 through 9.18.21-S1.
2024-02-13 15:22:03 +00:00
christos 05b7d02202 Apply patch for CVE-2023-4408:
The DNS message parsing code in `named` includes a section whose
computational complexity is overly high. It does not cause problems
for typical DNS traffic, but crafted queries and responses may
cause excessive CPU load on the affected `named` instance by
exploiting this flaw. This issue affects both authoritative servers
and recursive resolvers. This issue affects BIND 9 versions 9.0.0
through 9.16.45, 9.18.0 through 9.18.21, 9.19.0 through 9.19.19,
9.9.3-S1 through 9.11.37-S1, 9.16.8-S1 through 9.16.45-S1, and
9.18.11-S1 through 9.18.21-S1.
2024-02-13 15:21:09 +00:00
msaitoh 7a48c000b2 mfii(4): Apply two changes from OpenBSD to fix an unknown firmware state.
My own MegaRAID 946N-8i 2G", firmware 50.5.0-2594 failed to attach.

	mfii0: unknown firmware state 1879048192

1879048192 equals to 0x70000000(== MFI_STATE_FW_INIT_2).
Apply following two OpenBSD commits to resolve this problem.

----------------------------
sys/dev/pci/mfii.c OpenBSD rev. 1.86
sys/dev/ic/mfireg.h OpenBSD rev. 1.52

Make mfii(4) recover from firmware FAULT state on startup.

In case firmware initially comes up in FAULT state, reset the device and
give it one more chance to attach successfully. The Linux megaraid_sas
driver applies the same workaround in this case. There seems to be a bug
in some firmware versions which can trigger this behaviour; see mainline
Linux commit 6431f5d7c6025f8b007af06ea090de308f7e6881

Problem observed by me with mfii(4) attached via KVM PCI-passthrough:
mfii0 at pci0 dev 2 function 0 "Symbios Logic MegaRAID SAS2208" rev 0x05: msi
mfii0: firmware fault

With this workaround in place, attachment succeeds and the device works:
mfii0 at pci0 dev 2 function 0 "Symbios Logic MegaRAID SAS2208" rev 0x05: msi
mfii0: firmware fault; attempting full device reset, this can take some time
mfii0: "RAID Ctrl SAS 6G 1GB (D3116C)", firmware 23.29.0-0019, 1024MB cache

Tested for regressions on bare metal by Hrvoje with two different adapters:
mfii0 at pci1 dev 0 function 0 "Symbios Logic MegaRAID SAS3508" rev 0x01: msi
mfii0: "PERC H740P Mini ", firmware 51.16.0-4076, 8192MB cache
mfii0 at pci4 dev 0 function 0 "Symbios Logic MegaRAID SAS2208" rev 0x05: msi
mfii0: "ServeRAID M5110", firmware 23.34.0-0023, 512MB cache

ok jmatthew@

----------------------------
sys/dev/pci/mfii.c OpenBSD rev. 1.87

Give mfii(4) firmware more time to transition out of UNDEFINED state.

Prevents occasional failure to recover from firmware FAULT state where
the driver gave up too early: mfii0: firmware stuck in state 0

ok deraadt@
2024-02-13 14:56:52 +00:00
thorpej b58c5ebc09 Add the Sun3 obio flavor's DMA controller access registers. 2024-02-13 13:46:14 +00:00
macallan bd04fd950e crude beginning of a native driver for PCI Visualize EG cards
so far it supports:
- colour
- virtual consoles
todo:
- mmap
- hardware acceleration
- STI refactoring
2024-02-13 13:40:13 +00:00
macallan 0e59d392bf in sti_screen_setup() don't bother looking for fonts if STI_FBMODE is requested 2024-02-13 13:17:51 +00:00