openbsd
3 years agoThe ep-gpios property is optional on the Rockchip PCIe controller.
patrick [Mon, 1 Mar 2021 20:49:20 +0000 (20:49 +0000)]
The ep-gpios property is optional on the Rockchip PCIe controller.
While there, enable the different voltage regulators and set the
PHY's assigned clocks.  This makes PCIe work on the NanoPi R4S.

Tested by kurt@ on Rock Pi N10 and ROCKPro64
ok kurt@ kettenis@

3 years agosync
deraadt [Mon, 1 Mar 2021 19:25:58 +0000 (19:25 +0000)]
sync

3 years agoremove unneccessary Pp;
jmc [Mon, 1 Mar 2021 17:56:16 +0000 (17:56 +0000)]
remove unneccessary Pp;

3 years agodocument log entry W, reminded by naddy@
espie [Mon, 1 Mar 2021 17:52:36 +0000 (17:52 +0000)]
document log entry W, reminded by naddy@

3 years agofix Nd and remove trailing whitespace;
jmc [Mon, 1 Mar 2021 17:51:43 +0000 (17:51 +0000)]
fix Nd and remove trailing whitespace;

3 years agoescape quotes and remove some unneccessary Pp; ok nicm
jmc [Mon, 1 Mar 2021 17:49:08 +0000 (17:49 +0000)]
escape quotes and remove some unneccessary Pp; ok nicm

3 years agoMake sure sa_policy is not NULL in sa_configure_iface(). This can happen
tobhe [Mon, 1 Mar 2021 16:38:07 +0000 (16:38 +0000)]
Make sure sa_policy is not NULL in sa_configure_iface(). This can happen
if the SA is deleted because of a failed policy lookup.

3 years agoLog adding and deleting of IP addresses as well as nameservers.
florian [Mon, 1 Mar 2021 15:56:31 +0000 (15:56 +0000)]
Log adding and deleting of IP addresses as well as nameservers.
deraadt@ pointed out that dhcpleased is too quiet.

3 years agoWe really must handle all possible enumeration values in
florian [Mon, 1 Mar 2021 15:56:00 +0000 (15:56 +0000)]
We really must handle all possible enumeration values in
state_transition() and iface_timeout(). Let the compiler help us by
emitting a warning when we missed one (-Wswitch).
Reminded by jsg who pointed out that gcc is quite confused and thinks
there is an out of bounds access in if_state_name[] in the default
case. There is not, if_state_name[] and enum if_state have to be kept
in sync.
(Note that -Wswitch is not a silver bullet, it just happens to work
here.)

3 years agoLet send_rdns_withdraw and send_deconfigure_interface clean up after
florian [Mon, 1 Mar 2021 15:54:49 +0000 (15:54 +0000)]
Let send_rdns_withdraw and send_deconfigure_interface clean up after
themselves. This way the iface object is in a consistent state.
For consistency we should also withdraw rdns first, then deconfigure
the interface.
Lastly make sure we parse the lease file on a down -> up transition if
we had a lease before and it had expired while the interface was in
down state. Otherwise we'd send a dhcpdiscover requesting any IP
address while we really should send a dhcprequest asking for our
previous IP back.

3 years agoDocument veb(4) support
kn [Mon, 1 Mar 2021 14:27:44 +0000 (14:27 +0000)]
Document veb(4) support

Feedback jmc
OK dlg

3 years agoRefactor ip_fragment() and ip6_fragment(). Use a mbuf list to
bluhm [Mon, 1 Mar 2021 11:05:42 +0000 (11:05 +0000)]
Refactor ip_fragment() and ip6_fragment().  Use a mbuf list to
simplify the handling of the fragment list.  Now the functions
ip_fragment() and ip6_fragment() always consume the mbuf.  They
free the mbuf and mbuf list in case of an error and take care about
the counter.  Adjust the code a bit to make v4 and v6 look similar.
Fixes a potential mbuf leak when pf_route6() called pf_refragment6()
and it failed.  Now the mbuf is always freed by ip6_fragment().
OK dlg@ mvs@

