Commit Graph

95274 Commits

Author SHA1 Message Date
tjr
05ad019d7b Handle realloc() failure correctly. 2003-10-16 07:07:20 +00:00
mckusick
0dd6703d54 Malloc buckets of size 128 have been having their 64-byte offset
trashed after being freed. This has caused several panics including
kern/42277 related to soft updates. Jim Kuhn tracked the problem
down to ipfw limit rule processing.  In the expiry of dynamic rules,
it is possible for an O_LIMIT_PARENT rule to be removed when it still
has live children.  When the children eventually do expire, a pointer
to the (long gone) parent is dereferenced and a count decremented.
Since this memory can, and is, allocated for other purposes (in the
case of kern/42277 an inodedep structure), chaos ensues. The offset
in question in inodedep is the offset of the 16 bit count field in
the ipfw2 ipfw_dyn_rule.

Submitted by:	Jim Kuhn <jkuhn@sandvine.com>
Reviewed by:	"Evgueni V. Gavrilov" <aquatique@rusunix.org>
Reviewed by:	Ben Pfountz <netprince@vt.edu>
MFC after:	1 week
2003-10-16 02:00:12 +00:00
obrien
8eb262a2d5 Quiet warnings about mis-matched pointer assignment.
Tested on:	PowerPC
2003-10-15 20:05:57 +00:00
phk
c7ba6f536a Introduce a new optional memberfunction for cdevsw, fdopen() which
passes the fdidx from VOP_OPEN down.

This is for all I know the final API for this functionality, but
the locking semantics for messing with the filedescriptor from
the device driver are not settled at this time.
2003-10-15 20:00:59 +00:00
ps
58d350029a Print the correct logical drive lun number returned by the controller. 2003-10-15 18:52:44 +00:00
sam
baa5cf51cd purge extraneous ';'s
Supported by:	FreeBSD Foundation
Noticed by:	bde
2003-10-15 18:19:28 +00:00
shiba
24ea734c5d Add Allied Telesis SIC-AT boards support.
Discussed in from [FreeBSD-tech-jp 3396] to [FreeBSD-tech-jp 3407]
at FreeBSD-tech-jp@jp.freebsd.org.

NOTE: We must put ed_probe_SIC() function into if_ed_isa.c because
      this is a bus dependent code. But the ed driver code is not
      separated explicitly whether it is bus dependent or independent
      now.

Refer to: http://plaza17.mbn.or.jp/~chi/myprog/FreeBSD/sicat.html
Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata)
2003-10-15 17:22:15 +00:00
hrs
127c6b8a39 Catch up with the English version and refine translation.
1.638 -> 1.640	relnotes/common/new.sgml
2003-10-15 17:08:33 +00:00
rushani
51d78e78c7 Refine translation.
Submitted by:	Hiroo Ono <hiroo@oikumene.gcd.org>,
		Hiroyuki CHIBA <clin@imasy.org>
References:	[doc-jp-work 724, 726]
2003-10-15 15:42:31 +00:00
rushani
fdb043bbd8 Modified release note:
Note MFC of sk(4) support for SK-9521 V2.0 and 3COM 3C940.
2003-10-15 12:27:52 +00:00
tg
c803b8b6aa Fix typo. 2003-10-15 10:25:31 +00:00
hrs
1f01c84d5e New release note:
- xe(4) driver update
	- tzdata2003d update
2003-10-15 10:04:07 +00:00
phk
35212ae1a1 Make sure to pull in all relevant crypto for GEOM_BDE 2003-10-15 08:53:04 +00:00
tg
44a5d876af Fix typos; reformat some entries. 2003-10-15 08:18:59 +00:00
alc
b722f9a630 - vm_fault_copy_entry() should not assume that the source object contains
every page.  If the source entry was read-only, one or more wired pages
   could be in backing objects.
 - vm_fault_copy_entry() should not set the PG_WRITEABLE flag on the page
   unless the destination entry is, in fact, writeable.
2003-10-15 08:00:45 +00:00
jeff
72dab909cc - If our user_pri doesn't match our actual priority our priority has been
elevated either due to priority propagation or because we're in the
   kernel in either case, put us on the current queue so that we dont
   stop others from using important resources.  At some point the priority
   elevations from sleeping in the kernel should go away.
 - Remove an optimization in sched_userret().  Before we would only set
   NEEDRESCHED if there was something of a higher priority available.  This
   is a trivial optimization and it breaks priority propagation because it
   doesn't take threads which we may be blocking into account.  Notice that
   the thread which is blocking others gets up to one tick of cpu time before
   we honor this NEEDRESCHED in sched_clock().
