summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-12-07Do not store unused ICMPv6 Option PREFIX_INFORMATIONKlemens Nanni
Dead since 2017 sys/netinet6/nd6_rtr.c r1.163 Remove sending of router solicitations and processing of router advertisements from the kernel. It's handled by slaacd(8) these days. sysctl(2) net.inet6.icmp6.nd6_debug does not warn about it like it does for, e.g., duplicate MTU options, so don't do anything with this option. Remove access macros for other unused options while here. Eventually, union nd_opts should be removed completely. All under _KERNEL. tcpdump(8)/rad(8)/slaacd(8) keep showing/sending/receiving this option when running this diff on both router and client. OK claudio
2022-12-07Fix example stringTheo Buehler
If you want to Base64-encode "Hello World\n" using a BIO, you had better pass "Hello World\n" into it, not something slightly different... While we're touching this, we might as well write it the way K&R did...
2022-12-07Fix comment by splitting sentance in two. From kn@Claudio Jeker
2022-12-07Fix comment typo.Darren Tucker
2022-12-07Process escape sequences in show-buffer, GitHub issue 3401.Nicholas Marriott
2022-12-07If the called of ypconnect(2) is root, the socket should acquire aTheo de Raadt
reserved port to received secure-maps from the ypserver. issue found by niklas, using a simpler diff i proposed ok miod
2022-12-06Add support for additional RTKit endpoint advertised by NVMe firmware thatMark Kettenis
comes with newer macOS releases. ok patrick@
2022-12-06Zap extra spaceTheo Buehler
2022-12-06Add missing kernel lock around (*if_ioctl)() call withinVitaliy Makkoveev
in{,6}_addmulti(). Since kernel lock is no more taken while following setsockopt() path, it should be taken in this place. Corresponding in{,6}_delmulti() already acquire kernel lock around (*if_ioctl)(). Problem reported and diff tested by weerd@ ok kn@ bluhm@
2022-12-06Major rewrite for accuracy and clarity, and document BIO_set_next(3).Ingo Schwarze
Feedback and OK tb@.
2022-12-06_C_LABEL() and _ASM_LABEL() are no longer useful in the "everythingPhilip Guenther
is ELF" world. Eliminate use of them in m88k code. ok aoyama@
2022-12-06Add a few missing headers and drop a few unused onesTheo Buehler
In bn_test.c include bn_local.h instead of using copy-pasted prototypes.
2022-12-06Make sure BIO_push(3) always preserves all invariants of the prev_bioIngo Schwarze
and next_bio fields of all BIO objects in all affected chains, no matter what the arguments are. In particular, if the second argument (the one to be appended) is not at the beginning of its chain, properly detach the beginning of its chain before appending. We have weak indications that this bug might affect real-world code. For example, in FreeRDP, file libfreerdp/crypto/tls.c, function bio_rdp_tls_ctrl(), case BIO_C_SET_SSL, BIO_push(3) is definitely called with a second argument that is *not* at the beginning of its chain. Admittedly, that code is hard to fathom, but it does appear to result in a bogus prev_bio pointer without this patch. The practical impact of this bug in this and other software remains unknown; the consequences might possibly escalate up to use-after-free issues if BIO_pop(3) is afterwards called on corrupted BIO objects. OK tb@
2022-12-06OpenMetrics is rather strict about naming metricsets.Claudio Jeker
Add a function that a) verifies that none of the special suffixes is used and b) that the name itself is not yet used already. Also when printing a counter _total has to be added to the metric name and for info metrics _info is added. With and OK tb@
2022-12-06Install arm64-qcom-dtb upon encountering a qcgpio(4) device.Patrick Wildt
ok phessler@ sthen@ tobhe@
2022-12-06list hatch-vcs for MODPY_PYBUILDStuart Henderson
2022-12-06Improve the poorly designed BIO_set_next(3) API to always preserve allIngo Schwarze
invariants of the prev_bio and next_bio fields of all BIO objects in all involved chains, no matter which arguments this function is called with. Both real-world uses of this function (in libssl and freerdp) have been audited to make sure this makes nothing worse. We believe libssl behaves correctly before and after the patch (mostly because the second argument is NULL there), and we believe the code in freerdp behaves incorrectly before and after the patch, leaving a prev_bio pointer in place that is becoming bogus, only in a different object before and after the patch. But after the patch, that bogus pointer is due to a separate bug in BIO_push(3), which we are planning to fix afterwards. Joint work with and OK tb@.
2022-12-06Implement support for shared interrupts.Mark Kettenis
ok patrick@
2022-12-06For write operations, wait until the transaction completes just like weMark Kettenis
do after sending the command for a read operation. Fixes issues with doing multiple operations back-to-back. ok patrick@
2022-12-06Implement ometric_set_timeval() and ometric_set_timeval_with_labels()Claudio Jeker
Timestamps are special since they can require more significant bits than a double provides. Instead print them as pseudo float as suggested by the OpenMetrics draft. OK cheloha@
2022-12-06Correct previous, must exit 0 to signal failure.Anton Lindqvist
2022-12-06Print size_t with %zu.Tobias Heider
ok patrick@
2022-12-06arithmethic -> arithmeticJonathan Gray
2022-12-06i386: switch to clockintrScott Soule Cheloha
In lapic timer mode: - Rip out lapic_delay(). We can't use the lapic timer to delay(9) when it's running in one-shot mode. - Add a randomized statclock(), stathz = hz. - Add profiling support, profhz = stathz * 10. - Wire up lapic_intrclock. In i8254-mode: - i8254's clockintr() does not have a monopoly on hardclock(9). - mc146818's rtcintr() does not have a monopoly on statclock(). - In profiling mode, the statclock() will drift very slightly because (profhz = 1024) does not divide into 1 billion. Need to consider how best to fix this. ACPI suspend/resume tested by mlarkin@ via ESXi. Tons of testing by Scott Bennett on a Pentium 4 machine; APM suspend/resume confirmed to work there, too. Link: https://marc.info/?l=openbsd-tech&m=166776370803446&w=2 ok mlarkin@
2022-12-06sh, landisk: switch to clockintrScott Soule Cheloha
Patch review and testing by miod@. Link: https://marc.info/?l=openbsd-tech&m=166776412003652&w=2 ok mlarkin@, probably ok miod@
2022-12-06m88k, luna88k: switch to clockintrScott Soule Cheloha
- Initialize tick_nsec during cpu_initclocks() We have no control over the interrupt clock on luna88k, so this switch is trivial. Bringup help and testing from aoyama@ and miod@. Link: https://marc.info/?l=openbsd-tech&m=166776371203450&w=2 ok aoyama@ mlarkin@
2022-12-06hppa: switch to clockintrScott Soule Cheloha
- Remove hppa-specific clock interrupt scheduling bits from cpu_info. - Rename cpu_hardclock() to itmr_intr(); it doesn't exclusively run hardclock(9) anymore. - Wire up itmr_intrclock. hppa now has a randomized statclock(), stathz = hz. Patch help, testing, and review from kettenis@ (B2000) and miod@ (C3650). MP testing from guenther@ (dual-core J6700). ok mlarkin@ kettenis@, "Ship it?" guenther@
2022-12-06Print SBI vendor, version and implemented spec versionJeremie Courreges-Anglas
On my Unmatched: SBI: OpenSBI v0.9, SBI Specification Version 0.2 ok mlarkin@
2022-12-06Drop unused WEAK_REFERENCE macroJeremie Courreges-Anglas
Probably coming from FreeBSD. We already have WEAK_ALIAS a few lines above. ok mlarkin@ guenther@
2022-12-05zap a pile of dangling tabsTheo de Raadt
2022-12-05make all lists non -compact, to keep spacing consistent;Jason McIntyre
from brad ok jca while here knock out the resulting unnecessary Pp and wrap some long lines
2022-12-05Prep for rpki-client 8.2Claudio Jeker
2022-12-05Add support configuring hostname.if(5) by lladdrAndrew Fresh
Original implementation by martijn@ Feedback and suggestions from kn@, sthen@, claudio@, florian@, and deraadt@. ok deraadt
2022-12-05Unbreak rust-openssl-tests on sparc64Theo Buehler
For the test compilation using the CC crate, base clang is good enough, so we don't need to pull in another heavy dependency just for this test.
2022-12-05Revert and adjust the changes in ometric_set_state() from last commit.Claudio Jeker
Calling ometric_set_int_with_labels() for a state metric fails because there is a check in ometric_set_int comparing the type. Use olabels_add_extras() and ometric_set_int_value() instead.
2022-12-05Use evcount_percpu() with mips64 clock and ipi interrupt counters.Visa Hankala
OK jca@ cheloha@
2022-12-05Avoid event counter re-insert in evcount_percpu()Visa Hankala
This fixes evcount_list corruption that happened when evcount_percpu() was called after evcount_init_percpu(). OK jca@ cheloha@ jmatthew@
2022-12-05Add linker script for hppa. The crucial bit is that hppa needs an extraMark Kettenis
segment for .plt/.got which needs to be placed correctly. ok deraadt@
2022-12-05Add support for the Backlight connector property like we already have forMark Kettenis
inteldrm(4). This makes xbacklight(1) work when using the Xorg modesetting driver. The Xorg amdgpu driver needs a small change for this that should land soon. ok jsg@
2022-12-05Trigger a kevent when we change the backlight. This gives the XorgMark Kettenis
drivers a chance to notice the update of the Backlight connector property when we change it behind its back. ok jsg@
2022-12-05Calculate the bit clock based on number of channels, bytes/sample andMark Kettenis
sample rate instead of relying on the "mclk-fs" property. This property is no longer present in upstream device trees. ok ratchov@
2022-12-05Treat all possible mprotect() failures as fatal.Anton Lindqvist
2022-12-05bn_mod_exp.c doesn't need <string.h>Theo Buehler
2022-12-04userspace: remove vestigial '?' cases from top-level getopt(3) loopsScott Soule Cheloha
getopt(3) returns '?' when it encounters a flag not present in the in the optstring or if a flag is missing its option argument. We can handle this case with the "default" failure case with no loss of legibility. Hence, remove all the redundant "case '?':" lines. Prompted by dlg@. With help from dlg@ and millert@. Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2 ok naddy@ millert@ dlg@
2022-12-04zap weird spaces $EDITOR added in previousTheo Buehler
2022-12-04Print skipped while running on anything other than i386.Anton Lindqvist
2022-12-04systat(1): vmstat: measure elapsed time with clock_gettime(2) instead of ticksScott Soule Cheloha
The vmstat view in systat(1) should not use statclock() ticks to count elapsed time. First, ticks are low resolution. Second, the statclock is sometimes randomized, so each tick is not necessarily of equal length. Third, we're counting ticks from every CPU on the system, so every rate in the view is divided by the number of CPUs. For example, on an amd64 system with 8 CPUs you currently see: 200 clock ... when the true clock interrupt rate on that system is 1600. Instead, measure elapsed time with clock_gettime(2). Use CLOCK_UPTIME here so we exclude time when the system is suspended. With this change we no longer need "stathz" or "hertz". We can also get rid of the anachronistic secondary clock failure test. Prompted by dlg@ and jmatthew@. deraadt@ says this has been in snaps since 2022-11-21; no complaints. Link: https://marc.info/?l=openbsd-tech&m=166898960831136&w=2 ok dlg@ deraadt@
2022-12-04ld.so: Disable DT_MIPS_RLD_MAP_RELVisa Hankala
The linker produces incorrect values for DT_MIPS_RLD_MAP_REL tags. Disable the handling of the tag in the dynamic loader. The linker will be fixed in a later commit when snapshots have the updated ld.so. Discussed with and OK kettenis@ deraadt@
2022-12-04The next step for mimmutable(). ld.so figures out what regions of memoryTheo de Raadt
of startup shared library mappings can be made immutable, and also does this for dlope() RTLD_NODELETE and subsidiary libraries. Complexity in this diff is due to the GNU_RELRO and OPENBSD_MUTABLE sections. Tested in snaps for about 3 weeks, with some bootstrap related pain felt in ports ok kettenis, much help from others.
2022-12-04Rename sun to s_un for portability.Tobias Heider
ok patrick@