Commit Graph

60366 Commits

Author SHA1 Message Date
emax
06408c929f - Catch up with ongoing rwatson's socket work;
- Fix a couple of LORs and panics;

- Temporarily remove the code that tries to cleanup sockets that stuck
  on accepting queues (both complete and incomplete). I'm taking an ostrich
  approach here until I find a better way to deal with sockets that were
  disconnected before accepting (i.e. while socket was on complete or
  incomplete accept queue).
2006-08-25 17:53:13 +00:00
pjd
a2a865527b Fix comment. 2006-08-25 15:13:49 +00:00
cognet
53e0a06a26 Explicitely set the "allocbuffer" field to NULL when creating a new dmamap. 2006-08-25 15:10:45 +00:00
cognet
3748f87bf1 Do not create dma maps with bus_dmamap_create, as we call
bus_dmamem_alloc later which will overwrite the value, leading to a small
memory leak.
2006-08-25 13:38:42 +00:00
netchild
fedc5604a0 Emulate what vfork does instead of using it in linux_vfork. This way
we can do the stuff we need to do with linux processes at fork and
don't panic the kernel at exit of the child.

Submitted by:	rdivacky
Tested with:	tst-vfork* (glibc regression tests)
Tested by:	netchild
2006-08-25 11:59:56 +00:00
rwatson
cd0b41ad37 Don't call suser_cred() directly from linux_sethostname(), as it just
wraps userland_sysctl(), which performs necessary privilege checks as
part of its normal operation.

MFC after:	1 week
2006-08-25 11:02:42 +00:00
davidxu
fa0e6a0558 Same as previous change, the user provided priority should be reversed
too.
2006-08-25 10:05:30 +00:00
sos
632c97e1f1 Properly initialize and destroy the RAID lock.
Also dont mess with RAID's thats not attached yet and avoid panic.
2006-08-25 09:33:56 +00:00
thompsa
e1f848cfb4 Fix spelling. 2006-08-25 08:25:35 +00:00
rwatson
31d250192d Remove $P4$ from this file; other then temporarily P4-local work in
progress the kernel audit code in CVS is considered authoritative.
This will ease $P4$-related merging issues during the CVS loopback.

