Commit graph

78056 commits

Author SHA1 Message Date
Don Lewis 9e74cba35a Make a temporary copy of the output data in the generic sysctl handlers
so that the data is less likely to be inconsistent if SYSCTL_OUT() blocks.
If the data is large, wire the output buffer instead.

This is somewhat less than optimal, since the handler could skip the copy
if it knew that the data was static.

If the data is dynamic, we are still not guaranteed to get a consistent
copy since another processor could change the data while the copy is in
progress because the data is not locked.  This problem could be solved if
the generic handlers had the ability to grab the proper lock before the
copy and release it afterwards.

This may duplicate work done in other sysctl handlers in the kernel which
also copy the data, possibly while a lock is held, before calling they call
a generic handler to output the data.  These handlers should probably call
SYSCTL_OUT() directly.
2002-07-28 21:06:14 +00:00
Alan Cox e43c2eab07 o Lock page queue accesses by vm_page_free().
o Apply some style fixes.
2002-07-28 20:13:48 +00:00
Don Lewis 5c38b6dbce Wire the sysctl output buffer before grabbing any locks to prevent
SYSCTL_OUT() from blocking while locks are held.  This should
only be done when it would be inconvenient to make a temporary copy of
the data and defer calling SYSCTL_OUT() until after the locks are
released.
2002-07-28 19:59:31 +00:00
Jake Burkholder b44ba1a844 Fix a bug introduced in previous commit. Due to the interaction of the
direct physical mappings with virtual page colour, we need to flush the
data cache when a page changes colour.  I missed one case which broke
pipes.
2002-07-28 19:15:34 +00:00
Alan Cox 6a684ecf05 o Lock page queue accesses by vm_page_free(). 2002-07-28 19:01:38 +00:00
Peter Wemm 0f258b75d3 Recognize frames for lcall_syscall and int0x80_syscall.
Reminded by:	bde
2002-07-28 18:46:49 +00:00
Hellmuth Michaelis c2112cac92 Update, correct and bring in sync with reality all the i4b kernel
part manual pages - long overdue ...
2002-07-28 18:21:48 +00:00
David Malone 50bb77244e Add enough consts to keep everyone happy. 2002-07-28 16:23:28 +00:00
David Malone 81b4504baa Don't reuse a const char * when we really want a char *. 2002-07-28 16:17:38 +00:00
David Malone 91fbb9c1db Improve WARNS situation for kdump:
1) Define _KERNEL while including sys/time.h to get some function prototypes.
2) Add prototypes and ANSIify definitions.
3) Constness changes.
4) Remove register keyword.
5) Actually return a sensible value from main.
6) Make fread_tail take a void * instead of a char *.
7) Avoid a signedness warning by casting to a size_t. Should be safe
   enough 'cos we also check for nonnegativity.
8) Be extra chummy with sigset_t rather than passing a struct to printf
   and pretending it is an int.
2002-07-28 16:05:07 +00:00
Mike Barcroft 7a415ec906 Revert the previous delta; uintfptr_t needs to be available to
userland for libc/gmon to compile, so the typedef in <machine/types.h>
isn't good enough.  This is really ugly since we end up with the
actual value which uintfptr_t is typedef'd from, in multiple places.
This is bug for bug compatible with the other FreeBSD architectures.

Noticed by:	sparc64 tinderbox
2002-07-28 15:59:51 +00:00
David Malone c10b37bf7a ANSIify function definitions to avoid a warning. 2002-07-28 15:50:38 +00:00
David Malone 8015edeebb The return value of snprintf should be always nonnegative, so it should
be safe to cast it to a size_t before comparing it to a sizeof().
2002-07-28 15:41:15 +00:00
David Malone 47e9e6a168 ANSIify function definitions to avoid a warning. 2002-07-28 15:32:17 +00:00
David Malone 19817b8518 ANSIify function definitions to avoid a warning.
Minor constness changes.
2002-07-28 15:28:38 +00:00
David Malone 823ab23f39 ANSify function definitions to avoid a warning. 2002-07-28 15:25:15 +00:00
David Malone 6ed42fb9d2 ANSIify function definitions to avoid a warning. 2002-07-28 15:22:43 +00:00
David Malone b74c79078f ANSIify function definitions to avoid a warning.
PR:		38930
Submitted by:	keramida
2002-07-28 15:20:10 +00:00
David Malone f2e8e0dad7 ANSIify function definitions to avoid a warning. 2002-07-28 15:13:17 +00:00
David Malone a374d6e0a1 ANSIify function definitions to avoid some warnings.
Include stdlib.h for exit.
2002-07-28 15:02:24 +00:00
David Malone 412f8d5a03 ANSIify function definitions to avoid a warning.
Minor constness changes.
2002-07-28 14:55:59 +00:00
David Malone 77ae8ac713 ANSIify function definitions to avoid a warning. 2002-07-28 14:41:26 +00:00
Juli Mallett afb325f75d Search the include path for the argument to -f, to make lives easier for
those of us who want to figure out how old Jim Mock is, but only want to
type 'calendar -f calendar.freebsd'.  This is done in a way that should
be totally backwards compatible with no noticable differences, at all.

