Commit Graph

103836 Commits

Author SHA1 Message Date
marcel
e8560b6f3c Update to binutils 2.15. 2004-06-19 18:52:31 +00:00
marcel
ce6c7857d6 Define __lwpid_t as an int32_t in <sys/_types.h> and define lwpid_t
as an __lwpid_t in <sys/types.h>. Retype td_tid from an int to a
lwpid_t and change related definitions accordingly.
2004-06-19 17:58:32 +00:00
cognet
c959b76977 Include sys/module.h. 2004-06-19 17:38:32 +00:00
cognet
3ef0ec5c27 I happened to have a sys/pool.h file in my tree, but most people do not,
so nuke this useless include.
2004-06-19 17:37:47 +00:00
marcel
8af28d2f35 This file was not part of the GDB 5.2.1 import and should have been
deleted from the vendor branch.
2004-06-19 15:43:52 +00:00
bde
e041a584a6 Include <sys/_lock.h>'s prerequisite <sys/queue.h> before including the
former, not after.

Don't hide this bug by including <sys/queue.h> in <sys/_lock.h>.
2004-06-19 14:58:35 +00:00
tjr
8fd212e66e When no fixed address is given in a shmat() request, pass a hint address
to vm_map_find() that is less likely to be outside of addressable memory
for 32-bit processes: just past the end of the largest possible heap.
This is the same hint that mmap() uses.
2004-06-19 14:46:13 +00:00
gad
cc9134c9f2 This is just a forced commit to note that the previous update was from:
PR:		bin/65803  (a very tiny piece of the PR)
2004-06-19 14:09:40 +00:00
gad
bc3947b883 Fill in the some new fields 'struct kinfo_proc', namely ki_childstime,
ki_childutime, and ki_emul.  Also uses the timeradd() macro to correct
the calculation of ki_childtime.  That will correct the value returned
when ki_childtime.tv_usec > 1,000,000.

This also implements a new KERN_PROC_GID option for kvm_getprocs().
It also implements the KERN_PROC_RGID and KERN_PROC_SESSION options
which were added to sys/kern/kern_proc.c revision 1.203.

PR:		bin/65803  (a very tiny piece of the PR)
Submitted by:	Cyrille Lefevre
2004-06-19 14:08:10 +00:00
gad
3f2ff133b4 Fill in the some new fields 'struct kinfo_proc', namely ki_childstime,
ki_childutime, and ki_emul.  Also uses the timevaladd() routine to
correct the calculation of ki_childtime.  That will correct the value
returned when ki_childtime.tv_usec > 1,000,000.

This also implements a new KERN_PROC_GID option for kvm_getprocs().
(there will be a similar update to lib/libkvm/kvm_proc.c)

Submitted by:	Cyrille Lefevre
2004-06-19 14:03:00 +00:00
gad
661f0f568c Add some more fields to the 'struct kinfo_proc', including some fields
which just mark areas which are empty due to issues with the alignment
of already-existing fields.  This defines several unrelated variables
in one shot, because most of the work for updating kinfo_proc is making
sure the sizeof(struct kinfo_proc) remains the same across all hardware
platforms, and that no space is wasted on any platform due to alignment
issues with the new variables.

Submitted by:	some by Cyrille Lefevre, some by me
2004-06-19 13:49:25 +00:00
gad
3c7473abf2 Define a KERN_PROC_GID option for kvm_getprocs().
Submitted by:	Cyrille Lefevre
2004-06-19 13:42:05 +00:00
bde
c2ef21d1d4 Removed foot-shooting setting of CR0_TS in exec_setregs(). It is
unnecessary because cpu_setregs() and/or npxinit() always sets CR0_TS
during system initialization, and CR0_TS is set in the next statement
(fpstate_drop()) if necessary after system initialization.  Setting
it unnecessarily was less than a pessimization since it broke the
invariant that the npx can be used without an npxdna() trap if
fpucurthread is non-null.  The broken invariant became harmful when I
added an fnclex to npxdrop().

Removed setting of CR0_MP in exec_setregs().  This was similarly
unnecessary but was harmless.

Updated comments (mainly by removing them).  Things are simpler now
that we have cpu_setregs() and don't support a math emulator or pretend
to support not having either a math emulator or an npx.

