Commit Graph

295931 Commits

Author SHA1 Message Date
christos e33af66176 remove threads; size constraints and behavioral change 2022-05-16 14:55:56 +00:00
kre 32cc3b0248 Alter error messages so they no longer claim that bad input is illegal. 2022-05-16 10:53:14 +00:00
christos 8cfe997684 Add -lpthread for the benefit or argon2 in cgdconfig 2022-05-16 10:52:09 +00:00
christos 0afca0c76d Re-enable threads; apparently we get different results depending if we are
threaded or not... This tastes like a bug.
2022-05-16 10:44:06 +00:00
jmcneill 0f00bfdde1 sdmmc: ld: Include the card type (SD card, MMC) in the disk description. 2022-05-16 10:03:23 +00:00
jmcneill 6724c56ea2 tprof: armv8: Only attach to known PMU types. 2022-05-16 09:42:32 +00:00
skrll b6d5713bed port-arm/50635: arm11_setup() cpuctrlmask value causes CPU_CONTROL_VECRELOC bit to toggle
Fix slightly differently to as suggested in the PR.  Annotate arm10_setup
while I'm here.
2022-05-16 07:07:17 +00:00
skrll 16e0b464c4 Fix the copy&paste botch from previous. Spotted by Tom Lane. 2022-05-16 06:07:23 +00:00
nia 90ea1fc35b ctwmrc: Turn off sysinst menu item for now, it requires root for most
functions and users likely aren't running X as root.  Also turn off
the xman menu item until a custom greeter screen can be imported
(also note apropos is broken)...
2022-05-16 04:52:11 +00:00
rillig af50285f47 gomoku: inline macros BSZ1, BSZ2, BSZ3, BSZ4
These macro names didn't convey any meaning, so replace them with their
replacement text, to have fewer identifiers to worry about.

No binary change.
2022-05-15 22:56:20 +00:00
rillig 20e9d475ef gomoku: remove write-only members from overlap_info
Since overlap_info is only used in pickmove.c, move it there.

No functional change.  In particular, in the middle of a game, gomoku
still tends to fall into analysis paralysis, thinking about the best
move for more than 3 minutes on modern hardware.  Since the algorithm is
basically unchanged since the 1990s, it must have been a long waiting
time back then, probably an hour per move.
2022-05-15 22:41:51 +00:00
rillig 3189ab5b3f gomoku: remove column macros
Of the 19 macros, only 3 were actually used.  Replace their uses with
expressions based on the board size.  It's a small step to making the
board size adjustable.  There are still other places using hard-coded
numbers.

No binary change.
2022-05-15 22:18:36 +00:00
rillig 0a647d356c gomoku: remove redundant parentheses around return values
No binary change.
2022-05-15 22:08:05 +00:00
rillig ee07f44521 gomoku: apply some style fixes towards KNF
There are still parts of the code that use an indentation level of 4
instead of the usual 8.  Fixing that right now would introduce more
unnatural line breaks, so defer that until later.

No binary change.
2022-05-15 22:00:11 +00:00
mrg d254323219 create ./usr/libdata/firmware/radeon same as the non-/usr version
should fix builds for non x86/arm64.
2022-05-15 21:41:56 +00:00
andvar a5c1e39951 s/wich/which in comments. 2022-05-15 20:37:50 +00:00
christos f3c3951664 Build argon2 inline so that crunched programs work. I also disabled threads
for now; we can put them back if needed.
2022-05-15 19:53:27 +00:00
jmcneill 5126c2f90e Use non-deprecated proplib interfaces.
prop_dictionary_set_cstring_nocopy -> prop_dictionary_set_string_nocopy
2022-05-15 18:27:35 +00:00
jmcneill f18efd622b sysinst: Write custom hostname to rc.conf when using DHCP
If the user changes the suggested hostname from DHCP, ensure that the
new hostname is written to rc.conf by clearing the appropriate
DHCPCONF_* flags.
2022-05-15 17:42:32 +00:00
jmcneill b2bd8c8703 sysinst: Prompt for hostname and domain, even when using DHCP.
Values discovered from the network may not match desired values for the
target system. Always give an opportunity to override them when using
DHCP.
2022-05-15 17:02:37 +00:00
riastradh a14e69f78f sun8icrypto(4): Switch off polling when ready for interrupts.
When I introduced logic to do polling and then interrupts, I
accidentally made it switch polling from on to...still on, which had
the effect of breaking the logic after sun8i_crypto_attach because
only sun8i_crypto_attach actually did polling.
2022-05-15 16:58:28 +00:00
uwe efe117ac7c rasops: fix automagic box chars for stride > 1 on little endian
This makes DEC line drawing (acsc) work correctly for "iso" fonts of
large sizes, e.g. spleen16x32 on x86.
2022-05-15 16:43:39 +00:00
jmcneill 54302b3996 sysinst: Enable mDNS lookups via NSS when enabling mdnsd.
Add/remove "multicast_dns" to the hosts: line in /etc/nsswitch.conf when
toggling the mdnsd rcvar. Change the label from "Enable mdnsd" to "Enable
multicast DNS support" to better describe what's going on here.

