drahn [Fri, 30 Apr 2021 16:13:00 +0000 (16:13 +0000)]
Fix linkage error due to fp* functions.
ok kettenis@
bluhm [Fri, 30 Apr 2021 13:52:48 +0000 (13:52 +0000)]
Rearrange the implementation of bounded sysctl. The primitive
functions are sysctl_int() and sysctl_rdint(). This brings us back
the 4.4BSD implementation. Then sysctl_int_bounded() builds the
magic for range checks on top. sysctl_bounded_arr() is a wrapper
around it to support multiple variables.
Introduce macros that describe the meaning of the magic boundary
values. Use these macros in obvious places.
input and OK gnezdo@ mvs@
jmc [Fri, 30 Apr 2021 13:52:12 +0000 (13:52 +0000)]
add arch to Dt lines;
visa [Fri, 30 Apr 2021 13:25:24 +0000 (13:25 +0000)]
Add zqclock(4), a driver for Zynq-7000 clocks.
Input and OK kettenis@
visa [Fri, 30 Apr 2021 13:20:14 +0000 (13:20 +0000)]
Add zqreset(4), a driver for Zynq-7000 resets.
Input and OK kettenis@
jsg [Fri, 30 Apr 2021 13:13:31 +0000 (13:13 +0000)]
remove now unused elf.h
jsg [Fri, 30 Apr 2021 12:57:29 +0000 (12:57 +0000)]
remove FreeBSD derived riscv cpu ident
print the mvendorid marchid mimpid values from sbi instead of
using hardcoded values
continue printing riscv,isa and copy it to cpu_model so it
will show up in sysctl
ok kettenis@
jsg [Fri, 30 Apr 2021 08:54:15 +0000 (08:54 +0000)]
reduce diff to current arm64
ok mlarkin@
jsg [Fri, 30 Apr 2021 06:29:19 +0000 (06:29 +0000)]
fix newlines for devices attaching to cpu
djm [Fri, 30 Apr 2021 04:29:53 +0000 (04:29 +0000)]
a little debugging in the main mux process for status confirmation
failures in multiplexed sessions
dtucker [Fri, 30 Apr 2021 04:02:52 +0000 (04:02 +0000)]
Remove now-unused skey function prototypes leftover from skey removal.
jsg [Fri, 30 Apr 2021 03:17:08 +0000 (03:17 +0000)]
remove commented arm console init lines
deraadt [Fri, 30 Apr 2021 02:06:22 +0000 (02:06 +0000)]
When terminating via pledge_fail() stop all threads, before issuing a
(delayed action) sigabort() and disabling all syscalls for this process
(ie. all threads). This resulted in multiple-threads crashing over top
of themselves, and a poor debugging experience. We keep using sigabort()
rather than sigexit(), to keep the debugging process good.
Diagnosed from a report from brynet, and followup discussion with many.
drahn [Fri, 30 Apr 2021 00:25:52 +0000 (00:25 +0000)]
Fix line swap resulting in misplaced ',' causing build error.
dv [Thu, 29 Apr 2021 23:27:10 +0000 (23:27 +0000)]
Linting: remove duplicate struct definition (plus whitespace)
"sure" mlarkin@
stsp [Thu, 29 Apr 2021 21:43:46 +0000 (21:43 +0000)]
Make iwn, iwm, and iwx keep track of beacon parameters at run-time.
- HT protection settings (this was already implemented)
- ERP (11g) protection setting
- short slottime setting
- short preamble setting
- EDCA (QoS) parameters
All of these parameters are communicated in beacons and hardware is
now kept up-to-date with them.
Prompted by a problem report from Christian Ehrhardt regarding ERP.
Tested:
iwn 6205: stsp, Josh Grosse
iwm 7265: trondd
iwm 8265: stsp, Matthias Schmidt
iwm 9260: phessler
iwx ax200: stsp, jmc, gnezdo
mvs [Thu, 29 Apr 2021 20:13:25 +0000 (20:13 +0000)]
Remove netlock assertions from UNIX sockets layer.
ok bluhm@
drahn [Thu, 29 Apr 2021 20:00:18 +0000 (20:00 +0000)]
riscv64 libkvm support
copied from aarch64 with minimal changes
drahn [Thu, 29 Apr 2021 19:21:31 +0000 (19:21 +0000)]
riscv64 share/mk
Add riscv64 to the list of PIE/static PIE and clang architectures.
drahn [Thu, 29 Apr 2021 18:48:30 +0000 (18:48 +0000)]
*** empty log message ***
drahn [Thu, 29 Apr 2021 18:39:53 +0000 (18:39 +0000)]
riscv64 libc
asm defines, copied from aarch64.
drahn [Thu, 29 Apr 2021 18:37:19 +0000 (18:37 +0000)]
riscv64 libc
Makefile.inc was missed in previous commit
ok kettenis@
drahn [Thu, 29 Apr 2021 18:33:36 +0000 (18:33 +0000)]
riscv64 libc, more pieces.
largely derived from aarch64 code.
usertc.c taken from hppa
with cleanup to Symbols.list and tfork_thread.S
Further cleanup and enhancement will be performed in-tree.
ok kettenis@
dv [Thu, 29 Apr 2021 18:23:07 +0000 (18:23 +0000)]
Use relative reference URIs in Location header on directory redirects.
This adds support for front-ending httpd(8) with a TLS-terminating
gateway like relayd(8) that forwards unencrypted http traffic.
Previously httpd(8) would use a full URL in the Location header in 301
redirects when a user-agent requests a directory but without the
trailing '/'. If the user-agent originally connected with https, this
caused the redirected url to be http.
This change conforms to RFC7231 section 7.1.2.
Reported by Vincent Lee.
OK claudio@
kettenis [Thu, 29 Apr 2021 17:19:18 +0000 (17:19 +0000)]
Clean up <machine/ieeefp.h> and make sure the rounding mode bits match the
hardware. Implement fp[gs]etround(3) and fp[gs]etsticky(3) and tweak
the fp[gs]etmask(3) implementation to provide the right weak symbols.
This implementation deliberately ignores the additional
"round to nearest, away from zero" as this interface is derived from
i386-specific code and the i387 FPU doesn't implement such a rounding
mode. This is a legacy API and code should use <fenv.h> instead.
ok drahn@
bluhm [Thu, 29 Apr 2021 15:34:22 +0000 (15:34 +0000)]
Revert part of the previous uvm_km_zalloc(9) to km_alloc(9) commit.
The chunk with mapping for pm_pdir_intel causes crashes for sthen@
and bluhm@. i386 pagedaemon panic: kernel diagnostic assertion
"pg->wire_count == 0" failed: file "/usr/src/sys/uvm/uvm_page.c",
line 1265
One of my 8 CPU 3 GB RAM machines can reproduce it when building
clang with make -j 9. This commit hides the underlying bug.
OK mpi@
kettenis [Thu, 29 Apr 2021 15:12:14 +0000 (15:12 +0000)]
Replace uvm_km_alloc(9) calls with km_alloc(9) calls. Make the copied ROM
contents executable using pmap_kenter_pa(9) since uvm stops us from doing
so using higher-level interfaces (for good reasons).
Maintaining W^X of course!
ok mpi@
bluhm [Thu, 29 Apr 2021 13:39:22 +0000 (13:39 +0000)]
Extend the fork and exit test with threads. Simultaneously kill
30 processes with 30 threads each.
visa [Thu, 29 Apr 2021 12:49:19 +0000 (12:49 +0000)]
Remove unused RM7000 ICR handling.
jsg [Thu, 29 Apr 2021 11:32:20 +0000 (11:32 +0000)]
descend into arch/riscv64
jsg [Thu, 29 Apr 2021 11:29:05 +0000 (11:29 +0000)]
add riscv64 efibind.h
ok drahn@ kettenis@
jsg [Thu, 29 Apr 2021 05:53:51 +0000 (05:53 +0000)]
regen
jsg [Thu, 29 Apr 2021 05:51:57 +0000 (05:51 +0000)]
add RISCV
drahn [Thu, 29 Apr 2021 05:32:01 +0000 (05:32 +0000)]
riscv64 clang support.
With several fixes from review integrated.
ok patrick@
millert [Thu, 29 Apr 2021 01:57:00 +0000 (01:57 +0000)]
Remove extraneous for() likely caused by copy & paste.
From trondd, OK pjanzen@
deraadt [Thu, 29 Apr 2021 00:47:53 +0000 (00:47 +0000)]
Use a universally understood example time (with AM, which is even easier
to understand)
from Edgar Pettijohn
deraadt [Thu, 29 Apr 2021 00:04:06 +0000 (00:04 +0000)]
sync
drahn [Wed, 28 Apr 2021 22:56:22 +0000 (22:56 +0000)]
Build libcompiler_rt for riscv64
ok kettenis@
drahn [Wed, 28 Apr 2021 22:45:33 +0000 (22:45 +0000)]
Enable libunwind on riscv64
getWCookie() is an OpenBSD addition that is needed on new architectures.
ok kettenis@
bluhm [Wed, 28 Apr 2021 21:21:44 +0000 (21:21 +0000)]
Use mq_delist() to fetch the ARP mbuf hold queue once and feed the
mbuf list to if_output().
OK sashan@ mvs@
deraadt [Wed, 28 Apr 2021 20:05:47 +0000 (20:05 +0000)]
sync
deraadt [Wed, 28 Apr 2021 19:33:38 +0000 (19:33 +0000)]
sync
ratchov [Wed, 28 Apr 2021 19:12:53 +0000 (19:12 +0000)]
Add sndio.pc file for pkg-config, mostly from brad@
ok and help from espie@
drahn [Wed, 28 Apr 2021 19:01:00 +0000 (19:01 +0000)]
riscv64 efiboot bootloader
Ported from arm64 with changes for riscv64.
Initial effort by Mickael Torres, with additional updates
ACPI api removed per request
ok kettenis@
bluhm [Wed, 28 Apr 2021 17:59:53 +0000 (17:59 +0000)]
To hunt kernel bugs during exit, terminate processes simultaneously.
Fork 300 children that sleep. Kill them together as process group.
Sleeping can optionally be done with individual memory layout by
executing sleep(1).
tb [Wed, 28 Apr 2021 17:53:34 +0000 (17:53 +0000)]
Revert "Handle X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE in new
verifier." (r1.27). While this may have "fixed" one corner case, it
broke expectations of Perl Net::SSLeay and Ruby OpenSSL regression
tests.
ok bcook
tb [Wed, 28 Apr 2021 17:44:35 +0000 (17:44 +0000)]
Use "new" vmctl syntax in the example.
kettenis [Wed, 28 Apr 2021 15:38:59 +0000 (15:38 +0000)]
Implement __flt_rounds() for RISC-V. RISC-V is "interesting" since it
implements a variation on the traditional "to nearest" rounding mode that
rounds away from zero when tied. The upcoming C2x includes support for that
and LLVM already implements this so provide an implementation that matches
our system compiler.
ok drahn@
drahn [Wed, 28 Apr 2021 15:28:54 +0000 (15:28 +0000)]
riscv64 libc setjmp functions,
Based on arm64 versions
this implementation is missing jmpxor security enhancement.
Good enough deraadt@
drahn [Wed, 28 Apr 2021 15:16:26 +0000 (15:16 +0000)]
riscv64 ld.so
derived from arm64
go ahead deraadt@
jsg [Wed, 28 Apr 2021 15:15:37 +0000 (15:15 +0000)]
build eeprom on riscv64
jsg [Wed, 28 Apr 2021 15:11:27 +0000 (15:11 +0000)]
descend into riscv64 dirs
ok deraadt@
jsg [Wed, 28 Apr 2021 14:45:08 +0000 (14:45 +0000)]
add a Makefile for riscv64 man8
jsg [Wed, 28 Apr 2021 14:29:50 +0000 (14:29 +0000)]
recognise riscv64 as a valid arch in mandoc
ok jmc@ deraadt@
jsg [Wed, 28 Apr 2021 14:25:15 +0000 (14:25 +0000)]
create riscv64 man dirs
ok deraadt@
patrick [Wed, 28 Apr 2021 13:07:32 +0000 (13:07 +0000)]
sync
patrick [Wed, 28 Apr 2021 13:06:20 +0000 (13:06 +0000)]
Update build infrastructure for libc++ and libc++abi version 11.1.0.
patrick [Wed, 28 Apr 2021 13:04:36 +0000 (13:04 +0000)]
Merge libc++, libc++abi and libunwind version 11.1.0.
patrick [Wed, 28 Apr 2021 12:59:51 +0000 (12:59 +0000)]
Import libc++ 11.1.0 release.
patrick [Wed, 28 Apr 2021 12:59:30 +0000 (12:59 +0000)]
Import libc++abi 11.1.0 release.
patrick [Wed, 28 Apr 2021 12:59:01 +0000 (12:59 +0000)]
Import libunwind 11.1.0 release.
patrick [Wed, 28 Apr 2021 12:56:24 +0000 (12:56 +0000)]
sync
patrick [Wed, 28 Apr 2021 12:55:37 +0000 (12:55 +0000)]
Update clang build infrastructure for LLVM 11.1.0.
Heavy lifting by mortimer@, thank you so much!
patrick [Wed, 28 Apr 2021 12:49:07 +0000 (12:49 +0000)]
Merge LLVM 11.1.0.
patrick [Wed, 28 Apr 2021 12:29:46 +0000 (12:29 +0000)]
Import LLVM 11.1.0 release including clang, lld and lldb.
patrick [Wed, 28 Apr 2021 12:29:31 +0000 (12:29 +0000)]
Import LLVM 11.1.0 release including clang, lld and lldb.
patrick [Wed, 28 Apr 2021 12:28:50 +0000 (12:28 +0000)]
Import LLVM 11.1.0 release including clang, lld and lldb.
patrick [Wed, 28 Apr 2021 12:27:20 +0000 (12:27 +0000)]
Import LLVM 11.1.0 release including clang, lld and lldb.
bluhm [Wed, 28 Apr 2021 11:32:59 +0000 (11:32 +0000)]
Enable dt(4) on amd64, arm64, i386, and powerpc64 in GENERIC kernel.
Support to skip frames is missing on arm64 and i386, but the stack
traces are useful anyway. sparc64 should work, but I could not
test it. Other architectures do not have stacktrace_save_at() and
dynamic tracer does not link.
from patrick@; OK semarie@
bluhm [Wed, 28 Apr 2021 10:33:34 +0000 (10:33 +0000)]
Document the locking mechanism of the global variables in ARP code.
The global list of ARP llinfo is protected by net lock. This is
not sufficent when we switch to shared netlock. Add a mutex for
insertion and removal when net lock is not exclusive. This is
needed if we want run IP output on multiple CPU.
Put an assertion for shared net lock into arp_rtrequest.
input mvs@; OK sashan@
claudio [Wed, 28 Apr 2021 09:53:53 +0000 (09:53 +0000)]
Introduce a global vnode_mtx and use it to make vn_lock() safe to be called
without the KERNEL_LOCK.
This moves VXLOCK and VXWANT to a mutex protected v_lflag field and also
v_lockcount is protected by this mutex.
The vn_lock() dance is overly complex and all of this should probably replaced
by a proper lock on the vnode but such a diff is a lot more complex. This
is an intermediate step so that at least some calls can be modified to grab
the KERNEL_LOCK later or not at all.
OK mpi@
sashan [Wed, 28 Apr 2021 09:42:04 +0000 (09:42 +0000)]
time to add NET_ASSERT_WLOCKED()
with moving towards NET_RLOCK...() we need NET_ASSERT_WLOCKED()
to check caller owns netlock exclusively.
OK @bluhm
kettenis [Wed, 28 Apr 2021 08:25:07 +0000 (08:25 +0000)]
Add signbitl.c that was missed as part of an earlier commit.
ok drahn@
kettenis [Wed, 28 Apr 2021 08:22:56 +0000 (08:22 +0000)]
RISC-V does not implement trapping of floating point exceptions, so use
the same dummy fpgetmask(3) and fpsetmask(3) implementation as arm64.
ok drahn@
ratchov [Wed, 28 Apr 2021 05:10:29 +0000 (05:10 +0000)]
sndiod: Attach client at the same position, regardless the device mode
This is necessary to make rec-only devices properly work in
full-duplex. Fixes full-duplex clients stuck on rec-only device.
ratchov [Wed, 28 Apr 2021 05:05:05 +0000 (05:05 +0000)]
sndiod: Allocate (free) conversion buffers in slot_attach (slot_detach)
Besides being better coding style, this allows a client to be detached
and then attached to a device with different parameters.
drahn [Wed, 28 Apr 2021 04:41:14 +0000 (04:41 +0000)]
Add RISC-V elf executable detection.
looks good jsg@
drahn [Wed, 28 Apr 2021 04:38:01 +0000 (04:38 +0000)]
riscv64 gdtoa support
direct copy from aarch64
constants were rechecked using the qnan.c program.
drahn [Wed, 28 Apr 2021 04:26:40 +0000 (04:26 +0000)]
riscv64 libc string support,
adopted from aarch64, no native ffs() for now, use C version.
after corrections from kettenis@
jsg [Wed, 28 Apr 2021 03:55:48 +0000 (03:55 +0000)]
remove old drm devices
drahn [Wed, 28 Apr 2021 03:32:36 +0000 (03:32 +0000)]
Sync
drahn [Wed, 28 Apr 2021 03:26:25 +0000 (03:26 +0000)]
riscv64 etc support
copied from arm64
MAKEDEV.md contents are kinda partially there, needs more work.
drahn [Wed, 28 Apr 2021 00:11:11 +0000 (00:11 +0000)]
Riscv64 csu support
Includes fixes pointed out by kettenis, jsg, naddy
drahn [Tue, 27 Apr 2021 23:57:38 +0000 (23:57 +0000)]
Riscv64 distrib pieces to buld ramdisk
Copied from arm64 with minimal changes.
ok deraadt@
claudio [Tue, 27 Apr 2021 15:34:18 +0000 (15:34 +0000)]
Add IMSG_CTL_SHOW_RTR to the list of restriced control messages.
claudio [Tue, 27 Apr 2021 11:34:58 +0000 (11:34 +0000)]
Add RFC 6286 to the list of RFC bgpd supports.
OK job@
inoguchi [Tue, 27 Apr 2021 10:13:04 +0000 (10:13 +0000)]
Add DTLS test in appstest.sh
sashan [Tue, 27 Apr 2021 09:38:29 +0000 (09:38 +0000)]
pf_state_key_link_reverse() is prone to race on parallel forwarding
we need to adjust assertions. at time we call pf_state_key_link_reverse()
is state_key either linked to correct reverse peer or not linked at all.
The pf_state_key_link_reverse() is being called as a reader ons tate_lock.
There might be more packets, which try to update the state key.
OK bluhm@
claudio [Tue, 27 Apr 2021 09:12:23 +0000 (09:12 +0000)]
Check for possible bgpid collision on open. RFC 6286 defines that this
check needs to be done for iBGP sessions but not for eBGP sessions.
On conflict log an error and send a notification with ERR_OPEN_BGPID
suberror.
Reported by cjt (melissa_cjt at 163.com)
OK benno@
claudio [Tue, 27 Apr 2021 09:07:10 +0000 (09:07 +0000)]
Fix notification sub-error code for syntactically incorrect nexthops.
The right suberror is ERR_UPD_NEXTHOP.
Reported by cjt (melissa_cjt at 163.com)
OK benno@
tb [Tue, 27 Apr 2021 05:14:25 +0000 (05:14 +0000)]
test-verify-unusual-wildcard-cert is no longer expected to fail with
lib/libcrypto/x509/x509_constraints.c r1.16
drahn [Tue, 27 Apr 2021 04:36:00 +0000 (04:36 +0000)]
riscv64 libc floating point, a portion of the files are ready.
ok kettenis.
beck [Tue, 27 Apr 2021 03:35:29 +0000 (03:35 +0000)]
Relax SAN DNSname validation and constraints to permit non leading *
wildcards. While we may choose not to support them the standards
appear to permit them optionally so we can't declare a certificate
containing them invalid. Noticed by jeremy@, and Steffan Ulrich
and others. Modify the regression tests to test these cases and
not check the SAN DNSnames as "hostnames" anymore (which don't support
wildcards).
ok jsing@, tb@
drahn [Tue, 27 Apr 2021 00:31:34 +0000 (00:31 +0000)]
riscv64 additions for libm
ok kettenis@
dv [Mon, 26 Apr 2021 22:58:27 +0000 (22:58 +0000)]
vmd(8): fix vmctl client "wait" state corruption
Adds queue-based tracking of waiting client state to fix the cause of
state corruption when a vmctl(8) user cancels a wait and restarts it.
The socket fd value for the control process client was being used to
track the waiting party, but this also prevented multiple waiting
clients.
This moves all the state tracking of who to notify of a vm's stopping
to the control process and no longer requires the parent process to
track it in the global environment state.
Future work will be needed to smooth out the difference between the
IMSG_VMDOP_TERMINATE_VM_{EVENT,RESPONSE} events instead of needing to
translate before relaying to the vmctl(8) client.
Tested by Mischa Peters (thanks!)
ok mlarkin@
mvs [Mon, 26 Apr 2021 20:32:30 +0000 (20:32 +0000)]
Add missing timeout_set_proc() description.
ok jmc@
claudio [Mon, 26 Apr 2021 18:23:20 +0000 (18:23 +0000)]
Print out both the sent "Neighbor capabilities" and the "Negotiated
capabilities" for a session. Especially the multiprotocol capability
can confuse because both sides need to allow a protocol to enable it.
The JSON code dumps all the capabilities for local, remote and negotiated.
OK denis@, sthen@
bluhm [Mon, 26 Apr 2021 08:45:01 +0000 (08:45 +0000)]
Unset ftp_proxy to make test independent from environment.
claudio [Mon, 26 Apr 2021 08:21:35 +0000 (08:21 +0000)]
Revert per-socket `so_lock' rwlock(9) and use it to protect routing
(PF_ROUTE) sockets. There is a locking issue with timeouts that needs
to be fixed.
Requested by deraadt@
bluhm [Mon, 26 Apr 2021 07:55:16 +0000 (07:55 +0000)]
Convert the ARP packet hold queue from mbuf list to mbuf queue which
contins a mutex. Update la_hold_total with atomic operations.
OK sashan@