Commit Graph

43133 Commits

Author SHA1 Message Date
silby
7552dbf14b Add another sysctl flag, CTLFLAG_TUN, which is a hint to the userland
sysctl that a given variable is tunable.

Also added is CTLFLAG_RDTUN, which is CTLFLAG_RD|CTLFLAG_TUN; TUN does
not always imply read-only, so RDTUN should be used where RD was used
before.
2003-10-21 16:48:33 +00:00
rwatson
3873350b0f Line-break sync to the MAC development branch. 2003-10-21 15:18:26 +00:00
simokawa
aeab60718e We need to initialize bp->b_offset and bp->b_iooffset
becuase bp->b_blkno is ignored now.
2003-10-21 13:18:19 +00:00
tjr
39d2858393 Reject negative ngrp arguments in linux_setgroups() and linux_setgroups16();
stops users being able to cause setgroups to clobber the kernel stack by
copying in data past the end of the linux_gidset array.
2003-10-21 11:00:33 +00:00
sos
b85e19be51 Up the alignment requirement of the SC1100 to 16 bytes, it has all the bugs and then some of its Cyrix inheritance.
Set the max_iosize for the Cyrix to 63K as the SC1100.
2003-10-21 08:53:29 +00:00
scottl
0564a95894 Don peril-sensitive sunglasses and mark pipe(2) as MPSAFE. I've beaten up
on it for the last 15 hours with no signs of problems.  It gives a small
(1%) gain on buildworld since pipe_read/pipe_write are already free of Giant.
2003-10-21 07:03:27 +00:00
phk
c78e94ed98 Retire bio_caller2 (alias for b_io.bio_caller2), this field is reserved
for dev_strategy() use.

Retire bio_driver[12] (aliases for b_io.bio_driver[12]) these fields are
reserved for device driver use and can as such never have any interest
in the buf end of things.
2003-10-21 06:58:58 +00:00
phk
01dad440c7 Remove KASSERTS on B_PHYS for vmapbuf() and vunmapbuf(), B_PHYS is going
away.
2003-10-21 06:53:10 +00:00
marcel
7df6e35964 Remove md_bspstore from the MD fields of struct thread. Now that
the backing store is at a fixed address, there's no need for a
per-thread variable.
2003-10-21 01:13:49 +00:00
sam
b058e8665f revert default for idle polling to zero until we can resolve the
livelock problem
2003-10-20 21:14:24 +00:00
jeff
d477fdf956 - If a thread is not bound to a kse return 0 from sched_pctcpu().
Reported by:	 pawel.worach@nordea.com
2003-10-20 19:55:21 +00:00
alc
eecac55b7d - Remove some long unused code. 2003-10-20 18:57:01 +00:00
alc
512489f301 Initialize the buf's b_object in pbgetvp(). Clear it in pbrelvp(). (This
facilitates synchronization of the vm page's valid field using the
vm object's lock.)

Suggested by:	tegge
2003-10-20 18:24:38 +00:00
sam
3d2d2c4fd8 fix build: linux_to_bsd_msf_lba is no longer used because of previous commit 2003-10-20 17:56:10 +00:00
ume
01f1aaf295 enclose IPv6 part with ifdef INET6.
Obtained from:	KAME
2003-10-20 16:19:01 +00:00
dwmalone
72e9866f3d Mark dup as MPSAFE. Giant was pushed into dup ages ago, but it looks
like it was missed in syscalls.master.

Spotted by:	alc
2003-10-20 16:16:03 +00:00
ume
1bfb498609 correct linkmtu handling.
Obtained from:	KAME
2003-10-20 15:27:48 +00:00
phk
6b3ae2c6aa Remember to check the DE_WHITEOUT flag in the case where a cloned
device is hidden by a devfs(8) rule.

Spotted by:	 Adam Nowacki <ptnowak@bsk.vectranet.pl>
2003-10-20 15:08:10 +00:00
sos
e83edc4bf6 If just gcc could make up its mind... 2003-10-20 14:28:37 +00:00
sos
0468baeb3f Only return valid DMA error bits. 2003-10-20 13:45:11 +00:00
sos
c0bf81d66c Up delay from 10 to 100ms after reset, this helps some slow devices
get their act together before we start probing.
2003-10-20 13:44:33 +00:00
sos
cff8e144fe Only announce ECC errors when its only that. 2003-10-20 13:32:42 +00:00
tjr
f2b3ceb410 Fix some security bugs in the SVR4 emulator:
- Return NULL instead of returning memory outside of the stackgap
  in stackgap_alloc() (FreeBSD-SA-00:42.linux)
- Check for stackgap_alloc() returning NULL in svr4_emul_find(),
  and clean_pipe().
- Avoid integer overflow on large nfds argument in svr4_sys_poll()
- Reject negative nbytes argument in svr4_sys_getdents()
- Don't copy out past the end of the struct componentname
  pathname buffer in svr4_sys_resolvepath()
- Reject out-of-range signal numbers in svr4_sys_sigaction(),
  svr4_sys_signal(), and svr4_sys_kill().
- Don't malloc() user-specified lengths in show_ioc() and
  show_strbuf(), place arbitrary limits instead.
- Range-check lengths in si_listen(), ti_getinfo(), ti_bind(),
  svr4_do_putmsg(), svr4_do_getmsg(), svr4_stream_ti_ioctl().

Some fixes obtain from OpenBSD.
2003-10-20 10:38:48 +00:00
sos
82da7f6b49 We dont support CDROMREADAUDIO anymore. 2003-10-20 09:51:00 +00:00
sos
e5803507e0 Remove no longer existant CDIOCREADAUDIO ioctl. 2003-10-20 09:29:40 +00:00
phk
c096f8aa94 When a driver successfully created a device on demand, we can directly
pick up the DEVFS inode number from the dev_t and find our directory
entry from that, we don't need to scan the directory to find it.

This also solves an issue with on-demand devices in subdirectories.

