]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoo Typo: ownship -> ownership.
maxim [Sat, 17 Jun 2006 07:25:58 +0000 (07:25 +0000)]
o Typo: ownship -> ownership.

Obtained from: DragonFlyBSD

18 years agoMFCs noted: pc98 CDROM bootloader, linsysfs(5).
bmah [Sat, 17 Jun 2006 04:54:00 +0000 (04:54 +0000)]
MFCs noted:  pc98 CDROM bootloader, linsysfs(5).

18 years agoAdd a description for sysctl -d.
emaste [Sat, 17 Jun 2006 02:58:18 +0000 (02:58 +0000)]
Add a description for sysctl -d.

18 years agoDocument that we can only bridge wireless interfaces in hostap mode, this is
thompsa [Fri, 16 Jun 2006 23:03:22 +0000 (23:03 +0000)]
Document that we can only bridge wireless interfaces in hostap mode, this is
becoming a faq.

MFC after: 1 week

18 years agoRemove extra blank line below comment.
rwatson [Fri, 16 Jun 2006 22:31:56 +0000 (22:31 +0000)]
Remove extra blank line below comment.

MFC after: 1 week

18 years agoRemove unused (and ifdef'd) unp_abort() and unp_drain().
rwatson [Fri, 16 Jun 2006 22:11:49 +0000 (22:11 +0000)]
Remove unused (and ifdef'd) unp_abort() and unp_drain().

MFC after: 1 month

18 years agoCheck for errors when registering and unregistering firmware modules. This
jhb [Fri, 16 Jun 2006 21:06:03 +0000 (21:06 +0000)]
Check for errors when registering and unregistering firmware modules.  This
prevents the unfortunate situation whereby one might kldload a firmware
module by hand and later kldunload it while a driver still has an open
reference to it.

MFC after: 1 week
Glanced at by: iedowse

18 years agoAdd a kern.timecounter.tc sysctl tree that contains the mask,
dwmalone [Fri, 16 Jun 2006 20:29:05 +0000 (20:29 +0000)]
Add a kern.timecounter.tc sysctl tree that contains the mask,
frequency, quality and current value of each available time counter.

At the moment all of these are read-only, but it might make sense to
make some of these read-write in the future.

MFC after: 3 months

18 years agoNever zero-out db_last_symtab. Whan backtraces are done
kib [Fri, 16 Jun 2006 16:17:52 +0000 (16:17 +0000)]
Never zero-out db_last_symtab. Whan backtraces are done
in parallel in several threads, one symbol lookup could
clear db_last_symtab when another one going to use it as
starting point for traversal.

Approved by: pjd (mentor)
MFC after: 1 month

18 years agoMention that the powernow driver also supports AMD Cool'n'Quiet.
brueffer [Fri, 16 Jun 2006 14:51:23 +0000 (14:51 +0000)]
Mention that the powernow driver also supports AMD Cool'n'Quiet.

MFC after: 3 days

18 years agoUnbreak tinderbox- fix device_printf arg to accomodate different sizes
mjacob [Fri, 16 Jun 2006 14:04:21 +0000 (14:04 +0000)]
Unbreak tinderbox- fix device_printf arg to accomodate different sizes
of vm_paddr_t in different contexts (e.g., PAE vs. non PAE).

18 years agoBuild the ppc module on pc98.
nyan [Fri, 16 Jun 2006 12:51:53 +0000 (12:51 +0000)]
Build the ppc module on pc98.

18 years agoReturn -1 from db_numargs() if number of args couldn't be guessed.
yar [Fri, 16 Jun 2006 11:49:37 +0000 (11:49 +0000)]
Return -1 from db_numargs() if number of args couldn't be guessed.
Use this later to indicate in backtrace output that args shown are
uncertain.

Sponsored by: RiNet (Cronyx Plus LLC)

18 years agoAllow for ppc(4) to be built as module, initially
kib [Fri, 16 Jun 2006 11:44:55 +0000 (11:44 +0000)]
Allow for ppc(4) to be built as module, initially
only for i386 and amd64.

MFC after: 1 month
Approved by: pjd (mentor)

18 years agoGuess the number of arguments to a function somewhat better.
yar [Fri, 16 Jun 2006 11:14:54 +0000 (11:14 +0000)]
Guess the number of arguments to a function somewhat better.
Now GCC likes to stick a "mov %eax, %FOO" instruction before
"addl $BAR, %esp" if the function just called returns an int,
which is a very common case in the kernel.

Sponsored by: RiNet (Cronyx Plus LLC)

18 years agoFix pfsync w/o carp compilation.
mlaier [Fri, 16 Jun 2006 10:25:06 +0000 (10:25 +0000)]
Fix pfsync w/o carp compilation.

Submitted by: yar

18 years agoKill an XXX remark that has been untrue since rev. 1.150 of this file.
yar [Fri, 16 Jun 2006 07:36:18 +0000 (07:36 +0000)]
Kill an XXX remark that has been untrue since rev. 1.150 of this file.

18 years agoAxe Giant from vn_fullpath(9). The vnode -> pathname lookup should be
csjp [Fri, 16 Jun 2006 05:09:28 +0000 (05:09 +0000)]
Axe Giant from vn_fullpath(9). The vnode -> pathname lookup should be
filesystem agnostic. We are not touching any file system specific functions
in this code path. Since we have a cache lock, there is really no need to
keep Giant around here.

This eliminates Giant acquisitions for any syscall which is auditing pathnames.

Discussed with: jeff

18 years agoRemove COMPAT_43 from GENERIC (and other kernel configs). For amd64 there's
netchild [Thu, 15 Jun 2006 19:58:53 +0000 (19:58 +0000)]
Remove COMPAT_43 from GENERIC (and other kernel configs). For amd64 there's
an explicit comment that it's needed for the linuxolator. This is not the
case anymore. For all other architectures there was only a "KEEP THIS".
I'm (and other people too) running a COMPAT_43-less kernel since it's not
necessary anymore for the linuxolator. Roman is running such a kernel for a
for longer time. No problems so far. And I doubt other (newer than ia32
or alpha) architectures really depend on it.

This may result in a small performance increase for some workloads.

If the removal of COMPAT_43 results in a not working program, please
recompile it and all dependencies and try again before reporting a
problem.

The only place where COMPAT_43 is needed (as in: does not compile without
it) is in the (outdated/not usable since too old) svr4 code.

Note: this does not remove the COMPAT_43TTY option.

Nagging by: rdivacky

18 years agomxge(4) works with altq.
brueffer [Thu, 15 Jun 2006 19:38:42 +0000 (19:38 +0000)]
mxge(4) works with altq.

Tested by: gallatin

18 years agoo Make grep ^strlcpy work: put a return value type on separate line.
maxim [Thu, 15 Jun 2006 15:56:55 +0000 (15:56 +0000)]
o Make grep ^strlcpy work: put a return value type on separate line.

18 years agoSince we are doing some bpf(4) clean up, change a couple of function prototypes
csjp [Thu, 15 Jun 2006 15:39:12 +0000 (15:39 +0000)]
Since we are doing some bpf(4) clean up, change a couple of function prototypes
to be consistent. Also, ANSI'fy function definitions. There is no functional
change here.

18 years agoForced commit to note that previous commit was also:
glebius [Thu, 15 Jun 2006 14:35:31 +0000 (14:35 +0000)]
Forced commit to note that previous commit was also:

Partially submitted by: Pavel Merdin <freebsd-bugs merdin.com>
Tested by: Lucas Nussbaum <lucas.nussbaum imag.fr>

18 years agoPossess some work from OpenBSD, with some local additions.
glebius [Thu, 15 Jun 2006 14:31:49 +0000 (14:31 +0000)]
Possess some work from OpenBSD, with some local additions.

- Add more device IDs, ASIC revisions and chip IDs.
- Rewrite a bit code that picks the description for device.
- Introduce several macros to shorten quirks for bugs and
  features.[*]
- Use some magic values, that OpenBSD has successfully
  possessed from Linux (Broadcom supplied) driver.
- Remove disabled code that tried to access VPD.

[*] The macro that matches Jumbo capable NICs is
    rewritten to preserve our current behavior. I
    need clarify whether our or theirs is correct.

PR: 68351 (and may be others)
Obtained from: OpenBSD, brad@ mostly

18 years agoAdd support of 'tablearg' feature for:
oleg [Thu, 15 Jun 2006 09:39:22 +0000 (09:39 +0000)]
Add support of 'tablearg' feature for:
- 'tag' & 'untag' action parameters.
- 'tagged' & 'limit' rule options.
Rule examples:
pipe 1 tag tablearg ip from table(1) to any
allow ip from any to table(2) tagged tablearg
allow tcp from table(3) to any 25 setup limit src-addr tablearg

sbin/ipfw/ipfw2.c:
1) new macros
   GET_UINT_ARG - support of 'tablearg' keyword, argument range checking.
   PRINT_UINT_ARG - support of 'tablearg' keyword.
2) strtoport(): do not silently truncate/accept invalid port list expressions
   like: '1,2-abc' or '1,2-3-4' or '1,2-3x4'. style(9) cleanup.

