Commit Graph

105303 Commits

Author SHA1 Message Date
Marcel Moolenaar
60b992ff2f Add the beginnings of kernel debugging support. the kgdb(1) tool
is basicly a shell on top of libgdb that knows about kernel threads,
kernel modules and kvm(3). As the word "beginnings" implies, not
all of the features have been implemented yet. The tool is useful
and I'd like feedback on the taken route.

The simplest way to debug a kernel core file is:
	kgdb -n 0

This opens /var/crash/vmcore.0 with the corresponding kernel in
the object directory (kernel.debug is used if it exists).

Typical things that need to be added are:
o  Auto loading of kernel modules,
o  Handling of trapframes so that backtraces can be taken across
   them,
o  Some fancy commands to extract useful information out of a core
   file,
o  Various (probably many) other things.
2004-07-25 05:29:15 +00:00
Tim Kientzle
4f23b47afa A bunch of style and security fixes (error checking return values, etc),
mostly from: Tim J Robbins
2004-07-25 04:15:50 +00:00
Robert Watson
6c1c7ea2e4 More comment frobbing: insert a missing comma, and spell permissions
as credential.
2004-07-25 00:47:11 +00:00
Robert Watson
d45722204c Spelling fix in comment: s/though/thought/. 2004-07-25 00:38:25 +00:00
Tim Kientzle
8e5c78995e Of course, I meant POSIX.1-1996, not 1997.
Thanks to: Andrey Chernov
2004-07-25 00:31:24 +00:00
Nate Lawson
6edc660c09 Get the acpi softc via the devclass, not by caching the device. Replace
apm_softc with a single integer since the whole softc is not used.
2004-07-24 22:41:30 +00:00
Tim Kientzle
f5589ef9f4 Minor style nits. 2004-07-24 22:30:35 +00:00
Lukas Ertl
c291a77678 Use a temporary geom when tasting vinumdrives and lock the 'real'
vinumdrive geom with an exclusive bit.  This should fix the problem
when underlying partitions overlap (i.e. the 'a' partition is at
the same offset as the 'c' partition).

Ideas borrowed from pjd@, quite a bit of testing by
Matthias Schuendehuette <msch@snafu.de>.
2004-07-24 22:26:40 +00:00
Tim Kientzle
62010d3541 A bunch of stuff from Christoph Mellon:
* Whitespace fixes
  * Check some malloc calls
  * Simplify long_help formatting
  * Spell "LINUX" -> "linux"
  * A few other miscellaneous style improvements
2004-07-24 22:13:44 +00:00
Tim Kientzle
e6787adf79 Rework the feature-detection logic in archive_platform.h so that
it will work cleanly with autoconf.
2004-07-24 20:47:11 +00:00
Tim Kientzle
c02f123ff1 Define the PACKAGE_NAME and PACKAGE_VERSION macros. 2004-07-24 20:45:04 +00:00
Tim Kientzle
c91b82e3e5 Suppress a minor compiler warning if the platform doesn't support hi-res
timestamps.
2004-07-24 20:43:22 +00:00
Tom Rhodes
9933c7cb7b Move snc.4 over to the i386 section as it only deals with PC98 and i386.
Bump .Dd and .Dt accordingly.

Requested by:	ru
2004-07-24 20:41:45 +00:00
Nate Lawson
be22348065 Whitespace cleanup and move static variables together. 2004-07-24 20:40:02 +00:00
Nate Lawson
b4cb140233 Remove unneeded parens and fix whitespace. 2004-07-24 20:39:25 +00:00
Tim Kientzle
c48a83413a Add some functions to query basic facts about the library:
archive_version: Returns a text string, e.g., "libarchive 1.00.000"
   archive_api_version: Returns the SHLIB major version
   archive_api_feature: Returns a feature number useful for answering
     questions such as "Is this recent enough to do XXX?"

The last two also have macros defined in archive.h, so you can compare
the compile-time and run-time environments.  (In particular, you can
compare ARCHIVE_API_VERSION to archive_api_version() to detect library
version mismatches.)

