summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* After much delay and anticipation, welcome RAIDFrame into the FreeBSDscottl2002-10-20141-3/+42449
| | | | | | world. This should be considered highly experimental. Approved-by: re
* - Lock page queue accesses in pmap_release().alc2002-10-201-1/+3
|
* Remove the special casing for IP addresses that are within the IVTmarcel2002-10-201-22/+2
| | | | | or the do_syscall() function. We have unwind directives to stop the unwinder.
* Define IVT_ENTRY and IVT_END as special versions of ENTRY and ENDmarcel2002-10-202-300/+320
| | | | | | | | | | | | for defining vectors. As a result, each vector will be a global function with unwind directives to notify the unwinder that we're in an interrupt handler. In the debugger this will show up something like: Debugger(0xe000000000a211d8, 0xe000000000748960) at Debugger+0x31 panic(0xe000000000a36858, 0xe0000000021d32d0, 0xe000000000ae42e8, ... trap(0x14, 0x100000, 0xe0000000021d32d0, 0x0, 0xa0000000002095f0, ... ivt_Data_TLB(0x14, 0x100000, 0xe0000000021d32d0) at ivt_Data_TLB+0x1f0
* If MAC_MAX_POLICIES isn't defined, don't try to define it, just let therwatson2002-10-209-27/+9
| | | | | | | | compile fail. MAC_MAX_POLICIES should always be defined, or we have bigger problems at hand. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Stake a claim on 418 (__xstat), 419 (__xfstat), 420 (__xlstat)peter2002-10-194-0/+12
|
* Put back NORMAL_C_NOWERROR, it was actually used.mux2002-10-191-0/+1
| | | | Pointy hat to: mux
* umap_sync is empty and is identical to vfs_stdsync. Remove it andkan2002-10-191-16/+1
| | | | | | use generic function instead. Approved by: obrien
* style(9)kan2002-10-191-4/+7
| | | | Approved by: obrien
* Grab 416/417 real estate before I get burned while testing again.peter2002-10-194-0/+8
| | | | | | This is for the not-quite-ready signal/fpu abi stuff. It may not see the light of day, but I'm certainly not going to be able to validate it when getting shot in the foot due to syscall number conflicts.
* Whitespace fixes per style(9)kan2002-10-191-11/+10
| | | | Approved by: obrien
* Set the NOMACCHECK flag for namei()'s generated by the NFS server code.rwatson2002-10-191-0/+1
| | | | | | | We currently don't enforce protections on NFS-originated VOP's. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Add a new 'NOMACCHECK' flag to namei() NDINIT flags, which permits therwatson2002-10-192-7/+13
| | | | | | | | | | | | | | | | | | caller to indicate that MAC checks are not required for the lookup. Similar to IO_NOMACCHECK for vn_rdwr(), this indicates that the caller has already performed all required protections and that this is an internally generated operation. This will be used by the NFS server code, as we don't currently enforce MAC protections against requests delivered via NFS. While here, add NOCROSSMOUNT to PARAMASK; apparently this was used at one point for name lookup flag checking, but isn't any longer or it would have triggered from the NFS server code passing it to indicate that mountpoints shouldn't be crossed in lookups. Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Regen from addition of execve_mac placeholder.rwatson2002-10-195-5/+5
|
* Implement the CDROMREADAUDIO ioctl.marcel2002-10-191-1/+37
|
* Add a placeholder for the execve_mac() system call, similar to SELinux'srwatson2002-10-194-0/+4
| | | | | | | | | | | | execve_secure() system call, which permits a process to pass in a label for a label change during exec. This permits SELinux to change the label for the resulting exec without a race following a manual label change on the process. Because this interface uses our general purpose MAC label abstraction, we call it execve_mac(), and wrap our port of SELinux's execve_secure() around it with appropriate sid mappings. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Drop in the MAC check for file creation as part of open().rwatson2002-10-191-3/+11
| | | | | | Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Make sure to clear the 'registered' flag for MAC policies when theyrwatson2002-10-199-0/+9
| | | | | | | | | unregister. Under some obscure (perhaps demented) circumstances, this can result in a panic if a policy is unregistered, and then someone foolishly unregisters it again. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Hook up most of the MAC entry points relating to file/directory/noderwatson2002-10-192-4/+136
| | | | | | | | | | | | | | | | | | | creation, deletion, and rename. There are one or two other stray cases I'll catch in follow-up commits (such as unix domain socket creation); this permits MAC policy modules to limit the ability to perform these operations based on existing UNIX credential / vnode attributes, extended attributes, and security labels. In the rename case using MAC, we now have to lock the from directory and file vnodes for the MAC check, but this is done only in the MAC case, and the locks are immediately released so that the remainder of the rename implementation remains the same. Because the create check takes a vattr to know object type information, we now initialize additional fields in the VATTR passed to VOP_SYMLINK() in the MAC case. Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Remove the _ia64_unwind_start and _ia64_unwind_end symbols. We nowmarcel2002-10-191-2/+0
| | | | find the unwind table through the ELF program headers.
* Update the unwind information when modules are loaded and unloadedmarcel2002-10-194-52/+85
| | | | | | | | by using the linker hooks. Since these hooks are called for the kernel as well, we don't need to deal with that with a special SYSINIT. The initialization implicitly performed on the first update of the unwind information is made explicit with a SYSINIT. We now don't need the _ia64_unwind_{start|end} symbols.
* Add two hooks to signal module load and module unload to MD code.marcel2002-10-199-0/+106
| | | | | | | | | | | | The primary reason for this is to allow MD code to process machine specific attributes, segments or sections in the ELF file and update machine specific state accordingly. An immediate use of this is in the ia64 port where unwind information is updated to allow debugging and tracing in/across modules. Note that this commit does not add the functionality to the ia64 port. See revision 1.9 of ia64/ia64/elf_machdep.c. Validated on: alpha, i386, ia64
* Reduce code duplication by moving the common actions inmarcel2002-10-192-116/+112
| | | | | | | | | link_elf_init(), link_elf_link_preload_finish() and link_elf_load_file() to link_elf_link_common_finish(). Since link_elf_init() did initializations as a side-effect of doing the common actions, keep the initialization in that function. Consequently, link_elf_add_gdb() is now also called to insert the very first link_map() (ie the kernel).
* Non-functional change in preparation of the next commit:marcel2002-10-192-82/+72
| | | | | | Move link_elf_add_gdb(), link_elf_delete_gdb() and link_elf_error() near the top of the file. The *_gdb() functions are moved inside the #ifdef DDB already present there.
* Complete the page queues locking needed for the page-based copy-alc2002-10-192-3/+9
| | | | | | | | | on-write (COW) mechanism. (This mechanism is used by the zero-copy TCP/IP implementation.) - Extend the scope of the page queues lock in vm_fault() to cover vm_page_cowfault(). - Modify vm_page_cowfault() to release the page queues lock if it sleeps.
* Fix a missing initialization.phk2002-10-191-0/+1
|
* Add Geom Based Disk Encryption to the tree.phk2002-10-198-0/+1836
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an encryption module designed for to secure denial of access to the contents of "cold disks" with or without destruction activation. Major features: * Based on AES, MD5 and ARC4 algorithms. * Four cryptographic barriers: 1) Pass-phrase encrypts the master key. 2) Pass-phrase + Lock data locates master key. 3) 128 bit key derived from 2048 bit master key protects sector key. 3) 128 bit random single-use sector keys protect data payload. * Up to four different changeable pass-phrases. * Blackening feature for provable destruction of master key material. * Isotropic disk contents offers no information about sector contents. * Configurable destination sector range allows steganographic deployment. This commit adds the kernel part, separate commits will follow for the userland utility and documentation. This software was developed for the FreeBSD Project by Poul-Henning Kamp and NAI Labs, the Security Research Division of Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS research program. Many thanks to Robert Watson, CBOSS Principal Investigator for making this possible. Sponsored by: DARPA & NAI Labs.
* Permits UFS ACLs to be used with the GENERIC kernel. Due to recentrwatson2002-10-197-0/+7
| | | | | | | | | | | | | ACL configuration changes, this shouldn't result in different code paths for file systems not explicitly configured for ACLs by the system administrator. For UFS1, administrators must still recompile their kernel to add support for extended attributes; for UFS2, it's sufficient to enable ACLs using tunefs or at mount-time (tunefs preferred for reliability reasons). UFS2, for a variety of reasons, including performance and reliability, is the preferred file system for use with ACLs. Approved by: re
* - Remove ${NORMAL_C_NOWERROR}, it is not used anymore. To buildmux2002-10-191-3/+2
| | | | | | | | | | without -Werror, we do "make WERROR=", which doesn't need this variable. - Use ${.IMPSRC} instead of $< in ${NORMAL_M} for consistency with the rest of the file. - Add ${WERROR} for the ${NORMAL_M} case. Tested on: i386, sparc64
* Clarify that the UFS1 extended attribute configuration steps do not applyrwatson2002-10-191-2/+2
| | | | | | | to UFS2 file systems. Submitted by: jedgar Obtained from: TrustedBSD Project
* Explicitely specify an alignment for struct pcb. While all regular pcb'stmm2002-10-191-1/+1
| | | | | are positioned and aligned by md code, dumppcb is just a static variable and requires this.
* The argument to the DIOCGMEDIASIZE ioctl() is an off_t, not an u_int.tmm2002-10-191-1/+1
| | | | Reviewed by: phk
* Style(9). Make some function declarations consistent with the rest,markm2002-10-193-24/+10
| | | | and remove some nearby extraneous {}'s.
* Several malloc() calls were passing the M_DONTWAIT flagmux2002-10-191-3/+3
| | | | | | which is an mbuf allocation flag. Use the correct M_NOWAIT malloc() flag. Fortunately, both were defined to 1, so this commit is a no-op.
* In link_elf_load_file(), when SPARSE_MAPPING is defined and wemarcel2002-10-192-2/+0
| | | | | | | cannot allocate ef->object, we freed ef before bailing out with an error. This is wrong because ef=lf and when we have an error and lf is non-NULL (which holds if we try to alloc ef->object), we free lf and thus ef as part of the bailing-out.
* Make this compile when DDB is not defined by conditionally compilingmarcel2002-10-191-1/+6
| | | | all references to ksym_start and ksym_end.
* Make the unwind functions standard and not optional on ddb. Theymarcel2002-10-191-1/+1
| | | | will eventually be used for ktrace(2) too.
* Don't leak memory in semop(2). (Fix a bug I introduced in rev 1.55.)alfred2002-10-191-1/+2
| | | | Detective work by: jake
* Pass the right number of tlb slots to the kernel. The allocation schemetmm2002-10-181-10/+4
| | | | | | | was changed in r1.4, but I neglected to update most of the code in metadata.c. Pointy hat to: tmm
* Fix a file-rewrite performance case for UFS[2]. When rewriting portionsdillon2002-10-183-7/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of a file in chunks that are less then the filesystem block size, if the data is not already cached the system will perform a read-before-write. The problem is that it does this on a block-by-block basis, breaking up the I/Os and making clustering impossible for the writes. Programs such as INN using cyclic file buffers suffer greatly. This problem is only going to get worse as we use larger and larger filesystem block sizes. The solution is to extend the sequential heuristic so UFS[2] can perform a far larger read and readahead when dealing with this case. (note: maximum disk write bandwidth is 27MB/sec thru filesystem) (note: filesystem blocksize in test is 8K (1K frag)) dd if=/dev/zero of=test.dat bs=1k count=2m conv=notrunc Before: (note half of these are reads) tty da0 da1 acd0 cpu tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id 0 76 14.21 598 8.30 0.00 0 0.00 0.00 0 0.00 0 0 7 1 92 0 76 14.09 813 11.19 0.00 0 0.00 0.00 0 0.00 0 0 9 5 86 0 76 14.28 821 11.45 0.00 0 0.00 0.00 0 0.00 0 0 8 1 91 After: (note half of these are reads) tty da0 da1 acd0 cpu tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id 0 76 63.62 434 26.99 0.00 0 0.00 0.00 0 0.00 0 0 18 1 80 0 76 63.58 424 26.30 0.00 0 0.00 0.00 0 0.00 0 0 17 2 82 0 76 63.82 438 27.32 0.00 0 0.00 0.00 0 0.00 1 0 19 2 79 Reviewed by: mckusick Approved by: re X-MFC after: immediately (was heavily tested in -stable for 4 months)
* * Add CDRIOC{READ,WRITE}SPEED ioctls to cd(4). Units are in KB/sec.njl2002-10-184-2/+61
| | | | | | | | | | | | | | | * Change atapi-cd ioctls to use the same units. * Change burncd, cdcontrol to convert CDROM speed to KB/sec before calling the ioctl. Add a "max" speed option for their command lines. This change does not break ABI but does change the units passed through the ioctl so 3rd party software that uses cdrio.h will have to convert (most likely by multiplying CDROM speed by 177 to get KB/s). PR: kern/36845 Submitted by: Philipp Mergenthaler <p@i609a.hadiko.de> (CAM ioctls) Reviewed by: sos, ken MFC after: 1 month
* MFufs 1.33:bde2002-10-182-2/+2
| | | | | | | | | | | | | In the 'found' case for ext2_lookup() the underlying bp's data was being accessed after the bp had been releaed. A simple move of the brelse() solves the problem. The PR reports that this caused panics running the GDB testsuite unless NO_GEOM is configured. PR: 44060 Reported by: Mark Kettenis <kettenis@chello.nl> MFC after: 3 days
* (1) added LSI Logic copyright, and legal line 3 in license, and stringemoore2002-10-1811-72/+216
| | | | | | | | | | | | | | | | | | | | | changes for "LSILogic" (2) enabled non-disk support through CAM interface (3) HA_INQ (a) enabled tagged queuing (b) disable reset during driver loading (b) renamed BSDi string to LSI (4) disabled detecting disk devices during SCSI INQUIRY (5) changed dcdb single element sglist to send one entire buffer chunk (6) nsgelem not set in sglist (7) ap_data_transfer_length not set for dcdb (8) changed "struct thread" to "d_thread_t" for compatibliity { xxx_open, xxx_close, xxx_ioctl } (9) miscellaneous compatiblity fixes (10) bug fix for 0x0409/0x1000 card (11) added compiling amr_cam.c in sys/conf/files (12) added compiling amr_cam.c in sys/modules/amr/Makefile Reviewed by:ps MFC after:1 week 1 week
* Update extended attribute readme file to note that no special configurationrwatson2002-10-181-1/+6
| | | | | | | | is required to use EAs with UFS2, and that UFS2 is recommend for EA use for a variety of reasons. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Update instructions for ACLs given recent tunefs, mount changes. Alsorwatson2002-10-181-5/+33
| | | | | | | | note that UFS2 doesn't require explicit extended attribute configuration, and is recommends for this and other reasons if you plan to use ACLs. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Use 'size_t' instead of 'int' for the result of sizeof().rwatson2002-10-181-1/+1
|
* Do not lock the process when calling fdfree() (this would have recursed onjhb2002-10-181-4/+0
| | | | | a non-recursive lock, the proc lock, before) since we don't need it to change p_fd.
* fdfree() clears p_fd for us, no need to do it again.jhb2002-10-181-1/+0
|
* Don't lock the proc lock to clear p_fd. p_fd isn't protected by the procjhb2002-10-181-2/+0
| | | | lock.
* Replace the vm_page hash table with a per-vmobject splay tree. There shoulddillon2002-10-184-59/+96
| | | | | | | | | | | | | | | | be no major change in performance from this change at this time but this will allow other work to progress: Giant lock removal around VM system in favor of per-object mutexes, ranged fsyncs, more optimal COMMIT rpc's for NFS, partial filesystem syncs by the syncer, more optimal object flushing, etc. Note that the buffer cache is already using a similar splay tree mechanism. Note that a good chunk of the old hash table code is still in the tree. Alan or I will remove it prior to the release if the new code does not introduce unsolvable bugs, else we can revert more easily. Submitted by: alc (this is Alan's code) Approved by: re
OpenPOWER on IntegriCloud