3 years agoPut the hardcoded '\n' character which is found throughout mg into a
lum [Mon, 1 Mar 2021 10:51:14 +0000 (10:51 +0000)]
Put the hardcoded '\n' character which is found throughout mg into a
buffer specific variable. The diff should not produce any behavourial
changes in mg.

3 years agoThere is no need to call del_curterm in the server anymore.
nicm [Mon, 1 Mar 2021 10:50:14 +0000 (10:50 +0000)]
There is no need to call del_curterm in the server anymore.

3 years agoAdd some text with examples of ; as a separator, GitHub issues 2522 and
nicm [Mon, 1 Mar 2021 10:44:38 +0000 (10:44 +0000)]
Add some text with examples of ; as a separator, GitHub issues 2522 and
2580.

3 years agodocument pkg_check-version
espie [Mon, 1 Mar 2021 10:35:49 +0000 (10:35 +0000)]
document pkg_check-version

3 years agoallocate enough space in start_child() argv for all possible flags
jsg [Mon, 1 Mar 2021 09:50:40 +0000 (09:50 +0000)]
allocate enough space in start_child() argv for all possible flags
ok claudio@

3 years agoIf an anon is associated with a page, acquire its lock before any modification.
mpi [Mon, 1 Mar 2021 09:13:33 +0000 (09:13 +0000)]
If an anon is associated with a page, acquire its lock before any modification.

This change should have been part of the previous anon-locking diff and is
necessary to run the top part of uvm_fault() unlocked.

ok jmatthew@

3 years agoMove the top part of uvm_fault_lower(), the lookup, in its own function.
mpi [Mon, 1 Mar 2021 09:09:35 +0000 (09:09 +0000)]
Move the top part of uvm_fault_lower(), the lookup, in its own function.

The name and logic come from NetBSD in order to reduce the difference
between the two code bases.

No functional change intended.

ok tb@

3 years agooff by one in bounds test
jsg [Mon, 1 Mar 2021 08:05:40 +0000 (08:05 +0000)]
off by one in bounds test
ok florian@

3 years agooff by one in bounds test
jsg [Mon, 1 Mar 2021 08:02:34 +0000 (08:02 +0000)]
off by one in bounds test
ok claudio@

3 years agoresolvd and dhcpleased should not be enabled yet
deraadt [Mon, 1 Mar 2021 07:25:07 +0000 (07:25 +0000)]
resolvd and dhcpleased should not be enabled yet

3 years agoupdate currency exchange rates;
jmc [Mon, 1 Mar 2021 06:30:05 +0000 (06:30 +0000)]
update currency exchange rates;

3 years agotypo; from Scott Bennett
deraadt [Mon, 1 Mar 2021 05:15:37 +0000 (05:15 +0000)]
typo; from Scott Bennett

3 years agosync
deraadt [Mon, 1 Mar 2021 02:42:07 +0000 (02:42 +0000)]
sync

3 years agoAdd %k to list of keywords. From Eero Häkkinenvia bz#3267
dtucker [Sun, 28 Feb 2021 22:56:30 +0000 (22:56 +0000)]
Add %k to list of keywords.  From Eero Häkkinenvia bz#3267

3 years agoadd veb(4) to the list of supported bridges/switches you can configure.
dlg [Sun, 28 Feb 2021 22:56:09 +0000 (22:56 +0000)]
add veb(4) to the list of supported bridges/switches you can configure.

tested by josh rickmar
ok kn@

3 years agoHave acpipci(4) look for a matching SMMU in the IORT.
patrick [Sun, 28 Feb 2021 21:42:08 +0000 (21:42 +0000)]
Have acpipci(4) look for a matching SMMU in the IORT.

ok kettenis@

3 years agoEnable acpiiort(4), add smmu(4) but keep disabled.
patrick [Sun, 28 Feb 2021 21:41:07 +0000 (21:41 +0000)]
Enable acpiiort(4), add smmu(4) but keep disabled.

ok kettenis@

