]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoBump copyright year and use &os;.
hrs [Tue, 19 Apr 2005 09:43:53 +0000 (09:43 +0000)]
Bump copyright year and use &os;.

19 years agoBump copyright year.
hrs [Tue, 19 Apr 2005 09:42:25 +0000 (09:42 +0000)]
Bump copyright year.

19 years agoOops, forgot to update this file.
davidxu [Tue, 19 Apr 2005 08:11:28 +0000 (08:11 +0000)]
Oops, forgot to update this file.
Fix a race condition between kern_wait() and thread_stopped().
Problem is in kern_wait(), parent process steps through children list,
once a child process is skipped, and later even if the child is stopped,
parent process still sleeps in msleep(), the race happens if parent
masked SIGCHLD.

Submitted by : Peter Edwards peadar.edwards at gmail dot com
MFC after    : 4 days

19 years agoFix a race condition between kern_wait() and thread_stopped().
davidxu [Tue, 19 Apr 2005 08:07:28 +0000 (08:07 +0000)]
Fix a race condition between kern_wait() and thread_stopped().
Problem is in kern_wait(), parent process steps through children list,
once a child process is skipped, and later even if the child is stopped,
parent process still sleeps in msleep(), the race happens if parent
masked SIGCHLD.

Submitted by : Peter Edwards peadar.edwards at gmail dot com
MFC after    : 4 days

19 years agoCall g_waitidle() instead of GEOM using the root_mount_hold() KPI.
phk [Tue, 19 Apr 2005 06:23:59 +0000 (06:23 +0000)]
Call g_waitidle() instead of GEOM using the root_mount_hold() KPI.
GEOM could (and will) get events as a result of drivers coming in
late so a one-shot method is not good enough for GEOM.

19 years agoProvide a way to soft reset a proxy controller such as an MSA20 or
ps [Tue, 19 Apr 2005 06:11:16 +0000 (06:11 +0000)]
Provide a way to soft reset a proxy controller such as an MSA20 or
MSA500.  This is useful if you need to reset one of the storage
arrays on reboot.

19 years agoFix indentation problem in the last commit
sos [Tue, 19 Apr 2005 05:28:08 +0000 (05:28 +0000)]
Fix indentation problem in the last commit

19 years agoBring a working snapshot of hwpmc(4), its associated libraries, userland utilities
jkoshy [Tue, 19 Apr 2005 04:01:25 +0000 (04:01 +0000)]
Bring a working snapshot of hwpmc(4), its associated libraries, userland utilities
and documentation into -CURRENT.

Bump FreeBSD_version.

Reviewed by: alc, jhb (kernel changes)

19 years agoUnbreak the pc98 build by including enough information in the _bus.h
imp [Tue, 19 Apr 2005 03:19:19 +0000 (03:19 +0000)]
Unbreak the pc98 build by including enough information in the _bus.h
for _bus.h to compile.

Pointy hat to: imp
Breakage noted by: nyan-san

19 years agoCope with the (unwise?) incompatible changes with make by adding
imp [Mon, 18 Apr 2005 22:03:21 +0000 (22:03 +0000)]
Cope with the (unwise?) incompatible changes with make by adding
a comment before defined(SRCS).

