jsg [Sat, 30 Jul 2022 16:42:08 +0000 (16:42 +0000)]
rewrite was in Tahoe
ok cheloha@
jsing [Sat, 30 Jul 2022 16:40:23 +0000 (16:40 +0000)]
Provide additional AEAD test cases.
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@
jsing [Sat, 30 Jul 2022 16:31:41 +0000 (16:31 +0000)]
Add EVP_aes_192_gcm() as a known AEAD.
jsing [Sat, 30 Jul 2022 16:30:42 +0000 (16:30 +0000)]
Allow the AEAD to be specified for a test file.
Currently, this must be specified per test - allow it to be given as a
command line argument that applies to the entire test file.
jsing [Sat, 30 Jul 2022 16:17:22 +0000 (16:17 +0000)]
Run AEAD tests against EVP_CIPHER implementations.
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...
jsing [Sat, 30 Jul 2022 16:12:40 +0000 (16:12 +0000)]
Allow quoted ASCII strings as input for AEAD regress.
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.
cheloha [Sat, 30 Jul 2022 15:57:35 +0000 (15:57 +0000)]
sleep.1: miscellaneous rewrites, cleanup
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@
jsing [Sat, 30 Jul 2022 14:49:15 +0000 (14:49 +0000)]
Sort includes.
jsing [Sat, 30 Jul 2022 14:24:33 +0000 (14:24 +0000)]
Less #ifndef OPENSSL_NO_*
We're not going to be compiling without AES or CHACHA/POLY1305 anytime
soon.
kn [Sat, 30 Jul 2022 14:17:42 +0000 (14:17 +0000)]
vmctl create accepts exactly one argument
Make "vmctl create -s3G 1.img 2.img" fail instead of just creating 1.img
and ignoring 2.img.
OK dv cheloha
kn [Sat, 30 Jul 2022 14:15:20 +0000 (14:15 +0000)]
Fix build without intagp
Pull inteldrm_refcnt out of NINTAGP > 0, otherwise it remains undefined but
still used in inteldrm_attachhook().
OK jsg
jsing [Sat, 30 Jul 2022 14:09:00 +0000 (14:09 +0000)]
Fix comment formatting.
jsing [Sat, 30 Jul 2022 14:06:36 +0000 (14:06 +0000)]
Switch to ISC license.
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.
jsing [Sat, 30 Jul 2022 13:51:31 +0000 (13:51 +0000)]
Add stack frames to AES-NI x86_64 assembly.
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@
jsing [Sat, 30 Jul 2022 13:42:25 +0000 (13:42 +0000)]
Use ASN1_INTEGER to encode/decode BIGNUM_it.
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@
jsing [Sat, 30 Jul 2022 13:37:17 +0000 (13:37 +0000)]
Provide and use a primitive clear function for BIGNUM_it.
Also tidy up bn_new() while here.
ok tb@
tb [Sat, 30 Jul 2022 11:27:06 +0000 (11:27 +0000)]
Eliminate the somewhat pointless Ij variable
Requested by & ok jsing
tb [Sat, 30 Jul 2022 11:24:52 +0000 (11:24 +0000)]
Transform two || chains into individually checked functions
Requested by and ok jsing
jsg [Sat, 30 Jul 2022 07:19:30 +0000 (07:19 +0000)]
we mention interim BSD releases so change some 4.4BSD use to 4.3BSD-Reno
ok jmc@ schwarze@
kettenis [Fri, 29 Jul 2022 21:34:59 +0000 (21:34 +0000)]
Give to PE/COFF file proper .text and .data sections, and fill in the
characteristics field in the COFF header. Makes our bootloader work in the
x13s. With help from mlarkin@.
ok mlarkin@
kn [Fri, 29 Jul 2022 18:28:32 +0000 (18:28 +0000)]
Mention id(1) -R, reference rtable(4) in route(8)
Fix "ps -o rtable" example description while here.
Initial idea to mention id -R in route(8) from sthen
Feedback OK sthen
semarie [Fri, 29 Jul 2022 17:47:11 +0000 (17:47 +0000)]
Replace the swap extent(9) usage by a blist data structure.
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@
schwarze [Fri, 29 Jul 2022 17:34:07 +0000 (17:34 +0000)]
Improve the HISTORY sections of glob(7) and glob(3).
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@.
espie [Fri, 29 Jul 2022 14:26:45 +0000 (14:26 +0000)]
don't leave user guessing after latest "no need to update"
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.
millert [Fri, 29 Jul 2022 13:56:36 +0000 (13:56 +0000)]
Mention that ttyflags needs to be run to update per-device flags.
Also includes some minor cleanup inspired by the NetBSD version.
OK jmc@ sthen@
tb [Fri, 29 Jul 2022 08:37:33 +0000 (08:37 +0000)]
Having a perfect square at this point is not an error. Rather it is
a shortcut bypassing expensive computation, so change goto err to
goto done. Bug introduced in last refactoring before commit.
tb [Fri, 29 Jul 2022 08:32:20 +0000 (08:32 +0000)]
Tweak some comments and whitespace around comments
visa [Fri, 29 Jul 2022 08:23:40 +0000 (08:23 +0000)]
Allocate if_index before queue init
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@
bluhm [Thu, 28 Jul 2022 22:19:09 +0000 (22:19 +0000)]
In the kernel exist functions to print routes, but they were not
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@
bluhm [Thu, 28 Jul 2022 22:05:39 +0000 (22:05 +0000)]
Checking the fragment flags of an incoming IP packet does not need
the mutex for the fragment list. Move this code before the critical
section. Use ISSET() to make clear which flags are checked.
OK mvs@
tb [Thu, 28 Jul 2022 20:06:01 +0000 (20:06 +0000)]
Add a second test to validate the tables in the library.
miod [Thu, 28 Jul 2022 16:06:04 +0000 (16:06 +0000)]
Only attempt to set the yp domainname if not yet set; gets rid of an error
message at shutdown.
tweaks & ok deraadt@
tb [Thu, 28 Jul 2022 16:03:19 +0000 (16:03 +0000)]
Fix RFC number in comment
claudio [Thu, 28 Jul 2022 14:05:13 +0000 (14:05 +0000)]
Rework kroute_remove(), it uses a struct kroute_full and does most of
the work internally. Removes a bunch of duplicated code and simplifies
code further.
Input and OK tb@
deraadt [Thu, 28 Jul 2022 13:11:48 +0000 (13:11 +0000)]
whitespace found during a read-thru; ok claudio
kn [Thu, 28 Jul 2022 13:11:44 +0000 (13:11 +0000)]
Zap prototypes for nonexistent nd6_setmtu() and in6_ifdel()
Removed in 2015 and 2002, respectively.
OK claudio
kn [Thu, 28 Jul 2022 13:10:37 +0000 (13:10 +0000)]
Zap outdated nd6_free() comment about static
Added in 2002 r1.48 "sync with latest KAME [...]" along the attribute,
but nd6_free() became a global void function in 2017 r1.212.
Afaik static kernel functions are avoided to aid ddb'ugging and I
presume the "significant changes in the kernel" bits of the comment stem
from something 20 years ago no longer holding true today.
Afterall, this change has been safe for five years.
OK claudio
mbuhl [Thu, 28 Jul 2022 12:27:29 +0000 (12:27 +0000)]
Release PF und NET lock before calling copyin for DIOCXCOMMIT.
OK sashan, bluhm
claudio [Thu, 28 Jul 2022 10:41:18 +0000 (10:41 +0000)]
Remove F_DOWN, it is no longer used and reshuffle the other flags a bit
to group them a bit better.
OK tb@
claudio [Thu, 28 Jul 2022 10:40:25 +0000 (10:40 +0000)]
Adjust bgpctl show fib output.
Remove F_DOWN from flags since kroutes can no longer be marked down.
Also clean up the flag printing code and printf() and increase the size
of destionation and gateway so that more IPv6 addrs fit.
OK tb@
espie [Thu, 28 Jul 2022 09:09:43 +0000 (09:09 +0000)]
synch with reality
kevlo [Thu, 28 Jul 2022 00:56:02 +0000 (00:56 +0000)]
Remove bogus mtw_read_cfg.
ok hastings@
deraadt [Wed, 27 Jul 2022 23:06:50 +0000 (23:06 +0000)]
Place ypldap with ypserv, inside the $domainname check, since it also
has the same requirement.
guenther [Wed, 27 Jul 2022 22:24:26 +0000 (22:24 +0000)]
Revert _RuneLocale struct changes until mklocale reacharound
can be untangled.
Problem noted by tb@
kettenis [Wed, 27 Jul 2022 21:01:38 +0000 (21:01 +0000)]
Postpone calling the EFI SetVirtualAddressMap() interface until efi(4)
attaches. This prevents us from having to map the various EFI memory regions
early on. These early mappings use 1G blocks. On Apple M1 systems, these
blocks may overlap memory that isn't accessable. The CPU may speculatively
access this inaccessable memory which will result in SError exceptions.
ok deraadt@
kettenis [Wed, 27 Jul 2022 20:26:17 +0000 (20:26 +0000)]
Support "empty" phandles in interrups-extended properties. This is needed
to support the device tree binding for the "apple,admac" controller.
ok visa@, patrick@
kettenis [Wed, 27 Jul 2022 20:18:46 +0000 (20:18 +0000)]
Partially catch up with device tree bindings in mainline Linux.
Initialize the burst size register such that DMA channels that haven't
been initialized by Apple's bootloader also work.
ok patrick@
guenther [Wed, 27 Jul 2022 20:00:11 +0000 (20:00 +0000)]
Since we only do US-ASCII and UTF-8, several parts of the locale
data are unused and unnecessary, so delete them: rl_tabs, rl_magic,
rl_encoding, and rl_invalid_rune.
ok schwarze@
kn [Wed, 27 Jul 2022 19:42:22 +0000 (19:42 +0000)]
Print poll(2) errno
Distinguish between return values -1 (errno set) and 0.
OK kettenis
tb [Wed, 27 Jul 2022 19:22:45 +0000 (19:22 +0000)]
Adjust a comment to reflect reality, minor code tweaks.
claudio [Wed, 27 Jul 2022 17:23:17 +0000 (17:23 +0000)]
There is no need to track both F_BGPD and F_KERNEL anymore.
Remove F_KERNEL and replace the checks using the F_BGPD flag.
Also do not convert the priority in kr_tofull() instead provide
kr_priority() which does this and is used by the bgpctl imsg
commands. Also in dispatch_rtmsg_addr() convert to RTP_MINE if
the priority is equal to the configured priority.
OK tb@
bluhm [Wed, 27 Jul 2022 17:05:56 +0000 (17:05 +0000)]
srp_finalize() takes two parameter, but only one was documented.
OK jmatthew@
miod [Wed, 27 Jul 2022 17:01:02 +0000 (17:01 +0000)]
Force disabling the use of delay slots. This is ugly but gets the compiler
to produce 99+% correct code at all optimization levels, and can help people
who would like to tinker a bit with the backend.
(note m88k ports still use gcc 3 at the moment)
kn [Wed, 27 Jul 2022 12:32:03 +0000 (12:32 +0000)]
Fix reconstructed softraid bootline
With softraid, OBP's boot-file variable aka. bootline may contain the
sofraid volume name and kernel file name delimited by a double colon, e.g.
"sr0", "sr0a", "sr0:", "sr0a:", "sr0:/bsd" or "sr0a:/bsd".
ofwboot parses this string, may fill in optional partition number ("a")
and/or optional kernel file name ("/bsd") and always prints the fully
qualified string reconstructed from parts as "Booting <bootline>":
{0} ok boot my-devalias sr0
[...]
Boot device: /virtual-devices@100/channel-devices@200/disk@0 File and args: sr0
[...]
Booting sr0:a/bsd
[...]
{0} ok boot my-devalias sr0a:/bsd
[...]
Boot device: /virtual-devices@100/channel-devices@200/disk@0 File and args: sr0a:/bsd
[...]
Booting sr0:a/bsd
[...]
Swap partition and delimiter to fix the reconstructed string, making it
suitable for copy/paste:
Booting sr0a:/bsd
This has not been an issue since the reconstructed string is only printed
and not (re)used anywhere.
OK kettenis
mbuhl [Wed, 27 Jul 2022 12:28:27 +0000 (12:28 +0000)]
Remove redundant bzero, the pfctl struct memset later on.
Also memset the pfctl struct in pfctl_reset.
OK jan@
jsg [Wed, 27 Jul 2022 07:08:34 +0000 (07:08 +0000)]
now that llist is fixed enable more of i915 __notify_execute_cb()
this path is called when running the intel xorg driver on broadwell
jsg [Wed, 27 Jul 2022 06:57:06 +0000 (06:57 +0000)]
fix llist_for_each_entry*
enabling more of __notify_execute_cb() and running the intel xorg driver
on broadwell would fault in __notify_execute_cb() on
movq 0x38(%rsi),%r12
offsetof(struct execute_cb, work.node.llist) 0x38
llist_entry(NULL must not return NULL, it needs to wrap around
and return NULL minus the offset
the iterators stop when the offset added back to the result of
llist_entry() is NULL
they test that the first node is not NULL or that the next pointer
stored in a previous iteration of the loop is not NULL
hastings [Wed, 27 Jul 2022 06:41:04 +0000 (06:41 +0000)]
Enumerate and shift PHY mode bits.
ok stsp@, jmatthew@, kevlo@
daniel [Wed, 27 Jul 2022 01:44:25 +0000 (01:44 +0000)]
retire Rise CPU identification code
The Rise mp6 was an x86 compatible CPU that was available for about
a year from 1998 to 1999. Only the Kirin core was ever available
while the Lynx core did not make it to market. Shortly after this
CPU was released, SiS acquired Rise's technology and integrated it
into their SiS55x SoC which used a different vendor string.
Given how uncommon Rise CPUs are and given that we don't do anything
if we detect such a CPU, remove the small amount of code used to
identify them. OpenBSD should continue to run on these CPUs, they
just won't be recognized as Rise CPUs explicitly.
It is suspected that in the current code, a Rise CPU would not show
CX8 in the dmesg despite supporting the CMPXCHG8B instruction. The
Rise datasheet says that this cpuid feature bit is set to 0 to
"circumvent a reported bug in Windows NT". This is only a cosmetic
issue though as our kernel does not use CMPXCHG8B and our toolchain
assumes it exists (we default to -march=i586).
An interesting writeup on this topic is available here:
https://www.geoffchappell.com/studies/windows/km/cpu/cx8.htm
ok mlarkin@, deraadt@, jsg@
tb [Tue, 26 Jul 2022 19:50:06 +0000 (19:50 +0000)]
Do not pass input length <= 0 to the cipher handlers
Input length < 0 is an error and input length == 0 can result in
strange effects in some ciphers, except in CCM mode, which is extra
special.
Based on OpenSSL
420cb707 by Matt Caswell and Richard Levitte
found by & ok jsing
claudio [Tue, 26 Jul 2022 17:12:40 +0000 (17:12 +0000)]
No need to check RB_REMOVE() return value if kif is not NULL.
Therefor check that in the IFAN_DEPARTURE case the interface was found
before calling kif_remove.
Idea and OK tb@
claudio [Tue, 26 Jul 2022 16:36:33 +0000 (16:36 +0000)]
Missing indirection. This version compiles.
claudio [Tue, 26 Jul 2022 16:32:29 +0000 (16:32 +0000)]
Refactor nexthop tracking and remove all the kif_kr code. There is no
need to track directly connected routes per kif. The only use case was
for nexthop validation but that can be done by storing the ifindex in
struct knexthop.
OK tb@
jca [Tue, 26 Jul 2022 15:37:34 +0000 (15:37 +0000)]
For make obj, always the lldb* and llvm-ar directories
Apparently favored by deraadt@, pointed out by patrick@, ok patrick@
jca [Tue, 26 Jul 2022 15:34:33 +0000 (15:34 +0000)]
Only build lldb support libraries on archs where lldb is installed
Shaves off a significant amount of time (eg on riscv64) in base builds.
If you want to build gnu/usr.bin/clang from source you'll need
bsd.own.mk rev 1.213 installed.
ok miod@ patrick@
deraadt [Tue, 26 Jul 2022 14:53:45 +0000 (14:53 +0000)]
Only allow changing the domainname (from empty) before securelevel increase.
libc YP support has a couple of places where the domainname is cached, and
this results in wildly incoherent behaviour which could even be risky.
If you want to change the domainname, you will have to reboot.
ok beck miod
deraadt [Tue, 26 Jul 2022 14:53:29 +0000 (14:53 +0000)]
Only allow changing the domainname (from empty) before securelevel increase.
libc YP support has a couple of places where the domainname is cached, and
this results in wildly incoherent behaviour which could even be risky.
If you want to change the domainname, you will have to reboot.
ok beck miod
visa [Tue, 26 Jul 2022 14:49:13 +0000 (14:49 +0000)]
Remove "select collisions" output from vmstat(8).
While here, use NULL instead of "" as name list terminator.
OK mpi@ cheloha@
krw [Tue, 26 Jul 2022 14:30:37 +0000 (14:30 +0000)]
Allow editing of an MBR of all zeros.
Fallout from regress failure spotted by anton@.
krw [Tue, 26 Jul 2022 13:20:16 +0000 (13:20 +0000)]
Don't use echo "<blah>" | fdisk -e to create boot partition.
Use -b like the install scripts do.
Spotted by anton@.
tb [Tue, 26 Jul 2022 07:09:24 +0000 (07:09 +0000)]
minor tweaks: unwrap a line, tweak a comment and zap an empty line
claudio [Tue, 26 Jul 2022 06:48:18 +0000 (06:48 +0000)]
No need to provide a dummy nexthop anymore, instead set the nhflags to
NEXTHOP_VALID or 0 depending on the nexthop state for the testvector.
cheloha [Tue, 26 Jul 2022 04:07:13 +0000 (04:07 +0000)]
moncontrol(3): remove hertz() fallback function
In the moncontrol(3) code in libc there is a fallback function,
hertz(). The idea is, if getting kern.clockrate from sysctl(2) fails,
we fall back to deriving the value of hz(9) using setitimer(2)'s
rounding behavior.
This is extremely clever, but it actually sucks. Calling setitimer(2)
quietly cancels any extant ITIMER_REAL timer, so moncontrol(3) cannot
be safely used alongside setitimer(2). This fact is not documented.
kern.clockrate is not blocked by pledge(2), so outside of stack
corruption (which we can't do anything about anyway) I don't see a way
for the sysctl(2) call to ever fail on OpenBSD. So hertz() is also
pointless.
Hence this patch: get rid of hertz().
Thread: https://marc.info/?l=openbsd-tech&m=
163881542813633&w=2
ok guenther@
kn [Tue, 26 Jul 2022 00:38:42 +0000 (00:38 +0000)]
Zap unused bridge command skipping
netstart(8) lost bridge specific functionality in 2009.
$ grep bridge /etc/netstart
# interfaces (or bridges), add default routes and return.
This is dead unreached code.
OK deraadt
CVt: ----------------------------------------------------------------------
kn [Tue, 26 Jul 2022 00:36:54 +0000 (00:36 +0000)]
Zap obsolete bridge section
netstart(8) lost bridge specific functionality in 2009.
Replace "bridge" with "X" in the existent sentence and you'll get an
obvious unhelpful statement:
If the network interface is a bridge, the options described in
the bridge section of the ifconfig(8) manual page apply.
Since the following example is no longer special in any way, remove it.
OK deraadt
bluhm [Mon, 25 Jul 2022 23:19:34 +0000 (23:19 +0000)]
The IPv4 reassembly code is MP safe, so we can run it in parallel.
Note that ip_ours() runs with shared netlock, while ip_local() has
exclusive netlock after queuing. Move existing the code into
function ip_fragcheck() and call it from ip_ours().
OK mvs@
millert [Mon, 25 Jul 2022 21:43:58 +0000 (21:43 +0000)]
Rebase to 2022agtz from https://github.com/JodaOrg/global-tz
This version is derived from the IANA 2022a tzdata but with some
pre-1970 data restored that had been moved to the backzone file
(which we do not currently ship).
From this point on, we will follow the global-tz fork.
guenther [Mon, 25 Jul 2022 21:38:24 +0000 (21:38 +0000)]
Simplify wctype() and wctype_l(): we have one set of classification
types used by all (== both) locales; put their implementation in one
file and make the mapping static there. The rl_wctype member of
_RuneLocale and its initialization go away at the same time.
ok schwarze@
guenther [Mon, 25 Jul 2022 21:29:16 +0000 (21:29 +0000)]
Remove test of non-portable implementation details (whether wctype_t
and wctrans_t values are locale-specific) so we can simplify our
implementation in libc
ok schwarze@
tb [Mon, 25 Jul 2022 20:48:57 +0000 (20:48 +0000)]
Add a regression test for bn_isqrt.c
This validates the tables used in bn_is_perfect_square() and checks that
for randomly generated numbers the isqrt() is what it is expected to be.
krw [Mon, 25 Jul 2022 17:45:16 +0000 (17:45 +0000)]
Only MBR and GPT structures can be edited by fdisk.
If neither are found, restrict user actions to printing basic
information on the disk, reading the man page, initializing an
MBR or GPT, or terminating fdisk without changing anything.
Feedback on earlier attempt by miod@ and brynet@.
claudio [Mon, 25 Jul 2022 16:37:55 +0000 (16:37 +0000)]
Properly handle nexthop state changes in the decision process
In rev 1.90 of rde_decide.c the re->active cache of the best prefix was
replaced with a call to prefix_best(). This introduced a bug because the
nexthop state at that time may have changed already. As a result when
a nexthop became unreachable prefix_evaluate() had oldbest = NULL and
newbest = NULL and did not withdraw the prefix from FIB and Adj-RIB-Out.
To fix this store the nexthop state per prefix and introduce
prefix_evaluate_nexthop() which removes the prefix from the decision list,
updates the nexthop state of the prefix and reinserts the prefix. Doing
this ensures that prefix_best() always reports the same result once the
decison process is done. prefix_best() and prefix_eligible() only depend
on data stored on the prefix itself.
OK tb@
kettenis [Mon, 25 Jul 2022 16:35:41 +0000 (16:35 +0000)]
The GPIO pin on Apple M1 systems is actually connected to the SDZ pin, which
is reflected in more recent device trees. Adjust the driver accordingly.
ok patrick@
schwarze [Mon, 25 Jul 2022 15:29:21 +0000 (15:29 +0000)]
Separate the macro for generating string test functions
for the macro generating test functions for other data types.
This makes sense because both are sufficiently different.
It also avoids a large number of false positive compiler warnings
that guenther@ reported.
OK guenther@
kn [Mon, 25 Jul 2022 14:48:24 +0000 (14:48 +0000)]
Print function name for context
A single "out of order" line is too generic.
OK kettenis
mvs [Mon, 25 Jul 2022 08:29:26 +0000 (08:29 +0000)]
Don't grab netlock within pppacioctl(). pipex(4) doesn't rely on
netlock anymore.
ok bluhm@ yasuoka@
mvs [Mon, 25 Jul 2022 08:28:42 +0000 (08:28 +0000)]
Remove "Static" keyword from pipex(4) layer.
We don't use "static" keyword for functions declaration to allow ddb(4)
debug. Also, many "Static" functions are called by pppx(4) layer outside
pipex(4) layer.
This is the mostly mechanic diff, except the `pipex_pppoe_padding' which
should be "static const".
ok bluhm@ yasuoka@
visa [Mon, 25 Jul 2022 08:06:44 +0000 (08:06 +0000)]
Fix annotation of smr_tqh_last
smr_tqh_last is not intended for lockless use with SMR_PTR_GET().
visa [Mon, 25 Jul 2022 07:28:22 +0000 (07:28 +0000)]
Replace selwakeup() with KNOTE() in socket event activation
Let's try this again now that the kernel locking issue in nfsrv_rcv()
has been fixed.
The previous attempt of the conversion triggered hangs on NFS servers.
This was probably caused by the removal of the kernel-locked section
just prior to the socket upcall. The section had masked a locking error
in NFS code.
dtucker [Mon, 25 Jul 2022 07:12:45 +0000 (07:12 +0000)]
Restore missing "!" in TEST_SSH_ELAPSED_TIMES test.
tb [Mon, 25 Jul 2022 05:06:06 +0000 (05:06 +0000)]
fix indent
jsg [Mon, 25 Jul 2022 02:25:55 +0000 (02:25 +0000)]
If a command or interface first appeared in PWB/UNIX, UNIX System III or
UNIX System V mention it. Only do so in manual pages with a
pre-existing HISTORY section.
Prompted by the comparison of System V and BSD commands and interfaces
in Sun's "System V Enhancements Overview" document.
checked against manuals on bitsavers, TUHS archive and CSRG archive CDs
ok jmc@ schwarze@
jsg [Mon, 25 Jul 2022 01:57:48 +0000 (01:57 +0000)]
nl(1) was first in System III not SVR2
problem with FreeBSD manual page reported by segaloco on TUHS list
dtucker [Sun, 24 Jul 2022 23:29:10 +0000 (23:29 +0000)]
Test TEST_SSH_ELAPSED_TIMES for empty string not executable. No-op
on most platforms but should prevent warnings in -portable on systems
that don't have 'date %s'.
bluhm [Sun, 24 Jul 2022 22:38:25 +0000 (22:38 +0000)]
Fix assertion for write netlock in rip6_input(). ip6_input() has
shared net lock. ip_deliver() needs exclusive net lock. Instead
of calling ip_deliver() directly, use ip6_ours() to queue the packet.
Move the write lock assertion into ip_deliver() to catch such bugs
earlier.
The assertion was only triggered with IPv6 multicast forwarding or
router alert hop by hop option. Found by regress test.
OK kn@ mvs@
tb [Sun, 24 Jul 2022 21:41:29 +0000 (21:41 +0000)]
Plug leak in X509V3_add1_i2d()
Do not leak the extension that was deleted from the stack.
via OpenSSL
c3efe5c9.
ok jsing
tb [Sun, 24 Jul 2022 20:02:04 +0000 (20:02 +0000)]
Prepare to resurrect TS_RESP_CTX_set_time_cb()
This was removed shortly after the fork since TS is not 2038-ready
and since there were no consumers of this API. Now there are consumers
and they add it themselves if it's missing from libcrypto. This will no
longer be possible with opaque TS structs, so begrudgingly add it back.
ok jsing kn
tb [Sun, 24 Jul 2022 19:54:46 +0000 (19:54 +0000)]
Prepare to provide TS_VERIFY_CTX accessors
The setters make no sense since they do not free the old members and
return what was passed in instead of returning the old struct member
so that the caller has a chance of freeing them. This has the side
effect that calling a setter a second time will likely result in a leak.
TS_VERIFY_CTX_set_imprint() was "fixed" upstream by adding a free() but
the other three setters were missed since discussing the contributor's
CLA was more important. Also missed was that adding frees will result in
double frees: careful consumers like openssl/ruby have workarounds for
the strange existing semantics.
Add a compat #define for TS_VERIF_CTS_set_certs() that made it into the
public API with a typo.
A good illustration of the amount of thought and care that went into
the OpenSSL 1.1 API by both the implementers and the reviewers.
Amazing job overall.
We will be stuck with this nonsense for a long time.
ok jsing kn
tb [Sun, 24 Jul 2022 19:25:36 +0000 (19:25 +0000)]
Prepare to provide various TS_STATUS_INFO accessors
This adds TS_STATUS_get0_{failure_info,text,status}() as well as
TS_STATUS_INFO_set_status(). These will be needed by Ruby and openssl(1)
when we make the structs in ts.h opaque.
ok kn jsing
tb [Sun, 24 Jul 2022 18:55:22 +0000 (18:55 +0000)]
Align PKCS12_key_gen_uni() with OpenSSL
This is Dr Stephen Henson's rewrite avoiding BIGNUM (OpenSSL
54c68d35).
Additionally this pulls in a < vs <= fix by Pauli Dale (OpenSSL
9d868840).
There is also some minor cleanup by myself.
ok jsing