]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoRemove even more empty directories.
Ed Schouten [Sun, 26 Apr 2009 09:36:55 +0000 (09:36 +0000)]
Remove even more empty directories.

I just used `hidesvn find . -type d -empty' to figure out which
directories are empty. This means I couldn't easily figure out which
directories only contained empty subdirectories.

15 years agoRemove empty directories from the HEAD.
Ed Schouten [Sun, 26 Apr 2009 09:31:58 +0000 (09:31 +0000)]
Remove empty directories from the HEAD.

Discussed with: developers, imp

15 years agoRemove unneeded device index from unit number.
Ed Schouten [Sun, 26 Apr 2009 09:21:37 +0000 (09:21 +0000)]
Remove unneeded device index from unit number.

We only use the unit number to determine whether we should rewind the
device upon closure.

15 years agoBump copyright year;
Marc Fonvieille [Sun, 26 Apr 2009 07:16:01 +0000 (07:16 +0000)]
Bump copyright year;
Add missing colon and fix broken entity.

15 years agoIn preparation to make options VIMAGE operational, where needed,
Marko Zec [Sun, 26 Apr 2009 07:14:50 +0000 (07:14 +0000)]
In preparation to make options VIMAGE operational, where needed,
initialize / release netgraph related state in iattach() / idetach()
functions called via the vnet module registration / initialization
framework, instead of initialization / cleanups being done in
mod_event handlers.

While here, introduce a crude hack aimed at preventing ng_ether to
autoattach to ng_eiface ifnets, which are also netgraph nodes already.

Reviewed by: bz
Approved by: julian (mentor)

15 years agoUnbreak the build of relnotes.
Marc Fonvieille [Sun, 26 Apr 2009 07:12:04 +0000 (07:12 +0000)]
Unbreak the build of relnotes.

15 years agoExtend the vnet module registration / initialization framework
Marko Zec [Sun, 26 Apr 2009 07:09:39 +0000 (07:09 +0000)]
Extend the vnet module registration / initialization framework
first introduced @ r190909 with a vnet module deregistration
service.

kldunloadable modules, which are currently using vnet_mod_register()
to attach their per-vnet initialization routines to the vnet
initialization framework, should call vnet_mod_deregister() before
acknowledging MOD_UNLOAD requests in their mod_event handlers.  Such
changes to the existing code base will follow in subsequent commits.

vnet_mod_deregister() does not check whether departing vnet modules
are registered as prerequisites for another module(s), so it should
be used with care.  Currently I'm only aware of vnet modules which
are leafs on module dependency graphs that are kldunloadable.

This change also introduces per-vnet module destructor handler, which
calls vnet's module cleanup function, which (if required) has to be
registered in vnet module's vnet_modinfo_t structure .vmi_idetach
field.  Once options VIMAGE becomes operational, the framework will
take care that module's cleanup function become invoked for each
active vnet instance, and that the memory allocated for each instance
gets freed.  Currently calls to destructor handlers must always
succeed.

15 years agoExpand coverage of IF_ADDR_LOCK() in in_control() from point of initial
Robert Watson [Sat, 25 Apr 2009 23:02:57 +0000 (23:02 +0000)]
Expand coverage of IF_ADDR_LOCK() in in_control() from point of initial
lookup of 'ia' from if_addrhead through most use.  Note that we
currently have to drop it prematurely in some cases due to calls out to
the routing and interface code while using 'ia', but this closes many
races.  Annotate several potential races that persist after this change.
Move to using M_NOWAIT for allocating new interface addresses due to
lock(s) being held.

MFC after: 3 weeks

15 years agoMake the state string descriptions public.
Andrew Thompson [Sat, 25 Apr 2009 21:25:52 +0000 (21:25 +0000)]
Make the state string descriptions public.

15 years agoTrack the usb device state as its powered on, addressed and configured. This helps
Andrew Thompson [Sat, 25 Apr 2009 21:10:06 +0000 (21:10 +0000)]
Track the usb device state as its powered on, addressed and configured. This helps
to avoid touching the device when it is not going to respond and would otherwise
timeout.

Implement the suspend tracking as a udev state too.

15 years agos/it's/it is/
Marius Strobl [Sat, 25 Apr 2009 20:36:50 +0000 (20:36 +0000)]
s/it's/it is/

15 years agoSync the sparc64 hardware notes with reality, mainly regarding support
Marius Strobl [Sat, 25 Apr 2009 20:31:47 +0000 (20:31 +0000)]
Sync the sparc64 hardware notes with reality, mainly regarding support
of sun4u-machines based on USIII and beyond in 7.2-RELEASE.

Reviewed by: blackend
MFC after: 3 days

15 years agoRemove udp and tcp includes not needed here.
Bjoern A. Zeeb [Sat, 25 Apr 2009 19:14:22 +0000 (19:14 +0000)]
Remove udp and tcp includes not needed here.

Tripped over by: a compile of an upcoming change
MFC after: 1 month

15 years agoTurn MAXPTSDEVS into a sysctl tunable.
Ed Schouten [Sat, 25 Apr 2009 10:05:55 +0000 (10:05 +0000)]
Turn MAXPTSDEVS into a sysctl tunable.

This allows users to increase the maximum amount of pseudo-terminals
without changing any source code. Users must increase UT_LINESIZE before
attempting to increase kern.pts_maxdev.

15 years agoEliminate unnecessary calls to pmap_clear_modify(). Specifically, calling
Alan Cox [Sat, 25 Apr 2009 02:59:06 +0000 (02:59 +0000)]
Eliminate unnecessary calls to pmap_clear_modify().  Specifically, calling
pmap_clear_modify() on a page is pointless if that page is not mapped or
it is only mapped for read access.  Instead, assert that the page is not
mapped or not mapped for write access as appropriate.

Eliminate unnecessary clearing of a page's dirty mask.  Instead, assert
that the page's dirty mask is clear.

15 years agoRemove ghost xntpd directory.
Ed Schouten [Sat, 25 Apr 2009 00:04:36 +0000 (00:04 +0000)]
Remove ghost xntpd directory.

15 years agoIn in_purgemaddrs(), remove the inm being freed from the address list
Robert Watson [Fri, 24 Apr 2009 22:11:53 +0000 (22:11 +0000)]
In in_purgemaddrs(), remove the inm being freed from the address list
before freeing it, rather than vice version, to avoid potential use
after free.

Reviewed by: bms

15 years agoAdd Surecom EP-427X.
Warner Losh [Fri, 24 Apr 2009 17:28:12 +0000 (17:28 +0000)]
Add Surecom EP-427X.

15 years agoAnother PC Card that needs the CIS strings for the Surecom EP-427X,
Warner Losh [Fri, 24 Apr 2009 17:27:45 +0000 (17:27 +0000)]
Another PC Card that needs the CIS strings for the Surecom EP-427X,
which really is just a rebadged OEM card...  Plus a tiny whitespace
nit.

15 years agoSome minor formatting changes to make new text match old style.
Xin LI [Fri, 24 Apr 2009 15:38:13 +0000 (15:38 +0000)]
Some minor formatting changes to make new text match old style.

15 years ago- Add a single line separating two 20090415 entries
Renato Botelho [Fri, 24 Apr 2009 11:34:59 +0000 (11:34 +0000)]
- Add a single line separating two 20090415 entries

Approved by: brueffer

15 years agoAdd UPDATING note about change to struct malloc_type -- following several
Robert Watson [Fri, 24 Apr 2009 09:58:50 +0000 (09:58 +0000)]
Add UPDATING note about change to struct malloc_type -- following several
reports of panics, remind readers that rebuilding kernel modules between
kernel upgrades in HEAD is a good idea.

15 years agoRelocate permissions checking code in in_control() to before the body
Robert Watson [Fri, 24 Apr 2009 09:54:46 +0000 (09:54 +0000)]
Relocate permissions checking code in in_control() to before the body
of the implementation of ioctls.  This makes the mapping of ioctls to
specific privileges more explicit, and also simplifies the
implementation by reducing the use of FALLTHROUGH handling in switch.

While this is not intended to be a functional change, it does mean
that certain privilege checks are now performed earlier, so EPERM
might be returned in preference to EADDRNOTAVAIL for management
ioctls that could have failed for both reasons.

MFC after: 3 weeks

15 years agoZero PCB during early AIM PowerPC init.
Rafal Jaworowski [Fri, 24 Apr 2009 08:57:54 +0000 (08:57 +0000)]
Zero PCB during early AIM PowerPC init.

When memory is not zero'ed by firmware, uninitialized PCB can have bogus
contents, which appear as a saved onfault condition, Altivec context to
restore etc. and lead to corruption/crashes. This commit fixes such issues.

Submitted by: Michal Mazur arg ! semihalf dot com
Tested by: Andreas Tobler andreast-list ! fgznet dot ch

15 years agoo Correct geli(8) command line.
Maxim Konovalov [Fri, 24 Apr 2009 06:44:58 +0000 (06:44 +0000)]
o Correct geli(8) command line.

PR: docs/133961
Submitted by: Aldis Berjoza
MFC after: 1 week

15 years agoAdd suppport for ISA and ISA interrupts to make the ATA
Marcel Moolenaar [Fri, 24 Apr 2009 03:51:11 +0000 (03:51 +0000)]
Add suppport for ISA and ISA interrupts to make the ATA
controller in the VIA southbridge functional in the CDS
(Configurable Development System) for MPC85XX.
The embedded USB controllers look operational but the
interrupt steering is still wrong.

15 years agoRemove isa_irq_pending(). It's not used.
Marcel Moolenaar [Fri, 24 Apr 2009 03:43:20 +0000 (03:43 +0000)]
Remove isa_irq_pending(). It's not used.

15 years agoReimplement bs_be_rs_{1|2|4} and bs_le_rs_{1|2|4} by not
Marcel Moolenaar [Fri, 24 Apr 2009 03:06:32 +0000 (03:06 +0000)]
Reimplement bs_be_rs_{1|2|4} and bs_le_rs_{1|2|4} by not
calling the inline functions in <machine/pio.h> and do
not add synchronization. Implement bs_gen_barrier() as
eieio and sync.

15 years agoRemove PTE_FAKE and PTE_ISFAKE().
Marcel Moolenaar [Fri, 24 Apr 2009 02:55:20 +0000 (02:55 +0000)]
Remove PTE_FAKE and PTE_ISFAKE().

15 years agoRemove PTE_ISFAKE. While here remove code
Marcel Moolenaar [Fri, 24 Apr 2009 02:53:38 +0000 (02:53 +0000)]
Remove PTE_ISFAKE. While here remove code
between "#if 0" and "#endif".

15 years agoRemove spurious 'or'.
Rui Paulo [Thu, 23 Apr 2009 22:08:44 +0000 (22:08 +0000)]
Remove spurious 'or'.

15 years agoReorganize in_control() so that invariants are more obvious, and so
Robert Watson [Thu, 23 Apr 2009 21:41:37 +0000 (21:41 +0000)]
Reorganize in_control() so that invariants are more obvious, and so
that it is easier to lock:

- Handle the unsupported ioctl case at the beginning of in_control(),
  handing off to ifp->if_ioctl, rather than looking up interfaces and
  addresses unnecessarily in this case.

- Make it an invariant that ifp is always non-NULL when running
  in_control()-implemented ioctls, simplifying the code structure.

MFC after: 3 weeks

15 years agofix typo
Kip Macy [Thu, 23 Apr 2009 21:27:06 +0000 (21:27 +0000)]
fix typo

15 years agofix panic when using msix
Kip Macy [Thu, 23 Apr 2009 21:23:19 +0000 (21:23 +0000)]
fix panic when using msix

Pointed out by Nate Whitehorn

15 years agoMake sure the ALTQ case is handle correctly by using drbr_dequeue
Kip Macy [Thu, 23 Apr 2009 21:19:35 +0000 (21:19 +0000)]
Make sure the ALTQ case is handle correctly by using drbr_dequeue

15 years agoDo not call vm_page_lookup() from the ddb routine, namely from "show
Konstantin Belousov [Thu, 23 Apr 2009 21:09:47 +0000 (21:09 +0000)]
Do not call vm_page_lookup() from the ddb routine, namely from "show
vmopag" implementation. The vm_page_lookup() code modifies splay tree
of the object pages, and asserts that object lock is taken. First issue
could cause kernel data corruption, and second one instantly panics the
INVARIANTS-enabled kernel.

Take the advantage of the fact that object->memq is ordered by page index,
and iterate over memq to calculate the runs.

While there, make the code slightly more style-compliant by moving
variables declarations to the right place.

Discussed with: jhb, alc
Reviewed by: alc
MFC after: 2 weeks

15 years agoReduce the number of bounce zones (and thus the number of bounce pages
John Baldwin [Thu, 23 Apr 2009 20:24:19 +0000 (20:24 +0000)]
Reduce the number of bounce zones (and thus the number of bounce pages
used in some cases):
- Ignore DMA tag boundaries when allocating bounce pages.  The boundaries
  don't determine whether or not parts of a DMA request bounce.  Instead,
  they are just used to carve up segments.
- Allow tags with sub-page alignment to share bounce pages since bounce
  pages are always page aligned.

Reviewed by: scottl (amd64)
MFC after: 1 month

15 years agoTwo ifnet misuse fixes for if_nve:
Robert Watson [Thu, 23 Apr 2009 19:29:45 +0000 (19:29 +0000)]
Two ifnet misuse fixes for if_nve:

(1) Don't manually configure if_output(), ether_ifattach() will do that
    for us as part of link-layer setup.

(2) Call if_detach() before stopping nve in order to prevent calls into
    the device driver after the driver has started shutting down.

Reviewed by: jhb
MFC after: 2 weeks

15 years agoCompare protosw pointer with NULL.
Bjoern A. Zeeb [Thu, 23 Apr 2009 17:41:54 +0000 (17:41 +0000)]
Compare protosw pointer with NULL.

MFC after: 1 month

15 years agoAs with ifnet_byindex_ref(), don't return IFF_DYING interfaces from
Robert Watson [Thu, 23 Apr 2009 15:56:01 +0000 (15:56 +0000)]
As with ifnet_byindex_ref(), don't return IFF_DYING interfaces from
ifunit_ref().  ifunit() continues to return them.

MFC after: 3 weeks

15 years agoAdd ifunit_ref(), a version of ifunit(), that returns not just an
Robert Watson [Thu, 23 Apr 2009 13:08:47 +0000 (13:08 +0000)]
Add ifunit_ref(), a version of ifunit(), that returns not just an
interface pointer, but also a reference to it.

Modify ifioctl() to use ifunit_ref(), holding the reference until
all ioctls, etc, have completed.

This closes a class of reader-writer races in which interfaces
could be removed during long-running ioctls, leading to crashes.
Many other consumers of ifunit() should now use ifunit_ref() to
avoid similar races.

MFC after: 3 weeks

15 years agoDuring if_detach(), invoke if_dead() to set the ifnet's function
Robert Watson [Thu, 23 Apr 2009 11:51:53 +0000 (11:51 +0000)]
During if_detach(), invoke if_dead() to set the ifnet's function
pointers to "dead" implementations that no-op rather than invoking
the device driver.  This would generally be unexpected and
possibly quite badly handled by most device drivers after
if_detach() has completed.

Reviewed by: bms
MFC after: 3 weeks

15 years agoMove portions of data structure initialization from if_attach() to
Robert Watson [Thu, 23 Apr 2009 10:59:40 +0000 (10:59 +0000)]
Move portions of data structure initialization from if_attach() to
if_alloc(), and portions of data structure destruction from if_detach()
to if_free().  These changes leave more of the struct ifnet in a
safe-to-access condition between alloc and attach, and between detach
and free, and focus on attach/detach as stack usage events rather than
data structure initialization.

Affected fields include the linkstate task queue, if_afdata lock,
address lists, kqueue state, and MAC labels.  ifq_attach() ifq_detach()
are not moved as ifq_attach() may use a queue length set by the device
driver between if_alloc() and if_attach().

MFC after: 3 weeks

15 years agoAdd a new interface flag, IFF_DYING, which is set when a device driver
Robert Watson [Thu, 23 Apr 2009 09:32:30 +0000 (09:32 +0000)]
Add a new interface flag, IFF_DYING, which is set when a device driver
calls if_free(), and remains set if the refcount is elevated.  IF_DYING
skips the bit in the if_flags bitmask previously used by IFF_NEEDSGIANT,
so that an MFC can be done without changing which bit is used, as
IFF_NEEDSGIANT is still present in 7.x.

ifnet_byindex_ref() checks for IFF_DYING and returns NULL if it is set,
preventing new references from by acquired by index, preventing
monitoring sysctls from seeing it.  Other lookup mechanisms currently
do not check IFF_DYING, but may need to in the future.

MFC after: 3 weeks

15 years agoLet pflogd's Makefile just use WARNS instead of changing CFLAGS.
Ed Schouten [Thu, 23 Apr 2009 09:11:37 +0000 (09:11 +0000)]
Let pflogd's Makefile just use WARNS instead of changing CFLAGS.

This change allows me to disable -Werror by using NO_WERROR. Right now
I can't build pflogd using Clang, because Clang generates more warnings
when passing -Wall.

15 years agoCorrect the information about when the respective functionality first
Christian Brueffer [Thu, 23 Apr 2009 08:37:56 +0000 (08:37 +0000)]
Correct the information about when the respective functionality first
appeared in FreeBSD.

PR: 133785
Submitted by: Ulrich Spoerlein <uqs@spoerlein.net>
MFC after: 3 days

15 years ago- Whitespace nitpicking.
Stanislav Sedov [Thu, 23 Apr 2009 00:00:57 +0000 (00:00 +0000)]
- Whitespace nitpicking.

15 years ago- Add the driver for AT91RM9200 CompactFlash controller. The driver
Stanislav Sedov [Wed, 22 Apr 2009 23:54:41 +0000 (23:54 +0000)]
- Add the driver for AT91RM9200 CompactFlash controller. The driver
  operates in the common memory mode and use polling mode to control
  the status of operations as I don't have any board with interrupt
  line routed yet. I'll add the GPIO interrupt driven mode as soon
  as I get one.

15 years agoAdjust the way we number CPUs on x86 so that we attempt to "group" all
John Baldwin [Wed, 22 Apr 2009 21:40:37 +0000 (21:40 +0000)]
Adjust the way we number CPUs on x86 so that we attempt to "group" all
logical CPUs in a package.  We do this by numbering the non-boot CPUs
by starting with the first CPU whose APIC ID is after the boot CPU and
wrapping back around to APIC ID 0 if needed rather than always starting
at APIC ID 0.  While here, adjust the cpu_mp_announce() routine to list
CPUs based on the mapping established by assign_cpu_ids() rather than
making assumptions about the algorithm assign_cpu_ids() uses.

MFC after: 1 month

15 years agoCorrect a comment: the function name given had never existed in any
Bjoern A. Zeeb [Wed, 22 Apr 2009 20:49:54 +0000 (20:49 +0000)]
Correct a comment: the function name given had never existed in any
(relevant) version of this file orany of my patches.

MFC after: 1 month

15 years agoMFp4 //depot/projects/usb@160930
Andrew Thompson [Wed, 22 Apr 2009 17:08:16 +0000 (17:08 +0000)]
MFp4 //depot/projects/usb@160930

Change the roothub exec functions to take the usb request and data pointers
directly rather than placing them on the parent bus struct.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@160708
Andrew Thompson [Wed, 22 Apr 2009 17:08:13 +0000 (17:08 +0000)]
MFp4 //depot/projects/usb@160708

Need to check Read/Write allowed before writing any data for non-control
transfers.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@160706
Andrew Thompson [Wed, 22 Apr 2009 17:08:10 +0000 (17:08 +0000)]
MFp4 //depot/projects/usb@160706

Resolve possible device side mode deadlock by creating another thread.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@160678
Andrew Thompson [Wed, 22 Apr 2009 17:08:07 +0000 (17:08 +0000)]
MFp4 //depot/projects/usb@160678

Remove unused field.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@160655
Andrew Thompson [Wed, 22 Apr 2009 17:08:04 +0000 (17:08 +0000)]
MFp4 //depot/projects/usb@160655

Fix possible issue with clear-stall and set-config happening at the same time.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@160614
Andrew Thompson [Wed, 22 Apr 2009 17:07:59 +0000 (17:07 +0000)]
MFp4 //depot/projects/usb@160614

Fix errornous printout.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@160485
Andrew Thompson [Wed, 22 Apr 2009 17:07:56 +0000 (17:07 +0000)]
MFp4 //depot/projects/usb@160485

Fix a bug in the USB power daemon code where connection of multiple HUBs in
series would result in incorrect device suspend.

Reported by: Nicolas xxx@wanadoo.fr
Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@160413
Andrew Thompson [Wed, 22 Apr 2009 17:07:53 +0000 (17:07 +0000)]
MFp4 //depot/projects/usb@160413

Use direct reference to parent high-speed HUB instead of indirect, due to
pointer clearing race at detach of parent USB HUB.

Reported by: kientzle
Submitted by: Hans Petter Selasky
PR: usb/133545

15 years agoA couple of older Melco cards that missed the transition to newcard
Warner Losh [Wed, 22 Apr 2009 16:51:01 +0000 (16:51 +0000)]
A couple of older Melco cards that missed the transition to newcard

15 years agoA couple of older Melco cards that missed the transition to newcard
Warner Losh [Wed, 22 Apr 2009 16:50:44 +0000 (16:50 +0000)]
A couple of older Melco cards that missed the transition to newcard

15 years agoAdd bm(4) to the built-in ethernet devices list.
Nathan Whitehorn [Wed, 22 Apr 2009 16:06:46 +0000 (16:06 +0000)]
Add bm(4) to the built-in ethernet devices list.

15 years agoAdd Billionton LNT10TB
Warner Losh [Wed, 22 Apr 2009 15:57:22 +0000 (15:57 +0000)]
Add Billionton LNT10TB

15 years agoAdd Billionton LNT-10TB variant
Warner Losh [Wed, 22 Apr 2009 15:56:00 +0000 (15:56 +0000)]
Add Billionton LNT-10TB variant

15 years agoBump __FreeBSD_version. Add UPDATING entry about low-level Bluetooth HCI API.
Maksim Yevmenkin [Wed, 22 Apr 2009 15:54:27 +0000 (15:54 +0000)]
Bump __FreeBSD_version. Add UPDATING entry about low-level Bluetooth HCI API.

15 years agoImplement low-level Bluetooth HCI API.
Maksim Yevmenkin [Wed, 22 Apr 2009 15:50:03 +0000 (15:50 +0000)]
Implement low-level Bluetooth HCI API.
This should make it easier to make Linux BlueZ libhci port.

Reviewed by: Iain Hibbert < plunky -at- rya-online -dot- net > of NetBSD
MFC after: 1 week
Inspired by: Linux BlueZ
Inspired by: NetBSD

15 years agoProvide manual page for the tsec(4) device driver.
Rafal Jaworowski [Wed, 22 Apr 2009 15:25:00 +0000 (15:25 +0000)]
Provide manual page for the tsec(4) device driver.

Obtained from: Semihalf

15 years agoAdd a few more models of AMBICOM cards from data from linux driver and
Warner Losh [Wed, 22 Apr 2009 15:13:20 +0000 (15:13 +0000)]
Add a few more models of AMBICOM cards from data from linux driver and
pccard.conf.

15 years agoAdd AmbiCom AMB8002, AMB8010 (2 variants) and AMB8610. These were
Warner Losh [Wed, 22 Apr 2009 15:11:27 +0000 (15:11 +0000)]
Add AmbiCom AMB8002, AMB8010 (2 variants) and AMB8610.  These were
inferred from data in the linux driver.

15 years agoThese were a placeholder and don't belong here. Remove them.
Warner Losh [Wed, 22 Apr 2009 15:01:08 +0000 (15:01 +0000)]
These were a placeholder and don't belong here.  Remove them.

15 years agoDon't leak information via uninitialized space in db(3) records. [09:07]
Colin Percival [Wed, 22 Apr 2009 14:07:14 +0000 (14:07 +0000)]
Don't leak information via uninitialized space in db(3) records. [09:07]

Sanity-check string lengths in order to stop OpenSSL crashing
when printing corrupt BMPString or UniversalString objects. [09:08]

Security: FreeBSD-SA-09:07.libc
Security: FreeBSD-SA-09:08.openssl
Security: CVE-2009-0590
Approved by: re (kensmith)
Approved by: so (cperciva)

15 years agoEliminate redundant setting of HID0_EMCP.
Rafal Jaworowski [Wed, 22 Apr 2009 13:31:52 +0000 (13:31 +0000)]
Eliminate redundant setting of HID0_EMCP.

15 years agoMinor style consistency fix.
Rafal Jaworowski [Wed, 22 Apr 2009 13:18:04 +0000 (13:18 +0000)]
Minor style consistency fix.

15 years agoProvide cpu_throw() for Book-E. Adjust cpu_switch() towards ULE support.
Rafal Jaworowski [Wed, 22 Apr 2009 13:13:34 +0000 (13:13 +0000)]
Provide cpu_throw() for Book-E. Adjust cpu_switch() towards ULE support.

Obtained from: Freescale, Semihalf

15 years agoCentralize setting HID0/1 for E500. Rename HID defines which are specific
Rafal Jaworowski [Wed, 22 Apr 2009 13:11:38 +0000 (13:11 +0000)]
Centralize setting HID0/1 for E500. Rename HID defines which are specific
to E500 rather than shared within Book-E family.

Obtained from: Freescale, Semihalf

15 years agoTurns out rtm_use does still exist, just under different name - for
Edward Tomasz Napierala [Wed, 22 Apr 2009 12:52:12 +0000 (12:52 +0000)]
Turns out rtm_use does still exist, just under different name - for
a long time (since 6.1) it was #defined as rtm_fmask.  Update manual
page.  While here, sync some constants with what's in route.h.

15 years agoKill stray bootverbose debug tool.
Warner Losh [Wed, 22 Apr 2009 06:33:26 +0000 (06:33 +0000)]
Kill stray bootverbose debug tool.

Submitted by: juli@

15 years agoTurns out the code improvements I did for the TC5299J support were
Warner Losh [Wed, 22 Apr 2009 06:30:24 +0000 (06:30 +0000)]
Turns out the code improvements I did for the TC5299J support were
anti-improvements and broke support for this part.  Revert the part of
the improvement at fault.

15 years ago- Rename ds1672 and ds133x devices to "ds1672_rtc" and "ds133x_rtc"
Stanislav Sedov [Tue, 21 Apr 2009 22:48:12 +0000 (22:48 +0000)]
- Rename ds1672 and ds133x devices to "ds1672_rtc" and "ds133x_rtc"
  respectivly. This will allow one to have a kernel with both devices
  present and use it for multiple boards with different types of RTC
  sitting on a bus.

Discussed with: imp

15 years agoBump __FreeBSD_version to 800082 to reflect the addition of if_refcount,
Robert Watson [Tue, 21 Apr 2009 22:47:34 +0000 (22:47 +0000)]
Bump __FreeBSD_version to 800082 to reflect the addition of if_refcount,
if_ref(), and if_rele().

MFC after: 3 weeks

15 years agoStart to address a number of races relating to use of ifnet pointers
Robert Watson [Tue, 21 Apr 2009 22:43:32 +0000 (22:43 +0000)]
Start to address a number of races relating to use of ifnet pointers
after the corresponding interface has been destroyed:

(1) Add an ifnet refcount, ifp->if_refcount.  Initialize it to 1 in
    if_alloc(), and modify if_free_type() to decrement and check the
    refcount.

(2) Add new if_ref() and if_rele() interfaces to allow kernel code
    walking global interface lists to release IFNET_[RW]LOCK() yet
    keep the ifnet stable.  Currently, if_rele() is a no-op wrapper
    around if_free(), but this may change in the future.

(3) Add new ifnet field, if_alloctype, which caches the type passed
    to if_alloc(), but unlike if_type, won't be changed by drivers.
    This allows asynchronous free's of the interface after the
    driver has released it to still use the right type.  Use that
    instead of the type passed to if_free_type(), but assert that
    they are the same (might have to rethink this if that doesn't
    work out).

(4) Add a new ifnet_byindex_ref(), which looks up an interface by
    index and returns a reference rather than a pointer to it.

(5) Fix if_alloc() to fully initialize the if_addr_mtx before hooking
    up the ifnet to global lists.

(6) Modify sysctls in if_mib.c to use ifnet_byindex_ref() and release
    the ifnet when done.

When this change is MFC'd, it will need to replace if_ispare fields
rather than adding new fields in order to avoid breaking the binary
interface.  Once this change is MFC'd, if_free_type() should be
removed, as its 'type' argument is now optional.

This refcount is not appropriate for counting mbuf pkthdr references,
and also not for counting entry into the device driver via ifnet
function pointers.  An rmlock may be appropriate for the latter.
Rather, this is about ensuring data structure stability when reaching
an ifnet via global ifnet lists and tables followed by copy in or out
of userspace.

MFC after:      3 weeks
Reported by:    mdtancsa
Reviewed by:    brooks

15 years agoFix sbappendrecord_locked().
Maksim Yevmenkin [Tue, 21 Apr 2009 19:14:13 +0000 (19:14 +0000)]
Fix sbappendrecord_locked().

The main problem is that sbappendrecord_locked() relies on sbcompress()
to set sb_mbtail. This will not happen if sbappendrecord_locked() is
called with mbuf chain made of exactly one mbuf (i.e. m0->m_next == NULL).
In this case sbcompress() will be called with m == NULL and will do
nothing. I'm not entirely sure if m == NULL is a valid argument for
sbcompress(), and, it rather pointless to call it like that, but keep
calling it so it can do SBLASTMBUFCHK().

The problem is triggered by the SOCKBUF_DEBUG kernel option that
enables SBLASTRECORDCHK() and SBLASTMBUFCHK() checks.

PR: kern/126742
Investigated by: pluknet < pluknet -at- gmail -dot- com >
No response from: freebsd-current@, freebsd-bluetooth@
MFC after: 3 days

15 years agoAcquire the interface address list lock over some iterations over
Robert Watson [Tue, 21 Apr 2009 19:06:47 +0000 (19:06 +0000)]
Acquire the interface address list lock over some iterations over
if_addrhead.  This closes some reader-writer races associated with
the address list.

MFC after: 2 weeks

15 years agoCouple of changes based on feedback
Roman Divacky [Tue, 21 Apr 2009 17:44:46 +0000 (17:44 +0000)]
Couple of changes based on feedback

o Change mr/me to so/se [1].
o Introduce a -h option to disable highlighting. [2]
o Spell STDOUT_FILENO as such and pass NULL to tgetent()
to handle the case of unset TERM. [3]

Suggested by: naddy mips.inka.de (Christian Weisgerber) [1]
Requested by: danfe, deischen [2]
Suggested by: jmallett [3]
Approved by: ed (mentor)

15 years agoLower VM_MAX_KERNEL_ADDRESS to 0xf8000000. We actually have
Marcel Moolenaar [Tue, 21 Apr 2009 17:08:02 +0000 (17:08 +0000)]
Lower VM_MAX_KERNEL_ADDRESS to 0xf8000000. We actually have
devices below CCSRBAR_VA, which overlap with KVA if that's
out limit.

15 years agoo Properly set ksym_start & ksym_end when options DDB is set.
Marcel Moolenaar [Tue, 21 Apr 2009 17:04:01 +0000 (17:04 +0000)]
o  Properly set ksym_start & ksym_end when options DDB is set.
   Include opt_ddb.h for that. Now you can actually boot with
   -d and set breakpoints using function names.
o  Make sure to include opt_msgbuf.h.
o  Carve out the first 1MB of physical memory. The MPC85xx has
   DMA problems with addresses below 1MB. Ideally busdma knows
   how to avoid allocating below 1MB for MPC85xx, but that
   requires a bit more work. For now, ignore the 1MB of DRAM.

15 years agoBracket struct mfc and struct rtdetq with #ifdef _KERNEL.
Bruce M Simpson [Tue, 21 Apr 2009 12:47:09 +0000 (12:47 +0000)]
Bracket struct mfc and struct rtdetq with #ifdef _KERNEL.
Match the bracketing in netstat.
Since the cleanup of MROUTING, ports have broken because they
expect to include <netinet/ip_mroute.h> without including
<sys/queue.h>. Fix breakage at source.

The real fix, of course, is to fix the MROUTING APIs by blowing them
away and replacing them with something else...

15 years agoremove IFF_ASSERTGIANT
Bruce M Simpson [Tue, 21 Apr 2009 09:43:51 +0000 (09:43 +0000)]
remove IFF_ASSERTGIANT

15 years agoBack out my previous change
Kevin Lo [Tue, 21 Apr 2009 07:22:12 +0000 (07:22 +0000)]
Back out my previous change

15 years agoAdd another FTDI serial converter.
Takanori Watanabe [Tue, 21 Apr 2009 05:06:31 +0000 (05:06 +0000)]
Add another FTDI serial converter.

15 years agoTo make it easy whether xl(4) missed Tx completion interrupt check
Pyun YongHyeon [Tue, 21 Apr 2009 00:42:11 +0000 (00:42 +0000)]
To make it easy whether xl(4) missed Tx completion interrupt check
number of queued packets in watchdog timeout handler. If there are
no queued packets just print a informational message and return
without resetting controller. Also fix to invoke correct Tx
completion handler as 3C905B needs different handler.

15 years agoClear IFF_DRV_OACTIVE flag if one of queued packets was transmitted.
Pyun YongHyeon [Tue, 21 Apr 2009 00:34:31 +0000 (00:34 +0000)]
Clear IFF_DRV_OACTIVE flag if one of queued packets was transmitted.
Previously it used to clear the flag only when the transmit queue
is empty which may slow down Tx performance.
While I'm here check whether driver is running and whether we can
queue more packets in if_start handler. This fixes occasional
watchdog timeouts.

Reported by: xer < xernet <> hotmail dot it >
Tested by: xer < xernet <> hotmail dot it >

15 years agoAcquire interfce address list lock while walking the interface address
Robert Watson [Mon, 20 Apr 2009 23:25:38 +0000 (23:25 +0000)]
Acquire interfce address list lock while walking the interface address
list during tun device initialization.

MFC after: 2 weeks

15 years agoAcquire address list lock before walking an interface's address list to
Robert Watson [Mon, 20 Apr 2009 23:23:31 +0000 (23:23 +0000)]
Acquire address list lock before walking an interface's address list to
identify possible jail addresses on it for IPv4 and IPv6.

MFC after: 2 weeks

15 years agoAssert the interface address list lock in IFP_TO_IA6(), as it will
Robert Watson [Mon, 20 Apr 2009 22:56:34 +0000 (22:56 +0000)]
Assert the interface address list lock in IFP_TO_IA6(), as it will
iterate the interface address list.  Marginally expand IF_ADDR_LOCK()
coverage in mld6.c to make sure it's held when IFP_TO_IA6() is called.

MFC after: 2 weeks

15 years agoPrefer structure fields (ifa_link) to macro aliases for them
Robert Watson [Mon, 20 Apr 2009 22:45:21 +0000 (22:45 +0000)]
Prefer structure fields (ifa_link) to macro aliases for them
(ifa_list).

MFC after: 2 weeks

15 years agoPrefer ifa_link (structure field) to ifa_list (macro alias for it).
Robert Watson [Mon, 20 Apr 2009 22:41:19 +0000 (22:41 +0000)]
Prefer ifa_link (structure field) to ifa_list (macro alias for it).

MFC after: 2 weeks

15 years agoPrefer actual field names (if_addrhead, ifa_link) to macros aliasing
Robert Watson [Mon, 20 Apr 2009 22:40:44 +0000 (22:40 +0000)]
Prefer actual field names (if_addrhead, ifa_link) to macros aliasing
those field names in FreeBSD code.

MFC after: 2 weeks

15 years agoAcquire interface address list lock around access to if_addrhead,
Robert Watson [Mon, 20 Apr 2009 21:37:46 +0000 (21:37 +0000)]
Acquire interface address list lock around access to if_addrhead,
closing several writer-writer races, and some read-write races.

MFC after: 2 weeks

15 years agoUse TAILQ_FOREACH() and TAILQ_FOREACH_SAFE() rather than manually
Robert Watson [Mon, 20 Apr 2009 21:05:37 +0000 (21:05 +0000)]
Use TAILQ_FOREACH() and TAILQ_FOREACH_SAFE() rather than manually
accessing queue(9) structure fields for if_addrhead.

Prefer FreeBSD field name if_addrhead to compatibility macro
if_addrlist.

MFC after: 2 weeks

15 years agoPrefer if_addrhead (FreeBSD) to if_addrlist (BSD compat) naming for the
Robert Watson [Mon, 20 Apr 2009 20:09:55 +0000 (20:09 +0000)]
Prefer if_addrhead (FreeBSD) to if_addrlist (BSD compat) naming for the
interface address list in if_stf.c.

Acquire interface address list locks around address list access.

MFC after: 2 months