Now when you enable multicast DNS support in the installer, the host will
both advertise itself on the network and resolve .local network names.
2022-05-15 16:38:25 +00:00
christos d813eb2e76 PR/56838: David A. Holland: namespace pollution in static libcrypt 2022-05-15 16:25:09 +00:00
riastradh e617c65392 adjtime(2): Handle negative tv_sec and tv_usec.
Previously I clamped these to avoid dangerous arithmetic overflow.
But I assumed sensible values should be nonnegative.

For tv_sec, this assumption was just wrong -- the adjustment may be
negative.

For tv_usec, this assumption is...not wrong, but also not right.
tv_usec is not _supposed_ to be negative (by POSIX, the type need
only represent values in [-1, 1000000]; semantically the member is
supposed to be a nonnegative number of microseconds below 1000000),
but ntp abuses it to hold negative values, for reasons unclear -- the
same effect could be had by subtracting one from tv_sec, and adding
1000000 to the negative tv_usec.  However, let's not break existing
ntp userlands...
2022-05-15 16:20:10 +00:00
uwe 6fa8224609 rasops_mapchar: cosmetics, same object code.
Don't hide the important function call inside an if condition.  Don't
reuse a variable, changing what it means in the middle of an
expression.
2022-05-15 16:12:52 +00:00
jmcneill 7f8c9c4cd9 sysinst: Center the select_part_scheme menu horizontally 2022-05-15 15:06:59 +00:00
jmcneill 429eff3149 disks: Get disk identify data from drvctl
When /dev/drvctl exists, attempt to use the disk-info/type property as
a disk's description string. Fallback to ATA / SCSI probing when the
identify data is not available through this interface.

This has the side-effect of adding descriptions for things like NVMe and
SD/eMMC devices.
2022-05-15 14:48:37 +00:00
jmcneill 9005fea07f sysinst: Restore printing disk descriptions, lost in r1.35 2022-05-15 12:48:25 +00:00
riastradh ca5e5d4803 x86: Use atomic_store_release/atomic_load_consume for nmi_handlers.
Simplifies things a bit.  No functional change intended.
2022-05-15 12:45:33 +00:00
martin 901c0b91c9 PR 56835: fix sshd startup script to only whine about bogus keys it
created if it actualy did create keys (one should thing that a
function called sshd_keygen() only is called to create keys, but
the "precmd" magic makes it run every time sshd is started or stopped).

Patch from Tom Lane, with modifications suggested by kre and a minor
additional cosemtic change.
2022-05-15 11:47:42 +00:00
uwe 969aeed036 rasops: make autogenerated box drawing chars actually used
Fix mapchar to use PICK_FONT() to match what putchar does.  Otherwise
putchar will never get to see the glyph codes for the autogenerated
box drawing chars.
2022-05-15 10:29:20 +00:00
skrll 814c6daf5f Sprinkle some <space><tab> consistency 2022-05-15 08:28:29 +00:00
mrg f1050dd1d7 fix verbose log for 64 bit float 2022-05-15 02:16:06 +00:00
mrg f5063f2ae2 remove unused Lpanic_savefpstate. 2022-05-15 02:14:15 +00:00
gutteridge fbc88947f9 harmony.c: expand and correct a couple of comments 2022-05-15 00:25:15 +00:00
mrg c90a6d284e install the lower case radeon firmware files into /usr/libdata/firmware.
radeon has different case but same name firmware files.  the lower case
ones are already installed into /libdata/firmware, and to avoid having
to provide some special method to build on systems with case-preserving
file systems (such as macOS), we install the lower case ones in /usr.

this means that anyone that requires the lower case files must either
have /usr as part of the / file system, or manually keep them updated.

last part of PR#54976, though i doubt we'll try to pull up these.