Approved by: glebius (mentor)
MFC after: 1 month

18 years agoinstall_state(): style(9) cleanup
oleg [Thu, 15 Jun 2006 08:54:29 +0000 (08:54 +0000)]
install_state(): style(9) cleanup

Approved by: glebius (mentor)
MFC after: 1 month

18 years agoo Expand an exclusive lock scope to prevent a race between two
maxim [Thu, 15 Jun 2006 08:53:09 +0000 (08:53 +0000)]
o Expand an exclusive lock scope to prevent a race between two
simultaneous module_register().

Original work done by: Alex Lyashkov
Reviewed by: jhb
MFC after: 2 weeks

18 years agoMerge NetBSD's revision 1.86: Don't crash on "<cmd> | { }".
stefanf [Thu, 15 Jun 2006 07:57:05 +0000 (07:57 +0000)]
Merge NetBSD's revision 1.86:  Don't crash on "<cmd> | { }".

18 years agoImplement the PS4 variable which is defined by the POSIX User Portability
stefanf [Thu, 15 Jun 2006 07:00:49 +0000 (07:00 +0000)]
Implement the PS4 variable which is defined by the POSIX User Portability
Utilities option.  Its value is printed at the beginning of the line if tracing
(-x) is active.  PS4 defaults to the string "+ " which is compatible with the
old behaviour to always print "+ ".

