]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoUpdate netcat to the version carried with OpenBSD 4.5.
Xin LI [Thu, 28 May 2009 23:23:49 +0000 (23:23 +0000)]
Update netcat to the version carried with OpenBSD 4.5.

15 years agoVendor import of netcat as of OPENBSD_4_5.
Xin LI [Thu, 28 May 2009 23:16:17 +0000 (23:16 +0000)]
Vendor import of netcat as of OPENBSD_4_5.

15 years agoUse prototype for usage(). This makes perror(1) WARNS=6 clean.
Xin LI [Thu, 28 May 2009 21:37:40 +0000 (21:37 +0000)]
Use prototype for usage().  This makes perror(1) WARNS=6 clean.

Approved by: gnn

15 years agoUse strlcpy().
Xin LI [Thu, 28 May 2009 21:12:43 +0000 (21:12 +0000)]
Use strlcpy().

15 years agoChange the "-4" argument for nfsd and mountd to "-e" to avoid
Rick Macklem [Thu, 28 May 2009 20:28:13 +0000 (20:28 +0000)]
Change the "-4" argument for nfsd and mountd to "-e" to avoid
confusion, since it does not refer to IPv4 nor NFSv4, but to
running the experimental server instead of the regular one.

Approved by: kib (mentor)

15 years agoFix missed change from usb2_gen_descriptor to usb_gen_descriptor
Andrew Thompson [Thu, 28 May 2009 20:21:01 +0000 (20:21 +0000)]
Fix missed change from usb2_gen_descriptor to usb_gen_descriptor

15 years agoAdd the kernel build glue for the experimental NFS subsystem that
Rick Macklem [Thu, 28 May 2009 19:45:11 +0000 (19:45 +0000)]
Add the kernel build glue for the experimental NFS subsystem that
includes support for NFSv4. The subsystem can optionally be linked
into the kernel using the two options:
  NFSCL - the client
  NFSD - the server
It is also built as three modules:
  nfscl - the client
  nfsd - the server
  nfscommon - functions shared by the client and server

Approved by: kib (mentor)

15 years agoMake *getpages()s' assertion on the state of each page's dirty bits
Alan Cox [Thu, 28 May 2009 18:11:09 +0000 (18:11 +0000)]
Make *getpages()s' assertion on the state of each page's dirty bits
stricter.

15 years agos/usb2_/usb_/ on all C structs for the USB stack.
Andrew Thompson [Thu, 28 May 2009 17:36:36 +0000 (17:36 +0000)]
s/usb2_/usb_/ on all C structs for the USB stack.

15 years agoNobody spoke up, so assume my interpretation was correct and enable keyword
Dag-Erling Smørgrav [Thu, 28 May 2009 17:35:35 +0000 (17:35 +0000)]
Nobody spoke up, so assume my interpretation was correct and enable keyword
expansion for this file.

15 years agoFix style/grammar issues in fail(9) man page.
Zachary Loafman [Thu, 28 May 2009 15:02:52 +0000 (15:02 +0000)]
Fix style/grammar issues in fail(9) man page.

Suggested by:       Ben Kaduk
Approved by:        dfr (mentor)

