]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoInitialise (if necessary) the VIA C3/C7 features.
Michael Reifenberger [Wed, 12 Jul 2006 19:46:08 +0000 (19:46 +0000)]
Initialise (if necessary) the VIA C3/C7 features.
Store the capabilities for further use by random(4), padlock(4), ...

Obtained from: mostly OpenBSD
MFC after: 1 week

18 years agoo Sort sx(9) MLINKS.
Maxim Konovalov [Wed, 12 Jul 2006 19:12:16 +0000 (19:12 +0000)]
o Sort sx(9) MLINKS.

18 years agoWhen securelevel is >= 1, /dev/io may not be opened at all (not just for
Giorgos Keramidas [Wed, 12 Jul 2006 18:12:11 +0000 (18:12 +0000)]
When securelevel is >= 1, /dev/io may not be opened at all (not just for
write).  Update the securelevel description to match this.

Reported by: Alexandros Kosiaris <akosiaris@gmail.com>
MFC after: 3 days

18 years agofix typo in identcpu.c and add one define to specialreg.h.
Michael Reifenberger [Wed, 12 Jul 2006 16:52:56 +0000 (16:52 +0000)]
fix typo in identcpu.c and add one define to specialreg.h.

MFC after: 1 week

18 years agoTeach mount(8) about a 'late' keyword, which means the file system should
Dag-Erling Smørgrav [Wed, 12 Jul 2006 16:05:51 +0000 (16:05 +0000)]
Teach mount(8) about a 'late' keyword, which means the file system should
not be mounted unless the -l flag was specified.

Add an rc script, mountlate, which basically runs 'mount -a -l'.  It runs
after DAEMON but before LOGIN.

This is useful for things like loopback mounts, because mountcritremote
runs before mountd  / nfsd (since /usr might be a remote file system), so
an attempt to mount a loopback network file system in mountcritremote will
fail.

Also add a progress message to mountcritlocal, for the sake of symmetry
with similar messages in mountcritremote and mountlate.

Reviewed by: freebsd-rc
MFC after: 3 weeks

18 years agoCorrect path to the firmware ports.
Christian Brueffer [Wed, 12 Jul 2006 15:55:48 +0000 (15:55 +0000)]
Correct path to the firmware ports.

18 years agoOnly check if we're freeing a valid object if we hold the topology lock.
Pawel Jakub Dawidek [Wed, 12 Jul 2006 15:44:00 +0000 (15:44 +0000)]
Only check if we're freeing a valid object if we hold the topology lock.
This prevents panic under heavy load with DIAGNOSTIC compiled in.

18 years agoDocument sx_xlocked(9).
Pawel Jakub Dawidek [Wed, 12 Jul 2006 15:40:35 +0000 (15:40 +0000)]
Document sx_xlocked(9).

Submitted by: ssouhlal

18 years agoforgot to add MFC, since its used on -stable and compile-tested on -current.
Michael Reifenberger [Wed, 12 Jul 2006 14:59:07 +0000 (14:59 +0000)]
forgot to add MFC, since its used on -stable and compile-tested on -current.

MFC after: 1 week

18 years agoFirst step to identify and initialize the newer VIA C7 CPU
Michael Reifenberger [Wed, 12 Jul 2006 14:52:32 +0000 (14:52 +0000)]
First step to identify and initialize the newer VIA C7 CPU
as found in a VIA EPIA EN-15000 board.

Obtained from: large parts from OpenBSD

18 years agoo Add missed comma, xref kld(4).
Maxim Konovalov [Wed, 12 Jul 2006 14:33:52 +0000 (14:33 +0000)]
o Add missed comma, xref kld(4).

18 years agoo Fix some printf(3) format nits in my patch I submitted to kib@.
Maxim Konovalov [Wed, 12 Jul 2006 13:36:08 +0000 (13:36 +0000)]
o Fix some printf(3) format nits in my patch I submitted to kib@.

Submitted by: ru

18 years agoRemove slipped in spaces.
Konstantin Belousov [Wed, 12 Jul 2006 12:42:47 +0000 (12:42 +0000)]
Remove slipped in spaces.

Pointed out by: maxim
Approved by: pjd (mentor)

18 years agoCheck that the signal number is in range.
Konstantin Belousov [Wed, 12 Jul 2006 12:41:56 +0000 (12:41 +0000)]
Check that the signal number is in range.

Submitted by: maxim
MFC after: 1 week
Approved by: pjd (mentor)

18 years agoUse proper format specifier for pointers in debug printfs (turned off
Konstantin Belousov [Wed, 12 Jul 2006 11:41:53 +0000 (11:41 +0000)]
Use proper format specifier for pointers in debug printfs (turned off
by default).

Approved by: pjd (mentor)
MFC after: 2 weeks

18 years agoAlways supply curthread as argument to nfs_asyncio and nfs_doio
Konstantin Belousov [Wed, 12 Jul 2006 09:16:35 +0000 (09:16 +0000)]
Always supply curthread as argument to nfs_asyncio and nfs_doio
in nfs_strategy. Otherwise, for some buffers, signals would be ignored
at the intr mounts.

Reviewed by: mohan, cel
MFC after: 1 month
Approved by: pjd (mentor)

18 years agoCheck that the signal number is in range.
Konstantin Belousov [Wed, 12 Jul 2006 09:13:33 +0000 (09:13 +0000)]
Check that the signal number is in range.

Submitted by: Michiel Boland <michiel boland org>
MFC after: 1 week
Approved by: pjd (mentor)

18 years agoFix config page writes to not strip out the attributes when you
Matt Jacob [Wed, 12 Jul 2006 07:48:50 +0000 (07:48 +0000)]
Fix config page writes to not strip out the attributes when you
actually go write the config page. This fixes the long standing
problem about updating NVRAM on Fibre Channel cards and seems
so far to not break SPI config page writes.

Put back role setting into mpt. That is, you can set a desired role
for mpt as a hint. On the next reboot, it'll pick that up and redo
the NVRAM settings appropriately and warn you that this won't take
effect until the next reboot. This saves people the step of having
to find a BIOS utilities disk to set target and/or initiator role
for the MPT cards.

18 years agoUse newkg to check if SCHED_OTHER is already inherited.
David Xu [Wed, 12 Jul 2006 07:02:28 +0000 (07:02 +0000)]
Use newkg to check if SCHED_OTHER is already inherited.

18 years agoMove debug printfs under the proper macro.
Nate Lawson [Wed, 12 Jul 2006 06:29:59 +0000 (06:29 +0000)]
Move debug printfs under the proper macro.

18 years agoUse kernel facilities to support real-time scheduling.
David Xu [Wed, 12 Jul 2006 06:13:18 +0000 (06:13 +0000)]
Use kernel facilities to support real-time scheduling.

18 years agoAdd two new CPUID bits for AMD CPUs, i. e., SVM and extended APIC register.
Jung-uk Kim [Wed, 12 Jul 2006 06:04:12 +0000 (06:04 +0000)]
Add two new CPUID bits for AMD CPUs, i. e., SVM and extended APIC register.

18 years agoReturn priority range 0..PRI_MAX_TIMESHARE-PRI_MIN_TIMESHARE for
David Xu [Wed, 12 Jul 2006 05:54:17 +0000 (05:54 +0000)]
Return priority range 0..PRI_MAX_TIMESHARE-PRI_MIN_TIMESHARE for
SCHED_OTHER, the same range as rtprio() is using. In old code,
it returns nice range -20 .. 20, nice should be treated as process
weight, it is really managed by getpriority() and setpriority()
syscalls, they are different.

18 years ago__error could be called too early before libthr is initialized, test
David Xu [Wed, 12 Jul 2006 03:44:05 +0000 (03:44 +0000)]
__error could be called too early before libthr is initialized, test
this case and return global varible errno instead.

18 years agoAssume floppy disk is not inserted when we have exhausted retries. This
Jung-uk Kim [Wed, 12 Jul 2006 00:49:46 +0000 (00:49 +0000)]
Assume floppy disk is not inserted when we have exhausted retries.  This
significantly reduces booting time when there is broken floppy disk drive,
controller, cable, BIOS, etc.
When the floppy controller interface is correctly implemented, disk change
signal (DSKCHG) is reflected in the Digital Input Register (DIR) at 0x3f7.
However, there are many cases that the signal is unusable.  Moreover, some
BIOS does not reserve the port at all.  In those cases, the register may not
function.

18 years agoComment out the mapping of the OHCI controller registers va == pa. This
Olivier Houchard [Wed, 12 Jul 2006 00:48:50 +0000 (00:48 +0000)]
Comment out the mapping of the OHCI controller registers va == pa. This
address is in the userland address space. The proper thing is either to choose
a virtual address in the kernel address space beyond the KVA, or to use
pmap_mapdev().

18 years agoSeveral protocol switch functions (pru_abort, pru_detach, pru_sosetlabel)
Robert Watson [Tue, 11 Jul 2006 23:18:28 +0000 (23:18 +0000)]
Several protocol switch functions (pru_abort, pru_detach, pru_sosetlabel)
return void, so don't implement no-op versions of these functions.
Instead, consistently check if those switch pointers are NULL before
invoking them.

18 years agoWhen pru_attach() fails, call sodealloc() on the socket rather than
Robert Watson [Tue, 11 Jul 2006 21:56:58 +0000 (21:56 +0000)]
When pru_attach() fails, call sodealloc() on the socket rather than
using sorele() and the full tear-down path.  Since protocol state
allocation failed, this is not required (and is arguably undesirable).
This matches the behavior of sonewconn() under the same circumstances.

18 years agoReduce periods of simultaneous acquisition of various socket buffer
Robert Watson [Tue, 11 Jul 2006 21:49:54 +0000 (21:49 +0000)]
Reduce periods of simultaneous acquisition of various socket buffer
locks and the unplock during uipc_rcvd() and uipc_send() by caching
certain values from one structure while its locks are held, and
applying them to a second structure while its locks are held.  If
done carefully, this should be correct, and will reduce the amount
of work done with the global unp lock held.

Tested by: kris (earlier version)

18 years agoRegen.
John Baldwin [Tue, 11 Jul 2006 20:55:23 +0000 (20:55 +0000)]
Regen.

18 years ago- Add conditional VFS Giant locking to getdents_common() (linux ABIs),
John Baldwin [Tue, 11 Jul 2006 20:52:08 +0000 (20:52 +0000)]
- Add conditional VFS Giant locking to getdents_common() (linux ABIs),
  ibcs2_getdents(), ibcs2_read(), ogetdirentries(), svr4_sys_getdents(),
  and svr4_sys_getdents64() similar to that in getdirentries().
- Mark ibcs2_getdents(), ibcs2_read(), linux_getdents(), linux_getdents64(),
  linux_readdir(), ogetdirentries(), svr4_sys_getdents(), and
  svr4_sys_getdents64() MPSAFE.

18 years agoThe ufs_lookup.c has a critical bug around the whiteout
Daichi GOTO [Tue, 11 Jul 2006 17:27:04 +0000 (17:27 +0000)]
The ufs_lookup.c has a critical bug around the whiteout
process. UFS must check a whiteout name when it uses the
whiteout, but the current implementation does not check
the whileout name, so sometimes UFS writes over a wrong
whtieout. UFS *MUST* check the whiteout name to use a
corrent whiteout. This bug leads unionfs. panic.
This commit fixes this trouble.

Submitted by: Masanori Ozawa <ozawa@ongs.co.jp> (unionfs developer)
Reviewed by: tegge & rodrigc (mentor)
Approved by: rodrigc (mentor)
MFC after: 2 weeks

18 years agoGah. Replace another instance of "Developer's Handbook" with
Joel Dahl [Tue, 11 Jul 2006 16:26:40 +0000 (16:26 +0000)]
Gah.  Replace another instance of "Developer's Handbook" with
"Architecture Handbook".

18 years agoAdd a new flag to pmap_enter_locked() to say if it's OK to wait. If it is, and
Olivier Houchard [Tue, 11 Jul 2006 11:22:06 +0000 (11:22 +0000)]
Add a new flag to pmap_enter_locked() to say if it's OK to wait. If it is, and
we're unable to allocate the memory for a PTE, we'll wait until we can. If not,
we'll just return.
Use M_NOWAIT|M_USE_RESERVE to allocate PTEs, it is less aggressive than
M_NOWAIT alone.

Suggested by:   alc

18 years agoDon't forget to check invalid policy!
David Xu [Tue, 11 Jul 2006 08:19:57 +0000 (08:19 +0000)]
Don't forget to check invalid policy!

18 years agoOops, remove debugger line.
David Xu [Tue, 11 Jul 2006 06:15:46 +0000 (06:15 +0000)]
Oops, remove debugger line.

18 years agoExtended the POSIX scheduler APIs to accept lwpid as well, we've already
David Xu [Tue, 11 Jul 2006 06:11:34 +0000 (06:11 +0000)]
Extended the POSIX scheduler APIs to accept lwpid as well, we've already
done this in ptrace syscall, when a pid is large than PID_MAX, the syscall
will search a thread in current process. It permits 1:1 thread library to
get and set a thread's scheduler attributes.

18 years agoRemove pre-commit review on mpt.
Matt Jacob [Tue, 11 Jul 2006 06:09:54 +0000 (06:09 +0000)]
Remove pre-commit review on mpt.

18 years agoFor SCHED_OTHER, we always inherit current thread's interactive priority
David Xu [Tue, 11 Jul 2006 06:01:14 +0000 (06:01 +0000)]
For SCHED_OTHER, we always inherit current thread's interactive priority
unless current thread is realtime thread, in such case, we set a new zero
priority for it, notice we don't have per-thread nice, the priority
passed by userland is ignored here.

18 years agoAdd POSIX scheduler parameters support to thr_new syscall, this permits
David Xu [Tue, 11 Jul 2006 05:34:35 +0000 (05:34 +0000)]
Add POSIX scheduler parameters support to thr_new syscall, this permits
privileged process to create realtime thread.

18 years agoCreate thread in separated ksegrp, so they always get correct user level
David Xu [Mon, 10 Jul 2006 23:14:07 +0000 (23:14 +0000)]
Create thread in separated ksegrp, so they always get correct user level
priority.

18 years agoPut in some missing target mode for 2KLOGIN f/w spots.
Matt Jacob [Mon, 10 Jul 2006 22:40:21 +0000 (22:40 +0000)]
Put in some missing target mode for 2KLOGIN f/w spots.

MFC after: 1 month

18 years agoClean up the ioctl to not process nonsense on SCSI isp cards.
Matt Jacob [Mon, 10 Jul 2006 22:39:32 +0000 (22:39 +0000)]
Clean up the ioctl to not process nonsense on SCSI isp cards.

MFC after: 1 month

18 years ago- Split out kern_accept(), kern_getpeername(), and kern_getsockname() for
John Baldwin [Mon, 10 Jul 2006 21:38:17 +0000 (21:38 +0000)]
- Split out kern_accept(), kern_getpeername(), and kern_getsockname() for
  use by ABI emulators.
- Alter the interface of kern_recvit() somewhat.  Specifically, go ahead
  and hard code UIO_USERSPACE in the uio as that's what all the callers
  specify.  In place, add a new uioseg to indicate what type of pointer
  is in mp->msg_name.  Previously it was always a userland address, but
  ABI emulators may pass in kernel-side sockaddrs.  Also, remove the
  namelenp field and instead require the two places that used it to
  explicitly copy mp->msg_namelen out to userland.
- Use the patched kern_recvit() to replace svr4_recvit() and the stock
  kern_sendit() to replace svr4_sendit().
- Use kern_bind() instead of stackgap use in ti_bind().
- Use kern_getpeername() and kern_getsockname() instead of stackgap in
  svr4_stream_ti_ioctl().
- Use kern_connect() instead of stackgap in svr4_do_putmsg().
- Use kern_getpeername() and kern_accept() instead of stackgap in
  svr4_do_getmsg().
- Retire the stackgap from SVR4 compat as it is no longer used.

18 years agoUse proper defines instead of magic values.
Pawel Jakub Dawidek [Mon, 10 Jul 2006 21:18:00 +0000 (21:18 +0000)]
Use proper defines instead of magic values.

MFC after: 1 week

18 years agoThe TrustedBSD MAC Framework is documented in the Architecture handbook,
Joel Dahl [Mon, 10 Jul 2006 20:51:30 +0000 (20:51 +0000)]
The TrustedBSD MAC Framework is documented in the Architecture handbook,
not in the Developers handbook.

Submitted by: Samy Al Bahra

18 years agoUnexpand PTRIN() in several places and fix one instance where 0 was being
John Baldwin [Mon, 10 Jul 2006 19:37:43 +0000 (19:37 +0000)]
Unexpand PTRIN() in several places and fix one instance where 0 was being
used instead of NULL.

18 years agoExplicitly use STAILQ_REMOVE_HEAD() when we know we are removing the head
John Baldwin [Mon, 10 Jul 2006 19:28:57 +0000 (19:28 +0000)]
Explicitly use STAILQ_REMOVE_HEAD() when we know we are removing the head
element to avoid confusing Coverity.  It's now also easier for humans to
parse as well.

Found by: Coverity Prevent(tm)
CID: 1201

18 years agoFix two more instances of using a linker_file_t object in TAILQ() macros
John Baldwin [Mon, 10 Jul 2006 19:13:45 +0000 (19:13 +0000)]
Fix two more instances of using a linker_file_t object in TAILQ() macros
after free'ing it.

Found by: Coverity Prevent(tm)
CID: 1435

18 years agoImplement mpo_associate_nfsd_label entry point for the BIBA security policy,
Christian S.J. Peron [Mon, 10 Jul 2006 19:13:32 +0000 (19:13 +0000)]
Implement mpo_associate_nfsd_label entry point for the BIBA security policy,
we will initialize the label to biba/low for files that have been created
through an NFS RPC. This is a safe default given the default nature of our
NFS implementation, there is not a whole lot of data integrity there by
default. This also fixes kernel panics associated with file creation over NFS
while creating files on filesystems which have multilabel enabled with BIBA
enabled.

MFC after: 2 weeks
Discussed with: rwatson

18 years agoDon't try to reuse the linker_file structure after we've freed it when
John Baldwin [Mon, 10 Jul 2006 19:06:01 +0000 (19:06 +0000)]
Don't try to reuse the linker_file structure after we've freed it when
throwing out the kld's loaded by the loader that didn't successfully link.

Found by: Coverity Prevent(tm)
CID: 1435

18 years agoRetire the stackgap macros from ibcs2 as they are no longer used. Push
John Baldwin [Mon, 10 Jul 2006 17:59:26 +0000 (17:59 +0000)]
Retire the stackgap macros from ibcs2 as they are no longer used.  Push
the includes of <sys/exec.h> and <sys/sysent.h> down into the only files
that now need them.

18 years agoAnd now without typo.
Poul-Henning Kamp [Mon, 10 Jul 2006 16:53:32 +0000 (16:53 +0000)]
And now without typo.

18 years agoAdd a good quote that gets used a lot in the debate about global
Poul-Henning Kamp [Mon, 10 Jul 2006 16:30:46 +0000 (16:30 +0000)]
Add a good quote that gets used a lot in the debate about global
warming right now:

It is difficult to get a man to understand something when his salary
depends upon his not understanding it.
                -- Upton Sinclir

18 years agoRegen.
John Baldwin [Mon, 10 Jul 2006 15:55:38 +0000 (15:55 +0000)]
Regen.

18 years agoMark ibcs2_msgsys(), ibcs2_semsys(), and ibcs2_shmsys() MPSAFE.
John Baldwin [Mon, 10 Jul 2006 15:55:17 +0000 (15:55 +0000)]
Mark ibcs2_msgsys(), ibcs2_semsys(), and ibcs2_shmsys() MPSAFE.

18 years agoSet debug.mpsafevm to true on PowerPC. (Now, by default, all architectures
Alan Cox [Mon, 10 Jul 2006 07:08:05 +0000 (07:08 +0000)]
Set debug.mpsafevm to true on PowerPC.  (Now, by default, all architectures
in CVS have debug.mpsafevm set to true.)

Tested by: grehan@

18 years agoAdd synchronization to moea_zero_page() and moea_zero_page_area().
Alan Cox [Mon, 10 Jul 2006 07:03:37 +0000 (07:03 +0000)]
Add synchronization to moea_zero_page() and moea_zero_page_area().

Remove the acquisition and release of Giant from moea_zero_page_idle().

Tested by: grehan@

18 years agoAdd enc(4), it can still build with FAST_IPSEC commented out.
Andrew Thompson [Mon, 10 Jul 2006 05:25:18 +0000 (05:25 +0000)]
Add enc(4), it can still build with FAST_IPSEC commented out.

18 years agoCatch up with the revised network interface cloning which takes an optional
Andrew Thompson [Mon, 10 Jul 2006 05:24:06 +0000 (05:24 +0000)]
Catch up with the revised network interface cloning which takes an optional
opaque parameter that can specify configuration parameters.

18 years agoMore inactive maintainers.
Mark Murray [Sun, 9 Jul 2006 21:47:37 +0000 (21:47 +0000)]
More inactive maintainers.

18 years agoUse a sleep mutex instead of an sx lock for the kernel environment. This
Scott Long [Sun, 9 Jul 2006 21:42:58 +0000 (21:42 +0000)]
Use a sleep mutex instead of an sx lock for the kernel environment.  This
allows greater flexibility for drivers that want to query the environment.

Reviewed by: jhb, mux

18 years agoExtend i4b to support CAPI manager based ISDN controllers (CAPI manager is part of
Thomas Wintergerst [Sun, 9 Jul 2006 21:16:06 +0000 (21:16 +0000)]
Extend i4b to support CAPI manager based ISDN controllers (CAPI manager is part of
c4b, CAPI for BSD). This is a preparation to add CAPI for BSD to the source tree.

Approved by: hm (mentor)
MFC after: 2 weeks

18 years agoMore stale maintainer.
Mark Murray [Sun, 9 Jul 2006 20:26:36 +0000 (20:26 +0000)]
More stale maintainer.

18 years agoConvert isp(4) and ispfw(4) to use firmware(9) to manage firmware
Matt Jacob [Sun, 9 Jul 2006 17:50:20 +0000 (17:50 +0000)]
Convert isp(4) and ispfw(4) to use firmware(9) to manage firmware
loading for the QLogic cards.

Because isp(4) exists before the root is mounted, it's not really
possible for us to use the kernel's linker to load modules directly
from disk- that's really too bad.

However, the this is still a net win in in that the firmware has
been split up on a per chip (and in some cases, functionality)
basis, so the amount of stuff loaded *can* be substantially less
than the 1.5MB of firmware images that ispfw now manages. That is,
each specific f/w set is now also built as a module. For example,
QLogic 2322 f/w is built as isp_2322.ko and Initiator/Target 1080
firmware is built as isp_1080_it.ko.

For compatibility purposes (i.e., to perturb folks the least), we
also still build all of the firmware as one ispfw.ko module.

This allows us to let 'ispfw_LOAD' keep on working in existing
loader.conf files. If you now want to strip this down to just
the firmware for your h/w, you can then change loader.conf to
load the f/w you specifically want.

We also still allow for ispfw to be statically built (e.g., for
PAE and sparc64).

Future changes will look at f/w unloading and also role switching
that then uses the kernel linker to load different ips f/w sets.
MFC after: 2 months

18 years agoMake the firmware assist driver resident in
Matt Jacob [Sun, 9 Jul 2006 16:41:22 +0000 (16:41 +0000)]
Make the firmware assist driver resident in
preparation for isp using it.

Reviewed by: sam, max

18 years agoMake the firmware assist driver resident in
Matt Jacob [Sun, 9 Jul 2006 16:40:31 +0000 (16:40 +0000)]
Make the firmware assist driver resident in
preparation for isp using it.

18 years agoIf PAE is built w/o modules, make sure that isp(4)
Matt Jacob [Sun, 9 Jul 2006 16:38:58 +0000 (16:38 +0000)]
If PAE is built w/o modules, make sure that isp(4)
has its firmware resident as well.

18 years agoRemove stale MAINTAINER
Mark Murray [Sun, 9 Jul 2006 16:31:53 +0000 (16:31 +0000)]
Remove stale MAINTAINER

OK'd by: scottl

18 years agoDeclare UFS module version.
Pawel Jakub Dawidek [Sun, 9 Jul 2006 14:11:09 +0000 (14:11 +0000)]
Declare UFS module version.

18 years agoChange fs->fs_fsmnt to mp->mnt_stat.f_mntonname in warnings about missing
Pawel Jakub Dawidek [Sun, 9 Jul 2006 14:10:35 +0000 (14:10 +0000)]
Change fs->fs_fsmnt to mp->mnt_stat.f_mntonname in warnings about missing
MAC and ACLs support in the kernel. If it is a first mount, fs->fs_fsmnt
is empty.

MFC after: 1 week

18 years agoWhen kern.geom.raid3.use_malloc tunnable is set to 1, malloc(9) instead of
Pawel Jakub Dawidek [Sun, 9 Jul 2006 12:25:56 +0000 (12:25 +0000)]
When kern.geom.raid3.use_malloc tunnable is set to 1, malloc(9) instead of
uma(9) will be used for memory allocation.
In case of problems or tracking bugs, there are more useful tools for malloc(9)
debugging than for uma(9) debugging, like memguard(9) and redzone(9).

MFC after: 1 week

18 years agoo style.Makefile(5): WARNS= -> WARNS?=.
Maxim Konovalov [Sun, 9 Jul 2006 11:51:14 +0000 (11:51 +0000)]
o style.Makefile(5): WARNS= -> WARNS?=.

18 years agoWhen extending a file with truncate, check that newly added bytes have
Robert Watson [Sun, 9 Jul 2006 10:56:36 +0000 (10:56 +0000)]
When extending a file with truncate, check that newly added bytes have
a value of 0 in the extended region.

Make sure that we get EINVAL back if we try to truncate a read-only
file descriptor.

18 years agoAdd regression tests to make sure that attempting to call ftruncate() on
Robert Watson [Sun, 9 Jul 2006 10:43:31 +0000 (10:43 +0000)]
Add regression tests to make sure that attempting to call ftruncate() on
various non-file objects fails.

18 years agoAdd very basic ftruncate() regression test, with a comment rather more
Robert Watson [Sun, 9 Jul 2006 10:19:07 +0000 (10:19 +0000)]
Add very basic ftruncate() regression test, with a comment rather more
thorough than the tests regarding what should be tested.

18 years agoo Fix MTX_SYSINIT prototype.
Maxim Konovalov [Sun, 9 Jul 2006 09:46:43 +0000 (09:46 +0000)]
o Fix MTX_SYSINIT prototype.

PR: kern/99956
Submitted by: Arne Woerner
MFC after: 1 week

18 years agoFix spelling in a comment.
Stefan Farfeleder [Sun, 9 Jul 2006 06:54:24 +0000 (06:54 +0000)]
Fix spelling in a comment.

18 years agoo replace special handling of clone operations by a clone callback
Sam Leffler [Sun, 9 Jul 2006 06:10:23 +0000 (06:10 +0000)]
o replace special handling of clone operations by a clone callback
  mechanism
o change vlan cloning to use callback and pass all vlan parameters
  on create using the new SIOCREATE2 ioctl
o update vlan set logic to match existing practice

18 years agoRevise network interface cloning to take an optional opaque
Sam Leffler [Sun, 9 Jul 2006 06:04:01 +0000 (06:04 +0000)]
Revise network interface cloning to take an optional opaque
parameter that can specify configuration parameters:
o rev cloner api's to add optional parameter block
o add SIOCCREATE2 that accepts parameter data
o rev vlan support to use new api (maintain old code)

Reviewed by: arch@

18 years agoRemove build timestamps. There's no need to know exactly when these programs
Colin Percival [Sun, 9 Jul 2006 05:53:24 +0000 (05:53 +0000)]
Remove build timestamps.  There's no need to know exactly when these programs
were built, and this removal makes these binaries build the same every time.

MFC after: 1 week

18 years agoRegen.
John Baldwin [Sat, 8 Jul 2006 20:14:34 +0000 (20:14 +0000)]
Regen.

18 years ago- Split ioctl() up into ioctl() and kern_ioctl(). The kern_ioctl() assumes
John Baldwin [Sat, 8 Jul 2006 20:12:14 +0000 (20:12 +0000)]
- Split ioctl() up into ioctl() and kern_ioctl().  The kern_ioctl() assumes
  that the 'data' pointer is already setup to point to a valid KVM buffer
  or contains the copied-in data from userland as appropriate (ioctl(2)
  still does this).  kern_ioctl() takes care of looking up a file pointer,
  implementing FIONCLEX and FIOCLEX, and calling fi_ioctl().
- Use kern_ioctl() to implement xenix_rdchk() instead of using the stackgap
  and mark xenix_rdchk() MPSAFE.

18 years agoUse kern_connect() in spx_open() to avoid the need for the stackgap. I
John Baldwin [Sat, 8 Jul 2006 20:05:04 +0000 (20:05 +0000)]
Use kern_connect() in spx_open() to avoid the need for the stackgap.   I
also used kern_close() for simplicity though close(2) wasn't requiring
the use of the stackgap.

18 years agoAdd a kern_close() so that the ABIs can close a file descriptor w/o having
John Baldwin [Sat, 8 Jul 2006 20:03:39 +0000 (20:03 +0000)]
Add a kern_close() so that the ABIs can close a file descriptor w/o having
to populate a close_args struct and change some of the places that do.

18 years ago- Split the IBCS2 ipc foosys() system calls up into subfunctions matching
John Baldwin [Sat, 8 Jul 2006 19:54:12 +0000 (19:54 +0000)]
- Split the IBCS2 ipc foosys() system calls up into subfunctions matching
  the organization in svr4_ipc.c.
- Use kern_msgctl(), kern_semctl(), and kern_shmctl() instead of the
  stackgap.

18 years agoUse ibsc2_key_t rather than key_t.
John Baldwin [Sat, 8 Jul 2006 19:52:49 +0000 (19:52 +0000)]
Use ibsc2_key_t rather than key_t.

18 years agoRework kern_semctl a bit to always assume the UIO_SYSSPACE case. This
John Baldwin [Sat, 8 Jul 2006 19:51:38 +0000 (19:51 +0000)]
Rework kern_semctl a bit to always assume the UIO_SYSSPACE case.  This
mostly consists of pushing a few copyin's and copyout's up into
__semctl() as all the other callers were already doing the UIO_SYSSPACE
case.  This also changes kern_semctl() to set the return value in a passed
in pointer to a register_t rather than td->td_retval[0] directly so that
callers can only set td->td_retval[0] if all the various copyout's succeed.

As a result of these changes, kern_semctl() no longer does copyin/copyout
(except for GETALL/SETALL) so simplify the locking to acquire the semakptr
mutex before the MAC check and hold it all the way until the end of the
big switch statement.  The GETALL/SETALL cases have to temporarily drop it
while they do copyin/malloc and copyout.  Also, simplify the SETALL case to
remove handling for a non-existent race condition.

18 years agoCreate bus_enumerate_hinted_children. This routine will allow drivers
Warner Losh [Sat, 8 Jul 2006 17:06:15 +0000 (17:06 +0000)]
Create bus_enumerate_hinted_children.  This routine will allow drivers
to use the hinted child system.  Bus drivers that use this need to
implmenet the bus_hinted_child method, where they actually add the
child to their bus, as they see fit.  The bus is repsonsible for
getting the attribtues for the child, adding it in the right order,
etc.  ISA hinting will be updated to use this method.

MFC After: 3 days

18 years ago(apply '(lambda (reformat-region 'style-9-parens)) (read-file isahint.c))
Warner Losh [Sat, 8 Jul 2006 16:50:10 +0000 (16:50 +0000)]
(apply '(lambda (reformat-region 'style-9-parens)) (read-file isahint.c))

