]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 years agoMFi386 revision 1.421
Alan Cox [Thu, 22 Jul 2004 23:04:41 +0000 (23:04 +0000)]
MFi386 revision 1.421
 - Use kmem_alloc_nofault() rather than kmem_alloc_pageable() in
   pmap_mapdev().  See revision 1.140 of kern/sys_pipe.c for a detailed
   rationale.

20 years agoRemove redundant inclusion of bus_if.h. It isn't needed in this file, as
Warner Losh [Thu, 22 Jul 2004 22:59:44 +0000 (22:59 +0000)]
Remove redundant inclusion of bus_if.h.  It isn't needed in this file, as
sys/bus.h includes it.

20 years agoMFp4:
Warner Losh [Thu, 22 Jul 2004 22:53:38 +0000 (22:53 +0000)]
MFp4:

Improve child_detached a little and make it conform better to
style(9).  Also, improve comment about what we'll be doing in the
future about driver_added.  Soon it will be possible to kldload usb
drivers and have them attach w/o a need to disconnect/reconnect them.

20 years agoActually free the unit when destroying the interface.
Brooks Davis [Thu, 22 Jul 2004 22:50:15 +0000 (22:50 +0000)]
Actually free the unit when destroying the interface.

Reported by: la at delfi.lt
Tested by: la at delfi.lt
PR: 68618

20 years agoRemove ahb, aha, ie, le and wl devices. They are all ISA/EISA only.
Warner Losh [Thu, 22 Jul 2004 22:29:45 +0000 (22:29 +0000)]
Remove ahb, aha, ie, le and wl devices.  They are all ISA/EISA only.
I went ahead and left in the ISA cards that also have pccard
attachments.  There's no way that these devices could attach.

OK'd by: peter

20 years agoThere is no pcic device on amd64. OLDCARD isn't supported, and
Warner Losh [Thu, 22 Jul 2004 22:28:34 +0000 (22:28 +0000)]
There is no pcic device on amd64.  OLDCARD isn't supported, and
NEWCARD will call it something different.  and there are no ISA add-in
devices.

20 years agoPush Giant acquisition down into fo_stat() from most callers. Acquire
Robert Watson [Thu, 22 Jul 2004 20:40:23 +0000 (20:40 +0000)]
Push Giant acquisition down into fo_stat() from most callers.  Acquire
Giant conditional on debug.mpsafenet in the socket soo_stat() routine,
unconditionally in vn_statfile() for VFS, and otherwise don't acquire
Giant.  Accept an unlocked read in kqueue_stat(), and cryptof_stat() is
a no-op.  Don't acquire Giant in fstat() system call.

Note: in fdescfs, fo_stat() is called while holding Giant due to the VFS
stack sitting on top, and therefore there will still be Giant recursion
in this case.

20 years agoMore CardBus Bridges supported, o2micro better now
Warner Losh [Thu, 22 Jul 2004 20:22:36 +0000 (20:22 +0000)]
More CardBus Bridges supported, o2micro better now

20 years agoAdd IDs from TI's web site. Reports from the field and inspection of
Warner Losh [Thu, 22 Jul 2004 20:19:57 +0000 (20:19 +0000)]
Add IDs from TI's web site.  Reports from the field and inspection of
the data sheets leads me to believe these will just work.  Those parts
with the various media readers on them may not have the required
FreeBSD drivers that will attach to the subdevices that will be seen
on some of these parts.

PCI 1515, 1530, 1620, 4520, 6411, 6420, 7410, 7510, 7610

Prompted by: Havard Eidnes

20 years agoMore TI device IDs.
Warner Losh [Thu, 22 Jul 2004 20:02:16 +0000 (20:02 +0000)]
More TI device IDs.
These are from the datasheets downloaded from TI's web site.
They describe the PCI[67]x[12]1 and PCI[67]x20 parts, with and without
the smartcard enabled.

20 years ago - Change uma_zone_set_obj() to call kmem_alloc_nofault() instead of
Alan Cox [Thu, 22 Jul 2004 19:44:49 +0000 (19:44 +0000)]
 - Change uma_zone_set_obj() to call kmem_alloc_nofault() instead of
   kmem_alloc_pageable().  The difference between these is that an errant
   memory access to the zone will be detected sooner with
   kmem_alloc_nofault().

The following changes serve to eliminate the following lock-order
reversal reported by witness:

 1st 0xc1a3c084 vm object (vm object) @ vm/swap_pager.c:1311
 2nd 0xc07acb00 swap_pager swhash (swap_pager swhash) @ vm/swap_pager.c:1797
 3rd 0xc1804bdc vm object (vm object) @ vm/uma_core.c:931

