Commit Graph

126743 Commits

Author SHA1 Message Date
Søren Schmidt
d5bddfcbfc Format mask lacks one bit.
Reported by:	jkim
2006-09-12 20:37:22 +00:00
David E. O'Brien
e9231ad68b Style sync. 2006-09-12 19:24:01 +00:00
Warner Losh
b4583894aa Put the osta.c license on osta.h. The license is the same.
Approved by: scottl@
2006-09-12 19:02:34 +00:00
Philippe Charnier
9833aeada2 Add FBSDID, rename local variable time to not conflict with time() 2006-09-12 17:54:35 +00:00
Warner Losh
32494417a8 Bump date, per ru@ 2006-09-12 15:48:22 +00:00
John Baldwin
9d042fe7aa Trim some unneeded includes. 2006-09-12 15:01:19 +00:00
Alexander Botero-Lowry
4f9019bb29 Add my birthday to the calendar, sadly I am only the fifth youngest.
Approved by:	novel
2006-09-12 09:05:00 +00:00
David E. O'Brien
eaa35077b4 Move to more global Makefile.tgt vs. having to define in the leaves. 2006-09-12 07:37:44 +00:00
David E. O'Brien
8d60fe4054 Default to big endian ARM if "TARGET_BIG_ENDIAN" is defined, and set an ARM
target default.
2006-09-12 07:37:02 +00:00
David E. O'Brien
124866d539 Default to big endian ARM if "TARGET_BIG_ENDIAN" is defined (& targeting ARM). 2006-09-12 07:09:45 +00:00
David E. O'Brien
6b31c6b17f Craft the FreeBSD/ARM ABI by hacking the New ARM ABI source.
Submitted by:	cognet
2006-09-12 07:03:58 +00:00
David E. O'Brien
da07c79f6a Default vector to big endian ARM if "TARGET_BIG_ENDIAN" is defined. 2006-09-12 07:02:15 +00:00
David E. O'Brien
25024d95e9 Build 'ld' supporting a big endian ARM if "TARGET_BIG_ENDIAN" is defined. 2006-09-12 06:59:39 +00:00
David E. O'Brien
fc2717a0d2 Configure for for big endian if TARGET_BYTES_BIG_ENDIAN is defined. 2006-09-12 06:39:27 +00:00
Philippe Charnier
b2eeeae049 WARNS=6 chocked on unitialized variable. 2006-09-12 05:08:36 +00:00
Christian S.J. Peron
d94f2a68f8 Introduce a new entry point, mac_create_mbuf_from_firewall. This entry point
exists to allow the mandatory access control policy to properly initialize
mbufs generated by the firewall. An example where this might happen is keep
alive packets, or ICMP error packets in response to other packets.

This takes care of kernel panics associated with un-initialize mbuf labels
when the firewall generates packets.

[1] I modified this patch from it's original version, the initial patch
    introduced a number of entry points which were programmatically
    equivalent. So I introduced only one. Instead, we should leverage
    mac_create_mbuf_netlayer() which is used for similar situations,
    an example being icmp_error()

    This will minimize the impact associated with the MFC

Submitted by:	mlaier [1]
MFC after:	1 week

This is a RELENG_6 candidate
2006-09-12 04:25:13 +00:00
John Baldwin
3bb00f61a2 - Revert making bus_generic_add_child() the default for BUS_ADD_CHILD().
Instead, we want busses to explicitly specify an add_child routine if they
  want to support identify routines, but by default disallow having outside
  drivers add devices.
- Give smbus(4) an explicit bus_add_child() method.

Requested by:	imp
2006-09-11 22:20:37 +00:00
Warner Losh
788de9d472 Add note about identify routines needing to use BUS_ADD_CHILD rather
than device_add_child.  The latter is only for busses adding children,
not children drivers telling a bus that they have an instance...
2006-09-11 22:17:18 +00:00
Prafulla Deuskar
a21ff306d8 Fix issues found by Coverity (223392, 223393) due to TSO additions
Submitted by:	Matthew Jacob
2006-09-11 20:59:01 +00:00
John Baldwin
7048a99c30 Minor overhaul of SMBus support:
- Change smbus_callback() to pass a void * rather than caddr_t.
- Change smbus_bread() to pass a pointer to the count and have it be an
  in/out parameter.  The input is the size of the buffer (same as before),
  but on return it will contain the actual amount of data read back from
  the bus.  Note that this value may be larger than the input value.  It
  is up to the caller to treat this as an error if desired.
- Change the SMB_BREAD ioctl to write out the updated struct smbcmd which
  will contain the actual number of bytes read in the 'count' field.  To
  preserve the previous ABI, the old ioctl value is mapped to SMB_OLD_BREAD
  which doesn't copy the updated smbcmd back out to userland.  I doubt anyone
  actually used the old BREAD anyway as it was rediculous to do a bulk-read
  but not tell the using program how much data was actually read.
