summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Implement the new 1003.1-2001 pathconf() keys, including the Advisorywollman2002-10-271-11/+47
| | | | | | | Information option. Other filesystem implementations should do something similar. With advice from: mckusick, phk
* Change the way support for asynchronous I/O is indicated to applicationswollman2002-10-277-4/+44
| | | | | | | | | | to conform to 1003.1-2001. Make it possible for applications to actually tell whether or not asynchronous I/O is supported. Since FreeBSD's aio implementation works on all descriptor types, don't call down into file or vnode ops when [f]pathconf() is asked about _PC_ASYNC_IO; this avoids the need for every file and vnode op to know about it.
* As promised, downgrade the #error into a #warning.wollman2002-10-271-1/+1
|
* Update limits and configuration parameters for 1003.1/TC1/D6.wollman2002-10-272-10/+14
| | | | | | | | | | | Implement new sysconf keys. Change the implenentation of _SC_ASYNCHRONOUS_IO in preparation for the next set of changes. Move some limits which had been in <sys/syslimits.h> to <limits.h> where they belong. They had only ever been in syslimits.h to provide for the kernel implementation of the CTL_USER MIB branch, which went away with newsysctl years ago. (There is a #error in <sys/syslimits.h> which I will downgrade in the next commit.)
* Don peril sensitive sun glasses and change the default system call vectorjake2002-10-272-4/+37
| | | | | | | | | | | | | | | | | for sparc64 from trap #9 to trap #65. This is one of the ABI "blessed" system call vectors and is different from any other system that we might want to emulate, making the emulation easier by reducing the number of code paths that need to be shared. Compatibility with old applications is provided with COMPAT_FREEBSD4. Add defines for a few special traps that we may need to implement for compatibility with 32bit applications, and add comments on which vectors are used for what in other systems, and which are available. Pass magic flags to trap() for deprecated or unimplemented system call vectors so they will deliver SIGSYS instead of SIGILL. This piggy backs nicely with the recent sigaction(2) system call number change, and provided the rules are followed for upgrading past it, this change should not be noticed.
* Don't roll our own clean target, the default onemux2002-10-271-5/+0
| | | | works better.
* Centrally manage enforcement of {reboot,swapon,sysctl} using therwatson2002-10-279-117/+81
| | | | | | | mac_enforce_system toggle, rather than several separate toggles. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Fix a bunch of warnings on 64 bit platforms in themux2002-10-272-4/+5
| | | | CISS_DEBUG case by appropriately using %z and %j.
* - Comment a line which sets CISS_DEBUG by default.mux2002-10-271-1/+1
| | | | - Use -DCISS_DEBUG rather than -DCISS_DEBUG=0.
* Fix a warning when CISS_DEBUG is defined.mux2002-10-271-1/+1
|
* Don't truncate on large disks.phk2002-10-271-1/+6
|
* Implement mac_check_system_sysctl(), a MAC Framework entry point torwatson2002-10-2714-0/+277
| | | | | | | | | | | | | | | permit MAC policies to augment the security protections on sysctl() operations. This is not really a wonderful entry point, as we only have access to the MIB of the target sysctl entry, rather than the more useful entry name, but this is sufficient for policies like Biba that wish to use their notions of privilege or integrity to prevent inappropriate sysctl modification. Affects MAC kernels only. Since SYSCTL_LOCK isn't in sysctl.h, just kern_sysctl.c, we can't assert the SYSCTL subsystem lockin the MAC Framework. Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Hook up mac_check_system_reboot(), a MAC Framework entry point thatrwatson2002-10-2714-3/+225
| | | | | | | | | permits MAC modules to augment system security decisions regarding the reboot() system call, if MAC is compiled into the kernel. Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Merge from MAC tree: rename mac_check_vnode_swapon() torwatson2002-10-2714-171/+171
| | | | | | | | | | | mac_check_system_swapon(), to reflect the fact that the primary object of this change is the running kernel as a whole, rather than just the vnode. We'll drop additional checks of this class into the same check namespace, including reboot(), sysctl(), et al. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Make geom_mbr.c optional on PC98, use GEOM_MBR option to include it.phk2002-10-262-1/+6
| | | | | Disable check for supposedly magic "IPL1" string for PC98 labels, its thaumaturgical power is in doubt.
* Fix a style nit.mux2002-10-261-1/+1
|
* In VOP_LOOKUP, don't deny DELETE and RENAME operationsmux2002-10-261-1/+2
| | | | | when ISLASTCN is not set. The actual file which is being looked up may live in a different filesystem.
* Add a missing destroy_dev().mux2002-10-261-0/+2
|
* Allow deprecated or unimplemented system call vectors to deliver SIGSYS,jake2002-10-261-1/+1
| | | | as suggested by the sparc v9 ABI.
* Remove an unused macro.jake2002-10-261-6/+0
|
* MFi386: revisions 1.544 and 1.545.nyan2002-10-262-80/+640
|
* Slightly change the semantics of vnode labels for MAC: rather thanrwatson2002-10-2629-4824/+1254
| | | | | | | | | | | | | | | | | | | | | "refreshing" the label on the vnode before use, just get the label right from inception. For single-label file systems, set the label in the generic VFS getnewvnode() code; for multi-label file systems, leave the labeling up to the file system. With UFS1/2, this means reading the extended attribute during vfs_vget() as the inode is pulled off disk, rather than hitting the extended attributes frequently during operations later, improving performance. This also corrects sematics for shared vnode locks, which were not previously present in the system. This chances the cache coherrency properties WRT out-of-band access to label data, but in an acceptable form. With UFS1, there is a small race condition during automatic extended attribute start -- this is not present with UFS2, and occurs because EAs aren't available at vnode inception. We'll introduce a work around for this shortly. Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Call bpf_mtap() on outgoing packets.tmm2002-10-261-3/+6
|
* Add COMPAT_FREEBSD4 here too. It has COMPAT_43 as well.peter2002-10-261-0/+1
|
* Add COMPAT_FREEBSD4 for the transition. COMPAT_43 was already present.peter2002-10-261-0/+1
|
* iBack out david's last commit. the suspension code needs to be calledjulian2002-10-263-26/+13
| | | | for non KSE processes too.
* Move suspension checking code from userret() into thread_userret().davidxu2002-10-263-13/+26
|
* Backout revision 1.48.davidxu2002-10-262-4/+2
|
* o m_adj rx buffer so IP header is 32-bit alignedsam2002-10-252-18/+21
| | | | | | o replace EPIC_MGETCLUSER with m_getcl MFC after: 1 week
* Cast si_drv2 to intptr_t instead of int to quiet warnings.jhb2002-10-251-1/+1
| | | | | Tested on: alpha Reported by: marcel (on an ia64)
* Comment describing the semantics of mac_late.rwatson2002-10-259-9/+54
| | | | | | | Trim trailing whitespace. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Use the newer "+" modifier on output contraints when a register orjhb2002-10-252-62/+62
| | | | | memory datum is used for both input and output instead of using matching constraints.
* Reduce the GEOM verbosity under bootverbose to something more sufferable.phk2002-10-255-11/+26
| | | | | | | This is not quite the set of information I would want, but the tree where I have the "correct" version is messed up with conflicts. Sponsored by: DARPA & NAI Labs.
* Don't copy td_md. Instead, let the MD code handle it just like itjhb2002-10-251-3/+2
| | | | | | | handles the MD fields of all the other MD portions of proc-related structures. Tested on: i386, alpha, sparc64
* Note that the sched_lock protects md_ldt of struct mdproc.jhb2002-10-252-2/+2
|
* - Rename the DDB specific %z printf format to %y.mux2002-10-252-5/+14
| | | | | | | | | | - Make DDB use %y instead of %z. - Teach GCC about %y. - Implement support for the C99 %z format modifier. Approved by: re@ Reviewed by: peter Tested on: i386, sparc64
* Finish fixing the 5.x FPU code for dealing with signal handlers.peter2002-10-253-0/+3
| | | | Obtained from: bde
* Split 4.x and 5.x signal handling so that we can keep 4.x signalpeter2002-10-2543-221/+1182
| | | | | | | | | | | | | | | | handling clean and functional as 5.x evolves. This allows some of the nasty bandaids in the 5.x codepaths to be unwound. Encapsulate 4.x signal handling under COMPAT_FREEBSD4 (there is an anti-foot-shooting measure in place, 5.x folks need this for a while) and finish encapsulating the older stuff under COMPAT_43. Since the ancient stuff is required on alpha (longjmp(3) passes a 'struct osigcontext *' to the current sigreturn(2), instead of the 'ucontext_t *' that sigreturn is supposed to take), add a compile time check to prevent foot shooting there too. Add uniform COMPAT_43 stubs for ia64/sparc64/powerpc. Tested on: i386, alpha, ia64. Compiled on sparc64 (a few days ago). Approved by: re
* Change method to determine base memory size.iwasaki2002-10-252-86/+110
| | | | | | | | | | Try INT 15H/E820H first, then fall back to the old compatibility method (INT 12H). This is a workaround for newer machines which have broken INT 12H BIOS service implementation. Reviewed by: -current ML MFC after: 3 days
* #include <geom/geom.h> to get proper prototypes. Contrary to my fears wephk2002-10-251-10/+12
| | | | | | | | | | | seem to have all the prerequisites already. Call g_waitidle() as the first thing in vfs_mountroot() so that we have it out of the way before we even decide if we should call .._ask() or .._try(). Call the g_dev_print() function to provide better guidance for the root-mount prompt.
* Add a g_dev_print() function which prints all the /dev entries GEOMphk2002-10-252-0/+17
| | | | know about.
* Initialize tick_MHz and related variables much earlier. After the lasttmm2002-10-253-13/+17
| | | | | | | revision of tick.c, this was done at SI_SUB_CLOCKS, which is too late because tick_MHz is required for DELAY() to work. Reviewed by: jake
* Fix iommu_dvmamap_sync() to use the right address when flushing thetmm2002-10-251-1/+1
| | | | | | | | streaming cache. This bug could have the potential to cause data corruption on systems with Psycho U2P bridges (Sabre bridges have no streaming cache). However, due to the usual driver architecture, it is believed that corruption did occur only in rare cases (if at all).
* Don't check IFF_RUNNING in previous change.simokawa2002-10-251-2/+2
| | | | | The flag is sometimes unset if the interface has IPv6 link-local address only.
* Loose the g_dev_clone() noise.phk2002-10-251-1/+0
|
* Greatly improve readability of trap() by using a table to convert betweenjake2002-10-253-239/+165
| | | | | | trap types and signals to send. Rearrange KASSERTs to better handle faults early before curthread is setup, or in the case that it gets corrupted or set to 0.
* suspend thread only when it can be interrupted.davidxu2002-10-252-2/+4
|
* let thread_schedule_upcall() handle idle kse.davidxu2002-10-252-4/+16
|
* Disable the kernacc() check in mtx_validate() until such time that kernaccphk2002-10-252-0/+10
| | | | | | | | | does not require Giant. This means that we may miss panics on a class of mutex programming bugs, but only if running with a Chernobyl setting of debug-flags. Spotted by: Pete Carah <pete@ns.altadena.net>
* In vrele() we can actually have a VCHR with v_rdev == NULL if wephk2002-10-251-1/+1
| | | | came from the bottom of addaliasu(). Don't panic.
OpenPOWER on IntegriCloud