Commit graph

147551 commits

Author SHA1 Message Date
Ed Schouten 96b676e999 Update ee(1) in the base system to version 1.5.0.
This version is now licensed under a 2-clause BSD license, instead of
the Artistic license. I've reverted a lot of local modifications we made
to ee, because they have been integrated upstream as well.

Only local modifications include:

- $FreeBSD$ ID.
- Pathname to init.ee.
- catopen() call, to honor LC_MESSAGES instead of LANG.

To keep SVN happy, I'm putting an application/octet-stream mime type on
the KOI8 translations.

Reviewed by:	current@
2009-05-27 17:27:03 +00:00
Zachary Loafman 35941cc841 Handle UDP RPC replies correctly on a multi-homed system, in userland RPC. Corrects an issue with mountd replies to OS X.
Approved by:        dfr (mentor)
2009-05-27 17:02:15 +00:00
Zachary Loafman 81ad7eb017 Correct handling of SYN packets that are to the left of the current window of an ESTABLISHED connection.
Reviewed by:        net@, gnn
Approved by:        dfr (mentor)
2009-05-27 17:02:10 +00:00
Zachary Loafman 6d72217368 Fix an issue when nss fallback routines are used in a multithreaded application.
Reviewed by:        bushman
Approved by:        dfr (mentor)
2009-05-27 17:01:59 +00:00
Andrew Thompson f72c0c2e5c Remove empty dir. 2009-05-27 16:44:43 +00:00
Andrew Thompson 06079f1405 Hook ubt and ubtbcmfw back up to the build. 2009-05-27 16:43:40 +00:00
Zachary Loafman cfeb7489c2 fail(9) support:
Add support for kernel fault injection using KFAIL_POINT_* macros and
fail_point_* infrastructure. Add example fail point in vfs_bio.c to
simulate VM buf pressure.

Approved by:        dfr (mentor)
2009-05-27 16:36:54 +00:00
Andrew Thompson 84c5da4c4e move ng_ubt_var.h back to its original place 2009-05-27 16:34:08 +00:00
Andrew Thompson 3671d9d810 move ng_ubt.c back to its original place 2009-05-27 16:33:08 +00:00
Andrew Thompson d434bfe44a move ubtbcmfw.c back to its original place 2009-05-27 16:32:05 +00:00
Bruce M Simpson dedecb4733 Add mld(4) man page. 2009-05-27 16:30:33 +00:00
Andrew Thompson 31097ae267 Delete the bluetooth drivers for the old usb stack. 2009-05-27 16:29:56 +00:00
Stacey Son 2f98b86b92 Change from using vm_map_delete() to vm_map_remove().
Approved by:	gnn (mentor)
Obtained from:	kib
2009-05-27 16:20:46 +00:00
Andrew Thompson 11c63ede84 Delete the old USB stack. The new stack has settled in and has all the
drivers/functionality and then some.
2009-05-27 16:16:56 +00:00
Dag-Erling Smørgrav 3c3c0b0bc2 Expand namei flag definitions to the full eight nybbles.
MFC after:	3 weeks
2009-05-27 15:46:22 +00:00
Andriy Gapon 93f0eafde3 linux_ioctl_cdrom: reduce stack usage
... by moving two ~2KB structures from stack to heap allocation.
I experienced stack overflow in linux emulation on i386 (8K stack)
when LINUX_DVD_READ_STRUCT ioctl was performed on atapicam cd
device and there was an error that resulted in additional quite
heavy stack use in cam layer.

Reviewed by:	dchagin
Approved by:	jhb (mentor)
2009-05-27 15:23:12 +00:00
Rick Macklem ee1c1433e3 Add a function to the experimental nfs subsystem that tests to see
if a local file system supports NFSv4 ACLs. This allows the
NFSHASNFS4ACL() macro to be correctly implemented. The NFSv4 ACL
support should now work when the server exports a ZFS volume.

Approved by:	kib (mentor)
2009-05-27 15:16:56 +00:00
Dag-Erling Smørgrav 2234b22628 Increment the counter outside the subshell. 2009-05-27 15:15:58 +00:00
Jamie Gritton 73d0971bf2 Add support for the arbitrary named jail parameters used by jail_set(2)
and jail_get(2).  Jail(8) can now create jails using a "name=value"
format instead of just specifying a limited set of fixed parameters; it
can also modify parameters of existing jails.  Jls(8) can display all
parameters of jails, or a specified set of parameters.  The available
parameters are gathered from the kernel, and not hard-coded into these
programs.

Small patches on killall(1) and jexec(8) to support jail names with
jail_get(2).

Approved by:	bz (mentor)
2009-05-27 14:30:26 +00:00
Jamie Gritton 0304c73163 Add hierarchical jails. A jail may further virtualize its environment
by creating a child jail, which is visible to that jail and to any
parent jails.  Child jails may be restricted more than their parents,
but never less.  Jail names reflect this hierarchy, being MIB-style
dot-separated strings.

Every thread now points to a jail, the default being prison0, which
contains information about the physical system.  Prison0's root
directory is the same as rootvnode; its hostname is the same as the
global hostname, and its securelevel replaces the global securelevel.
Note that the variable "securelevel" has actually gone away, which
should not cause any problems for code that properly uses
securelevel_gt() and securelevel_ge().