Obtained from:	TrustedBSD Project
2006-08-25 07:30:23 +00:00
davidxu
e2f7e9cc95 Initialize kg_base_user_pri. 2006-08-25 06:29:16 +00:00
davidxu
8e3f035b3f Add user priority loaning code to support priority propagation for
1:1 threading's POSIX priority mutexes, the code is no-op unless
priority-aware umtx code is committed.
2006-08-25 06:12:53 +00:00
alc
d108c1d6d1 The return value from vm_pageq_add_new_page() is not used. Eliminate it. 2006-08-25 04:36:19 +00:00
davidxu
dd7f1d7e06 Add member kg_base_user_pri and flag TDF_UBORROWING, they will be used
to support userland priority propagation for 1:1 threading.
2006-08-25 03:15:27 +00:00
grehan
9053cfbe6a Remove file that snuck in accidentally in Marcel's gdb commit. 2006-08-25 00:21:48 +00:00
cognet
d4600e67df Finally bring it support for the i80219 XScale processor.
Submitted by:	Max M. Boyarov <m.boyarov bsd by>
2006-08-24 23:51:28 +00:00
cognet
ccd457af25 Use ELFDATA2MSB if we're building big endian.
Noticed by:	Oleksandr Tymoshenko <gonzo freebsd org>
2006-08-24 23:00:03 +00:00
marius
5e65c8cd9e Remove the DPMS code in creator_blank_display(), as it causes some
LCDs to blink in the V_DISPLAY_ON case, at least in combination with
some 13W3-VGA-adaptors (what's exactly going on is unclear though,
as it happens when all of H-sync, V-sync and video output are enabled
and not touching the sync bits from the preset fixes it). Thus
creator_blank_display() now is reduced to turning the video output
on/off.
Although that DPMS code did what the XFree86/Xorg sunffb(4x) does,
it was questionable in the first place, as both implementations
also turn(ed) off the video output on standby and suspend, thus most
likely causing the monitor to turn off instead of entering standby
or suspend as intended (at least my monitors don't).

Reported and tested by:	Patrick Reich
MFC after:		3 days
2006-08-24 22:00:24 +00:00
marcel
3aec95aaac Add skeletal support for GDB. In particular gdb_cpu_getreg() needs
implementing to make GDB support usable.
2006-08-24 21:52:11 +00:00
rik
4e1573f953 Fix typo in a comment: DEFINE_CLASSx => DEFINE_CLASS_x.
MFC after: 1 week
2006-08-24 21:09:39 +00:00
ru
e574350b77 Fix another fallout from the IF_LLADDR() type change.
Spotted by:	mwlucas
2006-08-24 19:50:00 +00:00
marius
604b84193c Fix a bug introduced with rev. 1.204; in vfs_donmount() use
copyout(9) instead of copystr(9) for copying the errmsg from
kernel- to user-space. This fixes a panic on sparc64 when
using the nmount(2)-converted mountd(8).
While at it, use bcopy(3) instead of strncpy(3) in the kernel-
to kernel-space case for consistency with vfs_buildopts() and
between kernel- to user-space and kernel- to kernel-space case.
2006-08-24 18:52:28 +00:00
rwatson
1e4f4abfce Add kqueue support to audit pipe pseudo-devices.
Obtained from:	TrustedBSD Project
2006-08-24 17:42:38 +00:00
emax
2b65f3157a Define mtu as u_int16_t not as int. This should fix problem with rfcomm
on sparc64.

Reported by:	Andrew Belashov <bel at orel dot ru>
Tested by:	Andrew Belashov <bel at orel dot ru>
MFC after:	3 days
2006-08-24 16:51:02 +00:00
oleg
6a84fb6ac0 Properly lock ifmedia callbacks. This should prevent concurrent access to PHY.
Following issues should be resolved:
- random watchdog timeouts (caused by concurrent phy access)
- some link state issues
- non working TX if media type was set explicitly

PR:		kern/98738
Approved by:	glebius (mentor)
MFC after:	2 weeks
2006-08-24 14:41:16 +00:00
ru
26a1c37cb3 Spellcheck. 2006-08-24 08:00:02 +00:00
cperciva
dba2c26a5e Correct buffer overflow in the handling of LCP options in ppp(4)
Security:	FreeBSD-SA-06:18.ppp
2006-08-23 22:06:08 +00:00
glebius
ae7c9ee9d8 Pack several boolean fields into single bge_flags field. 2006-08-23 15:37:07 +00:00
glebius
266d19dde4 Pack several boolean fields into single bge_flags field. 2006-08-23 11:32:54 +00:00
davidxu
97c67e6558 POSIX requires that higher numerical values for the priority represent
higher priorities, so we should reverse the passed value here.
2006-08-23 07:22:25 +00:00
marcel
6723c51456 Fix misalignment bugs caused by invalid type casts of pointers
returned by md_reserve(). Space reserved by mb_reserve() is
byte aligned and need to be used in conjunction with le16enc()
and le32enc().

Tested on: ia64
2006-08-22 03:05:51 +00:00
yongari
f39fbdd705 It seems that em(4) misses Tx completion interrupts under certain
conditions. The cause of missing Tx completion interrupts comes from
Tx interrupt moderation mechanism(delayed interrupts) or chipset bug.
If Tx interrupt moderation mechanism is the cause of false watchdog
timeout error we should have to fix all device drivers that have Tx
interrupt moderation capability. We may need more investigation
for this issue. Anyway, the fix is the same for both cases.

This should fix occasional watchdog timeout errors seen on a few
systems.

Reported by:	-net, Patrick M. Hausen < hausen AT punkt DOT de >
Tested by:	Patrick M. Hausen < hausen AT punkt DOT de >
2006-08-22 02:32:48 +00:00
jkim
51974d427a Use aperture base address from north bridge. Some BIOS does not encode
misc. control registers correctly and it is inconsistent with north bridge.
In fact, there are too many broken BIOS implementations out there and we
cannot fix every possible combination but at least it is consistent with
what we advertise with ioctl(2).
2006-08-21 19:10:58 +00:00
imp
9d0be9dfae Minor style(9) treatment to make things a little more consistant
within iicbus code.
2006-08-21 17:32:50 +00:00
kib
6b3e182531 While checking for update of snapshot file in the ffs_copyonwrite,
first filter out metadata update. Otherwise, devfs vnode could be
erronously interpreted as ufs one, causing further check of i_flags
to use random memory.

PR:	kern/100365
Debugged and fix described by:	tegge
Approved by:	pjd (mentor)
MFC after:	2 weeks
2006-08-21 17:20:19 +00:00
ken
c31cf4b015 Implement 'camcontrol reportluns'. This allows users to send the SCSI
REPORT LUNS command to a device.

camcontrol.[c8]:	Implement reportluns.  This tries to print the LUNs
			out in a reasonable format.  Only the periph
			addressing method has been tested, since very little
			hardware that I know of supports the other methods.

scsi_all.[ch]:		Revamp the report luns CDB structure and helper
			functions.  This constitutes a little bit of an API
			change, but since the old CDB length was 10 bytes,
			and the REPORT LUNS CDB length is actually 12 bytes,
			it's clear that no one was using this API in the
			first place.

MFC After:	1 week
2006-08-21 13:24:50 +00:00
alc
fe4d04c555 Add _vm_stats and _vm_stats_misc to the sysctl declarations in sysctl.h and
eliminate their declarations from various source files.
2006-08-21 06:27:28 +00:00
alc
24209e2264 vm_page_zero_idle()'s return value serves no purpose. Eliminate it. 2006-08-21 00:55:05 +00:00
mjacob
40cc07237d Fix RELENG_4 code version- isp_roles wasn't getting initialized so
it ended up defaulting to ISP_ROLE_NONE. My testing hadn't caught it
because I was deliberatly setting role via ioctl.

Thanks to user Toni for lending me an alpha to test this on.

MFC after:	0 days
2006-08-21 00:46:10 +00:00
alc
ce3ad47700 Page flags are reset on (re)allocation. There is no need to clear any
flags except for PG_ZERO in vm_page_free_toq().
2006-08-21 00:34:31 +00:00
netchild
b6f1fc8049 Sync the MI parts for amd64 with i386 and remove the corresponding special
handling for amd64 in the common code. The MD parts for amd64 are still
outstanding, but at least this fixes some panics on amd64.

Sponsored by:	Google SoC 2006
Submitted by:	rdivacky
Tested by:	bsam
2006-08-20 13:50:27 +00:00
pjd
b61dcb226b Correct typo in comment. 2006-08-20 10:52:44 +00:00
cperciva
4ec3e871a6 Fix a signedness bug.
MFC after:	3 days
Security:	Local DoS
2006-08-20 10:29:08 +00:00
ru
22b7409ade Make the default "init_path" value breakable, so it fits on the
screen's width, thus eliminating a groff(1) warning.

Suggested by:	marck
2006-08-20 09:31:17 +00:00
netchild
81450589e7 Get rid of some nested includes.
Sponsored by:	Google SoC 2006
Submitted by:	rdivacky
Noticed by:	jhb
2006-08-19 15:13:01 +00:00
ssouhlal
57842c97d3 MALLOC -> malloc and FREE -> free
Submitted by:	rdivacky
Pointed out by:	jhb
2006-08-19 11:54:19 +00:00
ssouhlal
87d8084ec5 ifdef DEBUG a printf
Submitted by:	rdivacky
2006-08-19 11:07:22 +00:00
julian
2e81f075ec comply with style police
Submitted by:	ru
MFC after:	1 month
2006-08-18 22:36:05 +00:00
imp
1eee061e71 Copy powerpc ficl files sysdep files (maybe we need a common one) 2006-08-18 21:41:43 +00:00
imp
b93cd97574 Build at91 2006-08-18 21:37:27 +00:00
imp
98835e6c84 Support compiling as part of world 2006-08-18 20:26:54 +00:00
ru
5e69f4fca8 Add more nForce4 SMBus 2.0 PCI IDs. 2006-08-18 19:56:40 +00:00
brueffer
5642c992cd Wordsmithing on the ixgb(4) and mxge(4) descriptions.
Suggested by:	ru (ixgb)
2006-08-18 19:03:28 +00:00
brueffer
ff9270e136 Add more modules, correct alphabetical order. 2006-08-18 17:48:17 +00:00
netchild
97604df17b Add the new linux files to pc98 too. 2006-08-18 15:46:38 +00:00
gnn
b22d0cad1e Fix a kernel panic based on receiving an ICMPv6 Packet too Big message.
PR:		99779
Submitted by:	Jinmei Tatuya
Reviewed by:	clement, rwatson
MFC after:	1 week
2006-08-18 14:05:13 +00:00
glebius
04965532cb bge_cksum_pad() can modify the mbuf, thus call it before bus_dmamap_load().
Submitted by:	yongari
2006-08-18 13:53:53 +00:00
brueffer
b41a7b9de8 Follow the lead of mxgb(4) and build the module for ixgb(4).
Originally it wasn't enabled since the hardware wasn't commonplace,
but as 10GE hardware is becoming more widely used, building the module
by default should be beneficial.

Approved by:	rwatson (mentor)
MFC after:	2 weeks
2006-08-18 10:20:15 +00:00
marck
0d5e6d6efe kern.ipc.nmbclusters is sysctl, not compile-time option. Change Dv to Va.
Touch .Dd.

Pointed out by:	ru
MFC after:	1 week
2006-08-18 10:15:01 +00:00
sos
cc4fa44dc4 Update JMicron support to also work with chips where the PATA and SATA
parts are on individual PCI functions.

HW donated by: JMicron
2006-08-18 09:56:12 +00:00
marck
908b7097ec Remove references to NMBCLUSTERS which is obsoleted.
PR:		100427
Approved by:	maxim
MFC after:	1 week
2006-08-18 08:03:06 +00:00
imp
d22da695ac Appened ull to a really large integer constant to fix build on i386 2006-08-18 00:01:29 +00:00
imp
db85f415fa while (0); -> while (0) in multi-line macros 2006-08-17 22:50:33 +00:00
julian
ff9e317817 Allow ipfw to forward to a destination that is specified by a table.
for example:
  fwd tablearg ip from any to table(1)
where table 1 has entries of the form:
1.1.1.0/24 10.2.3.4
208.23.2.0/24 router2

This allows trivial implementation of a secondary routing table implemented
in the firewall layer.

I expect more work (under discussion with Glebius) to follow this to clean
up some of the messy parts of ipfw related to tables.

Reviewed by:	Glebius
MFC after:	1 month
2006-08-17 22:49:50 +00:00
imp
59cd950be1 Don't put a ; after while (0)
Submitted by:	jmg
2006-08-17 22:42:56 +00:00
netchild
b294020942 - disable some more code when osrelease=2.4.2
- protect td->td_proc->p_pid with the proc lock in linux_getpid
  in the amd64 (= non i386) case [1]

Sponsored by:	Google SoC 2006
Submitted by:	rdivacky
Noticed by:	netchild [1]
2006-08-17 21:21:30 +00:00
netchild
5d552cdc47 Move some stuff into headers where they belong.
Sponsored by:	Google SoC 2006
Submitted by:	rdivacky
Noticed by:	jhb, ssouhlal
2006-08-17 21:06:48 +00:00
thompsa
6d9882d3c0 Remove unneeded asserts from bridge_ioctl_* since these are just
extensions of bridge_ioctl() which has the correct locking.
2006-08-17 11:16:02 +00:00
thompsa
b9c49f769b Remove two lock asserts that are unneeded due to subsequent unlocks. 2006-08-17 10:52:36 +00:00
thompsa
92c17ec7e1 Call bridge_span before dropping the lock.
MFC after:	5 days
2006-08-17 10:18:31 +00:00
netchild
2e4762bd3c Initialize the emul sx-lock.
Sponsored by:	Google SoC 2006
Submitted by:	rdivacky
2006-08-17 10:04:49 +00:00
glebius
be3d72f383 Rewrite bge_encap() so that it takes mbuf ** argument. In this case if
m_defrag(9) changes pointer we can show this to our caller.

Reviewed by:	yongari
2006-08-17 09:53:04 +00:00
netchild
a6834221aa Fix the DEBUG build:
- linux_emul.c [1]
 - linux_futex.c [2]

Sponsored by:	Google SoC 2006	[1]
Submitted by:	rdivacky	[1]
		netchild	[2]
2006-08-17 09:50:30 +00:00
julian
4fb1f1e202 Remove the IPFIREWALL_FORWARD_EXTENDED option and make it on by default as it always was
in older versions of FreeBSD. This option is pointless as it is needed in just
about every interesting usage of forward that I have ever seen. It doesn't make
the system any safer and just wastes huge amounts of develper time
when the system doesn't behave as expected when code is moved from
4.x to 6.x It doesn't make
the system any safer and just wastes huge amounts of develper time
when the system doesn't behave as expected when code is moved from
4.x to 6.x  or 7.x
Reviewed by:	glebius
MFC after:	1 week
2006-08-17 00:37:03 +00:00
imp
b3160d204f MFp4: changes since .s -> .S rename. Use correct header for size 2006-08-17 00:14:32 +00:00
yongari
f9cac16ace Don't update Rx descriptor status in two different functions.
Suggested by:	pdeuskar
Reviewed by:	pdeuskar
2006-08-16 23:55:34 +00:00
thomas
2f330cd31b Fix typos in comment. 2006-08-16 23:53:05 +00:00
imp
8fc3a4c4bb MFp4: First cut at making spi and/or sd card booting work, needs work 2006-08-16 23:39:58 +00:00
imp
06f9bdf49a MFp4:
Tidy up a bit.  Make sure that the burned image matches the downloaded
one.
2006-08-16 23:18:07 +00:00
imp
25ea85244a MFp4:
Simplify life a little for such a simple program.
2006-08-16 23:14:52 +00:00
peter
b34fae62b6 Grab two syscall numbers. One is used to emulate functionality that linux
has in its procfs (do a readlink of /proc/self/fd/<nn> to find the pathname
that corresponds to a given file descriptor).  Valgrind-3.x needs this
functionality.  This is a placeholder only at this time.
2006-08-16 22:32:50 +00:00
davidxu
0a118880c8 Change xorq back to xorl.
Noticed by: bde
2006-08-16 22:22:28 +00:00
netchild
39fd1c6d47 Style fixes to comments.
Sponsored by:	Google SoC 2006
Submitted by:	rdivacky
Noticed by:	jhb, ssouhlal
2006-08-16 18:54:51 +00:00
guido
fcfb8e5749 Resolve conflicts
MFC after:	2 weeks
2006-08-16 12:06:35 +00:00
guido
3a39cf5435 This commit was generated by cvs2svn to compensate for changes in r161351,
which included commits to RCS files with non-trunk default branches.
2006-08-16 11:51:32 +00:00
guido
83043906d8 Import IP Filter 4.1.13 2006-08-16 11:51:32 +00:00
maxim
9815f6ee6f o Re-word a comment.
PR:		kern/102127
Submitted by:	Eric Anderson
2006-08-16 09:34:56 +00:00
cperciva
9525a1c43e Swap the names "sem_exithook" and "sem_exechook" in the previous commit to
match up with reality and the prototype definitions.

Register the sem_exechook as the "process_exec" event handler, not
sem_exithook.

Submitted by:	rdivacky
Sponsored by:	SoC 2006
2006-08-16 08:25:40 +00:00
jkim
0e16635a6c Include sys/limits.h for INT_MAX. freebsd32_proto.h 1.58 does not include
sys/umtx.h any more and previously it was included from there.
2006-08-16 00:02:36 +00:00
davidxu
176043d4d4 Backout revision 1.117, xorl and xorq have same result, but xorq needs
longer decoding.
2006-08-15 22:43:02 +00:00
pav
e678605a6e - Fix typo in #error pragma: compitable -> compatible
Submitted by:	neologism
2006-08-15 20:10:49 +00:00
jhb
4e96206d8a Add a new 'show sleepchain' ddb command similar to 'show lockchain' except
that it operates on lockmgr and sx locks.  This can be useful for tracking
down vnode deadlocks in VFS for example.  Note that this command is a bit
more fragile than 'show lockchain' as we have to poke around at the
wait channel of a thread to see if it points to either a struct lock or
a condition variable inside of a struct sx.  If td_wchan points to
something unmapped, then this command will terminate early due to a fault,
but no harm will be done.
2006-08-15 18:29:01 +00:00
jhb
e092be0121 - When spinning on a spin lock, if the debugger is active or we are in a
panic, go ahead and do the longer DELAY(1) spin wait.
- If we panic due to spinning too long, print out a few more details
  including the pointer to the mutex in question and the tid of the owning
  thread.
2006-08-15 18:26:12 +00:00
imp
95a426fdc6 add comment about why we include opt_global.h 2006-08-15 18:11:25 +00:00
jhb
ae769794c6 Use SYS_AUE_<syscallname> to include the appropriate audit event identifier
for syscalls in kld's, even when compiled into the kernel statically.
Note that since this hardcodes the SYS_ prefix SYSCALL_MODULE_HELPER() now
only works for native ABI system calls.  Those are the only ones that
used the macro anyway, and I chose to not require a second argument to the
macro to specify the prefix or audit event directly.
2006-08-15 17:42:14 +00:00
jhb
d900df3c77 Regen to propogate <prefix>_AUE_<mumble> changes as well as the earlier
systrace changes.
2006-08-15 17:37:01 +00:00
yar
3c3b52079d This XXX remark was rendered false by rev. 103, which made the
VLAN_ARRAY case subject to rw locking, too.
2006-08-15 17:29:52 +00:00
jhb
61e1e0725a - Remove unused sysvec variables from various syscalls.conf.
- Send the systrace_args files for all the compat ABIs to /dev/null for
  now.  Right now makesyscalls.sh generates a file with a hardcoded
  function name, so it wouldn't work for any of the ABIs anyway.  Probably
  the function name should be configurable via a 'systracename' variable
  and the functions should be stored in a function pointer in the sysvec
  structure.
2006-08-15 17:25:55 +00:00
jhb
3cbb1cf256 Add a new set of macros <prefix>_AUE_<syscallname> to sysproto.h that
map to the audit event associated with a specific system call.  For
example, SYS_AUE___semctl would be set to AUE_SEMCTL in sys/sysproto.h.
2006-08-15 17:09:32 +00:00
yar
a620e8e32b Make it a tad easier to base other encapsulation schemes on this driver
by restoring the ifv_proto field in the vlan softc and putting it to use
this time.  It's a good companion for ifv_encaplen, which has already been
used throughout this driver.
2006-08-15 16:56:43 +00:00