]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years ago - Use VFS_LOCK_GIANT() in place of mtx_lock(&giant), etc.
Jeff Roberson [Mon, 24 Jan 2005 10:19:31 +0000 (10:19 +0000)]
 - Use VFS_LOCK_GIANT() in place of mtx_lock(&giant), etc.

Sponsored By: Isilon Systems, Inc.

19 years ago - Convert the global LK lock to a mutex.
Jeff Roberson [Mon, 24 Jan 2005 10:18:31 +0000 (10:18 +0000)]
 - Convert the global LK lock to a mutex.
 - Expand the scope of lk to cover not only interrupt races, but also
   top-half races, which includes many new uses over global top-half
   only data.
 - Get rid of interlocked_sleep() and use msleep or BUF_LOCK where
   appropriate.
 - Use the lk mutex in place of the various hand rolled semaphores.
 - Stop dropping the lk lock before we panic.
 - Fix getdirtybuf() callers so that they reacquire access to whatever
   softdep datastructure they were inxpecting in the failure/retry
   case.  Previously, sleeps in getdirtybuf() could leave us with
   pointers to bad memory.
 - Update handling of ffs to be compatible with ffs locking changes.

Sponsored By: Isilon Systems, Inc.

19 years ago - Initialize and destroy the per-filesystem ufs lock where appropriate.
Jeff Roberson [Mon, 24 Jan 2005 10:12:28 +0000 (10:12 +0000)]
 - Initialize and destroy the per-filesystem ufs lock where appropriate.
 - Use the buffer lock on the superblock buf to serialize calls to
   sbupdate.
 - Set the MNTK_MPSAFE flag when QUOTA is not defined in the kernel.

Sponsored By: Isilon Systems, Inc.

19 years ago - Remove GIANT_REQUIRED where giant is no longer required.
Jeff Roberson [Mon, 24 Jan 2005 10:10:47 +0000 (10:10 +0000)]
 - Remove GIANT_REQUIRED where giant is no longer required.

Sponsored By: Isilon Systems, Inc.

19 years ago - Use the ufs lock to protect fs_active.
Jeff Roberson [Mon, 24 Jan 2005 10:10:11 +0000 (10:10 +0000)]
 - Use the ufs lock to protect fs_active.

Sponsored By: Isilon Systems, Inc.

19 years ago - Acquire the ufs lock around several ffs_alloc functions that require
Jeff Roberson [Mon, 24 Jan 2005 10:09:10 +0000 (10:09 +0000)]
 - Acquire the ufs lock around several ffs_alloc functions that require
   it.

Sponsored By: Isilon Systems, Inc.

19 years ago - Don't use atomic operations to deal with the active array, instead
Jeff Roberson [Mon, 24 Jan 2005 10:08:35 +0000 (10:08 +0000)]
 - Don't use atomic operations to deal with the active array, instead
   it is now quite naturally protected by the ufsmount mutex.
 - Use the ufs lock to protect various fields in struct fs, primarily the
   cg summary needs protection to avoid allocation races.  Several
   functions have been slightly re-arranged to reduce the number of
   lock operations.
 - Adjust several functions (blkfree, freefile, etc.) to accept a
   ufsmount as an argument so that we may access the ufs lock.

Sponsored By: Isilon Systems, Inc.

19 years ago - Acquire the ufs lock when manipulating some fields of struct fs.
Jeff Roberson [Mon, 24 Jan 2005 10:04:22 +0000 (10:04 +0000)]
 - Acquire the ufs lock when manipulating some fields of struct fs.
 - Change arguments to various ffs functions to match their new
   prototypes.

Sponsored By: Isilon Systems, Inc.

19 years ago - Mark the struct fs members that require the ufsmount mutex.
Jeff Roberson [Mon, 24 Jan 2005 10:03:17 +0000 (10:03 +0000)]
 - Mark the struct fs members that require the ufsmount mutex.
 - Define some macros for manipulating the fs_active bitmap.

Sponsored By: Isilon Systems, Inc.

19 years ago - Change some function parameters so that the ufsmount structure is
Jeff Roberson [Mon, 24 Jan 2005 10:02:11 +0000 (10:02 +0000)]
 - Change some function parameters so that the ufsmount structure is
   accessable in places where the ufs lock will be needed.

Sponsored By: Isilon Systems, Inc.

19 years ago - Add a mutex to the ufsmount structure. This mutex is used to protect
Jeff Roberson [Mon, 24 Jan 2005 10:01:10 +0000 (10:01 +0000)]
 - Add a mutex to the ufsmount structure.  This mutex is used to protect
   any per-instance global data that is not already protected by a
   buf or vnode lock.  Presently, only fields in ffs's struct fs utilize
   this lock.
 - Sort some ufsmount members so that fields used for quotas are grouped
   together.  This is in anticipation of quota locking.