19 years agoBreak out the definition of bus_space_{tag,handle}_t and a few other types
imp [Mon, 18 Apr 2005 21:45:34 +0000 (21:45 +0000)]
Break out the definition of bus_space_{tag,handle}_t and a few other types
into _bus.h to help with name space polution from including all of bus.h.
In a few days, I'll commit changes to the MI code to take advantage of thse
sepration (after I've made sure that these changes don't break anything in
the main tree, I've tested in my trees, but you never know...).

Suggested by: bde (in 2002 or 2003 I think)
Reviewed in principle by: jhb

19 years agoAdd a named reference-count KPI to hold off mounting of the root filesystem.
phk [Mon, 18 Apr 2005 21:21:26 +0000 (21:21 +0000)]
Add a named reference-count KPI to hold off mounting of the root filesystem.

While we wait for holds to be released, print a list of who holds us
back once per second.

Use the new KPI from GEOM instead of vfs_mount.c calling g_waitidle().

Use the new KPI also from ata.

With ATAmkIII's newbusification, ata could narrowly miss the window
and ad0 would not exist when we tried to mount root.

19 years agoInitialize mountlist_mtx with an MTX_SYSINIT(), we need it to be ready
phk [Mon, 18 Apr 2005 21:11:47 +0000 (21:11 +0000)]
Initialize mountlist_mtx with an MTX_SYSINIT(), we need it to be ready
earlier.

19 years agoAs with kernel-depend, rm the DEPENDFILE before modules-depend.
obrien [Mon, 18 Apr 2005 21:10:38 +0000 (21:10 +0000)]
As with kernel-depend, rm the DEPENDFILE before modules-depend.

19 years agoInitial import of ipw, iwi, ral and ural drivers:
damien [Mon, 18 Apr 2005 18:47:38 +0000 (18:47 +0000)]
Initial import of ipw, iwi, ral and ural drivers:

ipw  - Intel PRO/Wireless 2100
iwi  - Intel PRO/Wireless 2200BG/2225BG/2915ABG
ral  - Ralink Technology RT2500
ural - Ralink Technology RT2500USB

Approved by: silby (mentor)

19 years agoAdd IPv6 support to IPFW and Dummynet.
brooks [Mon, 18 Apr 2005 18:35:05 +0000 (18:35 +0000)]
Add IPv6 support to IPFW and Dummynet.

Submitted by: Mariano Tortoriello and Raffaele De Lorenzo (via luigi)

19 years agorename the NIS related fields to have yp_ prefix.
ume [Mon, 18 Apr 2005 18:34:58 +0000 (18:34 +0000)]
rename the NIS related fields to have yp_ prefix.

Suggested by: delphij

19 years agoRewrite of tcp_update_sack_list() to make it simpler and more readable
ps [Mon, 18 Apr 2005 18:10:56 +0000 (18:10 +0000)]
Rewrite of tcp_update_sack_list() to make it simpler and more readable
than our original OpenBSD derived version.

Submitted by: Noritoshi Demizu
Reviewed by: Mohan Srinivasan, Raja Mukerji

19 years agoMFen: 1.843 -> 1.845, plus some language improvements.
delphij [Mon, 18 Apr 2005 16:55:48 +0000 (16:55 +0000)]
MFen: 1.843 -> 1.845, plus some language improvements.

MFC After: 1 day, MT5_4 candidate
Obtained from: The FreeBSD Simplified Chinese Project

19 years agoAdd uma zone for composite ops.
sos [Mon, 18 Apr 2005 16:01:56 +0000 (16:01 +0000)]
Add uma zone for composite ops.

Submitted by: des

19 years ago'r' disk devices no longer exist, so don't try to create a pathname
imp [Mon, 18 Apr 2005 15:08:29 +0000 (15:08 +0000)]
'r' disk devices no longer exist, so don't try to create a pathname
that has an 'r' in it.

This also eliminates a bogus use of strlcat.
PR: 80064

19 years agoNote that NO_MIXED_MODE is gone.
scottl [Mon, 18 Apr 2005 14:33:18 +0000 (14:33 +0000)]
Note that NO_MIXED_MODE is gone.

19 years agoAdjust the RAID type pickup code for the VIA, we dont actually care
sos [Mon, 18 Apr 2005 13:51:03 +0000 (13:51 +0000)]
Adjust the RAID type pickup code for the VIA, we dont actually care
if the array is bootable or not (yet).

19 years agoTCP reconnect is not an error.
rees [Mon, 18 Apr 2005 13:42:13 +0000 (13:42 +0000)]
TCP reconnect is not an error.
Change the message from LOG_ERR to LOG_INFO.

Approved by: alfred

19 years agoIntroduce p_canwait() and MAC Framework and MAC Policy entry points
rwatson [Mon, 18 Apr 2005 13:36:57 +0000 (13:36 +0000)]
Introduce p_canwait() and MAC Framework and MAC Policy entry points
mac_check_proc_wait(), which control the ability to wait4() specific
processes.  This permits MAC policies to limit information flow from
children that have changed label, although has to be handled carefully
due to common programming expectations regarding the behavior of
wait4().  The cr_seeotheruids() check in p_canwait() is #if 0'd for
this reason.

The mac_stub and mac_test policies are updated to reflect these new
entry points.

Sponsored by: SPAWAR, SPARTA
Obtained from: TrustedBSD Project

19 years agoAdding another multi-byte characters related regression test for msdosfs.
avatar [Mon, 18 Apr 2005 13:06:43 +0000 (13:06 +0000)]
Adding another multi-byte characters related regression test for msdosfs.

Tested by: njl
Reviewed by: silby, bde, sam (mentor)

19 years agoRemove end-of-line tabs.
rwatson [Mon, 18 Apr 2005 11:51:10 +0000 (11:51 +0000)]
Remove end-of-line tabs.

MFC after: 3 days

19 years agoFix panics with misconfigured routing:
glebius [Mon, 18 Apr 2005 11:32:17 +0000 (11:32 +0000)]
Fix panics with misconfigured routing:
- Backout previous revision, the check is useless.
- Turn node to queue mode, since it is edge node.

Reported by: sem

19 years agoMerge the following from the English version:
den [Mon, 18 Apr 2005 09:30:41 +0000 (09:30 +0000)]
Merge the following from the English version:

   1.843 -> 1.845 relnotes/common/new.sgml

19 years agoPrint amd64-specific security advisory only for amd64
den [Mon, 18 Apr 2005 08:29:25 +0000 (08:29 +0000)]
Print amd64-specific security advisory only for amd64

Reviewed by: re (hrs)

19 years agoDocument bsnmpd related options.
glebius [Mon, 18 Apr 2005 07:39:53 +0000 (07:39 +0000)]
Document bsnmpd related options.

Reminded by: maxim

19 years agoCatch up with ATA mkIII definitions for registers that have different
grehan [Mon, 18 Apr 2005 04:23:23 +0000 (04:23 +0000)]
Catch up with ATA mkIII definitions for registers that have different
functions for read vs. write.

19 years agoDo not check whether a pointer is NULL, since free(3) already takes care of
delphij [Mon, 18 Apr 2005 03:45:23 +0000 (03:45 +0000)]
Do not check whether a pointer is NULL, since free(3) already takes care of
this case.

Reviewed by: ume

19 years agoFix newer Xircom CBE2-100 cards that were reporting
imp [Mon, 18 Apr 2005 03:31:29 +0000 (03:31 +0000)]
Fix newer Xircom CBE2-100 cards that were reporting
dc0: MII without any PHY!
We have to enable the connection to the MII first.  Doing so fixes the
problem cards without breaking the older, working cards.

Bad card provided by: deischen

19 years agoFix parsing of nomatch events.
imp [Mon, 18 Apr 2005 02:54:07 +0000 (02:54 +0000)]
Fix parsing of nomatch events.
minor debug fix.

19 years agoFix compilation when DEBUG is defined.
marius [Mon, 18 Apr 2005 02:34:22 +0000 (02:34 +0000)]
Fix compilation when DEBUG is defined.

19 years agoAdd a sysctl that returns the full path of a process' text file.
das [Mon, 18 Apr 2005 02:10:37 +0000 (02:10 +0000)]
Add a sysctl that returns the full path of a process' text file.
This information is needed by things like `gdb -p' and Sun's javac,
and previously it could only be obtained via procfs

19 years agoMFS revision 1.139.2.4 (add edwin) because I accidentally committed to
cperciva [Mon, 18 Apr 2005 01:36:17 +0000 (01:36 +0000)]
MFS revision 1.139.2.4 (add edwin) because I accidentally committed to
RELENG_5 instead of HEAD.

Pointy hat to: The large pile of hats over in the corner.

19 years agoNeeded to drop "lang/gnat", "print/teTeX", and "textproc/docproj-jadetex"
kensmith [Sun, 17 Apr 2005 23:30:20 +0000 (23:30 +0000)]
Needed to drop "lang/gnat", "print/teTeX", and "textproc/docproj-jadetex"
to make the packages fit on the CDs...

MFC after: 3 days

19 years agoThere is no /etc/rc.network anymore.
keramida [Sun, 17 Apr 2005 23:22:22 +0000 (23:22 +0000)]
There is no /etc/rc.network anymore.

Submitted by: Benjamin Rossen <b.rossen@onsnet.nu>
MFC after: 2 weeks

19 years agoPortability enhancement: MS Windows won't restore metadata if the file
kientzle [Sun, 17 Apr 2005 22:49:00 +0000 (22:49 +0000)]
Portability enhancement: MS Windows won't restore metadata if the file
is still open, so close the file as soon as we've written the
file contents, before we attempt to restore metadata.

Thanks to:  Kees Zeelenberg

19 years agoCorrect a comment about which parallel port pin is used to drive
iedowse [Sun, 17 Apr 2005 21:55:00 +0000 (21:55 +0000)]
Correct a comment about which parallel port pin is used to drive
the RS signal.

PR: misc/20139

19 years agoPass the hostname we got from DHCP to the kernel so that machines can
wollman [Sun, 17 Apr 2005 21:38:22 +0000 (21:38 +0000)]
Pass the hostname we got from DHCP to the kernel so that machines can
share a read-only NFS root.

19 years agoFix truncl.3 MLINKS
ache [Sun, 17 Apr 2005 19:57:52 +0000 (19:57 +0000)]
Fix truncl.3 MLINKS

19 years agoA very minor tweak to the handling of leading '/' characters.
kientzle [Sun, 17 Apr 2005 19:46:50 +0000 (19:46 +0000)]
A very minor tweak to the handling of leading '/' characters.

19 years agoA number of fixes to the autoconf-generated build system. In
kientzle [Sun, 17 Apr 2005 19:43:37 +0000 (19:43 +0000)]
A number of fixes to the autoconf-generated build system.  In
particular, acl support is no longer enabled on FreeBSD 4, acl support
should be correctly enabled on Linux, dirent.d_namlen should be
correctly detected on platforms that support it.

Thanks to: Greg Lewis, Juergen Lock, and Jaakko Heinonen

19 years agoNow that the GDT has been reorganized and GNDIS_SEL has been reserved
wpaul [Sun, 17 Apr 2005 19:36:08 +0000 (19:36 +0000)]
Now that the GDT has been reorganized and GNDIS_SEL has been reserved
for us, use it if it's available, otherwise default to using slot 7
as before.

19 years agoConfigure script needs to test for dirent.d_namlen.
kientzle [Sun, 17 Apr 2005 17:53:24 +0000 (17:53 +0000)]
Configure script needs to test for dirent.d_namlen.

Thanks to: Juergen Lock

19 years agoUpdate "make distfile" to use newest automake/autoconf from ports.
kientzle [Sun, 17 Apr 2005 17:51:05 +0000 (17:51 +0000)]
Update "make distfile" to use newest automake/autoconf from ports.

Thanks to: Juergen Lock

19 years agoMerge some style and minor changes from NetBSD:
marius [Sun, 17 Apr 2005 17:44:01 +0000 (17:44 +0000)]
Merge some style and minor changes from NetBSD:
- ncr53c9x.c:
  1.108: Remove unreachable break after return and goto statements.
  1.109: avoid strong words; use 'screw' instead
  1.110: Fix some typos. From Tom Cosgrove via jmc@openbsd.
  1.114: nuke trailing whitespace

  1.107 was already merged, 1.112 and 1.113 are not relevant for FreeBSD.
  1.111 is a functional change and will be merged later.

- ncr53c9xreg.h:
  1.12: DMA, not dma nor Dma.
  1.13: Fix some typos. From Tom Cosgrove via jmc@openbsd.
  1.14: nuke trailing whitespace

- ncr53c9xvar.h:
  1.43: Fix some typos. From Tom Cosgrove via jmc@openbsd.
  1.44: Constify.

  1.42 and 1.46 were already merged, 1.45 is not relevant for FreeBSD.

19 years agoStyle and minor changes:
marius [Sun, 17 Apr 2005 17:42:36 +0000 (17:42 +0000)]
Style and minor changes:
- Merge esp_sbus.c rev. 1.31 from NetBSD: nuke trailing whitespace.
  Rev. 1.28 and 1.30 were already merged, 1.29 is not relevant for FreeBSD.
- Remove unused headers.
- Use BUS_PROBE_DEFAULT.
- Use __func__ instead of hardcoded function names in error messages.
- Correct some comments.
- Correct some function declarations to match their prototypes.
- Some style(9) fixes (don't use function calls in initializers; indentation).
- Zero the allocated structs to avoid problems with uninitialized members.
- Remove the ifdef'ed out SBus interrupt priority code and the hook for
  ncr53c9x_reset(), remove the unused SBus interrupt priority member from
  esp_softc. On FreeBSD setting the SBus interrupt priority is entirely done
  in sbus(4) and the reset function isn't even really used in NetBSD.
- s,dma,DMA, in comments.
- Make the code fit in 80 columns.

19 years agoStyle and minor changes:
marius [Sun, 17 Apr 2005 17:41:32 +0000 (17:41 +0000)]
Style and minor changes:
- Merge lsi64854.c rev. 1.25 from NetBSD: nuke trailing whitespace.
- Update NetBSD RCS IDs according to what was actually already merged.
- Remove dv_name from the lsi64854_softc and use device_printf() instead.
- Use __func__ instead of hardcoded function names in error messages.
- Use ulmin() instead of min() for comparing the DMA sizes as the values
  involved actually are represented by 64bit unsigned instead of 32bit
  unsigned. As far as I can't tell this doesn't make a difference in
  practice though.
- Some style(9) fixes (mainly indentation).
- Remove unnecessary braces.

19 years agoSupport path-rewriting options (including --strip-components) for both
kientzle [Sun, 17 Apr 2005 17:20:54 +0000 (17:20 +0000)]
Support path-rewriting options (including --strip-components) for both
extraction and creation.  While I'm here, fix a bug reported by Garrett
Wollman: when stripping the leading '/' from the path "/", don't produce
an entry with an empty name; produce "." instead.

19 years agoFix a bug where we call pcm_getbuffersize twice.
matk [Sun, 17 Apr 2005 16:26:08 +0000 (16:26 +0000)]
Fix a bug where we call pcm_getbuffersize twice.

Pointed out by: Kazuhito HONDA <kazuhito at ph dot noda dot tus dot ac dot jp>

19 years agoNFS write gathering defers execution of NFS server write requests to wait
rwatson [Sun, 17 Apr 2005 16:25:36 +0000 (16:25 +0000)]
NFS write gathering defers execution of NFS server write requests to wait
to see if additional write requests will arrive that can be coalesced and
clustered with earlier ones.  When doing so, it must determine whether
the two requests are made by credentials with the same access writes, so
as not to coalesce improperly.  NFSW_SAMECRED() implements a test of two
credentials using a binary compare.

Replace NFSW_SAMECRED() macro with nfsrv_samecred() function, which is
aware of the contents and layout of a struct ucred, rather than a simple
binary compare.  While the binary compare works when ucred is simply a
zero'd and embedded 'struct ucred' in the NFS descriptor, it will work
less well when the ucred associated with an NFS descriptor is "real", so
has defined and populated reference count, mutex, etc.

MFC after: 1 week
Obtained from: TrustedBSD Project

19 years agoCatch up with new naming scheme for USB serial devices: s/ucom/cuaU/.
simon [Sun, 17 Apr 2005 16:08:51 +0000 (16:08 +0000)]
Catch up with new naming scheme for USB serial devices: s/ucom/cuaU/.

PR: docs/80027
Submitted by: Rong-En Fan <rafan@infor.org>

19 years agoDe-dma the uaudio <-> pcm bridge. We were not capable of doing DMA from
matk [Sun, 17 Apr 2005 15:26:51 +0000 (15:26 +0000)]
De-dma the uaudio <-> pcm bridge.  We were not capable of doing DMA from
this buffer anyway so the constraint that it had to be DMA capable only
caused pain when devices failed to aquire the memory.  Use a regular
malloc instead with sndbuf_setup.

Approved by:    tanimura (mentor)

19 years agoFix build for !YP case.
delphij [Sun, 17 Apr 2005 15:10:30 +0000 (15:10 +0000)]
Fix build for !YP case.

BTW.  Shall we change these fields to have yp_ prefix?  That will make the
code easier to read.

19 years agoUse __CONCAT() in the TUNABLE_ macros, this way we don't have to use 3
stefanf [Sun, 17 Apr 2005 15:08:34 +0000 (15:08 +0000)]
Use __CONCAT() in the TUNABLE_ macros, this way we don't have to use 3
macros per type.

19 years agolibc-internal interfaces should have two underscores in front
ume [Sun, 17 Apr 2005 14:42:52 +0000 (14:42 +0000)]
libc-internal interfaces should have two underscores in front
of their names.

Pointed out by: das

19 years agoAdd one more Promise SATAII/150 chip id.
sos [Sun, 17 Apr 2005 13:37:57 +0000 (13:37 +0000)]
Add one more Promise SATAII/150 chip id.

19 years agoRe-commit the following changes which were committed to these files
marius [Sun, 17 Apr 2005 12:45:20 +0000 (12:45 +0000)]
Re-commit the following changes which were committed to these files
at their old location in sys/dev/esp after they were repo-copied to
sys/sparc64/sbus at rev. 1.1:

sys/dev/esp/lsi64854.c rev. 1.2
sys/dev/esp/lsi64854var.h rev. 1.2

Add some style(9) touch ups; style(9) states that new code should follow
these conventions and, well, this is a new driver.

Tested on: i386, sparc64
Reviewed by: scottl

19 years agoForced commit to denote that these files were repo-copied from
marius [Sun, 17 Apr 2005 12:41:22 +0000 (12:41 +0000)]
Forced commit to denote that these files were repo-copied from
sys/dev/esp to sys/sparc64/sbus at rev. 1.1.

19 years ago- Split the bus probe function into a bus probe and a bus attach function
marius [Sun, 17 Apr 2005 11:32:34 +0000 (11:32 +0000)]
- Split the bus probe function into a bus probe and a bus attach function
  with the attaching of the children done in the bus attach function like
  it's supposed to be.
- In the bus probe nomatch function print the resources of the children
  like it's done in the other sparc64 specific bus drivers.
- For the clock frequency IVAR use the per-child values and fall back to
  the bus default in case a child doesn't have the respective property
  instead of always using the bus default so a child driver doesn't need
  to obtain the per-child value itself (see also the commit message of
  sys/dev/esp/esp_sbus.c rev. 1.7).
- Add support for pass-through allocations. The comment preceding
  sbus_alloc_resource() wasn't quite correct, we need to support pass-
  through allocations for the 'espdma' and 'ledma' (pseudo-)busses which
  hang off of the SBus in Ultra 1 machines. There can also be actual
  bridges like the SBus-to-PCMCIA bridge on the SBus and the XBox (SBus
  extension box) probably also involves one.

19 years agoSome clean-up announced in rev. 1.31:
marius [Sun, 17 Apr 2005 11:28:41 +0000 (11:28 +0000)]
Some clean-up announced in rev. 1.31:
- Use auto-generated typedefs for the prototypes of the device interface
  functions.
- Style(9) fixes (mainly don't use function calls in initializers).
- Use __func__ instead of hardcoded function names in error messages.
- Try to make error messages sound uniform.
- Try to keep the code within 80 columns.
- Correct some typos.
- Correct some function declarations to match their prototypes.
- Remove unused headers, macros and variables.
- Remove a bzero() superfluous due to allocating with M_ZERO.
- Use FBSDID.

19 years agoAdd startup script and default configuration file for bsnmpd.
glebius [Sun, 17 Apr 2005 10:47:58 +0000 (10:47 +0000)]
Add startup script and default configuration file for bsnmpd.

Reviewed by: harti

19 years agoMFi386: revision 1.1194 (Update the drm driver).
nyan [Sun, 17 Apr 2005 10:43:43 +0000 (10:43 +0000)]
MFi386: revision 1.1194 (Update the drm driver).

19 years agoFix the apm module on pc98.
nyan [Sun, 17 Apr 2005 10:41:59 +0000 (10:41 +0000)]
Fix the apm module on pc98.

Pointed out by: Kuwamura Shinya <kuwa at lares dot dti dot ne dot jp>
MFC after: 1 day

19 years agoRemove unneeded include.
nyan [Sun, 17 Apr 2005 09:44:17 +0000 (09:44 +0000)]
Remove unneeded include.

19 years agoOn record only devices, don't fail if we don't have a play channel.
julian [Sun, 17 Apr 2005 07:42:28 +0000 (07:42 +0000)]
On record only devices, don't fail if we don't have a play channel.

MFC after: 3 days

19 years agoWrong working directory, sorry. The previous patch was what I have
delphij [Sun, 17 Apr 2005 04:00:55 +0000 (04:00 +0000)]
Wrong working directory, sorry.  The previous patch was what I have
seen in NetBSD's tree, and this one is what I have submitted for review.

Pointy hat to: me

19 years agoRemove a check about whether sa->sa_len is equal to salen from
delphij [Sun, 17 Apr 2005 03:56:07 +0000 (03:56 +0000)]
Remove a check about whether sa->sa_len is equal to salen from
getnameinfo(3).  POSIX standard does not require a sa_len field
in sockaddr struct, hence such requirement will cause problem
for portability.

PR: standards/80008
Requested by: Xin Liu <lx@knight.6test.edu.cn>
Reviewed by: freebsd-standards (das)
MFC After: 2 weeks

19 years agos/int/size_t/ as appropriate.
das [Sun, 17 Apr 2005 01:06:37 +0000 (01:06 +0000)]
s/int/size_t/ as appropriate.

Noticed by: bde

19 years agoAdd another regression test - one we don't pass right now.
silby [Sun, 17 Apr 2005 00:56:38 +0000 (00:56 +0000)]
Add another regression test - one we don't pass right now.

19 years agoHave the regression test use a path in /tmp for a mount point
silby [Sun, 17 Apr 2005 00:40:27 +0000 (00:40 +0000)]
Have the regression test use a path in /tmp for a mount point
instead of a directory that only exists on my machine.

19 years agoDisable negative name caching for msdosfs to work around a bug.
das [Sat, 16 Apr 2005 23:47:19 +0000 (23:47 +0000)]
Disable negative name caching for msdosfs to work around a bug.
Since the name cache is case-sensitive and msdosfs isn't,
creating a file 'foo' won't invalidate a negative entry for 'FOO'.
There are similar problems related to 8.3 filenames.

A better solution is to override VOP_LOOKUP with a method that
canonicalizes the name, then calls vfs_cache_lookup().  Unfortunately,
it's not quite that simple because vfs_cache_lookup() will call
msdosfs_lookup() on a cache miss, and msdosfs_lookup() needs a way to
get at the original component name.

19 years agoAdd a kpte command to DDB. It dumps the PTE of a KVA. This helps
marcel [Sat, 16 Apr 2005 23:38:32 +0000 (23:38 +0000)]
Add a kpte command to DDB. It dumps the PTE of a KVA. This helps
to analyze faults and TLB/VHPT inconsistencies.

19 years agoBe bug-for-bug compatible with the C standard with respect to
das [Sat, 16 Apr 2005 22:36:51 +0000 (22:36 +0000)]
Be bug-for-bug compatible with the C standard with respect to
printf("%#.0o", 0).  Cite an amusing passage from a defect report.

19 years agoMore optimized math functions.
das [Sat, 16 Apr 2005 21:12:55 +0000 (21:12 +0000)]
More optimized math functions.

19 years agoImplement truncl() based on floorl().
das [Sat, 16 Apr 2005 21:12:47 +0000 (21:12 +0000)]
Implement truncl() based on floorl().

19 years agoConcatenate the line number rather than the string `__FILE__' in the
stefanf [Sat, 16 Apr 2005 20:47:32 +0000 (20:47 +0000)]
Concatenate the line number rather than the string `__FILE__' in the
NET_NEEDS_GIANT macro.  Until now this wasn't a problem because no
translation unit contains NET_NEEDS_GIANT more than once.

19 years agoSpell ATA_NFORCE4_S2 correctly.
sos [Sat, 16 Apr 2005 20:03:49 +0000 (20:03 +0000)]
Spell ATA_NFORCE4_S2 correctly.

19 years agoIntroduce three additional MAC Framework and MAC Policy entry points to
rwatson [Sat, 16 Apr 2005 18:46:29 +0000 (18:46 +0000)]
Introduce three additional MAC Framework and MAC Policy entry points to
control socket poll() (select()), fstat(), and accept() operations,
required for some policies:

        poll()          mac_check_socket_poll()
        fstat()         mac_check_socket_stat()
        accept()        mac_check_socket_accept()

Update mac_stub and mac_test policies to be aware of these entry points.
While here, add missing entry point implementations for:

        mac_stub.c      stub_check_socket_receive()
        mac_stub.c      stub_check_socket_send()
        mac_test.c      mac_test_check_socket_send()
        mac_test.c      mac_test_check_socket_visible()

Obtained from: TrustedBSD Project
Sponsored by: SPAWAR, SPARTA

19 years agoThose who are ungodlike should be returned an error.
trhodes [Sat, 16 Apr 2005 18:41:00 +0000 (18:41 +0000)]
Those who are ungodlike should be returned an error.

19 years agoIn mac_get_fd(), remove unconditional acquisition of Giant around copying
rwatson [Sat, 16 Apr 2005 18:33:13 +0000 (18:33 +0000)]
In mac_get_fd(), remove unconditional acquisition of Giant around copying
of the socket label to thread-local storage, and replace it with
conditional acquisition based on debug.mpsafenet.  Acquire the socket
lock around the copy operation.

In mac_set_fd(), replace the unconditional acquisition of Giant with
the conditional acquisition of Giant based on debug.mpsafenet.  The socket
lock is acquired in mac_socket_label_set() so doesn't have to be
acquired here.

Obtained from: TrustedBSD Project
Sponsored by: SPAWAR, SPARTA

19 years agoExtend a local buffer to prevent an overflow of the XSDT address.
njl [Sat, 16 Apr 2005 17:38:24 +0000 (17:38 +0000)]
Extend a local buffer to prevent an overflow of the XSDT address.

Submitted by: Joerg Sonnenberger
Obtained from: DragonflyBSD
MFC after: 1 day

19 years agoReduce the width of the THR column to 4 characters, to avoid wrap-around
keramida [Sat, 16 Apr 2005 15:43:38 +0000 (15:43 +0000)]
Reduce the width of the THR column to 4 characters, to avoid wrap-around
of lines in SMP machines (which are wider), until we have a better way
of handling window sizes & columns in top.

Caught by: ache, Andre Guibert de Bruet <andy@siliconlandmark.com>
Point hat: keramida

19 years agoIncrease default HZ for sparc64 to 1000.
marius [Sat, 16 Apr 2005 15:07:41 +0000 (15:07 +0000)]
Increase default HZ for sparc64 to 1000.

19 years ago- MFi386: sys/i386/i386/intr_machdep.c rev. 1.11
marius [Sat, 16 Apr 2005 15:05:56 +0000 (15:05 +0000)]
- MFi386: sys/i386/i386/intr_machdep.c rev. 1.11
  Don't use atomic ops to increment interrupt stats.
  On sparc64 this reduces delay until tick interrupts are service by 1/10th
  on average. In turn this reduces the clock drift caused by these delays
  so there's less drift which has to be compensated in tick_hardclock().
  This includes switching from atomically incrementing the global cnt.v_intr
  to the asm equivalent of PCPU_LAZY_INC(cnt.v_intr) in exception.S
- Correct some comments to match the registers actually used.
- Correct some format specifiers, interrupt levels passed in are u_int.
- Use FBSDID.

Ok'ed by: jhb

19 years agoSome changes to intr_execute_handlers():
marius [Sat, 16 Apr 2005 15:02:16 +0000 (15:02 +0000)]
Some changes to intr_execute_handlers():
- Fix NULL pointer dereferences caused when an ithread or a handler is
  NULL which happens when a stray interrupt triggers after the respective
  device interrupt was torn down.
- Remove the critical section around INTR_FAST handlers which actually
  was a nested critical section. Both tl0_intr() and tl1_intr() already
  enter a critical section for calling intr_execute_handlers().

MFC after: 3 days

19 years ago- In sparc64_init() remove the call to tick_stop(). There's no need to
marius [Sat, 16 Apr 2005 15:00:09 +0000 (15:00 +0000)]
- In sparc64_init() remove the call to tick_stop(). There's no need to
  call tick_stop() again after tick_init() as tick interrupts already
  have been disabled as part of tick_init().
- In spinlock_enter() replace the magic value for PIL TICK with the
  respective macro.
- Use FBSDID.

19 years ago- Add a workaround for a bug in BlackBird CPUs (said to be part of the
marius [Sat, 16 Apr 2005 14:57:38 +0000 (14:57 +0000)]
- Add a workaround for a bug in BlackBird CPUs (said to be part of the
  SpitFire erratum #54) which can cause writes to the TICK_CMPR register
  to fail. This seems to fix the dying clocks problem reported by jhb@
  and kris@. [1]
- In tick_start() don't reset the tick counter of the boot processor to
  zero. It's initially reset in _start() and afterwards but _before_
  tick_start() is called on the BSP the APs synchronise with the tick
  counter of the BSP in mp_startup(). Resetting the tick counter of the
  BSP in tick_start() probably also was the cause of problems seen when
  using the CPU tick counter as timecounter on SMP machines.
  Not resetting the tick counter of the BSP in mp_startup() makes the
  tick counters and tick interrupts between the BSP and APs be pretty
  much in sync as it's supposed to be. This also means there's no longer
  a real reason to have separate tick_start() and tick_start_ap() so
  merge them and zap tick_start_ap(). This is also a first step in
  simplifying the interface to the tick counters in preparation to use
  alternate clock hardware where available.
- Switch to the algorithm used on FreeBSD/ia64 for updating the tick
  interrupt register and which compensates the clock drift caused by
  varying delays between when the tick interrupts actually trigger and
  when they are serviced. Not compensating the clock drift mainly hurts
  interactive performance especially when using WITNESS. [2]
  For further information about the algorithm also see the commit log
  of sys/ia64/ia64/interrupt.c rev. 1.38.
  On sparc64 the sysctls for monitoring the behaviour of the tick
  interrupts are machdep.tick.adjust_edges, machdep.tick.adjust_excess,
  machdep.tick.adjust_missed and machdep.tick.adjust_ticks.
- In tick_init() just use tick_stop() for stopping the tick interrupts
  until a proper handler is set up later. This also stops the system
  tick interrupt on USIII systems earlier.
- In tick_start() check for a rough upper limit of HZ.
- Some minor changes, e.g. use FBSDID, remove unused headers, etc.

Info obtained from: Linux [1]
Ok'ed by: marcel [2]
Additional testing by: kris (earlier version of the workaround), jhb
X-MFC after: 3 days [1]

19 years agoFix a style(9) bug in the stxa_sync() macro (DO NOT use function calls
marius [Sat, 16 Apr 2005 14:47:50 +0000 (14:47 +0000)]
Fix a style(9) bug in the stxa_sync() macro (DO NOT use function calls
in initializers).

19 years agoIntroduce new MAC Framework and MAC Policy entry points to control the use
rwatson [Sat, 16 Apr 2005 13:29:15 +0000 (13:29 +0000)]
Introduce new MAC Framework and MAC Policy entry points to control the use
of system calls to manipulate elements of the process credential,
including:

        setuid()                mac_check_proc_setuid()
        seteuid()               mac_check_proc_seteuid()
        setgid()                mac_check_proc_setgid()
        setegid()               mac_check_proc_setegid()
        setgroups()             mac_check_proc_setgroups()
        setreuid()              mac_check_proc_setreuid()
        setregid()              mac_check_proc_setregid()
        setresuid()             mac_check_proc_setresuid()
        setresgid()             mac_check_rpoc_setresgid()

MAC checks are performed before other existing security checks; both
current credential and intended modifications are passed as arguments
to the entry points.  The mac_test and mac_stub policies are updated.

Submitted by: Samy Al Bahra <samy@kerneled.org>
Obtained from: TrustedBSD Project

19 years agoXref ataraid(4).
brueffer [Sat, 16 Apr 2005 12:43:17 +0000 (12:43 +0000)]
Xref ataraid(4).

19 years agoManual page for the ataraid(4) software RAID driver.
brueffer [Sat, 16 Apr 2005 12:40:38 +0000 (12:40 +0000)]
Manual page for the ataraid(4) software RAID driver.

Reviewed by: sos

19 years agoUnbreak the build on 64-bit architectures.
des [Sat, 16 Apr 2005 12:37:16 +0000 (12:37 +0000)]
Unbreak the build on 64-bit architectures.

19 years agoAdd ALQ and KTR_ALQ to NOTES so that they are built into LINT.
rwatson [Sat, 16 Apr 2005 12:14:43 +0000 (12:14 +0000)]
Add ALQ and KTR_ALQ to NOTES so that they are built into LINT.

19 years agoModify the alq(9) alq_open() API to accept a file creation mode, rather
rwatson [Sat, 16 Apr 2005 12:12:27 +0000 (12:12 +0000)]
Modify the alq(9) alq_open() API to accept a file creation mode, rather
than defaulting the cmode argument to vn_open() to 0.  Supply a default
argument of ALQ_DEFAULT_CMODE (0600) in current callers.

Discussed with/pointed out by: hmp
Reveiwed by: jeff, hmp
MFC after: 3 days

19 years agoStarting point for a regression test for mac_bsdextended(4)/libugidfw(3).
rwatson [Sat, 16 Apr 2005 12:06:40 +0000 (12:06 +0000)]
Starting point for a regression test for mac_bsdextended(4)/libugidfw(3).
Currently only performs basic tests against the library string routines,
and queries less important kernel state.

Obtained from: TrustedBSD Project
Sponsored by: SPAWAR, SPARTA
MFC after: 3 days