Commit Graph

305584 Commits

Author SHA1 Message Date
rillig 34885a599d lint: fix integer overflow in integer overflow check 2024-03-10 10:15:51 +00:00
rillig 16f849b643 tests/lint: test integer overflow when folding constants
The test is still incomplete, yet it has discovered several bugs that
are worth fixing.
2024-03-10 09:58:30 +00:00
rillig c11cfaed7e lint: in check for integer overflow, sort operators 2024-03-10 09:24:54 +00:00
mrg 639abfc2e4 nvme(4): don't write to INTMC register if in intx mode
this matches the handling of INTMS, both of which have the same
restrictions on access in MSI-X mode.

ideally, this register should be written to with a full set of
values for MSI (upto 32 bits), but trying to force MSI mode for
my test machine makes the system unstable.

tested with samsung SM981 256GB, samsung 980 PRO 1TB, and intel
760p 250G.
2024-03-10 04:49:22 +00:00
riastradh 8fe05e48e2 wg(4): Bind to CPU in wg_handle_packet.
Required by use of psref there.

Assert we're bound up front so we catch mistakes early, rather than
later on if we get unlucky in preemption and scheduling.

PR bin/58021
2024-03-10 04:21:47 +00:00
sjg b52179abfc make: record exit status in GNode
SetErrorVars can now set .ERROR_EXIT which allows
a .ERROR target to ignore the case of .ERROR_EXIT == 6
which means failure happened elsewhere.

Reviewed by:
2024-03-10 02:53:37 +00:00
rillig 3e856647d2 lint: fix excessive overflow warning after division by zero 2024-03-09 23:55:11 +00:00
mrg 76021c6ba1 aq(4): always poll for link status
some devices don't have working link status and rather than have
a likely incomplete list of issues, always poll as well as use
the interrupt if possible.

fixes link status on this device:

aq0 at pci5 dev 0 function 0: Aquantia AQC107 10 Gigabit Network Adapter (rev. 0x02)
aq0: Atlantic revision B1, F/W version 3.1.88

(was otherwise functional, just didn't report status, which likely
meant eg, dhcpcd would be upset?)

idea via mlelstv@ from linux.

remove sc_detect_linkstat and rename sc_poll_linkstat to
sc_no_link_intr, as the meaning has changed.  simplify the signature
for aq_setup_msix() and aq_establish_msix_intr(), removing forward
decls that aren't required.  obsolete AQ_FORCE_POLL_LINKSTAT.
2024-03-09 22:03:32 +00:00
gutteridge fe9c735108 dlfcn.3: remove duplicated dlopen() entry 2024-03-09 18:43:39 +00:00
rillig 2b5c0f6a77 tests/lint: demonstrate integer overflow on lp64 platforms 2024-03-09 17:34:01 +00:00
rillig d6cf182bfe tests/lint: test check for out-of-bounds array index 2024-03-09 16:47:09 +00:00
uwe 05c0809b0e dlfcn(3): touch up markup 2024-03-09 15:21:38 +00:00
rillig 4ed4a1b76a lint: merge duplicate code for checking array index 2024-03-09 14:54:14 +00:00
riastradh 6e7bb15f48 tun(4): Allow IPv6 packets with TUNSLMODE configured.
PR kern/58013
2024-03-09 13:55:27 +00:00
rillig 3b4840f15a lint: inline accessor macros for tnode_t 2024-03-09 13:54:47 +00:00
mlelstv 3fb2741729 Don't use uninitialized variable.
Fixes PR 57895.
2024-03-09 13:48:50 +00:00
rillig 73c14755e5 lint: inline accessor macros for type_t 2024-03-09 13:20:55 +00:00
riastradh 5e64afbae8 wg(4): Spruce up example a bit.
- Suggest umask so the private keys aren't world readable.
- Suggest use of pre-shared key files.
- Use TEST-NET-1 and TEST-NET-2 addresses for the example instead of
  real publicly routable addresses.

Holding off on adding IPv6 example until the tun(4) issue is fixed
(PR bin/58013).