15 years agoMatch type for socket option (in practice, unnecessary, but stylistically it's a...
Zachary Loafman [Thu, 28 May 2009 15:02:44 +0000 (15:02 +0000)]
Match type for socket option (in practice, unnecessary, but stylistically it's a little nicer).

Suggested by:       jilles
Approved by:        dfr (mentor)

15 years agoRevert unnecessary memset after calloc.
Zachary Loafman [Thu, 28 May 2009 15:02:21 +0000 (15:02 +0000)]
Revert unnecessary memset after calloc.

Suggested by:       jhb
Approved by:        dfr (mentor)

15 years agoUse a temporary variable to avoid a duplicate strlen().
Dag-Erling Smørgrav [Thu, 28 May 2009 10:24:26 +0000 (10:24 +0000)]
Use a temporary variable to avoid a duplicate strlen().

Submitted by: kib
MFC after: 1 week

15 years agoSome of the boot loader code only works on a ufs file system, but it
Doug Rabson [Thu, 28 May 2009 08:22:36 +0000 (08:22 +0000)]
Some of the boot loader code only works on a ufs file system, but it
uses the generic struct dirent, which happens to look identical to UFS's
struct direct.  If BSD ever changes dirent then this will be a problem.

Submitted by: matthew dot fleming at isilon dot com

15 years agoMFdevbranch 192944
Kip Macy [Thu, 28 May 2009 08:18:12 +0000 (08:18 +0000)]
MFdevbranch 192944
 - add FreeBSD implementation of xdrmem_control needed by zfs
 - have zfs define xdr_ops using FreeBSD's definition
 - remove solaris xdr files from zfs compile

15 years agoUpdate this script so that it handles different ruleset failures
Brian Somers [Thu, 28 May 2009 07:43:06 +0000 (07:43 +0000)]
Update this script so that it handles different ruleset failures
differently.  The output now shows the ruleset and shortens to
slightly different text (using $daily_status_mail_rejects_shorten),
but it should be more descriptive.

PR: 35018
Inspired by: Mikhail Teterin - mi at aldan dot algebra dot com
MFC after: 3 weeks

15 years agoChange vm_object_page_remove() such that it clears the page's dirty bits
Alan Cox [Thu, 28 May 2009 07:26:36 +0000 (07:26 +0000)]
Change vm_object_page_remove() such that it clears the page's dirty bits
when it invalidates the page.

Suggested by: tegge

15 years agoFix off by one error in acl_create_entry(3).
Edward Tomasz Napierala [Thu, 28 May 2009 07:20:52 +0000 (07:20 +0000)]
Fix off by one error in acl_create_entry(3).

Reviewed by: rwatson@
MFC after: 2 weeks

15 years agoRevise vm_pageout_scan()'s handling of partially dirty pages. Specifically,
Alan Cox [Thu, 28 May 2009 06:52:14 +0000 (06:52 +0000)]
Revise vm_pageout_scan()'s handling of partially dirty pages.  Specifically,
rather than unconditionally making partially dirty pages fully dirty, only
make partially dirty pages fully dirty if the pmap says that the page has
been modified.

(This change is also a small optimization.  It eliminate an unnecessary call
to pmap_is_modified() on pages that are mapped read only.)

Suggested by: tegge

15 years agochar can be unsigned, like on ARM and PowerPC. Unbreak the
Marcel Moolenaar [Thu, 28 May 2009 04:25:38 +0000 (04:25 +0000)]
char can be unsigned, like on ARM and PowerPC. Unbreak the
build for those by propagating the type of character from
char to int.

15 years agoSay hello to a very basic, read-only, Xen Hypervisor RTC.
Adrian Chadd [Thu, 28 May 2009 04:17:05 +0000 (04:17 +0000)]
Say hello to a very basic, read-only, Xen Hypervisor RTC.

The hypervisor doesn't provide a single "TOD" - it instead provides a
"start time" and a "running time". These are added together to form
the current TOD. The TOD is in UTC.

This RTC is only (initially) designed to be read at startup. There's
some further poking that needs to happen to pick up hypervisor time
changes (ie, by the Dom0 time being adjusted by something). This
time adjustment currently can cause "weird stuff" in the DomU clock;
I'll begin investigating and repairing that in subsequent commits.

PR: 135008

15 years agoDon't call the watch callback if its NULL.
Adrian Chadd [Thu, 28 May 2009 04:03:16 +0000 (04:03 +0000)]
Don't call the watch callback if its NULL.

I'm not sure what series of events is leading up to this watch event
being received with no callback info and it should be investigated.
I'm triggering it somehow by registering an RTC device (which will
show up in a subsequent commit.)

15 years agoAdd a regression test for multiple threads of the same process acquiring the same...
Zachary Loafman [Thu, 28 May 2009 02:39:07 +0000 (02:39 +0000)]
Add a regression test for multiple threads of the same process acquiring the same fcntl lock.

Approved by:        dfr (mentor)

15 years agoCorrect off-by-one issue in truss(1) which happens when system call number
Xin LI [Thu, 28 May 2009 00:38:24 +0000 (00:38 +0000)]
Correct off-by-one issue in truss(1) which happens when system call number
is nsyscalls.

PR: bin/134916
Submitted by: Steven Hartland <steven hartland multiplay co uk>
MFC after: 2 weeks

15 years agoAllocate the usb serial, manufacturer and product strings rather than use char
Andrew Thompson [Wed, 27 May 2009 23:12:02 +0000 (23:12 +0000)]
Allocate the usb serial, manufacturer and product strings rather than use char
arrays in the usb_device struct. This also eliminates USB_HAVE_STRINGS.

15 years agoFix lockstat breakage to arm/powerpc buildworld.
Stacey Son [Wed, 27 May 2009 22:41:28 +0000 (22:41 +0000)]
Fix lockstat breakage to arm/powerpc buildworld.
Thanks to IBM char's are unsigned on arm/powerpc.

Approved by: gnn (mentor)

15 years agoModify mountd to handle the experimental nfs server as well as the
Rick Macklem [Wed, 27 May 2009 22:02:54 +0000 (22:02 +0000)]
Modify mountd to handle the experimental nfs server as well as the
regular one. It now takes a "-4" command line argument to force it
to use the experimental server. Otherwise it will use the regular
server unless the experimental server is the only one linked into
the kernel. A third kind of line has been added to /etc/exports,
which is specific to NFSv4 and defines where the NFSv4 tree root is
and can be used to limit access to NFSv4 state handling operations
that do not use any file handle.

Approved by: kib (mentor)

15 years agoRework interrupt bringup and teardown.
George V. Neville-Neil [Wed, 27 May 2009 20:13:36 +0000 (20:13 +0000)]
Rework interrupt bringup and teardown.

Calculate the exact number of vectors we'll use before calling
pci_alloc_msix.  Don't grab nine all the time.

Call cxgb_setup_interrupts once per T3, not once per port.  Ditto
for cxgb_teardown_interrupts.

Don't leak resources when interrupt setup fails in the middle.

Obtained from: Navdeep Parhar
MFC after: 10 days

15 years agoAdd support for the experimental nfs client to mount_nfs. The
Rick Macklem [Wed, 27 May 2009 19:56:51 +0000 (19:56 +0000)]
Add support for the experimental nfs client to mount_nfs. The
experimental client is used when the fstype is "newnfs" or the "nfsv4"
option is specified. It includes the addition of the option:
  gssname - to specify a client side initiator host based principal name
which is specific to NFSv4.
It also includes a change to mount.c, so that it knows about
mount_newnfs, but not mount_nfs4.

Reviewed by: dfr
Approved by: kib (mentor)

15 years agoProvide a workaround for USB devices that do not support mono or stereo
Andrew Thompson [Wed, 27 May 2009 19:45:04 +0000 (19:45 +0000)]
Provide a workaround for USB devices that do not support mono or stereo
operation by overriding the channel count.

Submitted by: Hans Petter Selasky
Reported by: MIHIRA Sanpei Yoshiro

15 years agoFix handling of NFSv4 Close operations in ncl_inactive(). Only
Rick Macklem [Wed, 27 May 2009 19:41:29 +0000 (19:41 +0000)]
Fix handling of NFSv4 Close operations in ncl_inactive(). Only
do them for NFSv4 and flush writes to the server before doing
the Close(s), as required. Also, use the a_td argument instead of
curthread.

Approved by: kib (mentor)

15 years agoDelete useless #ifdef; make it more obvious if setting TSO fails.
Adrian Chadd [Wed, 27 May 2009 19:31:50 +0000 (19:31 +0000)]
Delete useless #ifdef; make it more obvious if setting TSO fails.

15 years agoRename the queue macros I introduced last year.
Ed Schouten [Wed, 27 May 2009 19:28:04 +0000 (19:28 +0000)]
Rename the queue macros I introduced last year.

Last year I added SLIST_REMOVE_NEXT and STAILQ_REMOVE_NEXT, to remove
entries behind an element in the list, using O(1) time. I recently
discovered NetBSD also has a similar macro, called SLIST_REMOVE_AFTER.
In my opinion this approach is a lot better:

- It doesn't have the unused first argument of the list pointer. I added
  this, mainly because OpenBSD also had it.

- The _AFTER suffix makes a lot more sense, because it is related to
  SLIST_INSERT_AFTER. _NEXT is only used to iterate through the list.

The reason why I want to rename this now, is to make sure we don't
release a major version with the badly named macros.

15 years agoAdd support for the Apple MacBook Pro keyboard
Andrew Thompson [Wed, 27 May 2009 19:27:29 +0000 (19:27 +0000)]
Add support for the Apple MacBook Pro keyboard
- add key mappings for fn keys
- byte swapping for certain models
- Fix leds for keyboards which require an ID byte for the HID output structures

Submitted by: Hans Petter Selasky

15 years agoFix xref name.
Andrew Thompson [Wed, 27 May 2009 19:21:29 +0000 (19:21 +0000)]
Fix xref name.

15 years agoMerge final round of MLD changes from p4:
Bruce M Simpson [Wed, 27 May 2009 18:57:13 +0000 (18:57 +0000)]
Merge final round of MLD changes from p4:
 ip6_input.c, in6.h:
 * Add netinet6-specific mbuf flag M_RTALERT_MLD, shadowing M_PROTO6.
  * Always set this flag if HBH Router Alert option is present for MLD,
    even when not forwarding.

 icmp6.c:
 * In icmp6_input(), spell m->m_pkthdr.rcvif as ifp to be consistent.
 * Use scope ID for verifying input. Do not apply SSM filters here, no inpcb.
  * Check for M_RTALERT_MLD when validating MLD traffic, as we can't see
    IPv6 hop options outside of ip6_input().

 in6_mcast.c:
 * Use KAME scope/zone ID in in6_multi.
   * Update net.inet6.ip6.mcast.filters implementation to use scope IDs
     for comparisons.
 * Fix scope ID treatment in multicast socket option processing.
   Scope IDs passed in from userland will be ignored as other less
   ambiguous APIs exist for specifying the link.
 * Tighten userland input checks in IPv6 SSM delta and full-state ops.
   * Source filter embedded scope IDs need to be revisited, for now
     just clear them and ignore them on input.
 * Adapt KAME behaviour of looking up the scope ID in the default zone
   for multicast leaves, when the interface is ambiguous.

 mld6.c:
 * Tighten origin checks on MLD traffic as per RFC3810 Section 6.2:
  * ip6_src MAY be the unspecified address for MLDv1 reports.
  * ip6_src MAY have link-local address scope for MLDv1 reports,
    MLDv1 queries, and MLDv2 queries.
  * Perform address field validation *before* accepting queries.
 * Use KAME scope/zone ID in query/report processing.
   * Break const correctness for mld_v1_input_report(), mld_v1_input_query()
     as we temporarily modify the input mbuf chain.
   * Clear the scope ID before handoff to userland MLD daemon.
 * Fix MLDv1 old querier present timer processing.
   With the protocol defaults, hosts should revert to MLDv2 after 260s.
 * Add net.inet6.mld.v1enable sysctl, default to on.

 ifmcstat.c:
 * Use sysctl by default; -K requests kvm(3) if so compiled.

 mld.4:
 * Connect man page to build.

Tested using PCS.

15 years agoIncrease the size of the static TLS area slightly (required for the NVidia's
Doug Rabson [Wed, 27 May 2009 18:54:31 +0000 (18:54 +0000)]
Increase the size of the static TLS area slightly (required for the NVidia's
OpenGL driver on amd64).

15 years agoSlightly adjust copyright text.
Joel Dahl [Wed, 27 May 2009 18:17:58 +0000 (18:17 +0000)]
Slightly adjust copyright text.

Approved by: Hannu Savolainen <hannu@opensound.com>

15 years agoSlightly adjust copyright text.
Joel Dahl [Wed, 27 May 2009 18:16:53 +0000 (18:16 +0000)]
Slightly adjust copyright text.

Approved by: luigi

15 years agoSeparate comments from the license text.
Joel Dahl [Wed, 27 May 2009 18:13:15 +0000 (18:13 +0000)]
Separate comments from the license text.

15 years agoia64: Move MCA information retrieval to a per-CPU kthread
Rink Springer [Wed, 27 May 2009 18:12:27 +0000 (18:12 +0000)]
ia64: Move MCA information retrieval to a per-CPU kthread

Once AP's are launched, their MCA state information is stored and later obtainable using a sysctl. Since the size of the MCA state information is unknown, it will be malloc'ed as needed. However, when 'ia64_ap_startup' runs, it's not yet safe to call malloc and this may cause 'panic: blockable sleep lock (sleep mutex) 8192 @ /usr/src/sys/vm/uma_core.c'. This commit avoids this issue by scheduling a separate kthread to obtain this information, which immediately terminates afterwards.

15 years agoEliminate redundant setting of a page's valid bits and pointless clearing
Alan Cox [Wed, 27 May 2009 18:12:10 +0000 (18:12 +0000)]
Eliminate redundant setting of a page's valid bits and pointless clearing
of the same page's dirty bits.

15 years agoNote the removal of makekey(8)
Doug Barton [Wed, 27 May 2009 18:11:12 +0000 (18:11 +0000)]
Note the removal of makekey(8)

Requested by: bz

15 years agoUpdate ee(1) in the base system to version 1.5.0.
Ed Schouten [Wed, 27 May 2009 17:27:03 +0000 (17:27 +0000)]
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@

15 years agoHandle UDP RPC replies correctly on a multi-homed system, in userland RPC. Corrects...
Zachary Loafman [Wed, 27 May 2009 17:02:15 +0000 (17:02 +0000)]
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)

15 years agoCorrect handling of SYN packets that are to the left of the current window of an...
Zachary Loafman [Wed, 27 May 2009 17:02:10 +0000 (17:02 +0000)]
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)