Sponsored By: Isilon Systems, Inc.

19 years agoForce commit to note the sponsor of the VFS smp work:
Jeff Roberson [Mon, 24 Jan 2005 09:58:23 +0000 (09:58 +0000)]
Force commit to note the sponsor of the VFS smp work:

Sponsored By: Isilon Systems, Inc.

19 years ago - Add two new flags to the nd structure. MPSAFE indicates that the
Jeff Roberson [Mon, 24 Jan 2005 09:57:35 +0000 (09:57 +0000)]
 - Add two new flags to the nd structure.  MPSAFE indicates that the
   caller may not be holding Giant, and namei() should acquire it as
   necessary.  HASGIANT is used to indicate when namei() is returning
   with a reference to a vnode that requires giant, and giant is locked.
 - Add the macro NDHASGIANT() which can be used in conjunction with
   VFS_UNLOCK_GIANT() in callers who have marked the nd with MPSAFE.

Sponsored By: Isilon Systems, Inc.

19 years ago - Add the mount flag MNTK_MPSAFE which indicates whether or not Giant
Jeff Roberson [Mon, 24 Jan 2005 09:53:46 +0000 (09:53 +0000)]
 - Add the mount flag MNTK_MPSAFE which indicates whether or not Giant
   must be held when any vnode owned by the filesystem is manipulated.
 - Add VFS_LOCK_GIANT and VFS_UNLOCK_GIANT macros which are used to
   conditionally lock and unlock Giant based on a particular mountpoint.

19 years ago - Add a new KTR class for the buffer cache.
Jeff Roberson [Mon, 24 Jan 2005 09:51:35 +0000 (09:51 +0000)]
 - Add a new KTR class for the buffer cache.

19 years agoIgnore the expected function number.
Warner Losh [Mon, 24 Jan 2005 06:54:05 +0000 (06:54 +0000)]
Ignore the expected function number.

NetBSD went this route a while ago.  FreeBSD originally tried this to
cope with multifunction cards.  However, it turns out that we're
better off not worrying about the function number, and instead worry
about the function type for the function.  This has worked well in
NetBSD, and all FreeBSD's relevant drivers have been converted.

# I'll rework the macros that specify them shortly, as soon as I can
# come up with a good, compatible way to deal...

19 years agou_intXX_t -> uintXX_t
Warner Losh [Mon, 24 Jan 2005 06:48:26 +0000 (06:48 +0000)]
u_intXX_t -> uintXX_t

19 years agoBring back WARNS to 3 for arm until I figure out how to make gcc happy.
Olivier Houchard [Mon, 24 Jan 2005 01:56:06 +0000 (01:56 +0000)]
Bring back WARNS to 3 for arm until I figure out how to make gcc happy.

19 years agoFix a dangling MKLINK from my last commit.
George V. Neville-Neil [Mon, 24 Jan 2005 01:40:16 +0000 (01:40 +0000)]
Fix a dangling MKLINK from my last commit.

Approved by: rwatson (mentor)

19 years agoDefine FE_TONEAREST, FE_TOWARDZERO, FE_UPWARD, FE_DOWNWARD and _ROUND_MASK to
Olivier Houchard [Mon, 24 Jan 2005 00:35:02 +0000 (00:35 +0000)]
Define FE_TONEAREST, FE_TOWARDZERO, FE_UPWARD, FE_DOWNWARD and _ROUND_MASK to
unbreak the build for arm.

19 years agoAdd support for the LSI 320-2E PCI-Express controller. Fix a couple of bugs
Scott Long [Sun, 23 Jan 2005 23:25:41 +0000 (23:25 +0000)]
Add support for the LSI 320-2E PCI-Express controller.  Fix a couple of bugs
in the ioctl handler.  Update the LSI copyrights for these.

Obtained from: LSI, Corp

19 years agoAdd my copyright for the locking and busdma work.
Scott Long [Sun, 23 Jan 2005 23:22:34 +0000 (23:22 +0000)]
Add my copyright for the locking and busdma work.

19 years agoReduce the global name space pollution.
Yaroslav Tykhiy [Sun, 23 Jan 2005 23:10:33 +0000 (23:10 +0000)]
Reduce the global name space pollution.
The cloner structure isn't referenced by name outside this file.

19 years agoUpdate comment to reflect the code change in the previous revision.
David Schultz [Sun, 23 Jan 2005 22:56:08 +0000 (22:56 +0000)]
Update comment to reflect the code change in the previous revision.

