]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoAuto-size kernel page tables allocation on Marvell systems.
raj [Thu, 6 Nov 2008 16:25:12 +0000 (16:25 +0000)]
Auto-size kernel page tables allocation on Marvell systems.

This allows mini dumps to fully work for these platforms.

Obtained from: Juniper Networks, Semihalf

15 years agoSupport kernel crash mini dumps on ARM architecture.
raj [Thu, 6 Nov 2008 16:20:27 +0000 (16:20 +0000)]
Support kernel crash mini dumps on ARM architecture.

Obtained from: Juniper Networks, Semihalf

15 years agoInclude if_arp.h for IFP2AC so that the netgraph parts in if.c
bz [Thu, 6 Nov 2008 15:26:09 +0000 (15:26 +0000)]
Include if_arp.h for IFP2AC so that the netgraph parts in if.c
are happy even if compiled without INET or INET6.

MFC after: 2 months

15 years agoFix a bug introduced with r182851 splitting tcp_mss() into
bz [Thu, 6 Nov 2008 13:25:59 +0000 (13:25 +0000)]
Fix a bug introduced with r182851 splitting tcp_mss() into
tcp_mss() and tcp_mss_update() so that tcp_mtudisc() could
re-use the same code.

Move the TSO logic back to tcp_mss() and out of tcp_mss_update().
We tried to avoid that initially but if were are called from
tcp_output() with EMSGSIZE, we cleared the TSO flag on the tcpcb
there, called into tcp_mtudisc() and tcp_mss_update() which
then would reenable TSO on the tcpcb based on TSO capabilities
of the interface as learnt in tcp_maxmtu/6().
So if TSO was enabled on the (possibly new) outgoing interface
it was turned back on, which lead to an endless loop between
tcp_output() and tcp_mtudisc() until we overflew the stack.

Reported by: kmacy
MFC after: 2 months (along with r182851)

15 years agoAdopt the comment for tcp_maxmtu(); we are returning a number
bz [Thu, 6 Nov 2008 12:59:00 +0000 (12:59 +0000)]
Adopt the comment for tcp_maxmtu(); we are returning a number
not a pointer. While here update the rest of the comment to
better match what we have these days.

MFC after: 2 months

15 years agoFix a bug introduced with r182851 splitting tcp_mss() into
bz [Thu, 6 Nov 2008 12:33:33 +0000 (12:33 +0000)]
Fix a bug introduced with r182851 splitting tcp_mss() into
tcp_mss() and tcp_mss_update() so that tcp_mtudisc() could
re-use the same code.

In case we return early and got a metricptr to pass the hostcache
info back to the caller we need to initialize the data to a defined
state (zero it) as tcp_hc_get() would do if there was no hit.
Without that the caller would check on random stack garbage which
could lead to undefined results.

This only affected tcp_mss() if there was no routing entry for the peer,
tcp_mtudisc() was not affected.

MFC after: 2 months (along with r182851)

15 years agoDon't depend on krpc.ko in the NFS_LEGACYRPC case.
dfr [Thu, 6 Nov 2008 11:43:49 +0000 (11:43 +0000)]
Don't depend on krpc.ko in the NFS_LEGACYRPC case.

15 years agoHide AF_INET specific ioctl handling under #ifdef INET.
bz [Thu, 6 Nov 2008 11:11:25 +0000 (11:11 +0000)]
Hide AF_INET specific ioctl handling under #ifdef INET.

MFC after: 2 months

15 years agoHide AF_INET specific ioctl handling under #ifdef INET.
bz [Thu, 6 Nov 2008 11:00:57 +0000 (11:00 +0000)]
Hide AF_INET specific ioctl handling under #ifdef INET.

MFC after: 2 months

15 years agoUnbreak NFS.
des [Thu, 6 Nov 2008 10:53:35 +0000 (10:53 +0000)]
Unbreak NFS.

Pointy hat to: dfr

15 years agoFor now our LRO code (tcp_lro.c) only supports IPv4 properly thus
bz [Thu, 6 Nov 2008 10:35:46 +0000 (10:35 +0000)]
For now our LRO code (tcp_lro.c) only supports IPv4 properly thus
only enable if INET is on.

Reviewed by: kmacy
MFC after: 2 months

15 years agoHide AF_INET specific ioctl handling under #ifdef INET.
bz [Thu, 6 Nov 2008 10:17:57 +0000 (10:17 +0000)]
Hide AF_INET specific ioctl handling under #ifdef INET.

Reviewed by: kmacy
MFC after: 2 months

