krw [Mon, 5 May 2014 14:44:18 +0000 (14:44 +0000)]
A couple of malloc()+memset(0) -> calloc.
mpi [Mon, 5 May 2014 13:48:11 +0000 (13:48 +0000)]
Plug a memory leak related to HID descriptor parsing.
ok jsg@
krw [Mon, 5 May 2014 13:32:15 +0000 (13:32 +0000)]
Tweak comment on struct _partitionv0. It's no longer the partition
table.
Suggested by David Vasek.
andre [Mon, 5 May 2014 12:31:56 +0000 (12:31 +0000)]
Replacing test files from previous commit to the right directory. There is no
trigger to run tests from relayd directory, so previous had no practical
effect.
mpi [Mon, 5 May 2014 11:44:33 +0000 (11:44 +0000)]
Use a custom ifa_rtrequest function for point-to-point interfaces
instead of relying on hacks in nd6_rtrequest() to add a route to
loopback for each address configured on such interfaces.
While here document that abusing lo0 for local traffic is not safe
for interfaces in a non-default rdomain.
Tested by claudio@, jca@ and sthen@, ok sthen@
andre [Mon, 5 May 2014 11:02:29 +0000 (11:02 +0000)]
Add two more regression tests to relayd, these cover "digest" and "file"
keywords.
ok reyk
henning [Mon, 5 May 2014 10:00:45 +0000 (10:00 +0000)]
remove dead code: calling ether_attach which sets if_type to IFT_ETHER,
just to set it to IFT_L2VLAN right afterwards, just to set if_type
to the parent's if_type which can be anything as long as it is IFT_ETHER
at config time doesn't make any sense and has zero effect. stop fiddling
with if_type alltogether.
also remove a question in a comment that has been answered by the last 14
years.
from Marrakesh airport, ok reyk
blambert [Mon, 5 May 2014 08:23:57 +0000 (08:23 +0000)]
change surprisingly consistent mispelling of length ("lenght")
no change in md5 of resulting object file
ok markus@, reyk@
logan [Mon, 5 May 2014 07:02:30 +0000 (07:02 +0000)]
Zap extra whitespace.
OK from djm@ and dtucker@
yasuoka [Mon, 5 May 2014 04:58:23 +0000 (04:58 +0000)]
Delete duplicated "mppe" entry in keywords[].
miod [Mon, 5 May 2014 04:44:54 +0000 (04:44 +0000)]
Enable assembler code for DES. Assembler code for BN is commented out as it
uses the `umul' and `udiv' instructions directly, which are not supported
on v7 processors.
bluhm [Mon, 5 May 2014 00:09:16 +0000 (00:09 +0000)]
Redirecting stderr to /dev/null suppresses all errors. Instead use
the new status=none feature to make dd quiet.
OK krw@ deraadt@
jim [Sun, 4 May 2014 22:26:32 +0000 (22:26 +0000)]
Improve line wrapping for lines exceeding 80 chars.
ok jmc@
jim [Sun, 4 May 2014 22:23:15 +0000 (22:23 +0000)]
Add missing SEE ALSO section header.
yup jmc@
jim [Sun, 4 May 2014 21:46:35 +0000 (21:46 +0000)]
Remove trailing whitespace.
fine jmc@
jim [Sun, 4 May 2014 21:20:10 +0000 (21:20 +0000)]
Remove a leading whitespace.
ok jmc@
jim [Sun, 4 May 2014 21:15:12 +0000 (21:15 +0000)]
Add missing SEE ALSO section header.
ok jmc@
jim [Sun, 4 May 2014 21:13:41 +0000 (21:13 +0000)]
Improve line wrapping for lines exceeding 80 chars.
ok jmc@
jim [Sun, 4 May 2014 21:08:16 +0000 (21:08 +0000)]
Remove trailing whitespace.
ok jmc@
krw [Sun, 4 May 2014 21:07:50 +0000 (21:07 +0000)]
Factor out the code to set the expiry, renewal and rebinding times for
a lease. Will be reused in upcoming diff. No intentional behaviour
change.
deraadt [Sun, 4 May 2014 20:40:08 +0000 (20:40 +0000)]
delete useless test code
jim [Sun, 4 May 2014 20:31:33 +0000 (20:31 +0000)]
Remove trailing whitespace.
no objection jmc@
sf [Sun, 4 May 2014 20:09:15 +0000 (20:09 +0000)]
format string fixes for bus_addr_t and bus_size_t
bus_addr_t and bus_size_t are u_long everywhere
ok kettenis@
sf [Sun, 4 May 2014 19:27:08 +0000 (19:27 +0000)]
remove some hh and h format specifiers
gcc does not like hh in kprintf and it does not make any difference due
to integer promotion rules. While there, remove some h's, too.
suggested by kettenis@
tedu [Sun, 4 May 2014 19:06:40 +0000 (19:06 +0000)]
i give up. reuse problem is unfixable. dlg says puppet crashes.
sf [Sun, 4 May 2014 18:18:36 +0000 (18:18 +0000)]
format string fix for bus_space_tag_t
bus_space_tag_t is a pointer everywhere, except on i386, where it's an int.
Cast to long.
ok kettenis@
'Right idiom' deraadt@
sf [Sun, 4 May 2014 17:34:17 +0000 (17:34 +0000)]
change type of handle var to u_int16_t
This fixes a format string warning. No change to the format string is
necessary.
suggested by kettenis@
miod [Sun, 4 May 2014 17:13:05 +0000 (17:13 +0000)]
Enable the assembler code for BN, which was lost quite some time ago.
miod [Sun, 4 May 2014 17:12:19 +0000 (17:12 +0000)]
Remove the !SSLASM conditional. Either there is an arch-specific Makefile.inc,
or the !SSLASM list of files applies. This allows for an arch-specific
Makefile.inc to not specify SSLASM.
reyk [Sun, 4 May 2014 16:38:19 +0000 (16:38 +0000)]
Create a new default RSA engine instead of patching the existing one
if none is available. Fixes SSL/TLS and a possible fatalx() on
machines without a default RSA engine.
Thanks to Bjorn Ketelaars for reporting and testing.
ok gilles@ (for the relayd part)
mpi [Sun, 4 May 2014 14:42:36 +0000 (14:42 +0000)]
Make use of usbd_xfer_isread() instead of rerolling it everywhere.
This has the side effect of simplifying and reducing the differences
between the various *hci_alloc_*_chain() functions since they are the
principal place where we want to known if the transfer is a read or a
write.
mpi [Sun, 4 May 2014 14:31:50 +0000 (14:31 +0000)]
Get rid of EHCI_NULL. No functional change.
krw [Sun, 4 May 2014 13:08:39 +0000 (13:08 +0000)]
Revert previous. Insufficient discussion. Introduces
inconsistancy between configured and unconfigured interfaces.
Requested by deraadt@
kettenis [Sun, 4 May 2014 12:24:26 +0000 (12:24 +0000)]
Fix bogus error check; spotted by clang.
Submitted upstream by brad@ (and subsequently committed there).
ok jca@, mikeb@, brad@
krw [Sun, 4 May 2014 10:47:25 +0000 (10:47 +0000)]
Make answering 'none' to the installer question "IPv6 address?" result
in no IPv6 address, by appending '-inet6' to the generated hostname.<if>
file.
Less surprising to many people.
ok henning@ reyk@ beck@ rpe@
logan [Sun, 4 May 2014 10:40:59 +0000 (10:40 +0000)]
Remove the Z flag from the list of malloc options as it
was removed from malloc.c 10 days ago.
OK from miod@
reyk [Sun, 4 May 2014 10:32:32 +0000 (10:32 +0000)]
With the recent change by deraadt@ to introduce kern.nosuidcoredump=3,
we don't need the horrible debug hack anymore that disabled privdrop
and chroot to get core dumps of privsep processes. No functional
change for the normal binary, only if it is compiled with the
non-default -DDEBUG option.
jmc [Sun, 4 May 2014 07:01:10 +0000 (07:01 +0000)]
tweak previous;
guenther [Sun, 4 May 2014 05:03:26 +0000 (05:03 +0000)]
Add PS_SYSTEM, the process-level mirror of the thread-level P_SYSTEM,
and FORK_SYSTEM as a flag to set them. This eliminates needing to
peek into other processes threads in various places. Inspired by NetBSD
ok miod@ matthew@
deraadt [Sun, 4 May 2014 03:53:37 +0000 (03:53 +0000)]
When kern.nosuidcoredump=3, act like =2 but try to dump cores into
the /var/crash/programname/ directory, as root. For instance,
# mkdir /var/crash/bgpd/
# chmod 700 /var/crash/bgpd/ # If you skip this step, you are a moron
# sysctl kern.nosuidcoredump=3
# bgpd
# pkill -ABRT bgpd
# ls /var/crash/bgpd/
14764.core 23207.core 6423.core
Of course, in real life the idea is that you don't kill the daemon but it
crashes and you collect parallel cores. Careful you don't fill your /var.
Further tuneables are being considered.
Sorry to be picking on bgpd for this example. I've watched the "too
difficult to debug privsep code" angst for far too long.
ok guenther
guenther [Sat, 3 May 2014 23:30:04 +0000 (23:30 +0000)]
If P_ZOMBIE(pr->ps_mainproc) is true, then (pr->ps_flags & PS_EXITING)
is, so eliminate the check of the former and instead use the EINVAL
error for the latter. Also, consistently check for PS_EXITING
before check creds.
suggestion to split this from another diff miod@
guenther [Sat, 3 May 2014 22:49:43 +0000 (22:49 +0000)]
Fix whitespace fail in previous commit
guenther [Sat, 3 May 2014 22:44:36 +0000 (22:44 +0000)]
Move the u-area allocation and pmap-magic logic to its own function
uvm_uarea_alloc()
function name from NetBSD; arm testing by miod@
miod [Sat, 3 May 2014 20:06:13 +0000 (20:06 +0000)]
Enable assembler code for AES, DES, GCM, SHA1, SHA256 and SHA512.
The sparcv9 BN code is not enabled, as it expects to run on a 32-bit
userland and will need to be fixed for 64-bit userland first.
miod [Sat, 3 May 2014 19:38:25 +0000 (19:38 +0000)]
Enable assembler code for AES, BN (Montgomery), GCM128, SHA1, SHA256 and SHA512.
Note that GCM128 Neon code is currently not built (and thus not tested), as
the current toolchain does not support Neon instructions.
miod [Sat, 3 May 2014 19:36:47 +0000 (19:36 +0000)]
Do not compile the neon probe code until __ARM_ARCH__ >= 7. Neon-specific code
will not get referenced if this condition is not met.
miod [Sat, 3 May 2014 19:10:58 +0000 (19:10 +0000)]
typos
dtucker [Sat, 3 May 2014 18:46:14 +0000 (18:46 +0000)]
Add tests for with and without compression, with and without privsep.
miod [Sat, 3 May 2014 17:23:55 +0000 (17:23 +0000)]
Correctly enable Montgomery code.
markus [Sat, 3 May 2014 17:20:34 +0000 (17:20 +0000)]
unbreak compression, by re-init-ing the compression code in the
post-auth child. the new buffer code is more strict, and requires
buffer_init() while the old code was happy after a bzero();
originally from djm@
tedu [Sat, 3 May 2014 17:12:53 +0000 (17:12 +0000)]
now that 5.5 has been released with compatibility for 2b hashes,
switch to generating them by default. prodded by deraadt and sthen
jsing [Sat, 3 May 2014 17:00:45 +0000 (17:00 +0000)]
Update the base64 regress test and enable a test that would previously
have resulted in a segfault. Also update the resulting output bytes now
that the invalid/corrupt input is detected and rejected; unless you're
using BIO_FLAGS_BASE64_NO_NL, in which case you still get a stream of
zero value bytes and no way of knowing that the data is invalid/corrupt.
jsing [Sat, 3 May 2014 16:54:48 +0000 (16:54 +0000)]
Add checks for invalid base64 encoded data, specifically relating to the
handling of padding. This fixes a crash that can be triggered by feeding
base64 data followed by 64 or more padding characters, which results in a
negative output length.
This issue was reported by David Ramos, although the same bug has been
sitting in the OpenSSL RT since 2011:
https://rt.openssl.org/Ticket/Display.html?id=2608
Worse still, BIO_read seems to be completely unable to detect that the
base64 input was invalid/corrupt - in particular, enabling
BIO_FLAGS_BASE64_NO_NL results in a stream of zero value bytes rather than
no input (possibly a good replacement for /dev/null...), which could
result in nasty consequences. Prior to this fix some zero value bytes were
also injected without this flag being enabled.
The recently added base64 regress triggers and documents these issues
(and also ensures that this change retains functional behaviour).
tedu [Sat, 3 May 2014 16:33:35 +0000 (16:33 +0000)]
1. Drop support for no minor. This variant doesn't exist anymore.
2. Pull up the actual minor processing code into the switch that
parses it.
3. atoi is actually simpler than strtonum in this case, but check the
input beforehand so we don't get unexpected results.
4. Slightly more consistent style between various parse and check and
increment operations on salt.
ok deraadt
jsing [Sat, 3 May 2014 16:30:53 +0000 (16:30 +0000)]
It is definitly not the correct spelling.
jsing [Sat, 3 May 2014 16:22:28 +0000 (16:22 +0000)]
KNF.
martynas [Sat, 3 May 2014 16:19:53 +0000 (16:19 +0000)]
Annotate wide character routines so they get protected by Wbounded.
OK millert@
martynas [Sat, 3 May 2014 16:13:03 +0000 (16:13 +0000)]
- Provide extended-precision math constants req'd by POSIX
- Explicitly cast double-precision constants as needed for
FLT_EVAL_METHOD = 2 archs
OK guenther@, ratchov@
jsing [Sat, 3 May 2014 16:03:54 +0000 (16:03 +0000)]
Nuke more defines - we have setvbuf() and _IONBF.
ok deraadt@
jsing [Sat, 3 May 2014 15:50:24 +0000 (15:50 +0000)]
KNF.
jsing [Sat, 3 May 2014 15:07:46 +0000 (15:07 +0000)]
Initial version of a base64 regress.
jmc [Sat, 3 May 2014 14:13:52 +0000 (14:13 +0000)]
more tweaking; ok sthen
stsp [Sat, 3 May 2014 14:10:20 +0000 (14:10 +0000)]
Noncharacters 0xFFFE and 0xFFFF don't render a UTF-8 string invalid
so stop rejecting them in our citrus UTF-8 parser.
This is a common misinterpretation of the Unicode standard which resulted
in a corrigendum last year: http://www.unicode.org/versions/corrigendum9.html
Pointed out by jilles@freebsd (via pfg@freebsd), thanks!
deraadt [Sat, 3 May 2014 12:36:45 +0000 (12:36 +0000)]
Add #ifndef NO_PRINTF_PERCENT_N. Since we are fully standardized, we
don't use disable %n ourselves. But Google's Android libc is based
on our libc.... Giving them an easy knob to disable this dangerous
feature easily make their job easier without making our job any harder.
Request from Elliott @ google
miod [Sat, 3 May 2014 11:41:05 +0000 (11:41 +0000)]
Enable assembler bits for BN (Montgomery), SHA1 and SHA256.
Assembler bits for AES remain commented out as they run slower than the C code.
miod [Sat, 3 May 2014 11:39:46 +0000 (11:39 +0000)]
Detect Altivec support with the machdep.altivec sysctl rather than setmp and
a SIGILL handler.
Do not attempt to detect and use a 64-bit FPU yet.
chl [Sat, 3 May 2014 11:11:15 +0000 (11:11 +0000)]
remove unused variables
ok henning@
jsg [Sat, 3 May 2014 05:26:47 +0000 (05:26 +0000)]
drm/radeon: call drm_edid_to_eld when we update the edid
From Alex Deucher
7752811a7d6be680e8f1a87da18e3670633981ee in ubuntu 3.8
16086279353cbfecbb3ead474072dced17b97ddc in mainline linux
jsg [Sat, 3 May 2014 05:22:38 +0000 (05:22 +0000)]
Skip intel_crt_init for Dell XPS 8700
From Giacomo Comes
95849485beb5e665d56269cd05c3c19df399fb20 in ubuntu 3.8
10b6ee4a87811a110cb01eaca01eb04da6801baf in mainline linux
jsg [Sat, 3 May 2014 05:19:37 +0000 (05:19 +0000)]
drm/i915/tv: fix gen4 composite s-video tv-out
From Jani Nikula
1f2561bd1e2c46145c643673b662c099d2074936 in ubuntu 3.8
e1f23f3dd817f53f622e486913ac662add46eeed in mainline linux
jsg [Sat, 3 May 2014 05:11:30 +0000 (05:11 +0000)]
drm/i915: quirk invert brightness for Acer Aspire 5336
From Jani Nikula
083bda2f1130f185eccdf7c5cbbdb53fa88429b1 in ubuntu 3.8
0f540c3a7cfb91c9d7a19eb0c95c24c5de1197d5 in mainline linux
chl [Sat, 3 May 2014 00:27:19 +0000 (00:27 +0000)]
remove unused variable
ok krw@
chl [Fri, 2 May 2014 23:17:29 +0000 (23:17 +0000)]
remove unused variable
ok otto@ krw@
miod [Fri, 2 May 2014 22:23:00 +0000 (22:23 +0000)]
Correctly enable assembler Montgomery routine.
miod [Fri, 2 May 2014 22:22:27 +0000 (22:22 +0000)]
More use of 64-bit registers which needs to be disabled under OpenBSD.
kurt [Fri, 2 May 2014 21:58:51 +0000 (21:58 +0000)]
- Adjust pthread_stackseg_np to return the page aligned addressable stack
range. okay kettenis@, guenther@, deraadt@
miod [Fri, 2 May 2014 21:55:31 +0000 (21:55 +0000)]
Correctly enable assembler Montgomery routine.
guenther [Fri, 2 May 2014 20:20:12 +0000 (20:20 +0000)]
No really, pid 2 isn't special
miod [Fri, 2 May 2014 20:08:10 +0000 (20:08 +0000)]
Reenable assembler code for SHA384 and SHA512 now that it no longer miscomputes
things. Worth doing as it's twice faster than the C code.
miod [Fri, 2 May 2014 19:59:16 +0000 (19:59 +0000)]
The assembly sha512 code detects at runtime if it is running on a 64-bit
processor (PA2.0) and, if so, switches to 64-bit code.
However, when running under a 32-bit OpenBSD/hppa kernel, there is no guarantee
that the upper part of the registers will be preserved accross context switches
(or even userland->kernel boundaries), which causes this code to fail.
Wrap the generated code within #ifndef __OpenBSD__ in that case, to avoid
using the 64-bit code completely. (OpenBSD/hppa64, once stable, will not be
affected by this)
miod [Fri, 2 May 2014 19:27:04 +0000 (19:27 +0000)]
Simple sha{224,256,384,512} test using the FIPS 180-2 test vectors available
from http://csrc.nist.gov/groups/ST/toolkit/examples.html
deraadt [Fri, 2 May 2014 19:03:06 +0000 (19:03 +0000)]
Change BLKDEV_IOSIZE to PAGE_SIZE
ok beck miod
miod [Fri, 2 May 2014 18:21:39 +0000 (18:21 +0000)]
Disable assembler version of SHA512 for now, it produces wrong results.
jsing [Fri, 2 May 2014 18:06:12 +0000 (18:06 +0000)]
Add ChaCha as a cipher.
ok beck@ miod@
deraadt [Fri, 2 May 2014 17:06:46 +0000 (17:06 +0000)]
remove crazy #undefs; ok jsing
jsing [Fri, 2 May 2014 17:05:41 +0000 (17:05 +0000)]
Nuke OPENSSL_NO_SOCK since any half sane operating system has sockets.
ok beck@
jsing [Fri, 2 May 2014 16:58:12 +0000 (16:58 +0000)]
Sort and group includes. We also do not need to include openssl/evp.h more
than once.
ok beck@
jsing [Fri, 2 May 2014 16:55:38 +0000 (16:55 +0000)]
Sort function prototypes and group/sort entries within the functions array.
ok beck@
andre [Fri, 2 May 2014 14:50:26 +0000 (14:50 +0000)]
Add regression tests to relayd to cover a few key types/actions combinations.
ok reyk
andre [Fri, 2 May 2014 14:13:41 +0000 (14:13 +0000)]
Improves this test to be more strict on the filter action test. Now it
dispatches 4 requests from the client and checks if the server receives only 3.
Previous functionality kept.
ok reyk
deraadt [Fri, 2 May 2014 14:12:05 +0000 (14:12 +0000)]
spelling; Denis Fondras
kettenis [Fri, 2 May 2014 14:10:15 +0000 (14:10 +0000)]
Make acpiprt(4) handle interrupts with non-standard polarity and trigger mode
correctly.
Tested by nobody.
andre [Fri, 2 May 2014 14:10:03 +0000 (14:10 +0000)]
Extends relayd regress-tests framework to support tweaks from test-code: tables
definition on relayd.conf, customization of client/server cookies,
client/server headers and request path.
ok reyk
kettenis [Fri, 2 May 2014 14:04:50 +0000 (14:04 +0000)]
Make acpi_mutex_acquire/release actually grab the global lock if it should.
Get rid of the fake global lock code that these functions were using before.
ok pirofti@, mlarkin@
krw [Fri, 2 May 2014 12:43:10 +0000 (12:43 +0000)]
'for (part == 0; ...)' is not the same as 'for(part = 0; ...)'.
Should fix mysterious crashes when twiddling mount points. Too
much Marrakesh sun.
Pointed out by Owain G. Ainsworth. Thanks!
jca [Fri, 2 May 2014 10:40:26 +0000 (10:40 +0000)]
Kill annoying and useless emacs local variable. ok mikeb@
The variable would have no effect unless you use hilit19.el from
emacs21, and even there the specified value has not been kept up to date
with the file growth.
jca [Fri, 2 May 2014 09:50:32 +0000 (09:50 +0000)]
The page daemon no longer has a fixed PID. ok kettenis@ jmc@
andre [Fri, 2 May 2014 09:41:32 +0000 (09:41 +0000)]
Add missing $ on OpenBSD cvs tags, ok djm
miod [Fri, 2 May 2014 04:55:48 +0000 (04:55 +0000)]
No need to figure out the area spanned by .got in _dl_md_reloc(); only
_dl_md_reloc_boot() needs to compute this.
djm [Fri, 2 May 2014 03:27:54 +0000 (03:27 +0000)]
revert __bounded change; it causes way more problems for portable than
it solves; pointed out by dtucker@