summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-07-31strlen was in v6 libc (s5/perror.c) but not documented till v7Jonathan Gray
ok schwarze@
2022-07-31Tidy up some of BN_nist_mod_*Joel Sing
Shuffle variables around for consistency, also ensuring appropriate and consistent initialisation. ok tb@
2022-07-31The geometry information in stuct disklabel is not used forKenneth R Westerback
anything. Allowing modifications to it or displaying whatever geometry was in use when the label was created leads to needless inconsistency with the kernel and with the values displayed by, e.g., fdisk(8). Always set label fields d_secsize, d_nsectors, d_ntracks, d_secpercyl, d_ncylinders to the current values used by the kernel, obtained via DIOCGPDINFO. Ignore any values from the on-disk label or the file -R uses. Nuke editor command 'g' and restrict editor command 'e' to changing d_type and d_packname.
2022-07-31fix indentTheo Buehler
2022-07-31typoDenis Fondras
2022-07-31Allow a NULL header in PEM_write{,_bio}()Theo Buehler
When PEM_write{,_bio}() were documented by Rich Salz and Richard Levitte, it was incorrectly stated that the header argument is allowed to be NULL. This was never true. Instead of fixing the documentation, it was decided that the API needs a fix, so pull in a variant of OpenSSL 3b9082c8. ok jsing
2022-07-31Add LWN in Gyumri, Shirak Region, ArmeniaKlemens Nanni
Armenian: Շիրակ Միջազգային Օդանավակայան Russian: Аеропорт Ширак It has exactly one terminal and the small cafe area inside seems bigger than the check-in area.
2022-07-31Randomise the rekey interval a little. Previously, the chacha20Damien Miller
instance would be rekeyed every 1.6MB. This makes it happen at a random point somewhere in the 1-2MB range. Feedback deraadt@ visa@, ok tb@ visa@
2022-07-31Replace selwakeup() with KNOTE() in audio(4)Visa Hankala
KNOTE() is safe to use at IPL_AUDIO. Remove the now-unnecessary deferring that uses soft interrupts. Remove selwakeup() calls from audio_detach() because klist_invalidate() wakes up any remaining kevent/poll/select waiters. OK mpi@
2022-07-31POSIX 2008 TC2 requires <inttypes.h> to provide wchar_tPhilip Guenther
ok kettenis@ espie@
2022-07-30Now that we have proper .text and .data sections we need to move dt_blob toPatrick Wildt
.data. dt_blob is a basic device tree that is populated from ACPI tables when booting with ACPI instead of DT. Since we're modifying its content we need to put it somewhere writeable. Found and proposed by mlarkin@ ok kettenis@ mlarkin@
2022-07-30syncStuart Henderson
2022-07-30Use named initialisers for BIGNUMs.Joel Sing
Also move the _bignum_nist_p_.*_sqr static BIGNUMs out of individual functions. ok tb@
2022-07-30Kill virtual address randomization for the EFI runtime. It was a neat ideaMark Kettenis
but it appears to be too fragile and now that we are using a 48-bit VA space for the EFI runtime we no longer need to call SetVirtualAddressMap() to make address fit into our pmap. Unbreaks the x13s. ok mlarkin@, patrick@
2022-07-30Untangle two logic chains in x509_asid.c into something more readable.Theo Buehler
ok jsing
2022-07-30update copyright yearsTheo Buehler
2022-07-30Reorder functions and remove unnecessary function prototypes.Joel Sing
2022-07-30Update copyright for additional/new code.Joel Sing
2022-07-30rewrite was in TahoeJonathan Gray
ok cheloha@
2022-07-30Provide additional AEAD test cases.Joel Sing
Bring in additional AEAD test cases from BoringSSL. This provides additional coverage for AES-{128,192,256}-GCM, as well as Chacha20-Poly1305 and XChaCha20-Poly1305. Discussed with tb@
2022-07-30Add EVP_aes_192_gcm() as a known AEAD.Joel Sing
2022-07-30Allow the AEAD to be specified for a test file.Joel Sing
Currently, this must be specified per test - allow it to be given as a command line argument that applies to the entire test file.
2022-07-30Run AEAD tests against EVP_CIPHER implementations.Joel Sing
In addition to running AEAD tests against the EVP_AEAD implementation, also run them against the EVP_CIPHER implementation where applicable. This is a perfect example of why EVP_AEAD exists and why EVP_CIPHER is completely unsuited for use with AEADs...
2022-07-30Allow quoted ASCII strings as input for AEAD regress.Joel Sing
Currently, each line in the text file is expected to be string of hexadecimal digits. In addition to this, allow a line to be given as an quoted ASCII string.
2022-07-30sleep.1: miscellaneous rewrites, cleanupScott Soule Cheloha
Description - "for a minimum of" is better said "for at least". - The seconds argument can be zero, so say "non-negative". - Specify that the number (the whole thing) is decimal to exclude e.g. hex numbers. It then follows that the optional fraction must also be decimal. - No need to inspire the reader to use sleep(1) in any particular way. It is probably sufficient to demonstrate these patterns in the Examples section later. Asynchronous Events - Note that SIGALRM wakes sleep(1) up "early". Examples - Simplify the first example. Parenthetically pointing the reader to at(1) muddies what is otherwise a trivial example. We can still point the reader to at(1) in the See Also section later. - Shorten the interval in the first example. A half hour is not interactive. - Get rid of the entire csh(1) example. It's extremely complex and the bulk of the text is spent explaining things that aren't about sleep(1) at all. - Tweak the third example to show the reader that you can sleep for a fraction of a second, as mentioned in the Description. Standards - Prefer active voice. "The handling of fractional arguments" is better said "Support for fractional seconds". Shorten "is provided as" to "is". History - Not merely "appeared": "first appeared". - Note that sleep(1) was reimplemented for 4.4BSD. Thread: https://marc.info/?l=openbsd-tech&m=165888826603953&w=2 Lots of nice tweaks from jmc@. Typo spotted by Crystal Kolipe. ok jmc@
2022-07-30Sort includes.Joel Sing
2022-07-30Less #ifndef OPENSSL_NO_*Joel Sing
We're not going to be compiling without AES or CHACHA/POLY1305 anytime soon.
2022-07-30vmctl create accepts exactly one argumentKlemens Nanni
Make "vmctl create -s3G 1.img 2.img" fail instead of just creating 1.img and ignoring 2.img. OK dv cheloha
2022-07-30Fix build without intagpKlemens Nanni
Pull inteldrm_refcnt out of NINTAGP > 0, otherwise it remains undefined but still used in inteldrm_attachhook(). OK jsg
2022-07-30Fix comment formatting.Joel Sing
2022-07-30Switch to ISC license.Joel Sing
Use Google's ISC license for this code - this was originally being upstreamed to OpenSSL by Adam Langley, however it was never actually accepted and eventually ended up in BoringSSL (via commit dfe3053086). The same change was made a long time ago for evp/evp_aead.c and others.
2022-07-30Add stack frames to AES-NI x86_64 assembly.Joel Sing
The current AES-NI x86_64 assembly does some strange, although valid things, such as making internal function calls without creating stack frames. In this case, the return address lands in the red zone (which it allows for when making use of the stack) and everything works as expected. However, this trips a false positive in valgrind, which seems to think that any data saved on the stack prior to the internal function call is now "undefined" once the function returns. Avoid this by actually using stack frames - this brings in most of 6a40ebe86b4 from OpenSSL, omitting the unnecessary explicit stack alignment (which was apparently added so this code could be used in the Linux kernel with an incorrectly aligned stack). Valgrind issue reported by Steffen Jaeckel (@sjaeckel), found via libstrophe unit tests. ok tb@
2022-07-30Use ASN1_INTEGER to encode/decode BIGNUM_it.Joel Sing
The current code simply shoves the unvalidated ASN.1 bytes into a BIGNUM on the hope that other things will detect issues (such as negative values being flipped to positive). Instead of doing this, decode and validate the ASN.1 data using ASN1_INTEGER, then convert it to a BIGNUM. Similarly, for encoding convert from BIGNUM to ASN1_INTEGER and use ASN1_INTEGER encoding. ok tb@
2022-07-30Provide and use a primitive clear function for BIGNUM_it.Joel Sing
Also tidy up bn_new() while here. ok tb@
2022-07-30Eliminate the somewhat pointless Ij variableTheo Buehler
Requested by & ok jsing
2022-07-30Transform two || chains into individually checked functionsTheo Buehler
Requested by and ok jsing
2022-07-30we mention interim BSD releases so change some 4.4BSD use to 4.3BSD-RenoJonathan Gray
ok jmc@ schwarze@
2022-07-29Give to PE/COFF file proper .text and .data sections, and fill in theMark Kettenis
characteristics field in the COFF header. Makes our bootloader work in the x13s. With help from mlarkin@. ok mlarkin@
2022-07-29Mention id(1) -R, reference rtable(4) in route(8)Klemens Nanni
Fix "ps -o rtable" example description while here. Initial idea to mention id -R in route(8) from sthen Feedback OK sthen
2022-07-29Replace the swap extent(9) usage by a blist data structure.Sebastien Marie
It makes uvm_swap_free() faster: extents have a cost of O(n*n) which doesn't really scale with gigabytes of swap. Based on initial work from mpi@ The blist implementation comes from DragonFlyBSD. The diff adds also a ddb(4) 'show swap' command to show the blist and help debugging, and fix some off-by-one in size printed during hibernate. ok mpi@
2022-07-29Improve the HISTORY sections of glob(7) and glob(3).Ingo Schwarze
1. Make /etc/glob history less wordy and more precise: it was already in v1. 2. Remove the incorrect statement that the Bourne shell first integrated globbing. The PWB shell already did that in mid-1975, i.e. a least a few months before Stephen R. Bourne started working on his shell, and the PWB shell was publicly released with PWB/UNIX 1.0 about two years before v7. For details, see https://sjmulder.nl/dl/tuhs/Documentation/AUUGN/AUUGN-V06.6.pdf p. 39-40 OCR repost: https://groups.google.com/g/alt.folklore.computers/c/xW3ZgEnFoFs From: mash@mips.UUCP (John Mashey) Newsgroups: net.unix-wizards Subject: Re: Shell history, true facts, but long Date: 18 Mar 86 09:05:12 GMT [...] 3) The "PWB Shell" first appeared in mid-1975. [...] 4) The Bourne shell work started either in early 1976, or maybe late 1975. [...] In "The UNIX Shell", Stephen R. Bourne says: "The design of the shell is based in part on the original UNIX shell and the PWB/UNIX shell, some features having been taken from both." 3. Avoid the confusing statement that the glob() function first appeared in 4.4BSD. Actually, the PWB shell, the Bourne shell (in v7), the first UCB shell (in 1BSD), and the C shell (in 2BSD) all contained internal functions either called "glob()" or at least containing "glob" as a part of their function name. 4. Be more precise regarding when the current functions first appeared: they were already in Reno. Joint work with and OK jsg@. Feedback and OK jmc@.
2022-07-29don't leave user guessing after latest "no need to update"Marc Espie
show a "processing" message when we're actually grabbing data (often from the net). This should be really quick in most cases, but sometimes, it might take minutes (like for texlive), so that we know what's going on.
2022-07-29Mention that ttyflags needs to be run to update per-device flags.Todd C. Miller
Also includes some minor cleanup inspired by the NetBSD version. OK jmc@ sthen@
2022-07-29Having a perfect square at this point is not an error. Rather it isTheo Buehler
a shortcut bypassing expensive computation, so change goto err to goto done. Bug introduced in last refactoring before commit.
2022-07-29Tweak some comments and whitespace around commentsTheo Buehler
2022-07-29Allocate if_index before queue initVisa Hankala
Allocate the index of a new network interface early so that the index is available when the interface's queues are set up. This avoids unintended concentration on net_tq(0). Replace the kernel lock with an rwlock to serialize index map updates. The kernel lock is not reliable here because the memory allocation can sleep. Also, correct the "too many interfaces" condition because the valid index range is from 1 to USHRT_MAX. OK bluhm@
2022-07-28In the kernel exist functions to print routes, but they were notAlexander Bluhm
accessible from ddb. Implement "show all routes" to print routing tables, and "show route 0xfffffd807e9b0000" for a single route entry. Note that the rtable id is not part of a route entry, so it makes no sense to print it there. OK deraadt@
2022-07-28Checking the fragment flags of an incoming IP packet does not needAlexander Bluhm
the mutex for the fragment list. Move this code before the critical section. Use ISSET() to make clear which flags are checked. OK mvs@
2022-07-28Add a second test to validate the tables in the library.Theo Buehler
2022-07-28Only attempt to set the yp domainname if not yet set; gets rid of an errorMiod Vallat
message at shutdown. tweaks & ok deraadt@