We still need to expand variables in PS1, PS2 and PS4.

PR: 46441 (part of)
Submitted by: schweikh
Obtained from: NetBSD

18 years agoUse scheduler API sched_relinquish() to implement yield() syscall.
davidxu [Thu, 15 Jun 2006 06:41:57 +0000 (06:41 +0000)]
Use scheduler API sched_relinquish() to implement yield() syscall.

18 years agoAdd scheduler API sched_relinquish(), the API is used to implement
davidxu [Thu, 15 Jun 2006 06:37:39 +0000 (06:37 +0000)]
Add scheduler API sched_relinquish(), the API is used to implement
yield() and sched_yield() syscalls. Every scheduler has its own way
to relinquish cpu, the ULE and CORE schedulers have two internal run-
queues, a timesharing thread which calls yield() syscall should be
moved to inactive queue.

18 years agoRemove mpte optimization from pmap_enter_quick().
ups [Thu, 15 Jun 2006 01:01:06 +0000 (01:01 +0000)]
Remove mpte optimization from pmap_enter_quick().
There is a race with the current locking scheme and removing
it should have no measurable performance impact.
This fixes page faults leading to panics in pmap_enter_quick_locked()
on amd64/i386.

Reviewed by: alc,jhb,peter,ps

18 years agoBump the version of src/etc/sendmail/freebsd*mc so mergemaster will
gshapiro [Wed, 14 Jun 2006 23:03:41 +0000 (23:03 +0000)]
Bump the version of src/etc/sendmail/freebsd*mc so mergemaster will
merge /etc/mail/freebsd*cf

Submitted by: Rostislav Krasny

18 years agoMuch to my surprise, IFQ_DRV_DEQUEUE() can return a null mbuf even if
gallatin [Wed, 14 Jun 2006 19:32:00 +0000 (19:32 +0000)]
Much to my surprise, IFQ_DRV_DEQUEUE() can return a null mbuf even if
!IFQ_DRV_IS_EMPTY().  Taking this into account,  I re-structured the
transmit routine so as to avoid adding another if/then in the
critical path.

Thanks to brueffer for showing my how to test with altq/pf.

18 years ago- new sentence -> new line
brueffer [Wed, 14 Jun 2006 18:26:34 +0000 (18:26 +0000)]
- new sentence -> new line
- s/freebsd/FreeBSD/ for consistency
- eol and eof whitespace removed

18 years agoReplace a sc->ifp->if_snd.ifq_drv_maxlen with IFQ_SET_MAXLEN(),
gallatin [Wed, 14 Jun 2006 17:52:30 +0000 (17:52 +0000)]
Replace a sc->ifp->if_snd.ifq_drv_maxlen with IFQ_SET_MAXLEN(),
and call IFQ_SET_READY().

Submitted by: brueffer

18 years agoCorrect an error in the previous revision that could lead to a panic:
alc [Wed, 14 Jun 2006 17:48:45 +0000 (17:48 +0000)]
Correct an error in the previous revision that could lead to a panic:
Found mapped cache page.  Specifically, if cnt.v_free_count dips below
cnt.v_free_reserved after p_start has been set to a non-NULL value,
then vm_map_pmap_enter() would break out of the loop and incorrectly
call pmap_enter_object() for the remaining address range.  To correct
this error, this revision truncates the address range so that
pmap_enter_object() will not map any cache pages.

In collaboration with: tegge@
Reported by: kris@

18 years agoRemove the initial myri10ge driver, now that it has been
gallatin [Wed, 14 Jun 2006 17:07:21 +0000 (17:07 +0000)]
Remove the initial myri10ge driver, now that it has been
renamed mxge.

18 years ago- Document FreeBSD-SA-06:17.sendmail.
hrs [Wed, 14 Jun 2006 16:53:35 +0000 (16:53 +0000)]
- Document FreeBSD-SA-06:17.sendmail.
- Split an item of sendmail import since 8.13.7 is not merged yet.