15 years agoHide an unused variable in case we compile with neither INET nor INET6.
bz [Thu, 6 Nov 2008 09:41:31 +0000 (09:41 +0000)]
Hide an unused variable in case we compile with neither INET nor INET6.
NATM needs 'struct in_addr' to compile, which is a problem on its own
but include in.h for now if we have NATM but neither INET or INET6.

MFC after: 2 months

15 years agoCheck for INET not AF_INET in #ifdef. Makes it compile without INET.
bz [Thu, 6 Nov 2008 09:27:47 +0000 (09:27 +0000)]
Check for INET not AF_INET in #ifdef. Makes it compile without INET.

MFC after: 2 months

15 years agoHide an unused variable in case we compile without INET.
bz [Thu, 6 Nov 2008 09:18:29 +0000 (09:18 +0000)]
Hide an unused variable in case we compile without INET.
Include ethernet.h and if_arp.h directly so that the constants are
always defined.
Makes token compile without INET.

MFC after: 2 months

15 years agoHide an unused variable in case we compile without INET.
bz [Thu, 6 Nov 2008 09:07:56 +0000 (09:07 +0000)]
Hide an unused variable in case we compile without INET.
Include ethernet.h directly so that the constants are always defined.
Makes fddi compile without INET.

MFC after: 2 months

15 years agoIn case INET is not defined, then ANCACHE is not defined and
bz [Thu, 6 Nov 2008 08:55:46 +0000 (08:55 +0000)]
In case INET is not defined, then ANCACHE is not defined and
the sc does not have 'an_have_rssimap' variable.
Add an ANCACHE check to poperly hide the case and make an(4)
compile without INET.

MFC after: 2 months

15 years agoBe paranoid and zero out passwd
matteo [Thu, 6 Nov 2008 04:53:02 +0000 (04:53 +0000)]
Be paranoid and zero out passwd

PR: 122070
Submitted by: Steven Kreuzer <skreuzer@exit2shell.com>
Reminded by:    gnn@
MFC after: 3 days

15 years agoRemove definition of KMEM_DEBUG accidentally brought in by latest DTrace
rodrigc [Wed, 5 Nov 2008 20:32:13 +0000 (20:32 +0000)]
Remove definition of KMEM_DEBUG accidentally brought in by latest DTrace
import.

Noticed by: thompsa

15 years agoMerge latest DTrace changes from Perforce.
rodrigc [Wed, 5 Nov 2008 19:40:36 +0000 (19:40 +0000)]
Merge latest DTrace changes from Perforce.

Approved by: jb

15 years agoMerge latest DTrace changes from Perforce.
rodrigc [Wed, 5 Nov 2008 19:39:37 +0000 (19:39 +0000)]
Merge latest DTrace changes from Perforce.

Approved by: jb

15 years agoMerge latest DTrace changes from Perforce.
rodrigc [Wed, 5 Nov 2008 19:39:11 +0000 (19:39 +0000)]
Merge latest DTrace changes from Perforce.

15 years agoMerge latest DTrace changes from Perforce.
rodrigc [Wed, 5 Nov 2008 19:35:43 +0000 (19:35 +0000)]
Merge latest DTrace changes from Perforce.
Update libproc API to reflect new changes.

Approved by: jb

15 years agoMerge latest DTrace changes from Perforce.
rodrigc [Wed, 5 Nov 2008 19:35:09 +0000 (19:35 +0000)]
Merge latest DTrace changes from Perforce.

Approved by: jb

15 years agoImprove driver operation example description.
mav [Wed, 5 Nov 2008 17:12:18 +0000 (17:12 +0000)]
Improve driver operation example description.

15 years agoIf mountd doesn't specify a secflavor list for the mount, assume that -sec=sys
dfr [Wed, 5 Nov 2008 16:25:26 +0000 (16:25 +0000)]
If mountd doesn't specify a secflavor list for the mount, assume that -sec=sys
is what was wanted.

15 years agoDon't return a NULL mbuf from xdrmbuf_getall.
dfr [Wed, 5 Nov 2008 16:24:31 +0000 (16:24 +0000)]
Don't return a NULL mbuf from xdrmbuf_getall.

15 years agoutf-8
des [Wed, 5 Nov 2008 15:08:09 +0000 (15:08 +0000)]
utf-8

MFC after: 3 weeks

15 years agoMissing email address
des [Wed, 5 Nov 2008 15:07:42 +0000 (15:07 +0000)]
Missing email address

MFC after: 3 weeks

15 years agoReintroduce the snp(4) driver.
ed [Wed, 5 Nov 2008 15:04:03 +0000 (15:04 +0000)]
Reintroduce the snp(4) driver.

Because the TTY hooks interface was not finished when I imported the
MPSAFE TTY layer, I had to disconnect the snp(4) driver. This snp(4)
implementation has been sitting in my P4 branch for some time now.
Unfortunately it still doesn't use the same error handling as snp(4)
(returning codes through FIONREAD), but it should already be usable.

