Commit Graph

65242 Commits

Author SHA1 Message Date
Yaroslav Tykhiy
cf91120f8b if_loop doesn't need to keep the list of lo(4) interfaces. Today
a private softc list is needed neither for tracking clones in general
nor for destroying all clones before the module unload -- if_clone
takes care of all that.  (Note that some other interface drivers do
need a softc list to be able to scan it for their private purposes.)
2007-10-27 18:25:53 +00:00
Craig Rodrigues
fab2013cb7 Add the following mount options to the nfs_opts array:
noatime, noexec, suiddir, nosuid, nosymfollow, union,
noclusterr, noclusterw, multilabel, acls, force, update,
async.  These options correspond to MOPT_STDOPTS, MOPT_FORCE, MOPT_UPDATE,
and MOPT_ASYNC.

Currently, mount_nfs converts these "-o" options from strings
to MNT_ flags via getmntopts(),
and passes the flags from userspace to the kernel.
This change will allow us in future to pass these mount options
as strings directly to the kernel via nmount() when doing NFS mounts.
2007-10-27 16:28:05 +00:00
Craig Rodrigues
d2169cb67d Remove duplicate "union" from ext2_opts.
Noticed by:	bde
2007-10-27 16:14:33 +00:00
Craig Rodrigues
b4b5bf359b In nmount(), if MNT_ROOT is in the mount flags, filter it
out instead of returning an error.
(1)  This makes the behavior consistent with mount(2).
(2)  This makes update mounts on the root file system work properly.
(3)  The explicit checks for MNT_ROOTFS in src/sbin/fsck_ffs/main.c
     and src/usr.sbin/mountd/mountd.c which were put in to
     eliminate errors during update mounts on the root file system
     can be removed.

The only place were MNT_ROOTFS can be validly set
is inside the kernel, i.e. with vfs_mountroot_try().

Reviewed by:	phk
MFC after:	3 days
2007-10-27 15:59:18 +00:00
Sam Leffler
8bb84cef37 fix build 2007-10-27 15:31:50 +00:00
John Baldwin
3052da8bb3 Don't destroy an ACPI device_t for a PCI device and reassign the ACPI
handle to the PCI device_t if the ACPI device_t is already attached to a
driver.  This happens on the Tablet TC1000 which for some reason includes
two PCI-ISA bridges and treats the second bridge as an ACPI system resource
device.

Reviewed by:	njl (a while ago)
MFC after:	3 days
2007-10-27 14:54:43 +00:00
John Baldwin
54a3fb6f8f Don't test the APIC flag in the cpuid features for amd64 to see if a
local APIC is present or not.  All amd64 CPUs have a local APIC and some
BIOSen don't set the CPUID_APIC flag.

MFC after:	1 week
2007-10-27 13:34:53 +00:00
John Baldwin
2445af1a8a Don't always re-route IRQs on resume. If this link hasn't been used, then
disable it with _DIS rather than assigning it an IRQ on resume.

MFC after:	1 week
2007-10-27 13:12:29 +00:00
Robert Watson
438aeadf27 Give each posixsem MAC Framework entry point its own counter and test case
in the mac_test policy, rather than sharing a single function for all of
the access control checks.

Obtained from:	TrustedBSD Project
2007-10-27 10:38:57 +00:00
Julian Elischer
6a564b46b6 Add support for the pre-exisiting module shutdoen handshake.
Fix some comments.
2007-10-27 00:54:16 +00:00
Julian Elischer
9ef95d0105 rename the process to 'idle' and 'intr' as per jhb. 2007-10-27 00:52:26 +00:00
Julian Elischer
fbf7046447 Initialise the initial process pointer to NULL so that we know we don't
have an idle process yet.
I'm guessing that on my system this was always 0 already.

found by: Ed Schouten
2007-10-27 00:42:40 +00:00
Alan Cox
21f7958604 Change vm_page_cache_transfer() such that it does not transfer pages
that would have an offset beyond the end of the target object.  Such
pages should remain in the source object.

MFC after:	3 days
Diagnosed and reviewed by:	Kostik Belousov
Reported and tested by:		Peter Holm
2007-10-27 00:09:30 +00:00
Julian Elischer
6bc3d1dc09 If kthread_exit() is called on the last kthread in a kproc, then
all the work in kproc_exit must be done.
We don't actually have a user of this yet but why leave it to chance.
2007-10-26 22:18:20 +00:00
Julian Elischer
ca9a0ddf31 if one changes a function's arguments, one must also change the callers. 2007-10-26 22:03:19 +00:00
Robert Watson
6683b28d78 Update comment following MAC Framework entry point renaming and
reorganization.