PR misc/58015
2024-03-09 12:36:07 +00:00
isaki 2cd310f610 Fix a null dereference (on attach failure).
During cleanup, setup_queue may be called even before vsc->sc_vqs is assigned.
2024-03-09 11:55:59 +00:00
isaki 445fbf37f2 Fix a null dereference.
free_interrupts may be called even when sc_ih has not been assigned yet.
2024-03-09 11:16:31 +00:00
rillig 0644d39b2d lint: clean up comments, use typedefs 2024-03-09 11:05:05 +00:00
isaki fd455effe3 Modify a confused expression in ld_virtio_attach().
VIRTIO_BLK_MIN_SEGMENTS should be the total number of non-data segments,
so I rename it to VIRTIO_BLK_CTRL_SEGMENTS.
PR kern/57981.
2024-03-09 11:04:22 +00:00
rillig 15d27de1fa lint: internally store case label values in order of appearance 2024-03-09 10:54:12 +00:00
rillig 70f9d5c54d lint: remove unneeded checks for left and right operands 2024-03-09 10:47:16 +00:00
rillig 5a97e61464 lint: use fewer struct keywords 2024-03-09 10:41:11 +00:00
mrg 4072902f97 drm(4): make pr_debug equivalent to aprint_debug
significantly reduces the default spam from amdgpu(4).
2024-03-09 09:55:52 +00:00
mrg cec94d4f24 skip this subdir for "make includes".
it's excessively slow and does nothing (nor should it.)
2024-03-09 06:53:48 +00:00
rillig 3f5e8f7d32 postinstall: fix endless loop (since 2024-03-07) 2024-03-09 06:51:40 +00:00
mrg d5af1f8fb3 avoid rebuilding texi files in the read-only source tree 2024-03-09 06:51:24 +00:00
mrg aa397e14a2 allow XZ_OPT to be overriden. 2024-03-09 06:50:15 +00:00
riastradh 0ccbdf5555 pmf(9): Document the bug in pmf_device_register return type.
PR kern/57575
2024-03-09 05:22:05 +00:00
riastradh c4eba877ac heartbeat(9): Return early if panicstr is set.
This way we avoid doing unnecessary work -- and print unnecessary
messages -- to _not_ trigger another panic anyway.

PR kern/58011
2024-03-08 23:34:03 +00:00
rillig 88b554245c cpuctl: fix i386 bit descriptions for CPUID_SEF_FLAGS1
warning: non-printing character '\31' in description
    'BUS_LOCK_DETECT""b\31' [363]
2024-03-08 20:29:17 +00:00
rillig 856bcfe408 ifconfig: fix agr status
Previously, when the interface was collecting, its status was reported
as '<COLLECTING,DISTRIBUTING>', even when it was not distributing.

sbin/ifconfig/agr.c(170): warning: 'b\0DISTRIBUTING\0' overlaps earlier
    'b\0COLLECTING\0' on bit 0 [376]
2024-03-08 19:45:59 +00:00
mrg 1498001423 give some anonymous structures names 2024-03-08 07:05:02 +00:00
mrg b4c3b934ba audio_wav_parse_hdr(): avoid buffer overreads and clean up
reimplement most of this function using a new method of buffer
management to ensure that we never read beyond the provided size.

properly handle RIFF chunk lengths, instead of assuming various
offsets from most files are right.

update list of consumed documentation and fill the list of WAVE
formats from RFC 2361 (most remain not supported.)

should fix PR#57973.

tested against a large number of .wav files i have handy and with
a testsuite generator that should be incoming soon.
2024-03-08 06:57:59 +00:00
gutteridge d8c86e1768 sysctl.7: simplify statements about net.inet6 variables 2024-03-07 23:03:55 +00:00
christos 81e2be5eb1 Add _dlauxinfo.3 2024-03-07 22:15:52 +00:00
christos e2930fdd86 Add _dlauxinfo 2024-03-07 22:14:20 +00:00
christos fd2cfa10fe no local in loops, simplify eval (thanks kre) 2024-03-07 22:03:16 +00:00
christos d57953e9b2 pass lint on sparc64 where int_fast32_t is long. 2024-03-07 20:42:04 +00:00
christos c1843a3608 Make sure that the extra field is maximally aligned since it is used for
other struct storage.
2024-03-07 17:10:37 +00:00
christos 2a38a1154f - fix named.conf (remove dnssec-enable option)
- use proper local variables instead of adding _ or other prefixes.
- centralize rm use
- use grep -q instead of > /dev/null
- reduce constant duplication
2024-03-07 16:54:16 +00:00
christos 04af249a7e remove obsolete option "dnssec-enable" 2024-03-07 14:21:03 +00:00
gutteridge 43f3dea196 3RDPARTY: autoconf is at 2.72 now 2024-03-07 00:35:10 +00:00
cnst 76d3c3c18a wwanc(4): amend Nd; Xr from pci(4) 2024-03-06 22:18:56 +00:00
andvar 2ddc9e7fa6 s/horizontaol/horizontal/ in comments. 2024-03-06 20:18:42 +00:00
andvar 1c79931e30 Fix few typos in comments. 2024-03-06 20:02:24 +00:00
andvar ee1106db37 s/lader/loader/ in comments. 2024-03-06 19:48:53 +00:00
wiz 0898e66884 new llvm out 2024-03-06 17:44:48 +00:00