3 years agoacpiiort(4) and smmu(4)
patrick [Sun, 28 Feb 2021 21:40:11 +0000 (21:40 +0000)]
acpiiort(4) and smmu(4)

3 years agoAdd smmu(4), a driver the ARM System MMU. This IOMMU is basically a
patrick [Sun, 28 Feb 2021 21:39:31 +0000 (21:39 +0000)]
Add smmu(4), a driver the ARM System MMU.  This IOMMU is basically a
regular ARM CPU MMU re-used for I/O devices.  Implementations can have a
mix of stage-2 only and stage-2/stage-2 context blocks (domains).  The
IOMMU allows different ways of grouping devices into a single domain.

This implementation only supports SMMUv2, since there is basically
no relevant SMMUv1 hardware.  It also only supports AArch64
pagetables, the same as our pmap.  Hence lots of code was taken from
there.  There is no support for 32-bit pagetables, which would have
also been needed for SMMUv1 support.  I have not yet seen any
machines with SMMUv3, which will probably need a new driver.

There is some work to be done, but the code works and it's about
time it hits the tree.

ok kettenis@

3 years agoAdd acpiiort(4), a driver for the ACPI I/O Remapping Table. This table
patrick [Sun, 28 Feb 2021 21:31:10 +0000 (21:31 +0000)]
Add acpiiort(4), a driver for the ACPI I/O Remapping Table.  This table
contains information which IOMMUs we have and how the devices are routed.

ok kettenis@

3 years agoAdd memory attributes for stage-2 pagetables.
patrick [Sun, 28 Feb 2021 21:28:33 +0000 (21:28 +0000)]
Add memory attributes for stage-2 pagetables.

ok kettenis@

3 years agoIssue call to IOMMU OFW API to collect an IOMMU-sprinkled DMA tag.
patrick [Sun, 28 Feb 2021 21:10:22 +0000 (21:10 +0000)]
Issue call to IOMMU OFW API to collect an IOMMU-sprinkled DMA tag.

ok kettenis@

3 years agoImplement IOMMU OFW API for on-SoC/non-PCI devices.
patrick [Sun, 28 Feb 2021 21:09:44 +0000 (21:09 +0000)]
Implement IOMMU OFW API for on-SoC/non-PCI devices.

ok kettenis@

3 years agoIssue call to IOMMU OFW API to collect an IOMMU-sprinkled DMA tag.
patrick [Sun, 28 Feb 2021 21:06:58 +0000 (21:06 +0000)]
Issue call to IOMMU OFW API to collect an IOMMU-sprinkled DMA tag.

ok kettenis@

3 years agoRename addr to gateway.
tobhe [Sun, 28 Feb 2021 19:25:59 +0000 (19:25 +0000)]
Rename addr to gateway.

3 years agoinstall rc.d/resolvd
deraadt [Sun, 28 Feb 2021 18:09:18 +0000 (18:09 +0000)]
install rc.d/resolvd

3 years agoMove tick_msg(TICK_WAIT) calls after related log_debug()
krw [Sun, 28 Feb 2021 17:49:01 +0000 (17:49 +0000)]
Move tick_msg(TICK_WAIT) calls after related log_debug()
calls to avoid losing those debug messages if
tick_msg() notices link-timeout has expired and daemonizes
dhclient.

3 years agoReduce non-debug output further by allowing up to the usual 3 second
krw [Sun, 28 Feb 2021 17:33:45 +0000 (17:33 +0000)]
Reduce non-debug output further by  allowing up to the usual 3 second
grace period of silence before emitting "<if>: no lease...", even if
the link has taken a few secocnds to come up. 'link-timoeut' remains
the hard deadline for going daemon.

3 years agoAdd dobeep functions that take messages to buffer.c and cscope.c
lum [Sun, 28 Feb 2021 15:30:35 +0000 (15:30 +0000)]
Add dobeep functions that take messages to buffer.c and cscope.c
No functional change intended.

3 years agoIntroduce #defines for exponential backoff, explain where they come
florian [Sun, 28 Feb 2021 15:26:26 +0000 (15:26 +0000)]
Introduce #defines for exponential backoff, explain where they come
from and explain why we are a bit more agressive during startup.
While here make the math a bit easier on the eyes.