15 years agoFix an issue when nss fallback routines are used in a multithreaded application.
Zachary Loafman [Wed, 27 May 2009 17:01:59 +0000 (17:01 +0000)]
Fix an issue when nss fallback routines are used in a multithreaded application.

Reviewed by:        bushman
Approved by:        dfr (mentor)

15 years agoRemove empty dir.
Andrew Thompson [Wed, 27 May 2009 16:44:43 +0000 (16:44 +0000)]
Remove empty dir.

15 years agoHook ubt and ubtbcmfw back up to the build.
Andrew Thompson [Wed, 27 May 2009 16:43:40 +0000 (16:43 +0000)]
Hook ubt and ubtbcmfw back up to the build.

15 years agofail(9) support:
Zachary Loafman [Wed, 27 May 2009 16:36:54 +0000 (16:36 +0000)]
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)

15 years agomove ng_ubt_var.h back to its original place
Andrew Thompson [Wed, 27 May 2009 16:34:08 +0000 (16:34 +0000)]
move ng_ubt_var.h back to its original place

15 years agomove ng_ubt.c back to its original place
Andrew Thompson [Wed, 27 May 2009 16:33:08 +0000 (16:33 +0000)]
move ng_ubt.c back to its original place

15 years agomove ubtbcmfw.c back to its original place
Andrew Thompson [Wed, 27 May 2009 16:32:05 +0000 (16:32 +0000)]
move ubtbcmfw.c back to its original place

