deraadt [Mon, 13 Sep 2021 15:05:57 +0000 (15:05 +0000)]
sync
deraadt [Mon, 13 Sep 2021 15:05:44 +0000 (15:05 +0000)]
no longer needed
robert [Mon, 13 Sep 2021 14:41:01 +0000 (14:41 +0000)]
add 7.1 syspatch pubkey
visa [Mon, 13 Sep 2021 12:19:10 +0000 (12:19 +0000)]
Remember to lock user pmap in pmap_extract()
pmap_extract() has to lock user pmap to prevent concurrent pruning
of the page table. The kernel pmap is exempt from this because it uses
a fixed page table structure.
visa [Mon, 13 Sep 2021 12:16:43 +0000 (12:16 +0000)]
Consistently use unsigned long for CPU masks in pmap.c.
robert [Mon, 13 Sep 2021 11:49:21 +0000 (11:49 +0000)]
introduce /etc/bsd.re-config which can be used to configure the kernel
using config(8);
the contents of this configuration file will be fed to config(8) after
kernel relinking is done, so on the next boot the new kernel will have
all the configuration changes set by the user
this comes handy if you still want to use KARL while making changes
to the GENERIC kernel
diff from Paul de Weerd with input from several developers
krw [Mon, 13 Sep 2021 11:44:40 +0000 (11:44 +0000)]
Document that the editing command 'disk' takes an optional units argument.
jmatthew [Mon, 13 Sep 2021 09:57:48 +0000 (09:57 +0000)]
Enable uaq(4) on amd64. Investigations into problems on other platforms
are ongoing.
robert [Mon, 13 Sep 2021 05:17:04 +0000 (05:17 +0000)]
check the installer's /tmp/i/hostname.* files for a configured IP address
so that configurations without a broadcast address are detected as well
ok sthen@
deraadt [Mon, 13 Sep 2021 04:02:15 +0000 (04:02 +0000)]
take us out of beta
jmc [Sun, 12 Sep 2021 16:37:42 +0000 (16:37 +0000)]
freebsd history is irrelevant here; pointed ok by and ok deraadt
krw [Sun, 12 Sep 2021 16:36:52 +0000 (16:36 +0000)]
Stop taking detour through unit_types[SECTORS] to find
dl.d_secsize.
Leave unit_types[SECTORS].ut_conversion at 0, and test that to
determine if a size needs to be converted from a sectors value.
Use consistent dance to find the desired size value to print.
Logic is clearer, unit_types[] is now const, nobody but misc.c
knows about SECTORS.
No intentional functional change.
tb [Sun, 12 Sep 2021 16:23:19 +0000 (16:23 +0000)]
Default to using named curve parameter encoding
The pre-OpenSSL 1.1.0 default was to use explicit curve parameter
encoding. Most applications want to use named curve parameter encoding
and have to opt into this explicitly.
Stephen Henson changed this default in OpenSSL commit
86f300d3 6 years
ago and provided a new OPENSSL_EC_EXPLICIT_CURVE define to opt back into
the old default. According to Debian's codesearch, no application
currently does this, which indicates that we currently have a bad default.
In the future it is more likely that applications expect the new
default, so we follow OpenSSL to avoid problems.
Prompted by schwarze who noted that OPENSSL_EC_EXPLICIT_CURVE is missing.
ok beck inoguchi jsing
anton [Sun, 12 Sep 2021 07:06:59 +0000 (07:06 +0000)]
annotate root only targets; ok bluhm@
anton [Sun, 12 Sep 2021 07:06:08 +0000 (07:06 +0000)]
hook up libagentx; ok martijn@
anton [Sun, 12 Sep 2021 06:58:08 +0000 (06:58 +0000)]
Revert recent uhidev report size changes. It's reported to break fido devices
for as of now unknown reasons.
deraadt [Sat, 11 Sep 2021 23:22:38 +0000 (23:22 +0000)]
Identify TPM2.0 devices and perform the 2.0-specific "suspend" command
(researched by mlarkin). With this, and the latest BIOS which added S3,
the lenovo x1r9 and x1nano can resume.
ok kettenis mlarkin
mglocker [Sat, 11 Sep 2021 22:42:12 +0000 (22:42 +0000)]
Don't set the highspeed bit on bcm2835-sdhci sdhc(4) controllers.
Same approach as on Linux and NetBSD. This fixes bwfm(4) Wi-Fi on the
Raspberry Pi 3 Model B Plus.
help and ok kettenis@
schwarze [Sat, 11 Sep 2021 18:58:41 +0000 (18:58 +0000)]
merge the description of SSL_get_tlsext_status_type(3)
from the OpenSSL 1.1.1 branch, which is still under a free license
kettenis [Sat, 11 Sep 2021 18:08:32 +0000 (18:08 +0000)]
Change the scope of the locking in pmap_extract() to prevent a race between
walking the page tables and another thread calling pmap_remove() that ends
up removing a page table page.
tested by sthen@
ok deraadt@, mpi@
schwarze [Sat, 11 Sep 2021 17:59:04 +0000 (17:59 +0000)]
Merge documentation of EC_GROUP_order_bits(3) from the OpenSSL 1.1.1
branch, which is still under a free license.
While here, also merge a few other improvements, mostly regarding
EC_GROUP_get_order(3) and EC_GROUP_get_cofactor(3); in particular,
some statements below RETURN VALUES were outright wrong.
This patch includes a few minor tweaks and an addition to HISTORY by me.
Feedback and OK tb@.
stsp [Sat, 11 Sep 2021 17:28:44 +0000 (17:28 +0000)]
Zero out iwx(4) Tx descriptors of frames which are done.
This will hopefully prevent the device from ever writing to the former
DMA address of a buffer which has been taken off the Tx ring.
As far as I understand, the Linux driver unmaps (parts of) Tx descriptors
that are done. We use a static DMA mapping for the entire descriptor array,
so unmapping is not an option for us.
Tested by several as part of my Tx aggregation support patch.
stsp [Sat, 11 Sep 2021 17:28:04 +0000 (17:28 +0000)]
Fix a bug in iwx(4) Tx done interrupt processing.
Clear the byte-count for the correct frame while taking frames off the ring.
This should fix some 'fatal firmware errors' seen under load, and prevent
memory corruption: The device could access an mbuf we have freed, but which
is still marked as used in the byte count table and which still has a DMA
address in its Tx descriptor. Problem observed by mlarkin with NFS while
testing my patch for Tx aggregation support.
job [Sat, 11 Sep 2021 13:31:31 +0000 (13:31 +0000)]
Add BGPSec Router (RFC 8209) Key Purpose OID
OK tb@
schwarze [Sat, 11 Sep 2021 09:05:50 +0000 (09:05 +0000)]
Do not ignore SIGINT while waiting for input if editline(3) is not used.
Instead, in non-interactive mode, exit sftp(1), like for other serious errors.
As pointed out by dtucker@, when compiled without editline(3) support in
portable OpenSSH, the el == NULL branch is also used for interactive mode.
In that case, discard the input line and provide a fresh prompt to the user
just like in the case where editline(3) is used.
OK djm@
schwarze [Sat, 11 Sep 2021 08:45:47 +0000 (08:45 +0000)]
Merge documentation for BN_bn2binpad(3), BN_bn2lebinpad(3),
and BN_lebin2bn(3) from the OpenSSL 1.1.1 branch,
which is still under a free license.
While here, tweak a number of details for clarity.
OK tb@
djm [Sat, 11 Sep 2021 00:40:24 +0000 (00:40 +0000)]
when using SFTP protocol, continue transferring files after a
transfer error occurs. This matches original scp/rcp behaviour.
ok dtucker@
millert [Fri, 10 Sep 2021 18:58:43 +0000 (18:58 +0000)]
Calling OpenSSL_add_all_digests() is no longer needed since the library
automatically initializes itself. OK tb@
stsp [Fri, 10 Sep 2021 16:38:35 +0000 (16:38 +0000)]
Let iwx(4) resume directly in DVACT_WAKEUP instead of running the init task.
Suggested by deraadt@ during discussion at k2k21.
With additional input from mlarkin. And deraadt spotted some pointless
splnet() calls which this patch is removing.
Resume from S3 tested by me on an x250 thinkpad with a compatible
ax200 wifi card provided by mlarkin. Hibernate tested by deraadt.
Sync comments about the PCI retry timeout workaround with Linux while here.
ok mlarkin@
krw [Fri, 10 Sep 2021 15:26:36 +0000 (15:26 +0000)]
Stop using NULL as a synonym for "s" (SECTORS). Just use "s".
Remove now pointless NULL check in unit_lookup().
No intentional functional change.
bluhm [Fri, 10 Sep 2021 15:18:36 +0000 (15:18 +0000)]
When writing a message, syslogd did a combination of putting
everything into an iov and do some sprintf() formating later. Better
put everything into the iov upfront based on what the output methods
need. Then either the full iov is written or a line is created by
concatenating.
OK martijn@
tb [Fri, 10 Sep 2021 15:10:38 +0000 (15:10 +0000)]
sync
tb [Fri, 10 Sep 2021 15:09:40 +0000 (15:09 +0000)]
crank major for libcrypto as well
'may as well' deraadt
tb [Fri, 10 Sep 2021 15:06:48 +0000 (15:06 +0000)]
major bump (same type of crank as libssl)
tb [Fri, 10 Sep 2021 15:06:12 +0000 (15:06 +0000)]
bump major after symbol addition and struct removal, struct visibility
changes
tb [Fri, 10 Sep 2021 15:05:35 +0000 (15:05 +0000)]
Update Symbols.list after API additions
tb [Fri, 10 Sep 2021 15:04:49 +0000 (15:04 +0000)]
Bump minor after symbol addition
tb [Fri, 10 Sep 2021 15:04:11 +0000 (15:04 +0000)]
Add BN_bn2{,le}binpad(), BN_lebin2bn(), EC_GROUP_order_bits to Symbols.list
ok beck inoguchi jsing
nicm [Fri, 10 Sep 2021 15:03:18 +0000 (15:03 +0000)]
Do fatal/fatalx a different way so the compiler trick to avoid warnings
becomes unnecessary, prompted by theo.
tb [Fri, 10 Sep 2021 14:58:44 +0000 (14:58 +0000)]
Move SSL_set0_rbio() outside of LIBRESSL_HAS_TLS1_3
ok inoguchi jsing
tb [Fri, 10 Sep 2021 14:57:31 +0000 (14:57 +0000)]
Expose SSL_get_tlext_status_type() in tls1.h
ok beck jsing
tb [Fri, 10 Sep 2021 14:55:53 +0000 (14:55 +0000)]
Expose SSL_R_NO_APPLICATION_PROTOCOL in ssl.h
ok beck jsing
tb [Fri, 10 Sep 2021 14:55:24 +0000 (14:55 +0000)]
Expose SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE in ssl.h
ok beck jsing
tb [Fri, 10 Sep 2021 14:54:14 +0000 (14:54 +0000)]
Expose SSL_CTX_get0_privatekey() in ssl.h
ok beck
tb [Fri, 10 Sep 2021 14:50:19 +0000 (14:50 +0000)]
Remove TLS1_get_{,client_}version()
ok jsing
tb [Fri, 10 Sep 2021 14:49:13 +0000 (14:49 +0000)]
Remove SSL3_RECORD and SSL3_BUFFER
with/ok jsing
tb [Fri, 10 Sep 2021 14:47:24 +0000 (14:47 +0000)]
Remove TLS1_RT_HEARTBEAT
ok jsing
tb [Fri, 10 Sep 2021 14:46:31 +0000 (14:46 +0000)]
Make SSL opaque
with/ok jsing
tb [Fri, 10 Sep 2021 14:44:25 +0000 (14:44 +0000)]
Remove struct tls_session_ticket_ext_st and TLS_SESSION_TICKET_EXT
from public visibility.
with/ok jsing
tb [Fri, 10 Sep 2021 14:39:22 +0000 (14:39 +0000)]
Uncomment LIBRESSL_HAS_{TLS1_3,DTLS1_2} in opensslfeatures.h
tb [Fri, 10 Sep 2021 14:37:14 +0000 (14:37 +0000)]
Use BN_RAND_* instead of mysterious values in the documentation of
BN_rand_range()
From OpenSSL 1.1.1l
ok beck jsing
tb [Fri, 10 Sep 2021 14:35:36 +0000 (14:35 +0000)]
Expose EC_GROUP_order_bits() in <openssl/ec.h>
ok beck jsing
tb [Fri, 10 Sep 2021 14:33:44 +0000 (14:33 +0000)]
Expose BN_bn2{,le}binpad() and BN_lebin2bn() in <openssl/bn.h>
ok beck inoguchi
tb [Fri, 10 Sep 2021 14:32:05 +0000 (14:32 +0000)]
Expose BN_RAND_* in <openssl/bn.h>
ok beck jsing
nicm [Fri, 10 Sep 2021 14:22:24 +0000 (14:22 +0000)]
Get rid of the last two warnings by turning them off around the problem
statements, if the compiler supports it.
schwarze [Fri, 10 Sep 2021 13:23:44 +0000 (13:23 +0000)]
Quirk-compatibility with GNU tbl(1):
With the "nospaces" option, skip space characters before and after "T{",
in addition to skipping those at the beginning and end of data cells.
Minor issue reported by <Oliver dot Corff at email dot de>.
claudio [Fri, 10 Sep 2021 13:20:03 +0000 (13:20 +0000)]
Properly handle keep-alive for HTTP/1.1. If the server uses HTTP/1.1
keep-alive is the default. Check this early on and disable keep-alive
if a Connection: closed header is sent. Fixes the keep-alive issues
I have seen.
OK sthen@
schwarze [Fri, 10 Sep 2021 12:06:29 +0000 (12:06 +0000)]
In a tbl(7) having the "nospaces" option, skip space characters
not only at the end of data cells, but also after "T}",
aligning the behaviour of the parser with GNU tbl(1).
Issue reported by <Oliver dot Corff at email dot de>.
dtucker [Fri, 10 Sep 2021 11:38:38 +0000 (11:38 +0000)]
Document that non-interactive commands are run via the user's shell
using the -c flag. ok jmc@
dtucker [Fri, 10 Sep 2021 10:26:02 +0000 (10:26 +0000)]
Document behaviour of arguments following non-interactive commands.
Prompted by github PR#139 from EvanTheB, feedback & ok djm@ jmc@
tb [Fri, 10 Sep 2021 09:25:29 +0000 (09:25 +0000)]
Do not ignore SSL_TLSEXT_ERR_FATAL from the ALPN callback
As reported by Jeremy Harris, we inherited a strange behavior from
OpenSSL, in that we ignore the SSL_TLSEXT_ERR_FATAL return from the
ALPN callback. RFC 7301, 3.2 states: 'In the event that the server
supports no protocols that the client advertises, then the server
SHALL respond with a fatal "no_application_protocol" alert.'
Honor this requirement and succeed only on SSL_TLSEXT_ERR_{OK,NOACK}
which is the current behavior of OpenSSL. The documentation change
is taken from OpenSSL 1.1.1 as well.
As pointed out by jsing, there is more to be fixed here:
- ensure that the same protocol is selected on session resumption
- should the callback be called even if no ALPN extension was sent?
- ensure for TLSv1.2 and earlier that the SNI has already been processed
ok beck jsing
tb [Fri, 10 Sep 2021 09:08:03 +0000 (09:08 +0000)]
Prepare to provide BN_RAND_* flags for BN_rand_range()
ok beck jsing
tb [Fri, 10 Sep 2021 08:59:56 +0000 (08:59 +0000)]
Prepare to provide SSL_CTX_get0_privatekey()
ok beck
nicm [Fri, 10 Sep 2021 08:52:46 +0000 (08:52 +0000)]
Disable aliases inside aliases for the moment.
dtucker [Fri, 10 Sep 2021 07:11:11 +0000 (07:11 +0000)]
Clarify which file's attributes -p preserves, and that it's specifically
the file mode bits. bz#3340 from calestyo at scientia.net, ok djm@ jmc@
anton [Fri, 10 Sep 2021 05:48:43 +0000 (05:48 +0000)]
Minor KNF nit, align struct field.
anton [Fri, 10 Sep 2021 05:47:38 +0000 (05:47 +0000)]
Instead of letting uhidev drivers get the report sizes, do it once in
uhidev and pass the same sizes as part of the attach arguments. Makes
the uhidev drivers a bit less repetitive.
It might look tempting to let uhidev assign the sizes after a driver has
attached, removing the need to repeat this logic in each driver. This
does however not work since the input size must be known while calling
uhidev_open() in order to open the interrupt pipe; and uhidev_open() is
called from several attach routines.
Note that this change only works and applies to when attaching to a
single report ID.
ok jcs@
djm [Fri, 10 Sep 2021 05:46:09 +0000 (05:46 +0000)]
openssh-7.4 was incorrectly listed twice; spotted by Dmitry
Belyavskiy, ok dtucker@
anton [Fri, 10 Sep 2021 05:46:01 +0000 (05:46 +0000)]
Remove unused repsizes array.
ok jcs@ as part of a larger diff
deraadt [Fri, 10 Sep 2021 00:02:43 +0000 (00:02 +0000)]
annotate what symbols are used from sys/param.h lines, or delete them
if not required. when deleting, add sys/signal.h or other lines which
were not being pulled in
deraadt [Fri, 10 Sep 2021 00:01:13 +0000 (00:01 +0000)]
nothing from sys/param.h is used
deraadt [Fri, 10 Sep 2021 00:00:55 +0000 (00:00 +0000)]
the SunOS lseek 4G wraparound workaround is not needed, consequently
pulling BSD from sys/param.h is not needed either
kettenis [Thu, 9 Sep 2021 22:46:03 +0000 (22:46 +0000)]
Adjust for DT binding changes. Add some temporary backwards compatibility
code to help making the transition. This will be removed in a few weeks.
nicm [Thu, 9 Sep 2021 21:55:03 +0000 (21:55 +0000)]
Keep -? as usage.
jasper [Thu, 9 Sep 2021 20:08:15 +0000 (20:08 +0000)]
add test for printing empty arguments
ok mpi@
jasper [Thu, 9 Sep 2021 20:07:49 +0000 (20:07 +0000)]
fix crash when passing empty cli arguments as B_AT_NIL wasn't handled as a valid argument type
found with afl++
ok mpi@
nicm [Thu, 9 Sep 2021 19:37:17 +0000 (19:37 +0000)]
Turn on both button and all mouse modes for menus since some terminals
only support the former.
jasper [Thu, 9 Sep 2021 19:02:50 +0000 (19:02 +0000)]
add hist() tests similar to mapempty.bt
ok mpi@
mpi [Thu, 9 Sep 2021 18:41:39 +0000 (18:41 +0000)]
Add THREAD_PID_OFFSET to tracepoint arguments that pass a TID to userland.
Bring these values in sync with the `tid' builtin which already include
the offset. This is necessary to build script comparing them, like:
tracepoint:sched:enqueue
{
@ts[arg0] = nsecs;
}
tracepoint:sched:on__cpu
/@ts[tid]/
{
latency = nsecs - @ts[tid];
}
Discussed with and ok bluhm@
mpi [Thu, 9 Sep 2021 18:23:31 +0000 (18:23 +0000)]
Move a check to avoid panicing on contended rwlock(9) outside of DIAGNOSTIC.
ok kettenis@
anton [Thu, 9 Sep 2021 17:36:34 +0000 (17:36 +0000)]
Ensure that the kill signal undergoing testing is not ignored.
ok bluhm@
schwarze [Thu, 9 Sep 2021 16:50:57 +0000 (16:50 +0000)]
In HTML output, in cells with an "n" (number) layout, pad numbers
on the right side with UTF-8 punctuation and figure spaces such
that numbers in different tbl(7) rows align at the decimal point.
The exact HTML output format was suggested
by <Oliver dot Corff at email dot de>;
the implementation in C is mine.
krw [Thu, 9 Sep 2021 15:21:39 +0000 (15:21 +0000)]
Simplify logic in USER_edit() loop to eliminate unnecessary
goto's.
Rename CMD_SAVE to CMD_QUIT to reflect actual command (Xquit) and
help and man page verbiage.
No intentional functional change.
beck [Thu, 9 Sep 2021 15:09:43 +0000 (15:09 +0000)]
When calling the legacy callback, ensure we catch the case where it
has decided to change a succeess to a failure and change the error code.
Fixes a regression in the openssl-ruby tests which expect to test this
functionality.
ok tb@
tb [Thu, 9 Sep 2021 15:02:33 +0000 (15:02 +0000)]
Rework openssl-ruby-tests to run all passing tests first, then
run the one failing test as a separate regress test. This way,
all regressions should be caught with REGRESS_FAIL_EARLY=yes or
on bluhm's regress webpage.
This needs an up-to-date openssl-ruby-tests package and an
upcoming commit by beck in x509_verify.c to work.
ok beck bluhm
schwarze [Thu, 9 Sep 2021 14:45:18 +0000 (14:45 +0000)]
If the layout or data of an individual cell in a tbl(7) contains
only "_", "-", or "=", requesting a horizontal line to be drawn
across the middle of the cell, print <hr/> in that cell in HTML
output.
That is arguably slightly ugly because HTML 5 regards <hr/> as
semantic markup, meaning "thematic break". If somebody knowns
a better way to render a horizontal line across the middle of a
table cell with pure HTML and CSS, and without implying a specific
meaning, please tell me.
Missing feature reported by <Oliver dot Corff at email dot de>.
claudio [Thu, 9 Sep 2021 14:15:49 +0000 (14:15 +0000)]
Rework how various OIDs are compared in the code.
Instead of converting the ASN1_OBJECT into a string and comparing the
strings, convert the string into an ASN1_OBJECT once and then compare
these objects with OBJ_cmp().
Makes the code a bit easier to read and removes some repetitive conversions.
With input and OK tb@
nicm [Thu, 9 Sep 2021 13:38:32 +0000 (13:38 +0000)]
Expand argument to run-shell again.
claudio [Thu, 9 Sep 2021 13:02:36 +0000 (13:02 +0000)]
No need to initialize nuv, it is assigned to before use.
krw [Thu, 9 Sep 2021 12:36:45 +0000 (12:36 +0000)]
Scan unit_types[] array using nitems() and eliminate the NULL
sentinal entry.
No functional change.
tb [Thu, 9 Sep 2021 12:14:22 +0000 (12:14 +0000)]
zap trailing whitespace
tb [Thu, 9 Sep 2021 12:12:39 +0000 (12:12 +0000)]
zap trailing whitespace
mpi [Thu, 9 Sep 2021 12:09:11 +0000 (12:09 +0000)]
Relax the check for accessing variable before setting them.
First we can't assume rules are written in the order they will be executed.
Secondly filters might need to check variables before they had a chance to
be populated by the right event.
schwarze [Thu, 9 Sep 2021 11:48:06 +0000 (11:48 +0000)]
Do not abuse the "cleandir" target to delete part of the test output.
According to /usr/share/mk/bsd.README, that target is only intended
to delete tags files, and there are no tags files here. Instead,
make sure the "clean" target does not leave any test output behind.
Issue reported and patch OK'ed by bluhm@.
mpi [Thu, 9 Sep 2021 11:20:40 +0000 (11:20 +0000)]
Let ba2str() handle unitialized map just like ba2long() does.
mpi [Thu, 9 Sep 2021 10:00:04 +0000 (10:00 +0000)]
Hook test for command line arguments support.
mpi [Thu, 9 Sep 2021 09:56:32 +0000 (09:56 +0000)]
Test assigning multiple probes to a single action.
This relies on the 'interval' provider which should always be present.
mpi [Thu, 9 Sep 2021 09:53:11 +0000 (09:53 +0000)]
Make it possible to associate multiple probes to a single rule.
The following syntax, reducing duplication, is now allowed:
END,
interval:hz:2
{
...
}
Rule descriptors are now linked to a list of probe descriptors instead of
a single one. Enabled kernel probes are now linked to btrace(8) probe
descriptors.
While here stop parsing filter and probe if debug is not enabled.
mpi [Thu, 9 Sep 2021 09:43:49 +0000 (09:43 +0000)]
Handle new NIL type in ba_name().
Fix filter debugging.
mpi [Thu, 9 Sep 2021 09:38:38 +0000 (09:38 +0000)]
Prepare for executing regress triggering kernel probes.
root and kern.allowdt=1 are needed for those, otherwise mark them as SKIPPED.