Jacques Vidrine [Fri, 13 Sep 2002 20:31:29 +0000 (20:31 +0000)]
When using res_send/res_query/res_search, the caller must either
insure enough space is available for the response, or be prepared
to resize the buffer and retry as necessary.
Do the conservative thing and make sure enough space is available.
Peter Wemm [Fri, 13 Sep 2002 16:33:35 +0000 (16:33 +0000)]
Use a crowbar to move the a.out code out of gcore.c and into its own
file so that we have a chance of using gcore on non-i386 platforms. Use
linker sets to reduce the registration glue. Remove md-sparc.c, we do not
have an a.out sparc32 port. aoutcore.c was repocopied from gcore.c.
Thomas Moestl [Fri, 13 Sep 2002 16:01:26 +0000 (16:01 +0000)]
Add an implementation of fabs() (which is quite trivial).
When it is called directly, gcc is smart enough to generate inline
code for it, which is why it wasn't noticed before that it was missing.
fabs() would probably better fit into libm, but it has traditionally been
in libc on FreeBSD, so there is probably software around that makes
assumptions about this by now.
Thomas Moestl [Fri, 13 Sep 2002 15:15:16 +0000 (15:15 +0000)]
Fix fcntl(..., F_GETOWN, ...) and fcntl(..., F_SETOWN, ...) on sparc64
by not passing a pointer to a register_t or intptr_t when the code in
the lower layers expects one to an int.
Oops, broke the build there. Uninline biodone() now that it is non-trivial.
Introduce biowait() function. Currently there is a race condition and the
mitigation is a timeout/retry. It is not obvious what kind of locking (if any)
is suitable for BIO_DONE, since the majority of users take are of this
themselves, and only a few places actually rely on the wakeup.
Add a couple more of the big/little-endian conversion routines and make
them visible from userland, if need be.
I wish that the C language contained this as part of struct definintions,
but failing that, I would settle for an agreed upon set of functions for
packing/unpacking integers in various sizes from byte-streams which may
have unfriendly alignment.
Bruce A. Mah [Fri, 13 Sep 2002 03:55:31 +0000 (03:55 +0000)]
New release notes: sendfile(2) bugfix + MFC.
Modified release notes: newsyslog(8) now uses bzip2(1) by default.
Move two TCP-related release notes from the general kernel section to
the networking protocols section. Minor wording adjustment in one
item, note MFC of the other.
David E. O'Brien [Thu, 12 Sep 2002 16:05:56 +0000 (16:05 +0000)]
Try to detect support for the `long long' type so that ANSI-C[89] clean
code will know not to try to use `long long'.
Unfortunately the GCC spec parser will not allow us to properly detect the
"iso9899:1990" and "iso9899:199409" forms of the acceptable -std= arguments,
because of the ':' in the -std argument. :-( I have left them in the spec
as a place holder in hopes someone knows a way to make the detection of
them work.
Thomas Quinot [Thu, 12 Sep 2002 15:15:33 +0000 (15:15 +0000)]
Change a couple of splcam() calls that do not make sense in atapi-cam
(what we want to mask is the ATA interrupts, which run at level splbio),
and add interrupt masking around the statement that modifies the
request queue for a SIM.
This resolves problems reported by users under heavy ATAPI load.
Andrew R. Reiter [Thu, 12 Sep 2002 05:00:32 +0000 (05:00 +0000)]
- Fix two obvious locking bugs; 1) returning with lock held when it needed
to be dropped, 2) attempting to lock acct_mtx while already holding it.
Sorry to those who experienced pain.
- Added two comments referring to two areas in which acct_mtx is held over
vnode operations that might sleep. Patch in the works for this.
Luigi Rizzo [Thu, 12 Sep 2002 01:05:46 +0000 (01:05 +0000)]
Make bridging and layer2-ipfw obey net.inet.ip.fw.one_pass.
I should have committed this ages ago.
The MFC for if_ethersubr.c could be done in the usual few days (only
ipfw2 uses it), the one for bridge.c should probably wait until
after 4.7 because it changes an existing though mostly undocumented
behaviour (on which i hope nobody relies). All in all, i'll wait for
both things unless there is demand.
Luigi Rizzo [Thu, 12 Sep 2002 00:45:32 +0000 (00:45 +0000)]
Store the port number in "fwd" rules in host format, same as ipfw1
has always done.
Technically, this is the wrong format, but it reduces the diffs in
-stable. Someday, when we get rid of ipfw1, I will put the port number
in the proper format both in kernel and userland.
Only probe one PHY on the D-Link 580 version of the card (ie rev 0x12).
The 550 version is location at address 1 but since it works right we
let the code find whatever PHY it can.
Fix a fragment issue on TX. If the number of frags are more then the
driver has allocated then bring all the frags together into one packet
and send it out. Code derived from the fxp driver.
Tested and found by: Francois Tigeot <francois.tigeot@nic.fr>
Hellmuth Michaelis <hm@kts.org>
John Baldwin [Wed, 11 Sep 2002 21:00:56 +0000 (21:00 +0000)]
- Change utrace ktrace events to malloc the work buffer before getting a
request structure.
- Re-optimize the case of utrace being disabled by doing an explicit
KTRPOINT check instead of relying on the one in ktr_getrequest() so that
we don't waste time on a malloc in the non-tracing case.
- Change utrace() to return an error if the copyin() fails. Before it
would just ignore the request but still return success. This last is
a change in behavior and can be backed out if necessary.
John Baldwin [Wed, 11 Sep 2002 20:56:05 +0000 (20:56 +0000)]
- Change ktrace genio events to only copy up to ktr_geniosize bytes of a
transfer to a malloc'd buffer and use that bufer for the ktrace event.
This means that genio ktrace events no longer need to be synchronous.
- Now that ktr_buffer isn't overloaded to sometimes point to a cached uio
pointer for genio requests and always points to a malloc'd buffer if not
NULL, free the buffer in ktr_freerequest() instead of in
ktr_writerequest(). This closes a memory leak for ktrace events that
used a malloc'd buffer that had their vnode ripped out from under them
while they were on the todo list.
John Baldwin [Wed, 11 Sep 2002 20:49:55 +0000 (20:49 +0000)]
- Add a kern.ktrace sysctl node.
- Rename kern.ktrace_request_pool tunable/sysctl to
kern.ktrace.request_pool.
- Add a variable to control the max amount of data to log for genio events.
This variable is tunable via the tunable/sysctl kern.ktrace.genio_size
and defaults to one page.
John Baldwin [Wed, 11 Sep 2002 20:46:50 +0000 (20:46 +0000)]
Change namei and syscall ktrace events to malloc work buffers before
obtaining a ktr_request structure from the free pool so we can avoid
starving other threads of ktr_request structures.
Peter Wemm [Wed, 11 Sep 2002 19:08:09 +0000 (19:08 +0000)]
Sometime after binutils-2.9 (ie: ages ago), the handling of __start_set_*
and __stop_set_* became friendlier. This trick to force the export
of the section delimiter symbols is no longer necessary. We needed to
force this so that we could look up the symbols via a symbol table search
when the module was loaded at run time. ld used to eliminate them if
they were not referenced at compile/link time.
Peter Wemm [Wed, 11 Sep 2002 18:12:29 +0000 (18:12 +0000)]
Modify previous commit to solve the real problem that made gcc think
the timestamp was aligned. ie: Use a void * instead of struct timeval *
which gcc assumes will be aligned. Go back to memcpy().
Peter Wemm [Wed, 11 Sep 2002 18:03:03 +0000 (18:03 +0000)]
I completely fubared this. An empty EXPORT_SYMS= is not valid. I know I
build this several times, and even tested loaded the module. I must have
changed something right before commit.
Jacques Vidrine [Wed, 11 Sep 2002 16:41:39 +0000 (16:41 +0000)]
In kvm_openfiles/kvm_open, mark the file descriptors as close-on-exec.
Applications can not do this themselves, as the descriptors are hidden
behind the opaque `kvm_t' type.
Tony Finch [Tue, 10 Sep 2002 20:48:44 +0000 (20:48 +0000)]
Fix tilde-expansion of the filename obtained from the "begin" line in -s
mode, and be more accurate about identifying begin lines so that spurious
ones don't have to be manually edited out, and be more forgiving about
errors so that -c mode is more useful.
Mike Barcroft [Tue, 10 Sep 2002 18:41:45 +0000 (18:41 +0000)]
Fix some style bugs:
o Space used instead of a tab after `#define' and `typedef'.
o Sentences not ended with a period.
o Unaligned function names and other spacing issues.