Commit Graph

103624 Commits

Author SHA1 Message Date
David Xu
0aabef657e Remove a bogus panic. It is possible more than one threads will
be suspended in thread_suspend_check, after they are resumed, all
threads will call thread_single, but only one can be success,
others should retry and will exit in thread_suspend_check.
2004-06-18 06:21:09 +00:00
David Xu
ec008e96a8 If thread singler wants to terminate other threads, make sure it includes
all threads except itself.

Obtained from: julian
2004-06-18 06:15:21 +00:00
Marcel Moolenaar
f2d7e86a8a This file is not part of GDB 5.2.1, but was off the vendor branch. 2004-06-18 06:10:13 +00:00
Marcel Moolenaar
7c909649fa Revert local changes. 2004-06-18 05:57:05 +00:00
Robert Watson
68548aa4c6 Correct merge-o: make sure to unlock symmetrically socket buffer
locks on bluetooth sockets when clearing upcall flags.

Submitted by:	emax
2004-06-18 05:09:42 +00:00
Marcel Moolenaar
a49a3b3d09 This file is not part of GDB 5.2.1 and is also off the vendor branch.
It was removed on 2001-11-07, according to ChangeLog.
2004-06-18 04:57:26 +00:00
Robert Watson
7b574f2e45 Hold SOCK_LOCK(so) while frobbing so_options. Note that while the
local race is corrected, there's still a global race in sosend()
relating to so_options and the SO_DONTROUTE flag.
2004-06-18 04:02:56 +00:00
Peter Wemm
a5de0db8b5 Try harder to give new processes a clean initial fpu state. fpu_cleanstate
wasn't actually clean, it was saving the xmm registers as left over by the
bios.  fninit() doesn't clear those.

In fpudna(), instead of doing a fninit() and forgetting to load the initial
mxcsr, do a full fxrstor(&fpu_cleanstate).  Otherwise we hand over whatever
random values are left in the xmm registers by the last user.

I'm not certain of whether this is excessive paranoia or not, but there was
an outright bug in neglecting to set the mxcsr value that caused awk to
SIGFPE in some case.  Especially for Tim Robbins. :-)

i386 probably should do something about the mxcsr setings too.

Found by:  tjr
2004-06-18 04:01:54 +00:00
Bruce M Simpson
5214cb3f59 If SO_DEBUG is enabled for a TCP socket, and a received segment is
encapsulated within an IPv6 datagram, do not abuse the 'ipov' pointer
when registering trace records.  'ipov' is specific to IPv4, and
will therefore be uninitialized.

[This fandango is only necessary in the first place because of our
host-byte-order IP field pessimization.]

PR:		kern/60856
Submitted by:	Galois Zheng
2004-06-18 03:31:07 +00:00
Robert Watson
c012260726 Merge some additional leaf node socket buffer locking from
rwatson_netperf:

Introduce conditional locking of the socket buffer in fifofs kqueue
filters; KNOTE() will be called holding the socket buffer locks in
fifofs, but sometimes the kqueue() system call will poll using the
same entry point without holding the socket buffer lock.

Introduce conditional locking of the socket buffer in the socket
kqueue filters; KNOTE() will be called holding the socket buffer
locks in the socket code, but sometimes the kqueue() system call
will poll using the same entry points without holding the socket
buffer lock.

Simplify the logic in sodisconnect() since we no longer need spls.

NOTE: To remove conditional locking in the kqueue filters, it would
make sense to use a separate kqueue API entry into the socket/fifo
code when calling from the kqueue() system call.
2004-06-18 02:57:55 +00:00
Bruce M Simpson
da181cc144 Don't set FIN on a retransmitted segment after a FIN has been sent,
unless the segment really contains the last of the data for the stream.

PR:		kern/34619
Obtained from:	OpenBSD (tcp_output.c rev 1.47)
Noticed by:	Joseph Ishac
Reviewed by:	George Neville-Neil
2004-06-18 02:47:59 +00:00
Bruce Evans
bd1a3f1a7e Fixed a panic caused by over-optimizing npxdrop() in the non-FXSR case.
frstor can trap despite it being a control instruction, since it bogusly
checks for pending exceptions in the state that it is overwriting.
This used to be a non-problem because frstor was always paired with a
previous fnsave, and fnsave does an implicit fninit so any pending
exceptions only remain live in the saved state.  Now frstor is sometimes
paired with npxdrop() and we must do a little more than just forget
that the npx was used in npxdrop() to avoid a trap later.  This is a
non-problem in the FXSR case because fxrstor doesn't do the bogus check.

FXSR is part of SSE, and npxdrop() is only in FreeBSD-5.x, so this bug
only affected old machines running FreeBSD-5.x.

PR:		68058
2004-06-18 02:10:55 +00:00
Bruce M Simpson
27de0135ce Ensure that dst is bzeroed before calling rtalloc_ign(), to avoid possible
routing table corruption.