- Make the smbus driver and devclass public in the smbus module and
  push all the DRIVER_MODULE()'s for attaching the smbus driver to
  various foosmb drivers out into the foosmb modules.  This makes all
  the foosmb logic centralized and allows new foosmb modules to be
  self-contained w/o having to hack smbus.c everytime a new smbus driver
  is added.
- Add a new SMB_EINVAL error bit and use it in place of EINVAL to return
  an error for bad arguments (such as invalid counts for bread and bwrite).
- Map SMB bus error bits to EIO in smbus_error().
- Make the smbus driver call bus_generic_probe() and require child drivers
  such as smb(4) to create device_t's via identify routines.  Previously,
  smbus just created one anonymous device during attach, and if you had
  multiple drivers that could attach it was just random chance as to which
  driver got to probe for the sole device_t first.
- Add a mutex to the smbus(4) softc and use it in place of dummy splhigh()
  to protect the 'owner' field and perform necessary synchronization for
  smbus_request_bus() and smbus_release_bus().
- Change the bread() and bwrite() methods of alpm(4), amdpm(4), and
  viapm(4) to only perform a single transaction and not try to use a
  loop of multiple transactions for a large request.  The framing and
  commands to use for a large transaction depend on the upper-layer
  protocol (such as SSIF for IPMI over SMBus) from what I can tell, and the
  smb(4) driver never allowed bulk read/writes of more than 32-bytes
  anyway.  The other smb drivers only performed single transactions.
- Fix buffer overflows in the bread() methods of ichsmb(4), alpm(4),
  amdpm(4), amdsmb(4), intpm(4), and nfsmb(4).
- Use SMB_xxx errors in viapm(4).
- Destroy ichsmb(4)'s mutex after bus_generic_detach() to avoid problems
  from child devices making smb upcalls that would use the mutex during
  their detach methods.

MFC after:	1 week
Reviewed by:	jmg (mostly)
2006-09-11 20:52:41 +00:00
John Baldwin
884ff1813f Add a new ddb command 'show lapic' to dump details about the local APIC
registers for the current CPU.

MFC after:	3 days
2006-09-11 20:12:42 +00:00
John Baldwin
5c15c7e71d Actually hook up the IPI_INVLCACHE IDT vectors backing
pmap_invalidate_cache() in the SMP case so pmap_mapdev() in multiuser
doesn't panic with a trap 30.  I broke this many months ago when I
added pmap_invalidate_cache() as early parts of the PAT work.

Patience from:	jmg
Pointy hat:	jhb
2006-09-11 20:10:42 +00:00
Andre Oppermann
384a05bfd0 Fix a NULL pointer dereference of ro->ro_rt->rt_flags by checking for the
validity of ro->ro_rt first.  This prevents crashing on any non-normally
routed IP packet.

Coverity CID:	162 (incorrectly, it was re-introduced by previous commit)
2006-09-11 19:56:10 +00:00
Søren Schmidt
594e3d5d6f Add support for a few more Serverworks and lookalikes chips. 2006-09-11 19:48:30 +00:00
Søren Schmidt
92dc84876a Update to fit latest USB cleanup crusade. 2006-09-11 19:47:53 +00:00
John Baldwin
bd4b6eb964 Add prototype for bus_generic_add_child() missed in previous commit. 2006-09-11 19:42:27 +00:00
John Baldwin
4288462f38 Add a default method for BUS_ADD_CHILD() that just calls
device_add_child_ordered().  Previously, a device driver that wanted to
add a new child device in its identify routine had to know if the parent
driver had a custom bus_add_child method and use BUS_ADD_CHILD() in that
case, otherwise use device_add_child().  Getting it wrong in either
direction would result in panics or failure to add the child device.  Now,
BUS_ADD_CHILD() always works isolating child drivers from having to know
intimate details about the parent driver.

Discussed with:	imp
MFC after:	1 week
2006-09-11 19:41:31 +00:00
Simon L. B. Nielsen
5c24178d8e Add myself as OpenSSL janitor/maintainer. 2006-09-11 19:39:46 +00:00
John Baldwin
0bba6acf85 Give the ACPI I/O rman's unique description strings to make 'devinfo -u'
output less confusing.

MFC after:	3 days
2006-09-11 19:32:54 +00:00
John Baldwin
9914a8cc7d - Fix rman_manage_region() to be a lot more intelligent. It now checks
for overlaps, but more importantly, it collapses adjacent free regions.
  This is needed to cope with BIOSen that split up ports for system devices
  (like IPMI controllers) across multiple system resource entries.
- Now that rman_manage_region() is not so dumb, remove extra logic in the
  x86 nexus drivers to populate the IRQ rman that manually coalesced the
  regions.