I'm committing this to SVN, hoping someone else could polish off its
rough edges. It's always better than having a broken driver sitting in
the tree.

15 years agoLike many other functions that handle sockaddrs, realhostname_sa() takes a
des [Wed, 5 Nov 2008 12:13:10 +0000 (12:13 +0000)]
Like many other functions that handle sockaddrs, realhostname_sa() takes a
struct sockaddr * that it casts internally to the appropriate type based on
sa_family.  However, struct sockaddr has very lax alignment requirements,
which causes the compiler to complain when you cast a struct sockaddr * to,
say, a struct sockaddr_in6 *.

I find it reasonable to assume that the pointer we received is in fact
correctly aligned.  Therefore, we can work around the compiler warnings by
casting to void * before casting to the desired type.  For readability's
sake, this is done with macros.

The same technique should prove useful in other parts of the tree that
deal with socket addresses.

MFC after: 3 weeks

15 years agoMake compile without INET.
bz [Wed, 5 Nov 2008 12:02:25 +0000 (12:02 +0000)]
Make compile without INET.

The change is modelled after the way it was done for (without) INET6.

MFC after: 2 months

15 years agoHide the IPv4 init function if the kernel is compiled without INET.
bz [Wed, 5 Nov 2008 11:54:56 +0000 (11:54 +0000)]
Hide the IPv4 init function if the kernel is compiled without INET.
It is not used in that case and would not compile.

15 years agoMake compile without INET.
bz [Wed, 5 Nov 2008 11:43:01 +0000 (11:43 +0000)]
Make compile without INET.

MFC after: 2 months

15 years agoMake tun(4) compile without INET.
bz [Wed, 5 Nov 2008 11:39:46 +0000 (11:39 +0000)]
Make tun(4) compile without INET.

MFC after: 2 months

15 years agoDo only define the variable if either INET or INET6 is defined.
bz [Wed, 5 Nov 2008 11:37:26 +0000 (11:37 +0000)]
Do only define the variable if either INET or INET6 is defined.

To prevent it from compiling without INET and INET6 we should put
an explicit #error in there like we have in other files,
but not rely on an unused variable.

MFC after: 2 months

15 years agoComment out WARNS. There are too many alignment issues in libutil.
des [Wed, 5 Nov 2008 11:06:10 +0000 (11:06 +0000)]
Comment out WARNS.  There are too many alignment issues in libutil.

15 years agoDisconnect gr_util.c from the build. It isn't documented or used anywhere
des [Wed, 5 Nov 2008 10:45:39 +0000 (10:45 +0000)]
Disconnect gr_util.c from the build.  It isn't documented or used anywhere
in the tree, and due to unsafe pointer arithmetic, it will most likely crash
on architectures with strict alignment requirements.

15 years agoAdd defaults for /etc/rc.d/gssd
keramida [Wed, 5 Nov 2008 10:20:33 +0000 (10:20 +0000)]
Add defaults for /etc/rc.d/gssd

Approved by: dfr

15 years agoTiny typo fix and remove 'example' from a "real" manpage.
keramida [Wed, 5 Nov 2008 09:42:05 +0000 (09:42 +0000)]
Tiny typo fix and remove 'example' from a "real" manpage.

15 years agoo One more s/gpt/gpart/.
maxim [Wed, 5 Nov 2008 09:28:30 +0000 (09:28 +0000)]
o One more s/gpt/gpart/.

15 years agoo Replace Xr to gpt(8) which is gone by gpart(8).
maxim [Wed, 5 Nov 2008 09:27:13 +0000 (09:27 +0000)]
o Replace Xr to gpt(8) which is gone by gpart(8).

15 years agoWhen comparing, cast to the larger size, off_t in this case.
kientzle [Wed, 5 Nov 2008 06:40:53 +0000 (06:40 +0000)]
When comparing, cast to the larger size, off_t in this case.
Once we know which one is smaller, then we cast to the smaller size.

Thanks to Xin Li (delphij@)
Pointy hat: /me

15 years agoFix compile warnings building on amd64. This is modified slightly
kientzle [Wed, 5 Nov 2008 05:26:11 +0000 (05:26 +0000)]
Fix compile warnings building on amd64.  This is modified slightly
from Jaakko's original patch: I have misgivings about the portability
of the 'z' printf modifier so opted to cast the arguments to (int)
instead.

PR: bin/128561
Submitted by: Jaakko Heinonen
MFC after: 30 days

15 years agoRevert rev 184216 and 184199, due to the way the thread_lock works,
davidxu [Wed, 5 Nov 2008 03:01:23 +0000 (03:01 +0000)]
Revert rev 184216 and 184199, due to the way the thread_lock works,
it may cause a lockup.