Removed the ifdef for avoiding setting CR0_NE in the !SMP case in
cpu_setregs().  npx_probe() should reverse the setting if it wants to
force IRQ13 exception handling for testing.
2004-06-19 12:28:48 +00:00
phk
3237babd8b Only initialize f_data and f_ops if nobody else did so already. 2004-06-19 11:41:45 +00:00
phk
1ce305fbfd Explicitly initialize f_data and f_vnode to NULL.
Report f_vnode to userland in struct xfile.
2004-06-19 11:40:08 +00:00
phk
9695efd3c3 Add the f_vnode pointer to struct xfile, shortly it will no longer be
identical to f_data by definition.
2004-06-19 11:38:00 +00:00
le
ac0b4e6f1f Don't return NULL when the function is defined to return an integer.
OK'ed by: tjr
2004-06-19 10:09:44 +00:00
stefanf
c3b1d7dffc Document ilogb()'s return values in terms of the FP_ILOGB* macros. 2004-06-19 09:33:29 +00:00
stefanf
ac3aff3300 Return the same result as the MI version for 0.0, INFINITY and NaN.
Reviewed by:	standards@
2004-06-19 09:30:00 +00:00
stefanf
127bbb4fe3 Our MI implementation of ilogb() returns -INT_MAX for the argument 0.0 rather
than INT_MIN, so adjust FP_ILOGB0 to reflect this.  Use <machine/_limits.h> for
INT_MAX's value while there.

Reviewed by:	standards@
2004-06-19 09:25:21 +00:00
phk
07d9a77b87 Duplicate the securelevel check from spec_vnops.c here. 2004-06-19 09:00:53 +00:00
obrien
f9c5567642 Merge FSF GCC rev 1.579 change ((x86_output_mi_thunk): Don't pass MEM to
%P0, just SYMBOL_REF) into GCC 3.3.3.  This fixes the bad C++ thunks code
generation building Firefox on AMD64.

Submitted by:	Sean McNeil <sean@mcneil.com>
2004-06-19 07:29:04 +00:00
alc
6edd95aba5 Remove spl() calls. Update comments to reflect the removal of spl() calls.
Remove '\n' from panic() format strings.  Remove some blank lines.
2004-06-19 04:19:47 +00:00
kientzle
a04c1a531b Ignore file flag bits that we don't support. In particular, this
corrects a segfault seen when archiving files from NTFS (which sets
bits in st_flags that are not documented in <sys/stat.h>.)

Thanks to: Doug Rabson
2004-06-19 04:19:27 +00:00
marcel
ba7e012f7a This file has been removed from HEAD when it should (also) have been
removed from the vendor branch.
2004-06-19 03:39:16 +00:00
gad
04ef458020 Fix the check for a "duplicate filename to compress", so that we're checking
the *filename* and not the pid_file(!).   Stupid brain-fault on my part.
This could cause a segfault under -neworder if newsyslog had to rotate
multiple files, and later ones had specifed the 'N' flag.

Bug first reported by:	le
MFC after:	3 days
2004-06-19 03:28:42 +00:00
das
5cfbdc1d4a Memory's free, but all the world ain't a VAX anymore. Bring math.3
kicking and screaming into the 1980's.  This change converts most of
the markup from man(7) to mdoc(7) format, and I believe it removes or
updates everything that was flat out wrong.  However, much work is
still needed to sanitize the markup, improve coverage, and reduce
overlap with other manpages.  Some of the sections would better belong
in a philosophy_of_w_kahan.3 manpage, but they are informative and
remain at least as reminders of topics to cover.

Reviewed by:	doc@, trhodes@
2004-06-19 03:25:28 +00:00
rwatson
e5f4cab982 Assert socket buffer lock in sb_lock() to protect socket buffer sleep
lock state.  Convert tsleep() into msleep() with socket buffer mutex
as argument.  Hold socket buffer lock over sbunlock() to protect sleep
lock state.

Assert socket buffer lock in sbwait() to protect the socket buffer
wait state.  Convert tsleep() into msleep() with socket buffer mutex
as argument.

Modify sofree(), sosend(), and soreceive() to acquire SOCKBUF_LOCK()
in order to call into these functions with the lock, as well as to
start protecting other socket buffer use in their implementation.  Drop
the socket buffer mutexes around calls into the protocol layer, around
potentially blocking operations, for copying to/from user space, and
VM operations relating to zero-copy.  Assert the socket buffer mutex
strategically after code sections or at the beginning of loops.  In
some cases, modify return code to ensure locks are properly dropped.

Convert the potentially blocking allocation of storage for the remote
address in soreceive() into a non-blocking allocation; we may wish to
move the allocation earlier so that it can block prior to acquisition
of the socket buffer lock.

Drop some spl use.

NOTE: Some races exist in the current structuring of sosend() and
soreceive().  This commit only merges basic socket locking in this
code; follow-up commits will close additional races.  As merged,
these changes are not sufficient to run without Giant safely.