MFC after:	1 week
2006-09-11 19:31:52 +00:00
Søren Schmidt
a4ed04c719 CF devices are ATA not ATAPI. 2006-09-11 18:33:59 +00:00
David E. O'Brien
78b00795ef Define build 'as' TARGET_BYTES_BIG_ENDIAN if "TARGET_BIG_ENDIAN" is defined.
This is needed for bi-sex architectures.
2006-09-11 18:07:09 +00:00
Matt Jacob
9fdecced07 null commit to provide commit message to previous
at the request of Sam Leffler: The previous commit
established min and maxtags for VMware pseudo disks
to fix a submitted PR.
2006-09-11 17:57:23 +00:00
Matt Jacob
df4b14f436 PR: 103130
Submitted by:	Shusuke Shinomiya
MFC after:	1 day
2006-09-11 17:34:28 +00:00
Ruslan Ermilov
e567b213c5 Regen. 2006-09-11 13:56:28 +00:00
Ruslan Ermilov
aa5bab2179 Document the new know, WITHOUT_ASSERT_DEBUG. 2006-09-11 13:55:27 +00:00
Ruslan Ermilov
c1e29f712e - Utilize the "showconfig" top-level target.
- Pass __MAKE_CONF=/dev/null to get a pristine output.
2006-09-11 13:39:44 +00:00
Ruslan Ermilov
95dc12e160 Make it possible again to build -CURRENT snapshots on -STABLE.
Reported by:	Angelo Turetta
2006-09-11 13:15:09 +00:00
David E. O'Brien
3e232000c0 Add support for MCP61 and MCP65 adaptors.
Submitted by:	Peer Chen at nVIDIA
2006-09-11 07:31:55 +00:00
Scott Long
88591e04af The run_filter() procedure is a means of working around DMA engine bugs in
old/broken hardware.  Unfortunately, it adds cache pressure and possible
mispredicted branches to the fast path of the bus_dmamap_load collection of
functions.  Since it's meant for slow path exception processing, de-inline
it and allow its conditions to be pre-computed at tag_create time and thus
short-circuited at runtime.

While here, cut down on the size of _bus_dmamap_load_buffer() by pushing the
bounce page logic into a non-inlined function.  Again, this helps with
cache pressure and mispredicted branches.

According to the TSC, this shaves off a few cycles on average.  Unfortunately,
the data varies quite a bit due to interrupts and preemption, so it's hard to
get a good measurement.  Real world measurements of network PPS are welcomed.
A merge to amd64 and other arches is pending more testing.
2006-09-11 06:48:53 +00:00
Warner Losh
4df1f59e8f Add a knob for compiling the tree -DNDEBUG. This turns off all the
asserts and makes binaries smaller.  The binaries also become
repeatable again.  As it was, without this md5's of binaries built
with different paths differed.

# Where do I document this?
2006-09-11 05:35:57 +00:00
Warner Losh
ba15c568ab Fix three whitespace nits.
I think these are from kan@...
2006-09-11 05:12:12 +00:00
Brian Somers
cd0ac75c13 Fix a typo 2006-09-10 20:41:33 +00:00
Simon L. B. Nielsen
c800238ebb Correct incorrect PKCS#1 v1.5 padding validation in crypto(3).
Obtained from:	OpenSSL project
Security:	FreeBSD-SA-06:19.openssl
2006-09-10 20:16:43 +00:00
Prafulla Deuskar
66387cee8f Fix style(9) issues in the TSO specific changes.
Pointed out by: jmallett
2006-09-10 19:23:27 +00:00
John-Mark Gurney
3ae2ad088e make use of the host route's mtu for processing. This means we can now
support a network w/ split mtu's by assigning each host route the correct
mtu.  an aspiring programmer could write a daemon to probe hosts and find
out if they support a larger mtu.
2006-09-10 17:49:09 +00:00
Andre Oppermann
805def2e04 New sockets created by incoming connections into listen sockets should
inherit all settings and options except listen specific options.

Add the missing send/receive timeouts and low watermarks.
Remove inheritance of the field so_timeo which is unused.

Noticed by:	phk
Reviewed by:	rwatson
Sponsored by:	TCP/IP Optimization Fundraise 2005
MFC after:	3 days
2006-09-10 17:08:06 +00:00
Martin Blapp
f976eefa00 Fix locking race in ttymodem(). The locking of the proctree happens too late
and opens a small race window before tp->t_session->s_leader is accessed. In case
tp->t_session has just been set to NULL elsewhere, we get a panic().

This fix is a bandaid until someone else fixes the whole locking in the tty subsystem.
Definitly more work needs to be done.

MFC after:	1 week
Reviewed by:	mlaier
PR:		kern/103101
2006-09-10 16:51:56 +00:00
Tom Rhodes
16b392d51d Yank FreeBSD specific code out from under ifdef.
Remove compatibility ifdefs.

Reviewed/Ok'ed by:	imp
2006-09-10 15:20:39 +00:00
Alexander Leidinger
db0d964062 The Linux unlink syscall uses a different errno value when trying to unlink
a directory.

PR:		102897 [1]
Noticed by:	Knut Anders Hatlen <kahatlen@gmail.com>, testrun with LTP [1]
Submitted by:	Marcin Cieslak <saper@SYSTEM.PL>
Tested by:	netchild (LTP test run)
2006-09-10 13:47:56 +00:00