There is no potential deadlock in this case.  However, witness is unable
to recognize this because vm objects used by UMA have the same type as
ordinary vm objects.  To remedy this, we make the following changes:

 - Add a mutex type argument to VM_OBJECT_LOCK_INIT().
 - Use the mutex type argument to assign distinct types to special
   vm objects such as the kernel object, kmem object, and UMA objects.
 - Define a static swap zone object for use by UMA.  (Only static
   objects are assigned a special mutex type.)

20 years agoPush acquisition of Giant from fdrop_closed() into fo_close() so that
Robert Watson [Thu, 22 Jul 2004 18:35:43 +0000 (18:35 +0000)]
Push acquisition of Giant from fdrop_closed() into fo_close() so that
individual file object implementations can optionally acquire Giant if
they require it:

- soo_close(): depends on debug.mpsafenet
- pipe_close(): Giant not acquired
- kqueue_close(): Giant required
- vn_close(): Giant required
- cryptof_close(): Giant required (conservative)

Notes:

  Giant is still acquired in close() even when closing MPSAFE objects
  due to kqueue requiring Giant in the calling closef() code.
  Microbenchmarks indicate that this removal of Giant cuts 3%-3% off
  of pipe create/destroy pairs from user space with SMP compiled into
  the kernel.

  The cryptodev and opencrypto code appears MPSAFE, but I'm unable to
  test it extensively and so have left Giant over fo_close().  It can
  probably be removed given some testing and review.

20 years agosuser() accepts a thread argument; as suser() dereferences td_ucred, a
Robert Watson [Thu, 22 Jul 2004 17:05:04 +0000 (17:05 +0000)]
suser() accepts a thread argument; as suser() dereferences td_ucred, a
thread-local pointer, in practice that thread needs to be curthread.  If
we're running with INVARIANTS, generate a warning if not.  If we have
KDB compiled in, generate a stack trace.  This doesn't fire at all in my
local test environment, but could be irritating if it fires frequently
for someone, so there will be motivation to fix things quickly when it
does.

20 years agoIn devfs_allocv(), rather than assigning 'td = curthread', assert that
Robert Watson [Thu, 22 Jul 2004 17:03:14 +0000 (17:03 +0000)]
In devfs_allocv(), rather than assigning 'td = curthread', assert that
the caller passes in a td that is curthread, and consistently pass 'td'
into vget().  Remove some bogus logic that passed in td or curthread
conditional on td being non-NULL, which seems redundant in the face of
the earlier assignment of td to curthread if td is NULL.

In devfs_symlink(), cache the passed thread in 'td' so we don't have
to keep retrieving it from the 'ap' structure, and assert that td is
curthread (since we dereference it to get thread-local td_ucred).  Use
'td' in preference to curthread for later lockmgr calls, since they are
equal.

20 years agoArg! Revert local changes that were accidentlly included in the previous
Scott Long [Thu, 22 Jul 2004 15:55:03 +0000 (15:55 +0000)]
Arg!  Revert local changes that were accidentlly included in the previous
version.

20 years agoDon't count needed bounce pages if loading a buffer that was created with
Scott Long [Thu, 22 Jul 2004 15:46:51 +0000 (15:46 +0000)]
Don't count needed bounce pages if loading a buffer that was created with
bus_dmamem_alloc()

Submitted by: harti

20 years agoDisable the PREEMPTION-enabled code in critical_exit() that encourages
Scott Long [Thu, 22 Jul 2004 14:32:48 +0000 (14:32 +0000)]
Disable the PREEMPTION-enabled code in critical_exit() that encourages
switching to a different thread.  This is just a hack to try to improve
stability some more, but likely points closer to the real culprit.

20 years agoMake size suffix case insensitive.
Lukas Ertl [Thu, 22 Jul 2004 13:38:10 +0000 (13:38 +0000)]
Make size suffix case insensitive.

PR:            bin/27604
Submitted by:  David Xu <davidx@viasoft.com.cn>

20 years agodisplay.c:
Johan Karlsson [Thu, 22 Jul 2004 13:14:42 +0000 (13:14 +0000)]
display.c:
- 'savech' is only used if it is set a few lines above where
  it is used, initialize it to silence warning.

- 'length' is either -1 or greater than 0, hence it is safe to cast it
  to unsigned when comparing it here.

odsyntax.c:
- 'p' is assigned either (*argvp)[0] or (*argvp)[1] which both are
  char *. 'num' and 'end' are assigned values based on 'p'.
  Hence use char * instead of unsigned char * for these variables.

  '&end' as the second argument to strtoll does not need to be casted
  to char** any more.

  This solves a
  'dereferencing type-punned pointer will break strict-aliasing rules'
  warning when compiling with -O2.

