summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix format string errors relating mainly to the use of %qu to print off_t's.tjr2002-10-064-9/+15
| | | | | | | | | Instead use %ju and cast the argument. WFORMAT=0 is still required in the Makefile because gcc warns about some strftime() calls (I don't think this behaviour is useful.) Tested on: sparc64, alpha, i386
* INclude <sys/mutex.h>'s prerequisite <sys/lock.h> instead of depending onbde2002-10-061-0/+1
| | | | namespace pollution 2 layers deep in <sys/eventhandler.h>.
* Sync from MAC tree: break out the single mmap entry point intorwatson2002-10-0618-224/+723
| | | | | | | | | | | | | | | | | | | seperate entry points for each occasion: mac_check_vnode_mmap() Check at initial mapping mac_check_vnode_mprotect() Check at mapping protection change mac_check_vnode_mmap_downgrade() Determine if a mapping downgrade should take place following subject relabel. Implement mmap() and mprotect() entry points for labeled vnode policies. These entry points are currently not hooked up to the VM system in the base tree. These changes improve the consistency of the access control interface and offer more flexibility regarding limiting access to vnode mmaping. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Make this work under GEOM.mdodd2002-10-063-184/+43
|
* Make stpcpy() only visiable w/in __BSD_VISIBLE.obrien2002-10-051-1/+1
|
* Don't be noisy if DIOCWLABEL fails, it's probably because we're writingphk2002-10-052-4/+2
| | | | | | the first label to the raw disk. Sponsored by: DARPA & NAI Labs.
* This patch got lost in my trees: Pass setattr down to device driversphk2002-10-051-0/+8
| | | | | | | as well. Detected by: scottl Sponsored by: DARPA & NAI Labs.
* Modify label allocation semantics for sockets: pass in soalloc's mallocrwatson2002-10-0519-140/+654
| | | | | | | | | | | flags so that we can call malloc with M_NOWAIT if necessary, avoiding potential sleeps while holding mutexes in the TCP syncache code. Similar to the existing support for mbuf label allocation: if we can't allocate all the necessary label store in each policy, we back out the label allocation and fail the socket creation. Sync from MAC tree. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* The msdosfs module now builds on sparc64. No idea if it worksmux2002-10-051-2/+1
| | | | though.
* Add two extern's for adjkerntz and wall_cmos_clock, all othermux2002-10-051-0/+3
| | | | | | | | archs have them there, alghough the variable are declared in subr_clock.c. These should probably be moved into some MI place. Approved by: jake
* Make sure that the accounting credential is saved along with the vprwatson2002-10-051-0/+1
| | | | | | | when accounting is suspended--otherwise when accounting is restored, we may incorrectly assume the credential is valid. Panics experienced by: juli
* Implement mac_create_devfs_symlink() for policies that interact withrwatson2002-10-055-0/+55
| | | | | | | vnode labels. Sync from MAC tree. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Fix argument order mistake when decoding disklabels from on-disk format.phk2002-10-051-1/+1
| | | | | Detected by: jhay Sponsored by: DARPA & NAI Labs.
* Integrate a devfs/MAC fix from the MAC tree: avoid a race condition duringrwatson2002-10-0514-4/+132
| | | | | | | | | devfs VOP symlink creation by introducing a new entry point to determine the label of the devfs_dirent prior to allocation of a vnode for the symlink. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Remove matcd from MAKEDEV.scottl2002-10-051-32/+1
| | | | X-MFC after: ASAP
* Merge implementation of mpo_check_vnode_link() for various appropriaterwatson2002-10-056-0/+113
| | | | | | | file-system aware MAC policies. Sync to MAC tree. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Merge support for mac_check_vnode_link(), a MAC framework/policy entryrwatson2002-10-0515-2/+294
| | | | | | | | point that instruments the creation of hard links. Policy implementations to follow. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* While the MAC API has supported the ability to handle M_NOWAIT passedrwatson2002-10-059-27/+99
| | | | | | | | | | | | to mbuf label initialization, that functionality was never merged to the main tree. Go ahead and merge that functionality now. Note that this requires policy modules to accept the case where the label element may be destroyed even if init has not succeeded on it (in the event that policy failed the init). This will shortly also apply to sockets. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Rearrange object and label init/destroy functions to match therwatson2002-10-059-909/+909
| | | | | | | | | order used in mac_policy.h and elsewhere. Sort order is basically "by operation category", then "alphabetically by object". Sync to MAC tree. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Add hifn(4) and ubsec(4) devices for i386/pc98.bmah2002-10-052-0/+70
|
* New release notes: crypto(4) and related infobmah2002-10-052-10/+24
| | | | | | | Updated release notes: Update KSE info and add cross-reference to kse(2) manpage. Fix a couple of minor typos while I'm here.
* Sync to MAC tree: use 'flag' instead of 'how' for mac_init_mbuf();rwatson2002-10-059-27/+27
| | | | remove a slightly less than useful comment.
* Don't allow dev_stdclone(9) to accept minors larger than the system isgreen2002-10-051-0/+2
| | | | able to handle (0xffffff).
* Another big diff, little functional change: move label internalization,rwatson2002-10-059-585/+585
| | | | | | | | externalization, and cred label life cycle events to entirely above devfs and vnode events. Sync from MAC tree. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Move all object label init/destroy routines to the head of therwatson2002-10-059-2565/+2565
| | | | | | | | entry points to better match the entry point ordering in mac_policy.h. Big diff, no functional change; merge from the MAC tree. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Synch from TrustedBSD MAC tree:rwatson2002-10-059-27/+225
| | | | | | | | | | | - If a policy isn't registered when a policy module unloads, silently succeed. - Hold the policy list lock across more of the validity tests to avoid races. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* NB: This commit does *NOT* make GEOM the default in FreeBSDphk2002-10-0523-34/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NB: But it will enable it in all kernels not having options "NO_GEOM" Put the GEOM related options into the intended order. Add "options NO_GEOM" to all kernel configs apart from NOTES. In some order of controlled fashion, the NO_GEOM options will be removed, architecture by architecture in the coming days. There are currently three known issues which may force people to need the NO_GEOM option: boot0cfg/fdisk: Tries to update the MBR while it is being used to control slices. GEOM does not allow this as a direct operation. SCSI floppy drives: Appearantly the scsi-da driver return "EBUSY" if no media is inserted. This is wrong, it should return ENXIO. PC98: It is unclear if GEOM correctly recognizes all variants of PC98 disklabels. (Help Wanted! I have neither docs nor HW) These issues are all being worked. Sponsored by: DARPA & NAI Labs.
* Cosmetic line wrap synchronization.rwatson2002-10-059-18/+36
|
* Push the debugging obect label counters into security.mac.debug.countersrwatson2002-10-059-99/+144
| | | | | | | rather than directly under security.mac.debug. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Don't use dkunit() to find our softc when we can hang it off the dev_t.phk2002-10-052-27/+24
| | | | | | This removes yet a dependency on the old disklabel stuff. Sponsored by: DARPA & NAI Labs.
* Merge the last couple of my changes to fd.c into the pc98 version.phk2002-10-052-102/+40
| | | | Sponsored by: DARPA & NAI Labs
* Begin another merge from the TrustedBSD MAC branch:rwatson2002-10-0516-1540/+1246
| | | | | | | | | | | | | | | | | | | | | - Change mpo_init_foo(obj, label) and mpo_destroy_foo(obj, label) policy entry points to mpo_init_foo_label(label) and mpo_destroy_foo_label(label). This will permit the use of the same entry points for holding temporary type-specific label during internalization and externalization, as well as for caching purposes. - Because of this, break out mpo_{init,destroy}_socket() and mpo_{init,destroy}_mount() into seperate entry points for socket main/peer labels and mount main/fs labels. - Since the prototype for label initialization is the same across almost all entry points, implement these entry points using common implementations for Biba, MLS, and Test, reducing the number of almost identical looking functions. This simplifies policy implementation, as well as preparing us for the merge of the new flexible userland API for managing labels on objects. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Fix building of minimal kernels without npx by rearranging ifdefs.deischen2002-10-052-22/+22
| | | | | | | Also fix some style bugs in surrounding code, and add a comment about FP state restoral that seems questionable. Submitted by: bde
* Use in-tree libbsdxml instead of ports based libexpat.phk2002-10-056-13/+11
| | | | Sponsored by: DARPA & NAI Labs.
* Match the new g_io_deliver() API in the kernel.phk2002-10-051-7/+4
| | | | Sponsored by: DARPA & NAI Labs.
* Pass sbuf to the kernel routines to match new kernel code.phk2002-10-051-2/+6
| | | | Sponsored by: DARPA & NAI Labs
* Fix problem introduced in rev.1.406, which can cause already unlockedsobomax2002-10-051-0/+1
| | | | mutex being unlocked again causing system panic.
* Plug memoryleaks detected by FlexeLint.phk2002-10-051-2/+8
|
* If dsgetlabel() returns a label with a size of zero in diskdumpconf(),brian2002-10-051-0/+2
| | | | | | | | | | treat it as an invalid partition. This fixes a bug where ``dumpon <device>'' will configure the dump device at a random offset on the disk if <device> isn't a valid partition. Reviewed by: phk
* Fix namespace issues by using visibility conditionals frommike2002-10-051-13/+13
| | | | <sys/cdefs.h>. Sort function prototypes.
* Fix namespace issues by using visibility conditionals frommike2002-10-056-10/+40
| | | | <sys/cdefs.h>.
* Change <sys/_sigset.h> to typedef __sigset_t instead of sigset_t, somike2002-10-053-1/+12
| | | | that headers that include it can conditionalize sigset_t's visibility.
* Put an easy-to-miss assignment into the proper place. It was stray in thejmallett2002-10-052-4/+8
| | | | | middle of a block of code, with no clear assignment. While here, move one nearby assignment out of declaration.
* Remove bogus duplicate assignment of local variables.jmallett2002-10-052-4/+4
|
* Get Vinum up and running with GEOM:rwatson2002-10-051-86/+21
| | | | | | | | | | | | | | | | | | | | | | | (1) Use namei() and devfs to discover devices rather than a hard-coded MAKEDEV implementation. Once rootfs is in place, this will allow Vinum to be used for the root file system partition. (2) Pass FREAD to device opens so that GEOM will return sector size rather than an error on attempts to read label data. (3) Avoid clobbering return values from close_drive() and masking this failure, resulting in a later divide by zero due to not having updated the Vinum-cached sector size. (4) Ignore failures from DIOCWLABEL as that appears not to be required in the GEOM environment. We've done testing in simple Vinum environments, but those with more complex environments might want to give this a spin in DP2 and make sure everything is up to speed. Fixes in collaboration with: iedowse Reviewed by: grog
* Refinement on previous fix for mutex destruction: make sure we don'trwatson2002-10-051-4/+3
| | | | | | release the mutex multiple times for multi-plex volumes. Following further consultation with: grog
* Remove a panic on vinum module unload: make sure to destroy all mutexesrwatson2002-10-051-1/+4
| | | | | | | | before freeing so that WITNESS doesn't dereference mutex data pointers and page fault. It's now possible to unload vinum.ko with a GENERIC kernel on 5.0-CURRENT without panic. Debugged/fixed with the aid of: jake, grog
* Define _MACHINE.jmallett2002-10-051-1/+1
|
* Once again, remove the i386-specific hacks to save and restoredeischen2002-10-051-9/+0
| | | | | | | | the FPU state on receiving and returning from a signal. The FPU save and restore macros are no longer needed, but remain defined in case we need to use them again (something else breaks). They'll be removed permanently once new syscalls are added to handle the new i386 ucontext size.
* Make sure that ACPI PCI driver probe routine call pci_cfgregopen()iwasaki2002-10-052-0/+6
| | | | | | before start accessing PCI config space. Reviewed by: jhb
OpenPOWER on IntegriCloud