]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years ago- remove duplicate code from sctp_asconf.c
rrs [Sat, 21 Jul 2007 21:41:32 +0000 (21:41 +0000)]
- remove duplicate code from sctp_asconf.c
- remove duplicate #include <sys/priv.h> that is not under
   #ifdef FreeBSD version to allow compile on 6.1
- static analysis changes per the cisco SA tool including:
    o some SA_IGNORE comments
    o some checks for NULL before unlock.
    o type corrections int -> size_t
- Fix it so sctp_alloc_asoc takes a thread/proc argument. Without this
   we pass a NULL in to bind on implicit assoc setup and crash  :-(
Approved by: re@freebsd.org(Ken Smith)

16 years agoPut local symbol suppression rule into most recent (e.g. last) version
kan [Sat, 21 Jul 2007 20:52:32 +0000 (20:52 +0000)]
Put local symbol suppression rule into most recent (e.g. last) version
block.

Approved by: re (kensmith)

16 years agoDo not forget to cam_periph_unhold the peripheral before exiting
kan [Sat, 21 Jul 2007 18:07:45 +0000 (18:07 +0000)]
Do not forget to cam_periph_unhold the peripheral before exiting
due to error.

PR: kern/114636
Submitted by: Tijl Coosemans
Approved by: re (hrs)

16 years ago- Correctly substitute variables like @NCURSES_MAJOR@ in manual pages
rafan [Sat, 21 Jul 2007 00:27:17 +0000 (00:27 +0000)]
- Correctly substitute variables like @NCURSES_MAJOR@ in manual pages

PR: doc/114711
Submitted by: Yuri Pankov <yuri at darklight.org.ru>
Approved by: re (bmah)
MFC after: 3 days

16 years agoAdded environ-replacement detection. For programs that "clean" (i.e., su)
scf [Fri, 20 Jul 2007 23:30:13 +0000 (23:30 +0000)]
Added environ-replacement detection.  For programs that "clean" (i.e., su)
or replace (i.e., zdump) the environment after a call to setenv(), putenv()
or unsetenv() has been made, a few changes were made.
  - getenv() will return the value from the new environ array.
  - setenv() was split into two functions:  __setenv() which is most of the
    previous setenv() without checks on the name and setenv() which
    contains the checks before calling __setenv().
  - setenv(), putenv() and unsetenv() will unset all previous values and
    call __setenv() on all entries in the new environ array which in turn
    adds them to the end of the envVars array.  Calling __setenv() instead
    of setenv() is done to avoid the temporary replacement of the '=' in a
    string with a NUL byte.  Some strings may be read-only data.

Added more regression checks for clearing the environment array.

Replaced gettimeofday() with getrusage() in timing regression check for
better accuracy.

Fixed an off-by-one bug in __remove_putenv() in the use of memmove().  This
went unnoticed due to the allocation of double the number of environ
entries when building envVars.

Fixed a few spelling mistakes in the comments.

Reviewed by: ache
Approved by: wes
Approved by: re (kensmith)

16 years agoFix Symbios driver on amd64: Since amd64 has 64 bit pointers but the same
se [Fri, 20 Jul 2007 23:02:01 +0000 (23:02 +0000)]
Fix Symbios driver on amd64: Since amd64 has 64 bit pointers but the same
4KB pages as i386, data structures that just fit in one page on i386 (and
on 64 bit architectures with 8KB pages) can be distributed over two pages
on amd64. This is a porblem in the case of the Symbios driver, since the
SCRIPTS engine in the SCSI chip operates on physical addresses and needs
physically contiguous memory. Earlier patches used contigmalloc on amd64,
but this version replaces part of a structure by a pointer to that data.
In order to not introduce an extra indirection for other architectures,
the change has been made conditional on __amd64__.

Earlier attempts to repair this problem are removed (i.e. the macros that
made amd64 use contigmalloc). The fix was submitted by Jan Mikkelsen and
modified by me to only affect amd64.

PR: 89550
Submitted by: janm at transactionware dot com (Jan Mikkelsen)
Approved by: re (Hiroki Sato)
MFC after: 2 weeks

16 years agoImplement vfs clustering for msdosfs.
bde [Fri, 20 Jul 2007 17:06:57 +0000 (17:06 +0000)]
Implement vfs clustering for msdosfs.

This gives a very large speedup for small block sizes (in my tests,
about 5 times for write and 3 times for read with a block size of 512,
if clustering is possible) and a moderate speedup for the moderatatly
large block sizes that should be used on non-small media (4K is the
best size in most cases, and the speedup for that is about 1.3 times
for write and 1.2 times for read).  mmap() should benefit from clustering
like read()/write(), but the current implementation of vm only supports
clustering (at least for getpages) if the fs block size is >= PAGE SIZE.

msdosfs is now only slightly slower than ffs with soft updates for
writing and slightly faster for reading when both use their best block
sizes.  Writing is slower for msdosfs because of more sync writes.
Reading is faster for msdosfs because indirect blocks interfere with
clustering in ffs.

The changes in msdosfs_read() and msdosfs_write() are simpler merges
of corresponding code in ffs (after fixing some style bugs in ffs).
msdosfs_bmap() needs fs-specific code.  This implementation loops
calling a lower level bmap function to do the hard parts.  This is a
bit inefficient, but is efficient enough since msdsfs_bmap() is only
called when there is physical i/o to do.

Approved by: re (hrs)

16 years agoClean up before implementing vfs clustering for msdosfs:
bde [Fri, 20 Jul 2007 16:21:47 +0000 (16:21 +0000)]
Clean up before implementing vfs clustering for msdosfs:

In msdosfs_read(), mainly reorder the main loop to the same order as in
ffs_read().

In msdosfs_write() and extendfile(), use vfs_bio_clrbuf() instead of
clrbuf().  I think this just just a bogus optimization, but ffs always
does it and msdosfs already did it in one place, and it is what I've
tested.

In msdosfs_write(), merge good bits from a comment in ffs_write(), and
fix 1 style bug.

In the main comment for msdosfs_pcbmap(), improve wording and catch
up with 13 years of changes in the function.  This comment belongs in
VOP_BMAP.9 but that doesn't exist.

In msdosfs_bmap(), return EFBIG if the requested cluster number is out
of bounds instead of blindly truncating it, and fix many style bugs.

Approved by: re (hrs)

16 years agoNew release notes:
bmah [Fri, 20 Jul 2007 15:48:02 +0000 (15:48 +0000)]
New release notes:
ixgb (no manpage)
ISDN4BSD, ng_h4, and netatm disconnected

Modified release note:
ULE (3.0)

Approved by: re (implicitly)

16 years agoIn add_channel(), search 11g channels if mode is AUTO and corresponding
sephe [Fri, 20 Jul 2007 11:38:12 +0000 (11:38 +0000)]
In add_channel(), search 11g channels if mode is AUTO and corresponding
11b channel is not found, e.g. Atheros 5211.

Reported by: matteo
Problem outlined by: thompsa
Reviewed by: sam, thompsa
Approved by: re (kensmith), sam (mentor)
Tested by: matteo (an early version)

16 years agoMake sure we release the control vnode in Coda:
rwatson [Fri, 20 Jul 2007 11:14:51 +0000 (11:14 +0000)]
Make sure we release the control vnode in Coda:

We allocate coda_ctlvp when /coda is mounted, but never release it.
During the unmount this vnode was marked as UNMOUNTING and when venus
is started a second time the system would hang, possibly waiting for
the old vnode to disappear.

So now we call vrele on the control vnode when file system is unmounted
to drop the reference we got during the mount. I'm pretty sure it is
also necessary to not skip the handling in coda_inactive for the control
vnode, it seems like that is the place we actually get rid of the vnode
once the refcount has dropped to 0.

Submitted by: Jan Harkes <jaharkes at cs dot cmu dot edu>
Approved by: re (kensmith)

16 years agottyfree() frees the cdev(). But if there are pending kevents,
kib [Fri, 20 Jul 2007 09:41:54 +0000 (09:41 +0000)]
ttyfree() frees the cdev().  But if there are pending kevents,
filt_ttyrdetach() etc would later attempt to dereference cdev->si_tty,
causing a 0xdeadc0de dereference.  Change kn_hook value from cdev to
struct tty to avoid dereferencing freed cdev.

In ttygone(), wake up select(), sigio and kevent() users in addition
to the queue sleepers.

Return EV_EOF from kevent filters if TS_GONE is set.

Submitted by: peter
Tested by: Peter Holm
Approved by: re (kensmith)
MFC after: 2 weeks

16 years agoFix some problems with lock profiling in rw locks:
attilio [Fri, 20 Jul 2007 08:43:42 +0000 (08:43 +0000)]
Fix some problems with lock profiling in rw locks:
- Adjust lock_profiling stubs semantic in the hard functions in order to be
  more accurate and trustable
- As for sx locks, disable shared paths for lock_profiling.  Actually,
  lock_profiling has a subtle race which makes results caming from shared
  paths not completely trustable. A macro stub (LOCK_PROFILING_SHARED) can
  be actually used for re-enabling this paths, but is currently intended
  for developing use only.
- style(9) fixes

Approved by: jeff, kmacy, jhb[1]
Approved by: re

[1] Had initial reservations not shared by others, conceded
    in the end.

16 years agoi386_set_ioperm, i386_get_ldt and i386_set_ldt are now MPSAFE
attilio [Fri, 20 Jul 2007 08:35:18 +0000 (08:35 +0000)]
i386_set_ioperm, i386_get_ldt and i386_set_ldt are now MPSAFE
(Giant/sched_lock free) so remove unuseful Giant cruft.

Approved by: jeff
Approved by: re
Sponsorized by: NGX Italy (http://www.ngx.it)

16 years agoTwo changes to vm_fault_additional_pages():
alc [Fri, 20 Jul 2007 06:55:11 +0000 (06:55 +0000)]
Two changes to vm_fault_additional_pages():

1. Rewrite the backward scan.  Specifically, reverse the order in which
   pages are allocated so that upon failure it is never necessary to
   free pages that were just allocated.  Moreover, any allocated pages
   can be put to use.  This makes the backward scan behave just like the
   forward scan.

2. Eliminate an explicit, unsynchronized check for low memory before
   calling vm_page_alloc().  It serves no useful purpose.  It is, in
   effect, optimizing the uncommon case at the expense of the common
   case.

Approved by: re (hrs)
MFC after: 3 weeks

16 years agoProtect transaction labels by its own lock to reduce lock contention.
simokawa [Fri, 20 Jul 2007 03:42:57 +0000 (03:42 +0000)]
Protect transaction labels by its own lock to reduce lock contention.

Approved by: re (rwatson)

16 years agoFix a strict aliasing warning from GCC 4.1.
kientzle [Fri, 20 Jul 2007 01:28:50 +0000 (01:28 +0000)]
Fix a strict aliasing warning from GCC 4.1.

Thanks to: Joerg Sonnenberger
Approved by: re (hrs)
MFC after: 3 days

16 years agoFill in some casts that are needed (according to GCC 4.1)
kientzle [Fri, 20 Jul 2007 01:27:50 +0000 (01:27 +0000)]
Fill in some casts that are needed (according to GCC 4.1)

Thanks to: Joerg Sonnenberger
Approved by: re (hrs)
MFC after: 3 days

16 years agoDon't exit immediately on libarchive warnings, just
kientzle [Fri, 20 Jul 2007 01:24:49 +0000 (01:24 +0000)]
Don't exit immediately on libarchive warnings, just
set the delayed return value and keep going.

Approved by: re (hrs)
MFC after: 7 days

16 years agoAdd legacy interrupt handler which would be more appropriate for
yongari [Fri, 20 Jul 2007 00:25:20 +0000 (00:25 +0000)]
Add legacy interrupt handler which would be more appropriate for
interrupt that is shared with other devices(e.g. USB) in system and
provide a new tunable "hw.msk.legacy_intr" to activate the legacy
interrupt handler. Setting the tunable automatically disables MSI
for msk(4). Previously msk(4) used adoptive polling with taskqueue(9)
as all msk(4) hardwares I know supports MSI. However, there are cases
that MSI couldn't be used on some hardwares due to bugs in MSI
implementatins.

Tested by: Li-Lun Wang < llwang AT infor DOT org >
Approved by: re (kensmith)

16 years agoAttempt to improve feature parity between UDPv4 and UDPv6 by merging
rwatson [Thu, 19 Jul 2007 22:34:25 +0000 (22:34 +0000)]
Attempt to improve feature parity between UDPv4 and UDPv6 by merging
UDPv4 features to UDPv6:

- Add MAC checks on delivery and MAC labeling on transmit.
- Check for (and reject) datagrams with destination port 0.
- For multicast delivery, check the source port only if the socket being
  considered as a destination has been connected.
- Implement UDP blackholing based on net.inet.udp.blackhole.
- Add a new ICMPv6 unreachable reply rate limiting category for failed
  delivery attempts and implement rate limiting for UDPv6 (submitted by
  bz).

Approved by: re (kensmith)
Reviewed by: bz

16 years agoUpdate the default FILESYSTEMS value in a comment to note that ext2fs is
jhb [Thu, 19 Jul 2007 21:00:08 +0000 (21:00 +0000)]
Update the default FILESYSTEMS value in a comment to note that ext2fs is
included in the default list in the locate.updatedb script.

Approved by: re (bmah)
Inspired by: mwlucas

16 years ago - Refine the load balancer to improve buildkernel times on dual core
jeff [Thu, 19 Jul 2007 20:03:15 +0000 (20:03 +0000)]
 - Refine the load balancer to improve buildkernel times on dual core
   machines.
 - Leave the long-term load balancer running by default once per second.
 - Enable stealing load from the idle thread only when the remote processor
   has more than two transferable tasks.  Setting this to one further
   improves buildworld.  Setting it higher improves mysql.
 - Remove the bogus pick_zero option.  I had not intended to commit this.
 - Entirely disallow migration for threads with SRQ_YIELDING set.  This
   balances out the extra migration allowed for with the load balancers.
   It also makes pick_pri perform better as I had anticipated.

Tested by: Dmitry Morozovsky <marck@rinet.ru>
Approved by: re

16 years ago - When newtd is specified to sched_switch() it was not being initialized
jeff [Thu, 19 Jul 2007 19:51:45 +0000 (19:51 +0000)]
 - When newtd is specified to sched_switch() it was not being initialized
   properly.  We have to temporarily unlock the TDQ lock so we can lock
   the thread and add it to the run queue.  This is used only for KSE.
 - When we add a thread from the tdq_move() via sched_balance() we need to
   ipi the target if it's sitting in the idle thread or it'll never run.

Reported by: Rene Landan
Approved by: re

16 years agoDocument support for M_NOWAIT by the new implementation of contigmalloc(9)
alc [Thu, 19 Jul 2007 17:23:20 +0000 (17:23 +0000)]
Document support for M_NOWAIT by the new implementation of contigmalloc(9)
in HEAD.

Approved by: re (hrs)
Reviewed by: Michael Plass

16 years agoRegenerate after changing src/tools/build/options/WITHOUT_TOOLCHAIN
bz [Thu, 19 Jul 2007 17:02:24 +0000 (17:02 +0000)]
Regenerate after changing src/tools/build/options/WITHOUT_TOOLCHAIN
stating that WITHOUT_TOOLCHAIN cannot be applied to build targets.

Reminded by: Niclas Zeising niclas.zeising gmail.com
Approved by: re (hrs)

16 years ago- Enable static building of mxge(4) and its firmware.
gallatin [Thu, 19 Jul 2007 16:16:00 +0000 (16:16 +0000)]
- Enable static building of mxge(4) and its firmware.

- Add custom .c wrappers for the firmware, rather than the standard
  firmware(9) generated firmware objects to work around toolchain
  problems on ia64 involving linking objects produced by
  ld -b -binary into the kernel.

- Move from using Myricom's ".dat" firmware blobs to using Myricom's
  zlib compressed ".h" firmware header files.  This is done to
  facilitate the custom wrappers, and saves a fair amount of wired
  memory in the case where the firmware is built in, or preloaded.

- Fix two compile issues in mxge which only appear on non-i386/amd64.

Reviewed by: mlaier, mav (earlier version with just zlib support)
Glanced at by: sam
Approved by: re (kensmith)

16 years agoNote that module should return EOPNOTSUPP for both unrecognized
flz [Thu, 19 Jul 2007 11:22:34 +0000 (11:22 +0000)]
Note that module should return EOPNOTSUPP for both unrecognized
*and* unsupported values of `what'.

Submitted by: kevlo
Discussed on: cvs-doc@
Approved by: re (hrs)
MFC after: 3 days

16 years agoReplace hard coded options by their defined PFIL_{IN,OUT} names.
bz [Thu, 19 Jul 2007 09:57:54 +0000 (09:57 +0000)]
Replace hard coded options by their defined PFIL_{IN,OUT} names.

Approved by: re (hrs)

16 years agoRestore behavior changed with rev. 1.46 and make
bz [Thu, 19 Jul 2007 09:16:40 +0000 (09:16 +0000)]
Restore behavior changed with rev. 1.46 and make
IPV6_IPSEC_POLICY always visible again. This unbreaks some
third party user space applications.

PR: 114491
Reported by: sumikawa
Reviewed by: sumikawa
Approved by: re (hrs)

16 years ago - Remove explicit references to sched_lock. A simpler assert will do.
jeff [Thu, 19 Jul 2007 08:58:40 +0000 (08:58 +0000)]
 - Remove explicit references to sched_lock.  A simpler assert will do.

Approved by: re

16 years ago - Calling sched_nice() in tdsigwakeup() is no longer required by ULE and
jeff [Thu, 19 Jul 2007 08:49:16 +0000 (08:49 +0000)]
 - Calling sched_nice() in tdsigwakeup() is no longer required by ULE and
   actually causes LORs and other panics.

Reported by: mlaier
Approved by: re

16 years agoMake clear that WITHOUT_TOOLCHAIN cannot be applied to build targets.
bz [Thu, 19 Jul 2007 08:14:28 +0000 (08:14 +0000)]
Make clear that WITHOUT_TOOLCHAIN cannot be applied to build targets.

PR: 114220
Reviewed by: simon
Approved by: re (hrs)

16 years agoThis commit was generated by cvs2svn to compensate for changes in r171490,
delphij [Thu, 19 Jul 2007 06:57:46 +0000 (06:57 +0000)]
This commit was generated by cvs2svn to compensate for changes in r171490,
which included commits to RCS files with non-trunk default branches.

16 years agoRemove unused FSF source files.
delphij [Thu, 19 Jul 2007 06:57:46 +0000 (06:57 +0000)]
Remove unused FSF source files.

Approved by: re (hrs)

16 years agoMFp4: Rework on tmpfs's mapped read/write procedures. This
delphij [Thu, 19 Jul 2007 03:34:50 +0000 (03:34 +0000)]
MFp4: Rework on tmpfs's mapped read/write procedures.  This
should finally fix fsx test case.

The printf's added here would be eventually turned into
assertions.

Submitted by: Mingyan Guo (mostly)
Approved by: re (tmpfs blanket)

16 years ago - Remove the global definition of sched_lock in mutex.h to break
jeff [Wed, 18 Jul 2007 20:46:06 +0000 (20:46 +0000)]
 - Remove the global definition of sched_lock in mutex.h to break
   new code and third party modules which try to depend on it.
 - Initialize sched_lock in sched_4bsd.c.
 - Declare sched_lock in sparc64 pmap.c and assert that we're compiling
   with SCHED_4BSD to prevent accidental crashes from running ULE.  This
   is the sole remaining file outside of the scheduler that uses the
   global sched_lock.

Approved by: re

16 years ago - Add the proper lock profiling calls to _thread_lock().
jeff [Wed, 18 Jul 2007 20:38:13 +0000 (20:38 +0000)]
 - Add the proper lock profiling calls to _thread_lock().

Obtained from: kipmacy
Approved by: re

16 years agoMake fstest work out-of-the-box on Solaris:
pjd [Wed, 18 Jul 2007 18:07:15 +0000 (18:07 +0000)]
Make fstest work out-of-the-box on Solaris:
- Solaris' setgroups(2) doesn't change process' effective gid, so set it
  explicitly.
- POSIX doesn't define O_NOFOLLOW. FreeBSD returns EMLINK when target is
  a symbolic link, but Solaris returns ELOOP then.
- Solaris doesn't define O_SHLOCK and O_EXLOCK flags.

Approved by: re (rwatson)

16 years ago - Update ULE note to remove warnings against production use.
jeff [Wed, 18 Jul 2007 02:51:21 +0000 (02:51 +0000)]
 - Update ULE note to remove warnings against production use.

Suggested by: Ben Kaduk <minimarmot@gmail.com>
Approved by: re

16 years agoULE 3.0: Fine grain scheduler locking and affinity improvements. This has
jeff [Tue, 17 Jul 2007 22:53:23 +0000 (22:53 +0000)]
ULE 3.0:  Fine grain scheduler locking and affinity improvements.  This has
been in development for over 6 months as SCHED_SMP.
 - Implement one spin lock per thread-queue.  Threads assigned to a
   run-queue point to this lock via td_lock.
 - Improve the facility for assigning threads to CPUs now that sched_lock
   contention no longer dominates scheduling decisions on larger SMP
   machines.
 - Re-write idle time stealing in an attempt to make it less damaging to
   general performance.  This is still disabled by default. See
   kern.sched.steal_idle.
 - Call the long-term load balancer from a callout rather than sched_clock()
   so there are no locks held.  This is disabled by default.  See
   kern.sched.balance.
 - Parameterize many scheduling decisions via sysctls.  Try to document
   these via sysctl descriptions.
 - General structural and naming cleanups.
 - Document each function with comments.

Tested by: current@ amd64, x86, UP, SMP.
Approved by: re

16 years ago - Optimize the amd64 cpu_switch() TD_LOCK blocking and releasing to
jeff [Tue, 17 Jul 2007 22:36:56 +0000 (22:36 +0000)]
 - Optimize the amd64 cpu_switch() TD_LOCK blocking and releasing to
   require fewer blocking loops.
 - Don't use atomic ops with 4BSD or on UP.
 - Only use the blocking loop if ULE is compiled in.
 - Use the correct memory barrier.

Discussed with: attilio, jhb, ssouhlal
Tested by: current@
Approved by: re

16 years ago - Add support for blocking and releasing threads to i386 cpu_switch(). This
jeff [Tue, 17 Jul 2007 22:34:14 +0000 (22:34 +0000)]
 - Add support for blocking and releasing threads to i386 cpu_switch().  This
   is required for per-cpu scheduler lock support.

Obtained from: attilio
Tested by: current@ many users
Approved by: re

16 years agoThe wpa_passphrase(8) manual page states that it first appeared in
simon [Tue, 17 Jul 2007 22:28:51 +0000 (22:28 +0000)]
The wpa_passphrase(8) manual page states that it first appeared in
FreeBSD 6.2, but it didn't make it into RELENG_6_2.

Update the manual page to say "FreeBSD 6.3".

PR: docs/114429
Submitted by: Henrik Brix Andersen <henrik@brixandersen.dk>
MFC after: 3 days
Approved by: re (bmah)

16 years ago- added pre-checks to the bindx call.
rrs [Tue, 17 Jul 2007 20:58:26 +0000 (20:58 +0000)]
- added pre-checks to the bindx call.
- use proper tick gathering macro instead of ticks directly.
- Placed reasonable boundaries on sets that a user can do
  that are converted to ticks from ms.
- Fix CMT_PF to always check to be sure CMT is on.
- Fix ticks use of CMT_PF.
- put back code to allow asconfs to be queued while INITs are in flight
  and before the assoc is established.
- During window probes, an ack'd packet might be left with the window
  probe mark on it causing it to be retransmitted. Change so that
  the flight decrease macro clears the window_probe mark.
- Additional logging flight size/reading and ASOC LOG. This
  is only enabled if you manually insert things into opt_sctp.h
  since its a set of debug code only.
- Found an interesting SMP race in the way data was appended which
  could cause a reader to lose a part of a message, had to
  reorder when we marked the message was complete to after
  the data was appended.
- bug in ADD-IP for the subset bound socket case when the peer has only
  one address
- fix ASCONF implicit success/error handling case
- proper support of jails in Freebsd 6>
- copy out the timeval for the 64 bit sparc world on cookie-echo
  alignment error crashes without this).
Approved by: re(Ken Smith)

16 years agoMFp4: Remove files that are removed during gcc 4.2 upgrade, as
delphij [Tue, 17 Jul 2007 17:28:59 +0000 (17:28 +0000)]
MFp4: Remove files that are removed during gcc 4.2 upgrade, as
well as IPX over IP tunnel.

Approved by: re (bmah)

16 years agoCorrect RSSI calculation.
sephe [Tue, 17 Jul 2007 11:27:57 +0000 (11:27 +0000)]
Correct RSSI calculation.

Noticed by: Hans Petter Selasky <hselasky@c2i.net>
Approved by: re (kensmith), sam (mentor)

16 years ago- integrate most recent changes from vendor branch and upgrade to firmware revision...
kmacy [Tue, 17 Jul 2007 06:50:35 +0000 (06:50 +0000)]
- integrate most recent changes from vendor branch and upgrade to firmware revision 4.5.5
- add filter support
- further improvements for T304
- recover gracefully from spurious immediate packets

Approved by: re(blanket)
Supported by: Chelsio
MFC after: 3 days

16 years ago- Increase descriptors per call to start
kmacy [Tue, 17 Jul 2007 06:12:22 +0000 (06:12 +0000)]
- Increase descriptors per call to start
- enqueue per-txq task
- fix per-txq task initialization

Approved by: re (blanket)

16 years ago - Use ruxagg() in calcru() to make sure we have current tick information
jeff [Tue, 17 Jul 2007 01:08:09 +0000 (01:08 +0000)]
 - Use ruxagg() in calcru() to make sure we have current tick information
   from all threads.

Discussed with: bde, attilio
Approved by: re

16 years ago- Update portaudit location
pav [Mon, 16 Jul 2007 22:52:39 +0000 (22:52 +0000)]
- Update portaudit location

Submitted by: Dominique Goncalves <dominique.goncalves@gmail.com>
MFC after: 3 days
Approved by: re (hrs)

16 years agoBah, fix a cosmetic nit and remove a debugging aid missed in the previous
jhb [Mon, 16 Jul 2007 18:13:12 +0000 (18:13 +0000)]
Bah, fix a cosmetic nit and remove a debugging aid missed in the previous
fixes for netstat -M.

Pointy hat to: jhb
Approved by: re (kensmith)

16 years agoRestore netstat -M functionality for most statistics on core dumps. In
jhb [Mon, 16 Jul 2007 17:15:55 +0000 (17:15 +0000)]
Restore netstat -M functionality for most statistics on core dumps.  In
general, when support was added to netstat for fetching data using sysctl,
no provision was left for fetching equivalent data from a core dump, and
in fact, netstat would _always_ fetch data from the live kernel using
sysctl even when -M was specified resulting in the user believing they
were getting data from coredumps when they actually weren't.  Some specific
changes:
- Add a global 'live' variable that is true if netstat is running against
  the live kernel and false if -M has been specified.
- Stop abusing the sysctl flag in the protocol tables to hold the protocol
  number.  Instead, the protocol is now its own field in the tables, and
  it is passed as a separate parameter to the PCB and stat routines rather
  than overloading the KVM offset parameter.
- Don't run PCB or stats functions who don't have a namelist offset if we
  are being run against a crash dump (!live).
- For the inet and unix PCB routines, we generate the same buffer from KVM
  that the sysctl usually generates complete with the header and trailer.
- Don't run bpf stats for !live (before it would just silently always run
  live).
- kread() no longer trashes memory when opening the buffer if there is an
  error on open and the passed in buffer is smaller than _POSIX2_LINE_MAX.
- The multicast routing code doesn't fallback to kvm on live kernels if
  the sysctl fails.  Keeping this made the code rather hairy, and netstat
  is already tied to the kernel ABI anyway (even when using sysctl's since
  things like xinpcb contain an inpcb) so any kernels this is run against
  that have the multicast routing stuff should have the sysctls.
- Don't try to dig around in the kernel linker in the netgraph PCB routine
  for core dumps.

Other notes:
- sctp's PCB routine only works on live kernels, it looked rather
  complicated to generate all the same stuff via KVM.  Someone can always
  add it later if desired though.
- Fix the ipsec removal bug where N_xxx for IPSEC stats weren't renumbered.
- Use sysctlbyname() everywhere rather than hardcoded mib values.

MFC after: 1 week
Approved by: re (rwatson)

16 years agoAdd support to the ipmi, isa attachment to attempt to read ipmi
ambrisko [Mon, 16 Jul 2007 17:03:48 +0000 (17:03 +0000)]
Add support to the ipmi, isa attachment to attempt to read ipmi
config info. from device.hints.  Some machines have ipmi controllers
that do not have attachment info in either PCI, SMBIOS or ACPI.
This idea was hacked together by me and then done properly by
jhb.

Submitted by: jhb
Reviewed by: jhb (man page)
Approved by: re (Ken Smith)
MFC after: 1 week

16 years agoRestore the value of ar.rnat after the assignment to ar.bspstore.
marcel [Mon, 16 Jul 2007 16:47:35 +0000 (16:47 +0000)]
Restore the value of ar.rnat after the assignment to ar.bspstore.
The SDM states that writing to ar.bspstore invalidates the ar.rnat
register as a side-effect. This was interpreted as "bits in the
ar.rnat register that correspond to registers whose value is on
the stack are undefined'. Since we keep the kernel stack NaT-
aligned with the user stack (i.e. the lower 9 bits of the backing
store pointer remain unchanged when we switch to the kernel stack)
bits that need preserving would be preserved.

That interpretation is questionable. So, now, the interpretation
is more absolute: ar.rnat is undefined after writing to ar.bspstore.
As such, we write the saved value of ar.rnat back to ar.rnat after
writing to ar.bspstore.

Discussed with: christian.kandeler@hob.de
Approved by: re (kensmith)

17 years agoUnbreak the dynamic linker by not creating a cache for rtld-elf
marcel [Sun, 15 Jul 2007 22:52:15 +0000 (22:52 +0000)]
Unbreak the dynamic linker by not creating a cache for rtld-elf
itself. It needs mmap(2), which now needs getosreldate(3) and
which in turn uses a global variable to cache the result. This
cannot be done before linking is done.

See also: ../sparc64/reloc.c:1.15
Approved by: re (kensmith)

17 years agoAdd ObsoleteFiles.inc entries for netatm, which has been disconnected from
rwatson [Sun, 15 Jul 2007 22:47:33 +0000 (22:47 +0000)]
Add ObsoleteFiles.inc entries for netatm, which has been disconnected from
the build.

Suggested by: bz, Dmitry Morozovsky <marck@rinet.ru>,
Niclas Zeising <niclas.zeising@gmail.com>
Tested by: Dmitry Morozovsky <marck@rinet.ru>
Approved by: re (kensmith)

17 years agoarchive_string_ensure() used to call exit(3) if it
kientzle [Sun, 15 Jul 2007 19:13:59 +0000 (19:13 +0000)]
archive_string_ensure() used to call exit(3) if it
couldn't allocate more memory for a string.  Change
this so it returns NULL in that case, and update
all of its callers to handle the error.  Some of
those callers can now return errors back to the
client instead of calling exit(3).

Approved by: re (bmah)

17 years agoAdd archive_entry_copy_gname() and archive_entry_copy_uname()
kientzle [Sun, 15 Jul 2007 19:10:34 +0000 (19:10 +0000)]
Add archive_entry_copy_gname() and archive_entry_copy_uname()
functions.

Approved by: re (bmah)
MFC after: 3 days

17 years agoClarify one test.
kientzle [Sun, 15 Jul 2007 17:16:42 +0000 (17:16 +0000)]
Clarify one test.

Approved by: re (blanket, libarchive testing)

17 years agoImprove acquisition of transaction labels.
simokawa [Sun, 15 Jul 2007 13:00:29 +0000 (13:00 +0000)]
Improve acquisition of transaction labels.
- Keep last transaction label for each destination.
- If the next label is not free, just give up.
- This should reduce CPU load for TX on if_fwip under heavy load.

Approved by: re (hrs)

17 years agoNote diffutils 2.8.7 MFC.
delphij [Sun, 15 Jul 2007 01:59:35 +0000 (01:59 +0000)]
Note diffutils 2.8.7 MFC.

Approved by: re (bmah)

17 years agoDisconnect netatm from the build as it is not MPSAFE and relies on
rwatson [Sat, 14 Jul 2007 21:49:24 +0000 (21:49 +0000)]
Disconnect netatm from the build as it is not MPSAFE and relies on
NET_NEEDS_GIANT, which will shortly be removed.  This is done in a
away that it may be easily reattached to the build before 7.1 if
appropriate locking is added.  Specifics:

- Don't install netatm include files
- Disconnect netatm command line management tools
- Don't build libatm
- Don't include ATM parts in rescue or sysinstall
- Don't install sample configuration files and documents
- Don't build kernel support as a module or in NOTES
- Don't build netgraph wrapper nodes for netatm

This removes the last remaining consumer of NET_NEEDS_GIANT.

Reviewed by: harti
Discussed with: bz, bms
Approved by: re (kensmith)

17 years agoRevert previous commits which I committed by mistake.
rodrigc [Sat, 14 Jul 2007 21:23:31 +0000 (21:23 +0000)]
Revert previous commits which I committed by mistake.

Approved by: re (implicit)
Pointy hat to: me

17 years agoEliminate two unused functions: vm_phys_alloc_pages() and
alc [Sat, 14 Jul 2007 21:21:17 +0000 (21:21 +0000)]
Eliminate two unused functions: vm_phys_alloc_pages() and
vm_phys_free_pages().  Rename vm_phys_alloc_pages_locked() to
vm_phys_alloc_pages() and vm_phys_free_pages_locked() to
vm_phys_free_pages().  Add comments regarding the need for the free page
queues lock to be held by callers to these functions.  No functional
changes.

Approved by: re (hrs)

17 years agoThe last entry in the ext2_opts array must be NULL,
rodrigc [Sat, 14 Jul 2007 21:18:19 +0000 (21:18 +0000)]
The last entry in the ext2_opts array must be NULL,
otherwise the kernel with crash in vfs_filteropt() if an invalid
mount option is passed to ext2fs.

Approved by: re (kensmith)

17 years agoTake a sentence into the present by removing a reference to FreeBSD 3.0.
brueffer [Sat, 14 Jul 2007 19:23:29 +0000 (19:23 +0000)]
Take a sentence into the present by removing a reference to FreeBSD 3.0.

Approved by: re (blanket)
MFC after: 3 days

17 years agoEliminate dead code, specifically, an unused sysctl: "vm.idlezero_maxrun".
alc [Sat, 14 Jul 2007 19:00:44 +0000 (19:00 +0000)]
Eliminate dead code, specifically, an unused sysctl: "vm.idlezero_maxrun".

Approved by: re (hrs)

17 years agoUse an uncompressed test archive for gtar sparse format 1.0 format,
kientzle [Sat, 14 Jul 2007 17:54:14 +0000 (17:54 +0000)]
Use an uncompressed test archive for gtar sparse format 1.0 format,
as that better exercises some internal read-combining logic than the
compressed archive.

Approved by: re (blanket, libarchive testing)

17 years agoReport each failed test once, but keep a count and report that count
kientzle [Sat, 14 Jul 2007 17:52:01 +0000 (17:52 +0000)]
Report each failed test once, but keep a count and report that count
if there was more than one.  In particular, this simplifies
test_tar_filenames.c, which has a tendency to be very noisy otherwise.

Approved by: re (blanket, libarchive testing)

17 years agoRemove "options SCTP_HIGH_SPEED" from NOTES as it has now been removed
rwatson [Sat, 14 Jul 2007 15:35:45 +0000 (15:35 +0000)]
Remove "options SCTP_HIGH_SPEED" from NOTES as it has now been removed
from options.

Approved by: re (bmah)

17 years agoDocument support for Intel 82801I and Realtek ALC268.
joel [Sat, 14 Jul 2007 12:35:29 +0000 (12:35 +0000)]
Document support for Intel 82801I and Realtek ALC268.

Approved by: re

17 years ago- Modular congestion control, with RFC2581 being the default.
rrs [Sat, 14 Jul 2007 09:36:28 +0000 (09:36 +0000)]
- Modular congestion control, with RFC2581 being the default.
- CMT_PF states added (w/sysctl to turn the PF version on)
- sctp_input.c had a missing incr of cookie case when the
  auth was bad. This meant a free was called without an
  increment to refcnt, added increment like rest of code.
- There was a case, unlikely, when the scope of the destination
  changed (this is a TSNH case). In that case, it would not free
  the alloc'ed asoc (in sctp_input.c).
- When listed addresses found a colliding cookie/Init, then
  the collided upon tcb was not unlocked in sctp_pcb.c
- Add error checking on arguments of sctp_sendx(3) to prevent it from
  referencing a NULL pointer.
- Fix an error return of sctp_sendx(3), it was returing
  ENOMEM not -1.
- Get assoc id was changed to use the sanctified socket api
  method for getting a assoc id (PEER_ADDR_INFO instead of
  PEER_ADDR_PARAMS).
- Fix it so a peeled off socket will get a proper error return
  if it trys to send to a different address then it is connected to.
- Fix so that select_a_stream can avoid an endless loop that
  could hang a caller.
- time_entered (state set time) was not being set in all cases
  to the time we went established.
Approved by: re(ken smith)

17 years agoRestore the 'break' that was inadvertently removed in 1.57 of this file.
kientzle [Sat, 14 Jul 2007 05:53:51 +0000 (05:53 +0000)]
Restore the 'break' that was inadvertently removed in 1.57 of this file.
Without this, hardlinks get returned as symlinks.

Approved by: re (Ken Smith)
MFC after: 2 days

17 years agoExtend the basic tar reading test to exercise most types of
kientzle [Sat, 14 Jul 2007 05:35:17 +0000 (05:35 +0000)]
Extend the basic tar reading test to exercise most types of
entries.  This doesn't cover everything yet, but it's a big improvement.

Approved by:  re (blanket, libarchive testing)

17 years agoPerform range check before allocating memory when reading
rodrigc [Fri, 13 Jul 2007 18:51:08 +0000 (18:51 +0000)]
Perform range check before allocating memory when reading
extended attributes.

Reviewed by: kib
Approved by: re (hrs)
PR: 114389

17 years agoNew release note: SA-07:05.libarchive.
bmah [Fri, 13 Jul 2007 17:31:32 +0000 (17:31 +0000)]
New release note:  SA-07:05.libarchive.

Approved by:    re (implicitly)

17 years agoAdd support for G965/Q965/GM965/GME965/GME945 AGP.
anholt [Fri, 13 Jul 2007 16:28:12 +0000 (16:28 +0000)]
Add support for G965/Q965/GM965/GME965/GME945 AGP.

This adds a function to agp.c to set the aperture resource ID if it's
not the usual AGP_APBASE.  Previously, agp.c had been assuming
AGP_APBASE, which resulted in incorrect agp_info, and contortions by
agp_i810.c to work around it.

This also adds functions to agp.c for default AGP_GET_APERTURE() and
AGP_SET_APERTURE(), which return the aperture resource size and disallow
aperture size changes.  Moving to these for our AGP drivers will likely
result in stability improvements.  This should fix 855-class aperture
size detection.

Additionally, refuse to attach agp_i810 when some RAM is above 4GB and
the GART can't reference memory that high.  This should be very rare.
The correct solution would be bus_dma conversion for agp, which is
beyond the scope of this change.  Other AGP drivers could likely use
this change as well.

G33/Q35/Q33 AGP support is also included, but disconnected by default
due to lack of testing.

PR:             kern/109724 (855 aperture issue)
Submitted by:   FUJIMOTO Kou<fujimoto@j.dendai.ac.jp>
Approved by: re (hrs)

17 years agoCache does not serve any purpose when rtld is relocating itself, do
kensmith [Fri, 13 Jul 2007 16:18:43 +0000 (16:18 +0000)]
Cache does not serve any purpose when rtld is relocating itself, do
not bother allocating one.

Submitted by: kan
Approved by: re (bmah)

17 years agoMake the test for reading gtar sparse entries more robust;
kientzle [Fri, 13 Jul 2007 15:16:26 +0000 (15:16 +0000)]
Make the test for reading gtar sparse entries more robust;
it now verifies that the returned blocks have the correct data
at the correct file offsets, ignoring any null padding that
may exist.

Approved by: re (blanket, libarchive test suite)

17 years agoNew test suite test_read_pax_truncated probes libarchive
kientzle [Fri, 13 Jul 2007 15:14:35 +0000 (15:14 +0000)]
New test suite test_read_pax_truncated probes libarchive
behavior with truncated or damaged pax archives.  This
tests most of the cases covered by the recent security advisory.

Approved by: re (blanket, libarchive test suite)

17 years agoNew file "read_open_memory.c" is a custom variant of
kientzle [Fri, 13 Jul 2007 15:12:52 +0000 (15:12 +0000)]
New file "read_open_memory.c" is a custom variant of
archive_read_open_memory.c that tries to test border
cases.  In particular, it copies over each returned block
so that formats or decompressors that read past the end
of a returned block will break.

Approved by: re (blanket, libarchive test suite)

17 years agoFix running individual tests via "libarchive_test <number> <number> ..."
kientzle [Fri, 13 Jul 2007 15:09:07 +0000 (15:09 +0000)]
Fix running individual tests via "libarchive_test <number> <number> ..."

Approved by: re (blanket)

17 years agoArm doesn't have GENERIC.hints, so don't install it if it doesn't exist.
imp [Fri, 13 Jul 2007 14:28:10 +0000 (14:28 +0000)]
Arm doesn't have GENERIC.hints, so don't install it if it doesn't exist.

Approved by: re (kensmith)

17 years agoMFp4:
imp [Fri, 13 Jul 2007 14:27:05 +0000 (14:27 +0000)]
MFp4:
Add support for the CENTIPAD board (http://www.harerod.de/centipad/index.html)
(which is a very cool, very small ARM board)
Add support for KB9202B (it has different memory)
Make BOOT_FLAVOR settable
Minor cleanup nits

Approved by: re@

17 years agoAdd a Macbook/Macbook Pro compatible keyboard layout for French keyboards.
roberto [Fri, 13 Jul 2007 08:29:24 +0000 (08:29 +0000)]
Add a Macbook/Macbook Pro compatible keyboard layout for French keyboards.
It is a latin9/ISO_8859-15 and features dead keys for ^/uml/`, Euro, oe/OE
support and a few additional characters like copyright/trademark.

It is probably Powerbook/iBook compatible but I don't have a machine to test
it with and the primary objective was to have a correct keyboard for within
Parallels (for IntelMacs).

Approved by: re (hrs)

17 years agoUpdate with Bulletin C 34 from IERS: Still no leap second.
phk [Fri, 13 Jul 2007 08:24:04 +0000 (08:24 +0000)]
Update with Bulletin C 34 from IERS:  Still no leap second.

Approved by: re (hrs)

17 years agoUpdate a comment describing the page queues.
alc [Fri, 13 Jul 2007 04:42:20 +0000 (04:42 +0000)]
Update a comment describing the page queues.

Approved by: re (hrs)

17 years agoEliminate dead code.
alc [Thu, 12 Jul 2007 22:23:28 +0000 (22:23 +0000)]
Eliminate dead code.

Approved by: re (hrs)

17 years agoComplete repo-copy and move of Coda from src/sys/coda to src/sys/fs/coda
rwatson [Thu, 12 Jul 2007 21:04:58 +0000 (21:04 +0000)]
Complete repo-copy and move of Coda from src/sys/coda to src/sys/fs/coda
by removing files from src/sys/coda, and updating include paths in the
new location, kernel configuration, and  Makefiles.  In one case add
$FreeBSD$.

Discussed with: anderson, Jan Harkes <jaharkes@cs.cmu.edu>
Approved by: re (kensmith)
Repo-copy madness: simon

17 years agoForced commit to recognize repo-copy of Coda files from src/sys/coda to
rwatson [Thu, 12 Jul 2007 20:40:38 +0000 (20:40 +0000)]
Forced commit to recognize repo-copy of Coda files from src/sys/coda to
src/sys/fs/coda.

Discussed with:         anderson, Jan Harkes <jaharkes@cs.cmu.edu>
Approved by:            re (kensmith)
Repo-copy madness:      simon

17 years agoA couple late breaking bugs that testing have turned up.
jfv [Thu, 12 Jul 2007 19:04:11 +0000 (19:04 +0000)]
A couple late breaking bugs that testing have turned up.
- change include style so build in kernel try OR standalone work.
- Limit HWCSUM - I was led to believe that it would work with RSS,
  but our testing had odd issues which suggests this is false.
- A fatfinger error in the ioctl code made ifconfig up not work.

Approved by: re

17 years agoNew Driver for Intel 10G PCI-Express Dual Port Network adapter (82598)
jfv [Thu, 12 Jul 2007 18:49:01 +0000 (18:49 +0000)]
New Driver for Intel 10G PCI-Express Dual Port Network adapter (82598)
- ixgbe.c, ixgbe.h, and ixgbe_osdep.h make the core OS driver.
- Others are OS independent shared code.
- This is still a Beta driver, the Intel ship is a month or so off,
  so I welcome any feedback from early users.
Approved by: re

17 years agoFix a couple of issues with the stack limit for 32-bit processes on 64-bit
jhb [Thu, 12 Jul 2007 18:01:31 +0000 (18:01 +0000)]
Fix a couple of issues with the stack limit for 32-bit processes on 64-bit
kernels exposed by the recent fixes to resource limits for 32-bit processes
on 64-bit kernels:
- Let ABIs expose their maximum stack size via a new pointer in sysentvec
  and use that in preference to maxssiz during exec() rather than always
  using maxssiz for all processses.
- Apply the ABI's limit fixup to the previous stack size when adjusting
  RLIMIT_STACK to determine if the existing mapping for the stack needs to
  be grown or shrunk (as well as how much it should be grown or shrunk).

Approved by: re (kensmith)

17 years agorevert handling of ssid and bssid to be manadatory instead of advisory
sam [Thu, 12 Jul 2007 17:22:43 +0000 (17:22 +0000)]
revert handling of ssid and bssid to be manadatory instead of advisory

Prodded by: Kevin Gerry
Reviewed by: thompsa, sephe
Approved by: re (kensmith)

17 years agoRound up the FAT block size to a multiple of the sector size so that i/o
bde [Thu, 12 Jul 2007 17:17:47 +0000 (17:17 +0000)]
Round up the FAT block size to a multiple of the sector size so that i/o
to the FAT is possible.

Make the FAT block size less arbitrary before it is rounded up:
- for FAT12, default to 3*512 instead of to 3 sectors.  The magic 3 is
  the default number of 512-byte FAT sectors on a floppy drive.  That
  many sectors is too many if the sector size is larger.
- for !FAT12, default to PAGE_SIZE instead of to 4096.  Remove
  MSDOSFS_DFLTBSIZE since it only obfuscated this 4096.

For reading the BPB, use a block size of 8192 instead of 2048 so that
sector sizes up to 8192 can work.  We should try several sizes, or just
try the maximum supported size (MAXBSIZE = 64K).  I use 8192 because
that is enough for DVD-RW's (even 2048 is enough) and 8192 has been
tested a lot in use by ffs.

This completes fixing msdosfs for some large sector sizes (up to 8K
for read and 64K for write).  Microsoft documents support for sector
sizes up to 4K in mdosfs.  ffs is currently limited to 8K for both
read and write.

Approved by: re (kensmith)
Approved by: nyan (several years ago)

17 years agoFix a bug where the callout might not be initialized before being used.
njl [Thu, 12 Jul 2007 17:00:51 +0000 (17:00 +0000)]
Fix a bug where the callout might not be initialized before being used.
Rev 1.9 introduced another path where machclk_freq would be initialized
before the rest of setup was done (i.e. initializing the callout).  Make
the one-time initialization a separate function and make init_machclk()
able to be called multiple times, any time.  We depend on tsc_freq first
being updated from the highest priority eventhandler, thus we run last
and call init_machclk() to set machclk_freq.  Also, don't initialize
static variables to 0.

Tested by: Eygene Ryabinkin
Approved by: re

17 years agoFix some bugs involving the fsinfo block (many remain unfixed). This is
bde [Thu, 12 Jul 2007 16:09:07 +0000 (16:09 +0000)]
Fix some bugs involving the fsinfo block (many remain unfixed).  This is
part of fixing msdosfs for large sector sizes.  One of the fixed bugs
was fatal for large sector sizes.

1. The fsinfo block has size 512, but it was misunderstood and declared
   as having size 1024, with nothing in the second 512 bytes except a
   signature at the end.  The second 512 bytes actually normally (if
   the file system was created by Windows) consist of a second boot
   sector which is normally (in WinXP) empty except for a signature --
   the normal layout is one boot sector, one fsinfo sector, another
   boot sector, then these 3 sectors duplicated.  However, other
   layouts are valid.  newfs_msdos produces a valid layout with one
   boot sector, one fsinfo sector, then these 2 sectors duplicated.
   The signature check for the extra part of the fsinfo was thus
   normally checking the signature in either the second boot sector
   or the first boot sector in the copy, and thus accidentally
   succeeding.  The extra signature check would just fail for weirder
   layouts with 512-byte sectors, and for normal layouts with any other
   sector size.

   Remove the extra bytes and the extra signature check.

2. Old versions did i/o to the fsinfo block using size 1024, with the
   second half only used for the extra signature check on read.  This
   was harmless for sector size 512, and worked accidentally for sector
   size 1024.  The i/o just failed for larger sector sizes.

   The version being fixed did i/o to the fsinfo block using size
   fsi_size(pmp) = (1024 << ((pmp)->pm_BlkPerSec >> 2)).  This
   expression makes no sense.  It happens to work for sector small
   sector sizes, but for sector size 32K it gives the preposterous
   value of 64M and thus causes panics.  A sector size of 32768 is
   necessary for at least some DVD-RW's (where the minimum write size
   is 32768 although the minimum read size is 2048).

   Now that the size of the fsinfo block is 512, it always fits in
   one sector so there is no need for a macro to express it.  Just
   use the sector size where the old code uses 1024.

Approved by: re (kensmith)
Approved by: nyan (several years ago for a different version of (2))

17 years agoUpdate the mxge(4) driver's copyright to 2007, and drop
gallatin [Thu, 12 Jul 2007 16:04:55 +0000 (16:04 +0000)]
Update the mxge(4) driver's copyright to 2007, and drop
the binary distribution clause.

Approved by: re (bmah)

17 years agoCorrect multiple security issues in how libarchive handles corrupt
cperciva [Thu, 12 Jul 2007 15:00:28 +0000 (15:00 +0000)]
Correct multiple security issues in how libarchive handles corrupt
tar archives, including a potentially exploitable buffer overflow.

Approved by: re (kensmith, security blanket)
Reviewed by: kientzle
Security: FreeBSD-SA-07:05.libarchive