parse.c:
- 'prec' is only used when sokay == USEPREC and sokay = USEPREC
  when 'prec' is assigned. Hence 'prec' is not used uninitialized,
  initialize it to silence warning.

- The code involving 'nextpr' is hard to follow, but I belive
  'nextpr' will not be used unless it is initialized.
  Anyway, IF 'nextpr' is used uninitialized it is better to
  get a consistant error (seg fault, when dereferencing a NULL pointer)
  than potentially accessing some random memory.

The above changes makes hexdump WARNS=6 clean even when compiled with
-O2. Hence bump WARNS to keep it clean.

Tested by: CFLAGS='-O2 -pipe' make universe

20 years agoFix handling of comments on .elif lines. The patch given in a followup
Hartmut Brandt [Thu, 22 Jul 2004 11:12:01 +0000 (11:12 +0000)]
Fix handling of comments on .elif lines. The patch given in a followup
to the PR failed, because the line skipping function is actually called
from two places in the code to do quite different things (this should
be two functions probably): in a false .if to skip to the next line
beginning with a dot and to collect .for loops. In the seconds case we
should not skip comments, because they are actually harder to handle than
we need for the .if case and should defer this to the main code.

PR: bin/25627
Submitted by: Seth Kingsley (original patch)

20 years agoAdd references to pf(4) and pfctl(8) at the description of
Giorgos Keramidas [Thu, 22 Jul 2004 10:38:13 +0000 (10:38 +0000)]
Add references to pf(4) and pfctl(8) at the description of
securelevel = 3.

PR: docs/69417
Submitted by: Janos Mohacsi (mohacsi(at)niif(dot)hu)

20 years agoAdd a macro, __pure, which expands to __attribute__((__pure__)) on gcc
Tim J. Robbins [Thu, 22 Jul 2004 09:20:51 +0000 (09:20 +0000)]
Add a macro, __pure, which expands to __attribute__((__pure__)) on gcc
versions that support it (>=2.96). This is similar to but not the same
as the __pure macro that was removed in rev. 1.21.

20 years agoThis commit was generated by cvs2svn to compensate for changes in r132536,
Ollivier Robert [Thu, 22 Jul 2004 09:16:04 +0000 (09:16 +0000)]
This commit was generated by cvs2svn to compensate for changes in r132536,
which included commits to RCS files with non-trunk default branches.

20 years agoThe following patch has been taken from the ntp-stable vendor branch.
Ollivier Robert [Thu, 22 Jul 2004 09:16:04 +0000 (09:16 +0000)]
The following patch has been taken from the ntp-stable vendor branch.

Put everything OpenSSL related between #ifdef OPENSSL..#endif.

This also fixes bugs #252, #275 & #293.

See
<http://ntp.bkbits.net:8080/ntp-stable/hist/util/ntp-keygen.c?nav=index.html|src/+|src/util>
for reference.

Submitted by: Marius Strobl <marius@alchemy.franken.de>

20 years agoInclude support for NOCRYPT & NO_OPENSSL world.
Ollivier Robert [Thu, 22 Jul 2004 09:10:52 +0000 (09:10 +0000)]
Include support for NOCRYPT & NO_OPENSSL world.

It does survive « make release ».

Uses an upcoming patch from the vendor branch (ntp-stable) of ntp-keygen.

Submitted by: Marius Strobl <marius@alchemy.franken.de>

20 years agoCorrect another cut/paste mistake. Sorry folks.
Ollivier Robert [Thu, 22 Jul 2004 08:38:14 +0000 (08:38 +0000)]
Correct another cut/paste mistake.  Sorry folks.

Pointy hat to: me
Submitted by: Marius Strobl <marius@alchemy.franken.de>

20 years agoRemove arlib (libares.a) from the build. It is not IPv6 compatible, not
Ollivier Robert [Thu, 22 Jul 2004 08:35:41 +0000 (08:35 +0000)]
Remove arlib (libares.a) from the build.  It is not IPv6 compatible, not
really tested and probably not 64 bits-safe.

Discussed with: Harlann Stenn <www.ntp.org>

20 years agoCorrect a cut/paste error.
Ollivier Robert [Thu, 22 Jul 2004 08:32:17 +0000 (08:32 +0000)]
Correct a cut/paste error.

20 years agoAllow ntpd to be compiled w/o readline when NO_GNU is defined. Part of a
Ollivier Robert [Thu, 22 Jul 2004 08:14:37 +0000 (08:14 +0000)]
Allow ntpd to be compiled w/o readline when NO_GNU is defined.  Part of a
larger patchset to get a GNU-free world.

Patch rewritten to cope with the 4.2.0 changes.

Submitted by: des

20 years agoUpdate comment about fast interrupts to be closer to reality
Warner Losh [Thu, 22 Jul 2004 07:44:10 +0000 (07:44 +0000)]
Update comment about fast interrupts to be closer to reality