18 years agoRecord sendmail 8.13.7 import
gshapiro [Wed, 14 Jun 2006 16:34:39 +0000 (16:34 +0000)]
Record sendmail 8.13.7 import

18 years agoUpdate FreeBSD info regarding sendmail 8.13.7 import
gshapiro [Wed, 14 Jun 2006 16:33:59 +0000 (16:33 +0000)]
Update FreeBSD info regarding sendmail 8.13.7 import

18 years agoResolve conflicts from sendmail 8.13.7 import
gshapiro [Wed, 14 Jun 2006 16:25:31 +0000 (16:25 +0000)]
Resolve conflicts from sendmail 8.13.7 import

18 years agoUpdate the mxge driver.
gallatin [Wed, 14 Jun 2006 16:23:17 +0000 (16:23 +0000)]
Update the mxge driver.

- Update the firmware to the latest released firmware
  (1.4.3), which corresponds to the firmware in the
  latest shipping drivers from Myricom.  This firmware
  fixes several bugs in the firmware's PCI-e implementation,
  and it also changes the driver/firmware interface:

  o TSO was added, and changed the format of the transmit
    descriptors.
  o The firmware no longer counts transmits descriptors,
    but frames.  So the driver needs to keep a count
    of the number of frames sent.
  o The weird interrupt strategy changed to a normal receive
    return ring.  This ring is much bigger, and we may be
    able to support DEVICE_POLLING.
  o Myricom's header files changed the name of firmware
    related #define's and enums (s/_MCP_/FW_).

- Stopped spamming the console with lots of printfs unless
  mxge_verbose (or bootverbose) is set.

- Made additional information available via sysctl, including
  the results of a PCI-e DMA benchmark run at device reset.

- Decreased the excessively long timeouts when sending commands
  from 2 seconds to 20ms.

Sponsored by: Myricom Inc.

18 years agoThis commit was generated by cvs2svn to compensate for changes in r159609,
gshapiro [Wed, 14 Jun 2006 16:23:02 +0000 (16:23 +0000)]
This commit was generated by cvs2svn to compensate for changes in r159609,
which included commits to RCS files with non-trunk default branches.

18 years agoImport sendmail 8.13.7
gshapiro [Wed, 14 Jun 2006 16:23:02 +0000 (16:23 +0000)]
Import sendmail 8.13.7

Security: FreeBSD-SA-06:17.sendmail

18 years agoChange the myri10ge dev entity and all consumers to mxge.
brueffer [Wed, 14 Jun 2006 15:32:50 +0000 (15:32 +0000)]
Change the myri10ge dev entity and all consumers to mxge.

18 years agoo Revert a previous delta as strlcpy(3) operates with NUL-terminated
maxim [Wed, 14 Jun 2006 15:09:52 +0000 (15:09 +0000)]
o Revert a previous delta as strlcpy(3) operates with NUL-terminated
strings and cp is not.  Fix logic in the original code and eliminate
core dumps on lines without '\n'.

18 years agoo Replace (an incorrect) string copy gymnastics with strlcpy(3).
maxim [Wed, 14 Jun 2006 11:45:01 +0000 (11:45 +0000)]
o Replace (an incorrect) string copy gymnastics with strlcpy(3).

PR: bin/98905
Submitted by: Fabian Keil
MFC after: 1 week

18 years agoFix byteorder of syncpeer and make it actually work.
mlaier [Wed, 14 Jun 2006 11:11:54 +0000 (11:11 +0000)]
Fix byteorder of syncpeer and make it actually work.

Submitted by: glebius
MFC after: 1 week

18 years agoFix spelling.
joel [Wed, 14 Jun 2006 08:32:25 +0000 (08:32 +0000)]
Fix spelling.

18 years agoClear ke_runq before calling maybe_preempt, this avoids a
davidxu [Wed, 14 Jun 2006 03:46:03 +0000 (03:46 +0000)]
Clear ke_runq before calling maybe_preempt, this avoids a
KASSERT(ke->ke_runq == NULL) panic when the sched_add is recursively
called by maybe_preempt.

Reported by: Wojciech A. Koszek < dunstan at freebsd dot czest dot pl >

18 years agoUnexpand an instance of TAILQ_EMPTY()
delphij [Wed, 14 Jun 2006 03:14:26 +0000 (03:14 +0000)]
Unexpand an instance of TAILQ_EMPTY()

18 years agoUnbreak build on platforms that don't have uart_sab82532 and uart_z8530
marcel [Wed, 14 Jun 2006 03:03:08 +0000 (03:03 +0000)]
Unbreak build on platforms that don't have uart_sab82532 and uart_z8530
for uart(4) by default, but have scc(4).