Reviewed by:	mux
MFC after:	4 weeks
2002-07-28 13:46:09 +00:00
Dima Dorfman 6ee0eb7eda New release notes: devfs rule subsystem, lock(1) -v 2002-07-28 08:45:26 +00:00
Alan Cox 1e8fabc097 Lock page queue accesses by vm_page_free(). 2002-07-28 08:01:48 +00:00
Dima Dorfman 16a8de73d2 Add a -v option that prevents switching virtual terminals while this
terminal is locked.  This permits the user to easily lock the entire
console from a single terminal.
2002-07-28 07:13:53 +00:00
Dima Dorfman 9ffb7cd974 Nuke whitespace at EOL. 2002-07-28 06:59:40 +00:00
Dima Dorfman ec7e38fb22 Correct misindentation of DRA_UID. 2002-07-28 06:57:57 +00:00
Dima Dorfman 5159643adc What we're actually passing around is an ioctl request, not a command,
and it's an unsigned long, not an int.
2002-07-28 06:57:13 +00:00
Dima Dorfman 134cd96fec This compiles cleanly with WARNS=5 on i386 and alpha, so try to make
sure that doesn't change.
2002-07-28 06:52:47 +00:00
Dima Dorfman 072af15128 Implement this (quoted from the updated man page): If the first token
of a rule specification is a single dash (``-''), rules are read from
the standard input and the rest of the specification is ignored.
2002-07-28 06:45:30 +00:00
Alan Cox 299018d3b6 o Lock page queue accesses by vm_page_free().
o Increment cnt.v_dfree inside vm_pageout_page_free() rather than
   at each call.
2002-07-28 05:46:47 +00:00
Alan Cox 57123de641 o Lock page queue accesses by vm_page_free(). 2002-07-28 04:23:03 +00:00
Dima Dorfman 014c2ea5cd Use more standard section names in an attempt to unconfuse new users
(and make it easier to find stuff for the old ones).  I originally put
everything under one "RULE SUBSYSTEM" so it didn't look like devfs(8)
is dedicated to the rule subsystem, but since nobody has any idea what
else might go here, it's not worth confusing people just to save a
little time for someone that might add something rule-unrelated to
devfs(8) in a few years.

Suggested by:	sheldonh, phk
2002-07-28 03:58:12 +00:00
Juli Mallett 89d22e2f06 As of revision 1.38 of make/parse.c, our make(1) will warn too. Note that
this isn't just for the sake of testing behaviour, and that things really
do break if this regression occurs.
2002-07-28 03:57:08 +00:00
Dima Dorfman af13e3abb9 Unimplement panic(8) by making sure that we don't recurse into a
ruleset.  If we do, that means there's a ruleset loop (10 includes 20
include 30 includes 10), which will quickly cause a double fault due
to stack overflow (since "include" is implemented by recursion).
(Previously, we only checked that X didn't include X.)
2002-07-28 03:52:44 +00:00
Juli Mallett 716297c2d3 Print a warning when we are given two scripts for one target. This is neither
as wide-reaching nor intensive as NetBSD's similar, but the warning uses the
same text.

Inspired by:	NetBSD
2002-07-28 03:52:41 +00:00
Dima Dorfman 527597b2d9 Stock -current has more than 300 files in /etc, so 255 inodes for the
/etc filesystem isn't enough; consequently, add "-i 4096" to the newfs
command for /etc.  This results in 1022 inodes, which should be enough
for the forseeable future (although I don't know why we would ever
have more than 1000 files in a default /etc).

Silence by:	-current
2002-07-28 03:41:53 +00:00
Dima Dorfman cfab43190a Add a period to the end of the "starting" message to be consistent
with the rest of the output during a boot.
2002-07-28 03:38:10 +00:00
Bill Fenner edfe5cffff Calculate checksums correctly when LSRR is in effect by passing the
IP header and protocol header seperately.
Also calculate TCP checksums.

Submitted by:	orion
2002-07-28 02:34:39 +00:00
Bill Fenner f70f2fbe97 Update for traceroute 1.4a12 2002-07-28 02:27:07 +00:00
Bill Fenner 0952bc9f4b Merge 1.4a12 2002-07-28 02:26:31 +00:00
Bill Fenner 35d3ea799b This commit was generated by cvs2svn to compensate for changes in r100784,
which included commits to RCS files with non-trunk default branches.
2002-07-28 02:24:33 +00:00
Bill Fenner 5f3a73ba3a Virgin import of LBL traceroute v1.4a12 2002-07-28 02:24:33 +00:00
Jake Burkholder 839b2e106a Add declarations for btext and etext. 2002-07-28 01:01:14 +00:00
Greg Lehey 76e27551b5 Clarify J.S. Bach's life: he was only born once, and he died in Leipzig.
Add entry for Antonio Vivaldi's death.
2002-07-28 00:42:02 +00:00
Peter Wemm 23efa1f8ca Unwind the syscall_with_err_pushed tweak that jake did some time back.
OK'ed by:	jake
2002-07-28 00:27:51 +00:00
Jake Burkholder 7d8a5be3ea uintfptr_t has moved to machine/types.h. 2002-07-27 23:36:51 +00:00
Alan Cox 55df3298c6 o Require that the page queues lock is held on entry to vm_pageout_clean()
and vm_pageout_flush().
 o Acquire the page queues lock before calling vm_pageout_clean()
   or vm_pageout_flush().
2002-07-27 23:20:32 +00:00
David Malone 228ee8e7b4 Make usage match options.
Approved by:	rwatson
2002-07-27 23:19:25 +00:00