20 years agoRemove duplicate $FreeBSD$
Warner Losh [Thu, 22 Jul 2004 07:11:15 +0000 (07:11 +0000)]
Remove duplicate $FreeBSD$

Noticed by: njl

20 years agoReinsert the bus space handle and tag, they are needed for the timer test.
Nate Lawson [Thu, 22 Jul 2004 05:42:14 +0000 (05:42 +0000)]
Reinsert the bus space handle and tag, they are needed for the timer test.

20 years agoInstead of doing everything in identify, do a proper probe/attach. Also,
Nate Lawson [Thu, 22 Jul 2004 05:32:56 +0000 (05:32 +0000)]
Instead of doing everything in identify, do a proper probe/attach.  Also,
don't add another device if identify is called twice.  Minor reworking by
myself.

Submitted by: marcel

20 years agoRemove unused (and bogus) locking, style cleanup, remove unnecessary casts.
Nate Lawson [Thu, 22 Jul 2004 05:18:05 +0000 (05:18 +0000)]
Remove unused (and bogus) locking, style cleanup, remove unnecessary casts.

20 years agoReturn the correct value when dst == NULL and conversion has stopped after
Tim J. Robbins [Thu, 22 Jul 2004 02:57:29 +0000 (02:57 +0000)]
Return the correct value when dst == NULL and conversion has stopped after
nwc dropping to zero.

20 years agoAdd two more programs useful for testing the correctness of pipes.
Mike Silbersack [Thu, 22 Jul 2004 02:46:25 +0000 (02:46 +0000)]
Add two more programs useful for testing the correctness of pipes.

20 years agoAdd 'benchmarked' and many technical acronyms for protocols, product
Murray Stokely [Thu, 22 Jul 2004 02:45:57 +0000 (02:45 +0000)]
Add 'benchmarked' and many technical acronyms for protocols, product
names, and company names.

20 years agoIn pmap_mincore() create a private copy of the pte for use after the pmap
Alan Cox [Thu, 22 Jul 2004 02:05:46 +0000 (02:05 +0000)]
In pmap_mincore() create a private copy of the pte for use after the pmap
lock is released.

20 years agoImprove package list for disc3:
Murray Stokely [Thu, 22 Jul 2004 01:37:56 +0000 (01:37 +0000)]
Improve package list for disc3:
xemacs21 -> xemacs, add apache13, apache2, and php packages to this disc.

20 years agoUpdate the callframe structure to leave space for the frame pointer
Peter Grehan [Thu, 22 Jul 2004 01:28:51 +0000 (01:28 +0000)]
Update the callframe structure to leave space for the frame pointer
and saved link register as per the ABI call sequence. Update code
that uses this (fork_trampoline etc) to use the correct genassym'd
offsets.

 This fixes the 'invalid LR' message when backtracing kernel
threads in DDB.

20 years agoMake this compile: add sys/module.h and KDBify.
Andrew Gallatin [Thu, 22 Jul 2004 00:54:01 +0000 (00:54 +0000)]
Make this compile: add sys/module.h and KDBify.

20 years agoMinor style nit
Warner Losh [Thu, 22 Jul 2004 00:16:50 +0000 (00:16 +0000)]
Minor style nit

20 years agoFix a race in vm_page_sleep_if_busy(). Due to vm_object locking
Brian Feldman [Wed, 21 Jul 2004 23:56:09 +0000 (23:56 +0000)]
Fix a race in vm_page_sleep_if_busy().  Due to vm_object locking
being incomplete, it currently has to know how to drop and pick back
up the vm_object's mutex if it has to sleep and drop the page queue
mutex.  The problem with this is that if the page is busy, while we
are sleeping, the page can be freed and object disappear.  When trying
to lock m->object, we'd get a stale or NULL pointer and crash.

The object is now cached, but this makes the assumption that
the object is referenced in some manner and will not itself
disappear while it is unlocked.  Since this only happens if
the object is locked, I had to remove an assumption earlier in
contigmalloc() that reversed the order of locking the object and
doing vm_page_sleep_if_busy(), not the normal order.

20 years agoDo not declare curpcb.
Olivier Houchard [Wed, 21 Jul 2004 22:04:32 +0000 (22:04 +0000)]
Do not declare curpcb.

20 years agoUse the kernel pmap if no thread is provided.
Olivier Houchard [Wed, 21 Jul 2004 22:04:05 +0000 (22:04 +0000)]
Use the kernel pmap if no thread is provided.

20 years agoDefine pmap_page_is_mapped().
Olivier Houchard [Wed, 21 Jul 2004 22:02:48 +0000 (22:02 +0000)]
Define pmap_page_is_mapped().