Noticed by: ceri

19 years agoProvide a needed argument to AT_MAKE_TAGID.
Scott Long [Sun, 23 Jan 2005 22:33:59 +0000 (22:33 +0000)]
Provide a needed argument to AT_MAKE_TAGID.

19 years agoMake sure we can boot both with and without MMU enabled.
Olivier Houchard [Sun, 23 Jan 2005 22:08:31 +0000 (22:08 +0000)]
Make sure we can boot both with and without MMU enabled.

19 years agoDefine bus_dmamap_load_buffer before bus_dmamap_load to make gcc happy.
Olivier Houchard [Sun, 23 Jan 2005 22:07:33 +0000 (22:07 +0000)]
Define bus_dmamap_load_buffer before bus_dmamap_load to make gcc happy.

19 years agoMany changes, including the following major ones:
David Schultz [Sun, 23 Jan 2005 22:05:33 +0000 (22:05 +0000)]
Many changes, including the following major ones:
- Rearrange the list of functions into categories.
- Remove the ulps column.  It was appropriate for only some
  of the functions in the list, and correct for even fewer
  of them.
- Add some new paragraphs, and remove some old ones about
  NaNs that may do more harm than good.
- Document precisions other than double-precision.

19 years agoFix compile for !KTR.
Olivier Houchard [Sun, 23 Jan 2005 21:39:23 +0000 (21:39 +0000)]
Fix compile for !KTR.

19 years agoBump the default maximum on nfsd processes from 20 to 256. Real-world
Robert Watson [Sun, 23 Jan 2005 21:34:00 +0000 (21:34 +0000)]
Bump the default maximum on nfsd processes from 20 to 256.  Real-world
measurements suggest that higher degrees of parallelism for large
numbers of clients help performance substantially.

Submitted by: Eric Anderson <anderson at centtech dot com>

19 years agoStyle cleanup: with removal of mutex operations, we can also remove
Robert Watson [Sun, 23 Jan 2005 21:11:39 +0000 (21:11 +0000)]
Style cleanup: with removal of mutex operations, we can also remove
{}'s from securelevel_gt() and securelevel_ge().

MFC after: 1 week

19 years agoWhen reading pr_securelevel from a prison, perform a lockless read,
Robert Watson [Sun, 23 Jan 2005 21:01:00 +0000 (21:01 +0000)]
When reading pr_securelevel from a prison, perform a lockless read,
as it's an integer read operation and the resulting slight race is
acceptable.

MFC after: 1 week

19 years agoWhen retrieving the current per-jails securelevel for a sysctl read,
Robert Watson [Sun, 23 Jan 2005 20:59:19 +0000 (20:59 +0000)]
When retrieving the current per-jails securelevel for a sysctl read,
don't acquire the prison mutex, as it's an integer read and races
here don't make a difference.

MFC after: 1 week

19 years agoCorrectly move the packet header in ip_insertoptions().
Alan Cox [Sun, 23 Jan 2005 19:43:46 +0000 (19:43 +0000)]
Correctly move the packet header in ip_insertoptions().

Reported by: Anupam Chanda
Reviewed by: sam@
MFC after: 2 weeks

19 years agoAttempt to describe the race conditions that must be considered
Ian Dowse [Sun, 23 Jan 2005 17:42:48 +0000 (17:42 +0000)]
Attempt to describe the race conditions that must be considered
when using the callout subsystem. Show how the callout_pending(),
callout_active() and callout_deactivate() macros can be used to
achieve simpler race-free callout semantics in many situations.

19 years ago- Document ldexpf().
David Schultz [Sun, 23 Jan 2005 16:49:49 +0000 (16:49 +0000)]
- Document ldexpf().
- Although ldexp() is in libc for backwards compatibility, ldexpf() is
  in its proper place in libm.  Document both as being in libm.
- The ldexp() and ldexpf() functions conform to C99.

19 years ago- Document frexpf().
David Schultz [Sun, 23 Jan 2005 16:49:40 +0000 (16:49 +0000)]
- Document frexpf().
- Neither frexp() nor frexpf() set errno.
- Although frexp() is in libc for backwards compatibility, frexpf() is
  in its proper place in libm.  Document both as being in libm.
- The frexp() and frexpf() functions conform to C99.

19 years agoWe cannot use sed(1), because rc.d/gbde has to be called before
Pawel Jakub Dawidek [Sun, 23 Jan 2005 16:43:55 +0000 (16:43 +0000)]
We cannot use sed(1), because rc.d/gbde has to be called before
rc.d/mountcritlocal and sed(1) is placed in /usr/bin/. Other useful tools
for this task are also placed in /usr/ (tr(1), awk(1)), so I implemented
local_tr() function which works simlar to tr(1).