this is enabled on i386, amd64 and arm64.
2022-05-15 00:24:14 +00:00
gutteridge 12d02909fd harmony.4: add a minor detail, and fix some grammar 2022-05-15 00:06:09 +00:00
mrg 95edaa90e6 allow some invocations of expr(1) to "fail" - expr(1) returns "1" is
the expression expands to "0" or empty, and sometimes these values end
up correctly being 0.
2022-05-15 00:05:24 +00:00
dholland 4a2334fa92 Clarify that "stty 0" will normally hang up the tty. Bump date. 2022-05-14 21:04:34 +00:00
mrg 659c8d4b87 install the lower case radeon firmware files into /usr/libdata/firmware.
radeon has different case but same name firmware files.  the lower case
ones are already installed into /libdata/firmware, and to avoid having
to provide some special method to build on systems with case-preserving
file systems (such as macOS), we install the lower case ones in /usr.

this means that anyone that requires the lower case files must either
have /usr as part of the / file system, or manually keep them updated.

not yet hooked into build.

part of PR#54976, though i doubt we'll try to pull up these.
2022-05-14 20:54:31 +00:00
mrg 227c529796 initial import of the lower-case radeon firmware files.
these share the same license as amdgpu-firmware, so keep them in
the same license subdir.

skip importing the upper case ones that are already available
in sys/dev/microcode.
2022-05-14 20:49:57 +00:00
riastradh 7e86f1c61f xhci(4): Handle race between software abort and hardware stall. 2022-05-14 19:44:37 +00:00
riastradh de11b5e0f1 xhci(4): Fix edge case in simultaneous xfer abort and failure.
On successful usbd_xfer_trycomplete, caller must set ux_status and
call usb_transfer_complete before releasing the pipe (bus) lock.
Failing to call usb_transfer_complete is a mistake.  Presumably this
was intended to claim the xfer to complete it only on the last
packet.

I previously introduced the violation of this rule when the code
looked like

	xfer->ux_status = err;
	if (trb stuff)
		usb_transfer_complete(xfer);

I mostly mechanically changed all the assignments of xfer->ux_status
to do usbd_xfer_trycomplete first and then usb_transfer_complete.

In the original, the extra assignment of xfer->ux_status in the event
we _don't_ immediately call usb_transfer_complete was likely
redundant and (except insofar as the abort protocol was broken)
harmless.  But now it is a problem because of the contract between
usbd_xfer_trycomplete and usb_transfer_complete under the pipe (bus)
lock.  In retrospect, the original probably should have been

	if (trb stuff) {
		xfer->ux_status = err;
		usb_transfer_complete(xfer);
	}

and my mechanical transformation should have worked, but also in
retrospect I should have put more thought into the change and done it
a little less mechanically.
2022-05-14 19:44:26 +00:00
uwe 050f0752dd Terminus Font: Import 12pt and 28pt IBM437 fonts too. 2022-05-14 17:52:10 +00:00
rillig 8e531acc76 gomoku: clean up unused code and lint warnings
No binary change.
2022-05-14 16:21:04 +00:00
riastradh 6a3fc5908f uvideo(4): Fix missing line breaks in debug messages. 2022-05-14 15:29:08 +00:00
riastradh 2492d0c275 uvideo(4): Fix lengths of various frame descriptors.
This driver doesn't use the frame interval members, which are either
fixed (if continuous) or flexible (if discrete) and so can't be
encoded in C types correctly.  If we did use them, it would be
necessary to use pointer arithmetic on char pointers in the enclosing
descriptor buffer.  But we don't, so this is simpler, and fixes the
sizeof checks to avoid running off the end of invalid descriptors.

Should fix failure to parse legitimate descriptors (without
regressing to choking on malicious ones):

-uvideo: found format (index 1) type 9 size 1280x720 size 1843200 stride 2560 interval 333333
- ^ picking this one
-uvideo: found format (index 2) type 9 size 640x480 size 614400 stride 1280 interval 333333
+uvideo: truncated CS subtype-0x7 descriptor, length 30 < 38uvideo: unimplemented VS CS descriptor len=30 type=0x24 subtype=0x07
+uvideo: unimplemented VS CS descriptor len=30 type=0x24 subtype=0x07
2022-05-14 15:28:59 +00:00
riastradh a0811d3b90 uvideo(4): Avoid exposing streams with invalid descriptors. 2022-05-14 15:28:50 +00:00
rillig 79fb0bd9c4 cgram: clear bottom line of the screen at the end
Previously, the prompt line of the shell overwrote only part of the
prompt of cgram, the rest was still visible.
2022-05-14 14:20:10 +00:00