20 years agoBack out just a portion of Alfred's last commit. Remove the MBUF_CHECK
Bosko Milekic [Wed, 21 Jul 2004 21:03:01 +0000 (21:03 +0000)]
Back out just a portion of Alfred's last commit.  Remove the MBUF_CHECK
(WITNESS) for code paths that always call uma_zalloc_arg() shortly
after where the check was, because uma_zalloc_arg() already does
a similar check.

No objections from Alfred.  Thanks Alfred.

20 years agoIt is a little better to return ENXIO from probe/match routine than EIO.
Warner Losh [Wed, 21 Jul 2004 20:38:12 +0000 (20:38 +0000)]
It is a little better to return ENXIO from probe/match routine than EIO.

20 years agoExtend versrcreach by checking against the rt_flags for RTF_REJECT and
Andre Oppermann [Wed, 21 Jul 2004 19:55:14 +0000 (19:55 +0000)]
Extend versrcreach by checking against the rt_flags for RTF_REJECT and
RTF_BLACKHOLE as well.

To quote the submitter:

 The uRPF loose-check implementation by the industry vendors, at least on Cisco
 and possibly Juniper, will fail the check if the route of the source address
 is pointed to Null0 (on Juniper, discard or reject route). What this means is,
 even if uRPF Loose-check finds the route, if the route is pointed to blackhole,
 uRPF loose-check must fail. This allows people to utilize uRPF loose-check mode
 as a pseudo-packet-firewall without using any manual filtering configuration --
 one can simply inject a IGP or BGP prefix with next-hop set to a static route
 that directs to null/discard facility. This results in uRPF Loose-check failing
 on all packets with source addresses that are within the range of the nullroute.

Submitted by: James Jun <james@towardex.com>

20 years agoAdd support for ignoring locking failures. This is only enabled when
Warner Losh [Wed, 21 Jul 2004 17:38:04 +0000 (17:38 +0000)]
Add support for ignoring locking failures.  This is only enabled when
you've specified a directory.  It is intended to be used in building
custom releases over NFS where locking may be unreliable at best and
there is no contention that the locking is designed to arbitrate.
Other uses of this flag are discouraged.  Document same in usage and
man page (including the warning about unwise).

Sponsored by: Timing Solutions

20 years agonow e.f.f.3.ip6.arpa is delegated, we no longer need to query ip6.int
Hajimu UMEMOTO [Wed, 21 Jul 2004 17:26:40 +0000 (17:26 +0000)]
now e.f.f.3.ip6.arpa is delegated, we no longer need to query ip6.int

Obtained from: KAME

20 years agoTwo style related changes:
Warner Losh [Wed, 21 Jul 2004 17:02:36 +0000 (17:02 +0000)]
Two style related changes:
(1) use strlcpy instead of strncpy since the use here of the latter
    was incorrect.
(2) Move 'N' case into proper sorted order (sorted the same way that
    ls sorts its args).

20 years agoDon't sync the file system on panic by default. This seems to basically
Robert Watson [Wed, 21 Jul 2004 16:04:46 +0000 (16:04 +0000)]
Don't sync the file system on panic by default.  This seems to basically
work very infrequently, and often results in a compound panic which
confuses debugging; locking/SMP have made the layering violation (and
risks) of this more obvious over time.

Discussed with: green, bde, et al.

20 years agoUsing NULL as a malloc type when calling contigmalloc() is wrong, so introduce
Olivier Houchard [Wed, 21 Jul 2004 15:52:34 +0000 (15:52 +0000)]
Using NULL as a malloc type when calling contigmalloc() is wrong, so introduce
a new malloc type, and use it.

20 years agounbreak !WITNESS.
Alfred Perlstein [Wed, 21 Jul 2004 15:42:02 +0000 (15:42 +0000)]
unbreak !WITNESS.

20 years agoDo not use NULL as a malloc type for contigmalloc().
Olivier Houchard [Wed, 21 Jul 2004 15:18:45 +0000 (15:18 +0000)]
Do not use NULL as a malloc type for contigmalloc().

20 years agoThe media info is printed with the -hardware option so there is no
Hartmut Brandt [Wed, 21 Jul 2004 14:52:21 +0000 (14:52 +0000)]
The media info is printed with the -hardware option so there is no
point to write 'Media' in the table header for the -atm option.

20 years agoAdd the ACPI Panasonic extras driver.
Yoshihiro Takahashi [Wed, 21 Jul 2004 14:47:54 +0000 (14:47 +0000)]
Add the ACPI Panasonic extras driver.

Submitted by: OGAWA Takaya <t-ogawa@triaez.kaisei.org> and nyan