Submitted by:	cognet
2003-10-20 07:04:09 +00:00
alc
ba669f6199 - Synchronize access to a vm page's valid field using the containing
vm object's lock.
2003-10-20 05:57:55 +00:00
marcel
87282b0dcb Put the RSE backing store at a fixed address. This change is triggered
by libguile that needs to know the base of the RSE backing store. We
currently do not export the fixed address to userland by means of a
sysctl so user code needs to hardcode it for now. This will be revisited
later.

The RSE backing store is now at the bottom of region 4. The memory stack
is at the top of region 4. This means that the whole region is usable
for the stacks, giving a 61-bit stack space.

Port: lang/guile (depended of x11/gnome2)
2003-10-20 05:34:10 +00:00
alc
d681abd0f8 - Remove comments referring to functions that no longer exist. 2003-10-20 05:16:27 +00:00
cognet
18fc7b26c7 Various style and type fixes in my last commit.
Suggested by:	mux
2003-10-20 04:10:20 +00:00
alc
9167e4667d - Hold the vm object's lock around calls to vm_page_set_validclean(). 2003-10-20 04:05:24 +00:00
silby
4c4e7a9593 Fix m_head handling in sis_encap so that the correct mbuf is always handed
to BPF_MTAP.
2003-10-19 23:28:02 +00:00
silby
fc5724e28c Fix a problem where m_defrag would allocate a new mbuf to replace the
chain passed into dc_encap, which dc_start was unaware of.  This caused
the old (now invalid) mbuf to be passed to BPF_MTAP.

Spotted by:	Kenjiro Cho <kjc@csl.sony.co.jp>
2003-10-19 23:05:19 +00:00
silby
4add8d9302 Add a new macro M_ASSERTVALID which ensures that the mbuf in question
is non-free.  (More checks can/should be added in the future.)

Use M_ASSERTVALID in BPF_MTAP so that we catch when freed mbufs are
passed in, even if no bpf listeners are active.

Inspired by a bug in if_dc caught by Kenjiro Cho.
2003-10-19 22:33:41 +00:00
phk
9f420bf43d Add a testcase which validates that the same buffer can be passed to
rijndael_blockDecrypt() as both input and output.

This property is important because inside rijndael we can get away
with allocating just a 16 byte "work" buffer on the stack (which
is very cheap), whereas the calling code would need to allocate the
full sized buffer, and in all likelyhood would have to do so with
an expensive malloc(9).
2003-10-19 22:12:23 +00:00
ume
8ff2c775d4 - revert to old rijndael code. new rijndael code broke gbde.
- since aes-xcbc-mac and aes-ctr require functions in new
  rijndael code, aes-xcbc-mac and aes-ctr are disabled for now.
2003-10-19 21:28:34 +00:00
dwmalone
be405a4cbd falloc allocates a file structure and adds it to the file descriptor
table, acquiring the necessary locks as it works. It usually returns
two references to the new descriptor: one in the descriptor table
and one via a pointer argument.

As falloc releases the FILEDESC lock before returning, there is a
potential for a process to close the reference in the file descriptor
table before falloc's caller gets to use the file. I don't think this
can happen in practice at the moment, because Giant indirectly protects
closes.

To stop the file being completly closed in this situation, this change
makes falloc set the refcount to two when both references are returned.
This makes life easier for several of falloc's callers, because the
first thing they previously did was grab an extra reference on the
file.

Reviewed by:	iedowse
Idea run past:	jhb
2003-10-19 20:41:07 +00:00
alc
676085d671 - Add vm object locking to vfs_clean_pages() and vfs_bio_set_validclean().
This is to synchronize access to the vm page's valid field by
   vm_page_set_validclean().
2003-10-19 20:39:06 +00:00
phk
b7c9250fa7 Remove KASSERT check for negative bio_offsets, add "normal" EIO
error return for same.
2003-10-19 19:06:54 +00:00
imp
92be84c4b4 Finish the removal of the bst/bsh confusion. 2003-10-19 17:38:04 +00:00
mux
d16b904dfe Remove debug printf(). 2003-10-19 14:33:00 +00:00
cognet
82c805f917 Implement partially /proc/<pid>/maps.
It looks enough to make SImics run.

Reviewed by:	des
2003-10-19 14:13:51 +00:00
nyan
eb1cd59204 MFi386: revision 1.577. 2003-10-19 11:35:44 +00:00
bms
6360d0a43d Fix LINT build by correcting a missed change. 2003-10-19 09:31:07 +00:00
njl
432ff6a541 Disable irqs before entering the power-off state. This is not known
to fix any problems but is similar to how Linux implements this
function.
2003-10-19 05:56:59 +00:00
peter
7b3a8f1308 Tidy up loose ends in the idle process. Call the MI cpu_idle() function
for all platforms now.

XXX alpha/sparc64/powerpc should fill in the function.

Submitted by:  bde
2003-10-19 02:43:57 +00:00
peter
05de20ae7a Add a stub cpu_idle() function for sparc64, alpha, powerpc. This is a
MI declared function so it should be everywhere.
2003-10-19 02:36:07 +00:00
davidxu
f2c5a17d79 Use npxdrop in cpu_thread_exit to save some cycles.
Clear FPU pcb flags for new upcall thread, these flags needn't
be inherited, the new thread should start from clean FPU status.
2003-10-19 00:57:10 +00:00
imp
61abce2611 Don't confuse tags and handles. 2003-10-19 00:03:10 +00:00
alc
cc2c1485cf - Synchronize access to a vm page's valid field using the containing
vm object's lock.
 - Reduce the scope of the vm page queues lock in two places.
2003-10-19 00:01:56 +00:00
njl
8689796a4b Add the cpu_idle_hook() function pointer so that other idlers can be
hooked at runtime.  Make C1 sleep (e.g., HLT) be the default.  This
prepares the way for further ACPI sleep states.
2003-10-18 22:25:07 +00:00
alc
fb13ea0aa9 - Synchronize access to the page's valid field in
vnode_pager_generic_getpages() using the containing object's lock.
2003-10-18 21:30:29 +00:00
alc
bccf1d15ab - Increase the object lock's scope in vm_contig_launder() so that access
to the object's type field and the call to vm_pageout_flush() are
   synchronized.
 - The above change allows for the eliminaton of the last parameter
   to vm_pageout_flush().
 - Synchronize access to the page's valid field in vm_pageout_flush()
   using the containing object's lock.