18 years agoUnbreak 64-bit architectures. The 3rd argument to kern_kldload() is
marcel [Wed, 14 Jun 2006 03:01:06 +0000 (03:01 +0000)]
Unbreak 64-bit architectures. The 3rd argument to kern_kldload() is
a pointer to an integer and td->td_retval[0] is of type register_t.
On 64-bit architectures register_t is wider than an integer.

18 years agoIf bpf(4) has not been compiled into the kernel, initialize the bpf interface
csjp [Wed, 14 Jun 2006 02:23:28 +0000 (02:23 +0000)]
If bpf(4) has not been compiled into the kernel, initialize the bpf interface
pointer to a zeroed, statically allocated bpf_if structure. This way the
LIST_EMPTY() macro will always return true. This allows us to remove the
additional unconditional memory reference for each packet in the fast path.

Discussed with: sam

18 years agoAdd a manpage for the CORE scheduler.
delphij [Wed, 14 Jun 2006 02:16:51 +0000 (02:16 +0000)]
Add a manpage for the CORE scheduler.

18 years agoFox a typo in sched_is_timeshare.
davidxu [Tue, 13 Jun 2006 23:45:59 +0000 (23:45 +0000)]
Fox a typo in sched_is_timeshare.

18 years agoPass boolean value to __predict_false. Try to keep KSE slot count
davidxu [Tue, 13 Jun 2006 23:01:50 +0000 (23:01 +0000)]
Pass boolean value to __predict_false. Try to keep KSE slot count
correct for migrating thread, the count is a bit mess.

18 years agoUse kern_kldload() and kern_kldunload() to load and unload modules when
jhb [Tue, 13 Jun 2006 21:36:23 +0000 (21:36 +0000)]
Use kern_kldload() and kern_kldunload() to load and unload modules when
we intend for the user to be able to unload them later via kldunload(2)
instead of calling linker_load_module() and then directly adjusting the
ref count on the linker file structure.  This makes the resulting
consumer code simpler and cleaner and better hides the linker internals
making it possible to sanely lock the linker.

18 years agoA couple of minor style tweaks.
jhb [Tue, 13 Jun 2006 21:34:12 +0000 (21:34 +0000)]
A couple of minor style tweaks.

18 years ago- Add a kern_kldload() that is most of the previous kldload() and push
jhb [Tue, 13 Jun 2006 21:28:18 +0000 (21:28 +0000)]
- Add a kern_kldload() that is most of the previous kldload() and push
  Giant down in it.
- Push Giant down in kern_kldunload() and reorganize it slightly to avoid
  using gotos.  Also, expose this function to the rest of the kernel.

18 years ago- Push down Giant some in kldstat().
jhb [Tue, 13 Jun 2006 21:11:12 +0000 (21:11 +0000)]
- Push down Giant some in kldstat().
- Use a 'struct kld_file_stat' on the stack to read data under the lock
  and then do one copyout() w/o holding the lock at the end to push the
  data out to userland.

18 years agoUnexpand TAILQ_FOREACH() and TAILQ_FOREACH_SAFE().
jhb [Tue, 13 Jun 2006 20:49:07 +0000 (20:49 +0000)]
Unexpand TAILQ_FOREACH() and TAILQ_FOREACH_SAFE().

18 years agoRemove some more pointless goto's and don't check to see if
jhb [Tue, 13 Jun 2006 20:27:23 +0000 (20:27 +0000)]
Remove some more pointless goto's and don't check to see if
malloc(M_WAITOK) returns NULL.

18 years agoHandle the simple case of just dropping a reference near the start of
jhb [Tue, 13 Jun 2006 19:45:08 +0000 (19:45 +0000)]
Handle the simple case of just dropping a reference near the start of
linker_file_unload() instead of in the middle of a bunch of code for
the case of dropping the last reference to improve readability and sanity.
While I'm here, remove pointless goto's that were just jumping to a
return statement.

18 years ago- Complete breaking out the definition of bus_space_{tag,handle}_t by
marius [Tue, 13 Jun 2006 19:18:09 +0000 (19:18 +0000)]
- Complete breaking out the definition of bus_space_{tag,handle}_t by
  moving the typedef of bus_space_tag_t from sys/sparc64/include/bus.h
  to sys/sparc64/include/_bus.h. This brings sparc64 in sync with the
  other platforms and fixes the compilation of drivers which include
  <sys/rman.h> before <machine/bus.h> after sys/sys/rman.h rev. 1.34.
- Remove the definition of bus_type_t from sys/sparc64/include/_bus.h
  as it's unused since sys/sparc64/include/bus.h rev. 1.6 and
  sys/sparc64/sparc64/bus_machdep.c rev. 1.3.
- Remove some pointless comments.

18 years agoregen after MFP4 (soc2006/rdivacky_linuxolator) of syscalls.master
netchild [Tue, 13 Jun 2006 18:48:30 +0000 (18:48 +0000)]
regen after MFP4 (soc2006/rdivacky_linuxolator) of syscalls.master

