Commit Graph

186872 Commits

Author SHA1 Message Date
Jilles Tjoelker
e852d6bc48 libc/resolv: Use poll() instead of kqueue().
The resolver in libc creates a kqueue for watching a single file descriptor.
This can be done using poll() which should be lighter on the kernel and
reduce possible problems with rlimits (file descriptors, kqueues).

Reviewed by:	jhb
2014-01-14 22:05:33 +00:00
Alexander Motin
6103bae6ae Fix lock leak in purely hypothetical case of TCP connection without SVC_ACK
method.  This change should be NOP now, but it is better to be future safe.

Reported by:	rmacklem
2014-01-14 20:18:38 +00:00
Xin LI
f3f38455ea Disable 'monitor' feature in ntpd by default.
Security:	FreeBSD-SA-14:02.ntpd
Approved by:	so
2014-01-14 18:59:00 +00:00
Xin LI
ecd241b619 Fix bsnmpd remote denial of service vulnerability.
Reported by:	dinoex
Submitted by:	harti
Security:	FreeBSD-SA-14:01.bsnmpd
Security:	CVE-2014-1452
2014-01-14 18:58:57 +00:00
Julio Merino
9622238c09 Replace hand-crafted Kyuafiles with automatic generation.
Redo r260506 by using the new TEST_METADATA functionality of bsd.test.mk
to mark the sh(1) and test(1) tests as not supporting root.  This is to
get rid of hand-crafted Kyuafiles for these very simple cases.

MFC after:	5 days
2014-01-14 18:45:32 +00:00
Julio Merino
d935b54263 Use TAP_TESTS_PERL to register the legacy_test in bin/pax.
Redo r260586 by using the new functionality in tap.test.mk to transparently
support perl-based test programs.

As a side-effect, we get rid of an explicit path to /usr/bin/perl by
replacing it with /usr/local/bin/perl (or as defined in tap.test.mk).

This also fixes the name of the legacy_test source file because this should
have always been legacy_test.pl and not legacy_test.sh.  My mistake when
originally moving the code around without realizing that this was a perl
script.

MFC after:	5 days
2014-01-14 18:39:30 +00:00
Julio Merino
e8de5c5235 Support perl-based TAP-compliant test programs.
Introduce a TAP_TESTS_PERL primitive to list test programs written in perl.
Only do this in tap.test.mk because I only expect perl-based test programs
with this interface.

This is very similar to TAP_TESTS_SH but the difference is that we record
in the Kyuafile that the test program requires a perl interpreter.  This
in turn makes Kyua mark the test as skipped if the perl package is not yet
installed, instead of mysteriously failing to run the program.

MFC after:	5 days
2014-01-14 18:35:56 +00:00
Julio Merino
8c465f5880 Support defining test program metadata from the Makefiles.
Introduce a new, per-test-program TEST_METADATA.<program> variable that
contains a list of key/value paris describing metadata properties for
that test program.  These properties are later written into the
auto-generated Kyuafile when using the KYUAFILE=auto functionality.

This is to avoid having to supply hand-crafted Kyuafiles when the needs
for metadata overrides are trivial.

While doing this, and because I am documenting TEST_METADATA, take the
chance to document the TEST_INTERFACE setting as well.

MFC after:	5 days
2014-01-14 18:32:47 +00:00
Hans Petter Selasky
8af981a406 Don't output any modifier keys before we see a valid
non-modifier key press. This prevents so-called "ghost
keyboards" keeping modifier keys pressed while not
actually seen as a real keyboard.

MFC after:	2 weeks
2014-01-14 08:43:38 +00:00
Justin Hibbits
fee1155508 Add missing EM_PPC64 to e_machine header display.
MFC after:	1 week
2014-01-14 04:28:41 +00:00
Neel Natu
5b8a8cd1fe Add an API to rendezvous all active vcpus in a virtual machine. The rendezvous
can be initiated in the context of a vcpu thread or from the bhyve(8) control
process.