Some jail-related permissions that were kept in global variables and
set via sysctls are now per-jail settings.  The sysctls still exist for
backward compatibility, used only by the now-deprecated jail(2) system
call.

Approved by:	bz (mentor)
2009-05-27 14:11:23 +00:00
Adrian Chadd d76e4550e9 Clear IFF_DRV_OACTIVE if at least one TX xen/mbuf ring slot has been freed. 2009-05-27 13:59:17 +00:00
Edward Tomasz Napierala efbad25934 Don't discard packets with 'Destination Unreachable' at the beginning
of ip_forward(), if the IPSEC is compiled in.  It is possible that there
is an SPD that this packets will go through, even if there is no matching
route.  If not, ICMP will be sent anyway, after ip_output().

This is somewhat similar in purpose to r191621, except that one was
for the packets sent from the host, while this one is for packets
being forwarded by the host.

Reviewed by:	bz@
Sponsored by:	Wheel Sp. z o.o. (http://www.wheel.pl)
2009-05-27 12:44:36 +00:00
Edwin Groothuis 84ccb25dc7 Add the regression test for bin/date. 2009-05-27 12:31:55 +00:00
Edwin Groothuis 84b2ce0d42 MFV of tzcode2009h revision r192887
- Clarify the license for the tzcode: public domain

MFC after:	1 month
2009-05-27 12:18:39 +00:00
Edwin Groothuis 71da9898e0 MFV of tzdata2009h:
- Fix coordinates of Africa/Gaborone, Pacific/Noumea, Pacific/Tongatapu,
  Europe/Vatican

- Fix URLs (=3D -> = etc)

- Jordan doesn't go at last Friday of March 00:00 but no last
  Thursday of March 24:00

- Specifically state license for the data: public domain

MFC after:	1 week
2009-05-27 10:02:07 +00:00
Edwin Groothuis 3164401881 Vendor import of tzdata2009h
- Fix coordinates of Africa/Gaborone, Pacific/Noumea, Pacific/Tongatapu,
  Europe/Vatican

- Fix URLs (=3D -> = etc)

- Jordan doesn't go at last Friday of March 00:00 but no last
  Thursday of March 24:00

- Specifically state license for the data: public domain
2009-05-27 09:55:45 +00:00
VANHULLEBUS Yvan 081b9301bf Changed to M_NOWAIT when reallocing psc_buf in padlock_sha_update(),
as we already hold the non sleepable crypto_driver_mutex.

Approved by:	gnn(mentor)
Obtained from:	NETASQ
MFC after:	2 weeks
2009-05-27 09:52:12 +00:00
VANHULLEBUS Yvan aa1faa5fc6 Lock SPTREE before parsing it in key_spddump()
Approved by:	gnn(mentor)
Obtained from:	NETASQ
MFC after:	2 weeks
2009-05-27 09:44:14 +00:00
Robert Watson 81fee06f9c Convert the MAC Framework from using rwlocks to rmlocks to stabilize
framework registration for non-sleepable entry points.

Obtained from:	TrustedBSD Project
2009-05-27 09:41:58 +00:00
VANHULLEBUS Yvan cff5821a61 Only decrease refcnt once when flushing SPD entries, to
avoid flushing entries which are still used.

Approved by:	gnn(mentor)
Obtained from:	NETASQ
MFC after:	1 month
2009-05-27 09:31:50 +00:00
Adrian Chadd 7c66482c29 Enforce that there are actually enough xenbus TX ring descriptors available
before attempting to queue the packet.
2009-05-27 06:04:38 +00:00
Adrian Chadd 3fb28bbb67 Comment tidyup; comment where the next explicit check should
appear.
2009-05-27 05:37:04 +00:00
Weongyo Jeong f58ca84122 ports urtw(4) for USB2. Additionally it supports a 8187B chipset weakly
that it needs more stabilization.
2009-05-27 03:57:38 +00:00
Adrian Chadd a4ec37f59e Ensure that there are enough TX mbuf ring slots available before beginning
to dequeue a packet.

The tx path was trying to ensure that enough Xenbus TX ring slots existed but
it didn't check to see whether the mbuf TX ring slots were also available.
They get freed in xn_txeof() which occurs after transmission, rather than earlier
on in the process. (The same happens under Linux too.)

Due to whatever reason (CPU use, scheduling, memory constraints, whatever) the
mbuf TX ring may not have enough slots free and would allocate slot 0. This is
used as the freelist head pointer to represent "free" mbuf TX ring slots; setting
this to an actual mbuf value rather than an id crashes the code.

This commit introduces some basic code to track the TX mbuf ring use and then
(hopefully!) ensures that enough slots are free in said TX mbuf ring before it
enters the actual work loop.

A few notes:

* Similar logic needs to be introduced to check there are enough actual slots
  available in the xenbuf TX ring. There's some logic which is invoked earlier
  but it doesn't hard-check against the number of available ring slots.
  Its trivial to do; I'll do it in a subsequent commit.

* As I've now commented in the source, it is likely possible to deadlock the
  driver under certain conditions where the rings aren't receiving any changes
  (which I should enumerate) and thus Xen doesn't send any further software
  interrupts. I need to make sure that the timer(s) are running right and
  the queues are periodically kicked.

PR:		134926
2009-05-27 02:49:08 +00:00
Adrian Chadd 2d8fae9867 Do the invariant check before the mbuf is dereferenced. 2009-05-27 01:56:37 +00:00
Adrian Chadd c099cafa14 Flesh out some inline documentation which hopefully reflect the intended
reality of these functions.
2009-05-27 01:54:26 +00:00
Adrian Chadd 0e6993e4a7 Add in some INVARIANT checks in the TX mbuf descriptor "freelist" management code.
Slot 0 must always remain "free" and be a pointer to the first free entry in the
mbuf descriptor list. It is thus an error to have code allocate or push slot 0
back into the list.
2009-05-27 01:45:23 +00:00
Stacey Son 7e1e3d9462 Add the OpenSolaris lockstat(1M) command. Requires the dtrace driver,
the lockstat provider, and the ksyms(4) pseudo driver kernel modules.

Approved by:	gnn (mentor)
2009-05-27 01:30:23 +00:00
Jilles Tjoelker 00e8c94f25 Fix various cases with 3 or 4 parameters in test(1) to be POSIX compliant.
More precisely, this gives precedence to an interpretation not using the
'(', ')', '-a' and '-o' in their special meaning, if possible. For example,
it is now safe to write [ "$a" = "$b" ] and assume it compares the two
strings.

The man page already says that test(1) works this way, so does not need to
be changed.

Interpretation of input with more parameters tries a bit harder to find a
valid parse in some cases.

Add various additional test cases to TEST.sh.

PR:		standards/133369
Approved by:	ed (mentor)
2009-05-26 22:33:10 +00:00
Rick Macklem c3e22f831f Fix the experimental nfs subsystem so that it builds with the
current NFSv4 ACLs, as defined in sys/acl.h. It still needs a
way to test a mount point for NFSv4 ACL support before it will
work. Until then, the NFSHASNFS4ACL() macro just always returns 0.

Approved by:	kib (mentor)
2009-05-26 22:21:53 +00:00
Stacey Son 00a5db46de Add the ksyms(4) pseudo driver. The ksyms driver allows a process to
get a quick snapshot of the kernel's symbol table including the symbols
from any loaded modules (the symbols are all merged into one symbol
table).  Unlike like other implementations, this ksyms driver maps
memory in the process memory space to store the snapshot at the time
/dev/ksyms is opened.  It also checks to see if the process has already
a snapshot open and won't allow it to open /dev/ksyms it again until it
closes first.  This prevents kernel and process memory from being
exhausted.  Note that /dev/ksyms is used by the lockstat(1) command.

Reviewed by:	gallatin kib (freebsd-arch)
Approved by:	gnn (mentor)
2009-05-26 21:39:09 +00:00
Andrew Thompson 3e8739762f Unifdef __NetBSD__ here, the usb stack as a whole doesnt support NetBSD and it
obsfucates the code.
2009-05-26 21:20:42 +00:00
Ed Schouten cfe04e82b1 Merge local changes to ee(1) into contrib space.
The source file, manual page and English translation are now directly
obtained from the contrib/ directory. This makes it a lot easier to
merge a newer version of ee(1) into the tree.

Thanks to:	des and jhb
2009-05-26 21:06:51 +00:00
Dag-Erling Smørgrav b2cc900a90 Move opt_apic.h closer to the "XXX: for assym.s" comment.
Suggested by:	jhb
MFC after:	1 week
2009-05-26 20:57:19 +00:00
Stacey Son a5aedd68b4 Add the OpenSolaris dtrace lockstat provider. The lockstat provider
adds probes for mutexes, reader/writer and shared/exclusive locks to
gather contention statistics and other locking information for
dtrace scripts, the lockstat(1M) command and other potential
consumers.

Reviewed by:	attilio jhb jb
Approved by:	gnn (mentor)
2009-05-26 20:28:22 +00:00
Dag-Erling Smørgrav e8cdb7739f opt_apic.h is i386-only.
MFC after:	1 week
2009-05-26 20:22:03 +00:00
Ed Schouten 72fcea8cb7 Copy ee 1.4.2 into the contrib directory.
This allows me to merge our custom changes to ee(1) back on top of
original sources, with correct mergeinfo.
2009-05-26 20:13:17 +00:00
Dag-Erling Smørgrav 93f2449bee Add a regression test for kern/21768.
MFC after:	1 week
2009-05-26 20:13:06 +00:00
John Baldwin 256d7a8a16 Correct the sense of a test so that this filter always waits for the full
request to arrive.  Previously it would end up returning as soon as the
request length stored in the first two bytes had arrived.

Reviewed by:	dwmalone
MFC after:	1 week
2009-05-26 20:00:30 +00:00
Ed Schouten 15814131d4 Remove unused curses replacement implementation from ee(1) sources. 2009-05-26 19:06:56 +00:00