With these in hand, it will soon be time to turn on the
shared-library version of libarchive...  stay tuned.
2004-07-24 20:08:26 +00:00
Lukas Ertl
db7edb3137 Fix potential buffer overflow.
PR:            bin/14697
Submitted by:  Matthew <kienow@infinet.com>
2004-07-24 19:11:40 +00:00
Lukas Ertl
6db345b90e Disable kldunloading of geom_vinum temporarily until I figured out
how to do it correctly.
2004-07-24 19:04:24 +00:00
Søren Schmidt
a4c3e742b7 Refine the wait for ATAPI_RESET.
Properly wait for not busy and introduce a timeout for devices not
setting busy (as they should).
Leave a printf in there that states how long the wait was, as I'd like
to get an idea of the variations here. The time needed seems also to be
affected by whether a medium is present or not.
2004-07-24 19:03:28 +00:00
Nate Lawson
6b3322721c Fix a bug where an item was being removed from a list without using
FOREACH_SAFE.  Remove bad cast of retp and instead use an additional
arg to pass back the number of valid outputs.  Use the package convenience
functions for parsing packages.
2004-07-24 17:51:22 +00:00
Tim Kientzle
73c891fe79 Use "linux" instead of "LINUX" to control Linux-specific code.
Thanks to: David O'Brien for pointing this out.

Also, add in a few additional portability tweaks and make a few
more things conditional on features (HAVE_XXXX macros) rather
than platform.
2004-07-24 17:50:05 +00:00
Tim Kientzle
45e13f191f Fix the handling of signed values when parsing base-256 header values.
In particular, this means we can now correctly read gtar archives that
contain timestamps prior to the start of the Epoch.

Also, make the code in this area more portable.  ANSI C99 headers are
not yet ubiquitous (for example, FreeBSD 4 still lacks them), so be
prepared for systems that don't have the INT64_MAX, INT64_MIN, and
UINT64_MAX macros.  This version still requires int64_t and uint64_t be
defined (which can be done in archive_platform.h if necessary), but
doesn't require them to be exactly 64 bits.
2004-07-24 17:46:45 +00:00
Robert Watson
572bde2aea Prefer NULL to '0' when checking a pointer value. 2004-07-24 16:58:56 +00:00
Mike Makonnen
8f5490f5fe Correct typo.
Submitted by: eik (and probably many others)
2004-07-24 16:30:31 +00:00
David E. O'Brien
6fbf600e5b Remove rev 1.50. 2004-07-24 15:30:23 +00:00
Yoshihiro Takahashi
04fc672ad6 Merged from sys/dev/sio/sio.c revision 1.450. 2004-07-24 15:13:42 +00:00
Suleiman Souhlal
98f59c0d12 Add my birthday.
Approved by:	grehan (mentor)
2004-07-24 15:02:56 +00:00
Mike Makonnen
15eb1e8b45 Ports related rc.d cleanups:
o Separate out local (ports) scripts that use rc.d, and the old style
  startup/shutdown scripts and execute them separately. On startup the
  rc.d style scripts are executed first and then the old-style scripts.
  On shutdown, exactly the reverse happens.
o The rc.d ports scripts should now behave more like base system scripts.
  Scripts ending in .sh will be sourced into the current shell, while the
  rest will be executed in a subshell. Previously, all ports scripts,
  regardless of the .sh suffix, were executed in a subshell.
o The parent script, /etc/rc.d/localpkg, passes its command line arguments
  straight to the rc.d ports scripts. This means they should now honor
  faststop and faststart commands as well. Old style scripts, should not see
  any differences. They will still get either a start or stop command.
o The initial phrase shown during shutdown has been changed to use
  "local packages" instead of "daemon processes" to be more inline with the
  phrase used during local package startup. The phrases are also used only for
  old-style ports script startup/shutdown, whereas previously they were being
  used for both rc.d and old-style scripts. This should make startup/shutdown
  output a bit less ugly.