Noticed by: peter, jhb

15 years agoCorrect a typo that prevented my laptop from starting
delphij [Tue, 4 Nov 2008 23:03:36 +0000 (23:03 +0000)]
Correct a typo that prevented my laptop from starting
devd.

15 years agoUse shared vnode locks for auditing vnode arguments as auditing only
jhb [Tue, 4 Nov 2008 22:31:04 +0000 (22:31 +0000)]
Use shared vnode locks for auditing vnode arguments as auditing only
does a VOP_GETATTR() which does not require an exclusive lock.

Reviewed by: csjp, rwatson

15 years agoDon't lock the vnode around calls to vn_fullpath().
jhb [Tue, 4 Nov 2008 22:30:24 +0000 (22:30 +0000)]
Don't lock the vnode around calls to vn_fullpath().

Reviewed by: csjp, rwatson

15 years agoEven though the previous commit was functionally equivalent with the code it replaced...
rink [Tue, 4 Nov 2008 20:57:39 +0000 (20:57 +0000)]
Even though the previous commit was functionally equivalent with the code it replaced, it was wrong: le16toh should have been used.

Note that these changes will not make the driver work on powerpc, but it should fix at least the i386/amd64 cases.

Obtained from: //depot/projects/usb/src/sys/dev/usb2/wlan/if_zyd2.c#20
Noticed by: jeli, ed

15 years agoFix the build (on at least powerpc) by moving the htole16() from the case(x) expressi...
rink [Tue, 4 Nov 2008 19:28:19 +0000 (19:28 +0000)]
Fix the build (on at least powerpc) by moving the htole16() from the case(x) expression directly to the switch(x) itself.

Reviewed by: imp@

15 years agoDeclare functions and variables static and save a few byte. This is a
mlaier [Tue, 4 Nov 2008 19:23:48 +0000 (19:23 +0000)]
Declare functions and variables static and save a few byte.  This is a
style(9)-change, too.  Separate commit as it changes the object.

15 years agoAdd Rene Ladan, as well as my relationship towards Rene.
remko [Tue, 4 Nov 2008 19:20:19 +0000 (19:20 +0000)]
Add Rene Ladan, as well as my relationship towards Rene.

15 years agostyle(9): mostly avoiding line wrap by not indenting cases. No obj change.
mlaier [Tue, 4 Nov 2008 19:17:32 +0000 (19:17 +0000)]
style(9): mostly avoiding line wrap by not indenting cases.  No obj change.

15 years agoDon't bother calling setrunnable() and clearing the sleeping flag in
jhb [Tue, 4 Nov 2008 19:13:53 +0000 (19:13 +0000)]
Don't bother calling setrunnable() and clearing the sleeping flag in
sleepq_resume_thread() if the thread isn't asleep.

15 years agoRemove unnecessary locking around vn_fullpath(). The vnode lock for the
jhb [Tue, 4 Nov 2008 19:04:01 +0000 (19:04 +0000)]
Remove unnecessary locking around vn_fullpath().  The vnode lock for the
vnode in question does not need to be held.  All the data structures used
during the name lookup are protected by the global name cache lock.
Instead, the caller merely needs to ensure a reference is held on the
vnode (such as vhold()) to keep it from being freed.

In the case of procfs' <pid>/file entry, grab the process lock while we
gain a new reference (via vhold()) on p_textvp to fully close races with
execve(2).

For the kern.proc.vmmap sysctl handler, use a shared vnode lock around
the call to VOP_GETATTR() rather than an exclusive lock.

MFC after: 1 month

15 years agoQuiet a WITNESS warning with the dirhash sx locks by setting the DUPOK
jhb [Tue, 4 Nov 2008 18:56:12 +0000 (18:56 +0000)]
Quiet a WITNESS warning with the dirhash sx locks by setting the DUPOK
flag.  Specifically, if two threads race to create a dirhash for a
directory, then one might already have created a private dirhash
structure (and locked it) when it realizes the directory now has a
structure and tries to lock that one.

15 years agoDon't pass WANTPARENT to the pathname lookup of the mount point for a
jhb [Tue, 4 Nov 2008 18:54:44 +0000 (18:54 +0000)]
Don't pass WANTPARENT to the pathname lookup of the mount point for a
unionfs mount just so we can immediately drop the reference on the parent
directory vnode without using it.

15 years agoDon't leak a reference on the /compat/linux vnode everytime
jhb [Tue, 4 Nov 2008 18:53:33 +0000 (18:53 +0000)]
Don't leak a reference on the /compat/linux vnode everytime
the linprocfs 'mtab' file is read.