20 years agoAdd test programs for mbsnrtowcs() and wcsnrtombs().
Tim J. Robbins [Wed, 21 Jul 2004 13:47:48 +0000 (13:47 +0000)]
Add test programs for mbsnrtowcs() and wcsnrtombs().

20 years agoRead directly from the stdio buffer using the new __mbsnrtowcs() interface
Tim J. Robbins [Wed, 21 Jul 2004 12:12:48 +0000 (12:12 +0000)]
Read directly from the stdio buffer using the new __mbsnrtowcs() interface
instead of making repeated calls to __fgetwc().

20 years agoImplement the GNU extensions of mbsnrtowcs() and wcsnrtombs(). These are
Tim J. Robbins [Wed, 21 Jul 2004 10:54:57 +0000 (10:54 +0000)]
Implement the GNU extensions of mbsnrtowcs() and wcsnrtombs(). These are
convenient when the source string isn't null-terminated.

Implement the other conversion functions (mbstowcs(), mbsrtowcs(), wcstombs(),
wcsrtombs()) in terms of these new functions.

20 years agoAdd /etc/ntp to hold keys for ntpd.
Ollivier Robert [Wed, 21 Jul 2004 10:14:10 +0000 (10:14 +0000)]
Add /etc/ntp to hold keys for ntpd.

20 years ago'atmconfig natm show' shows all currently configured PVCs for IP over ATM,
Hartmut Brandt [Wed, 21 Jul 2004 09:44:27 +0000 (09:44 +0000)]
'atmconfig natm show' shows all currently configured PVCs for IP over ATM,
not 'atmconfig natm list'.

20 years agoAdd special lines for 'help commands'.
Hartmut Brandt [Wed, 21 Jul 2004 09:43:31 +0000 (09:43 +0000)]
Add special lines for 'help commands'.

20 years agoAllow more than one help file. There is a restriction that
Hartmut Brandt [Wed, 21 Jul 2004 09:42:56 +0000 (09:42 +0000)]
Allow more than one help file. There is a restriction that
each help file must start with a level 0 topic.

20 years agoAllow the help file path and name to be overwritten by cc -D...
Hartmut Brandt [Wed, 21 Jul 2004 09:39:53 +0000 (09:39 +0000)]
Allow the help file path and name to be overwritten by cc -D...
Also remove the current directory from the default help file path
and add an appropriate directory in /usr/local instead.

20 years agoUse __wcsrtombs() and __sfvwrite() to convert and write the wide character
Tim J. Robbins [Wed, 21 Jul 2004 08:35:18 +0000 (08:35 +0000)]
Use __wcsrtombs() and __sfvwrite() to convert and write the wide character
string instead of multiple calls to __fputwc().

20 years agoput several of the options for DEBUG_VFS_LOCKS under control of sysctls.
Alfred Perlstein [Wed, 21 Jul 2004 07:13:14 +0000 (07:13 +0000)]
put several of the options for DEBUG_VFS_LOCKS under control of sysctls.

20 years agoMake sure we don't call mbuf allocation functions with mutexes held.
Alfred Perlstein [Wed, 21 Jul 2004 07:12:24 +0000 (07:12 +0000)]
Make sure we don't call mbuf allocation functions with mutexes held.

Discussed with: rwatson

20 years agoAdditional pmap locking
Alan Cox [Wed, 21 Jul 2004 07:01:48 +0000 (07:01 +0000)]
Additional pmap locking

Tested by: marcel@

20 years agoMy bad: /dev/sa0, no 'r'
Tim Kientzle [Wed, 21 Jul 2004 06:43:10 +0000 (06:43 +0000)]
My bad: /dev/sa0, no 'r'

Thanks (and many apologies) to: Cristoph Mallon

20 years agoOops... Add the CS_OWN flag to the trace and where commands so that
Marcel Moolenaar [Wed, 21 Jul 2004 05:55:51 +0000 (05:55 +0000)]
Oops... Add the CS_OWN flag to the trace and where commands so that
db_stack_trace() actually has a chance to parse its own arguments.

20 years agoSemi-gratuitous change. Move two refcount operations to their own lines
Peter Wemm [Wed, 21 Jul 2004 05:08:10 +0000 (05:08 +0000)]
Semi-gratuitous change.  Move two refcount operations to their own lines
rather than be buried inside an if (expression).  And now that the if
expression is the same in both exit paths, use the same ordering.

20 years agoUnify db_stack_trace_cmd(). All it did was look up the thread given
Marcel Moolenaar [Wed, 21 Jul 2004 05:07:09 +0000 (05:07 +0000)]
Unify db_stack_trace_cmd(). All it did was look up the thread given
the thread ID and call db_trace_thread().
Since arm has all the logic in db_stack_trace_cmd(), rename the
new DB_COMMAND function to db_stack_trace to avoid conflicts on
arm.
While here, have db_stack_trace parse its own arguments so that
we can use a more natural radix for IDs. If the ID is not a thread
ID, or more precisely when no thread exists with the ID, try if
there's a process with that ID and return the first thread in it.
This makes it easier to print stack traces from the ps output.