PR:		kern/40563, freebsd4/432 (KAME)
Obtained from:	NetBSD (in_gif.c rev 1.26.10.1)
Requested by:	Jean-Luc Richier
2004-06-18 02:04:07 +00:00
Thomas Moestl
d05bb9a2a6 Fix the problem that surfaced with the new binutils import on sparc64
(and that is for now being worked around by a binutils patch).

The rtld code tested &_DYNAMIC against 0 to see whether rtld itself
was built as PIC or not. While the sparc64 MD code did not rely
on the preset value of the GOT slot for _DYNAMIC any more due
to previous binutils changes, it still used to not be 0, so
that this check did work. The new binutils do however initialize
this slot with 0. As a consequence, rtld would not properly initialize
itself and crash.
Fix that by introducing a new macro, RTLD_IS_DYNAMIC, to take the role
of this test. For sparc64, it is implemented using the rtld_dynamic()
code that was already there. If an architecture does not provide its
own implementation, we default to the old check.

While being there, mark _DYNAMIC as a weak symbol in the sparc64
rtld_start.S. This is needed in the LDSCRIPT case, which is however
not currently supported for want of an actual ldscript.

Sanity checked with md5 on alpha, amd64, i386 and ia64.
2004-06-18 02:01:37 +00:00
Bruce Evans
7ca59a8f46 Forced commit to note that the hack removed in the previous commit
really used to be necessary.  bus_teardown_interrupt() was completely
broken for fast interrupts in -current from approx. 2001/02/09 to
2003/11/03.  It not only didn't shut down the hardware interrupt; it
also left the fast interrupt handler wired into the IDT.  The hack was
needed to shut down the hardware interrupt.  Without it, for npx,
unmasked exceptions were delivered via both IRQ13 and Exception16, and
spurious IRQ13 broke exception handling in much the same way that it
is broken on old systems that don't support Exception16.
2004-06-18 01:49:26 +00:00
Warner Losh
973796c882 A couple more style(9) nits I should have included in last commit 2004-06-18 01:28:54 +00:00
Bruce M Simpson
54514724de Add an example to rc.conf(5) about how to use the static_routes variable.
We already do this for jails and their various control variables.

PR:		conf/62772
2004-06-18 01:28:33 +00:00
Warner Losh
b3cb6e3742 Style nits in the prototypes 2004-06-18 01:27:19 +00:00
Kelly Yancey
7c2989d3e9 Bumb version so apps can detect whether CLOCK_VIRTUAL and CLOCK_PROF are
implemented.
2004-06-17 23:16:30 +00:00
Kelly Yancey
0a0163040b CLOCK_PROF and CLOCK_VIRTUAL are implemented now. 2004-06-17 23:13:38 +00:00
Kelly Yancey
b8817154c3 Implement CLOCK_VIRTUAL and CLOCK_PROF for clock_gettime(2) and
clock_getres(2).

Reviewed by:	phk
PR:		23304
2004-06-17 23:12:12 +00:00
Robert Watson
9535efc00d Merge additional socket buffer locking from rwatson_netperf:
- Lock down low hanging fruit use of sb_flags with socket buffer
  lock.

- Lock down low hanging fruit use of so_state with socket lock.

- Lock down low hanging fruit use of so_options.

- Lock down low-hanging fruit use of sb_lowwat and sb_hiwat with
  socket buffer lock.

- Annotate situations in which we unlock the socket lock and then
  grab the receive socket buffer lock, which are currently actually
  the same lock.  Depending on how we want to play our cards, we
  may want to coallesce these lock uses to reduce overhead.

- Convert a if()->panic() into a KASSERT relating to so_state in
  soaccept().

- Remove a number of splnet()/splx() references.

More complex merging of socket and socket buffer locking to
follow.
2004-06-17 22:48:11 +00:00
Søren Schmidt
b2c082c98b Up SiI reset wait a bit, some devices got lost. 2004-06-17 21:36:10 +00:00
Poul-Henning Kamp
b90c855961 Reduce the thaumaturgical level of root filesystem mounts: Instead of using
an otherwise redundant clone routine in geom_disk.c, mount a temporary
DEVFS and do a proper lookup.

Submitted by:	thomas
2004-06-17 21:24:13 +00:00
Ruslan Ermilov
01ddd31ffc Assorted markup, spelling, and grammar fixes. 2004-06-17 19:51:17 +00:00
Olivier Houchard
45ab3f5350 This comment should have been removed in the previous commit.
Spotted out by: marcus, simon
2004-06-17 19:01:53 +00:00
Olivier Houchard
f77d42ce5c Woohoo !
the latest binutils import mades this gross hack useless, so just remove it.
2004-06-17 17:53:16 +00:00
Olivier Houchard
612246d6ac Nuke dead code. 2004-06-17 17:52:12 +00:00
Olivier Houchard
62f1185016 Nuke bus_space_mmap(), as it does not exist in FreeBSD. 2004-06-17 17:51:48 +00:00
Ruslan Ermilov
715a028455 Fixed markup bugs. 2004-06-17 17:51:17 +00:00
Ruslan Ermilov
ef13db44d1 Fixed markup bugs.
Spell function correctly when talking about restarting after a signal.
2004-06-17 17:49:30 +00:00
Nate Lawson
37c55a039a Revert last change. If acpi is loaded or compiled into the kernel, its
devclass will be present even if the driver was disabled by a hint.  Using
device_get_softc() provides the right info even if it's overkill.