MFC after: 1 month

15 years agoFix comment typo that managed to sneak in when I copy pasted some
keramida [Tue, 4 Nov 2008 18:20:54 +0000 (18:20 +0000)]
Fix comment typo that managed to sneak in when I copy pasted some
comments & code from iostat.

15 years agoRepeat vmstat header after window.rows instead of a hardcoded 20.
keramida [Tue, 4 Nov 2008 18:02:35 +0000 (18:02 +0000)]
Repeat vmstat header after window.rows instead of a hardcoded 20.

Use ioctl() to get the window size in vmstat(8), and force a new
header to be prepended to the output every time the current window
size changes.  Change the number of lines before each header to the
current lines of the terminal when the terminal is resized, so that
the full terminal length can be used for output lines.

Inspired by: svn change 175562 (same feature for iostat)
Reviewed by: ru (who fixed some of my bugs too)
MFC after: 1 week

15 years agoInclude <sys/eventhandler.h>.
dfr [Tue, 4 Nov 2008 16:43:02 +0000 (16:43 +0000)]
Include <sys/eventhandler.h>.

15 years agoWhitespace and style fixes, build at WARNS level 6.
des [Tue, 4 Nov 2008 14:17:49 +0000 (14:17 +0000)]
Whitespace and style fixes, build at WARNS level 6.

MFC after: 3 weeks

15 years agolibutil now builds at WARNS level 6.
des [Tue, 4 Nov 2008 13:51:15 +0000 (13:51 +0000)]
libutil now builds at WARNS level 6.

MFC after: 3 weeks

15 years agoAdd missing header.
des [Tue, 4 Nov 2008 13:50:50 +0000 (13:50 +0000)]
Add missing header.

15 years agoAvoid assigning a const char * to a char *.
des [Tue, 4 Nov 2008 13:49:53 +0000 (13:49 +0000)]
Avoid assigning a const char * to a char *.

MFC after: 3 weeks

15 years agoIn UFS, when reading EA that contains ACL fails for some reason, include
trasz [Tue, 4 Nov 2008 12:30:31 +0000 (12:30 +0000)]
In UFS, when reading EA that contains ACL fails for some reason, include
inode number and filesystem name, so the administrator can fix the problem.

Approved by: rwatson (mentor)

15 years agoAdd support for Asus A8Sr notebooks.
rpaulo [Tue, 4 Nov 2008 11:52:50 +0000 (11:52 +0000)]
Add support for Asus A8Sr notebooks.

PR: 128553
Submitted by: Eygene Ryabinkin <rea-fbsd at codelabs.ru>
Reviewed by: philip
MFC after: 2 months

15 years agoRemove redundant return value tests.
ed [Tue, 4 Nov 2008 10:58:02 +0000 (10:58 +0000)]
Remove redundant return value tests.

There is no need to test whether the return value is non-zero here. Just
return the error number directly.

15 years agoadd usb2_if.m to mfiles to unbreak build of modules.
alfred [Tue, 4 Nov 2008 03:42:01 +0000 (03:42 +0000)]
add usb2_if.m to mfiles to unbreak build of modules.

15 years agoBring in USB4BSD, Hans Petter Selasky rework of the USB stack
alfred [Tue, 4 Nov 2008 02:31:03 +0000 (02:31 +0000)]
Bring in USB4BSD, Hans Petter Selasky rework of the USB stack
that includes significant features and SMP safety.

This commit includes a more or less complete rewrite of the *BSD USB
stack, including Host Controller and Device Controller drivers and
updating all existing USB drivers to use the new USB API:

1) A brief feature list:

  - A new and mutex enabled USB API.

  - Many USB drivers are now running Giant free.

  - Linux USB kernel compatibility layer.

  - New UGEN backend and libusb library, finally solves the "driver
    unloading" problem. The new BSD licensed libusb20 library is fully
    compatible with libusb-0.1.12 from sourceforge.

  - New "usbconfig" utility, for easy configuration of USB.

  - Full support for Split transactions, which means you can use your
    full speed USB audio device on a high speed USB HUB.

  - Full support for HS ISOC transactions, which makes writing drivers
    for various HS webcams possible, for example.

  - Full support for USB on embedded platforms, mostly cache flushing
    and buffer invalidating stuff.

  - Safer parsing of USB descriptors.

  - Autodetect of annoying USB install disks.

  - Support for USB device side mode, also called USB gadget mode,
    using the same API like the USB host side. In other words the new
    USB stack is symmetric with regard to host and device side.

  - Support for USB transfers like I/O vectors, means more throughput
    and less interrupts.

  - ... see the FreeBSD quarterly status reports under "USB project"

2) To enable the driver in the default kernel build:

2.a) Remove all existing USB device options from your kernel config
file.

2.b) Add the following USB device options to your kernel configuration
file:

# USB core support
device          usb2_core

# USB controller support
device usb2_controller
device usb2_controller_ehci
device usb2_controller_ohci
device usb2_controller_uhci

# USB mass storage support
device usb2_storage
device usb2_storage_mass

# USB ethernet support, requires miibus
device usb2_ethernet
device usb2_ethernet_aue
device usb2_ethernet_axe
device usb2_ethernet_cdce
device usb2_ethernet_cue
device usb2_ethernet_kue
device usb2_ethernet_rue
device usb2_ethernet_dav

# USB wireless LAN support
device usb2_wlan
device usb2_wlan_rum
device usb2_wlan_ral
device usb2_wlan_zyd

# USB serial device support
device usb2_serial
device usb2_serial_ark
device usb2_serial_bsa
device usb2_serial_bser
device usb2_serial_chcom
device usb2_serial_cycom
device usb2_serial_foma
device usb2_serial_ftdi
device usb2_serial_gensa
device usb2_serial_ipaq
device usb2_serial_lpt
device usb2_serial_mct
device usb2_serial_modem
device usb2_serial_moscom
device usb2_serial_plcom
device usb2_serial_visor
device usb2_serial_vscom

# USB bluetooth support
device usb2_bluetooth
device usb2_bluetooth_ng

# USB input device support
device usb2_input
device usb2_input_hid
device usb2_input_kbd
device usb2_input_ms

# USB sound and MIDI device support
device usb2_sound

2) To enable the driver at runtime:

2.a) Unload all existing USB modules. If USB is compiled into the
kernel then you might have to build a new kernel.

2.b) Load the "usb2_xxx.ko" modules under /boot/kernel having the same
base name like the kernel device option.

Submitted by: Hans Petter Selasky hselasky at c2i dot net
Reviewed by: imp, alfred

15 years agoReplace the non-standard disclaimer with the standard one from /COPYRIGHT
imp [Tue, 4 Nov 2008 00:20:43 +0000 (00:20 +0000)]
Replace the non-standard disclaimer with the standard one from /COPYRIGHT

Approved by: jedgar@

15 years agoUse more standardized license language
imp [Mon, 3 Nov 2008 22:43:37 +0000 (22:43 +0000)]
Use more standardized license language

Approved by: Thomas Quinot

15 years agoBugfix: Cut&paste error from the NetBSD code.
n_hibma [Mon, 3 Nov 2008 22:09:27 +0000 (22:09 +0000)]
Bugfix: Cut&paste error from the NetBSD code.

Also: Change the initialisation of the command string to a static
initialiser. Verify it against the output of umass.c when being sent a
command using 'camcontrol eject da0' to a Bulk-Only device.

This should make those devices work that need a SCSI eject command to
switch to modem mode (Novatel 950D and others).

15 years agouaa->ifaces contains pointers so set its entry to NULL not 0.
n_hibma [Mon, 3 Nov 2008 22:05:44 +0000 (22:05 +0000)]
uaa->ifaces contains pointers so set its entry to NULL not 0.

15 years agoRevert to preferring mmap(2) over sbrk(2) when mapping memory, due to
jasone [Mon, 3 Nov 2008 21:17:18 +0000 (21:17 +0000)]
Revert to preferring mmap(2) over sbrk(2) when mapping memory, due to
potential extreme contention in the kernel for multi-threaded applications
on SMP systems.

Reported by: kris

15 years agoAdjust the license statement to more closely match a standard 3-clause BSD
jhb [Mon, 3 Nov 2008 21:17:02 +0000 (21:17 +0000)]
Adjust the license statement to more closely match a standard 3-clause BSD
license.

MFC after: 3 days

15 years agoUse shared vnode locks instead of exclusive vnode locks for the access(),
jhb [Mon, 3 Nov 2008 20:31:00 +0000 (20:31 +0000)]
Use shared vnode locks instead of exclusive vnode locks for the access(),
chdir(), chroot(), eaccess(), fpathconf(), fstat(), fstatfs(), lseek()
(when figuring out the current size of the file in the SEEK_END case),
pathconf(), readlink(), and statfs() system calls.

Submitted by: ups (mostly)
Tested by: pho
MFC after: 1 month