Discussed with:	portmgr
Has Reservations: eik
2004-07-24 14:56:21 +00:00
Yaroslav Tykhiy
b874fdd40d Bring the advertised interface capabilities into line with the reality
(in particular, bge(4) hasn't supported rxcsum since if_bge.c#1.5)

Clean up some aspects of capabilities usage, i.e. stop using
if_hwassist to see whether we are doing offload now because if_hwassist
is for TCP/IP layer and it is subordinate to if_capenable.

Thanks to:	Aled Morris for donating a nice bge(4) NIC to me
Reviewed by:	-net, -hackers (silence)
2004-07-24 13:45:38 +00:00
Jens Schweikhardt
5bd7ce0a1e English fixes, no content change. 2004-07-24 11:54:30 +00:00
Alan Cox
51ab6c2890 Simplify vmspace initialization. The bcopy() of fields from the old
vmspace to the new vmspace in vmspace_exec() is mostly wasted effort.  With
one exception, vm_swrss, the copied fields are immediately overwritten.
Instead, initialize these fields to zero in vmspace_alloc(), eliminating a
bcopy() from vmspace_exec() and a bzero() from vmspace_fork().
2004-07-24 07:40:35 +00:00
Julian Elischer
aa3c8c02ae White space fix..
diff reduction for upcoming commit.
2004-07-24 04:57:41 +00:00
Robert Watson
9e0219d901 If debug.mpsafenet is non-zero, run the NFS server callout without
Giant.
2004-07-24 02:32:27 +00:00
Robert Watson
b0c90b3b8c Remove spl() use from nfsrv_timer. 2004-07-24 02:07:09 +00:00
Scott Long
e038d35422 Clean up whitespace, increase consistency and correctness.
Submitted by: bde
2004-07-23 23:09:00 +00:00
Ken Smith
1f6483e4df The doc team reworked the section of the handbook describing how to
rebuild things, further discouraging 'make world'.  The title of
that section is now changed...
2004-07-23 21:21:34 +00:00
Robert Watson
ff381670df Don't include a "\n" in KTR output, it confuses automatic parsing. 2004-07-23 20:12:56 +00:00
Scott Long
18f480f8f6 Remove the previous hack since it doesn't make a difference and is getting
in the way of debugging.
2004-07-23 19:59:16 +00:00
Alan Cox
b332cea583 Use kmem_alloc_nofault() rather than kmem_alloc_pageable() for allocating
KVA for explicitly managed mappings, i.e., mappings created with
pmap_qenter().
2004-07-23 19:36:18 +00:00
Robert Watson
eca77c0fbe Reinforce discouragement of the use of FULL_PREEMPTION. 2004-07-23 17:44:07 +00:00
Robert Watson
4da86f8826 Export KTR_COMPILE as a sysctl so you can easily check from user space
what event mask has been compiled into the kernel.
2004-07-23 17:41:44 +00:00
Søren Schmidt
426fc84503 Dont expect interrupt from ATAPI_RESET, it doesn't deliver one. 2004-07-23 17:01:47 +00:00
Brian Feldman
5e60838b5d Now that mlockall(2) is unbroken, use it to keep watchdogd(8) permanently
out of swap.
2004-07-23 15:24:57 +00:00
Andrew Gallatin
d593f6eda9 Let ddb know powerpc is big endian so as to make ddb output
human readable.

Obtained from: sparc64/include/db_machdep.h
2004-07-23 14:45:15 +00:00
Robert Watson
46b25cb5f6 Don't perform pipe endpoint locking during pipe_create(), as the pipe
can't yet be referenced by other threads.

In microbenchmarks, this appears to reduce the cost of
pipe();close();close() on UP by 10%, and SMP by 7%.  The vast majority
of the cost of allocating a pipe remains VM magic.

Suggested by:	silby
2004-07-23 14:11:04 +00:00
Lukas Ertl
3e7ee83cbd Make this WARNS=3 clean.
PR:            bin/38931
Submitted by:  Giorgos Keramidas <keramida@freebsd.org>
2004-07-23 11:36:35 +00:00
Tim J. Robbins
f0000ca014 Add __pure and __pure2 where appropriate. 2004-07-23 07:13:35 +00:00
Tim J. Robbins
e9b497dbf6 Document incorrect handling of multibyte characters. 2004-07-23 06:56:38 +00:00
Alan Cox
bfdf81ac47 Use kmem_alloc_nofault() rather than kmem_alloc_pageable() for allocating
KVA for explicitly managed mappings, i.e., mappings created with
pmap_qenter().
2004-07-23 06:49:49 +00:00
Tim J. Robbins
26bdc1d12e Tweak markup of quoted strings and characters: use Dq instead of enclosing
strings in ``obsolete quotes''. Use Li and Ql where appropriate.
2004-07-23 06:06:58 +00:00