P4-Changes: similar to 98673 and 98675 but regenerated locally
Sponsored by: Google SoC 2006
Submitted by: rdivacky

18 years agoMFP4 (soc2006/rdivacky_linuxolator)
netchild [Tue, 13 Jun 2006 18:43:55 +0000 (18:43 +0000)]
MFP4 (soc2006/rdivacky_linuxolator)

Update of syscall.master:
o Adding of several new dummy syscalls (268-310)
o Synchronization of amd64 syscall.master with i386 one
o Auditing added to amd64 syscall.master
o Change auditing type for lstat syscall (bugfix). [1]

P4-Changes: 98672, 98674
Noticed by: rwatson [1]
Sponsored by: Google SoC 2006
Submitted by: rdivacky

18 years agoCorrect transposed digits in device names which were added in the
marius [Tue, 13 Jun 2006 18:40:39 +0000 (18:40 +0000)]
Correct transposed digits in device names which were added in the
previous revision.

18 years agoFreeBSD/sparc64 supports the Ultra1 (with a serial console) on (at
bmah [Tue, 13 Jun 2006 17:49:33 +0000 (17:49 +0000)]
FreeBSD/sparc64 supports the Ultra1 (with a serial console) on (at
least) 6.1-RELEASE, so move it to the "supported" list.

Submitted by: Gheorghe Ardelean ardelean at ww.uni-erlangen.de

18 years agoMake traceroute decode all the ICMP unreachable messages defined
dwmalone [Tue, 13 Jun 2006 14:59:07 +0000 (14:59 +0000)]
Make traceroute decode all the ICMP unreachable messages defined
in http://www.iana.org/assignments/icmp-parameters. Thankfully
IANA's list aggrees with <netinet/ip_icmp.h>.

I've tried to do this in a way which is mostly consistent with
tcptraceroute and Debian's version of traceroute. However, sometimes
a letter is used twice by these versions, so I've gone with:

                                LBL     tcptr   Debian          (chosen)
ICMP_UNREACH_NET                !N      !N      !N              !N
ICMP_UNREACH_HOST               !H      !H      !H              !H
ICMP_UNREACH_PROTOCOL           !P      !P      !P              !P
ICMP_UNREACH_PORT               !       !p      !               !
ICMP_UNREACH_NEEDFRAG           !F-%d   !F      !F-<%d>         !F-<%d>
ICMP_UNREACH_SRCFAIL            !S      !S      !S              !S
ICMP_UNREACH_NET_UNKNOWN        !<%d>   !U      !<%d>           !U
ICMP_UNREACH_HOST_UNKNOWN       !<%d>   !U      !<%d>           !W
ICMP_UNREACH_ISOLATED           !<%d>   !I      !I              !I
ICMP_UNREACH_NET_PROHIB         !<%d>   !A      !A              !A
ICMP_UNREACH_HOST_PROHIB        !<%d>   !C      !C              !Z
ICMP_UNREACH_TOSNET             !<%d>   !T      !T              !Q
ICMP_UNREACH_TOSHOST            !<%d>   !T      !T              !T
ICMP_UNREACH_FILTER_PROHIB      !X      !A      !A              !X
ICMP_UNREACH_HOST_PRECEDENCE    !V      !<%d>   !V              !V
ICMP_UNREACH_PRECEDENCE_CUTOFF  !C      !<%d>   !C              !C

Graham Wilson is planning to use the same codes in Debian's version.

MFC after: 3 weeks

18 years agoo There are two methods to get a process credentials over the unix
maxim [Tue, 13 Jun 2006 14:33:35 +0000 (14:33 +0000)]
o There are two methods to get a process credentials over the unix
sockets:

1) A sender sends SCM_CREDS message to a reciever, struct cmsgcred;
2) A reciever sets LOCAL_CREDS socket option and gets sender
credentials in control message, struct sockcred.

Both methods use the same control message type SCM_CREDS with the
same control message level SOL_SOCKET, so they are indistinguishable
for the receiver.  A difference in struct cmsgcred and struct sockcred
layouts may lead to unwanted effects.

Now for sockets with LOCAL_CREDS option remove all previous linked
SCM_CREDS control messages and then add a control message with
struct sockcred so the process specifically asked for the peer
credentials by LOCAL_CREDS option always gets struct sockcred.

PR: kern/90800
Submitted by: Andrey Simonenko
Regres. tests: tools/regression/sockets/unix_cmsg/
MFC after: 1 month

18 years agoFix missing \n and when there are no arg's that means just print out
ambrisko [Tue, 13 Jun 2006 14:27:52 +0000 (14:27 +0000)]
Fix missing \n and when there are no arg's that means just print out
the description so we don't have to do any more queries.  Disable the
event query code until it figured out since but it is similar to the
AEN detail so we should be able to get that working.

