summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert to preferring mmap(2) over sbrk(2) when mapping memory, due tojasone2008-11-032-13/+18
| | | | | | | potential extreme contention in the kernel for multi-threaded applications on SMP systems. Reported by: kris
* Adjust the license statement to more closely match a standard 3-clause BSDjhb2008-11-031-12/+12
| | | | | | license. MFC after: 3 days
* Use shared vnode locks instead of exclusive vnode locks for the access(),jhb2008-11-033-16/+16
| | | | | | | | | | 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
* Remove the mnt_holdcnt and mnt_holdcntwaiters because they are useless.attilio2008-11-033-22/+3
| | | | | | | | | | | 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
* Remove some unused and broken code that attempted to not invoke lockingjhb2008-11-031-6/+0
| | | | | asserts on NULL vnode pointers. All the vnode assertion routines already check for NULL vnode pointers.
* A few style nits.jhb2008-11-031-1/+2
|
* Remove " + 1".mav2008-11-031-1/+1
| | | | Thread ID can't be zero anyway while increment may give owerflow.
* Fix few missed accmode changes in coda.trasz2008-11-033-5/+7
| | | | Approved by: rwatson (mentor)
* Nit: Add a few leading zeros to make this match other mask constantsimp2008-11-031-1/+1
| | | | in this file. Also to make sure that I got other ASI constants right.
* Implement device cloning for /dev/nsmb, the netsmb control pseudo-device.rwatson2008-11-031-7/+19
| | | | | | | | | | 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
* Regen.dfr2008-11-0310-12/+40
|
* Implement support for RPCSEC_GSS authentication to both the NFS clientdfr2008-11-03121-991/+18973
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add the ffsll and flsll functions. These are ffs and fls operatingkib2008-11-036-8/+124
| | | | | | | | 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
* Fix style.kib2008-11-031-1/+1
|
* Turns out this isn't even used at all... The bogon that I was tracing wasimp2008-11-031-6/+0
| | | | in code from my p4 tree, not -current. Delete it here.
* Use child (the card) in preference to cbdev (the bridge) whenimp2008-11-031-2/+4
| | | | | | | | | | | 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
* We can't mask out the higher order bits and have the size come outimp2008-11-031-1/+1
| | | | | | | | 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.
* Sync with OpenBSD's dirname(3) - license change, avoid strcpy() overdelphij2008-11-032-68/+46
| | | | | string constant, use memcpy() instead of strncpy() and improve code readibility. No functional change.
* Add amr_cam module directory that was missed in the previous commit.scottl2008-11-032-3/+9
|
* Move the CAM passthrough code into a true module so that it doesn't have to bescottl2008-11-037-105/+65
| | | | | | 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.
* Catch up with netsmb locking: explicit thread arguments no longer required.rwatson2008-11-022-6/+6
|
* Catch up internal locking routines in netsmb with lockmgr changes --rwatson2008-11-022-57/+54
| | | | explicit thread arguments are no longer required in many places.
* Increase the initial sbuf size for CPU topology dump to something moreivoras2008-11-021-1/+1
| | | | | | | | 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
* smb_vc_put() requires that the passed vcp be locked, so lock it beforerwatson2008-11-021-1/+3
| | | | | | | | | | | | 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
* When encoding an smb name, truncate one byte earlier in order than we didrwatson2008-11-021-1/+1
| | | | | | | | | 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.
* Revert r184516. Option RL_TWISTER_ENABLE is no more after it becamekib2008-11-021-1/+0
| | | | | | loader tunable. Pointy hat to: me
* Make the touch pad on my PowerBook G4 12" a little more usable.ed2008-11-021-7/+18
| | | | | | | | | | | | | | | | | | | | | | For an unknown reason the touch pad of my PowerBook generates button 5 events when you operate it. This causes the adb_mouse code to convert them to button 2 events, which is not what we want. Add a new flag, AMS_TOUCHPAD, which is used to distinguish the touch pad. When set, don't convert button events of unknown buttons to the last button. There are still three problems left with respect to user input: - The mouse button events are not properly processed when the touch pad isn't touched. - The arrow keys on the keyboard don't work inside X11. - The power button isn't handled by the kernel, similar to the ACPI power button on i386/amd64. Approved by: nwhitehorn
* MFp4:imp2008-11-025-6/+34
| | | | | | Make the ISA bus keep track of more PNP details. Plus a minor style fix while I'm here. More could be done here, but except for some SBCs that don't have ACPI, there's limited value to anybody in doing so.
* Make the no driver stuff an ifdef.imp2008-11-021-4/+9
|
* Move mn over. One of the last stragglers in sys/pci. There's noimp2008-11-022-1/+1
| | | | module built for this hardware, so no changes needed.
* Document a few sysctls in the NFS client and server code.trhodes2008-11-026-24/+43
| | | | | | Minor style(9) where applicable. Approved by: alfred (slightly older version)
* Document dev.rl.%unit.twister_enable sysctl/tunable.imp2008-11-021-1/+7
| | | | Submitted by: Kostik Belousov
* Make RL_TWISTER_ENABLE a tunable/sysctl. Eliminate it as an option.imp2008-11-024-30/+34
| | | | | | Fix module build. Submitted by: Kostik Belousov
* As soon as we have several threads per process now, it is not correct tomav2008-11-021-5/+1
| | | | | | | | use process ID as ACPI thread ID. Concurrent requests with equal thread IDs broke ACPI mutexes operation causing unpredictable errors including AE_AML_MUTEX_NOT_ACQUIRED that I have seen. Use kernel thread ID instead of process ID for ACPI thread.
* Remove the call to getinoquota() from ntfs_access. How did it get there?!trasz2008-11-021-7/+0
| | | | Approved by: rwatson (mentor)
* Reflect changes for the vfs_busy() prototype.attilio2008-11-021-18/+7
|
* Bump __FreeBSD_version in order to reflect vfs_busy() prototype changingattilio2008-11-021-1/+1
| | | | and its flags (MBF_NOWAIT, MBF_MNTLSTLOCK) introduction.
* Improve VFS locking:attilio2008-11-0212-73/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Implement real draining for vfs consumers by not relying on the mnt_lock and using instead a refcount in order to keep track of lock requesters. - Due to the change above, remove the mnt_lock lockmgr because it is now useless. - Due to the change above, vfs_busy() is no more linked to a lockmgr. Change so its KPI by removing the interlock argument and defining 2 new flags for it: MBF_NOWAIT which basically replaces the LK_NOWAIT of the old version (which was unlinked from the lockmgr alredy) and MBF_MNTLSTLOCK which provides the ability to drop the mountlist_mtx once the mnt interlock is held (ability still desired by most consumers). - The stub used into vfs_mount_destroy(), that allows to override the mnt_ref if running for more than 3 seconds, make it totally useless. Remove it as it was thought to work into older versions. If a problem of "refcount held never going away" should appear, we will need to fix properly instead than trust on such hackish solution. - Fix a bug where returning (with an error) from dounmount() was still leaving the MNTK_MWAIT flag on even if it the waiters were actually woken up. Just a place in vfs_mount_destroy() is left because it is going to recycle the structure in any case, so it doesn't matter. - Remove the markercnt refcount as it is useless. This patch modifies VFS ABI and breaks KPI for vfs_busy() so manpages and __FreeBSD_version will be modified accordingly. Discussed with: kib Tested by: pho
* Add support for reading Tivo Series 1 partitioning. This likely needsimp2008-11-021-12/+52
| | | | | | | | | a little refinement, but is good enough to commit as is. # Should look to see if I should move swab(3) into the kernel or just # provide the unoptimized routine here. Reviewed by: marcel@
* Merge some minor deltas from p4 newcard tree:imp2008-11-021-0/+2
| | | | | | (1) Belkin F5D7050_V4000 was also sold as 'Ativa 802.11g wireless card' (document) (2) Add HP Office Jet 4215
* Remove cardbus attachment. It likely was a cut-n-paste left over fromimp2008-11-021-1/+0
| | | | | | | whatever template was used to create this driver. It is not necessary, and wouldn't work anyway since (a) this device will never be in a cardbus tin-can and (b) the driver isn't even PCI, but instead a built-in NIC on the IDT RC32434 on its internal bus.
* Add missing END() macros, as per rev 184547 for amd64. The lack of thesepeter2008-11-0243-4/+59
| | | | is mostly harmless, but it does upset some of valgrind's functionality.
* We've been lax about matching END() macros in asm code for some time. Thispeter2008-11-0227-4/+46
| | | | | | | is used to set the ELF size attribute for functions. It isn't normally critical but some things can make use of it (gdb for stack traces). Valgrind needs it so I'm adding it in. The problem is present on all branches and on both i386 and amd64.
* Various comment nits, and typos.keramida2008-11-021-32/+32
|
* Update introductory comment for audit pipes.rwatson2008-11-021-4/+4
| | | | | MFC after: 2 months Sponsored by: Apple, Inc.
* Remove stale comment about filtering in audit pipe ioctl routine: we dorwatson2008-11-021-3/+0
| | | | | | | | support filtering now, although we may want to make it more interesting in the future. MFC after: 2 months Sponsored by: Apple, Inc.
* Add comment for per-pipe stats.rwatson2008-11-011-0/+3
| | | | | MFC after: 2 months Sponsored by: Apple, Inc.
* We only allow a partial read of the first record in an audit piperwatson2008-11-011-15/+28
| | | | | | | | | | | | | | | | | | record queue, so move the offset field from the per-record audit_pipe_entry structure to the audit_pipe structure. Now that we support reading more than one record at a time, add a new summary field to audit_pipe, ap_qbyteslen, which tracks the total number of bytes present in a pipe, and return that (minus the current offset) via FIONREAD and kqueue's data variable for the pending byte count rather than the number of bytes remaining in only the first record. Add a number of asserts to confirm that these counts and offsets following the expected rules. MFC after: 2 months Sponsored by: Apple, Inc.
* Allow a single read(2) system call on an audit pipe to retrieve data fromrwatson2008-11-011-40/+32
| | | | | | | more than one audit record at a time in order to improve efficiency. MFC after: 2 months Sponsored by: Apple, Inc.
* Correct the documented declaration of the archive_write_callback tokientzle2008-11-011-2/+2
| | | | | | | | match the code. PR: docs/128089 Submitted by: Mel MFC after: 3 days
OpenPOWER on IntegriCloud