3 years agodocument the move of FIX_CRLF_FILES to the end of distpatch
espie [Sun, 28 Feb 2021 14:03:09 +0000 (14:03 +0000)]
document the move of FIX_CRLF_FILES to the end of distpatch

3 years agobig numbers need suffixes on some platforms. fix LACP_ADDR_SLOW_E64.
dlg [Sun, 28 Feb 2021 03:59:25 +0000 (03:59 +0000)]
big numbers need suffixes on some platforms. fix LACP_ADDR_SLOW_E64.

deraadt@ says i broke hppa :(

3 years agoDo not try to reset signal handler for signal 0 in subprocess.
dtucker [Sun, 28 Feb 2021 01:50:47 +0000 (01:50 +0000)]
Do not try to reset signal handler for signal 0 in subprocess.
Prevents spurious debug message.  ok djm@

3 years agofix alphabetic ordering of options; spotted by Iain Morgan
djm [Sat, 27 Feb 2021 23:42:37 +0000 (23:42 +0000)]
fix alphabetic ordering of options; spotted by Iain Morgan

3 years agosync
deraadt [Sat, 27 Feb 2021 20:30:19 +0000 (20:30 +0000)]
sync

3 years agoremoval of "must" missed in previous: spotted by george brown, who also
jmc [Sat, 27 Feb 2021 19:32:58 +0000 (19:32 +0000)]
removal of "must" missed in previous: spotted by george brown, who also
submitted the diff for the previous commit and who i forgot to credit...

3 years agoremove some info related to compat;
jmc [Sat, 27 Feb 2021 18:58:59 +0000 (18:58 +0000)]
remove some info related to compat;
tweaked by deraadt

ok kettenis deraadt

3 years agofix NAME;
jmc [Sat, 27 Feb 2021 18:50:38 +0000 (18:50 +0000)]
fix NAME;

3 years agoRestore ability to handle default routes on multiple interfaces, this
florian [Sat, 27 Feb 2021 17:53:23 +0000 (17:53 +0000)]
Restore ability to handle default routes on multiple interfaces, this
got lost shortly before initial import.
While here explicitly delete the default route when deconfiguring an
interface. There might be corner cases where the stack will not tear
it down for us when we remove the IP address.

3 years agoensure local array is same size as global
deraadt [Sat, 27 Feb 2021 17:47:43 +0000 (17:47 +0000)]
ensure local array is same size as global

3 years agoStop checking 'epoch' in get_recorded_lease() and just set it as
krw [Sat, 27 Feb 2021 17:44:58 +0000 (17:44 +0000)]
Stop checking 'epoch' in get_recorded_lease() and just set it as
required in read_lease_db(). It's already set in packet_to_lease() and
thus both paths to TAILQ_INSERT(lease_db) ensure there is a non-zero
epoch in all lease_db entries.

3 years agoapldart(4)
kettenis [Sat, 27 Feb 2021 17:15:55 +0000 (17:15 +0000)]
apldart(4)

3 years agoaplpcie(4)
kettenis [Sat, 27 Feb 2021 17:15:33 +0000 (17:15 +0000)]
aplpcie(4)

3 years agoSet RTF_GATEWAY for host route based on RTM_GET response.
tobhe [Sat, 27 Feb 2021 17:07:04 +0000 (17:07 +0000)]
Set RTF_GATEWAY for host route based on RTM_GET response.

3 years agoapldart(4) is needed here as well.
kettenis [Sat, 27 Feb 2021 16:31:33 +0000 (16:31 +0000)]
apldart(4) is needed here as well.

3 years agoaipldart(4)
kettenis [Sat, 27 Feb 2021 16:26:41 +0000 (16:26 +0000)]
aipldart(4)

3 years agoaplpcie(4)
kettenis [Sat, 27 Feb 2021 16:23:41 +0000 (16:23 +0000)]
aplpcie(4)

3 years agoAdd apldart(4), a driver for the IOMMU on Apple M1 SoCs.
kettenis [Sat, 27 Feb 2021 16:19:14 +0000 (16:19 +0000)]
Add apldart(4), a driver for the IOMMU on Apple M1 SoCs.

ok patrick@

3 years agoWhile I wrote the initial version of resolvd(8) it diverged so much
florian [Sat, 27 Feb 2021 15:20:54 +0000 (15:20 +0000)]
While I wrote the initial version of resolvd(8) it diverged so much
that it's not appropriate to claim that I wrote it.

3 years agoMove handling of cipher/hash based cipher suites into the new record layer.
jsing [Sat, 27 Feb 2021 14:20:50 +0000 (14:20 +0000)]
Move handling of cipher/hash based cipher suites into the new record layer.

ok tb@

3 years agoDisentangle log_debug() output from tick_msg() output.
krw [Sat, 27 Feb 2021 13:59:00 +0000 (13:59 +0000)]
Disentangle log_debug() output from tick_msg() output.

Simplifies -v output, and reduces non-'-v' output.

Reduce non-'-v' output further by only displaying the first 'link up'
event.

Restore behaviour specified in dhclient.conf(5) of going daemon after
link-timeout seconds, rather than waiting another link-timeout seconds
for a lease to be accepted.

Lease verbiage problem reported, and fix tested by Mihai Popescu. Thanks!

Link verbiage problems reported, fix tested & ok tb@.

3 years agoReplace stray direct call of f_event with filter_event().
visa [Sat, 27 Feb 2021 13:43:16 +0000 (13:43 +0000)]
Replace stray direct call of f_event with filter_event().

This does not change the current behaviour, but filterops should be
invoked through filter_*() for consistency.

3 years agoIdentify DTLS based on the version major value.
jsing [Sat, 27 Feb 2021 13:38:35 +0000 (13:38 +0000)]
Identify DTLS based on the version major value.

This avoids the need to match specific DTLS version numbers.

3 years agoAdd dobeep functions that take messages to basic.c.
lum [Sat, 27 Feb 2021 13:24:52 +0000 (13:24 +0000)]
Add dobeep functions that take messages to basic.c.
No functional change intended.

3 years agoRework route_input() and rtm_sendup(). While we perform foreach loop
mvs [Sat, 27 Feb 2021 11:44:48 +0000 (11:44 +0000)]
Rework route_input() and rtm_sendup(). While we perform foreach loop
in route_input() we drop solock() after we checked socket state. We
pass mbuf(9) to this socket at next loops, while it referenced as
`last'. Socket's state could be changed by concurrent thread while
it's not locked.

Since we perform socket's checks and output in same iteration, the
logic which prevents mbuf(9) chain copy for the last socket in list
was removed.

ok bluhm@ claudio@

3 years agoPath #defines are traditionally prefixed with _PATH.
florian [Sat, 27 Feb 2021 10:35:20 +0000 (10:35 +0000)]
Path #defines are traditionally prefixed with _PATH.
Pointed out by deraadt

3 years agoPath #defines are traditionally prefixed with _PATH.
florian [Sat, 27 Feb 2021 10:32:28 +0000 (10:32 +0000)]
Path #defines are traditionally prefixed with _PATH.
Pointed out by deraadt

3 years agoPath #defines are traditionally prefixed with _PATH.
florian [Sat, 27 Feb 2021 10:28:12 +0000 (10:28 +0000)]
Path #defines are traditionally prefixed with _PATH.
pointed out by deraadt

3 years agoPath #defines are traditionally prefixed with _PATH.
florian [Sat, 27 Feb 2021 10:21:08 +0000 (10:21 +0000)]
Path #defines are traditionally prefixed with _PATH.
pointed out by deraadt

3 years agoRead the lease file into a statically sized buffer and pass it over to
florian [Sat, 27 Feb 2021 10:07:41 +0000 (10:07 +0000)]
Read the lease file into a statically sized buffer and pass it over to
the engine process for parsing instead of passing an fd.
Let's us tighten the engine's pledge back down to "stdio".

3 years agoAdd logger(1) support for daemons that are logging to stdout/stderr (mostly from
ajacoutot [Sat, 27 Feb 2021 09:28:04 +0000 (09:28 +0000)]
Add logger(1) support for daemons that are logging to stdout/stderr (mostly from
the go ecosystem).
Properly handle failing daemon startup now that we have pipefail.

To take advantage of this new feature, just add foo_logger=facility to the
daemon rc.d(8) script or in rc.conf.local(8) or use rcctl:
rcctl set foo logger daemon.info

tweak for checking flags in rcctl(8) from martijn@
"this looks pretty good" deraadt@
ok sthen@

3 years agotrim some code i accidentally left into the nvgre add address function
dlg [Sat, 27 Feb 2021 09:21:22 +0000 (09:21 +0000)]
trim some code i accidentally left into the nvgre add address function

3 years agorecover scope from v6 nvgre endpoint addresses for userland to look at.
dlg [Sat, 27 Feb 2021 09:20:38 +0000 (09:20 +0000)]
recover scope from v6 nvgre endpoint addresses for userland to look at.

3 years agoIt is perfectly fine to POLLIN and POLLOUT at the same time. It may
claudio [Sat, 27 Feb 2021 08:59:29 +0000 (08:59 +0000)]
It is perfectly fine to POLLIN and POLLOUT at the same time. It may
actually make things a bit faster.
OK deraadt@

3 years agoHandle NULL term_type.
nicm [Sat, 27 Feb 2021 06:28:16 +0000 (06:28 +0000)]
Handle NULL term_type.

3 years agoregen
jsg [Sat, 27 Feb 2021 03:04:22 +0000 (03:04 +0000)]
regen

3 years agosort and fix RTL8713 id
jsg [Sat, 27 Feb 2021 03:03:40 +0000 (03:03 +0000)]
sort and fix RTL8713 id

3 years agoregen
jsg [Sat, 27 Feb 2021 03:01:25 +0000 (03:01 +0000)]
regen

3 years agosort
jsg [Sat, 27 Feb 2021 03:00:54 +0000 (03:00 +0000)]
sort

3 years agoregen
jsg [Sat, 27 Feb 2021 02:37:06 +0000 (02:37 +0000)]
regen

3 years agoadd ids for Intel Xeon Scalable
jsg [Sat, 27 Feb 2021 02:36:33 +0000 (02:36 +0000)]
add ids for Intel Xeon Scalable

Used by at least Skylake-SP (SKX) and Cascade Lake-SP (CLX).

Covers Xeon Scalable, Xeon D, Xeon W, Core Extreme/Core X product
families.  The Scalable parts are marketed as Xeon Bronze, Silver, Gold
and Platinum.

As most of these ids are not described in public documents from Intel
use Skylake-ESystem.inf and KabyLakePCH-HSystem.inf from Intel's Windows
drivers to get an idea of what the names should be.  With the name for
0x2088 found in a Intel authored Linux driver.

Initial patch and much discussion from Karel Gardas.

3 years agoput the mac addr into a uint64_t to compare it to the ethernet slow addr.
dlg [Sat, 27 Feb 2021 01:19:11 +0000 (01:19 +0000)]
put the mac addr into a uint64_t to compare it to the ethernet slow addr.

also do the ethertype comparison before the conversion above.

3 years agoCheck session, window, pane in the right order when working out format type.
nicm [Fri, 26 Feb 2021 21:53:41 +0000 (21:53 +0000)]
Check session, window, pane in the right order when working out format type.

3 years agoSet RTF_GATEWAY for flow routes, not for host route.
tobhe [Fri, 26 Feb 2021 21:06:02 +0000 (21:06 +0000)]
Set RTF_GATEWAY for flow routes, not for host route.

3 years agoFix and improve handling of address families in vroute_getcloneroute().
tobhe [Fri, 26 Feb 2021 20:22:11 +0000 (20:22 +0000)]
Fix and improve handling of address families in vroute_getcloneroute().

ok patrick@

3 years agoShip resolvd service, enable it by default
kn [Fri, 26 Feb 2021 18:29:16 +0000 (18:29 +0000)]
Ship resolvd service, enable it by default

Starting right after unwind.

OK deraadt

3 years agoIgnore SIGHUP
kn [Fri, 26 Feb 2021 18:28:07 +0000 (18:28 +0000)]
Ignore SIGHUP

It should always run and there is no reload semantic.

OK deraadt

3 years agosync; OK deraadt
florian [Fri, 26 Feb 2021 17:20:07 +0000 (17:20 +0000)]
sync; OK deraadt

3 years agoCreate /var/db/dhcpleased for lease files.
florian [Fri, 26 Feb 2021 17:19:21 +0000 (17:19 +0000)]
Create /var/db/dhcpleased for lease files.
OK deraadt@

3 years agorc(8) bits for dhcpleased(8).
florian [Fri, 26 Feb 2021 17:18:41 +0000 (17:18 +0000)]
rc(8) bits for dhcpleased(8).
OK deraadt

3 years agoHook up dhcpleased to the build.
florian [Fri, 26 Feb 2021 17:17:03 +0000 (17:17 +0000)]
Hook up dhcpleased to the build.
OK deraadt

3 years agoSort SEE ALSO and fix its punctuation.
tb [Fri, 26 Feb 2021 17:14:25 +0000 (17:14 +0000)]
Sort SEE ALSO and fix its punctuation.

3 years agoImport dhcpleased(8) - a dhcp daemon to acquire IPv4 address leases
florian [Fri, 26 Feb 2021 16:16:37 +0000 (16:16 +0000)]
Import dhcpleased(8) - a dhcp daemon to acquire IPv4 address leases
from servers.

dhcpleased(8) follows the well known three process design of all our
privsep daemons. It uses pledge(2) and unveil(2) to restrict access
further. In particular the "engine" process, responsible for parsing
of untrusted data, is pledge'd "stdio". It cannot access the outside
world nor the filesystem at all.

Like slaacd(8) for IPv6 it will be always running and acquire addresses
for all interface with the autoconf4 flag set.
The flag can be set by "ifconfig $if inet autoconf" or by adding
"inet autoconf" to /etc/hostname.if. An existing "dhcp" line should
be removed.

Various iterations tested by deraadt@
The hardest part, finding a name, was handled by jmatthew@ & otto@

"get to it :)" deraadt@

3 years agoSet is_trusted in x509_verify_ctx_add_chain()
tb [Fri, 26 Feb 2021 15:19:41 +0000 (15:19 +0000)]
Set is_trusted in x509_verify_ctx_add_chain()

If we're about to add a chain we have a trust path, so we have at least
one trusted certificate. This fixes a thinko from r1.31 and fixes the
openssl(1) cms verify test.

ok jsing (who had the same diff)

3 years agozap spades of trailing whitespace
tb [Fri, 26 Feb 2021 15:15:40 +0000 (15:15 +0000)]
zap spades of trailing whitespace

3 years agoRead and parse OTP on the BCM4378. There are quite a few firmware and
patrick [Fri, 26 Feb 2021 12:33:59 +0000 (12:33 +0000)]
Read and parse OTP on the BCM4378.  There are quite a few firmware and
nvram files used for the different Apple devices.  The device tree and
the OTP hold the information which of those we will have to use.  For
now this information will simply be printed, but depending on how we
choose to do the firmare distribution we could use it for loadfirmware().

3 years agoAttach to BCM4378.
patrick [Fri, 26 Feb 2021 12:29:36 +0000 (12:29 +0000)]
Attach to BCM4378.

3 years agoAdd support for BCM4378 as implemented on the Apple M1. This chip seems
patrick [Fri, 26 Feb 2021 12:28:45 +0000 (12:28 +0000)]
Add support for BCM4378 as implemented on the Apple M1.  This chip seems
to use a different set of PCIE2REG registers.  Accessing the "old" ones
even leads to faults.  There are two surprises though.  One is that it
seems that the interrupt status register always returns 0, and the other
one is that we receive the interrupts way too early, but both can be
worked around for now.