Reported by: Amir Shalem <amir@boom.org.il>
MFC after: 1 week

19 years agoFix whitespace
Scott Long [Sun, 23 Jan 2005 16:13:10 +0000 (16:13 +0000)]
Fix whitespace

19 years agoSubmitted by: George V. Neville-Neil (gnn at freebsd dot org)
George V. Neville-Neil [Sun, 23 Jan 2005 16:02:48 +0000 (16:02 +0000)]
Submitted by: George V. Neville-Neil (gnn at freebsd dot org)
Reviewed by: Kame Project (including Itojun-san, Jinmei-san and Suzuki-san)
Approved by: Robert Watson (robert at freebsd dot org)
Obtained from: Kame Project and OpenBSD

Replace manual pages that may have violated the IETF's Copyright.

All come from the Kame tree.

Several were from OpenBSD except for ip6.4, and the inet6* pages which were
rewritten by me.

All of the text is new and drawn from reading the code and
documentation.

19 years agoThe final argument to verify_krb_v5_tgt() is the debug flag, not the
Robert Watson [Sun, 23 Jan 2005 15:57:07 +0000 (15:57 +0000)]
The final argument to verify_krb_v5_tgt() is the debug flag, not the
ticket forwardable flag, so key generation of debugging output to
"debug" rather than "forwardable".

Update copyright.

MFC after: 3 days

19 years agoIf x == y, return y, not x. C99 (though not IEEE 754) requires that
David Schultz [Sun, 23 Jan 2005 15:46:22 +0000 (15:46 +0000)]
If x == y, return y, not x.  C99 (though not IEEE 754) requires that
nextafter(+0.0, -0.0) returns -0.0 and nextafter(-0.0, +0.0) returns +0.0.

19 years agoSubmitted by: George V. Neville-Neil (gnn at freebsd dot org)
George V. Neville-Neil [Sun, 23 Jan 2005 15:41:10 +0000 (15:41 +0000)]
Submitted by: George V. Neville-Neil (gnn at freebsd dot org)
Approved by: Robert Watson (robert at freebsd dot org)

Remove files in preparation for replacement with totally new versions
of the manual pages.

Update the Makefile to handle the new file to be added.

19 years agoMinor white space tweak.
Robert Watson [Sun, 23 Jan 2005 15:28:02 +0000 (15:28 +0000)]
Minor white space tweak.

MFC after: 3 days

19 years agoRemove an obsoleted comment about struct versions.
Robert Watson [Sun, 23 Jan 2005 14:26:09 +0000 (14:26 +0000)]
Remove an obsoleted comment about struct versions.

MFC after: 3 days
Pointed out by: trhodes

19 years agoAccording to style.Makefile(5):
Xin LI [Sun, 23 Jan 2005 12:29:46 +0000 (12:29 +0000)]
According to style.Makefile(5):
WARNS?= should appear before CFLAGS

Reviewed by: ru

19 years agoAdd code to do better auto detection of tuner types etc.
Julian Elischer [Sun, 23 Jan 2005 07:13:09 +0000 (07:13 +0000)]
Add code to do better auto detection of tuner types etc.

PR: kern/75831
Submitted by: Branko Lankester <branko@euro.net>
MFC after: 1 week

19 years agoRemember to snag firmware for the DELL OEM (6312) card
Matt Jacob [Sun, 23 Jan 2005 06:37:28 +0000 (06:37 +0000)]
Remember to snag firmware for the DELL OEM (6312) card

MFC after: 2 days

19 years agoAdd some macros for inserting tag ids.
Matt Jacob [Sun, 23 Jan 2005 06:28:49 +0000 (06:28 +0000)]
Add some macros for inserting tag ids.

MFC after: 2 weeks

19 years agoMacroize the making of tag ids.
Matt Jacob [Sun, 23 Jan 2005 06:28:08 +0000 (06:28 +0000)]
Macroize the making of tag ids.

MFC after: 2 weeks

19 years agoRoll minor number.
Matt Jacob [Sun, 23 Jan 2005 06:27:05 +0000 (06:27 +0000)]
Roll minor number.

MFC after: 2 weeks

19 years agoDon't set ZIO for 23XX for target mode (use fast posting instead).
Matt Jacob [Sun, 23 Jan 2005 06:26:45 +0000 (06:26 +0000)]
Don't set ZIO for 23XX for target mode (use fast posting instead).
Use the correct number of handles for multihandle returns.