Explained by:	jhb
2004-06-17 17:27:37 +00:00
Poul-Henning Kamp
f3732fd15b Second half of the dev_t cleanup.
The big lines are:
	NODEV -> NULL
	NOUDEV -> NODEV
	udev_t -> dev_t
	udev2dev() -> findcdev()

Various minor adjustments including handling of userland access to kernel
space struct cdev etc.
2004-06-17 17:16:53 +00:00
Max Laier
c0d431fe31 Import two fixes from the OpenBSD stable branch:
- prevent an endless loop with route-to lo0, fixes PR 3736 (dhartmei@)
 - The rule_number parameter for pf_get_pool() needs to be 32 bits, not 8 -
   this fixes corruption of the address pools with large rulesets.
   (mcbride@, pb@)

Reviewed-by:	dhartmei
2004-06-17 16:59:47 +00:00
Robert Watson
804613dc06 Add reference to mac_get_link() in man page, which was omitted when
mac_get_link() and mac_set_link() were added.
2004-06-17 16:08:36 +00:00
David E. O'Brien
d8a921c775 Commit a crude hack so we get sparc64 snapshots working again with a
stable ld.so.  We need to revisit the rtld-elf/sparc64/rtld_start.S
rev. 1.5 and rtld-elf/sparc64/rtld_machdep.h rev. 1.5, which was
suppose to allow stock Binutils 2.13 (and later) to be used.
2004-06-17 16:08:20 +00:00
Max Laier
4238db7522 Fix printing of u_int64_t with a cast to unsigned long long.
Found-by:	tinderbox(amd64)
2004-06-17 15:23:51 +00:00
Robert Drehmel
b8938b667e Use strlcpy(3) to replace the idiomatic
strncpy(d, s, l);
  d[l - 1] = '\0';

statements.
2004-06-17 14:07:16 +00:00
Poul-Henning Kamp
d33ccadc81 Save a couple of bytes for the SIO case. 2004-06-17 12:02:25 +00:00
Poul-Henning Kamp
7196870cbb Document boot0sio and note that it requires modem handshake to work. 2004-06-17 12:01:25 +00:00
Poul-Henning Kamp
1400886b92 Fix another beak.
Seen by:	pjd
2004-06-17 11:44:05 +00:00
Robert Drehmel
1040317076 Fix a bug which occurred when the home directory given by the
-d option was equal to the one already saved and which caused
the pw utility to avoid updating values passed by other options
processed before the -d option in the code path.

Spotted by: Richard Caley <rjc@interactive.co.uk>
2004-06-17 10:29:12 +00:00
David E. O'Brien
2c67a07fd0 Third time's a charm?? (the logic was reversed from desired)
Time for sleep...

Submitted by:	ru
2004-06-17 08:06:41 +00:00
Brian Feldman
3c632a5847 atapicam(4) is currently off by three orders of magnitude regarding the
timeout values in the CAM CCBs.  Divide by 1000 to get values in seconds
which are what ata(4) timeouts internally use.

This does lose granularity, though, and small values can now round down
to zero.  It's probably worth making all ata(4) timeouts in terms of
hz/ticks/milliseconds/something.
2004-06-17 07:29:56 +00:00
Alan Cox
d45f21f31a Do not preset PG_BUSY on VM_ALLOC_NOOBJ pages. Such pages are not
accessible through an object.  Thus, PG_BUSY serves no purpose.
2004-06-17 06:16:58 +00:00
Pawel Jakub Dawidek
a6d8900933 Add missing newlines. 2004-06-17 06:04:14 +00:00
David E. O'Brien
6e009069f5 Grrr, use the userland spelling not the kernel tree spelling. 2004-06-17 05:27:56 +00:00
Tim Kientzle
9ad66a1eed Always restore permissions for regular files, even if the
file already exists on disk.

Pointed out by: www/resin3 port (whose distfile contains the same file
  twice with different permissions and relies on the permissions associated
  with the second instance)
Thanks again to: Kris Kennaway
2004-06-17 03:09:06 +00:00
David E. O'Brien
9896c5f11a Fall out from Binutils 2.15: don't bulid the ld.so on Sparc64. 2004-06-17 03:04:24 +00:00
David E. O'Brien
f1e3e1c78f Fall out from Binutils 2.15: disable building the Alpha loader. 2004-06-17 02:59:53 +00:00