summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Add /* FALLTHROUGH */phk2003-05-312-0/+2
| | | | Found by: FlexeLint
* We cannot use the normal strlen() and strcpy, but don't #define strlen andphk2003-05-311-14/+11
| | | | | | strcpy to get private versions, use private versions directly. Found by: FlexeLint
* Add missing break;phk2003-05-311-0/+1
| | | | Found by: FlexeLint
* Protect macro with do { ... } while (0)phk2003-05-311-1/+2
| | | | Found by: FlexeLint
* Remove unused variable.phk2003-05-311-3/+0
| | | | Found by: FlexeLint
* Fix indentation.phk2003-05-312-3/+3
| | | | Found by: FlexeLint
* Rewrite Biba and MLS label externalization code to use sbufs insteadrwatson2003-05-312-105/+99
| | | | | | | | | | | | | | | | | | | | of C strings internally; C strings require a lot of return value checking that (a) takes a lot of space, and (b) is difficult to get right. Prior to the advent of compartment support, modeling APIs for helper functions on snprintf worked fine; with the additional complexity, the sbuf_printf() API makes a lot more sense. While doing this, break out the printing of sequential compartment lists into a helper function, mac_{biba,mls}_compartment_to_string(). This permits the main body of mac_{biba,mls}_element_to_string() to be concerned only with identifying sequential ranges rather than rendering. At a less disruptive moment, we'll push the move from snprintf()-like interface to sbuf()-like interface up into the MAC Framework layer. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Fix off-by-one error in range check of VC index.phk2003-05-311-1/+1
| | | | Found by: FlexeLint
* Add /* FALLTHROUGH */phk2003-05-311-0/+1
| | | | Found by: FlexeLint
* Remove extra ';'phk2003-05-311-2/+2
| | | | Found by: FlexeLint
* Hang softc from dev_tphk2003-05-311-6/+18
|
* Remove unused variable.phk2003-05-313-6/+1
| | | | Found by: FlexeLint
* Fix off-by-one errors in range checks of state machine states & events.phk2003-05-312-8/+8
| | | | Found by: FlexeLint
* Remove extra ';'phk2003-05-311-1/+1
| | | | Found by: FlexeLint
* Use temporary variable to avoid double expansion of macro with side effects.phk2003-05-312-2/+7
| | | | Found by: FlexeLint
* Remove unused variable.phk2003-05-313-6/+1
| | | | Found by: FlexeLint
* Fix off-by-one error in drive number check.phk2003-05-311-3/+3
| | | | | | Don't return(foo(...)) in function returning void. Found by: FlexeLint
* Remove extra unused variable.phk2003-05-311-2/+0
| | | | Found by: FlexeLint
* Remove extra ';'phk2003-05-312-2/+2
| | | | Found by: FlexeLint
* Add GEOM module compilation shims.phk2003-05-319-0/+68
|
* Fix \ alignment in macro.phk2003-05-311-5/+1
| | | | | | | Remove breaks after return. Remove unused variable. Found by: FlexeLint
* Add /* FALLTHROUGH */phk2003-05-312-0/+4
| | | | Found by: FlexeLint
* Remove unused local variables.phk2003-05-313-33/+7
| | | | Found by: FlexeLint
* Introduce a init and fini member functions on a class.phk2003-05-313-40/+126
| | | | | | | | | Use ->init() and ->fini() to handle the mutex in geom_disk.c Remove the g_add_class() function and replace it with a standardized g_modevent() function. This adds the basic infrastructure for loading/unloading GEOM classes
* Don't generate an ip_id for packets with the DF bit set; ip_id iswollman2003-05-311-4/+17
| | | | | | | | | | | | only meaningful for fragments. Also don't bother to byte-swap the ip_id when we do generate it; it is only used at the receiver as a nonce. I tried several different permutations of this code with no measurable difference to each other or to the unmodified version, so I've settled on the one for which gcc seems to generate the best code. (If anyone cares to microoptimize this differently for an architecture where it actually matters, feel free.) Suggested by: Steve Bellovin's paper in IMW'02
* Eliminate potential overflows by allocating softc dynamically,phk2003-05-315-34/+23
| | | | | | | removing at the same time the need for this to be a "count" config option. Found by: FlexeLint
* Remove the G_CLASS_INITIALIZER, we do not need it anymore.phk2003-05-3114-22/+2
|
* Fix systematic off-by-one errors in unit number range checks.phk2003-05-316-11/+11
| | | | Found by: FlexeLint
* Use symbolic constants instead of "4".phk2003-05-313-15/+10
| | | | | | Use arrays instead of relying on struct packing. Identical md5(scsi_ch.o).
* "break" rather than fall through to a break in the default clause.phk2003-05-311-0/+1
| | | | Found by: FlexeLint
* Don't use return(foo(...)); in function returning void.phk2003-05-311-1/+1
| | | | Found by: FlexeLint
* Use le_uuid_dec() since GPT UUID's are always in LE format.phk2003-05-311-2/+4
| | | | Tested by: Marcel
* Introduce {be,le}_uuid_{enc,dec}() functions for explicitly encodingphk2003-05-312-0/+84
| | | | and decoding UUID's in big endian and little endian binary format.
* The IO_NOWDRAIN and B_NOWDRAIN hacks are no longer needed to preventphk2003-05-317-27/+7
| | | | | | deadlocks with vnode backed md(4) devices because md now uses a kthread to run the bio requests instead of doing it directly from the bio down path.
* Don't use return(foo(...)); in a function returning void.phk2003-05-311-6/+8
| | | | Found by: FlexeLint
* Man, I'm not on the ball. 4th does not need to escape '\' chars. Thisscottl2003-05-311-8/+8
| | | | should make our beloved friend look less like he has a massive head wound.
* Flag when ACPI has been disabled by the user so that sysinstall can doscottl2003-05-311-0/+2
| | | | something with it.
* Add acpi to the build. Remove the hack from machdep.c that lies to thepeter2003-05-312-3/+7
| | | | loader to shut it up.
* Have hammer_time() return the proc0 stack location, and have locorepeter2003-05-312-25/+17
| | | | | | | | | switch to it before calling mi_startup(). The bootstack is WAY too small for running acpica during probe/attach. While here, pass modulep/physfree to the startup routine, rather than writing to the global variables in locore.S. Approved by: re (amd64/*)
* Regenerate.peter2003-05-312-0/+894
|
* Make this compile with WITNESS enabled. It wants the syscall names.peter2003-05-316-5/+9
|
* Port acpica to amd64.peter2003-05-312-5/+8
| | | | Approved by: re (amd64/* blanket)
* Add the MD ifdefs for amd64 to point to the IO space bustag/handle.peter2003-05-311-0/+4
| | | | Approved by: re ("safe" amd64 support)
* With the help of jhb, fix the ACPI_ACQUIRE_GLOBAL_LOCK() macros andpeter2003-05-311-28/+9
| | | | | | port to amd64 after repocopy. Approved by: re (amd64/*)
* Add __amd64__ to the ifdefs that introduce the "pcicfg" spinlock topeter2003-05-311-1/+1
| | | | | | witness. Approved by: re (safe amd64 support)
* Enable the new bootloader for i386 only. The new loader.rc is will onlyscottl2003-05-312-1/+21
| | | | | | | be installed if an old one does not exist, i.e. only during install, not during upgrades. Approved by: re
* Fix interrupt assignment for non-builtin PCI devices on e450s.tmm2003-05-3010-45/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This machine uses a non-standard scheme to specify the interrupts to be assigned for devices in PCI slots; instead of giving the INO or full interrupt number (which is done for the other devices in this box), the firmware interrupt properties contain intpin numbers, which have to be swizzled as usual on PCI-PCI bridges; however, the PCI host bridge nodes have no interrupt map, so we need to guess the correct INO by slot number of the device or the closest PCI-PCI bridge leading to it, and the intpin. To do this, this fix makes the following changes: - Add a newbus method for sparc64 PCI host bridges to guess the INO, and glue code in ofw_pci_orb_callback() to invoke it based on a new quirk entry. The guessing is only done for interrupt numbers too low to contain any IGN found on e450s. - Create another new quirk entry was created to prevent mapping of EBus interrupts at PCI level; the e450 has full INOs in the interrupt properties of EBus devices, so trying to remap them could cause problems. - Set both quirk entries for e450s; remove the no-swizzle entry. - Determine the psycho half (bus A or B) a driver instance manages in psycho_attach() - Implement the new guessing method for psycho, using the slot number, psycho half and property value (intpin). Thanks go to the testers, especially Brian Denehy, who tested many kernels for me until I had found the right workaround. Tested by: Brian Denehy <B.Denehy@90east.com>, jake, fenner, Marius Strobl <marius@alchemy.franken.de>, Marian Dobre <mari@onix.ro> Approved by: re (scottl)
* Rename BUS_DMAMEM_NOSYNC to BUS_DMA_COHERENT.hmp2003-05-307-9/+8
| | | | | | | | | | | | | | | | | The current name is confusing, because it indicates to the client that a bus_dmamap_sync() operation is not necessary when the flag is specified, which is wrong. The main purpose of this flag is to hint the underlying architecture that DMA memory should be mapped in a coherent way, but the architecture can ignore it. But if the architecture does supports coherent mapping of memory, then it makes bus_dmamap_sync() calls cheap. This flag is the same as the one in NetBSD's Bus DMA. Reviewed by: gibbs, scottl, des (implicitly) Approved by: re@ (jhb)
* rpc.lockd stability workaround: remove PCATCH from the tsleep() inrwatson2003-05-301-1/+1
| | | | | | | | | | | | | | | | | nfs_lock.c. Right now, if we permit a signal to interrupt the sleep, we will slip the lock and no process on that client, the server, or any other client will be able to acquire the lock. This can happen, for example, if a user hits Ctrl-C or Ctrl-T while a process is waiting for the lock. By removing PCATCH, we prevent that from happening, at the cost of not permitting a user-requested lock abort: also nasty. However, a user interface bug might be preferable to a serious semantic bug, so we go with that for now. We need to teach the rpc.lockd/kernel protocol how to abort lock requests, and rpc.lockd how to handle aborted lock requests; patches for the kernel bit are floating around, but no rpc.lockd bit yet. Approved by: re (scottl)
* Make sure all character pointers are properly initialized; this wasrwatson2003-05-301-4/+5
| | | | | | | | | mismerged from the MAC tree, and didn't get picked up because warnings are not normally fatal in per-module builds, only when they are linked into a kernel (such as LINT). Reported by: des and the technicolor tinderbox Approved by: re (scottl)
OpenPOWER on IntegriCloud