Obtained from:	TrustedBSD Project
2007-10-26 21:16:34 +00:00
John Baldwin
fd6d060f0d Use the smaller cgbase() macro in ufsread.c if UFS_SMALL_CGBASE is
defined.  This lets each boot program choose which version of cgbase() it
wants to use rather than forcing ufsread.c to have that knowledge.

MFC after:	1 week
Discussed with:	imp
2007-10-26 21:02:31 +00:00
Ariff Abdullah
554314911c Remap and virtualize mixer controls for HP nx6110 with
AD1981B AC97 codec, unifying master volume control.

  * Remap "phout" --> SOUND_MIXER_VOLUME (internal speakers)
  * Virtual "vol" --> { "phout", "ogain" (headphone) }

Tested by:	Frederic Chardon
MFC after:	3 days
2007-10-26 20:49:59 +00:00
Ariff Abdullah
f29120c085 Enable headphone jack-sense for HP nx6100 with AD1981B AC'97 codec,
automuting internal speakers.

Tested by:	Frederic Chardon
MFC after:	3 days
2007-10-26 20:49:23 +00:00
Julian Elischer
5f66cfca51 oops, over optimised and broke non-SMP builds 2007-10-26 20:32:33 +00:00
Julian Elischer
dd1b3ff97e kthread_exit needs no stinkin argument. 2007-10-26 17:03:22 +00:00
David E. O'Brien
ef44c8d2a3 style(9) 2007-10-26 16:33:47 +00:00
John Baldwin
150b476d94 Add . to the include path so that we follow the 'machine' symlink we create
during depend on amd64.

Reported by:	rwatson
2007-10-26 15:56:22 +00:00
Warner Losh
8d7b90cdd7 The arm boot code uses this function as well. Redefining cgbase()
saves about 500 bytes in the boot code.  While the AT91RM9200 has 12k
of space for the boot loader, which is more than i386's 8k, the code
generated by gcc is a bit bigger.

I've had this in p4 for about two years now.
2007-10-26 15:00:34 +00:00
Yoshihiro Takahashi
c2a6fe6133 Disable the coretemp and nvram on pc98. 2007-10-26 13:42:17 +00:00
Yoshihiro Takahashi
b493fda6e0 MFi386: revision 1.476
Add more (commented-out) usb devices.
2007-10-26 13:38:00 +00:00
Yoshihiro Takahashi
69c40fc504 Reduce diffs against i386. 2007-10-26 13:32:01 +00:00
Robert Watson
8640764682 Rename 'mac_mbuf_create_from_firewall' to 'mac_netinet_firewall_send' as
we move towards netinet as a pseudo-object for the MAC Framework.

Rename 'mac_create_mbuf_linklayer' to 'mac_mbuf_create_linklayer' to
reflect general object-first ordering preference.

Sponsored by:	SPARTA (original patches against Mac OS X)
Obtained from:	TrustedBSD Project, Apple Computer
2007-10-26 13:18:38 +00:00
Søren Schmidt
53a8035b0f Fix the signature matching code on AHCI controllers.
Add SATA ATAPI support for AHCI controllers.
2007-10-26 09:01:06 +00:00
Søren Schmidt
13a0de8755 Update the way we get the mode pages on probe. 2007-10-26 08:59:23 +00:00
Søren Schmidt
f31e86f556 Fix treating some modern chips (mem mapped) as legacy devices. 2007-10-26 08:57:08 +00:00
Pawel Jakub Dawidek
88882dcf11 Add GEOM VIRSTOR module to the build. 2007-10-26 08:23:57 +00:00
Julian Elischer
7ab24ea3b9 Introduce a way to make pure kernal threads.
kthread_add() takes the same parameters as the old kthread_create()
plus a pointer to a process structure, and adds a kernel thread
to that process.

kproc_kthread_add() takes the parameters for kthread_add,
plus a process name and a pointer to a pointer to a process instead of just
a pointer, and if the proc * is NULL, it creates the process to the
specifications required, before adding the thread to it.

All other old kthread_xxx() calls return, but act on (struct thread *)
instead of (struct proc *). One reason to change the name is so that
any old kernel modules that are lying around and expect kthread_create()
to make a process will not just accidentally link.

fix top to show  kernel threads by their thread name in -SH mode
add a tdnam formatting option to ps to show thread names.

make all idle threads actual kthreads and put them into their own idled process.
make all interrupt threads kthreads and put them in an interd process
(mainly for aesthetic and accounting reasons)
rename proc 0 to be 'kernel' and it's swapper thread is now 'swapper'

man page fixes to follow.
2007-10-26 08:00:41 +00:00
Pawel Jakub Dawidek
b656c1b836 Save stack only when KTR_GEOM is both compiled into the kernel and enabled
in debug.ktr.mask. Because saving stack is very expensive, it's better only
to do it when one really wants to.