The first use of this functionality is to update the vlapic trigger-mode
register when the IOAPIC pin configuration is changed.

Prior to this change we would update the TMR in the virtual-APIC page at
the time of interrupt delivery. But this doesn't work with Posted Interrupts
because there is no way to program the EOI_exit_bitmap[] in the VMCS of
the target at the time of interrupt delivery.

Discussed with:	grehan@
2014-01-14 01:55:58 +00:00
Xin LI
df48f4170e ANSI-fy prototype.
MFC after:	2 weeks
2014-01-14 01:52:34 +00:00
Bruce A. Mah
57afe75b5b Move myself from ports alumni to active ports committer section.
Add an edge indicating mat as my ports mentor.

Approved by:	mat (mentor)
2014-01-13 23:27:24 +00:00
Andreas Tobler
feb86bbe4f Described in the man page but not implemented. Here it comes,
atomic_swap_32/64. The latter only for powerpc64.

MFC after:	1 month
2014-01-13 22:21:29 +00:00
Andreas Tobler
7447f978d3 The onyx codec works also as module, so add it.
MFC after:	1 month
2014-01-13 21:44:17 +00:00
Bryan Drewery
4ec234c813 Remove scary comment about this being a test key.
There has been no need to regenerate the signing key.

Reported by:	mat
Approved by:	bapt (mentor)
MFC after:	3 days
2014-01-13 20:55:15 +00:00
Marcel Moolenaar
2d34114497 When building a cross-kgdb, suppress the registration of the
standard core target by declaring coreops_suppress_target with
initializer. This is also happening for non-cross kgdb, by
virtue of having fbsd-threads.c in libgdb and having it do the
exact same thing. Since fbsd-threads.c is not included in in
libgdb when building a cross debugger, we ended up with more
than 1 core file targets (the standard gdb core file target and
kgdb's libkvm based core file target) and this behaves the same
as not having a core target at all.
2014-01-13 19:08:25 +00:00
Marcel Moolenaar
cfe2be2b5e We don't have to worry about page sizes when working on virtual
cores (i.e. minidumps). Every segment is virtually contiguous.
2014-01-13 19:02:31 +00:00
Marcel Moolenaar
f864e2ab73 Re-apply the part of r260022 that was reverted by r260030 with
one significant difference: for LIB32 builds both TARGET_ARCH
and MACHINE_ARCH are defined. TARGET_ARCH confusingly holds the
architecture of the host (e.g. amd64), while MACHINE_ARCH holds
the architecture were trying to build (e.g. i386). With both
set and different, r260022 changed the behaviour to interpret
the condition as building a cross-amd64 libkvm on i386, when
obviously we're trying to build an i386 version on amd64. When
COMPAT_32BIT is defined, we're building LIB32 and ignore the
value of TARGET_ARCH as we did before.
2014-01-13 19:01:14 +00:00
Baptiste Daroussin
48aad6a234 Fix dmesg(1) -> dmesg(8)
Reported by:	trasz
2014-01-13 17:14:10 +00:00
Baptiste Daroussin
c8ebd84147 Fix typo
Reported by:	dumbbell
2014-01-13 16:47:25 +00:00
Baptiste Daroussin
7ec7b58f0e Update the BUGS section according the recent changes in kldload(8)
Reviewed by:	bdrewery
MFC after:	1 week
2014-01-13 16:45:43 +00:00
Baptiste Daroussin
10c916252f Point the user to dmesg(1) to get informations about why loading a module did fail
instead of printing the cryptic "Exec format error"

MFC after:	1 week
2014-01-13 16:23:09 +00:00
Hans Petter Selasky
a0d53e0b38 Implement better error recovery for Transaction Translators, TTs,
found in High Speed USB HUBs which translate from High Speed USB into
FULL or LOW speed USB. In some rare cases SPLIT transactions might get
lost, which might leave the TT in an unknown state. Whenever we detect
such an error try to issue either a clear TT buffer request, or if
that is not possible reset the whole TT.

MFC after:	1 week
2014-01-13 15:21:11 +00:00
Hans Petter Selasky
a148d44fb5 Separate I/O errors from reception of STALL PID.
MFC after:	1 week
2014-01-13 15:06:03 +00:00
Hans Petter Selasky
527d91ca5c Add new testcase for USB mass storage. 2014-01-13 13:27:00 +00:00
Julio Merino
0b7cffde5f Mark the bin/pax tests as requiring perl.
The effect of this is that the test program is marked as skipped when perl
is missing, instead of marking it as broken due to an execution failure.

MFC after:	3 days
2014-01-13 12:17:41 +00:00
Julio Merino
68d4cdd010 Prevent misc_helpers from running as a test.
Do this by generating misc_helpers explicitly, without using the
ATF_TESTS_SH functionality.

While this script is technically an atf-sh test program, it is not intended
to be run as a test and therefore it mustn't end up in the Kyuafile.  Using
ATF_TESTS_SH means that misc_helpers ended up registered in the Kyuafile
and then failed to run as a test.

The alternative would be to supply an explicit Kyuafile from this directory
that lists the known test files, but doing it the way described above will
be easier to maintain.

MFC after:	3 days
2014-01-13 10:47:26 +00:00
Bryan Venteicher
22525db507 Add unmapped IO support to virtio_scsi(4) 2014-01-13 04:46:48 +00:00
Bryan Venteicher
ee11ec3437 Add unmapped IO support to virtio_blk(4) 2014-01-13 04:43:01 +00:00
Bryan Venteicher
fb6c25186b Add sglist_append_bio(9) to append a struct bio's data to a sglist
Reviewed by:	jhb, kib (long ago)
2014-01-13 04:41:08 +00:00
Julio Merino
a62905a977 Add atf pkg-config files from the vendor branch.
These were originally deleted by mistake (because they were not yet being
installed) and are actually necessary.

This should have been part of r260576 but I missed committing this
directory.

MFC after:	5 days
2014-01-12 22:17:10 +00:00
Julio Merino
e1380b00f6 Generate and install pkg-config files for atf.
These files are required to get packages in ports to build against atf and
also to get a couple of currently-failing tests to pass.

I'm following the approach already used by the libusb pkg-config files
installed by the system regarding the location and the install rules.

MFC after:	5 days
2014-01-12 21:56:26 +00:00
Jilles Tjoelker
f6e989a6e2 fts(3): Remove stray mentions of the obsolete fts_bignum. 2014-01-12 20:47:08 +00:00
Jilles Tjoelker
54cc1f8864 fts: Stat things relative to the directory fd, if possible.
As a result, the kernel needs to process shorter pathnames if fts is not
changing directories (if fts follows symlinks (-L option to utilities), fts
cannot open "." or FTS_NOCHDIR was specified).

Side effect: If pathnames exceed PATH_MAX, [ENAMETOOLONG] is not hit at the
stat stage but later (opendir or application fts_accpath) or not at all.
2014-01-12 20:30:55 +00:00
Alan Cox
9099545af1 Correctly update the count of stuck pages, "addl_page_shortage", in
vm_pageout_scan().  There were missing increments in two less common cases.

Don't conflate the count of stuck pages and the pageout deficit provided by
vm_page_alloc{,_contig}().  (A proposed fix to the OOM code depends on this.)

Handle held pages consistently in the inactive queue scan.  In the more
common case, we did not move the page to the tail of the queue.  Whereas, in
the less common case, we did.  There's no particular reason to move the page
in the less common case, so remove it.

Perform the calculation of the page shortage for the active queue scan a
little earlier, before the active queue lock is acquired.  The correctness
of this calculation doesn't depend on the active queue lock being held.

Eliminate a redundant variable, "pcount".  Use the more descriptive
variable, "maxscan", in its place.

Apply a few nearby style fixes, e.g., eliminate stray whitespace and excess
parentheses.

Reviewed by:	kib
Sponsored by:	EMC / Isilon Storage Division
2014-01-12 19:04:20 +00:00
Bryan Venteicher
bf51187b26 Remove incorrect bit shift when assigning the LUN request field
This caused duplicate targets appearing on Google Compute Engine
instances.

PR:		kern/185626
Submitted by:	Venkatesh Srinivas <venkateshs@google.com>
MFC after:	3 days
2014-01-12 17:40:47 +00:00
Andrew Turner
0b55a5a4af Fix gcc with EABI on big-endian ARM by setting the endian correctly.
Without this gcc would generate byte loads for a little-endian core.

MFC after:	1 week
2014-01-12 15:35:03 +00:00
Hans Petter Selasky
9ae7f7c13c Make sure reserved fields of the EHCI DMA descriptors are not dirty
after previous transfers.

MFC after:	1 week
2014-01-12 13:16:25 +00:00
Hans Petter Selasky
b353507895 Don't do synchronous USB requests inside USB transfer callbacks. It is
technically OK, but not recommended.

MFC after:	1 weeks
2014-01-12 11:44:28 +00:00
Gavin Atkinson
56c63f28ed Remove spaces from boot messages when we print the CPU ID/Family/Stepping
to match the rest of the CPU identification lines, and once again fit
into 80 columns in the usual case.
2014-01-11 22:41:10 +00:00
Jilles Tjoelker
b83686c8fe Add some missing .Nm for newer syscalls in existing man pages.
MFC after:	1 week
2014-01-11 22:00:16 +00:00
Jilles Tjoelker
b95de98a6b find: Allow -type d without statting everything.
fts(3) detects directories even in FTS_NOSTAT mode (so it can descend into
them).

No functional change is intended, but find commands that use -type d but no
primaries that still require stat/lstat calls make considerably fewer system
calls.
2014-01-11 21:12:27 +00:00
John-Mark Gurney
fd9e2c6a4a use a real uint64_t instead of writing code to emulate one..
I verified w/ a:
dd if=/dev/zero bs=1m count=5000 | sha256
a33351fafd00e4c4bcdee2a1c5d019026500f8cdfeaf91a9b8dbbb2619429659

Reviewed by:	cperciva
MFC after:	1 week
2014-01-11 20:49:22 +00:00
David Chisnall
e23d53c461 Add missing C++11 typeinfos to the libcxxrt version script.
PR:		185663
MFC after:	1 week
2014-01-11 19:02:17 +00:00
Gavin Atkinson
e1a5283697 Add firmware for Intel Centrino Wireless-N 105 devices.
Committed from:	Centrino 105 device
2014-01-11 18:56:48 +00:00
Alexander V. Chernikov
c254a2091c Revert r260548. We really should not use IPFW_WLOCK() here
but this requires some more playing with IPFW_UH_WLOCK(). Leave till later.
2014-01-11 18:27:34 +00:00
Neel Natu
27ff748ea1 Fix amd64 build breakage caused by r260532.
Submitted by:	Marcus Karlsson (mk@acc.umu.se)
Pointy hat to:	me
2014-01-11 17:37:53 +00:00
Alexander Motin
d718926b6d Move xpt_run_devq() call before request completion callback where it was
originally.

I am not sure why exactly have I moved it during one of many refactorings
during camlock project, but obviously it opens race window that may cause
use after free panics during SIM (in reported cases umass(4)) detach.

MFC after:	2 weeks
2014-01-11 16:52:09 +00:00
Alexander V. Chernikov
ac5863eed8 We don't need chain write lock since we're not modifying its contents.
LibAliasSetAddress() uses its own mutex to serialize changes.

While here, convert ifp->if_xname access to if_name() function.

MFC after:	2 weeks
Sponsored by:	Yandex LLC
2014-01-11 16:50:41 +00:00