18 years agos/MYRI10GE/MXGE/ and a typo fixed.
brueffer [Tue, 13 Jun 2006 14:23:13 +0000 (14:23 +0000)]
s/MYRI10GE/MXGE/ and a typo fixed.

18 years ago- Complete the myri10ge -> mxge name change by doing a mechanical
gallatin [Tue, 13 Jun 2006 13:53:52 +0000 (13:53 +0000)]
- Complete the myri10ge -> mxge name change by doing a mechanical
  s/myri10ge/mxge/g replacement in the myri10ge files.  A few contuation
  lines were joined because of the regained columns.
- Hook the mxge driver back to the build.

18 years agoAdd scheduler CORE, the work I have done half a year ago, recent,
davidxu [Tue, 13 Jun 2006 13:12:56 +0000 (13:12 +0000)]
Add scheduler CORE, the work I have done half a year ago, recent,
I picked it up again. The scheduler is forked from ULE, but the
algorithm to detect an interactive process is almost completely
different with ULE, it comes from Linux paper "Understanding the
Linux 2.6.8.1 CPU Scheduler", although I still use same word
"score" as a priority boost in ULE scheduler.

Briefly, the scheduler has following characteristic:
1. Timesharing process's nice value is seriously respected,
   timeslice and interaction detecting algorithm are based
   on nice value.
2. per-cpu scheduling queue and load balancing.
3. O(1) scheduling.
4. Some cpu affinity code in wakeup path.
5. Support POSIX SCHED_FIFO and SCHED_RR.
Unlike scheduler 4BSD and ULE which using fuzzy RQ_PPQ, the scheduler
uses 256 priority queues. Unlike ULE which using pull and push, the
scheduelr uses pull method, the main reason is to let relative idle
cpu do the work, but current the whole scheduler is protected by the
big sched_lock, so the benefit is not visible, it really can be worse
than nothing because all other cpu are locked out when we are doing
balancing work, which the 4BSD scheduelr does not have this problem.
The scheduler does not support hyperthreading very well, in fact,
the scheduler does not make the difference between physical CPU and
logical CPU, this should be improved in feature. The scheduler has
priority inversion problem on MP machine, it is not good for
realtime scheduling, it can cause realtime process starving.
As a result, it seems the MySQL super-smack runs better on my
Pentium-D machine when using libthr, despite on UP or SMP kernel.

18 years agoo Sort .Xrs.
maxim [Tue, 13 Jun 2006 12:49:14 +0000 (12:49 +0000)]
o Sort .Xrs.

18 years agoAdd xref to statfs(2)
phk [Tue, 13 Jun 2006 12:23:22 +0000 (12:23 +0000)]
Add xref to statfs(2)

18 years agoRespect FETCH_BIND_ADDRESS when opening the data connection.
des [Tue, 13 Jun 2006 10:21:03 +0000 (10:21 +0000)]
Respect FETCH_BIND_ADDRESS when opening the data connection.

PR: misc/98872

18 years agoFix a bug introduced in rev 1.92, where, when changing from one directory
des [Tue, 13 Jun 2006 10:19:59 +0000 (10:19 +0000)]
Fix a bug introduced in rev 1.92, where, when changing from one directory
to another, the first CWD after a string of CDUPs would incorrectly include
a slash before the directory name.

Reported by: obrien
PR: bin/83278

18 years agoHandle MFS_IMAGE in the ${FULLKERNEL} target, so that we can build kernel
cognet [Tue, 13 Jun 2006 00:57:10 +0000 (00:57 +0000)]
Handle MFS_IMAGE in the ${FULLKERNEL} target, so that we can build kernel
with MFS root without debugging.

18 years agoBurying UNIX--a quote by Rob Pike,
grog [Mon, 12 Jun 2006 23:28:52 +0000 (23:28 +0000)]
Burying UNIX--a quote by Rob Pike,

Seen on The UNIX Heritage Society mailing list.

18 years agoMFp4:
cognet [Mon, 12 Jun 2006 22:58:50 +0000 (22:58 +0000)]
MFp4:
- Try hard to calculate a safe sp, so that the stack doesn't get smashed
while uncompressing or relocating the kernel.
- Bring in code needed to calculate the cacheline size etc, needed for
arm9_idcache_wbinv_all.

18 years agoMFp4: Increase the L1 pagetable needed for the kernel from 8 to 22, to be
cognet [Mon, 12 Jun 2006 22:57:24 +0000 (22:57 +0000)]
MFp4: Increase the L1 pagetable needed for the kernel from 8 to 22, to be
able to boot fat kernels.

18 years agoUse bit operations to get a locally administered address rather than using a
thompsa [Mon, 12 Jun 2006 22:43:37 +0000 (22:43 +0000)]
Use bit operations to get a locally administered address rather than using a
hardcoded OUI code.