Reported by:	Dan Nelson
2007-10-26 06:55:00 +00:00
Warner Losh
b2068c0c18 Simplify the old compat #ifdefs. 2007-10-26 05:02:47 +00:00
Peter Wemm
d556638404 Split /dev/nvram driver out of isa/clock.c for i386 and amd64. I have not
refactored it to be a generic device.
Instead of being part of the standard kernel, there is now a 'nvram' device
for i386/amd64.  It is in DEFAULTS like io and mem, and can be turned off
with 'nodevice nvram'.  This matches the previous behavior when it was
first committed.
2007-10-26 03:23:54 +00:00
Warner Losh
47e87d5ad0 Ooops. Put back Invariants and witness
Submitted by: csjp
2007-10-26 02:35:42 +00:00
Warner Losh
97816f8e3d Add usb serial devices by default. I'm tired of telling people how to
do this that should know better :-).
2007-10-26 02:20:29 +00:00
Christian S.J. Peron
57274c513c Implement AUE_CORE, which adds process core dump support into the kernel.
This change introduces audit_proc_coredump() which is called by coredump(9)
to create an audit record for the coredump event.  When a process
dumps a core, it could be security relevant.  It could be an indicator that
a stack within the process has been overflowed with an incorrectly constructed
malicious payload or a number of other events.

The record that is generated looks like this:

header,111,10,process dumped core,0,Thu Oct 25 19:36:29 2007, + 179 msec
argument,0,0xb,signal
path,/usr/home/csjp/test.core
subject,csjp,csjp,staff,csjp,staff,1101,1095,50457,10.37.129.2
return,success,1
trailer,111

- We allocate a completely new record to make sure we arent clobbering
  the audit data associated with the syscall that produced the core
  (assuming the core is being generated in response to SIGABRT  and not
  an invalid memory access).
- Shuffle around expand_name() so we can use the coredump name at the very
  beginning of the coredump call.  Make sure we free the storage referenced
  by "name" if we need to bail out early.
- Audit both successful and failed coredump creation efforts

Obtained from:	TrustedBSD Project
Reviewed by:	rwatson
MFC after:	1 month
2007-10-26 01:23:07 +00:00
Olivier Houchard
ed0b604f1f Add an option to be able to override the value of the AT91 master clock
frequency. It'd be better to be able to calculate it at runtime, but we need
the information very early, to setup the uart.
2007-10-25 23:02:42 +00:00
Olivier Houchard
2b953358ed Move some KB920x-specific options into the KB920x file. 2007-10-25 22:57:19 +00:00
Olivier Houchard
26989574c9 Fix signedness to make gcc happy. 2007-10-25 22:50:25 +00:00
Robert Watson
179da74eb8 Sort entry points in mac_framework.h and mac_policy.h alphabetically by
primary object type, and then by secondarily by method name.  This sorts
entry points relating to particular objects, such as pipes, sockets, and
vnodes together.

Sponsored by:	SPARTA (original patches against Mac OS X)
Obtained from:	TrustedBSD Project, Apple Computer
2007-10-25 22:45:25 +00:00
Olivier Houchard
9e753c174f Oooops, get the end of the memory right. 2007-10-25 22:43:17 +00:00
Takanori Watanabe
68fb6c4858 More style nit.
Pointed out by: njl.
2007-10-25 20:02:38 +00:00
Erwin Lansing
19de7d21cb Change a tab back to a space between #define and __FreeBSD_version.
This breaks OSVERSION determination in all ports.

Reviewed by:	rodrigc
2007-10-25 17:39:19 +00:00
John Baldwin
cc75dfe70b Don't attach to the "IBM0057" ID. This ID is used by IBM machines for
the PS/2 mouse controller.  Thus, when acpi_ibm(4) claimed the mouse
device, the mouse would stop working.  The one ACPI dump of an R40 that
I've looked at includes an HKEY device with the proper "IBM0068" ID, so
I'm not sure how the "IBM0057" ID could have helped at all.

MFC after:	1 week
Approved by:	njl
2007-10-25 17:30:18 +00:00
Takanori Watanabe
1de5ce99e3 Fix variable name to be clear what it means. 2007-10-25 17:03:07 +00:00
John Baldwin
627457cd4a Break out of the I/O retry loop as soon as an I/O operation succeeds rather
than always retrying operations three times.

Submitted by:	nyan
2007-10-25 16:53:35 +00:00
Takanori Watanabe
0bfeaded17 Turn EC into poll mode before device_resume invoked . 2007-10-25 16:49:07 +00:00