summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Use explicit Giant locks and unlocks for rather than instrumented ones forjhb2002-03-221-6/+5
| | | | | | code that is still not safe. suser() reads p_ucred so it still needs Giant for the time being. This should allow kern.giant.proc to be set to 0 for the time being.
* Merge from TrustedBSD MAC branch:rwatson2002-03-226-13/+38
| | | | | | | | | | | | | | Move the network code from using cr_cansee() to check whether a socket is visible to a requesting credential to using a new function, cr_canseesocket(), which accepts a subject credential and object socket. Implement cr_canseesocket() so that it does a prison check, a uid check, and add a comment where shortly a MAC hook will go. This will allow MAC policies to seperately instrument the visibility of sockets from the visibility of processes. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Prevent icmp_reflect() from calling ip_output() with a NULL routeru2002-03-223-9/+8
| | | | | | | | | | | | | | pointer which will then result in the allocated route's reference count never being decremented. Just flood ping the localhost and watch refcnt of the 127.0.0.1 route with netstat(1). Submitted by: jayanth Back out ip_output.c,v 1.143 and ip_mroute.c,v 1.69 that allowed ip_output() to be called with a NULL route pointer. The previous paragraph shows why this was a bad idea in the first place. MFC after: 0 days
* When "cloning" a pipe's buffer bcopy the data after dropping the pipe'salfred2002-03-221-2/+2
| | | | lock as the data may be paged out and cause a fault.
* only read from the possibly bad address if we did not get a machinegallatin2002-03-221-1/+1
| | | | | | | check. I don't know how this went unnoticed for so long. obtained from: NetBSD MFC after: 7 days
* Allow SMP kernels (like GENERIC..) to boot on UP kernels on the alpha.gallatin2002-03-221-1/+1
| | | | Pointy hat to: jeff
* In sysctl, req->td is believed always to be non-NULL, so there's no needrwatson2002-03-221-20/+14
| | | | | | | | | | | | | | to test req->td for NULL values and then do somewhat more bizarre things relating to securelevel special-casing and suser checks. Remove the testing and conditional security checks based on req->td!=NULL, and insert a KASSERT that td != NULL. Callers to sysctl must always specify the thread (be it kernel or otherwise) requesting the operation, or a number of current sysctls will fail due to assumptions that the thread exists. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs Discussed with: bde
* Since cred never appears to be passed into the securelevel calls asrwatson2002-03-221-2/+2
| | | | | | | | | | | | | | NULL, turn warning printf's into panic's, since this call has been restructured such that a NULL cred would result in a page fault anyway. There appears to be one case where NULL is explicitly passed in in the sysctl code, and this is believed to be in error, so will be modified. Securelevels now always require a credential context so that per-jail securelevels are properly implemented. Obtained from: TrustedBSD Project Sponsored by: NAI Labs Discussed with: bde
* Teach the bge driver about the BCM5701 (specifically, the 3Comwpaul2002-03-222-4/+20
| | | | | | | | 3c996B-T, with the 5701 rev B5 ASIC). One thing that confuses me still is that the 'link state change' bit in the status block seems to change state an awful lot. I have a workaround for this in place now, but it needs more investigation. For the moment though, this is enough to get the driver to work with this card.
* regeneratewpaul2002-03-221-1/+3
|
* Teach the brgphy driver about the BCM5701's internal copper PHY.wpaul2002-03-222-0/+7
|
* - Back out the commit to make the linker_load_file() securelevel checkarr2002-03-223-16/+6
| | | | | | made aware in jail environments. Supposedly something is broken, so this should be backed out until further investigation proves otherwise, or a proper fix can be provided.
* Change the ephemeral port range from 1024-5000 to 49152-65535.silby2002-03-221-2/+2
| | | | | | | | | This increases the number of concurrent outgoing connections from ~4000 to ~16000. Other OSes (Solaris, OS X, NetBSD) and many other NAT products have already made this change without ill effects, so we should not run into any problems. MFC after: 1 week
* Break out the "see_other_uids" policy check from the variousrwatson2002-03-221-4/+28
| | | | | | | | | | | | | method-based inter-process security checks. To do this, introduce a new cr_seeotheruids(u1, u2) function, which encapsulates the "see_other_uids" logic. Call out to this policy following the jail security check for all of {debug,sched,see,signal} inter-process checks. This more consistently enforces the check, and makes the check easy to modify. Eventually, it may be that this check should become a MAC policy, loaded via a module. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Collect all functions for copying to and from userspace into the one file.benno2002-03-2110-480/+522
| | | | | This allows me to reimplement [sf]u{byte,word} as separate functions and not as calls to copy{in,out}.
* Limit fabric search to a default 256 entries. This will all go awaymjacob2002-03-213-24/+34
| | | | | | | | | | | | | | | | | | | soon because it's just getting harder and harder to find switches that correctly implement the GET ALL NEXT subcommands for the SNS protocol. Latch up result out pointer and set a busy flag when we're looking at the response queue. This allows for a cleaner way to make sure we don't get multiple CPUs trying to read the same response queue entries. Change how isp_handle_other_response returns values (clarity). Make PORT UNAVAILABLE the same as PORT LOGOUT (force a LIP). Do some formatting changes. MFC after: 0 days
* o Use the MI vm_map_growstack() instead of grow_stack() in trap_pfault()alc2002-03-214-36/+8
| | | | | and trapwrite(). o On i386/pc98, remove the (now) unused grow_stack().
* Remove 'register' keyword.obrien2002-03-213-11/+11
|
* shut up the compilergallatin2002-03-211-1/+1
|
* - Fix a logic error in checking the securelevel that was introduced in thearr2002-03-213-8/+4
| | | | | | previous commit. Pointy hats to: arr, rwatson
* - Make all inlines for manipulating supervisor-level registers accept/returnbenno2002-03-211-6/+13
| | | | | register_t values. - Implement an inline for isync.
* GC some unused, bogus interrupt functions and replace them with properbenno2002-03-211-20/+6
| | | | implementations of intr_disable and intr_restore.
* Change critical_t to register_t for intr_disable/restore.dfr2002-03-215-7/+7
|
* Change cpu_critical_enter/exit to intr_disable/restore.dfr2002-03-211-2/+2
|
* Replaced hacks in sbin/Makefile,v 1.99 and usr.sbin/Makefile,v 1.217ru2002-03-211-1/+4
| | | | | | with the NO_IPFILTER make.conf(5) knob. (So that we can "make the-rest-of-the-world" again.)
* In UP mode, the primary cpu's per-cpu current_pmap was not initialized -peter2002-03-211-0/+1
| | | | | this was only done as a side effect of calling cpu_mp_start(). I haven't actually tested that this fixes UP kernels, but it feels about right.
* intr_disable returns register_timp2002-03-211-1/+1
|
* Fix abuses of cpu_critical_{enter,exit} by converting toimp2002-03-2112-65/+95
| | | | | | | intr_{disable,restore} as well as providing an implemenation of intr_{disable,restore}. Reviewed by: jake, rwatson, jhb
* Fix abuses of cpu_critical_{enter,exit} by converting toimp2002-03-219-48/+61
| | | | | intr_{disable,restore} as well as providing an implemenation of intr_{disable,restore}.
* Remove last two abuses of cpu_critical_{enter,exit} in the MI code.imp2002-03-212-8/+8
| | | | Reviewed by: jake, jhb, rwatson
* Add a change mirroring that made to kern/subr_trap.c and others.benno2002-03-211-9/+3
| | | | | | | This makes kernel builds with DIAGNOSTIC work again. Apparently forgotten by: jhb Might want to be checked by: jhb
* Remove references to vm_zone.h and switch over to the new uma API.jeff2002-03-212-30/+11
| | | | Approved by: peter
* Remove references to vm_zone.h and switch over to the new uma API.jeff2002-03-216-26/+8
| | | | Reviewed by: jake
* Fix error introduced in the 20020217 update, where GetPossibleResourcesmsmith2002-03-212-2/+2
| | | | | | was spammed with GetCurrentResources. Submitted by: Munehiro Matsuda <haro@h4.dion.ne.jp>
* Remove references to vm_zone.h and switch over to the new uma API.jeff2002-03-213-36/+36
|
* Remove references to vm_zone.h and switch over to the new uma API.jeff2002-03-212-30/+12
|
* Remove __P.alfred2002-03-215-38/+38
| | | | | | profile.h and bus.h were excluded because there is currently WIP. Reviewed by: tmm
* Remove __P.alfred2002-03-2012-76/+76
| | | | Reviewd by: peter
* Remove __P.alfred2002-03-2019-136/+132
| | | | Reveiwed by: benno
* UMA permited us to utilize the 'waitok' flag to soalloc.jeff2002-03-201-2/+7
|
* Change the way we ensure td_ucred is NULL if DIAGNOSTIC is defined.jhb2002-03-201-30/+3
| | | | | | | | | | | | | | Instead of caching the ucred reference, just go ahead and eat the decerement and increment of the refcount. Now that Giant is pushed down into crfree(), we no longer have to get Giant in the common case. In the case when we are actually free'ing the ucred, we would normally free it on the next kernel entry, so the cost there is not new, just in a different place. This also removse td_cache_ucred from struct thread. This is still only done #ifdef DIAGNOSTIC. [ missed this file in the previous commit ] Tested on: i386, alpha
* Change the way we ensure td_ucred is NULL if DIAGNOSTIC is defined.jhb2002-03-208-156/+36
| | | | | | | | | | | | Instead of caching the ucred reference, just go ahead and eat the decerement and increment of the refcount. Now that Giant is pushed down into crfree(), we no longer have to get Giant in the common case. In the case when we are actually free'ing the ucred, we would normally free it on the next kernel entry, so the cost there is not new, just in a different place. This also removse td_cache_ucred from struct thread. This is still only done #ifdef DIAGNOSTIC. Tested on: i386, alpha
* - Push down Giant into crfree() in the case that we actually free a ucred.jhb2002-03-202-1/+18
| | | | | | - Add a cred_free_thread() function (conditional on DIAGNOSTICS) that drops a per-thread ucred reference to be used in debugging code when leaving the kernel.
* Add PCI ID for the SeaLevel Ultra 530.PCI single port card.jhb2002-03-201-0/+1
| | | | Sponsored by: The Weather Channel
* Minor cleanups to post.mk from bde. Mostly orderingimp2002-03-201-26/+32
|
* No need to conditionalize on pci being in the kernel for thisimp2002-03-202-6/+0
|
* Fix minor style(9) violation in de__Pingimp2002-03-202-80/+80
|
* Better power code and better power diagnosticsimp2002-03-202-36/+82
|
* Define masks for the VCC an VPP voltagesimp2002-03-201-0/+5
|
* Remove __P(). This was tested on the GENERIC kernel.obrien2002-03-2063-666/+664
|
OpenPOWER on IntegriCloud