Reviewed by:	juli, tjr
2004-06-19 03:23:14 +00:00
njl
6f4685cc9a Add more precision to the cx_usage sysctl output and special-case 0%.
Submitted by:	YONETANI Tomokazu <qhwt+freebsd-acpi AT les.ath.cx>
2004-06-19 02:27:23 +00:00
green
f67091f046 Document rc.conf's "keyboard" directive.
Reminded by: dougb
2004-06-19 00:18:13 +00:00
rwatson
15ddd25f67 In tcp_ctloutput(), don't hold the inpcb lock over a call to
ip_ctloutput(), as it may need to perform blocking memory allocations.
This also improves consistency with locking relative to other points
that call into ip_ctloutput().

Bumped into by:	Grover Lines <grover@ceribus.net>
2004-06-18 20:22:21 +00:00
green
e57eac4be2 Add a sysctl/tunable, "kern.always_console_output", that lets you set
output to permanently (not ephemerally) go to the console.  It is also
sent to any other console specified by TIOCCONS as normal.

While I'm here, document the kern.log_console_output sysctl.
2004-06-18 20:12:42 +00:00
green
989cfda158 Allow setting the system console keyboard via the ${keyboard} rc.conf
directive.
2004-06-18 20:09:30 +00:00
green
0ff326a04e Note that conscontrol set and unset are an interface for TIOCCONS. 2004-06-18 20:06:04 +00:00
le
b7f1bee2cf Clean up allocated ressources when destroying the main vinum geom. 2004-06-18 19:53:33 +00:00
njl
3a20dac2f5 Remove compat code and unused lock declarations. 2004-06-18 17:58:11 +00:00
njl
cb82c4351b Remove compat defines. 2004-06-18 17:56:45 +00:00
pjd
861ab9f6f2 Check if ${_dir}/kern exists as well, because if it doesn't exists
we will fail later and we can miss good kernel source tree directory.
I found this trying to compile kld module and it finds 'conf/kmod.mk'
in '../..', but it fails later, because there is no 'kern' directory,
but there is valid kernel source tree still in /usr/src/sys/.
2004-06-18 16:38:42 +00:00
joerg
792b42bf42 Fix indentation of continuation lines to (hopefully) comply with
style(9).

Reminded by:	bde
2004-06-18 15:08:08 +00:00
bms
0cef2f91c1 Add stub for Linux SOUND_MIXER_READ_RECMASK, required by some Linux sound
applications.

PR:		misc/27471
Submitted by:	Gavin Atkinson (with cleanups)
2004-06-18 14:36:24 +00:00
kuriyama
bf763fabc7 Avoid deadlock which is caused by locking VDIR of parent and VREG of
snapshot itself in wrong order.
We can skip unlink check of that directory because it must have
snapshot in it.

Reviewed by:	mckusick and current@
2004-06-18 14:35:17 +00:00
bms
f2d71bff49 Add a stub for the Linux SOUND_MIXER_INFO ioctl (even though we don't
actually implement it), as some applications, such as RealProducer,
expect to be able to use it.

PR:		kern/65971
Submitted by:	Matt Wright
2004-06-18 14:25:44 +00:00
bms
c99430ca9d Linux applications expect to be able to call SIOCGIFCONF with an
NULL ifc.ifc_buf pointer, to determine the expected buffer size.

The submitted fix only takes account of interfaces with an AF_INET
address configured. This could no doubt be improved.

PR:		kern/45753
Submitted by:	Jacques Garrigue (with cleanups)
2004-06-18 14:06:46 +00:00
bms
d2de401fe0 Fix the VT_SETMODE/CDROMIOCTOCENTRY problem correctly.
Reviewed by:	tjr
2004-06-18 13:36:30 +00:00
des
624eaa574a Update the description of struct ifreq, and document SIOC[SG]IFCAP. 2004-06-18 13:07:18 +00:00
bms
66acd3ba6e Check that m->m_pkthdr.rcvif is not NULL before checking if a packet
was received on a broadcast address on the input path. Under certain
circumstances this could result in a panic, notably for locally-generated
packets which do not have m_pkthdr.rcvif set.

This is a similar situation to that which is solved by
src/sys/netinet/ip_icmp.c rev 1.66.

PR:		kern/52935
2004-06-18 12:58:45 +00:00
davidxu
d11f8ce42b Add comment to reflect that we should retry after thread singling failed. 2004-06-18 11:13:49 +00:00
bms
18926c1c61 Appease GCC. 2004-06-18 09:53:58 +00:00
bms
97f3bd9e54 Fix two attempts to use an unchecked NULL pointer provided from the
userland, for the CDIOREADTOCENTRY and VT_SETMODE cases respectively.

Noticed by: tjr
2004-06-18 09:13:35 +00:00
phk
04325a6008 Remove nested include of <sys/module.h>
Should be happier now:	peter
2004-06-18 08:54:49 +00:00