Very, very, rarely on some SMP systems we've seen an 'unstable' type
in the response queue. I dunno whether or not it's a bug in our
handling, or whether there's a cache incoherency issue, but
try to guard against it.

MFC after: 2 weeks

19 years agoSupport the DELL OEM 2312 cards (1077,6312).
Matt Jacob [Sun, 23 Jan 2005 06:23:55 +0000 (06:23 +0000)]
Support the DELL OEM 2312 cards (1077,6312).

Many thanks to Stormweb for making the h/w available for testing.

MFC after: 2 days

19 years agoProtect against wrapping. This appaers to fix some hangs that people
Warner Losh [Sun, 23 Jan 2005 03:03:58 +0000 (03:03 +0000)]
Protect against wrapping.  This appaers to fix some hangs that people
have seen in the isa pnp case where a resource buts up against
0xffffffff.  This would only impact when the board was booted without
ACPI.

Submitted by: Ed Maste (freebsd-stable <20050103145720.GA90754@sandvine.com>)
MFC After: 5 days

19 years agoSet the format code and name correctly for:
Tim Kientzle [Sun, 23 Jan 2005 03:02:14 +0000 (03:02 +0000)]
Set the format code and name correctly for:
  * ISO9660 CDROM images
  * ISO9660 images with Rockridge extensions

19 years agoThis is a somewhat imperfect means to try and bring FreeBSD forward in
Matt Jacob [Sat, 22 Jan 2005 22:46:45 +0000 (22:46 +0000)]
This is a somewhat imperfect means to try and bring FreeBSD forward in
its ability to automatically scan and attach luns for modern storage
which has luns in the 0..1000 range, not 0..7.

The correct thing would be to do REPORT LUNS for devices whose LUN0
version shows a version >= SCSI3, but lacking that we should be able
to search higher than LUN 7 if we're >= SCSI3 with no ill effects.

This change keeps all of the QUIRK_HILUNS quirks, obeys the QUIRK_NOLUNS,
and introduces a QUIRK_NOHILUNS which will keep searches above LUN 7
happening for devices that report >= SCSI3 compliance. I doubt the latter
will be needed, but you never know.

This allowed me to randomly scan and attach  > 500 disks at a time in
a situation where quirking for QUIRK_HILUNS wasn't practical (the
vendor id and product id changes of the virtualization changes
constantly).

Reviewed by: ken@freebsd.org, scottl@freebsd.org, gibbs@freebsd.org
MFC after: 2 weeks

19 years agoUse WARNS?= instead of WARNS= in Makefiles so that global warning
Robert Watson [Sat, 22 Jan 2005 22:42:39 +0000 (22:42 +0000)]
Use WARNS?= instead of WARNS= in Makefiles so that global warning
settings can override local ones.

Pointed out by: ru

19 years agoBring in support for SUGOI LAN GIGA NIC made by System TALKS, Inc from
Warner Losh [Sat, 22 Jan 2005 22:40:53 +0000 (22:40 +0000)]
Bring in support for SUGOI LAN GIGA NIC made by System TALKS, Inc from
a RealTek 8169SB.

PR: 74262
Submitted by: Yoshikazu GOTO-san

# Submitter notes that he's unsure of the revision string for 8169SB

19 years agoFix markup.
Bruce M Simpson [Sat, 22 Jan 2005 21:54:29 +0000 (21:54 +0000)]
Fix markup.

Submitted by: ru

19 years agoScot pointed out that the dynamic zone example didn't seem to "flow"
Doug Barton [Sat, 22 Jan 2005 21:34:10 +0000 (21:34 +0000)]
Scot pointed out that the dynamic zone example didn't seem to "flow"
with the rest of the examples, so after discussion with him and gshapiro,
re-sort the examples, and add more comments to make things very obvious.

Also, divide the examples between example.{com|net|org} to make things
even more obvious, and use the same RFC 1918 block for all examples.

Pointed out by: Scot W. Hetzel <hetzels@westbend.net>

19 years agoAdd a note about the slot number not necessarily indicating the physical
Bruce M Simpson [Sat, 22 Jan 2005 21:14:46 +0000 (21:14 +0000)]
Add a note about the slot number not necessarily indicating the physical
location of a PCI device in the system chassis.
Remove the note about PAE.
Update document date.
Update my email address.
Update copyright.

MFC after: 1 week

19 years agoWhen DDB is not defined, don't implement witness_thread_has_locks() and
Robert Watson [Sat, 22 Jan 2005 21:14:21 +0000 (21:14 +0000)]
When DDB is not defined, don't implement witness_thread_has_locks() and
witness_proc_has_locks(), as they are unused, which results in a compiler
error.  This problem was introduced with the implementation of "show
alllocks".