2003-10-15 07:47:06 +00:00
deischen
d5430e8218 Add a wrapper for a function that takes and releases the adapter
lock around a call to the original function.  Make the timeout
function in callout_reset() use the wrapped function to avoid a
lock assertion panic.

Reviewed by:	sam
Reported by:	cgiordano@ids.net
2003-10-15 05:34:41 +00:00
linimon
7b111f7fdf Let the world figure out exactly how superannuated I am. 2003-10-15 03:31:06 +00:00
peter
8cbefc5894 The KERN_PROC_PROC sysctl took 4 args in 5.0-REL and 5.1-REL. We need to
accept this for a bit longer.  Requiring the new order of 3 args only
was not very helpful.
2003-10-15 03:11:46 +00:00
peter
8f60b15573 Pull the tier-2 card one last time and break the get/setcontext and
sigreturn() ABI and the signal context on the stack.

Make the trapframe (and its shadows in the ucontext and sigframe etc)
8 bytes larger in order to preserve 16 byte stack alignment for the
following C code calls.  I could have done some padding after the
trapframe was saved, but some of the C code still expects an argument of
'struct trapframe'.  Anyway, this gives me a spare field that can be used
to store things like 'partial trapframe' status or something else in
the future.

The runtime impact is fairly small, *except* for threaded apps and things
that decode contexts and the signal stack (eg: cvsup binary).  Signal
delivery isn't too badly affected because the kernel generates the
sigframe that sigreturn uses after the handler has been called.

The size of mcontext_t and struct sigframe hasn't changed.  Only
the last few fields (sc_eip etc) got moved a little and I eliminated
a spare field.  mc_len/sc_len did change location though so the
sanity checks there will still trap it.
2003-10-15 02:04:52 +00:00
peter
1e073a3aa6 Get some more data if we hit the pmap_enter() thing. 2003-10-15 00:45:35 +00:00
jkoshy
9d7728f915 Detect errors during 'cat' page creation better. This fixes bin/5591.
Reviewed by:	ru
2003-10-15 00:36:44 +00:00
sam
55681a746c o convert mutex calls to #defines for portability, etc.
o destroy mutex's on detach (was missing)
2003-10-14 22:51:45 +00:00
rsm
3989051f82 Major update to xe driver:
- Make multicast work
- Fix (some of) the watchdog timeouts after card reset
- Add support for CE2, CEM28 and CEM33 cards
- General code cleanup

Any card that worked previously should still work, as well as a lot that
didn't.

The driver is not yet style(9) compliant; those changes are forthcoming,
once the functional changes are done.

PR:		kern/50644
Reviewed by:	imp
Approved by:	imp
2003-10-14 22:51:35 +00:00
wollman
1b57943fc6 MFV: tzdata2003d 2003-10-14 21:03:22 +00:00
markm
8b5053fdbe Turn malloc+snprintf into asnprintf.
Submitted by:	David Hill <hill at phobia dot em ess>
2003-10-14 20:42:13 +00:00
des
94af456055 Add the "TB ---" prefix to error and warning messages so that early
failures (e.g. failure to lock the sandbox) don't result in empty failure
reports.
2003-10-14 20:01:58 +00:00
sam
5355d8b454 Lock ip forwarding route cache. While we're at it, remove the global
variable ipforward_rt by introducing an ip_forward_cacheinval() call
to use to invalidate the cache.