requested by: rwatson@
tested on: amd64, i386, ia64

20 years agoAdd kdb_thr_from_pid(), which given a PID returns the first thread
Marcel Moolenaar [Wed, 21 Jul 2004 04:49:48 +0000 (04:49 +0000)]
Add kdb_thr_from_pid(), which given a PID returns the first thread
in the process. This is useful when working from or with a process.

20 years agoAdd some additional pmap locking and lock assertions.
Alan Cox [Wed, 21 Jul 2004 03:38:46 +0000 (03:38 +0000)]
Add some additional pmap locking and lock assertions.

20 years agoMake this test compile again and remove its dependency on sys/pipe.h.
Mike Silbersack [Wed, 21 Jul 2004 03:13:53 +0000 (03:13 +0000)]
Make this test compile again and remove its dependency on sys/pipe.h.

20 years agoAn a #error discouraging people from using pipe.h from places outside
Mike Silbersack [Wed, 21 Jul 2004 03:11:41 +0000 (03:11 +0000)]
An a #error discouraging people from using pipe.h from places outside
the kernel.

20 years agoSlide pipe.h include after the _KERNEL define in preparation for disallowing
Mike Silbersack [Wed, 21 Jul 2004 03:07:50 +0000 (03:07 +0000)]
Slide pipe.h include after the _KERNEL define in preparation for disallowing
non-_KERNEL inclusions of pipe.h

20 years agoMove the initialization and teardown of pmaps to the vmspace zone's
Peter Wemm [Wed, 21 Jul 2004 00:29:21 +0000 (00:29 +0000)]
Move the initialization and teardown of pmaps to the vmspace zone's
init and fini handlers.  Our vm system removes all userland mappings at
exit prior to calling pmap_release.  It just so happens that we might
as well reuse the pmap for the next process since the userland slate
has already been wiped clean.

However.  There is a functional benefit to this as well.  For platforms
that share userland and kernel context in the same pmap, it means that
the kernel portion of a pmap remains valid after the vmspace has been
freed (process exit) and while it is in uma's cache.  This is significant
for i386 SMP systems with kernel context borrowing because it avoids
a LOT of IPIs from the pmap_lazyfix() cleanup in the usual case.

Tested on:  amd64, i386, sparc64, alpha
Glanced at by:  alc

20 years agoImplement ptrace_set_pc().
Olivier Houchard [Tue, 20 Jul 2004 23:00:02 +0000 (23:00 +0000)]
Implement ptrace_set_pc().
Add a stub for ptrace_clear_single_step().

20 years agoRemove astpending, it has not been used for a long time.
Olivier Houchard [Tue, 20 Jul 2004 22:39:56 +0000 (22:39 +0000)]
Remove astpending, it has not been used for a long time.

20 years agoUncomment the vector relocation code.
Olivier Houchard [Tue, 20 Jul 2004 22:39:24 +0000 (22:39 +0000)]
Uncomment the vector relocation code.

20 years agoNuke disable_intr() and enable_intr(), as it already exists elsewhere.
Olivier Houchard [Tue, 20 Jul 2004 22:38:46 +0000 (22:38 +0000)]
Nuke disable_intr() and enable_intr(), as it already exists elsewhere.

20 years agoWhen removing the last reference to a cloner, do not try to unlock twice -
Max Laier [Tue, 20 Jul 2004 21:44:28 +0000 (21:44 +0000)]
When removing the last reference to a cloner, do not try to unlock twice -
esp. not since the backing memory was just freed.

Reviewed by: rwatson

20 years agoM_PREPEND() the IP header on to the front of an outgoing raw IP packet
Robert Watson [Tue, 20 Jul 2004 20:52:30 +0000 (20:52 +0000)]
M_PREPEND() the IP header on to the front of an outgoing raw IP packet
using M_DONTWAIT rather than M_WAITOK to avoid sleeping on memory
while holding a mutex.

20 years ago*sigh* Fix source code compatibility with 5.2.1-RELEASE _again_.
Bill Paul [Tue, 20 Jul 2004 20:28:57 +0000 (20:28 +0000)]
*sigh* Fix source code compatibility with 5.2.1-RELEASE _again_.
(Make kdb stuff conditional.)

20 years agoBack out previous commit. Even though statfs(2) can take a regular
Christian S.J. Peron [Tue, 20 Jul 2004 19:30:57 +0000 (19:30 +0000)]
Back out previous commit. Even though statfs(2) can take a regular
file as an argument, it may still fail for the same reasons that
open(2) can.