remove redundant parens, per style(9) to reduce that limp, lispy feeling.

18 years agoRemove old GENERIC kludge. We no longer need to skip devices named
Warner Losh [Sat, 8 Jul 2006 15:51:55 +0000 (15:51 +0000)]
Remove old GENERIC kludge.  We no longer need to skip devices named
atkbd.  Version 1.162 of GENERIC fixed this problem in April of 1999.
Subsequent to that, the hints data was removed from GENERIC and move
to hints files.  All the hints file ever created have atkbd at the
right location.  This should have been removed just after RELENG_4 was
branched (and likely around 4.5 in RELENG_4).

MFC After: 3 days

18 years agoSignals may be delivered to process as well as to the thread. Check the
Konstantin Belousov [Sat, 8 Jul 2006 15:39:11 +0000 (15:39 +0000)]
Signals may be delivered to process as well as to the thread. Check the
thread-delivered signals in addition to the process one.

Reviewed by: mohan
MFC after: 1 month
Approved by: kan (mentor)

18 years agoAlways supply curthread as argument to nfs_asyncio and nfs_doio
Konstantin Belousov [Sat, 8 Jul 2006 15:36:51 +0000 (15:36 +0000)]
Always supply curthread as argument to nfs_asyncio and nfs_doio
in nfs_strategy. Otherwise, for some buffers, signals would be ignored
at the intr mounts.