15 years agoAdd mld(4) man page.
Bruce M Simpson [Wed, 27 May 2009 16:30:33 +0000 (16:30 +0000)]
Add mld(4) man page.

15 years agoDelete the bluetooth drivers for the old usb stack.
Andrew Thompson [Wed, 27 May 2009 16:29:56 +0000 (16:29 +0000)]
Delete the bluetooth drivers for the old usb stack.

15 years agoChange from using vm_map_delete() to vm_map_remove().
Stacey Son [Wed, 27 May 2009 16:20:46 +0000 (16:20 +0000)]
Change from using vm_map_delete() to vm_map_remove().

Approved by: gnn (mentor)
Obtained from: kib

15 years agoDelete the old USB stack. The new stack has settled in and has all the
Andrew Thompson [Wed, 27 May 2009 16:16:56 +0000 (16:16 +0000)]
Delete the old USB stack. The new stack has settled in and has all the
drivers/functionality and then some.

15 years agoExpand namei flag definitions to the full eight nybbles.
Dag-Erling Smørgrav [Wed, 27 May 2009 15:46:22 +0000 (15:46 +0000)]
Expand namei flag definitions to the full eight nybbles.

MFC after: 3 weeks

15 years agolinux_ioctl_cdrom: reduce stack usage
Andriy Gapon [Wed, 27 May 2009 15:23:12 +0000 (15:23 +0000)]
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)

