visa [Tue, 5 Dec 2017 15:26:47 +0000 (15:26 +0000)]
Drop cn30xxpow_intr_establish(), cn30xxpow_intr() and some other
unused code. POW interrupts are now handled in if_cnmac.c.
jca [Tue, 5 Dec 2017 15:02:06 +0000 (15:02 +0000)]
Seperate real and user timer interfaces
Use more descriptive names, and make it clearer that real and user
timers work on different static storage. The end goal is to be able to
reuse those timer functions, instead of inlining other timer
implementations subject to clock jumps.
Discussed with Scott Cheloha
krw [Tue, 5 Dec 2017 14:57:14 +0000 (14:57 +0000)]
When removing duplicate dynamic leases from the cache, compare the
SSID against ifi->ssid, not the SSID of the new lease. They
should be the same, but this makes the intent clearer and removes
an assumption about the contents of ifi->active.
espie [Tue, 5 Dec 2017 14:35:12 +0000 (14:35 +0000)]
strip_comments is also called for dot lines, so sometimes the comment
is all the line.
problem reported by Sergey Bronnikov
otto [Tue, 5 Dec 2017 14:05:22 +0000 (14:05 +0000)]
use a global BN_CTX; from kshe with a twist from myself
kettenis [Tue, 5 Dec 2017 13:45:31 +0000 (13:45 +0000)]
Implement __cxa_thread_atexit to support C++11 thread_local scope. The
interface is also made available as __cxa_thread_atexit_impl to satisfy the
needs of GNU libstdc++.
ok guenther@, millert@
patrick [Tue, 5 Dec 2017 09:06:53 +0000 (09:06 +0000)]
When sending out a proposal we create an SA/SPI for the Child SAs if we
are an initiator and store the information on the proposal, because we
only had one proposal so far. This changes the code to only create one
SA on the first proposal and then apply the SPI to all other proposals
as well.
ok markus@
deraadt [Tue, 5 Dec 2017 06:05:39 +0000 (06:05 +0000)]
adjust for warning: warning repairs
djm [Tue, 5 Dec 2017 01:30:19 +0000 (01:30 +0000)]
include the addr:port in bind/listen failure messages
kettenis [Mon, 4 Dec 2017 22:06:21 +0000 (22:06 +0000)]
Sadly the firmware on SPARC T7 machines omits the executable bit on mappings
that contain code, just like some sun4u machines. So add it for sun4v as
well when entering the mappings into the kernel pmap.
mpi [Mon, 4 Dec 2017 21:12:41 +0000 (21:12 +0000)]
Use _kernel_lock_held() instead of __mp_lock_held(&kernel_lock).
Missed in previous, found by deraadt@, ok visa@
patrick [Mon, 4 Dec 2017 17:22:39 +0000 (17:22 +0000)]
Remove duplicate check that never could execute because the exact same
condition is handled a line before.
patrick [Mon, 4 Dec 2017 17:03:43 +0000 (17:03 +0000)]
Consistently log "malformed payload" instead of "payload malformed", and
replace "minimal" with "minimum".
patrick [Mon, 4 Dec 2017 16:57:40 +0000 (16:57 +0000)]
Remove check that is now a duplicate due to recent refactoring.
patrick [Mon, 4 Dec 2017 16:52:16 +0000 (16:52 +0000)]
The payloads are layered like onions, so you can validate one layer and
then call the next one, which can then validate itself. Thing is, most
layers try to run validations on the upper layer, which is not useful
and rather confusing. This cleans it up.
First change is that the generic payload parser does not anymore pass
the length of the whole datagram, including all remaining payloads, but
passes only the length of the specific payload to the specific payload
parser. Second change is that the payload validators don't check the
length of the upper layer, but only verify their own lengths.
Diff discussed with hshoexer@ and sthen@
Tested by sthen@
bluhm [Mon, 4 Dec 2017 15:13:12 +0000 (15:13 +0000)]
RFC 4861 requires that all neighbor discovery packets have 255 in
their IPv6 header hop limit field. Let pf drop neighbor solicitation,
neighbor advertisement, router solicitation, router advertisement,
and redirect ICMP6 packets that do not comply. This enforces that
bogus packets cannot be routed when pf is enabled.
OK mpi@ sashan@ benno@
tb [Mon, 4 Dec 2017 15:00:03 +0000 (15:00 +0000)]
change "if (lp &&" to "if lp != NULL &&".
pointed out by krw
robert [Mon, 4 Dec 2017 14:56:47 +0000 (14:56 +0000)]
add the alps touchpad that can be found in the ideapad 710s
ok mpi@
tb [Mon, 4 Dec 2017 14:56:07 +0000 (14:56 +0000)]
Avoid a NULL-deref in get_recorded_lease() leading to a segfault seen
by aja and others.
ok krw
patrick [Mon, 4 Dec 2017 14:35:03 +0000 (14:35 +0000)]
Initialize variable, otherwise the pointer might contain stack garbage.
bluhm [Mon, 4 Dec 2017 13:40:34 +0000 (13:40 +0000)]
Make divert lookup similar for all socket types. If PF_TAG_DIVERTED
is set, pf_find_divert() cannot fail so put an assert there.
Explicitly check all possible divert types, panic in the default
case. For raw sockets call pf_find_divert() before of the socket
loop. Divert reply should not match on TCP or UDP listen sockets.
OK sashan@ visa@
mpi [Mon, 4 Dec 2017 09:51:03 +0000 (09:51 +0000)]
Change __mp_lock_held() to work with an arbitrary CPU info structure and
extend ddb(4) "ps /o" output to print which CPU is currently holding the
KERNEL_LOCK().
Tested by dhill@, ok visa@
mpi [Mon, 4 Dec 2017 09:38:20 +0000 (09:38 +0000)]
Use _kernel_lock_held() instead of __mp_lock_held(&kernel_lock).
ok visa@
patrick [Sun, 3 Dec 2017 21:02:44 +0000 (21:02 +0000)]
If we wanted to send out more proposals than just one, we need to set a
flag in the SA header that there is another proposal coming. The "more"
attribute borrows its values, as specified in the RFC, from IKEv1.
ok sthen@
patrick [Sun, 3 Dec 2017 21:02:06 +0000 (21:02 +0000)]
The RFC specifies that to accept a proposal, we must select a transform
for each transform type. We do some sanity checks, for instance we do
require an encryption transform for ESP, but that's not enough. We need
to check that for every proposed transform type we have found a matching
transform in our own proposal.
ok sthen@
krw [Sun, 3 Dec 2017 20:53:28 +0000 (20:53 +0000)]
Move timer fields 'expiry" and "rebind" out of struct client_lease
and into struct interface_info. Nuke set_lease_times().
sthen [Sun, 3 Dec 2017 20:40:04 +0000 (20:40 +0000)]
Disallow the _pbuild user from making TCP/UDP connections in the default
PF ruleset. This is not a complete block on _pbuild being able to communicate
(e.g. non-TCP/UDP protocols don't have a PCB with userid, so PF can't restrict
in those cases) but avoids some cases, and in particular makes it more obvious
when a port does things like download extra distfiles or dependencies
as part of the build process. Slight tweak from a diff by espie@.
kettenis [Sun, 3 Dec 2017 19:44:04 +0000 (19:44 +0000)]
Enable bgw(4).
kettenis [Sun, 3 Dec 2017 19:42:20 +0000 (19:42 +0000)]
Enumerate all i2c devices on the bus. Mark their nodes as attached even
if we didn't attach a device driver to avoid enumerating them again in
the acpi device tree walk.
ok deraadt@
tb [Sun, 3 Dec 2017 19:32:19 +0000 (19:32 +0000)]
pledge(2) elfrdsetroot:
- pledge(2) "stdio" after managing arguments (opening files)
- add $OpenBSD$ markers on elfrd_size.c and elfrdsetroot.h
- add a check for NULL on malloc(3) call in elfrd_size.c
from semarie, ok deraadt
krw [Sun, 3 Dec 2017 16:09:14 +0000 (16:09 +0000)]
Abandon nagging about "_" violating RFC 952. This removes the need
for a custom res_hnok(), so just use the libc version of res_hnok().
Requested by deraadt@
mpi [Sun, 3 Dec 2017 10:55:50 +0000 (10:55 +0000)]
Rename ci_number to ci_cpuid to match other archs.
ok visa@, kettenis@, deraadt@
jsg [Sun, 3 Dec 2017 10:34:30 +0000 (10:34 +0000)]
Include dtbs for Wandboard rev D1 including the i.MX 6QuadPlus variant.
Requires U-Boot >= 2017.11 and dtb >= 4.15-rc1.
jsg [Sun, 3 Dec 2017 03:16:45 +0000 (03:16 +0000)]
sync
deraadt [Sat, 2 Dec 2017 18:40:43 +0000 (18:40 +0000)]
sync
otto [Sat, 2 Dec 2017 12:43:54 +0000 (12:43 +0000)]
Adapt to change in 0Z
otto [Sat, 2 Dec 2017 12:43:18 +0000 (12:43 +0000)]
make 0Z do what the original dc and gnu bcc do; ok tom@
ajacoutot [Sat, 2 Dec 2017 09:31:52 +0000 (09:31 +0000)]
post-patch -> pre-configure
otto [Sat, 2 Dec 2017 07:35:46 +0000 (07:35 +0000)]
Add a caveat wrt use of non-decimal fractional notation; from kshe; ok jmc@
espie [Sat, 2 Dec 2017 00:52:47 +0000 (00:52 +0000)]
switching to _pbuild is tricky, you can't take it back.
in particular, disable future PORTS_PRIVSEP mechanisms under
pkg_create, because we should already be running as _pbuild
by this point.
guenther [Fri, 1 Dec 2017 23:30:05 +0000 (23:30 +0000)]
Redo the calculation of the alignment and placement of static TLS data to
correctly take into account the segment p_align. Previously, anything
with a size belong the natural alignment or with alignment larger than
the natural one would either not be intialized correctly, be misaligned,
or result in the TIB being misaligned.
Problems reported by Charles Collicutt (charles (at) collicutt.co.uk)
ok kettenis@
patrick [Fri, 1 Dec 2017 20:19:05 +0000 (20:19 +0000)]
The RFC specifies that in an SA payload the proposals must be numbered
starting with number 1. Subsequent proposals must be one more than the
previous proposal.
ok sthen@
patrick [Fri, 1 Dec 2017 19:49:31 +0000 (19:49 +0000)]
Turns out that, as specified in the RFC, the initial Child SA does not
do PFS and is assumed to be secured using the DH exchange in the first
handshake. Thus there is no KE/N payload in the IKE_AUTH exchange and
we must not include a DH group other than None, which essentially means
we must not supply any DH transforms in the IKE_AUTH messages. So now
we skip adding the DH transforms for initiating and responding to
IKE_AUTH messages.
ok sthen@
otto [Fri, 1 Dec 2017 19:04:15 +0000 (19:04 +0000)]
fix buglet in split_number() and optimize count_digits();
from kshe with a twist from myself; ok tb@
tb [Fri, 1 Dec 2017 18:19:30 +0000 (18:19 +0000)]
arm64 is now also a _syspatch_arch
stsp [Fri, 1 Dec 2017 18:13:48 +0000 (18:13 +0000)]
In the macppc installer, switch the default answer for the partition
table question from "HFS" to "MBR". Most people will want to run
OpenBSD exclusively on such machines these days.
ok kettenis@
kettenis [Fri, 1 Dec 2017 16:06:25 +0000 (16:06 +0000)]
Add quotes around the name of (unconfigured) devices like we do for other
iic(4) controllers.
ok jcs@
visa [Fri, 1 Dec 2017 14:42:23 +0000 (14:42 +0000)]
Avoid using an uninitialized variable.
Found by gcc.
OK jca@
bluhm [Fri, 1 Dec 2017 12:40:58 +0000 (12:40 +0000)]
Fix white spaces and shorten long line.
schwarze [Fri, 1 Dec 2017 11:18:40 +0000 (11:18 +0000)]
Consistently .Xr the corresponding wide char functions from char- and
string-handling <stdio.h> functions, like we already do it for <string.h>.
Includes a smaller patch from <kshe59 at zoho dot eu>, OK jmc@.
schwarze [Fri, 1 Dec 2017 10:56:07 +0000 (10:56 +0000)]
add missing argument name; from <kshe59 at zoho dot eu>; OK jmc@;
while here, consistently use .Fo to cure execessive line lengths
bluhm [Fri, 1 Dec 2017 10:33:33 +0000 (10:33 +0000)]
Simplify the reverse PCB lookup logic. The PF_TAG_TRANSLATE_LOCALHOST
security check prevents that the user accidentally configures
redirect where a divert-to would be appropriate. Instead of spreading
the logic into tcp and udp input, check the flag during PCB listen
lookup. This also reduces parameters of in_pcblookup_listen().
OK visa@
jmc [Fri, 1 Dec 2017 09:40:33 +0000 (09:40 +0000)]
update currency exchange rates;
jmc [Fri, 1 Dec 2017 09:10:38 +0000 (09:10 +0000)]
remove deprectaed linkX notation;
from lucas gabriel vuotto
otto [Fri, 1 Dec 2017 08:40:47 +0000 (08:40 +0000)]
and enable new test
otto [Fri, 1 Dec 2017 08:40:04 +0000 (08:40 +0000)]
extra tests for Z (upcoming implementation change)
visa [Thu, 30 Nov 2017 16:31:12 +0000 (16:31 +0000)]
Fix the IPL and flags of the MP-safe crypto taskq. Now a sane IPL
is passed to the mutex implementation, and the queue actually runs
without the kernel lock.
Tested by dhill@
OK mikeb@, dhill@, kettenis@
jmc [Thu, 30 Nov 2017 16:14:30 +0000 (16:14 +0000)]
add bgw;
visa [Thu, 30 Nov 2017 15:31:16 +0000 (15:31 +0000)]
Replace `coremask' with `numcores'.
visa [Thu, 30 Nov 2017 15:25:37 +0000 (15:25 +0000)]
Prefer `numcores' to `coremask'. The former is probably easier
to use than the latter.
nayden [Thu, 30 Nov 2017 15:24:50 +0000 (15:24 +0000)]
Fix typos in comments.
OK florian@
kettenis [Thu, 30 Nov 2017 15:06:35 +0000 (15:06 +0000)]
Add bgw(4) man page.
visa [Thu, 30 Nov 2017 15:03:03 +0000 (15:03 +0000)]
Fix variable expansion.
From Rafael Neves
kettenis [Thu, 30 Nov 2017 14:53:21 +0000 (14:53 +0000)]
Add bgw(4), a driver for a family of Bosch acceleration sensors.
ok deraadt@, mlarkin@
patrick [Thu, 30 Nov 2017 12:18:44 +0000 (12:18 +0000)]
Add support for rejecting IKE SA messages. This means that we can reply
to IKE SA INIT messages with no proposal chosen, as we already do for
Child SAs. For that the error "adding" is done in a new function shared
by both send error handlers. We need two "send error" functions because
the init error is unencrypted, while all later ones are not. Now we can
add more cases, like Child SA not found or that the DH group is not what
we expect.
Save the IKE SA INIT responses, even if it's an error message, so we can
retransmit it if the response is lost on the way back to the initiator
and he tries again. This also helps mitigate DoS attacks as specified
in the RFC. Only if it is indeed a new attempt, like after an INVALID
KE PAYLOAD response, we can drop the old SA so that iked(8) can attempt
to create a new SA.
ok sthen@
helg [Thu, 30 Nov 2017 11:29:03 +0000 (11:29 +0000)]
vn_open(9) does not pass the open(2) flags to VOP_CREATE(9) so we can't
support FBT_CREATE. Fall back to FBT_MKNOD + FBT_OPEN so that a valid
sequence of FUSE messages is sent to the file system when creating files.
input from mpi@, otto@
bentley [Thu, 30 Nov 2017 11:10:07 +0000 (11:10 +0000)]
Default unknowns to application/octet-stream instead of x-not-regular-file.
This makes more sense and matches what the latest "other" file(1) now does.
ok nicm@
jmc [Thu, 30 Nov 2017 07:41:01 +0000 (07:41 +0000)]
use the same macro consistently for the various carp balancing modes;
jmc [Thu, 30 Nov 2017 07:37:13 +0000 (07:37 +0000)]
no more arp mode for carp; from martin rettberg
ccardenas [Thu, 30 Nov 2017 01:28:27 +0000 (01:28 +0000)]
When performing vmctl reload and a previously configured vm is running,
exit with an EALREADY vs EPERM.
ok mlarkin@
guenther [Thu, 30 Nov 2017 00:36:10 +0000 (00:36 +0000)]
__MAP_NOFAULT doesn't make sense with anon mappings, so return EINVAL if
that is attempted.
Minor cleanups:
- Eliminate some always false and always true tests against MAP_ANON
- We treat anon mappings with neither MAP_{SHARED,PRIVATE} as MAP_PRIVATE
so explicitly indicate that
ok kettenis@ beck@
guenther [Thu, 30 Nov 2017 00:21:42 +0000 (00:21 +0000)]
Per https://patchwork./patch/
5838821/, the documented check of ACPI
mwait info against CPUID is wrong; loosen the test per Intel's suggestion.
While here, fix the wrapping of dmesg lines when reporting bogus C-state
info.
ok mlarkin@ kettenis@ (who pointed out the email from Intel)
beck [Thu, 30 Nov 2017 00:01:50 +0000 (00:01 +0000)]
Add regress to ensure that execve bypasses pledgepath checks (for now)
guenther [Wed, 29 Nov 2017 23:47:18 +0000 (23:47 +0000)]
Mixing -url with any of -host, -port, or -path should be a usage error
instead of trying to work and then triggering a double-free().
problem noted by trondd (trondd (at) kagu-tsuchi.com)
ok beck@
kettenis [Wed, 29 Nov 2017 22:51:01 +0000 (22:51 +0000)]
Add support for GPIO-signaled events.
ok mlarkin@
mlarkin [Wed, 29 Nov 2017 22:08:40 +0000 (22:08 +0000)]
vmd(8): fix broken IRR bit setting for the slave PIC. Noticed by claudio
when he tried to make a vm with 4 network interfaces.
ok claudio
jmc [Wed, 29 Nov 2017 21:17:51 +0000 (21:17 +0000)]
fix double dot;
jmc [Wed, 29 Nov 2017 21:15:45 +0000 (21:15 +0000)]
add -i to SYNOPSIS/usage() and sundry tweaks;
ok beck
schwarze [Wed, 29 Nov 2017 20:04:36 +0000 (20:04 +0000)]
Recognize .Bl -column at parse time, and not only at validation time,
even if other arguments precede -column. This is required because
the .It parser needs to know whether or not we are a -column list.
Fixes tree corruption leading to an assertion failure.
Bug reported by bentley@.
claudio [Wed, 29 Nov 2017 19:40:47 +0000 (19:40 +0000)]
Insert MPLS VPN routes with the RTF_GATEWAY flag cleared. mpe(4) is now
expecting this and will use the route gateway and the mpls label to forward
packets. This plus the other diffs to if_mpe.c and route.c should fix
L3 MPLS VPNs. Problem reported by henning@
claudio [Wed, 29 Nov 2017 19:36:03 +0000 (19:36 +0000)]
Make mpe(4) work again by:
- Change the way mpe figures out the IP of the MPLS nexthop. Instead of using
RTF_GATEWAY and so a valid (and cachable) gateway route just use the
gateway IP address of the route (rt->rt_gateway).
- Make sure the interface is up when adding a mplslabel. The inserted route
is in rtable 0 and so invisible for the link state tracker. Forcing the if_up
ensures that the added route is RTF_UP.
OK mpi@
claudio [Wed, 29 Nov 2017 19:15:48 +0000 (19:15 +0000)]
Revert 1.353, this breaks mpe(4). Also it seems not complete since rt_ifa_del
still had this hack in. This needs to be revisted and better understood.
It may be needed to add a mplsrdomain to mpe(4) but MPLS only in the rtable 0
is hardcoded in more places and we should fix them all.
OK mpi@
otto [Wed, 29 Nov 2017 19:13:31 +0000 (19:13 +0000)]
fold bsqrt_stop into bsqrt; from kshe; ok tom@
otto [Wed, 29 Nov 2017 19:12:48 +0000 (19:12 +0000)]
simplify print_ascii; from kshe; ok tom@
beck [Wed, 29 Nov 2017 16:55:08 +0000 (16:55 +0000)]
Don't do OCSP stapling only if the staple file is 0 length.
This allows something external (like ocspcheck) to disable the stapling
deliberatly if it can not retreive a valid staple by truncating the
staple file to indicate "do not provide a staple", while the file not
existin will still be treated as a configuration error
ok claudio@ florian@, and prompted by @jsing
guenther [Wed, 29 Nov 2017 15:53:44 +0000 (15:53 +0000)]
fcntl(F_GETOWN) doesn't have an argument, so don't display it. While
here, make it easier to extend the set of such fcntl() commands
ok deraadt@
benno [Wed, 29 Nov 2017 15:24:50 +0000 (15:24 +0000)]
add options to specify the control socket in relayd and relayctl.
From Kapetanakis Giannis, thanks.
ok claudio@
kettenis [Wed, 29 Nov 2017 15:22:22 +0000 (15:22 +0000)]
Revise OperatingRegion code to make it extensible and have chvgpio(4)
provide the OEM defined regions that are used by the AML on some
Cherryview-based machines.
ok mlarkin@
visa [Wed, 29 Nov 2017 15:12:52 +0000 (15:12 +0000)]
Show line number correctly in synthetic mutex names.
OK jca@
otto [Wed, 29 Nov 2017 15:06:31 +0000 (15:06 +0000)]
zap untrue comment (since bcode.c 1.43)
otto [Wed, 29 Nov 2017 14:34:17 +0000 (14:34 +0000)]
Pledge can be done earlier; from kshe
otto [Wed, 29 Nov 2017 14:31:50 +0000 (14:31 +0000)]
fix decl of main
bluhm [Wed, 29 Nov 2017 13:37:08 +0000 (13:37 +0000)]
Test invalid divert combinations and adapt error messages.
anton [Wed, 29 Nov 2017 07:28:21 +0000 (07:28 +0000)]
missing Sx; ok jmc@
deraadt [Wed, 29 Nov 2017 05:58:22 +0000 (05:58 +0000)]
sync
dtucker [Wed, 29 Nov 2017 05:49:54 +0000 (05:49 +0000)]
Import updated moduli.
guenther [Wed, 29 Nov 2017 05:13:57 +0000 (05:13 +0000)]
clang doesn't propagate attributes like "asm labels" and "visibility(hidden)"
to builtins like mem{set,cpy,move} and __stack_smash_handler. So, when
building with clang, instead mark those as protected visibility to get rid
of the PLT relocations. We can't take the address of them then, but that's
ok: it's a build-time error not a run-time error.
ok kettenis@
dlg [Wed, 29 Nov 2017 05:09:59 +0000 (05:09 +0000)]
turns out you dont have to configure a vsi as the default in a veb.
what a waste of two days.
dlg [Wed, 29 Nov 2017 05:00:40 +0000 (05:00 +0000)]
regen
dlg [Wed, 29 Nov 2017 05:00:16 +0000 (05:00 +0000)]
add some mellanox parts