schwarze [Tue, 16 Dec 2014 17:24:58 +0000 (17:24 +0000)]
Explicit block closure macros clobber next-line block head scope,
just like explicit block macros themselves.
Fixing an assertion failure jsg@ found with afl.
miod [Tue, 16 Dec 2014 05:47:28 +0000 (05:47 +0000)]
Now that we have Camellia support in libcrypto, bring in the SHA256 flavour of
the Camellia ciphersuites for TLS 1.2 introduced in RFC 5932. From OpenSSL HEAD.
schwarze [Tue, 16 Dec 2014 03:52:31 +0000 (03:52 +0000)]
When a string comparison condition contains no mismatching character
but ends without the final delimiter, the parse point was advanced
one character too far and the invalid pointer returned to the
caller of roff_parseln(). Later use could potentially advance
the pointer even further and maybe even write to it.
Fixing a buffer overrun found by jsg@ with afl (the most severe so far).
millert [Tue, 16 Dec 2014 03:35:49 +0000 (03:35 +0000)]
Replace setpgrp(0, getpid()) with setpgid(0, 0). OK deraadt@ tedu@
millert [Tue, 16 Dec 2014 03:32:21 +0000 (03:32 +0000)]
Remove some useless casts and includes. OK deraadt@ tedu@
tedu [Tue, 16 Dec 2014 03:21:10 +0000 (03:21 +0000)]
include lock.h, needed for later headers but currently included by magic
ok millert
jsg [Tue, 16 Dec 2014 03:19:23 +0000 (03:19 +0000)]
Don't display formatted time if localtime() fails.
Avoids a crash in strftime() found with the afl fuzzer.
ok guenther@
schwarze [Tue, 16 Dec 2014 01:21:37 +0000 (01:21 +0000)]
When a numerical condition errors out after consuming at least one
character of input, treat it as false, do not retry it as a string
comparison condition. This also fixes a read buffer overrun that
happened when the numerical condition advanced to the end of the
input line before erroring out, found by jsg@ with afl.
schwarze [Tue, 16 Dec 2014 00:06:49 +0000 (00:06 +0000)]
use .In and delete .Tn; from Kaspars at Bankovskis dot net
schwarze [Mon, 15 Dec 2014 23:42:31 +0000 (23:42 +0000)]
Empty conditions count as false.
When negated, they still count as false.
Found when investigating crashes jsg@ found with afl.
Not completely fixing the crashes yet.
schwarze [Mon, 15 Dec 2014 22:35:41 +0000 (22:35 +0000)]
merge improvements from NetBSD; ok jmc@ nicm@
tedu [Mon, 15 Dec 2014 20:38:22 +0000 (20:38 +0000)]
don't drop the kernel lock everytime. on a busy system, this results in
the reaper spending more than half its time in uvm_pause. we want the
system to be interactive, but we want throughput too. this seems like a
decent balance.
tedu [Mon, 15 Dec 2014 20:31:40 +0000 (20:31 +0000)]
.Xr cut which may be what you're really looking for.
brad [Mon, 15 Dec 2014 20:15:48 +0000 (20:15 +0000)]
Consistency with the pci_intr_map bits.
ok sf@
schwarze [Mon, 15 Dec 2014 19:41:24 +0000 (19:41 +0000)]
correct some character names to match groff;
reported by Carsten dot Kunze at arcor dot de
schwarze [Mon, 15 Dec 2014 18:04:32 +0000 (18:04 +0000)]
Let "man n open" do the same as "man -s n open" again, that is,
show the open(n) Tcl manual, as documented in man(1). Issue reported
by Svyatoslav Mishyn <juef at openmailbox dot org> (Crux Linux).
schwarze [Mon, 15 Dec 2014 17:36:47 +0000 (17:36 +0000)]
Merge from bsd.lv: text about HTML written by kristaps@.
schwarze [Mon, 15 Dec 2014 17:29:58 +0000 (17:29 +0000)]
Catch localtime() failure for additional safety;
patch from Jan Stary <hans at stare dot cz> some time ago.
mpi [Mon, 15 Dec 2014 17:10:44 +0000 (17:10 +0000)]
Stop using usb_{alloc,free}mem() for the rings and internal structures.
Since xhci(4) does not allocate memory for its rings in interrupt
context, it has no use for the free lists offered by the USB memory
allocator.
Using bus_dmamem_alloc(9) and friends also allows us to respect the
boundary requirement for the various structures specified in Table 54.
While here make use of defines for every alignment and boundary
requirements which are different than a page size.
kettenis [Mon, 15 Dec 2014 13:43:17 +0000 (13:43 +0000)]
The PCI device ID 0x4c6e is a secondary device ID for the Radeon Mobility
9000/M9 that appears on the FireMV 2400 card. It certainly isn't an RV280
chip and we don't want to attach to it, so remove it. Same change has been
made upstream (based on a report by yours truly).
nicm [Mon, 15 Dec 2014 10:04:18 +0000 (10:04 +0000)]
Notify on zoom/unzoom, from George Nachmann.
nicm [Mon, 15 Dec 2014 10:02:55 +0000 (10:02 +0000)]
Only redraw affected lines when selection changes with mouse. From
Michael Graczyk.
jmc [Mon, 15 Dec 2014 07:01:12 +0000 (07:01 +0000)]
remove -r from usage();
miod [Mon, 15 Dec 2014 06:03:15 +0000 (06:03 +0000)]
Move 40MB of .rodata and 40MB of stack to .bss; allows this test to run on
platforms with small MAXTSIZ or MAXSSIZ.
guenther [Mon, 15 Dec 2014 05:05:24 +0000 (05:05 +0000)]
fully parenthesize the PMAP_DIRECT_* macros
ok tedu@
tedu [Mon, 15 Dec 2014 04:54:44 +0000 (04:54 +0000)]
move needed macros to pmap.c and delete stale ones. ok guenther
guenther [Mon, 15 Dec 2014 02:24:22 +0000 (02:24 +0000)]
Use MAP_INHERIT_* for the 'inh' argument to the UMV_MAPFLAG() macro,
eliminating the must-be-kept-in-sync UVM_INH_* macros
ok deraadt@ tedu@
tedu [Mon, 15 Dec 2014 02:11:57 +0000 (02:11 +0000)]
convert bcopy to memcpy. ok dlg krw
tedu [Mon, 15 Dec 2014 01:53:45 +0000 (01:53 +0000)]
change bcopy to memcpy. ok deraadt
guenther [Mon, 15 Dec 2014 01:48:54 +0000 (01:48 +0000)]
Eliminate the -r option and always do sysctl OID, username, groupname,
and ctime presentation, but combined with the numeric form ala 0<"root">.
Do username and groupname presentation on syscall arguments and retvals.
ok millert@ otto@
doug [Mon, 15 Dec 2014 00:46:53 +0000 (00:46 +0000)]
Add error handling for EVP_DigestInit_ex().
A few EVP_DigestInit_ex() calls were left alone since reporting an
error would change the public API.
Changed internal ssl3_cbc_digest_record() to return a value due to the above
change. It will also now set md_out_size=0 on failure.
This is based on part of BoringSSL's commit to fix malloc crashes:
https://boringssl.googlesource.com/boringssl/+/
69a01608f33ab6fe2c3485d94aef1fe9eacf5364
ok miod@
bcook [Sun, 14 Dec 2014 21:49:29 +0000 (21:49 +0000)]
unconditionally align SSL payloads
Remove support for conditional payload alignment, since we would never
want to turn it off. Also, consistently use size_t for calculating the
alignment.
ok miod@
bluhm [Sun, 14 Dec 2014 20:30:51 +0000 (20:30 +0000)]
By now relayd expects tls in its config file and writes tls into
its log file. Change regression tests form ssl to tls.
miod [Sun, 14 Dec 2014 19:55:12 +0000 (19:55 +0000)]
Revert r1.10: properly built shared libraries will never have any DISP26
relocations, but will always call public symbols through the library's PLT.
schwarze [Sun, 14 Dec 2014 17:55:36 +0000 (17:55 +0000)]
Switch man(1) to the mandoc implementation.
OK krw@ naddy@ sthen@ "commit it now" deraadt@
I won't remove the files in src/usr.bin/man, such that we can quickly
switch back in case a problem is found.
schwarze [Sun, 14 Dec 2014 17:48:48 +0000 (17:48 +0000)]
minimally document -IOKTW; requested by naddy@
bcallah [Sun, 14 Dec 2014 16:55:59 +0000 (16:55 +0000)]
Remove unused <stdlib.h>
ok lteo@ krw@ deraadt@
jsing [Sun, 14 Dec 2014 16:19:38 +0000 (16:19 +0000)]
Convert all of the straight forward client handshake handling code to use
the new handshake functions.
ok miod@
jsing [Sun, 14 Dec 2014 16:07:26 +0000 (16:07 +0000)]
Provide functions for starting, finishing and writing SSL handshake
messages. This will allow for removal of repeated/duplicated code.
Additionally, DTLS was written by wholesale copying of the SSL/TLS code,
with some DTLS specifics being added to the duplicated code. Since these
SSL handshake message functions know how to handle both SSL/TLS and DTLS,
upon conversion the duplicate versions will become identical (or close to),
at which point the DTLS versions can be removed and the SSL/TLS versions
used for both protocols.
Partially based on similar changes in OpenSSL.
ok miod@
jsing [Sun, 14 Dec 2014 15:30:50 +0000 (15:30 +0000)]
Remove trailing whitespace.
gilles [Sun, 14 Dec 2014 15:26:56 +0000 (15:26 +0000)]
these are no longer used, remove
jsing [Sun, 14 Dec 2014 14:48:00 +0000 (14:48 +0000)]
unifdef OPENSSL_NO_NEXTPROTONEG
jsing [Sun, 14 Dec 2014 14:45:33 +0000 (14:45 +0000)]
Remove redundant NULL checks before free - BN_free(), BIO_free_all() and
EC_GROUP_free() all have implicit NULL checks.
jsing [Sun, 14 Dec 2014 14:42:06 +0000 (14:42 +0000)]
unifdef OPENSSL_NO_NEXTPROTONEG
jsing [Sun, 14 Dec 2014 14:34:43 +0000 (14:34 +0000)]
unifdef OPENSSL_NO_NEXTPROTONEG, which is one of the last standing #ifndef
mazes in libssl. NPN is being replaced by ALPN, however it is still going
to be around for a while yet.
ok miod@
jsing [Sun, 14 Dec 2014 13:45:47 +0000 (13:45 +0000)]
unifdef NETSCAPE_HANG_BUG from the DTLS code. The code is not currently
enabled and I would hope that no one is using client certificates with DTLS
and Netscape, assuming it even supported it...
ok bcook@ miod@
tobias [Sun, 14 Dec 2014 09:12:59 +0000 (09:12 +0000)]
Handle ed command "s" as a one line command, which it is.
Prevents arbitrary ed command executions in following lines.
ok millert
schwarze [Sun, 14 Dec 2014 07:42:50 +0000 (07:42 +0000)]
macro cleanup; from Kaspars at Bankovskis dot net
guenther [Sun, 14 Dec 2014 05:04:49 +0000 (05:04 +0000)]
Disable MWAIT again, this time on both i386 and amd64. Too many systems
run excessively hot with it to have it on by default, and I still don't
have good logic to let acpicpu enable it when the AML says it's good.
guenther [Sat, 13 Dec 2014 23:29:14 +0000 (23:29 +0000)]
An UVM_ADV_NORMAL -> MADV_NORMAL was missed here
doug [Sat, 13 Dec 2014 21:05:32 +0000 (21:05 +0000)]
yet more mallocarray() changes.
ok tedu@ deraadt@
guenther [Sat, 13 Dec 2014 21:02:32 +0000 (21:02 +0000)]
Sort members by size to reduce structure padding
guenther [Sat, 13 Dec 2014 21:00:19 +0000 (21:00 +0000)]
Add .Xr to chflagsat(2)
guenther [Sat, 13 Dec 2014 20:59:24 +0000 (20:59 +0000)]
Correct the handling of symbolic links by chmod/chgrp/chown/chflags,
making them more resistant to TOCTOU race conditions too.
ok tobias@
tedu [Sat, 13 Dec 2014 20:42:41 +0000 (20:42 +0000)]
claim posix 2008 compat. apparently people look at this and get scared
when it's really old. but no actual ports fallout in espie's build.
ok deraadt
miod [Sat, 13 Dec 2014 16:26:13 +0000 (16:26 +0000)]
Provide our own copy of {round,trunc}_page() now that uvm's is unreachable from
non-_KERNEL code.
miod [Sat, 13 Dec 2014 15:45:53 +0000 (15:45 +0000)]
A first shot at MOP boot instructions.
schwarze [Sat, 13 Dec 2014 15:30:52 +0000 (15:30 +0000)]
just released mandoc 1.13.2
miod [Sat, 13 Dec 2014 14:45:57 +0000 (14:45 +0000)]
Install netboot.mop
miod [Sat, 13 Dec 2014 14:45:34 +0000 (14:45 +0000)]
Create a MOP version of the network boot loader; verified to boot on DEC 3000.
miod [Sat, 13 Dec 2014 14:44:59 +0000 (14:44 +0000)]
Give the mop suite the ability to process alpha Elf64 files and create mop
alpha images of them.
millert [Sat, 13 Dec 2014 13:36:03 +0000 (13:36 +0000)]
Add DKIM signing example based on eric@'s asiabsdcon slides
OK gilles@ jmc@
schwarze [Sat, 13 Dec 2014 13:13:26 +0000 (13:13 +0000)]
Fix a regression found by Carsten dot Kunze at arcor dot de:
Do not show bogus quotes when .Bl -column phrases are quoted.
tobias [Sat, 13 Dec 2014 10:31:07 +0000 (10:31 +0000)]
The function savestr allows NULL return values during Plan A patching so in
case of out of memory conditions, Plan B can step in. In many cases, NULL
value is not properly handled, so use xstrdup here (it's outside Plan A/B
patching, which means that even Plan B relies on successful operations).
schwarze [Sat, 13 Dec 2014 10:27:50 +0000 (10:27 +0000)]
macro cleanup; from Kaspars Bankovskis, tweaked a bit
tobias [Sat, 13 Dec 2014 10:26:48 +0000 (10:26 +0000)]
Properly validate ranges:
- avoid out of boundary access on very short program names
- fix compiler warning when converting values between 0 and INT_MAX
ok deraadt, millert
deraadt [Sat, 13 Dec 2014 05:29:50 +0000 (05:29 +0000)]
ThinkPad Edge E130, event 0x6060 is supposed to indicate toggle
between default Fn and media Fn modes. We don't do that, so
ignore the toggle.
From Frederic Nowak
jsg [Sat, 13 Dec 2014 00:49:20 +0000 (00:49 +0000)]
add a sxidog_activate() function so the kernel will link again
after the changes made in rev 1.5
tedu [Fri, 12 Dec 2014 22:58:48 +0000 (22:58 +0000)]
free correct size. it's variable!
schwarze [Fri, 12 Dec 2014 20:06:13 +0000 (20:06 +0000)]
catch up with swab.c rev. 1.9:
update SYNOPSIS and DESCRIPTION and add STANDARDS
tedu [Fri, 12 Dec 2014 19:02:07 +0000 (19:02 +0000)]
sizeof(*ptr) for some free()
tedu [Fri, 12 Dec 2014 18:15:51 +0000 (18:15 +0000)]
convert some hash tables (the easy ones) to siphash. ok benno.
schwarze [Fri, 12 Dec 2014 17:04:22 +0000 (17:04 +0000)]
markup fixes from Kaspars at Bankovskis dot net;
some of this is already contained upstream in NetBSD,
the rest will be sent there
tedu [Fri, 12 Dec 2014 16:51:32 +0000 (16:51 +0000)]
oops, i was not supposed to disable mwait. found by stsp
reyk [Fri, 12 Dec 2014 14:45:59 +0000 (14:45 +0000)]
Like previously done in relayd, change the keyword "ssl" to "tls" to
reflect reality.
OK benno@
schwarze [Fri, 12 Dec 2014 14:23:17 +0000 (14:23 +0000)]
markup fixes, and repair some wrong argument types while here;
from Kaspars at Bankovskis dot net
jsing [Fri, 12 Dec 2014 12:23:35 +0000 (12:23 +0000)]
Increase cipher suite test coverage by including all cipher suites that
use RSA authentication, rather than only those that use RSA key exchange.
reyk [Fri, 12 Dec 2014 10:05:09 +0000 (10:05 +0000)]
Change the keyword "ssl" to "tls" to reflect reality since we
effectively disabled support for the SSL protocols. SSL remains a
common term describing SSL/TLS, there is some controvery about this
change, and the name really doesn't matter, but I feel confident about
it now.
(btw., sthen@ pointed out some historical context:
http://tim.dierks.org/2014/05/security-standards-and-name-changes-in.html)
OK benno@, with input from tedu@
tedu [Fri, 12 Dec 2014 08:42:48 +0000 (08:42 +0000)]
put global_ptrace here too so users know how to spell it. poke by jmc
tedu [Fri, 12 Dec 2014 07:46:24 +0000 (07:46 +0000)]
sysctl kern.global_ptrace.
controls whether you can ptrace any process with appropriate privileges
or only one own's children.
ok deraadt
tedu [Fri, 12 Dec 2014 07:45:46 +0000 (07:45 +0000)]
sysctl kern.global_ptrace.
controls whether you can ptrace any process with appropriate privileges
or only one own's children.
ok deraadt
jsg [Fri, 12 Dec 2014 05:00:55 +0000 (05:00 +0000)]
Range check the value of the base for typeset -i base x=y. Instead of
erroring for values outside of the range switch to base 10 to match the
behaviour of ksh93. As we have a smaller digit alphabet than ksh93 the
accepted range is smaller (2-36) than ksh93 (2-64). The other form
of setting a base, typeset -i x=base#y already has a range check that
errors (as ksh93 also does for that syntax).
Fixes a crash found with the afl fuzzer.
jsg [Fri, 12 Dec 2014 03:32:55 +0000 (03:32 +0000)]
Bounds check the file path used in the 'w' command. Modified version
of a diff from Sebastien Marie to prevent a crash found by Sebastien
with the afl fuzzer.
jsg [Fri, 12 Dec 2014 03:22:35 +0000 (03:22 +0000)]
Rework the pointer swap in the 'P' command to make the intent
clearer and avoid a crash on 'g;P' found by Sebastien Marie with
the afl fuzzer.
uebayasi [Fri, 12 Dec 2014 03:04:11 +0000 (03:04 +0000)]
sysctl_proc_vmmap(): Allow retrieving "self" VM mapping without privilege.
Previous version OK'ed by tedu@ deraadt@
deraadt [Fri, 12 Dec 2014 01:40:04 +0000 (01:40 +0000)]
Xr getdtablecount
djm [Fri, 12 Dec 2014 00:02:17 +0000 (00:02 +0000)]
revert chunk I didn't mean to commit yet; via jmc@
tedu [Thu, 11 Dec 2014 23:05:38 +0000 (23:05 +0000)]
update swab() to match the current posix definition. "rationale: none."
rewrite the function to be simpler as well. the compiler can unroll the
loop for us if necessary.
ok schwarze
deraadt [Thu, 11 Dec 2014 21:16:35 +0000 (21:16 +0000)]
sync
tedu [Thu, 11 Dec 2014 20:41:08 +0000 (20:41 +0000)]
we do not need the complexity of an assembly swab function here.
ok deraadt
tedu [Thu, 11 Dec 2014 20:39:06 +0000 (20:39 +0000)]
use a local swapbytes function instead of relying on undefined
overlapping swab behavior. vaguely ok kettenis
deraadt [Thu, 11 Dec 2014 20:33:09 +0000 (20:33 +0000)]
The utwitch(4) driver was never added here. Obviously it belongs in the
"Human Interface Devices" section.
miod [Thu, 11 Dec 2014 20:24:48 +0000 (20:24 +0000)]
Do not blindly dereference hw_vendor and hw_prod without checking them for
NULL first, for they are not guaranteed to be allocated.
Found the hard way by Tobias Stoeckmann; ok deraadt@
schwarze [Thu, 11 Dec 2014 20:24:05 +0000 (20:24 +0000)]
Fix previous:
As pointed out by stsp@, LC_CTYPE *does* affect the ctype.h functions.
Use a wording similar to a suggestion by deraadt@.
Feedback and OK jmc@, OK stsp@.
schwarze [Thu, 11 Dec 2014 19:50:04 +0000 (19:50 +0000)]
slightly reshuffle some code to reduce the diff with portable;
no functional change
tedu [Thu, 11 Dec 2014 19:48:38 +0000 (19:48 +0000)]
regen
tedu [Thu, 11 Dec 2014 19:48:02 +0000 (19:48 +0000)]
remove urio
tedu [Thu, 11 Dec 2014 19:46:15 +0000 (19:46 +0000)]
remove urio
tedu [Thu, 11 Dec 2014 19:45:28 +0000 (19:45 +0000)]
urio has been removed
tedu [Thu, 11 Dec 2014 19:44:16 +0000 (19:44 +0000)]
dragonflybsd has added a urio driver. conservation of urios requires
that we delete ours, which isn't actually useful.
ok mpi sthen