15 years agoAdd a function to the experimental nfs subsystem that tests to see
Rick Macklem [Wed, 27 May 2009 15:16:56 +0000 (15:16 +0000)]
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)

15 years agoIncrement the counter outside the subshell.
Dag-Erling Smørgrav [Wed, 27 May 2009 15:15:58 +0000 (15:15 +0000)]
Increment the counter outside the subshell.

15 years agoAdd support for the arbitrary named jail parameters used by jail_set(2)
Jamie Gritton [Wed, 27 May 2009 14:30:26 +0000 (14:30 +0000)]
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)

15 years agoAdd hierarchical jails. A jail may further virtualize its environment
Jamie Gritton [Wed, 27 May 2009 14:11:23 +0000 (14:11 +0000)]
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)

15 years agoClear IFF_DRV_OACTIVE if at least one TX xen/mbuf ring slot has been freed.
Adrian Chadd [Wed, 27 May 2009 13:59:17 +0000 (13:59 +0000)]
Clear IFF_DRV_OACTIVE if at least one TX xen/mbuf ring slot has been freed.

15 years agoDon't discard packets with 'Destination Unreachable' at the beginning
Edward Tomasz Napierala [Wed, 27 May 2009 12:44:36 +0000 (12:44 +0000)]
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)

15 years agoAdd the regression test for bin/date.
Edwin Groothuis [Wed, 27 May 2009 12:31:55 +0000 (12:31 +0000)]
Add the regression test for bin/date.