2003-10-18 21:09:21 +00:00
bms
39bde695bf Fix a typo. The module has the EISA front-end commented out, therefore the
error may not have been picked up right away.

Reviewed by:	mdodd
Submitted by:	Stuart Walsh
2003-10-18 20:44:23 +00:00
phk
50ecf36141 Initialize b_iooffset before calling VOP_[SPEC]STRATEGY 2003-10-18 19:49:46 +00:00
phk
4b7ade98cd Initialize b_iooffset before calling strategy 2003-10-18 19:48:21 +00:00
alc
d9e9583e64 Corrections to revision 1.305
- Specifying VM_MAP_WIRE_HOLESOK should not assume that the start
   address is the beginning of the map.  Instead, move to the first
   entry after the start address.
 - The implementation of VM_MAP_WIRE_HOLESOK was incomplete.  This
   caused the failure of mlockall(2) in some circumstances.
2003-10-18 18:48:17 +00:00
phk
ba114823c5 Retire b_pblkno which was an alias for a bio field which is for
device drivers only.
2003-10-18 18:17:55 +00:00
phk
80b79c02da Don't report b_pblkno, it is going away. 2003-10-18 17:59:02 +00:00
phk
36a05b5ad5 Do not initialize bp->b_pblkno, it is going away. 2003-10-18 17:57:48 +00:00
phk
b3eb57c5d4 Retire bio_blkno entirely.
bio_offset is the field drivers should use.
bio_pblkno remains as a convenient place to store the number of
the device drivers.
2003-10-18 17:53:34 +00:00
phk
5a1c5c9c13 Eliminate use bio_blkno. 2003-10-18 17:51:26 +00:00
ume
42120d22ea rtfree() must be called in lock context.
Reported by:	jhay
2003-10-18 17:46:23 +00:00
phk
313310b9a6 Discontinue bio_blkno usage. 2003-10-18 17:45:45 +00:00
phk
583ddf14d7 Discontinue bio_blkno, use bio_offset instead. 2003-10-18 17:44:01 +00:00
phk
8714e3267f Eliminate reporting of bio_blkno. 2003-10-18 17:28:36 +00:00
phk
adc5cdd07a Report bio_pblkbo instead of bio_blkno. 2003-10-18 17:27:10 +00:00
phk
94a1f5bcd6 Use bio_offset instead of bio_blkno 2003-10-18 17:26:13 +00:00
phk
466d3b80d8 No need to initialize bio_pblkno from bio_blkno, disksort uses bio_offset. 2003-10-18 17:24:51 +00:00
phk
b60969a35e Make bioq_disksort() sort on the bio_offset field instead of bio_pblkno. 2003-10-18 15:50:56 +00:00
imp
cec43b43e0 Transition to using bus_space macros rather than the inb/outb/etc.
Use EP_{READ,WRITE}{,_MULTI}_{1,2,4} instead.  I've had several people
submit patches like this over the years of varying qualities, markm
being the last.  The names were chosen in consulation with mdodd on
irc.

I've tested this with only PCMCIA cards: 3CCE589EC and 3CCSH572BT.
I've not tried with my more extensive ISA, EISA and cbus collection.

Reviewed by: mdodd
2003-10-18 15:22:43 +00:00
phk
4c2cb3f397 DuH!
bp->b_iooffset (the spot on the disk), not bp->b_offset (the offset in
the file)
2003-10-18 14:10:28 +00:00
phk
d004fc1e31 I think rwatson got the sign wrong here... 2003-10-18 12:16:17 +00:00
phk
d985a757f9 Don't initialize unused bio_blkno field. 2003-10-18 11:25:42 +00:00
phk
3905ba5d0a Initialize bp->b_offset before calling VOP_[SPEC]STRATEGY() 2003-10-18 11:16:33 +00:00
phk
1e371cc970 Initialize bp->b_offset before calling VOP_STRATEGY().
Remove KASSERTS and panics with B_PHYS checks which no longer apply.
2003-10-18 11:14:29 +00:00
phk
bd00da531d Initialize bp->b_offset before calling VOP_STRATEGY() 2003-10-18 11:13:31 +00:00
phk
902030340d Initialize bp->b_offset before calling VOP_[SPEC]STRATEGY().
Remove stale comment about B_PHYS.
2003-10-18 11:11:05 +00:00
phk
4f15f97a05 Initialize b_offset before calling VOP_SPECSTRATEGY() 2003-10-18 11:08:33 +00:00
phk
bd34a4ab18 Initialize bp->b_offset before calling VOP_[SPEC]STRATEGY() 2003-10-18 11:08:04 +00:00
phk
7279dea9d5 Initialize b_offset before calling VOP_STRATEGY/VOP_SPECSTRATEGY.
Remove various comments of KASSERTS and comments about B_PHYS which
does not apply anymore.
2003-10-18 11:06:15 +00:00
phk
011e3f22c7 Initialize bp->b_offset and remove comment about B_PHYS. 2003-10-18 11:02:24 +00:00
phk
8b8970c045 There is no need to muck about with the B_PHYS flag here. We never even
get close to DEV_STRATEGY() which is the only place it is relevant.
2003-10-18 11:01:11 +00:00
phk
a347a9d216 We do not get B_PHYS buffers here anymore. /dev/drum is long gone. 2003-10-18 09:33:13 +00:00
phk
6b528c7911 Convert some if(bla) panic("foo") to KASSERTS to improve grep-ability. 2003-10-18 09:32:39 +00:00
markm
715845d8e6 Mark as __unused some arguments that are, erm, unused. 2003-10-18 09:16:01 +00:00
phk
3dfc831549 The size and contents of the DEV_STRATEGY() macro has progressed to
the point where it being a macro is no longer sensible, and it will
only be more so in days to come.

BIO_STRATEGY() is now only used from DEV_STRATEGY() and should not
be used directly anymore.

Put the contents of both in the new function dev_strategy() and
make DEV_STRATEGY() call that function.

In addition, this allows us to make the rather magic bufdonebio()
helper function static.