Supported by:	FreeBSD Foundation
2003-10-14 19:19:12 +00:00
sam
5daf1cdd10 MFp4: correct locking issues in nd6_lookup
Supported by:	FreeBSD Foundation
2003-10-14 18:49:08 +00:00
sam
a771df1391 remove dangling ';'s` that were harmless
Supported by:	FreeBSD Foundation
2003-10-14 18:45:50 +00:00
sam
4e958f714d Change default for kern.polling.idle_poll back to 1. This was set to 0
because Luigi observed livelock but in recent testing it did not occur
so I'm re-enabling it by default.

Reviewed by:	luigi
2003-10-14 18:39:36 +00:00
peter
18a65a1310 Fix just about as many bugs in my last commit here as there were lines that
I changed.  That is never a good sign.
1) only map 1 page at address zero, not 4096 pages
2) page 1 starts at address 4096 (PAGE_SIZE) not 4095 (PAGE_MASK).  I
   don't even want to think what the pte's looked like.
3) subtract the r/o page group start address from the end before
   converting it to a count.  Otherwise an extra page is mapped.

If you were affected by this, the symptoms of this was a hang at boot
after the spinner.  Sorry folks. :-(

"You broke my laptop!" by:	sam
2003-10-14 17:02:18 +00:00
sos
3d089cc2b5 Reintroduce the "recovered from lost interrupt" code, but in a new
(hopefully) panic safe way.

Why the interrupts are lost is still a mystery, to me at least.
2003-10-14 16:53:13 +00:00
ume
3d011c684c Fix alignment problem on 64 bit arch.
I only tested if it doesn't break anything on i368.  Since I
have no 64 bit machine, I cannot test it, actually.

Reported by:	jmallett
2003-10-14 13:37:37 +00:00
rushani
136a7a6d45 Catch up with the English version:
1.592 -> 1.638 relnotes/common/new.sgml
2003-10-14 08:27:39 +00:00
phk
637477251d Made use of 'error' argument, which was unused (by mistake) before.
Submitted by:    Pawel Jakub Dawidek <nick@garage.freebsd.pl>
2003-10-14 08:09:43 +00:00
imp
e34b12b9cd With DIAGNOSTICS, sometimes we get weird crashes when some driver
accesses softc after it is freed.  Use a different malloc type for
softc than the rest of the bus code to make it more clear when these
things happen that it is the driver that's at fault, not the bus code.

Suggested by: sam and/or phk (I think)
2003-10-14 06:22:07 +00:00
alc
3d04ccf49a MFia64
Move uma_small_alloc() and uma_small_free() to uma_machdep.c.
2003-10-14 05:51:31 +00:00
rushani
a0b044f58e Close open parenthesis. 2003-10-14 05:36:36 +00:00
imp
8dda8ae9ff Fix a race condition in owi. If you eject a card, then the wi_inquire
timeout would continue to happen: boom!  Fix this[*] by timing out earlier.

[*] almost fixes the race on unload: wi_inquire could be running when
untimeout is called, and there's no way to know when it has actually
returned.  This race is very rare and hard to lose.

Submitted by: scottl
2003-10-14 05:25:31 +00:00
imp
fb174cc987 Use more modern architectures than VAX for little endian machines 2003-10-14 02:59:13 +00:00
imp
8a09d8a65d Replace the VAX and MIPS alternate formats with the architectures that
FreeBSD supports.  None of them support an alternate formats, except
the alpha (which prints extra register information).

# if we get a mips port, we can put the mips case back to document the
# actual behavior.
2003-10-14 02:47:23 +00:00
jeff
ce562d35ad - Add a mising vn_finished_write()
Pointy hat:     jeff
Found by:       robert
Obtained from:  kirk
2003-10-14 00:38:34 +00:00
alc
b1c274e0be Add rfork_thread(3). 2003-10-13 20:32:33 +00:00
phk
b8ead5692b Insert an overview of the plans here, in case I get run over by a bus. 2003-10-13 20:14:02 +00:00
ume
a89e9b5e91 use BF_ecb_encrypt().
Obtained from:	KAME
2003-10-13 19:26:08 +00:00
ume
fd41336ef5 - support AES counter mode for ESP.
- use size_t as return type of schedlen(), as there's no error
  check needed.
- clear key schedule buffer before freeing.

Obtained from:	KAME
2003-10-13 14:57:41 +00:00
davidxu
b24bb74b9e Don't clear signal mask in execsig(). RELENG_4 does not clear it and POSIX
asks to inherit signal mask for execv.
2003-10-13 14:03:08 +00:00
des
e17c9a0bf7 There is no network2 any more.
Pointy hat to:	mtm
2003-10-13 10:36:26 +00:00
dougb
4c4eba0e00 * Remove the OS specific bits, since NetBSD isn't interested in
porting this stuff back.

* Test /etc/motd for writability before trying to update it. This is
especially useful when /etc/ is mounted ro, like on a diskless boot.
(Thanks to phk for the idea on this one.)

* Make the "updating" message reflect what actually happens.
2003-10-13 08:44:07 +00:00