18 years agoAllow variable amounts of verbosity.
obrien [Mon, 12 Jun 2006 22:39:32 +0000 (22:39 +0000)]
Allow variable amounts of verbosity.

18 years agoUse fget() in kqueue_register() instead of doing all the work by hand.
jhb [Mon, 12 Jun 2006 21:46:23 +0000 (21:46 +0000)]
Use fget() in kqueue_register() instead of doing all the work by hand.

18 years agoMake the ISAPNP code optional and only enable it on i386 and pc98 (used
marius [Mon, 12 Jun 2006 21:07:13 +0000 (21:07 +0000)]
Make the ISAPNP code optional and only enable it on i386 and pc98 (used
for CBUS-PNP cards there) by default, as there are no amd64 and sparc64
machines with ISA slots and which therefore could make use of this code
known to exist. For sparc64 this additionally allows to get rid of the
compat shims for in{b,w,l}()/out{b,w,l}() etc and the associated hacks.

OK'ed by: imp, peter

18 years agoDon't strip a leading ./ from the path for the cd builtin to avoid interpreting
stefanf [Mon, 12 Jun 2006 21:06:00 +0000 (21:06 +0000)]
Don't strip a leading ./ from the path for the cd builtin to avoid interpreting
.//dir as /dir.  Rather strip it only for the purpose of checking if the
directory path should be printed.

PR: 88813
Submitted by: Josh Elsasser
Patch from: NetBSD (cd.c rev 1.38)
MFC after: 2 weeks

18 years agoAdd two little nuggets of wisdom I picked up at work today:
philip [Mon, 12 Jun 2006 21:02:19 +0000 (21:02 +0000)]
Add two little nuggets of wisdom I picked up at work today:

  The three most dangerous things in the world are a programmer with a
  soldering iron, a hardware type with a program patch and a user with
  an idea. -- The Wizardry Compiled by Rick Cook

  and

  Debugging is anticipated with distaste, performed with reluctance, and
  bragged about forever. -- Button at the Boston Computer Museum

I wonder why people call me a cynic. ;-)

18 years agoEnable a few more things in x86 NOTES to get broader LINT coverage:
jhb [Mon, 12 Jun 2006 20:38:17 +0000 (20:38 +0000)]
Enable a few more things in x86 NOTES to get broader LINT coverage:
- Turn on iwi(4), ipw(4), and ndis(4) on amd64 and i386.
- Turn on ral(4) and ural(4) on i386, pc98, and amd64.

18 years agoForcefully turn off GPROF in this file if it is enabled as GPROF's
jhb [Mon, 12 Jun 2006 20:35:59 +0000 (20:35 +0000)]
Forcefully turn off GPROF in this file if it is enabled as GPROF's
attempt to use a macro for 'ret' doesn't play well with the wrappers
trying to implement 'Pascal-style' calling conventions.

18 years agoSome machines have an ESCC. Make sure we build uart(4) with support
marcel [Mon, 12 Jun 2006 20:10:46 +0000 (20:10 +0000)]
Some machines have an ESCC. Make sure we build uart(4) with support
for the z8530.

18 years agoDon't invalidate the TLB in pmap_qenter() unless the old mapping was valid.
alc [Mon, 12 Jun 2006 20:05:27 +0000 (20:05 +0000)]
Don't invalidate the TLB in pmap_qenter() unless the old mapping was valid.
Most often, it isn't.

Reviewed by: tegge@

18 years agoNeed machine/bus.h here too
imp [Mon, 12 Jun 2006 19:22:44 +0000 (19:22 +0000)]
Need machine/bus.h here too

18 years agoAdd the model name, obtained from the hw.model sysctl variable.
des [Mon, 12 Jun 2006 18:14:49 +0000 (18:14 +0000)]
Add the model name, obtained from the hw.model sysctl variable.

MFC after: 3 weeks

18 years agoCheck in file missed in last commit. It made it into the MFC properly
njl [Mon, 12 Jun 2006 17:13:57 +0000 (17:13 +0000)]
Check in file missed in last commit.  It made it into the MFC properly
though.

18 years agoMFp4: need machine/bus.h here since we use bus space macros. It used to
imp [Mon, 12 Jun 2006 14:46:44 +0000 (14:46 +0000)]
MFp4: need machine/bus.h here since we use bus space macros.  It used to
be brought in by name-space polluted sys/rman.h.

Pointy hat to: imp

18 years agoWho am I to correct the native speakers... anyway, s/council/counsel/
wilko [Mon, 12 Jun 2006 13:44:17 +0000 (13:44 +0000)]
Who am I to correct the native speakers... anyway, s/council/counsel/

Noted by: des

18 years agoAny sufficiently simple directive can be obfuscated beyond reason
wilko [Mon, 12 Jun 2006 07:56:33 +0000 (07:56 +0000)]
Any sufficiently simple directive can be obfuscated beyond reason
given proper legal council.

- Alfred Perlstein