Commit Graph

295205 Commits

Author SHA1 Message Date
uwe 56d82ecaa1 pcdisplay_getwschar: on error return error code, not -1.
This value ends up being returned from vga_ioctl to sys_ioctl which
expects an errno and spams kernel log otherwise.

Ditto for pcdisplay_putwschar.
2022-03-25 12:24:44 +00:00
hannken 11fe93c946 Prevent memory corruption from wg_send_handshake_msg_init() on
LP64 machines with "MSIZE == 256", sparc64 for example.

wg_send_handshake_msg_init() tries to put 148 bytes into a buffer
of 144 bytes and overwrites 4 bytes following the mbuf.  Check
for "sizeof() > MHLEN" and use a cluster in this case.

With help from Taylor R Campbell <riastradh@>
2022-03-25 08:57:50 +00:00
hannken 31300dae7e It is impossible for VOP_LOCK() to return ENOENT with LK_RETRY flag.
Remove the second call to VOP_LOCK().

Enable assertion "vrefcnt(vp) > 0" and assert all possible errors
for all LK_RETRY/LK_NOWAIT combinations.
2022-03-25 08:57:15 +00:00
hannken d19234a670 As VV_LOCKSWORK is gone remove LOCKSWORK from VNODE_FLAGBITS string.
Also convert illegal octal number 18 to 20.
2022-03-25 08:56:36 +00:00
wiz 96dbc6bc3d igpio(4): fix date 2022-03-24 16:33:58 +00:00
wiz 83aebf56b2 add more igpio man pages (cat4, html4) 2022-03-24 16:33:05 +00:00
christos 7c976da19e put back the 2022a changes and fix the misplaced brace. 2022-03-24 16:15:05 +00:00
manu 5943c0fc2c Add man page for Intel GPIO igpio.4 2022-03-24 14:04:28 +00:00
manu b3d1d56588 Add documentatiion for Intel GPIO driver igpio(4) 2022-03-24 14:00:19 +00:00
riastradh 62e877acb3 vfs(9): Add missing vnode lock around VOP_CLOSE in vfs_mountroot.
Maybe vnode_if.c should be taught to KASSERT the vnode lock now that
locks always work.
2022-03-24 12:59:56 +00:00
riastradh b4749e24a2 entropy(9): Call entropy_softintr while bound to CPU.
It looks like We tripped on the new assertion in entropy_account_cpu
when there was pending entropy on cpu0 running lwp0 when xc_broadcast
ran -- since xc_broadcast calls the function directly rather than
calling it through softint_schedule, it's not called via the softint
lwp which would satisfy the assertion.
2022-03-24 12:58:56 +00:00
andvar e394a08199 s/interger/integer/ and s/Compensatin/Compensation/ in comments. 2022-03-24 12:12:00 +00:00
wiz 0362f707fc zlib: Fix a bug that can crash deflate on some input when using Z_FIXED.
5c44459c3b

This bug was reported by Danilo Ramos of Eideticom, Inc. It has
lain in wait 13 years before being found! The bug was introduced
in zlib 1.2.2.2, with the addition of the Z_FIXED option. That
option forces the use of fixed Huffman codes. For rare inputs with
a large number of distant matches, the pending buffer into which
the compressed data is written can overwrite the distance symbol
table which it overlays. That results in corrupted output due to
invalid distances, and can result in out-of-bound accesses,
crashing the application.

