]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoExplicitly use STAILQ_REMOVE_HEAD() when we know we are removing the head
jhb [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
jhb [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,
csjp [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
jhb [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
jhb [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.
phk [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
phk [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.
jhb [Mon, 10 Jul 2006 15:55:38 +0000 (15:55 +0000)]
Regen.

18 years agoMark ibcs2_msgsys(), ibcs2_semsys(), and ibcs2_shmsys() MPSAFE.
jhb [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
alc [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().
alc [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.
thompsa [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
thompsa [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.
markm [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
scottl [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
twinterg [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.
markm [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
mjacob [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
mjacob [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
mjacob [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)
mjacob [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
markm [Sun, 9 Jul 2006 16:31:53 +0000 (16:31 +0000)]
Remove stale MAINTAINER

OK'd by: scottl

18 years agoDeclare UFS module version.
pjd [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
pjd [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
pjd [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 [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
rwatson [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
rwatson [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
rwatson [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 [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.
stefanf [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 [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 [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
cperciva [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.
jhb [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
jhb [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
jhb [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
jhb [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
jhb [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.
jhb [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
jhb [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
imp [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))
imp [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
imp [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
kib [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
kib [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.
des [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.
rodrigc [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.
netchild [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.
netchild [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.
netchild [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.
cperciva [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.
avatar [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

18 years agoAdding more antiques came from the RELENG_4(or prior) era: sbin/nfsd,
avatar [Sat, 8 Jul 2006 03:18:41 +0000 (03:18 +0000)]
Adding more antiques came from the RELENG_4(or prior) era: sbin/nfsd,
sbin/mount_portal and sbin/kget.

MFC after: 1 month

18 years agoMake in-kernel multicast protocols for pfsync and carp work after enabling
mlaier [Sat, 8 Jul 2006 00:01:01 +0000 (00:01 +0000)]
Make in-kernel multicast protocols for pfsync and carp work after enabling
dynamic resizing of multicast membership array.

Reported and testing by: Maxim Konovalov, Scott Ullrich
Reminded by: thompsa
MFC after: 2 weeks

18 years agoApply local modifications to make Unwind Express BETA 10 buildable and
marcel [Fri, 7 Jul 2006 23:56:34 +0000 (23:56 +0000)]
Apply local modifications to make Unwind Express BETA 10 buildable and
usable in the FreeBSD kernel.

18 years agoThis commit was generated by cvs2svn to compensate for changes in r160160,
marcel [Fri, 7 Jul 2006 23:04:49 +0000 (23:04 +0000)]
This commit was generated by cvs2svn to compensate for changes in r160160,
which included commits to RCS files with non-trunk default branches.

18 years agoThis commit was generated by cvs2svn to compensate for changes in r160157,
marcel [Fri, 7 Jul 2006 22:59:01 +0000 (22:59 +0000)]
This commit was generated by cvs2svn to compensate for changes in r160157,
which included commits to RCS files with non-trunk default branches.

18 years agoImport BETA 10 of HP's Unwind Express. This import does not contain
marcel [Fri, 7 Jul 2006 22:59:01 +0000 (22:59 +0000)]
Import BETA 10 of HP's Unwind Express. This import does not contain
any modifications to make it build as part of the FreeBSD kernel.
Now that the source appears to have stabilized, local changes will
happen on HEAD and will therefore cause affected files to be pulled
from the vendor branch.

18 years agoRemove bogus assertion.
pjd [Fri, 7 Jul 2006 14:32:27 +0000 (14:32 +0000)]
Remove bogus assertion.

Reported by: Bradley W. Dutton <brad-fbsd-stable@duttonbros.com>
MFC after: 3 days

18 years agoFollowing repo-copy of mac_is_present_np.3 to mac_is_present.3, remove
rwatson [Fri, 7 Jul 2006 14:02:17 +0000 (14:02 +0000)]
Following repo-copy of mac_is_present_np.3 to mac_is_present.3, remove
old file, update references, etc.  The C function is already named
mac_is_present().

Obtained from: TrustedBSD Project

18 years agoForced commit to recognize repo-copy of mac_is_present_np.3 to
rwatson [Fri, 7 Jul 2006 13:51:56 +0000 (13:51 +0000)]
Forced commit to recognize repo-copy of mac_is_present_np.3 to
mac_is_present.3.

Thanks to: simon
Obtained from: TrustedBSD Project

18 years agoFixed the threshold for using the simple Taylor approximation.
bde [Fri, 7 Jul 2006 04:33:08 +0000 (04:33 +0000)]
Fixed the threshold for using the simple Taylor approximation.

In e_log.c, there was just a off-by-1 (1 ulp) error in the comment
about the threshold.  The precision of the threshold is unimportant,
but the magic numbers in the code are easier to understand when the
threshold is described precisely.

In e_logf.c, mistranslation of the magic numbers gave an off-by-1
(1 * 16 ulps) error in the intended negative bound for the threshold
and an off-by-7 (7 * 16 ulps) error in the intended positive bound for
the threshold, and the intended bounds were not translated from the
double precision bounds so they were unnecessarily small by a factor
of about 2048.

The optimization of using the simple Taylor approximation for args
near a power of 2 is dubious since it only applies to a relatively
small proportion of args, but if it is done then doing it 2048 times
as often _may_ be more efficient.  (My benchmarks show unexplained
dependencies on the data that increase with further optimizations
in this area.)

18 years agoFix cut-n-paste bug: compare argument s against known aliases,
marcel [Fri, 7 Jul 2006 02:44:23 +0000 (02:44 +0000)]
Fix cut-n-paste bug: compare argument s against known aliases,
not the global optarg. This bug goes unnoticed because optarg
is so far always the actual argument for the formal argument s.

18 years agoFix checking of the "lock" file in the spool directory for a queue,
gad [Fri, 7 Jul 2006 01:12:26 +0000 (01:12 +0000)]
Fix checking of the "lock" file in the spool directory for a queue,
so that the checking will wind up with the correct mode-bits in
the case where the initial open() of that lock file will create it.
Due to this bug, the first job ever sent to a queue could leave
that queue in a "printing is disabled" state.

PR: 93469
Submitted by: Michael Szklarski of kco.com.pl
MFC after: 1 week

18 years agoMove POSIX.1e-specific utility routines from kern_acl.c to
rwatson [Thu, 6 Jul 2006 23:37:39 +0000 (23:37 +0000)]
Move POSIX.1e-specific utility routines from kern_acl.c to
subr_acl_posix1e.c, leaving kern_acl.c containing only ACL system
calls and utility routines common across ACL types.

Add subr_acl_posix1e.c to the build.

Obtained from: TrustedBSD Project

18 years agoForced commit to recognize repo-copy of kern_acl.c to subr_acl_posix1e.c,
rwatson [Thu, 6 Jul 2006 23:22:34 +0000 (23:22 +0000)]
Forced commit to recognize repo-copy of kern_acl.c to subr_acl_posix1e.c,
which will hold POSIX.1e-specific ACL routines.  kern_acl.c will conintue
to hold system calls and general purpose ACL routines common to both
POSIX.1e, NFSv4, and other types of ACLs we may support in the future.

Thanks to: simon
Obtained from: TrustedBSD Project

18 years agoRegen.
jhb [Thu, 6 Jul 2006 21:43:14 +0000 (21:43 +0000)]
Regen.

18 years ago- Protect the list of linux ioctl handlers with an sx lock.
jhb [Thu, 6 Jul 2006 21:42:36 +0000 (21:42 +0000)]
- Protect the list of linux ioctl handlers with an sx lock.
- Hold Giant while calling linux ioctl handlers for now as they aren't all
  known to be MPSAFE yet.
- Mark linux_ioctl() MPSAFE.

18 years ago- Explicitly acquire Giant around SYSINIT's and SYSUNINIT's since they are
jhb [Thu, 6 Jul 2006 21:39:39 +0000 (21:39 +0000)]
- Explicitly acquire Giant around SYSINIT's and SYSUNINIT's since they are
  not all known to be MPSAFE yet.
- Actually remove Giant from the kernel linker by taking it out of the
  KLD_LOCK() and KLD_UNLOCK() macros.

Pointy hat to: jhb (2)

18 years agoDon't try to copyin extra data for IPC_RMID requests to msgctl() or
jhb [Thu, 6 Jul 2006 21:38:24 +0000 (21:38 +0000)]
Don't try to copyin extra data for IPC_RMID requests to msgctl() or
shmctl().  None of the other ABI's do this (including the native FreeBSD
ABI), and uselessly trying to do a copyin() can actually result in a
bogus EFAULT if the a process specifies NULL for the optional argument
(which is what they should do in this case).

18 years agoRegen.
jhb [Thu, 6 Jul 2006 21:33:14 +0000 (21:33 +0000)]
Regen.

18 years agoAdd kern_setgroups() and kern_getgroups() and use them to implement
jhb [Thu, 6 Jul 2006 21:32:20 +0000 (21:32 +0000)]
Add kern_setgroups() and kern_getgroups() and use them to implement
ibcs2_[gs]etgroups() rather than using the stackgap.  This also makes
ibcs2_[gs]etgroups() MPSAFE.  Also, it cleans up one bit of weirdness in
the old setgroups() where it allocated an entire credential just so it had
a place to copy the group list into.  Now setgroups just allocates a
NGROUPS_MAX array on the stack that it copies into and then passes to
kern_setgroups().

18 years agoUse the regular poll(2) function to implement poll(2) for the IBCS2 compat
jhb [Thu, 6 Jul 2006 21:29:05 +0000 (21:29 +0000)]
Use the regular poll(2) function to implement poll(2) for the IBCS2 compat
ABI as FreeBSD's poll(2) is ABI compatible.  The ibcs2_poll() function
attempted to implement poll(2) using a wrapper around select(2).  Besides
being somewhat ugly, it also had at least one bug in that instead of
allocating complete fdset's on the stack via the stackgap it just allocated
pointers to fdsets.

18 years agoEnhanced floppy controllers have Data Rate Select Register (DSR) at 0x3f4.
jkim [Thu, 6 Jul 2006 21:12:18 +0000 (21:12 +0000)]
Enhanced floppy controllers have Data Rate Select Register (DSR) at 0x3f4.
Use it to reset controller and to select data rate.  According to Intel
80277AA datasheet, software reset behaves the same as DOR reset except
that it is self clearing.  National Semiconductor PC8477B datasheet says
the same.  As a side effect, we no longer use Configuration Control
Register (CCR) at 0x3f7 for these controllers, which is often missing
in modern hardware.

18 years agoAudit the remaining parameters to the extattr system calls. Generate
wsalamon [Thu, 6 Jul 2006 19:33:38 +0000 (19:33 +0000)]
Audit the remaining parameters to the extattr system calls. Generate
the audit records for those calls.

Obtained from: TrustedBSD Project
Approved by: rwatson (mentor)

18 years agoRemove now unneeded opt_mac.h and mac.h includes.
rwatson [Thu, 6 Jul 2006 13:25:51 +0000 (13:25 +0000)]
Remove now unneeded opt_mac.h and mac.h includes.

18 years agoRemove unneeded mac.h include.
rwatson [Thu, 6 Jul 2006 13:25:01 +0000 (13:25 +0000)]
Remove unneeded mac.h include.

MFC after: 3 days

18 years agoRemove now unneeded opt_mac.h and mac.h includes.
rwatson [Thu, 6 Jul 2006 13:24:22 +0000 (13:24 +0000)]
Remove now unneeded opt_mac.h and mac.h includes.

MFC after: 3 days

18 years agoUse #include "", not #include <> for opt_foo.h.
rwatson [Thu, 6 Jul 2006 13:22:08 +0000 (13:22 +0000)]
Use #include "", not #include <> for opt_foo.h.

MFC after: 3 days

18 years agoSince kernel & userland use different timebase and netstat is reading kernel
oleg [Thu, 6 Jul 2006 11:59:27 +0000 (11:59 +0000)]
Since kernel & userland use different timebase and netstat is reading kernel
memory directly, we should do timebase conversion for route lifetime.

Approved by: glebius (mentor)

18 years agoOops, library bumps should be reflected with OLD_LIBS.
delphij [Thu, 6 Jul 2006 11:43:53 +0000 (11:43 +0000)]
Oops, library bumps should be reflected with OLD_LIBS.

Pointed out by: maxim

18 years agoReflect library bumps caused by gethostbyaddr(3) change.
delphij [Thu, 6 Jul 2006 11:35:27 +0000 (11:35 +0000)]
Reflect library bumps caused by gethostbyaddr(3) change.

18 years agoFix a missing unlock operation in interrupt handler.
yongari [Thu, 6 Jul 2006 10:39:58 +0000 (10:39 +0000)]
Fix a missing unlock operation in interrupt handler.

PR: kern/99205
Submitted by: Alexey Illarionov <littlesavage AT rambler DOT ru>
MFC after: 1 week

18 years agoMake two simplifications to pmap_ts_referenced(): Eliminate an unnecessary
alc [Thu, 6 Jul 2006 06:17:08 +0000 (06:17 +0000)]
Make two simplifications to pmap_ts_referenced(): Eliminate an unnecessary
test and exit the loop in a shorter way.

18 years agoAdjust rt_(set|get)metrics() to do kernel <-> userland timebase conversion.
oleg [Thu, 6 Jul 2006 00:24:36 +0000 (00:24 +0000)]
Adjust rt_(set|get)metrics() to do kernel <-> userland timebase conversion.
We need it since kernel timebase has changed (time_second -> time_uptime).

Approved by: glebius (mentor)

18 years agoComplete timebase (time_second -> time_uptime) conversion.
oleg [Wed, 5 Jul 2006 23:37:21 +0000 (23:37 +0000)]
Complete timebase (time_second -> time_uptime) conversion.

PR: kern/94249
Reviewed by: andre (few months ago)
Approved by: glebius (mentor)

18 years agoFixed tanh(-0.0) on ia64 and optimizeed tanh(x) for 2**-55 <= |x| <
bde [Wed, 5 Jul 2006 22:59:33 +0000 (22:59 +0000)]
Fixed tanh(-0.0) on ia64 and optimizeed tanh(x) for 2**-55 <= |x| <
2**-28 as a side effect, by merging with the float precision version
of tanh() and the double precision version of sinh().

For tiny x, tanh(x) ~= x, and we used the expression x*(one+x) to
return this value (x) and set the inexact flag iff x != 0.  This
doesn't work on ia64 since gcc -O does the dubious optimization
x*(one+x) = x+x*x so as to use fma, so the sign of -0.0 was lost.

Instead, handle tiny x in the same as sinh(), although this is imperfect:
- return x directly and set the inexact flag in a less efficient way.
- increased the threshold for non-tinyness from 2**-55 to 2**-28 so that
  many more cases are optimized than are pessimized.

Updated some comments and fixed bugs in others (ranges for half-open
intervals mostly had the open end backwards, and there were nearby style
bugs).

18 years ago- Document RANDOMIZE_MASTER_SITES, MASTER_SORT
pav [Wed, 5 Jul 2006 20:38:54 +0000 (20:38 +0000)]
- Document RANDOMIZE_MASTER_SITES, MASTER_SORT
- Remove OPTIONS, it's no user settable variable

18 years ago- Document new missing target
pav [Wed, 5 Jul 2006 20:07:59 +0000 (20:07 +0000)]
- Document new missing target

18 years agoRemoved the optimized asm versions of scalb() and scalbf(). These
bde [Wed, 5 Jul 2006 20:06:42 +0000 (20:06 +0000)]
Removed the optimized asm versions of scalb() and scalbf().  These
functions are only for compatibility with obsolete standards.  They
shouldn't be used, so they shouldn't be optimized.  Use the generic
versions instead.

This fixes scalbf() as a side effect.  The optimized asm version left
garbage on the FP stack.  I fixed the corresponding bug in the optimized
asm scalb() and scalbn() in 1996.  NetBSD fixed it in scalb(), scalbn()
and scalbnf() in 1999 but missed fixing it in scalbf().  Then in 2005
the bug was reimplemented in FreeBSD by importing NetBSD's scalbf().

The generic versions have slightly different error handling:
- the asm versions blindly round the second parameter to a (floating
  point) integer and proceed, while the generic versions return NaN
  if this rounding changes the value.  POSIX permits both behaviours
  (these functions are XSI extensions and the behaviour for a bogus
  non-integral second parameter is unspecified).   Apart from this
  and the bug in scalbf(), the behaviour of the generic versions seems
  to be identical.  (I only exhusatively tested
  generic_scalbf(1.0F, anyfloat) == asm_scalb(1.0F, anyfloat).  This
  covers many representative corner cases involving NaNs and Infs but
  doesn't test exception flags.  The brokenness of scalbf() showed up
  as weird behaviour after testing just 7 integer cases sequentially.)

18 years agoRegen the system calls files, picking up the extended attr events, and some
wsalamon [Wed, 5 Jul 2006 19:24:14 +0000 (19:24 +0000)]
Regen the system calls files, picking up the extended attr events, and some
mount-related changes done previously.

Approved by: rwatson (mentor)

18 years agoForced commit to fix the log message for the previous commit: the C
bde [Wed, 5 Jul 2006 17:34:57 +0000 (17:34 +0000)]
Forced commit to fix the log message for the previous commit: the C
files for the scalb() family are only not used for i386, due to only
i386 having bogus optimized asm versions for the scalb() family.  Thus
on amd64, rev.1.10 had no effect in the same way as on all non-i386
arches (the strong reference is just implemented in asm on amd64).

18 years agoReplace inb() and outb() with bus_space_read_1() and bus_space_write_1()
emax [Wed, 5 Jul 2006 17:18:47 +0000 (17:18 +0000)]
Replace inb() and outb() with bus_space_read_1() and bus_space_write_1()

Submitted by: marius
MFC after: 1 week

18 years agoBack out my rev. 1.674. The better fix (rev. 1.637) is already in tree.
kib [Wed, 5 Jul 2006 16:33:25 +0000 (16:33 +0000)]
Back out my rev. 1.674. The better fix (rev. 1.637) is already in tree.

Approved by: kan (mentor)

18 years agoAdd audit events for the extended attribute system calls.
wsalamon [Wed, 5 Jul 2006 15:46:02 +0000 (15:46 +0000)]
Add audit events for the extended attribute system calls.

Obtained from: TrustedBSD Project
Approved by: rwatson (mentor)

18 years agoDocument ServerWorks HT1000 support.
brueffer [Wed, 5 Jul 2006 08:26:50 +0000 (08:26 +0000)]
Document ServerWorks HT1000 support.

18 years agopmap_clear_ptes() is already convoluted. This will worsen with the
alc [Wed, 5 Jul 2006 07:04:31 +0000 (07:04 +0000)]
pmap_clear_ptes() is already convoluted.  This will worsen with the
implementation of superpages.  Eliminate it and add pmap_clear_write().

There are no functional changes.  Checked by: md5

18 years agoFixed FP_R*. fp{get_set}round() apparently never worked on ia64, since
bde [Wed, 5 Jul 2006 06:10:21 +0000 (06:10 +0000)]
Fixed FP_R*.  fp{get_set}round() apparently never worked on ia64, since
the alpha values were used and are quite different.

Fixed some style bugs by copying from the i386 version where it is better.

18 years agoFix typo in comment.
yongari [Wed, 5 Jul 2006 04:56:50 +0000 (04:56 +0000)]
Fix typo in comment.

Submitted by: brad AT OpenBSD DOT org