Spotted by: Artem Kuchin <matrix at itlegion dot ru>

19 years agohandle potential stale values of bssid in neighbor nodes that
Sam Leffler [Sat, 22 Jan 2005 20:33:37 +0000 (20:33 +0000)]
handle potential stale values of bssid in neighbor nodes that
can occur after an ibss merge

Submitted by: David Young

19 years agoUpdate mac_test for MAC Framework policy entry points System V IPC
Robert Watson [Sat, 22 Jan 2005 20:31:29 +0000 (20:31 +0000)]
Update mac_test for MAC Framework policy entry points System V IPC
objects (message queues, semaphores, shared memory), exercising and
validating MAC labels on these objects.

Submitted by: Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from: TrustedBSD Project
Sponsored by: DARPA, SPAWAR, McAfee Research

19 years agowhen ssid suppression is enabled don't respond to probe requests
Sam Leffler [Sat, 22 Jan 2005 20:31:22 +0000 (20:31 +0000)]
when ssid suppression is enabled don't respond to probe requests
unless our ssid is specified

19 years agobe consistent in naming inactivity timers;
Sam Leffler [Sat, 22 Jan 2005 20:29:23 +0000 (20:29 +0000)]
be consistent in naming inactivity timers;
net.wlan.X.inact -> net.wlan.X.inact_run

19 years agoUpdate mac_stub for MAC Framework policy entry points System V IPC
Robert Watson [Sat, 22 Jan 2005 20:26:43 +0000 (20:26 +0000)]
Update mac_stub for MAC Framework policy entry points System V IPC
objects (message queues, semaphores, shared memory).

Submitted by:   Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from:  TrustedBSD Project
Sponsored by:   DARPA, SPAWAR, McAfee Research

19 years agoo replace out-of-line copy of FCS w/ a flag that indicates the
Sam Leffler [Sat, 22 Jan 2005 20:12:05 +0000 (20:12 +0000)]
o replace out-of-line copy of FCS w/ a flag that indicates the
  frame includes FCS (requires applications to be updated, but since
  we weren't doing the out-of-line FCS stuff anyway app changes
  were needed already)
o add a flag to indicate padding exists between the 802.11 header and
  the payload (e.g. for Atheros cards)
o diff reducation against netbsd

MFC after: 1 week

19 years agoImplement MLS confidentiality protection for System V IPC objects
Robert Watson [Sat, 22 Jan 2005 20:11:16 +0000 (20:11 +0000)]
Implement MLS confidentiality protection for System V IPC objects
(message queues, semaphores, shared memory).

Submitted by: Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from: TrustedBSD Project
Sponsored by: DARPA, SPAWAR, McAfee Research