Reviewed by: mohan
MFC after: 1 month
Approved by: kan (mentor)

18 years agoTurn on libfetch debugging if -v was specified on the command line.
Dag-Erling Smørgrav [Sat, 8 Jul 2006 14:34:56 +0000 (14:34 +0000)]
Turn on libfetch debugging if -v was specified on the command line.

MFC after: 2 weeks

18 years agoIn get_exportlist(), properly loop over mounted filesystems.
Craig Rodrigues [Sat, 8 Jul 2006 13:49:24 +0000 (13:49 +0000)]
In get_exportlist(), properly loop over mounted filesystems.

PR: bin/99873
Submitted by: Danny Braniss <danny at cs dot huji dot ac dot il>

18 years agoRemove after repo copy to src/tools/kerneldoc.
Alexander Leidinger [Sat, 8 Jul 2006 12:34:29 +0000 (12:34 +0000)]
Remove after repo copy to src/tools/kerneldoc.

Requested by: trhodes
Repo copy by: simon

18 years agoAdd (missing) and remove (obsolete) .m files.
Alexander Leidinger [Sat, 8 Jul 2006 12:32:42 +0000 (12:32 +0000)]
Add (missing) and remove (obsolete) .m files.

18 years agoForced commit to note repo copy from sys/doc.
Alexander Leidinger [Sat, 8 Jul 2006 12:31:33 +0000 (12:31 +0000)]
Forced commit to note repo copy from sys/doc.

Requested by: trhodes
Repo copy by: simon

18 years agoAdd note concerning FreeBSD-SA-06:01.texindex.
Colin Percival [Sat, 8 Jul 2006 07:32:41 +0000 (07:32 +0000)]
Add note concerning FreeBSD-SA-06:01.texindex.

Suggested by: csjp

18 years agoOops, it is sbin/nfsd that was removed, not the man page.
Tai-hwa Liang [Sat, 8 Jul 2006 03:22:44 +0000 (03:22 +0000)]
Oops, it is sbin/nfsd that was removed, not the man page.

MFC after: 1 month