The fix here combines the distance buffer and literal/length
buffers into a single symbol buffer. Now three bytes of pending
buffer space are opened up for each literal or length/distance
pair consumed, instead of the previous two bytes. This assures
that the pending buffer cannot overwrite the symbol table, since
the maximum fixed code compressed length/distance is 31 bits, and
since there are four bytes of pending space for every three bytes
of symbol space.
2022-03-24 10:13:01 +00:00
yamaguchi fa8d826915 ixl(4): Added Intel V710 for 5000BaseT support 2022-03-24 08:54:16 +00:00
yamaguchi 34f970493a regen 2022-03-24 08:48:18 +00:00
yamaguchi b5afc66767 Added Intel V710 for 5000BaseT 2022-03-24 08:46:49 +00:00
yamaguchi 358c38bd6e Change description about Intel X710 10GBaseT device 2022-03-24 08:44:04 +00:00
andvar a960b269de s/interupt/interrupt/ in comments.
also add missing RCS ID in bcm53xx_reg.h and fix one more typo in there.
2022-03-24 08:08:04 +00:00
yamaguchi 52bf376d8b vioif(4): adopt ether_set_ifflags_cb 2022-03-24 08:02:21 +00:00
yamaguchi f490bf1198 vioif(4): register MAC address to a device 2022-03-24 07:57:10 +00:00
yamaguchi 1c9fb8cec4 vioif(4): fix missing error handling 2022-03-24 07:51:14 +00:00
yamaguchi 273426bfec vioif(4): do not schedule packet processing while stopping the device 2022-03-24 07:47:50 +00:00
manu b33073320a Add initial support for Intel GPIO chips 2022-03-24 02:24:24 +00:00
gutteridge 9d5e1357c3 popen.3: minor spelling, grammar, style, and xref tweaks 2022-03-24 01:55:15 +00:00
gutteridge b4afe916c2 fork.2: add _exit(2) xref and spell "ID" consistently 2022-03-24 01:52:48 +00:00
riastradh 7bd5abd309 mips/cavium: Fix membars around establishing interrupt handlers. 2022-03-23 23:24:21 +00:00
riastradh d3d9ac4a56 viornd(4): Process host entropy in softint context.
Samples added to the entropy pool in hard interrupt context are only
buffered, never processed directly, and if they fill the buffer, the
sample is dropped -- this serves to encourage taking timing samples
in hard interrupt context because it's cheap, and we have no idea how
many samples we really need for full entropy so it's safer to err on
the side of `as many as we can get'.

But for viornd(4), we assume the host has full entropy so we only
need a single 32-byte sample, and we want to avoid dropping it so we
get full entropy ASAP.  Entering the sample in a soft interrupt
rather than hard interrupt achieves this.
2022-03-23 23:23:25 +00:00
riastradh 2b8e15f8fa entropy(9): Include <sys/lwp.h> and <sys/proc.h> explicitly.
Now that we use curlwp, struct lwp::l_pflag, and LP_BOUND, let's not
rely on side-loads from other .h files.
2022-03-23 23:20:52 +00:00
riastradh 8f575ec770 entropy(9): Bind to CPU temporarily to avoid race with lwp migration.
More fallout from the IPL_VM->IPL_SOFTSERIAL change.

In entropy_enter, there is a window when the lwp can be migrated to
another CPU:

	ec = entropy_cpu_get();
	...
	pending = ec->ec_pending + ...;
	...
	entropy_cpu_put();

	/* lwp migration possible here */

	if (pending)
		entropy_account_cpu(ec);

If this happens, we may trip over any of several problems in
entropy_account_cpu because it assumes ec is the current CPU's state
in order to decide whether we have anything to contribute from the
local pool to the global pool.

No need to do this in entropy_softintr because softints are bound to
the CPU anyway.
2022-03-23 23:18:17 +00:00
macallan c2e6ca5ced allow com at dino to actually attach 2022-03-23 17:35:41 +00:00
christos 728043b76b revert changes from 2022a for now until I figure out what's wrong. 2022-03-23 14:02:05 +00:00
andvar a41f6947a1 fix few typos for word "previous(ly)" in comments. 2022-03-23 13:06:06 +00:00
andvar adbc140349 fix few typos in comments, mainly s/paramenters/parameters/. 2022-03-23 11:08:27 +00:00
rillig fa858d4c6e make: clean up comments and code for setting debug flags
No binary change.
2022-03-22 23:37:09 +00:00
andvar 43aafb237c fix typos in comments. 2022-03-22 21:45:13 +00:00
macallan 959db5f04d bump MSGBUFSIZE 2022-03-22 18:32:51 +00:00
christos e19b521a1d new tzcode 2022-03-22 17:49:30 +00:00
christos e1e5793746 welcome to tzcode-2022a
Changes to code

    Fix bug when mktime gets confused by truncated TZif files with
    unspecified local time.  (Problem reported by Almaz Mingaleev.)

    Fix bug when 32-bit time_t code reads malformed 64-bit TZif data.
    (Problem reported by Christos Zoulas.)

    When reading a version 2 or later TZif file, the TZif reader now
    validates the version 1 header and data block only enough to skip
    over them, as recommended by RFC 8536 section 4.  Also, the TZif
    reader no longer mistakenly attempts to parse a version 1 TZIf
    file header as a TZ string.

    zdump -v now outputs "(localtime failed)" and "(gmtime failed)"
    when local time and UT cannot be determined for a timestamp.
2022-03-22 17:48:39 +00:00
riastradh 352837cfca autoconf(9): Enter more timing samples into entropy pool.
Previously, we sampled the time of each _failed_ config_search.  I'm
not sure why -- there was no explanation in the comment or the commit
message introducing this in rev. 1.230.2.1 on tls-earlyentropy.

With this change, we sample the time of _every_ search including the
successful ones -- and also measure the time to attach which often
includes things like probing device registers, triggering device
reset and waiting for it to post, &c.
2022-03-21 22:20:32 +00:00
jmcneill edd5c599d8 hdaudio: Obsolete HDAUDIO_ENABLE_DISPLAYPORT and HDAUDIO_ENABLE_HDMI
Enable display port and HDMI devices by default rather than making this
a compile time option.
2022-03-21 09:20:04 +00:00
jmcneill 3e8c9d8ae9 hdaudio: pci: PCIe config space fixes and Intel PCH snoop support
The HD audio specification does not cover PCI config space, and this
driver was unconditionally writing to a vendor specific register. Reduce
scope of config space accesses based on PCI IDs.

With this cleaned up, add support for Intel PCH devices which require
some additional vendor specific configuration to bypass no snoop mode.
2022-03-21 09:12:09 +00:00
riastradh eae1841cdb entropy(9): Make rnd_lock_sources work while cold.
x86 uses entropy_extract verrrrrry early.  Fixes mistake in previous
that did not manifest in my testing on aarch64, which does not use it
so early.
2022-03-21 00:25:04 +00:00
andvar fd282dc1a1 s/Multilik/Multilink/ 2022-03-20 20:37:59 +00:00
andvar ff48331b5e s/circut/circuit/ and s/circiut/circuit/ in comments and acronyms file. 2022-03-20 20:19:34 +00:00
andvar 51cdba346e s/initialiase/initialise/ in comments. 2022-03-20 19:26:27 +00:00
andvar 01fcbd4710 fix typos in debug/panic messages: isued->issued, initialiased->initialised. 2022-03-20 18:56:29 +00:00
kre 896f0a3aa5 Updated to tzdata2022agtz which is a 2022a fork with backzone zones
moved back into the main data repo (restoring old data)
2022-03-20 18:22:20 +00:00
kre bf2397dc69 Merge tzdata2022agtz 2022-03-20 18:20:19 +00:00
riastradh dd68197b35 entropy(9): Improve entropy warning messages and documentation.
- For the main warning message, use less jargon, say `security', and
  cite the entropy(7) man page for further reading.  Document this in
  rnd(4) and entropy(7).

- For the debug-only warning message, say `entropy' only once and omit
  it from the rnd(4) man page -- it's not very important unless you're
  debugging the kernel in which case you probably know what you're
  doing enough to not need the text explained in the man page.
2022-03-20 18:19:57 +00:00
kre e4971af455 Note tzdata 2022a (using tzdata2022agtz upstream fork) 2022-03-20 18:04:52 +00:00