Pointed out by: Jilles Tjoelker
Apporived by: bmilekic (mentor)

20 years agoRemove reference to ENOTDIR in the documented errors
Christian S.J. Peron [Tue, 20 Jul 2004 18:35:33 +0000 (18:35 +0000)]
Remove reference to ENOTDIR in the documented errors
for statfs(2). This is false, if the pathname specified
is a regular file, then the information for the file
system that the file lives on will be returned.

Approved by: bmilekic (mentor)

20 years agoCurrently if a mount point is not accessible by the calling user,
Christian S.J. Peron [Tue, 20 Jul 2004 18:24:47 +0000 (18:24 +0000)]
Currently if a mount point is not accessible by the calling user,
invalid information will be printed if the -t flag is specified.

$ df -t ufs
Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
/dev/ad0s1a    495726   139944   316124    31%    /
/dev/ad0s1e    253678     6438   226946     3%    /tmp
/dev/ad0s1f  56206340 13594248 38115586    26%    /usr
/dev/ad0s1d    694126    19812   618784     3%    /var
/dev/ad0s1d    694126    19812   618784     3%    /var
$

Note that the mount point which is not accessible shows
up as the previous file system that was printed. The reason
for this is that df -t will call statfs(2) on the pathname
supplied by getfsstat(2).

This is done to refresh the file system statistics in the
event that a previous file system had a long delay in
providing its stats.

This change affects the df utility in the following ways:
o Teach df has to deal with statfs(2) failing. If statfs(2)
  fails, fall back on the possibly stale stats provided by
  the initial call to getfsstat(2).
o Print a warning that the fs stats could possibly be stale
o Modify the man page and document this new behavior
  as a bug.

Approved by: bmilekic (mentor)
PR: 68165

20 years agoSlight cosmetic changes.
Julian Elischer [Tue, 20 Jul 2004 17:15:38 +0000 (17:15 +0000)]
Slight cosmetic changes.
Also introduce a macro to be called by persistent nodes to signal their
persistence during shutdown to hide this mechanism from the node author.

Make node flags have a consistent style in naming.

Document the change.

20 years agoThe natm sub-command was missing in the TOC of the helpfile.
Hartmut Brandt [Tue, 20 Jul 2004 16:50:57 +0000 (16:50 +0000)]
The natm sub-command was missing in the TOC of the helpfile.

20 years agoRemove reference to fla driver.
Poul-Henning Kamp [Tue, 20 Jul 2004 16:25:20 +0000 (16:25 +0000)]
Remove reference to fla driver.

20 years agoForced to commit to add:
Ollivier Robert [Tue, 20 Jul 2004 15:54:53 +0000 (15:54 +0000)]
Forced to commit to add:

Tested on: amd64 (sledge), sparc64 (panther), IA-64 (pluto1), alpha (beast)

in addition to my own machine running 5.2-CURRENT.

20 years agoRemove an extra '}'.
Ollivier Robert [Tue, 20 Jul 2004 15:51:00 +0000 (15:51 +0000)]
Remove an extra '}'.

20 years agoAdd missing Makefile from previous commit.
Ollivier Robert [Tue, 20 Jul 2004 15:45:04 +0000 (15:45 +0000)]
Add missing Makefile from previous commit.

20 years agoUpdate our ntpd to the long awaited 4.2.0 version.
Ollivier Robert [Tue, 20 Jul 2004 15:44:32 +0000 (15:44 +0000)]
Update our ntpd to the long awaited 4.2.0 version.

This bring us several things:
- updated drivers
- IPv6 support at last
- ntp-genkeys is replaced by ntp-keygen
- ntptrace is now a script (courtesy of John Hay)
- lots of renamed files from .htm to .html (while I prefer .html, I
  find the change a bit gratuitous)
- still no manpages :(

Please test and report.

Commit very much helped by: GNU arch (http://gnuarch.org/)

20 years agoUpdate information on build/import.
Ollivier Robert [Tue, 20 Jul 2004 15:25:19 +0000 (15:25 +0000)]
Update information on build/import.

20 years agoMerge conflicts.
Ollivier Robert [Tue, 20 Jul 2004 15:19:51 +0000 (15:19 +0000)]
Merge conflicts.

Lots of added files, some removed and quite a large number of renames :(

20 years agoMerge conflicts (see also previous commit).
Ollivier Robert [Tue, 20 Jul 2004 15:18:31 +0000 (15:18 +0000)]
Merge conflicts (see also previous commit).

Reinsert our local changes to ntp_control.c:

1.4:    Do not log every potential exploit attempt since a denial-of-service
        may result
1.5:    int -> unsigned char fixes