19 years agoImplement Biba integrity protection for System V IPC objects (message
Robert Watson [Sat, 22 Jan 2005 20:07:11 +0000 (20:07 +0000)]
Implement Biba integrity protection for System V IPC objects (message
queues, semaphores, shared memory).

Submitted by: Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from: TrustedBSD Project
Sponsored by: DARPA, SPAWAR, McAfee Research

19 years agoAllow to specify device size in bytes.
Pawel Jakub Dawidek [Sat, 22 Jan 2005 20:02:01 +0000 (20:02 +0000)]
Allow to specify device size in bytes.

MFC after: 1 week

19 years agos/principals/principles/
Wilko Bulte [Sat, 22 Jan 2005 20:00:50 +0000 (20:00 +0000)]
s/principals/principles/

Fortune was duplicated, remove one copy.

19 years ago- Don't destroy UMA zone on error in mdcreate_malloc(), because we need it
Pawel Jakub Dawidek [Sat, 22 Jan 2005 19:56:03 +0000 (19:56 +0000)]
- Don't destroy UMA zone on error in mdcreate_malloc(), because we need it
  in mddestroy() to properly free already allocated memory.
  This fixes a panic when we want to create too big memory backed device
  with preallocate memory (-o reserve).
- Remove redundant { }.

MFC after: 1 week

19 years agoMake sure that we don't define INET6 when NO_INET6 is defined.
Xin LI [Sat, 22 Jan 2005 19:35:48 +0000 (19:35 +0000)]
Make sure that we don't define INET6 when NO_INET6 is defined.
Without this change, when running netstat with a kernel without
INET6 built in, you will get a complain at the end of "netstat -s"
output.

X-MFC: NO_INET6 was called "NOINET6" on RELENG_5

19 years agoGuard against address wrap in kernacc(). Otherwise, a program accessing a
Alan Cox [Sat, 22 Jan 2005 19:21:29 +0000 (19:21 +0000)]
Guard against address wrap in kernacc().  Otherwise, a program accessing a
bad address range through /dev/kmem can panic the machine.

Submitted by: Mark W. Krentel
Reported by: Kris Kennaway
MFC after: 1 week

19 years agoInvoke label initialization, creation, cleanup, and tear-down MAC
Robert Watson [Sat, 22 Jan 2005 19:10:25 +0000 (19:10 +0000)]
Invoke label initialization, creation, cleanup, and tear-down MAC
Framework entry points for System V IPC shared memory.

Submitted by: Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from: TrustedBSD Project
Sponsored by: DARPA, SPAWAR, McAfee Research

19 years agoAdd a couple of mtx_asserts() to try to narrow down the window on
Poul-Henning Kamp [Sat, 22 Jan 2005 19:08:50 +0000 (19:08 +0000)]
Add a couple of mtx_asserts() to try to narrow down the window on
a bug repeatedly reported.

19 years agoInvoke label initialization, creation, cleanup, and tear-down MAC
Robert Watson [Sat, 22 Jan 2005 19:04:17 +0000 (19:04 +0000)]
Invoke label initialization, creation, cleanup, and tear-down MAC
Framework entry points for System V IPC semaphores.

Submitted by: Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from: TrustedBSD Project
Sponsored by: DARPA, SPAWAR, McAfee Research

19 years agoInvoke label initialization, creation, cleanup, and tear-down MAC
Robert Watson [Sat, 22 Jan 2005 18:51:43 +0000 (18:51 +0000)]
Invoke label initialization, creation, cleanup, and tear-down MAC
Framework entry points for System V IPC message queues.

Submitted by: Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from: TrustedBSD Project
Sponsored by: DARPA, SPAWAR, McAfee Research

19 years agoEspecially mention that setting errno to EINVAL in "no conversion" case
Andrey A. Chernov [Sat, 22 Jan 2005 18:02:58 +0000 (18:02 +0000)]
Especially mention that setting errno to EINVAL in "no conversion" case
is not portable.

Asked by:       joerg

19 years agoDocument -l and -n options in usage().
Ruslan Ermilov [Sat, 22 Jan 2005 14:37:57 +0000 (14:37 +0000)]
Document -l and -n options in usage().

19 years agoPolish previous revision:
Ruslan Ermilov [Sat, 22 Jan 2005 14:36:51 +0000 (14:36 +0000)]
Polish previous revision:

- Bump document date.
- Spell "file system" properly.
- Add missing markup bits.

19 years agoAdd fma() and fmaf(), which implement a fused multiply-add operation.
David Schultz [Sat, 22 Jan 2005 09:53:18 +0000 (09:53 +0000)]
Add fma() and fmaf(), which implement a fused multiply-add operation.

19 years agoDon't pass unadulterated unit numbers to make_dev and its ilk- if you
Matt Jacob [Sat, 22 Jan 2005 07:21:25 +0000 (07:21 +0000)]
Don't pass unadulterated unit numbers to make_dev and its ilk- if you
have more than 256 units, you die. Horribly. Convert them using
unit2minor.

MFC after: 1 week

19 years agoReplace the ldexp() implementation in libc with a renamed copy of the
David Schultz [Sat, 22 Jan 2005 06:03:40 +0000 (06:03 +0000)]
Replace the ldexp() implementation in libc with a renamed copy of the
scalbn() implementation from libm.  (The two functions are defined to
be identical, but ldexp() lives in libc for backwards compatibility.)
The old ldexp() implementation...
  - was more complicated than this one
  - set errno instead of raising FP exceptions
  - got some corner cases wrong
    (e.g. ldexp(1.0, 2000) in round-to-zero mode)

The new implementation lives in libc/gen instead of
libc/$MACHINE_ARCH/gen, since we don't need N copies of a
machine-independent file.  The amd64 and i386 platforms
retain their fast and correct MD implementations and
override this one.

19 years agoEmbellish rev 1.61. If we're not building a debug kernel, use -O2 as before.
David E. O'Brien [Sat, 22 Jan 2005 00:58:34 +0000 (00:58 +0000)]
Embellish rev 1.61.  If we're not building a debug kernel, use -O2 as before.

Submitted by: ru

19 years agos/round_page/trunc_page/g
Bosko Milekic [Sat, 22 Jan 2005 00:09:34 +0000 (00:09 +0000)]
s/round_page/trunc_page/g

I meant trunc_page.  It's only a coincidence this hasn't caused
problems yet.

Pointed out by: Antoine Brodin <antoine.brodin@laposte.net>

19 years agoForced commit to note:
Wes Peters [Fri, 21 Jan 2005 22:53:51 +0000 (22:53 +0000)]
Forced commit to note:

MFC after: 2 weeks

19 years agoAdd an option to suppress the creation of the .snap directory in
Wes Peters [Fri, 21 Jan 2005 22:20:25 +0000 (22:20 +0000)]
Add an option to suppress the creation of the .snap directory in
the new filesystem.  This is intended for memory and vnode filesystems
that will never be fsck'ed or dumped.

Obtained from: St. Bernard Software RAPID
MFC after: 2 weeks

19 years agoImproved error checking for existence of a .snap directory to
Wes Peters [Fri, 21 Jan 2005 22:13:25 +0000 (22:13 +0000)]
Improved error checking for existence of a .snap directory to
generate snapshots in when -L is requested.  If the .snap directory
does not exist, or is not a directory, issue a warning and revert
to the non- live behavior.

Obtained from: St. Bernard Software RAPID

19 years ago- Soften sentence breaks.
Ruslan Ermilov [Fri, 21 Jan 2005 21:57:05 +0000 (21:57 +0000)]
- Soften sentence breaks.
- Remove double whitespace.
- Sort sections.

19 years agoFixed macro abuse.
Ruslan Ermilov [Fri, 21 Jan 2005 20:51:09 +0000 (20:51 +0000)]
Fixed macro abuse.

19 years agoFixed xrefs.
Ruslan Ermilov [Fri, 21 Jan 2005 20:50:39 +0000 (20:50 +0000)]
Fixed xrefs.

19 years agoFixed punctuation in xrefs.
Ruslan Ermilov [Fri, 21 Jan 2005 20:48:00 +0000 (20:48 +0000)]
Fixed punctuation in xrefs.

19 years agowe don't need the offset in the attr memory to get the ethernet
Warner Losh [Fri, 21 Jan 2005 19:51:23 +0000 (19:51 +0000)]
we don't need the offset in the attr memory to get the ethernet
address, nor do we need the alignment requirements, so eliminate them.
This likely means that we can now collapse some of the entries as we
have no need of them anymore (they match other entries and were there
only to get the right attr memory offset of the enet addr).

19 years agoOnly report state changes of subdisks and plexes when there's
Lukas Ertl [Fri, 21 Jan 2005 18:27:23 +0000 (18:27 +0000)]
Only report state changes of subdisks and plexes when there's
really a state change.

Reword the info a bit.

19 years agoDon't initialize error with ENXIO as we might end up here when
Lukas Ertl [Fri, 21 Jan 2005 18:24:20 +0000 (18:24 +0000)]
Don't initialize error with ENXIO as we might end up here when
the plex has no more consumers (e.g. orphaning).

19 years agoBraino. Revert previous commit, NO_MAN was already corrected.
Bruce M Simpson [Fri, 21 Jan 2005 18:12:47 +0000 (18:12 +0000)]
Braino. Revert previous commit, NO_MAN was already corrected.

Noticed by: imp

19 years agowe don't need to make fake sockaddr_in6 to compare subject address.
Hajimu UMEMOTO [Fri, 21 Jan 2005 18:12:46 +0000 (18:12 +0000)]
we don't need to make fake sockaddr_in6 to compare subject address.

MFC after: 1 week

19 years agoBring in MemGuard, a very simple and small replacement allocator
Bosko Milekic [Fri, 21 Jan 2005 18:09:17 +0000 (18:09 +0000)]
Bring in MemGuard, a very simple and small replacement allocator
designed to help detect tamper-after-free scenarios, a problem more
and more common and likely with multithreaded kernels where race
conditions are more prevalent.

Currently MemGuard can only take over malloc()/realloc()/free() for
particular (a) malloc type(s) and the code brought in with this
change manually instruments it to take over M_SUBPROC allocations
as an example.  If you are planning to use it, for now you must:

1) Put "options DEBUG_MEMGUARD" in your kernel config.
2) Edit src/sys/kern/kern_malloc.c manually, look for
   "XXX CHANGEME" and replace the M_SUBPROC comparison with
   the appropriate malloc type (this might require additional
   but small/simple code modification if, say, the malloc type
   is declared out of scope).
3) Build and install your kernel.  Tune vm.memguard_divisor
   boot-time tunable which is used to scale how much of kmem_map
   you want to allott for MemGuard's use.  The default is 10,
   so kmem_size/10.

ToDo:
1) Bring in a memguard(9) man page.
2) Better instrumentation (e.g., boot-time) of MemGuard taking
   over malloc types.
3) Teach UMA about MemGuard to allow MemGuard to override zone
   allocations too.
4) Improve MemGuard if necessary.

This work is partly based on some old patches from Ian Dowse.