15 years agoRemove the mnt_holdcnt and mnt_holdcntwaiters because they are useless.
attilio [Mon, 3 Nov 2008 20:00:35 +0000 (20:00 +0000)]
Remove the mnt_holdcnt and mnt_holdcntwaiters because they are useless.
Really, the concept of holdcnt in the struct mount is rappresented by
the mnt_ref (which prevents the type-stable structure from being
"recycled) handled through vfs_ref() and vfs_rel().
On this optic, switch the holdcnt acquisition into an emulated vfs_ref()
(and subsequent release into vfs_rel()).

Discussed with: kib
Tested by: pho

15 years agoRemove some unused and broken code that attempted to not invoke locking
jhb [Mon, 3 Nov 2008 19:57:40 +0000 (19:57 +0000)]
Remove some unused and broken code that attempted to not invoke locking
asserts on NULL vnode pointers.  All the vnode assertion routines already
check for NULL vnode pointers.

15 years agoA few style nits.
jhb [Mon, 3 Nov 2008 19:33:20 +0000 (19:33 +0000)]
A few style nits.

15 years agoRemove " + 1".
mav [Mon, 3 Nov 2008 18:28:12 +0000 (18:28 +0000)]
Remove " + 1".
Thread ID can't be zero anyway while increment may give owerflow.

15 years agoFix few missed accmode changes in coda.
trasz [Mon, 3 Nov 2008 16:36:23 +0000 (16:36 +0000)]
Fix few missed accmode changes in coda.

Approved by: rwatson (mentor)

15 years agoNit: Add a few leading zeros to make this match other mask constants
imp [Mon, 3 Nov 2008 15:38:45 +0000 (15:38 +0000)]
Nit: Add a few leading zeros to make this match other mask constants
in this file.  Also to make sure that I got other ASI constants right.

15 years agoImplement device cloning for /dev/nsmb, the netsmb control pseudo-device.
rwatson [Mon, 3 Nov 2008 14:23:15 +0000 (14:23 +0000)]
Implement device cloning for /dev/nsmb, the netsmb control pseudo-device.
The smb library in userspace already knows how to deal with this type of
cloning.

This also corrects a leak in which the netsmb kernel module could not be
unloaded if device nodes had been stat'd but not open'd.

Discussed with: kib

15 years agoRegen.
dfr [Mon, 3 Nov 2008 10:39:35 +0000 (10:39 +0000)]
Regen.

15 years agoImplement support for RPCSEC_GSS authentication to both the NFS client
dfr [Mon, 3 Nov 2008 10:38:00 +0000 (10:38 +0000)]
Implement support for RPCSEC_GSS authentication to both the NFS client
and server. This replaces the RPC implementation of the NFS client and
server with the newer RPC implementation originally developed
(actually ported from the userland sunrpc code) to support the NFS
Lock Manager.  I have tested this code extensively and I believe it is
stable and that performance is at least equal to the legacy RPC
implementation.

The NFS code currently contains support for both the new RPC
implementation and the older legacy implementation inherited from the
original NFS codebase. The default is to use the new implementation -
add the NFS_LEGACYRPC option to fall back to the old code. When I
merge this support back to RELENG_7, I will probably change this so
that users have to 'opt in' to get the new code.

To use RPCSEC_GSS on either client or server, you must build a kernel
which includes the KGSSAPI option and the crypto device. On the
userland side, you must build at least a new libc, mountd, mount_nfs
and gssd. You must install new versions of /etc/rc.d/gssd and
/etc/rc.d/nfsd and add 'gssd_enable=YES' to /etc/rc.conf.

As long as gssd is running, you should be able to mount an NFS
filesystem from a server that requires RPCSEC_GSS authentication. The
mount itself can happen without any kerberos credentials but all
access to the filesystem will be denied unless the accessing user has
a valid ticket file in the standard place (/tmp/krb5cc_<uid>). There
is currently no support for situations where the ticket file is in a
different place, such as when the user logged in via SSH and has
delegated credentials from that login. This restriction is also
present in Solaris and Linux. In theory, we could improve this in
future, possibly using Brooks Davis' implementation of variant
symlinks.

Supporting RPCSEC_GSS on a server is nearly as simple. You must create
service creds for the server in the form 'nfs/<fqdn>@<REALM>' and
install them in /etc/krb5.keytab. The standard heimdal utility ktutil
makes this fairly easy. After the service creds have been created, you
can add a '-sec=krb5' option to /etc/exports and restart both mountd
and nfsd.

The only other difference an administrator should notice is that nfsd
doesn't fork to create service threads any more. In normal operation,
there will be two nfsd processes, one in userland waiting for TCP
connections and one in the kernel handling requests. The latter
process will create as many kthreads as required - these should be
visible via 'top -H'. The code has some support for varying the number
of service threads according to load but initially at least, nfsd uses
a fixed number of threads according to the value supplied to its '-n'
option.

Sponsored by: Isilon Systems
MFC after: 1 month

15 years agoAdd the ffsll and flsll functions. These are ffs and fls operating
kib [Mon, 3 Nov 2008 10:22:19 +0000 (10:22 +0000)]
Add the ffsll and flsll functions. These are ffs and fls operating
on long long arguments.

Reviewed by: bde (previous version, that included asm implementation
for all ffs and fls functions on i386 and amd64)
MFC after: 2 weeks

15 years agoFix style.
kib [Mon, 3 Nov 2008 10:14:47 +0000 (10:14 +0000)]
Fix style.

15 years agoTurns out this isn't even used at all... The bogon that I was tracing was
imp [Mon, 3 Nov 2008 06:37:59 +0000 (06:37 +0000)]
Turns out this isn't even used at all...  The bogon that I was tracing was
in code from my p4 tree, not -current.  Delete it here.

15 years agoUse child (the card) in preference to cbdev (the bridge) when
imp [Mon, 3 Nov 2008 06:06:22 +0000 (06:06 +0000)]
Use child (the card) in preference to cbdev (the bridge) when
allocating resources to read the CIS.  I'm not sure when this changed,
but it is totally wrong.  Also, add a minor improvement to the
debugging.

This should help everybody trying to run dumpcis on atheros wireless
card as well.

MFC after: 2 days

15 years agoWe can't mask out the higher order bits and have the size come out
imp [Mon, 3 Nov 2008 05:52:43 +0000 (05:52 +0000)]
We can't mask out the higher order bits and have the size come out
right...  Good thing the size was ignored...

Where this macro is used, there's no reason to do it anyway.  There
seems to have been some old-time confusion between the CIS pointer
definition, and the BAR definitions at the base of this bug.

15 years agoSync with OpenBSD's dirname(3) - license change, avoid strcpy() over
delphij [Mon, 3 Nov 2008 05:19:45 +0000 (05:19 +0000)]
Sync with OpenBSD's dirname(3) - license change, avoid strcpy() over
string constant, use memcpy() instead of strncpy() and improve code
readibility.  No functional change.

15 years agoAdd amr_cam module directory that was missed in the previous commit.
scottl [Mon, 3 Nov 2008 04:13:27 +0000 (04:13 +0000)]
Add amr_cam module directory that was missed in the previous commit.

15 years agoMove the CAM passthrough code into a true module so that it doesn't have to be
scottl [Mon, 3 Nov 2008 00:53:54 +0000 (00:53 +0000)]
Move the CAM passthrough code into a true module so that it doesn't have to be
compiled into the main AMR driver.  It's code that is nice to have but not
required for normal operation, and it is reported to cause problems for some
people.

15 years agoCatch up with netsmb locking: explicit thread arguments no longer required.
rwatson [Sun, 2 Nov 2008 23:20:27 +0000 (23:20 +0000)]
Catch up with netsmb locking: explicit thread arguments no longer required.

15 years agoCatch up internal locking routines in netsmb with lockmgr changes --
rwatson [Sun, 2 Nov 2008 23:15:32 +0000 (23:15 +0000)]
Catch up internal locking routines in netsmb with lockmgr changes --
explicit thread arguments are no longer required in many places.

15 years agoIncrease the initial sbuf size for CPU topology dump to something more
ivoras [Sun, 2 Nov 2008 23:11:20 +0000 (23:11 +0000)]
Increase the initial sbuf size for CPU topology dump to something more
usable for newer CPUs. The new value allows 2 x quad core configuration
dumps to fit within the initial buffer without reallocations.

Approved by: gnn (mentor) (older version)
Pointed out by: rdivacky

15 years agosmb_vc_put() requires that the passed vcp be locked, so lock it before
rwatson [Sun, 2 Nov 2008 20:22:24 +0000 (20:22 +0000)]
smb_vc_put() requires that the passed vcp be locked, so lock it before
dropping the connection when the requested service isn't available, or
we may try to release a lock that isn't locked.

This prevents an assertion failure when trying to mount a non-present
share using smbfs with INVARIANTS; a lock order reversal warning that
immediately follows is not yet fixed.

Reported by: attilio
MFC after: 3 days

15 years agoWhen encoding an smb name, truncate one byte earlier in order than we did
rwatson [Sun, 2 Nov 2008 19:48:15 +0000 (19:48 +0000)]
When encoding an smb name, truncate one byte earlier in order than we did
previously in order to ensure it fit properly in the bufer when encoded.
This prevents a debugging printf from firing if a source or destination
host name for an smb mount exceeds 15 characters.

MFC after: 3 days
Obtained from: Apple, Inc.

15 years agoRevert r184516. Option RL_TWISTER_ENABLE is no more after it became
kib [Sun, 2 Nov 2008 19:40:24 +0000 (19:40 +0000)]
Revert r184516. Option RL_TWISTER_ENABLE is no more after it became
loader tunable.

Pointy hat to: me