15 years agoMFV of tzcode2009h revision r192887
Edwin Groothuis [Wed, 27 May 2009 12:18:39 +0000 (12:18 +0000)]
MFV of tzcode2009h revision r192887

- Clarify the license for the tzcode: public domain

MFC after: 1 month

15 years agoMFV of tzdata2009h:
Edwin Groothuis [Wed, 27 May 2009 10:02:07 +0000 (10:02 +0000)]
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

15 years agoVendor import of tzdata2009h
Edwin Groothuis [Wed, 27 May 2009 09:55:45 +0000 (09:55 +0000)]
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

15 years agoChanged to M_NOWAIT when reallocing psc_buf in padlock_sha_update(),
VANHULLEBUS Yvan [Wed, 27 May 2009 09:52:12 +0000 (09:52 +0000)]
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

15 years agoLock SPTREE before parsing it in key_spddump()
VANHULLEBUS Yvan [Wed, 27 May 2009 09:44:14 +0000 (09:44 +0000)]
Lock SPTREE before parsing it in key_spddump()

Approved by: gnn(mentor)
Obtained from: NETASQ
MFC after: 2 weeks

15 years agoConvert the MAC Framework from using rwlocks to rmlocks to stabilize
Robert Watson [Wed, 27 May 2009 09:41:58 +0000 (09:41 +0000)]
Convert the MAC Framework from using rwlocks to rmlocks to stabilize
framework registration for non-sleepable entry points.

Obtained from: TrustedBSD Project

15 years agoOnly decrease refcnt once when flushing SPD entries, to
VANHULLEBUS Yvan [Wed, 27 May 2009 09:31:50 +0000 (09:31 +0000)]
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

15 years agoEnforce that there are actually enough xenbus TX ring descriptors available
Adrian Chadd [Wed, 27 May 2009 06:04:38 +0000 (06:04 +0000)]
Enforce that there are actually enough xenbus TX ring descriptors available
before attempting to queue the packet.

15 years agoComment tidyup; comment where the next explicit check should
Adrian Chadd [Wed, 27 May 2009 05:37:04 +0000 (05:37 +0000)]
Comment tidyup; comment where the next explicit check should
appear.

15 years agoports urtw(4) for USB2. Additionally it supports a 8187B chipset weakly
Weongyo Jeong [Wed, 27 May 2009 03:57:38 +0000 (03:57 +0000)]
ports urtw(4) for USB2.  Additionally it supports a 8187B chipset weakly
that it needs more stabilization.

15 years agoEnsure that there are enough TX mbuf ring slots available before beginning
Adrian Chadd [Wed, 27 May 2009 02:49:08 +0000 (02:49 +0000)]
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

15 years agoDo the invariant check before the mbuf is dereferenced.
Adrian Chadd [Wed, 27 May 2009 01:56:37 +0000 (01:56 +0000)]
Do the invariant check before the mbuf is dereferenced.

15 years agoFlesh out some inline documentation which hopefully reflect the intended
Adrian Chadd [Wed, 27 May 2009 01:54:26 +0000 (01:54 +0000)]
Flesh out some inline documentation which hopefully reflect the intended
reality of these functions.