This alse saves hunderedandsome bytes of code in a typical kernel.
2003-10-18 09:03:15 +00:00
phk
eec76e0d92 Rearrange the deck-chairs while we wait for scottl to GEOMify RF. 2003-10-18 08:58:35 +00:00
simokawa
8b6083e5fd Add SBP-II target mode driver.
Though this is still incomplete and has some missing features such as
exclusive login and event notification, it may be enough for someone
who wants to play with it.

This driver is supposed to work with firewire(4), targ(4) of CAM(4)
and scsi_target(8) which can be found in /usr/share/example/scsi_target.
This driver doesn't require sbp(4) which implements initiator mode.

Sample configuration:

Kernel: (you can use modules as well)
device	firewire
device	scbus
device	targ
device	sbp_targ

After reboot:
# mdconfig -a -t malloc -s 10m
md0
# scsi_target 0:0:0 /dev/md0
(Assuming sbp_targ0 on scbus0)

You should find the 10MB HDD on FreeBSD/MacOS X/WinXP or whatever connected
to the target using FireWire.

Manpage is not finished yet.
2003-10-18 05:41:31 +00:00
simokawa
f8104f75ff - Call sbp_reset_start() for mgm timeout.
- Change type of target->luns to allocate an array of LUNs dynamically.
	This allows targets to change their number of LUNs after each bus reset.
