IABSD.fr/src

Branch :


Log

Author Commit Date CI Message
09dd33a6 2020-07-08 16:05:27 Clarify that csh's -f flag is not just about .cshrc. We don't need to be too specific about this in su(1), leave the details for csh(1). OK jca@
deaec079 2020-07-08 15:53:59 Make membar_consumer() a plain compiler barrier in kernel on octeon. The processor does not perform speculative reads and only one of its execution pipes should issue memory accesses. As a result, loads should happen in the correct order without barrier instructions. Tested on CN5020, CN6120, CN7130 and CN7360. This diff has been in use on the octeon-based mips64 bulk build cluster for several months. Also tested in snaps for a while.
c583cfd4 2020-07-08 15:46:31 sync
2c7f03ce 2020-07-08 15:36:35 Simplify csh vs other shells setup code ok millert@
be217f57 2020-07-08 14:45:15 do not need these versions of timetc.h
dca1e8db 2020-07-08 13:01:25 Use CPU_IS_PRIMARY macro in identifycpu() on amd64. OK deraadt@
bdf34362 2020-07-08 10:41:38 Clarify man page OK sobrado@ jmc@
3b2e3894 2020-07-08 10:35:06 Teach su -l -f how to start a regular shell for non-csh shells su -l does nice things like reset the environment and change the home directory, but it also always starts the user's shell as a login shell (argv[0] == '-'). This is a problem for su -l consumers like rc.d, where e.g. /root/.profile is read by the shell before starting a daemon as root. This tends to blow up if the admin introduces side effects to /root/.profile (or /etc/profile). csh supports an -f flag to skip reading .cshrc and .login, and su already has special support for it. Similarly, teach su -l -f how to start a regular shell (not a login shell) for non-csh shells. Discussion started by robert@ during p2k19 and revived by ajacoutot@, help and ok kn@ millert@
de43b1a9 2020-07-08 09:20:28 Userland timecounter implementation for sparc64. ok deraadt@, pirofti@
c8437fb9 2020-07-08 09:17:48 Clean up the amd64 userland timecounter implementation a bit: * We don't need TC_LAST * Make internal functions static to avoid namespace pollution in libc.a * Use a switch statement to harmonize with architectures providing multiple timecounters ok deraadt@, pirofti@
09050318 2020-07-08 02:49:27 Mention that we support building a port from Go modules now. Prompted by afresh1@
638aa2bc 2020-07-08 01:18:04 New regression tests for character and string conversions and for their modifiers, written from scratch.
eb0540bf 2020-07-07 22:43:29 Add opalsens(4), a driver for sensors provided by the OPAL firmware.
09cbf102 2020-07-07 19:48:31 Revert r1.121 and rewrite merge_option_data() to achieve same effect w/o using string functions on data that *MIGHT NOT* be NUL terminated. Fiddle parse_domain_name_list() to avoid string functions for the same reason. Problem encountered by Jesper Wallin when running with vm.malloc_conf=CFGJUR, although he later proved 'J' (more junking) was the actual trouble maker.
50ae7695 2020-07-07 19:42:58 Remove temporary RSA keys/callbacks code. This was removed from libssl a very long time ago...
26890145 2020-07-07 19:41:31 Test TLSv1.3 ciphersuites now that TLS_method() supports TLSv1.3.
25aa477e 2020-07-07 19:31:11 Remove some unnecessary function pointers from SSL_METHOD_INTERNAL. ssl_version is completely unused and get_timeout is the same everywhere. ok beck@ inoguchi@ tb@
94149d15 2020-07-07 19:24:23 Enable TLSv1.3 for the generic TLS_method(). This can be done now that we have both TLSv1.3 client and server. ok beck@ inoguchi@ tb@
fe755d9c 2020-07-07 17:33:40 Fix shared DH secret length in log message. ok patrick@
9d978dea 2020-07-07 15:52:22 sync
4b545c7b 2020-07-07 14:53:36 Stop using make_addr() which trims trailing zeros of the netmask, set family and length field. This fixes route(8) to handle "::/0" properly. Also fix "route add -inet 0.0.0.0 -prefixlen 0 (gateway)" to work properly. ok kn
ae4c4765 2020-07-07 12:40:30 fix a copy pasto. from netbsd if_ixl.c r1.39 by yamaguchi
b6fd555f 2020-07-07 11:54:49 Update required firmware file path in iwx(4) man page.
b4c77e58 2020-07-07 11:54:01 Switch iwx(4) from -46 to -48 firmware. The -48 firmware image has been available via fw_update(4) for about 4 weeks by now. It is contained in iwx-firmware-20191022p1.
cbb0b321 2020-07-07 10:33:58 Add support for set -o pipefail With the pipefail option set, the exit status of a pipeline is 0 if all commands succeed, or the return status of the rightmost command that fails. This can help stronger error checking, but is not a silver bullet. For example, commands will exhibit a non-zero exit status if they're killed by a SIGPIPE when writing to a pipe. Yet pipefail was considered useful enough to be included in the next POSIX standard. This implementation remembers the value of the pipefail option when a pipeline is started, as described as option 1) in https://www.austingroupbugs.net/view.php?id=789#c4102 Requested by ajacoutot@, ok millert@
72b0de73 2020-07-07 10:14:35 apparently vmx(4) needs a power of 2 number of interrupts. so we pass INTRMAP_POWEROF2 to intrmap_create and things are better. reported by and fixed by mark patruck. thanks :)
81bc34e8 2020-07-07 04:42:35 add kstat support for some of the counters the chip maintains. mcx keeps a bunch of different counters relating to the port. this diff adds support for reading them off the hardware and then unpacking them into kstat_kv structs for userland to look at. jmatthew@ checked over it.
448c5a95 2020-07-07 04:05:25 drm: use hi-res time to implement ktime_get(), ktime_get_real() There seems to have been some confusion about the granularity of certain time interfaces in the Linux kernel when our DRM compatibility layer was written. To be clear: the Linux ktime_get() and ktime_get_real() interfaces are *high resolution* clocks. We should to implement them with high resolution interfaces from our own kernel. Thus, use microuptime(9) to implement ktime_get() and microtime(9) to implement ktime_get_real(). While here, ktime_get_raw_ns() should use ktime_get_raw(), not ktime_get(). Discussed with kettenis@ and jsg@. ok jsg@
0761eee7 2020-07-07 02:47:21 correct recently broken comments
cd21026b 2020-07-07 02:45:58 don't try and be too clever in the kstat update timeout.
352d022a 2020-07-07 02:42:02 remove some old code from a previous version of the kstat diff. ixl(4) is only enabled on 64bit archs, so we don't need a 32bit fallback for the 48 and 64 bit counter reads.
2ee1fcb3 2020-07-07 02:38:56 add kstat support for reading hardware counters. this chip is annoyingly complicated, which is reflected in how complicated it is to read counters off the chip. while we just use ixl as a normal network interface, the chip is capable of being a switch with physical ports, virtual ports and all sorts of other functionality, and there are counters in different places for all these different pieces. in our simple setup the driver interface is mapped to a single physical port which we talk to via a single virtual switch interface. this diff adds counters on each interface for the physical port and for the virtual switch interface (vsi). the port counters show what the hardware is doing, while the vsi counters show how the driver is interacting with the chip. for things like packet counters, these numbers tend to correlate strongly, but there are some differences. if the chip drops packets cos there's no descriptors on the rx ring, that's shown in the vsi counters. problems talking to the physical network (eg, packet corruption off the wire) are reported on the port counters. on top of the chip just being complicated, reading the counters is a complicated activity on its own. because the counters can be read by multiple consumers in a virtualised environment, the counters never really get reset. they are also stored in annoyingly small fields. this means you basically have to poll the chip periodically and calculate differences between the polls to avoid losing numbers if they overflow too quickly.
c5fafb75 2020-07-07 02:13:13 Get rid of some rasops callbacks in efifb that only call rasops functions in them and let rasops call them directly. From John Carmack ok kettenis
b7f13c93 2020-07-07 02:01:43 small typo
c99445d4 2020-07-07 01:36:49 add kstat support for reading the "hardware" counters for each ring. the counters happen to be a series of uint64_t values in memory, so we treat them as arrays that get mapped to a series of kstat_kv structs that are set up as 64 bit counters with either packet or byte counters as appropriate. this helps keep the code size down. while we export the counters as separate kstats per rx and tx ring, you request an update from the hypervisor at the controller level. this code ratelimits these requests to 1 per second per interface to try and debounce this a bit so each kstat read doesnt cause a vmexit. here's an example of the stats. note that we get to see how many packets that rx ring moderation drops for the first time. see the "no buffers" stat. vmx0:0:rxq:5 packets: 2372483 packets bytes: 3591909057 bytes qdrops: 0 packets errors: 0 packets qlen: 0 packets ... vmx0:0:txq:5 packets: 1316856 packets bytes: 86961577 bytes qdrops: 0 packets errors: 0 packets qlen: 1 packets maxqlen: 512 packets oactive: false ... vmx0:0:vmx-rxstats:5 LRO packets: 0 packets LRO bytes: 0 bytes ucast packets: 2372483 packets ucast bytes: 3591909053 bytes mcast packets: 0 packets mcast bytes: 0 bytes bcast packets: 0 packets bcast bytes: 0 bytes no buffers: 696 packets errors: 0 packets ... vmx0:0:vmx-txstats:5 TSO packets: 0 packets TSO bytes: 0 bytes ucast packets: 1316839 packets ucast bytes: 86960455 bytes mcast packets: 0 packets mcast bytes: 0 bytes bcast packets: 0 packets bcast bytes: 0 bytes errors: 0 packets discards: 0 packets
57b86033 2020-07-07 00:00:03 add kstats for rx queues (ifiqs) and transmit queues (ifqs). this means you can observe what the network stack is trying to do when it's working with a nic driver that supports multiple rings. a nic with only one set of rings still gets queues though, and this still exports their stats. here is a small example of what kstat(8) currently outputs for these stats: em0:0:rxq:0 packets: 2292 packets bytes: 229846 bytes qdrops: 0 packets errors: 0 packets qlen: 0 packets em0:0:txq:0 packets: 1297 packets bytes: 193413 bytes qdrops: 0 packets errors: 0 packets qlen: 0 packets maxqlen: 511 packets oactive: false
6a3d01b2 2020-07-06 21:41:56 Wire down the timekeep page. If we don't do this, the pagedaemon may page it out and bad things will happen when we try to page it back in from within the clock interrupt handler. While there, make sure we set timekeep_object back to NULL if we fail to make the timekeep page into kernel space. ok deraadt@ (who had a very similar diff)
c2b47db0 2020-07-06 20:37:51 Protect the whole pipex(4) layer by NET_LOCK(). pipex(4) was simultaneously protected by KERNEL_LOCK() and NET_LOCK() and now we have the only lock for it. This step reduces locking mess in this layer. ok mpi@
3da650ea 2020-07-06 20:29:41 sync; various $ARCH/timetc.h files to md.*
058d0189 2020-07-06 20:28:38 pipex_rele_session() frees memory pointed by `old_session_keys'. Use it in pipex_destroy_session() instead of pool_put(9) to prevent memory leak. ok mpi@
e2a097ad 2020-07-06 19:22:40 fix spelling
56c392bf 2020-07-06 17:54:14 sync
37f59f88 2020-07-06 17:43:23 Save and restore FPU around signal handlers.
e571446a 2020-07-06 17:24:59 Minor tweaks in the description of %g: 1. Clarify that %G uses %F, not %f; noticed by millert@. 2. Mention that %g originally meant "general notation", see: https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/stdio/doprnt.s Triggered by a somewhat different patch from Ian <ropers at gmail dot com>. Feedback and OK millert@ and jmc@.
277ea09d 2020-07-06 17:11:29 in 2014 I added this annotation: /* XXX floating point printf in signal handler */ our snprintf is reentrant safe except for floating point. Break the double apart into integer.integer notation, to avoid that. ok kettenis millert
75fa0b37 2020-07-06 16:27:59 Use mnemonic KERN_PROC_ALL not literal zero No object change.
f589ab0e 2020-07-06 15:47:41 Hide most of the contents behind #ifdef _KERNEL. Reorganize the file a bit to achieve this with a single #ifdef/#endif pair.
f37332fc 2020-07-06 15:24:11 Add a few ${.CURDIR} to make the new RCS tests work with obj/ and obj@. ok stsp
44d8669d 2020-07-06 15:18:03 IEEE1275 (Open Firmware) defines that parameter name strings can have a length of up to 31 characters. This limit is also present in the flattened device tree specification/ Unfortunately this limit isn't enforced by the tooling and there are systems in the wild that use longer strings. This includes the device trees used on POWER9 systems and has been seen on some ARM systems as well. So bump the buffer size from 32 bytes (31 + terminating NUL) to 64 bytes. Centrally define OFMAXPARAM to this value (in <dev/ofw/openfirm.h>) replacing the various OPROMMAXPARAM definition scattered around the tree to make sure the FDT implementation of OF_nextprop() uses the same buffer size as its consumers. Eliminate the static buffer in various openprom(4) implementations on FDT systems. Makes it possible to dump the full device tree on POWER9 systems using eeprom -p. ok deraadt@, visa@
45a90880 2020-07-06 14:50:19 defer access of fb_info pointer in drm_fb_helper_hotplug_event() Fixes a regression from rev 1.24 which lead to a page fault reported by Martin Ziemer. ok stsp@
d82e6535 2020-07-06 13:33:05 Add support for timeconting in userland. This diff exposes parts of clock_gettime(2) and gettimeofday(2) to userland via libc eliberating processes from the need for a context switch everytime they want to count the passage of time. If a timecounter clock can be exposed to userland than it needs to set its tc_user member to a non-zero value. Tested with one or multiple counters per architecture. The timing data is shared through a pointer found in the new ELF auxiliary vector AUX_openbsd_timekeep containing timehands information that is frequently updated by the kernel. Timing differences between the last kernel update and the current time are adjusted in userland by the tc_get_timecount() function inside the MD usertc.c file. This permits a much more responsive environment, quite visible in browsers, office programs and gaming (apparently one is are able to fly in Minecraft now). Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others! OK from at least kettenis@, cheloha@, naddy@, sthen@
ca3735b3 2020-07-06 12:44:02 sync
b3ebe46d 2020-07-06 11:48:03 make a very quick and dirty pass on a manpage for the kstat api.
797d2c3e 2020-07-06 11:28:51 Repair athn(4) in client mode against WPA2 access points. Client mode was subtly broken after support for CCMP offload was added. In client mode we should be using the first key table slot for our CCMP pairwise key, not an arbitrary slot based on our association ID (as is done in hostap mode). When the interface came up again after being reset the CCMP hardware engine was left in a non-working state. Apparently the key table was messed up or contained stale entries. Fix a potential timing issue in the code path which attempts to clear the key table on device power-up. For good measure, also clear the key table before the device is powered down. While here, fix off-by-ones in key table slot range checks. Problems reported by Tim Chase, Kevin Chadwick, Austin Hook, Stefan Kapfhammer. Fix tested by me on AR9280 (PCI) and AR9271 (USB) and Kevin Chadwick on AR9280
dd69d388 2020-07-06 10:38:54 match on D-Link DWA-121 rev B1 from Miguel Landaeta
a705a461 2020-07-06 10:36:19 regen
10a7bd13 2020-07-06 10:35:42 add D-Link DWA-121 rev B1 from Miguel Landaeta
9764651b 2020-07-06 10:07:02 Do not eliminate redundant clears, the code is wrong and doing it correctly wouldn't be worth it. GitHub issue 2298.
d3c4e94b 2020-07-06 09:14:20 Add a way for control mode clients to subscribe to a format and be notified of changes rather than having to poll. GitHub issue 2242.
e6e24012 2020-07-06 07:31:51 Make this build on powerpc64.
d09e71bb 2020-07-06 07:31:19 Make this build on powerpc/powerpc64. Only test on powerpc64 for now since this is expected to fail on most 32-bit PowerPC CPUs given the lack of a proper permission bit.
7dbc9071 2020-07-06 07:27:39 Always send xterm-style keys for M-Left and M-Right. GitHub issue 2296.
2a28964c 2020-07-06 07:26:40 Fix pmap_pted_ro() such that it actually takes away PROT_EXEC when asked to do so.
ab45bcde 2020-07-06 07:09:50 add kstat(8), the userland side of kstat(4). this currently just dumps all the kstats it can find and prints out their current values. in the future i want to be able to pass what kstats im intersted in as arguments, and tell it to poll stats and show rates instead of current values when appropriate.
81009b54 2020-07-06 06:13:10 regen after kstat addition
17e24fb9 2020-07-06 06:12:37 regen after kstat addition
963d6015 2020-07-06 06:11:26 wire up kstat(4). it's only accessible to root:wheel. ok deraadt@
7c1a9ece 2020-07-06 04:32:25 wire up kstat(4) "looks right" deraadt@
1fb7db67 2020-07-06 04:11:26 kstat does open, close, and ioctl.
03c589e1 2020-07-06 04:09:46 tell the kernel how to build kstat it's like ksyms, but different
402315e8 2020-07-06 03:56:51 add kstat(4), a subsystem to let the kernel expose statistics to userland. a kstat is an arbitrary chunk of data that a part of the kernel wants to expose to userland. data could mean just a chunk of raw bytes, but generally a kernel subsystem will provide a series of kstat key/value chunks. this code is loosely modelled on kstat in solaris, but with a bunch of simplifications (we don't want to provide write support for example). the named or key/value structure is significantly richer in this version too. eg, ssolaris kstat named data supports integer types, but this version offers differentiation between counters (like the number of packets transmitted on an interface) and gauges (like how long the transmit queue is) and lets kernel providers say what the units are (eg, packets vs bytes vs cycles). the main motivation for this is to improve the visibility of what the kernel is doing while it's running. i wrote this as part of the recent work we've been doing on multiqueue and rss/toeplitz so i could verify that network load is actually spread across multiple rings on a single nic. without this we would be wasting memory and interrupt vectors on multiple rings and still just using the 1st one, and noone would know cos there's no way to see what rings are being used. another thing that can become visible is the different counters that various network cards provide. i'm particularly interested in seeing if packets get dropped because the rings aren't filled fully, which is an effect we've never really observed directly. a small part of wanting this is cos i spend an annoying amount of time instrumenting the kernel when hacking code in it. if most of the scaffolding for the instrumentation is already there, i can avoid repeatedly writing that code and save time. iterated a few times with claudio@ and deraadt@
b3b44669 2020-07-06 00:55:05 Always print the directory name in -R mode; matches historical behavior. Previously, our ls would only print the directory name when listing more than one directory, which is the correct behavior for non-recursive ls but not for -R mode. OK deraadt@
b352e555 2020-07-06 00:51:51 Fix skipping of directories that begin with a '.' in -R mode. It is not enough to avoid displaying the contents of the directory, we need to set FTS_SKIP to avoid descending into any subdirs too. Otherwise, if a ".foo" directory has a subdirectory "bar", ls will descend into bar and display its contents. OK deraadt@
5bde2954 2020-07-05 23:59:45 some language improvements; ok markus
ffe61686 2020-07-05 22:27:46 spelling/grammar fixes
7db9ac7a 2020-07-05 21:57:23 Build minirootXX.img for powerpc64.
bd470ac0 2020-07-05 21:54:44 Double checking you committed the correct diff sometimes pays off. Sigh.
d73c3375 2020-07-05 21:03:49 Create a grub.cfg file such that petitboot can load the kernel. For this purpose we copy the kernel to the msdos filesystem. That kernel is named "boot" as we anticipate replacing it with a proper OpenBSD bootloader in the future. Based in a diff from deraadt@ ok deraadt@
f585323a 2020-07-05 20:49:40 use the intended operator in cpu_rnd_messybits(); ok kettenis@
17e73562 2020-07-05 20:17:25 Nuke struct scsi_link's "scsibus" member. The two drivers using it (ahc(4) and qlw(4)) can just compare the values of the "bus" member directly. A slightly different path to the same result that matthew@ traversed in his work culminating in scsiconf.h r1.146.
e9e01eb1 2020-07-05 20:03:31 Missing file needed for building releases.
d84cdb7a 2020-07-05 20:01:35 First stab at installation notes for OpenBSD/powerpc64.
f25330fc 2020-07-05 19:20:06 Use scsi_link's 'bus' field rather than slightly more obscure dev_parent twiddling. Improves chances of progress on eliminating various bus related fields from struct scsi_link. Tested by kmos@ "might actually be an improvement" kettenis@.
8d3e3267 2020-07-05 18:31:28 Fix rpki-client regress test after -f removal. ok job
66ec9055 2020-07-05 17:31:11 Enable xhci(4) and a (deliberately) tiny set of USB devices.
155713db 2020-07-05 17:12:59 We need to set the bypass bit for "raw" DMA memory as well.
84a8d186 2020-07-05 12:24:16 Count traps and interrupts. And count system calls in the same place since this makes it easier to reason about the accounting.
af774cad 2020-07-05 12:22:43 Don't forget to schedule an AST in need_resched().
6c07c68e 2020-07-05 11:47:50 uvideo_querycap(): Set the 'device_caps' field of struct v4l2_capability like done in utvfu(4) Fixes webcam detection in firefox 78, where code was added to check for V4L2_CAP_VIDEO_CAPTURE capability on 'device_caps', whereas we only set it in the 'capabilities' field. According to https://www.kernel.org/doc/html/v4.14/media/uapi/v4l/vidioc-querycap.html#description those distinct fields are here for drivers that provide several devices, but firefox decided to check for 'device_caps' field instead of 'capability' (cf https://hg.mozilla.org/integration/autoland/rev/33facf191f23) - so fill the field for compatibility reasons, while https://bugzilla.mozilla.org/show_bug.cgi?id=1650572 discusses with upstream what's the right way. ok mglocker@
2032a05e 2020-07-05 11:29:21 Save FPU state to PCB before running a signal handler. This doesn't completely fix the case where the FPU is used in a signal handler but it is part of the solution and makes sure the processor mode check in sys_sigreturn() passes if the process was using the FPU when the signal happened.
359d59f6 2020-07-05 10:34:08 Make sure we return ENAMETOOLONG when copying a string into a buffer of zero bytes.
9accba30 2020-07-05 10:32:22 We're self-hosted now.
76dd76e0 2020-07-05 07:54:37 fix maths error; from xordspar ok ratchov
df3da441 2020-07-05 07:47:32 Fix mbuf leak in urtwn(4) with frames that are CCMP-crypted in hardware. Problem reported and fix tested by Bastian Wessling on bugs@ ok jmatthew@
6b841390 2020-07-05 06:56:34 match on "ti,am335-sdhci" used since linux 5.8-rc3
1a252fb6 2020-07-04 21:11:52 Don't build gdb on powerpc64.
ea8cfa21 2020-07-04 21:11:03 Installer bits for powerpc64.
7379b965 2020-07-04 21:08:11 Bump the size of the ramdisk.
eed27c5c 2020-07-04 21:07:23 Use block device numbers instead of character device numbers.
f724afe4 2020-07-04 19:25:11 Stop defining NOPIC on powerpc64. ok kettenis@ drahn@