15 years agoAdd in some INVARIANT checks in the TX mbuf descriptor "freelist" management code.
Adrian Chadd [Wed, 27 May 2009 01:45:23 +0000 (01:45 +0000)]
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.

15 years agoAdd the OpenSolaris lockstat(1M) command. Requires the dtrace driver,
Stacey Son [Wed, 27 May 2009 01:30:23 +0000 (01:30 +0000)]
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)

15 years agoFix various cases with 3 or 4 parameters in test(1) to be POSIX compliant.
Jilles Tjoelker [Tue, 26 May 2009 22:33:10 +0000 (22:33 +0000)]
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)

15 years agoFix the experimental nfs subsystem so that it builds with the
Rick Macklem [Tue, 26 May 2009 22:21:53 +0000 (22:21 +0000)]
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)

15 years agoAdd the ksyms(4) pseudo driver. The ksyms driver allows a process to
Stacey Son [Tue, 26 May 2009 21:39:09 +0000 (21:39 +0000)]
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)

15 years agoUnifdef __NetBSD__ here, the usb stack as a whole doesnt support NetBSD and it
Andrew Thompson [Tue, 26 May 2009 21:20:42 +0000 (21:20 +0000)]
Unifdef __NetBSD__ here, the usb stack as a whole doesnt support NetBSD and it
obsfucates the code.

15 years agoMerge local changes to ee(1) into contrib space.
Ed Schouten [Tue, 26 May 2009 21:06:51 +0000 (21:06 +0000)]
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

15 years agoMove opt_apic.h closer to the "XXX: for assym.s" comment.
Dag-Erling Smørgrav [Tue, 26 May 2009 20:57:19 +0000 (20:57 +0000)]
Move opt_apic.h closer to the "XXX: for assym.s" comment.

Suggested by: jhb
MFC after: 1 week

15 years agoAdd the OpenSolaris dtrace lockstat provider. The lockstat provider
Stacey Son [Tue, 26 May 2009 20:28:22 +0000 (20:28 +0000)]
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)

15 years agoopt_apic.h is i386-only.
Dag-Erling Smørgrav [Tue, 26 May 2009 20:22:03 +0000 (20:22 +0000)]
opt_apic.h is i386-only.

MFC after: 1 week

15 years agoCopy ee 1.4.2 into the contrib directory.
Ed Schouten [Tue, 26 May 2009 20:13:17 +0000 (20:13 +0000)]
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.

15 years agoAdd a regression test for kern/21768.
Dag-Erling Smørgrav [Tue, 26 May 2009 20:13:06 +0000 (20:13 +0000)]
Add a regression test for kern/21768.

MFC after: 1 week

15 years agoCorrect the sense of a test so that this filter always waits for the full
John Baldwin [Tue, 26 May 2009 20:00:30 +0000 (20:00 +0000)]
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

15 years agoRemove unused curses replacement implementation from ee(1) sources.
Ed Schouten [Tue, 26 May 2009 19:06:56 +0000 (19:06 +0000)]
Remove unused curses replacement implementation from ee(1) sources.

15 years agoVendor import of ee 1.5.0.
Ed Schouten [Tue, 26 May 2009 19:02:26 +0000 (19:02 +0000)]
Vendor import of ee 1.5.0.

15 years agoVendor import of ee 1.4.7.
Ed Schouten [Tue, 26 May 2009 19:01:07 +0000 (19:01 +0000)]
Vendor import of ee 1.4.7.

15 years agoVendor import of ee 1.4.6.
Ed Schouten [Tue, 26 May 2009 18:59:03 +0000 (18:59 +0000)]
Vendor import of ee 1.4.6.

15 years agoVendor import of ee 1.4.5a.
Ed Schouten [Tue, 26 May 2009 18:57:09 +0000 (18:57 +0000)]
Vendor import of ee 1.4.5a.

15 years agoVendor import of ee 1.4.4.
Ed Schouten [Tue, 26 May 2009 18:55:03 +0000 (18:55 +0000)]
Vendor import of ee 1.4.4.

15 years agoVendor import of ee 1.4.3.
Ed Schouten [Tue, 26 May 2009 18:52:46 +0000 (18:52 +0000)]
Vendor import of ee 1.4.3.