- Serialize ORB POINTER command for each LUN.
- Improve debug messages.
2003-10-18 04:59:47 +00:00
rwatson
9be7eda223 Wrap db_active check in #ifdef DDB, as db_active is not defined ifndef
DDB.
2003-10-18 02:23:57 +00:00
rwatson
bf32888a2a Add a new cn_flags fields to struct consdev, the low-level console
definition structure.  Define one flag, CN_FLAG_NODEBUG, which
indicates the console driver cannot be used in the context of the
debugger.  This may be used, for example, if the console device
interacts with kernel services that cannot be used from the
debugger context, such as the network stack.  These drivers are
skipped over for calls to cn_checkc() and cn_putc(), and the
calling function simply moves on to the next available console.
2003-10-18 02:13:39 +00:00
sam
68dcd813b1 fix station mode breakage (repeat after me: "test every change, no
matter how small...")
2003-10-17 23:59:11 +00:00
sam
eefb2fc9e8 add statistics for all failures and/or abnormal events; still need
to add per-node statistics
2003-10-17 23:15:30 +00:00
sam
a6b5975f25 fixup debug msgs 2003-10-17 22:15:26 +00:00
sam
45942b2f20 include FH/DS parameters element in probe response frames 2003-10-17 22:09:20 +00:00
sam
c0c1db86a0 o consolidate rx filter calculations in one place
o enable beacon reception when operating in adhoc mode
  so the 802.11 layer can use them to create nodes for peers
2003-10-17 21:58:39 +00:00
sam
23522eb855 correct comment 2003-10-17 21:56:42 +00:00
sam
2053001848 indicate device receives all management frames 2003-10-17 21:55:53 +00:00
sam
98b46f244c o add capability to indicate if device receives all management frames
o use recv mgmt capability to decide if outbound frames should be
  discarded if no node table entry is present
2003-10-17 21:54:59 +00:00
scottl
49356e4d0e Fix a couple of bugs with AIF handling:
- Correct the logic for the AIF array index pointers so that correct slot is
   always looked at.
 - Copy the full FIB payload size when copying AIF's, not just the first 64
   bytes.

Thanks to Mirapoint, Inc, for pointing these problems out and offering a
solution.
2003-10-17 21:44:06 +00:00
sam
365e4629ed parameterize locking to improve portability and possible
change to different locking strategies
2003-10-17 21:41:52 +00:00
jeff
1869c3be82 - Remove the correct thread from the run queue in setrunqueue(). This
fixes ULE + KSE.
2003-10-17 20:53:04 +00:00
ume
a5d2658456 use ND_IFINFO(). 2003-10-17 20:20:14 +00:00
ume
31759c0525 nuke duplicate function and unused function.
Obtained from:	KAME
2003-10-17 17:50:09 +00:00
ume
89eb79f30b revert wrongly dropped null check by previous commit. 2003-10-17 17:34:31 +00:00
ume
babf2c3ec0 - add dom_if{attach,detach} framework.
- transition to use ifp->if_afdata.

Obtained from:	KAME
2003-10-17 15:46:31 +00:00
mckusick
b19170c4ba When expunging unlinked files from a snapshot, skip over holes in the
file rather than panicing with "indiracct: botched params".

Submitted by:	Mark Santcroos <marks@ripe.net>
2003-10-17 13:57:58 +00:00
phk
888092f317 Simplify count_dev() 2003-10-17 11:56:48 +00:00
alc
29c05d8a9b - Synchronize access to a vm page's valid field using the containing
vm object's lock.
 - Release the vm object and vm page queues locks around vput().
2003-10-17 05:07:17 +00:00
peter
c7a92905e0 Halt the cpu on amd64 as well. For some strange reason, this makes
a fair bit of difference to the power consumption and lets my cpu cool
down enough for the temperature sensitive fan controller to completely
stop the cpu fan at times.
2003-10-17 03:49:03 +00:00
marcel
1d3178bbc0 Implement cpu_idle() on ia64. We put the processor in a lightweight
halt state that minimizes power consumption while still preserving
cache and TLB coherency. Halting the processor is not conditional at
this time. Tested with UP and SMP kernels.
2003-10-17 02:24:59 +00:00
jeff
7a27809dea - The kse may be null in sched_pctcpu().
Reported by:	kris
2003-10-16 21:13:14 +00:00
jeff
fcda5c4f74 - Only kse_reassign() in the !running case.
Reported by:	kris
2003-10-16 20:32:57 +00:00
jeff
3b6db25186 - Call sched_add() with the correct argument on SMP.
Reported by:	Valentin Chopov <valentin@valcho.net>
2003-10-16 20:06:19 +00:00
sam
81a0698b6a fix horribly botched MFp4 merge 2003-10-16 19:55:28 +00:00
sam
104396b82e pfil hooks can modify packet contents so check if the destination
address has been changed when PFIL_HOOKS is enabled and, if it has,
arrange for the proper action by ip*_forward.

Submitted by:	Pyun YongHyeon
Supported by:	FreeBSD Foundation
2003-10-16 18:57:45 +00:00
sam
f9a0664908 pfil hooks can modify packet contents so check if the destination
address has been changed when PFIL_HOOKS is enabled and, if it has,
arrange for the proper action by ip*_forward.

Supported by:	FreeBSD Foundation
Submitted by:	Pyun YongHyeon
2003-10-16 16:25:25 +00:00
sam
aa3ae742c3 Drop dummynet lock when calling back into the network stack to deliver
packets.  This eliminates a LOR with Giant that caused outbound pipes
to fail.

Supported by:	FreeBSD Foundation
2003-10-16 16:21:25 +00:00
sam
bf970aa6cf Correct handling of cloning loop avoidance: rtalloc1 may return a null
pointer in which case we should not do the unlock.

Supported by:	FreeBSD Foundatin
2003-10-16 16:17:17 +00:00
sam
2044616f8e o correct handling of a frame that has too many segments to fit in the
tx descriptor array
o while here fix a whitespace nit

Obtained from:	NetBSD
2003-10-16 16:13:11 +00:00
ume
0fb87ae0ef AF_LINK sockaddr has to be attached to ifp->if_addrlist until the
end, as many of the code assumes that TAILQ_FIRST(ifp->if_addrlist)
is non-null.

Submitted by:	itojun
2003-10-16 13:38:29 +00:00
dfr
300addad5e Changes for new SMP-safe kobj method dispatch algorithm. 2003-10-16 13:29:26 +00:00
bde
bfb4a0a2c1 Don't forget to load %es with the kernel data segment selector in
Xcpustop().  %es is used in at least the call to savectx() when savectx()
calls bcopy(), so not loading it was fatal if a stop IPI interrupts
user mode.

This reduces bugs starting and stopping CPUs for debuggers.  CPUs are
stopped mainly in kdb_trap() and cpu_reset().  At reset time there is
a good chance that all the CPUs are in the kernel, so the bug was
probably harmless then.
2003-10-16 10:44:24 +00:00
jeff
6e062906a7 - Fix a minor problem with my last commit, we don't want to return from
sched_switch if the thread is running, we want to fall through and pick
   a new thread because we have been preempted.
2003-10-16 10:04:54 +00:00
jeff
f21d0fada6 - mtx_ownedby() was unpopular and is no longer needed. Remove it. 2003-10-16 09:48:09 +00:00
dfr
72e3738dce Add a workaround for the fact that the priv field was removed from
struct driver. We were the last user of that field (and we are scheduled
for demolition) so there wasn't much point in keeping it.
2003-10-16 09:18:35 +00:00
dfr
3dac505582 * Add multiple inheritance to kobj. Each class can have zero or more base
classes and if a method is not found in a given class, its base classes
  are searched (in the order they were declared). This search is recursive,
  i.e. a method may be define in a base class of a base class.
* Change the kobj method lookup algorithm to one which is SMP-safe. This
  relies only on the constraint that an observer of a sequence of writes
  of pointer-sized values will see exactly one of those values, not a
  mixture of two or more values. This assumption holds for all processors
  which FreeBSD supports.
* Add locking to kobj class initialisation.
* Add a simpler form of 'inheritance' for devclasses. Each devclass can
  have a parent devclass. Searches for drivers continue up the chain of
  devclasses until either a matching driver is found or a devclass is
  reached which has no parent. This can allow, for instance, pci drivers
  to match cardbus devices (assuming that cardbus declares pci as its
  parent devclass).
* Increment __FreeBSD_version.

This preserves the driver API entirely except for one minor feature used
by the ISA compatibility shims. A workaround for ISA compatibility will
be committed separately. The kobj and newbus ABI has changed - all modules
must be recompiled.
2003-10-16 09:16:28 +00:00
jeff
4aea3a9433 - Collapse sched_switchin() and sched_switchout() into sched_switch(). Now
mi_switch() calls sched_switch() which calls cpu_switch().  This is
   actually one less function call than it had been.
2003-10-16 08:53:46 +00:00
jeff
991febf6dd - Update the sched api. sched_{add,rem,clock,pctcpu} now all accept a td
argument rather than a kse.
2003-10-16 08:39:15 +00:00
jeff
bf29a9dd12 - The non iterative algorithm for interact_update was broken due to
rounding errors.  This was the source of the majority of the
   interactivity problems.  Reintroduce the old algorithm and its XXX.
 - Up the interactivity threshold to 30.  It really could stand to be even
   a tiny bit higher.
 - Let the sleep and run time accumulate up to 5 seconds of history rather
   than two.  This helps stop XFree86 from becoming non-interactive during
   bursts of activity.
2003-10-16 08:17:43 +00:00
phk
d00fd6c26e Bump FreeBSD version for changed layout of cdevsw 2003-10-16 07:58:37 +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
phk
35212ae1a1 Make sure to pull in all relevant crypto for GEOM_BDE 2003-10-15 08:53:04 +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
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
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
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
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
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
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
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
sam
779a93dc02 remove dangling mtx_unlock orphaned by rev 1.21 change 2003-10-13 04:57:31 +00:00
ume
0650be79cb support AES XCBC MAC for AH.
Obtained from:	KAME
2003-10-13 04:56:04 +00:00
ume
de427fb9bf - support AES XCBC MAC for AH
- correct SADB_X_AALG_RIPEMD160HMAC to 8

Obtained from:	KAME
2003-10-13 04:54:51 +00:00
sam
725572efda Reduce per-packet overhead when using WEP by using an advancing IV
seeded with arc4random rather than calling arc4random for each
packet.  Note this is the same algorithm used to select the IV when
doing WEP on the host.
2003-10-13 03:42:53 +00:00
sam
04745ccf4c Must reset the pointer to the 802.11 header after prepending
for WEP in case the prepend addes a new mbuf.  This fixes WEP.
2003-10-13 03:41:32 +00:00
sam
a0342c8357 MFp4:
o don't grab the mutex at the top of ath_detach; it does nothing
  useful
o deal with entry to ath_ioctl during detach to disable promiscuous
  mode as a result of calling bpfdetach2: cannot call ath_init when
  the device is marked invalid as the code isn't prepared to deal
  with it (in particular by that time the hal reference may have
  been yanked)
2003-10-13 03:39:38 +00:00
sam
b6e95ddc2c MFp4:
change ath_rate_ctl_reset to handle transition from station
mode to adhoc mode; was not resetting the initial xmit rate
causing outbound frames to be dicarded
2003-10-13 03:37:38 +00:00
alc
130d37bcaf - Modify pmap_is_current() to return FALSE when a pmap's page table is in
use because a kernel thread is borrowing it.  The borrowed page table
   can change spontaneously, making any dependence on its continued use
   subject to a race condition.
 - _pmap_unwire_pte_hold() cannot use pmap_is_current(): If a change is
   made to a page table page mapping for a borrowed page table, the TLB
   must be updated.

In collaboration with:	tegge
2003-10-13 03:28:31 +00:00
emax
41bb0e8fd2 Update Bluetooth code.
Reviewed by: M. Warner Losh <imp@bsdimp.com>; John Hay <jhay@freebsd.org>
Approved by: M. Warner Losh <imp@bsdimp.com> (mentor)
2003-10-12 22:04:24 +00:00
jeff
bd83534d11 - In SCHED_CURR() add holding Giant to the list of criteria that will keep
you on the current queue.  In the future, it would be nice if priority
   propagation could deterministicly pluck a thread off of the next queue
   and put it on the current queue.  Until then this hack stops us from
   holding up our entire current queue, including interrupt handlers, while
   a thread on the next queue is blocked while holding Giant.
 - Inherit our pctcpu information from our parent.
2003-10-12 21:07:31 +00:00
ume
dc45666132 simplify and update rijndael code.
Obtained from:	KAME
2003-10-12 21:05:05 +00:00
jeff
2bd0a1c834 - Implement a mtx_ownedby() macro which can be used to determine if a
particular thread owns a mutex.  This cannot be done without races
   unless the thread is curthread.
2003-10-12 21:02:55 +00:00
rwatson
bd94994b05 Comment spelling fix. 2003-10-12 20:51:26 +00:00
ume
510a7d2039 include opencrypto/rmd160.h 2003-10-12 18:33:30 +00:00
alc
bfc309eda8 In vfs_bio_clrbuf(), ignore the state of the object lock if the page is the
"bogus" page.

Found by:	tegge
2003-10-12 18:26:48 +00:00
ume
b436e75e9a use opencrypto for RMD160.
Requested by:	sam
2003-10-12 18:25:38 +00:00
ticso
25f9f8ac49 Cache dev_t values in the right structure.
Tested by:	Jay Cornwall <jay@evilrealms.net>
2003-10-12 15:51:40 +00:00
ume
087c5fbdfa remove unused variable.
Obtained from:	KAME
2003-10-12 15:14:33 +00:00
ume
329da09a2a drop useless define. 2003-10-12 14:47:24 +00:00
ume
d56603d9be use bswap32() for big endian arch.
Reported by:	tinderbox via kris
2003-10-12 14:32:13 +00:00
phk
edaf9214c4 Simplify vn_isdisk() a bit. 2003-10-12 14:04:39 +00:00
sos
7712a47b75 Redo the code that handles eject/close. 2003-10-12 13:11:57 +00:00
sos
e9cd93f034 Avoid potential race on ATA_R_DONE. 2003-10-12 12:38:03 +00:00
sos
e0cb3af529 Put devices into sleep mode (ie spin down) on detach. 2003-10-12 12:37:11 +00:00
sos
4f4aab360e Up timeout to 10s (from 5) in r/w commands. 2003-10-12 12:35:44 +00:00
ume
2e96368ca1 - avoid hardcoded values.
- correct signedness mixups.
- log fix.
- preparation for 64bit sequence number.
  introduce SA id (unique ID for SA - SPI is useless as duplicated
  SPI is allowed)
- no need to malloc/free cksum buffer.

Obtained from:	KAME
2003-10-12 12:03:25 +00:00
des
b3ea058f37 Recognize the Avance Logic ALC655 codec found on some ICH4/5-based
motherboards, such as the Gigabyte I848P.

PR:		kern/54176
Submitted by:	Chris Keladis <chris@cmc.optus.net.au>
Forgotten by:	orion
2003-10-12 11:51:24 +00:00
phk
9d23a3014f Assume that bp->bio_offset is correctly initialized.
This fixes non-power-of-2 blocksize GEOM I/O.
2003-10-12 11:35:55 +00:00
phk
ed350390ed Destroy providers maked with G_PF_WITHER when the last consumer has detached. 2003-10-12 11:34:35 +00:00
des
7526d14d48 A couple of months' worth of back-burner hacking: restructure to better
handle the minor (but significant) differences between the various
Vortex chips; add (incomplete) support for playback.
2003-10-12 11:33:39 +00:00
ume
efae2cbb66 - always check for optlen overrun.
- panic if NULL is passed to ah_sumsiz (as we never do it,
  and callers do not properly check negative returns).

Obtained from:	KAME
2003-10-12 11:18:04 +00:00
sos
10cc9981e2 Use isprint instead of isalpha in determining valid ident string. 2003-10-12 11:10:41 +00:00
ume
a6ff42e2be - correct signedness mixups.
- avoid assuming result buffer size

Obtained from:	KAME
2003-10-12 11:08:18 +00:00
phk
261a4381e8 Initialize CMAP3 to 0 2003-10-12 10:55:45 +00:00
ume
b586f811af avoid hardcoding MD5 result length (16)
Obtained from:	KAME
2003-10-12 09:51:32 +00:00
ume
f1d14cc455 RIPEMD160 support
Obtained from:	KAME
2003-10-12 09:43:48 +00:00
ume
2da6bcd326 - RIPEMD160 support
- pass size arg to ah->result (avoid assuming result buffer size)

Obtained from:	KAME
2003-10-12 09:41:42 +00:00
jmg
f1d456150e fix a problem referencing free'd memory. This is only a problem for
kqueue write events on a socket and you regularly create tons of pipes
which overwrites the structure causing a panic when removing the knote
from the list.  If the peer has gone away (and it's a write knote), then
don't bother trying to remove the knote from the list.

Submitted by:	Brian Buchanan and myself
Obtained from:	nCircle
2003-10-12 07:06:02 +00:00
tjr
b952d3fda3 Fix a multitude of security bugs in the iBCS2 emulator:
- Return NULL instead of returning memory outside of the stackgap
  in stackgap_alloc() (FreeBSD-SA-00:42.linux)
- Check for stackgap_alloc() returning NULL in ibcs2_emul_find();
  other calls to stackgap_alloc() have not been changed since they
  are small fixed-size allocations.
- Replace use of strcpy() with strlcpy() in exec_coff_imgact()
  to avoid buffer overflow
- Use strlcat() instead of strcat() to avoid a one byte buffer
  overflow in ibcs2_setipdomainname()
- Use copyinstr() instead of copyin() in ibcs2_setipdomainname()
  to ensure that the string is null-terminated
- Avoid integer overflow in ibcs2_setgroups() and ibcs2_setgroups()
  by checking that gidsetsize argument is non-negative and
  no larger than NGROUPS_MAX.
- Range-check signal numbers in ibcs2_wait(), ibcs2_sigaction(),
  ibcs2_sigsys() and ibcs2_kill() to avoid accessing array past
  the end (or before the start)
2003-10-12 04:25:26 +00:00
se
6a55ff3777 The code that was meant to test alignment of the register offset
parameter in the read and write case dereferenced an unitialized
pointer and can't possibly ever have catched an actual invalid
argument.

This was apparently true for the read/write and getconf cases. The
latter does not even receive the paramter that is to be verified.

I'm surprised that this did not cause kernel panics, but it seems
that the uninitialized local variable happens to contain data that
may be used as a pointer to memory that satisfies the test condition.

Make the code work as intended by moving the test inside the switch
case where the pointer has been properly initialized.

Since the read and write case shared just about all code (except
for the single call to PCIB_READ_CONFIG resp. PCIB_WRITE_CONFIG) I
have merged both cases.

Noticed by:	trhodes@FreeBSD.org (Tom Rhodes)
2003-10-11 22:20:34 +00:00
jeff
5b9cc4b22e - Fix a typo, I meant & and not |. This was causing lockups from the syncer
looping forever due to list corruption.

Solved by:	tegge
2003-10-11 21:50:45 +00:00
iwasaki
324480cbaf Fix some problems in linux_sendmsg() and linux_recvmsg().
- Allocate storage for uap->msg always because it is copyin()'ed in
   native sendmsg().
 - Convert sockopt level from Linux to FreeBSD after native recvmsg() calling.
 - Some cleanups.

Tested with:	Oracle 9i shared server connection mode.

MFC after:	1 week
2003-10-11 15:08:32 +00:00
nyan
d8d22397ed MFi386: revision 1.576. 2003-10-11 09:24:58 +00:00
sam
0d000789dc fix braino: null the pointer who's memory we just free'd, not some other
pointers that are (potentially) used later
2003-10-11 04:48:35 +00:00
peter
7c3bdb09ce Set page zero read/write right from the start rather than trying to
change it later on.
2003-10-10 23:35:15 +00:00
sam
98e4036e5b locking fixups:
o correct recursive locking when polling and in em_82547_move_tail
o destroy mutex on detach
o add EM_LOCK_ASSERT and similar macros for creating+deleteing the mtx

Submitted by:	Daniel Eischen <eischen@vigrid.com>
2003-10-10 23:14:21 +00:00
ps
592158f5ce crashdump support.
Some bits by:	Rajesh Prabhakaran <rajeshpr@lsil.com>
2003-10-10 22:49:40 +00:00
bms
4d9f6dfda8 Add the Intersil Prism2/Atmel device. These particular devices are strange
beasts which are reported to exist in both Atmel and Prism2 flavours. In
particular, Itronix branded laptops have the Atmel part with an Intersil
radio.

Obtained from:	NetBSD
2003-10-10 21:01:00 +00:00
phk
a4e24a93f7 Sanitize the code relating to the /dev/ti%d entries. In particular evict
the evil vnode sniffing code and use destroy_dev() instead.
2003-10-10 20:35:28 +00:00
ume
d8181d09cf fixed an endian bug on fragment header scanning
Obtained from:	KAME
2003-10-10 19:49:52 +00:00
peter
726f9463d0 Move the pmap_kenter(KERNBASE, 0) a bit earlier so that it works for
the hasbrokenint12 tunable case too.  (with some related and unrelated
style fixes)

Submitted by:  bde
2003-10-10 17:43:42 +00:00
bms
e6d522451a Add the Actiontec 801UAT1/HWU01170-01 802.11b USB Wireless Ethernet adapter. 2003-10-10 16:04:21 +00:00
ume
a72f1bdb76 nuke SCOPEDROUTING. Though it was there for a long time,
it was never enabled.
2003-10-10 16:04:00 +00:00
ume
8df937af7e switch cast128 implementation to implementation by Steve Reid;
smaller footprint.

Obtained from:	KAME
2003-10-10 15:06:16 +00:00
sos
2688d98031 Restore transfermode on devices after reinit. 2003-10-10 11:03:27 +00:00
sos
dff7842fed Dont store ata_params for devices that return a bogus ident string. 2003-10-10 11:00:06 +00:00
robert
ee29ad95a7 Add an 'include' directive to pull in <sys/ptrace.h>. 2003-10-10 10:31:48 +00:00
alc
7f1718017c - Synchronize access to a page's valid field in vfs_bio_clrbuf()
by using the lock from its containing object.
 - Remove GIANT_REQUIRED from vm_hold_load_pages().
2003-10-10 07:26:21 +00:00
ume
4ce3fa6f53 - typo. found by markus@openbsd
- correct signedness mixup in pointer passing.
- drop meaningless variable.

Obtained from:	KAME
2003-10-09 18:44:54 +00:00
ume
5f396e4dfe - typo in comment
- style
- ANSIfy
(there is no functional change.)

Obtained from:	KAME
2003-10-09 16:13:47 +00:00
sos
a2ab5a4d04 Fix the bug that prevented DMA from working on old Acer chips.
Found by: Andrew Gallatin <gallatin@cs.duke.edu>
Pointy hat to: sos
2003-10-09 14:33:06 +00:00
robert
8519aa2ff0 Implement preliminary support for the PT_SYSCALL command to ptrace(2). 2003-10-09 10:17:16 +00:00
marcel
98e6d4d80f With BETA 5 of libuwx some of the application registers are renamed
from UWX_REG_MUMBLE to UWX_REG_AR_MUMBLE. Compatibility defines are
present in libuwx. Change the names here so that we don't depend on
compatibility defines.

Note that there's now an UWX_REG_PFS and an UWX_REG_AR_PFS and the
former is not a compatibility define for the latter AFAICT. Change
to UWX_REG_AR_PFS as that seems to be the one we need to handle.
2003-10-09 03:11:37 +00:00
marcel
2f9c5f7f57 Upgrade Unwind Express (libuwx) to BETA 5. This upgrade includes
all the fixes locally applied and submitted to the author. Not
included in BETA 5, but part of this import are:
o  FreeBSD specific ifdefs to make this compile within a kernel.
   These are limited to include directives and defines.
o  Removal of unused variables, proper casts and initializations
   to allow building with -Werror. This happens in code so has a
   higher chance of causing future import conflicts but not enough
   to worry about it.

I'm especially thankful that the author accepted the change to
replace DISABLE_TRACE with UWX_TRACE_ENABLE so that we can use it
in kernel config files without nasty mappings or indirections as
that would make the integration less perfect. Thanks Cary!
2003-10-09 03:02:46 +00:00
marcel
29227cc496 This commit was generated by cvs2svn to compensate for changes in r120925,
which included commits to RCS files with non-trunk default branches.
2003-10-09 03:02:46 +00:00
sam
5c5eacb028 Add symmetric crypto support for the 7955 and 7956.
Note performance is currently suboptimal.

Submitted by:	Rajesh Vaidyanath <RVaidyanath@hifn.com>
2003-10-08 20:25:47 +00:00
marcel
e54e3cef6f Include <sys/smp.h> for the prototype of smp_rendezvous(). 2003-10-08 19:55:45 +00:00
ume
cb2c1545ab - fix typo in comments.
- style.
- NULL is not 0.
- some variables were renamed.
- nuke unused logic.
(there is no functional change.)

Obtained from:	KAME
2003-10-08 18:26:08 +00:00
gallatin
8f2de8390a make kernel_sysctl()'s args match its prototype in order to fix the
alpha build
2003-10-08 18:05:59 +00:00
thomas
9a1f9ceacc (dacleanup, dasysctlinit): Defend against calling sysctl_ctx_free on
an uninitialized sysctl_ctx, using flag DA_FLAG_SCTX_INIT. This
 prevents a panic encoutered with some umass units that probe correctly
 but fail to attach. Same problem, and same fix, as scsi_cd.c rev. 1.86.

Reviewed by:	njl, ken
2003-10-08 07:12:30 +00:00
alc
352d9382c0 Lock the destination object in vm_fault_copy_entry(). 2003-10-08 07:11:19 +00:00
alc
76f6c3b059 Retire vm_page_copy(). Its reason for being ended when peter@ modified
pmap_copy_page() et al. to accept a vm_page_t rather than a physical
address.  Also, this change will facilitate locking access to the vm page's
valid field.
2003-10-08 05:35:12 +00:00
imp
b86aaed485 Xircom Wireless Ethernet card is a rebadged Cisco 340, but with a
different vendor id/product id.

Submitted by: Keith Davis
2003-10-08 01:20:00 +00:00
imp
d16e8d20c6 sync to 1.73 2003-10-08 01:16:07 +00:00
imp
1dcd696163 Xircom Wireless ethernet
Submitted by: Keith Davis
2003-10-08 01:15:41 +00:00
sam
5506d3b8f4 must lock route when the caller provided a route but not
an interface; otherwise the subsequent unlock blows up

Suffered by:	Marcel Moolenaar <marcel@xcllnt.net>
Supported by:	FreeBSD Foundation
2003-10-07 20:57:35 +00:00
ume
2a03d283e4 indent 2003-10-07 20:22:01 +00:00
ume
90f2ffba9c style and indent. no functional change.
Obtained from:	KAME
2003-10-07 19:51:22 +00:00
ume
399a4e7221 - fix typo in comment.
- style.

Obtained from:	KAME
2003-10-07 17:46:18 +00:00
ume
54458dd4e1 nuke unused CTL_IPV6PROTO_NAMES macro. 2003-10-07 17:42:31 +00:00
sam
2935dbc1b0 insure local variable is initialized prior to use 2003-10-07 16:56:35 +00:00
ume
b8a944acb5 nuke unused ICMPV6CTL_NAMES and KEYCTL_NAMES macros. 2003-10-07 15:14:33 +00:00
ume
9ce959a79e return(code) -> return (code)
Obtained from:	KAME
2003-10-07 15:02:29 +00:00
thomas
5490709ba1 (cdcleanup): Defend against calling sysctl_ctx_free before the sysctl_ctx
has been initialized.
(cdsysctlinit): Set flag CD_FLAG_SCTX_INIT after sysctl_ctx has been
 initialized.

This resolves a panic encountered when a cd drive is sucessfully probed
but fails to attach.

Reviewed by:	ken
2003-10-07 14:46:59 +00:00
sos
93a92c1266 Give more correct params to busdma_* 2003-10-07 13:48:55 +00:00
sos
5efe096026 Improve timeout handling and reporting. 2003-10-07 13:47:40 +00:00
sos
d6450d69ba Properly get out of transaction() if setting up the transfer fails. 2003-10-07 13:45:56 +00:00
sos
b36254292b In case we loose a device during reset in reinit() finish off
the request with error instead of loosing it.
2003-10-07 13:44:15 +00:00