]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoAdd support for IODATA USB-RSAQ3 USB-Serial Adapter.
hrs [Sun, 3 Jul 2005 23:51:16 +0000 (23:51 +0000)]
Add support for IODATA USB-RSAQ3 USB-Serial Adapter.

Reported by: Tomokazu Hirai
Approved by: re (scottl)
MFC after: 3 days

19 years agoCheck the alignment of the IP header before passing the packet up to the
thompsa [Sun, 3 Jul 2005 18:24:03 +0000 (18:24 +0000)]
Check the alignment of the IP header before passing the packet up to the
packet filter. This would cause a panic on architectures that require strict
alignment such as sparc64, ia64 and ppc.

This uses the code block from if_bridge and the newly added macro
IP_HDR_ALIGNED_P().

This /might/ be a temporary messure before all NIC drivers are educated
to align the header themself.

PR: ia64/81284
Obtained from: NetBSD (if_bridge)
Approved by: re (dwhite), mlaier (mentor)

19 years ago- Update the CPU version check to recognize P4/EMT64 CPUs. [1]
jkoshy [Sun, 3 Jul 2005 16:33:22 +0000 (16:33 +0000)]
- Update the CPU version check to recognize P4/EMT64 CPUs. [1]
- Allow libpmc(3) to support P4/EMT64 PMCs on the amd64 architecture
  and AMD K8 PMCs on the i386. [2]

Submitted by: ps [1]
Pointy hat: myself [2]
Approved by: re (scottl)

19 years agoRemove ambiguity from hlen. IPv4 is now indicated by is_ipv4 and we need a
mlaier [Sun, 3 Jul 2005 15:42:22 +0000 (15:42 +0000)]
Remove ambiguity from hlen.  IPv4 is now indicated by is_ipv4 and we need a
proper hlen value for IPv6 to implement O_REJECT and O_LOG.

Reviewed by: glebius, brooks, gnn
Approved by: re (scottl)

19 years agoo Make ipw(4) more robust against frames received with a bad length.
damien [Sun, 3 Jul 2005 15:42:18 +0000 (15:42 +0000)]
o Make ipw(4) more robust against frames received with a bad length.
o Minor consistency tweaks.

Reviewed by: silby (mentor)
Approved by: re (scottl)

19 years agoo Add new ids for the Belkin F5D7050
damien [Sun, 3 Jul 2005 15:38:41 +0000 (15:38 +0000)]
o Add new ids for the Belkin F5D7050
o Indent usb ids properly
o Check the return value of if_alloc()
o Call if_free() in ural_detach()

Reviewed by: silby (mentor)
Approved by: re (scottl)

19 years agoAdd another ural(4) device (Belkin F5D7050)
damien [Sun, 3 Jul 2005 15:34:32 +0000 (15:34 +0000)]
Add another ural(4) device (Belkin F5D7050)

Reviewed by: silby (mentor)
Approved by: re (scottl)

19 years agoMFi386: r1.221 (Use a simpler implementation for the i8254 timecounter).
nyan [Sun, 3 Jul 2005 14:19:29 +0000 (14:19 +0000)]
MFi386: r1.221 (Use a simpler implementation for the i8254 timecounter).

Approved by: re (scottl)

19 years agoMinor grammar fix
delphij [Sun, 3 Jul 2005 12:35:11 +0000 (12:35 +0000)]
Minor grammar fix

Submitted by: Wojciech A. Koszek [dunstan at freebsd czest pl]
Approved by: re (hrs)

19 years agoSwitch Unicode charset name from "ISO-10646-UCS-2" to "UTF-16BE".
imura [Sun, 3 Jul 2005 01:12:37 +0000 (01:12 +0000)]
Switch Unicode charset name from "ISO-10646-UCS-2" to "UTF-16BE".
Using ISO-10646-UCS-2 will cause a problem when we use our own
iconv functions in the future, or port iconv other than GNU
libiconv.

Each vendors treat "UCS-2" as follows, and endian issue is
vendor specific:

 - Solaris 8 iconv
  Little Endian with BOM

 - HP-UX iconv
  Big Endian

 - NetBSD/i386 1.6 iconv
  Little Endian

 - GNU libiconv
  Big Endian

 - glibc(RedHat AS 2.1 x86) iconv
  Little Endian

 - IANA
  Name: ISO-10646-UCS-2
  MIBenum: 1000
  Source: the 2-octet Basic Multilingual Plane, aka Unicode
          this needs to specify network byte order: the standard
          does not specify (it is a 16-bit integer space)
  Alias: csUnicode

 - MSDN
  Little Endian
  http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemtextencodingclassgetencodingtopic2.asp

Now using UTF-16BE is harmless, because
- same as UCS-2 with 2 byte range (U+0000 - U+FFFF)
- kernel code of each file systems(cd9660, msdosfs, ntfs) believes
  Unicode is a 2 byte character at this time.
- UDF has only 2 byte range of Unicode filenames.
- It's defined at RFC2781.

So I believe it's time to change before starting new RELENG_6. :)

Approved by: re (scottl)

19 years agoImplement functions calls from within DDB on ia64. On ia64 a function
marcel [Sat, 2 Jul 2005 23:52:37 +0000 (23:52 +0000)]
Implement functions calls from within DDB on ia64. On ia64 a function
pointer doesn't point to the first instruction of that function, but
rather to a descriptor. The descriptor has the address of the first
instruction, as well as the value of the global pointer. The symbol
table doesn't know anything about descriptors, so if you lookup the
name of a function you get the address of the first instruction. The
cast from the address, which is the result of the symbol lookup, to a
function pointer as is done in db_fncall is therefore invalid.
Abstract this detail behind the DB_CALL macro. By default DB_CALL is
defined as db_fncall_generic, which yields the old behaviour. On ia64
the macro is defined as db_fncall_ia64, in which a descriptor is
constructed to yield a valid function pointer.

While here, introduce DB_MAXARGS. DB_MAXARGS replaces the existing
(local) MAXARGS. The DB_MAXARGS macro can be defined by platforms to
create a convenient maximum. By default this will be the legacy 10.
On ia64 we define this macro to be 8, for 8 is the maximum number of
arguments that can be passed in registers. This avoids having to
implement spilling of arguments on the memory stack.

Approved by: re (dwhite)

19 years agoCheck the alignment of the IP header before passing the packet up to the
thompsa [Sat, 2 Jul 2005 23:13:31 +0000 (23:13 +0000)]
Check the alignment of the IP header before passing the packet up to the
packet filter. This would cause a panic on architectures that require strict
alignment such as sparc64 (tier1) and ia64/ppc (tier2).

This adds two new macros that check the alignment, these are compile time
dependent on __NO_STRICT_ALIGNMENT which is set for i386 and amd64 where
alignment isn't need so the cost is avoided.

 IP_HDR_ALIGNED_P()
 IP6_HDR_ALIGNED_P()

Move bridge_ip_checkbasic()/bridge_ip6_checkbasic() up so that the alignment
is checked for ipfw and dummynet too.

PR: ia64/81284
Obtained from: NetBSD
Approved by: re (dwhite), mlaier (mentor)

19 years agoDon't ask about CD numbers if not installing from CD.
dwhite [Sat, 2 Jul 2005 22:34:22 +0000 (22:34 +0000)]
Don't ask about CD numbers if not installing from CD.

Approved by: re

19 years agoRemove the CPU_ENABLE_SSE option from the i386 and pc98 architectures,
delphij [Sat, 2 Jul 2005 20:06:44 +0000 (20:06 +0000)]
Remove the CPU_ENABLE_SSE option from the i386 and pc98 architectures,
as they are already default for I686_CPU for almost 3 years, and
CPU_DISABLE_SSE always disables it.  On the other hand, CPU_ENABLE_SSE
does not work for I486_CPU and I586_CPU.

This commit has:
- Removed the option from conf/options.*
- Removed the option and comments from MD NOTES files
- Simplified the CPU_ENABLE_SSE ifdef's so they don't
  deal with CPU_ENABLE_SSE from kernel configuration. (*)

For most users, this commit should be largely no-op.  If you used to
place CPU_ENABLE_SSE into your kernel configuration for some reason,
it is time to remove it.

(*) The ifdef's of CPU_ENABLE_SSE are not removed at this point, since
    we need to change it to !defined(CPU_DISABLE_SSE) && defined(I686_CPU),
    not just !defined(CPU_DISABLE_SSE), if we really want to do so.

Discussed on: -arch
Approved by: re (scottl)

19 years agoFix a buglet that was present in the ia64 code and that got inherited
marcel [Sat, 2 Jul 2005 19:57:31 +0000 (19:57 +0000)]
Fix a buglet that was present in the ia64 code and that got inherited
by amd64 and i386: For buffered writes we collect data and write it
out a ${DEV_BSIZE}-sized block at a time. The fragsz variable is used
to keep track of how much data we have collected in the buffer so far
and it's reset to zero immediately after writing a block to the dump
device.
When the last, possibly partially filled buffer is flushed, we didn't
reset fragsz to 0 and as such would stop reflecting reality. Since we
currently only need to do buffered writes once, this isn't a problem.
However, when kernel dumps are made by hand (say by callling doadump
from within DDB), the improperly cleared state from the first call to
dumpsys causes the next call to dumpsys to create an invalid code file.
This change resets fragsz after flushing the partially filled buffer so
that it fixes the two problems at once.

Approved by: re (scottl)

19 years agoAdd a missing ** to the 'command' command.
dannyboy [Sat, 2 Jul 2005 19:51:11 +0000 (19:51 +0000)]
Add a missing ** to the 'command' command.

PR: 79877
Submitted by: Kazuaki Oda <ybbkaz@yahoo.co.jp>
Reviewed by: ru
Approved by: re
MFC after: 1 day

19 years agoFix the alpha build by using the correct argument types for _kvm_kvatop().
scottl [Sat, 2 Jul 2005 05:49:29 +0000 (05:49 +0000)]
Fix the alpha build by using the correct argument types for _kvm_kvatop().

Submitted by: marcel
Approved by: re (implicit)

19 years agoFix for a bug in the change that defers sack option processing until
ps [Fri, 1 Jul 2005 22:54:18 +0000 (22:54 +0000)]
Fix for a bug in the change that defers sack option processing until
after PAWS checks. The symptom of this is an inconsistency in the cached
sack state, caused by the fact that the sack scoreboard was not being
updated for an ACK handled in the header prediction path.

Found by: Andrey Chernov.
Submitted by: Noritoshi Demizu, Raja Mukerji.
Approved by: re

19 years agoFix for a SACK crash caused by a bug in tcp_reass(). tcp_reass()
ps [Fri, 1 Jul 2005 22:52:46 +0000 (22:52 +0000)]
Fix for a SACK crash caused by a bug in tcp_reass(). tcp_reass()
does not clear tlen and frees the mbuf (leaving th pointing at
freed memory), if the data segment is a complete duplicate.
This change works around that bug. A fix for the tcp_reass() bug
will appear later (that bug is benign for now, as neither th nor
tlen is referenced in tcp_input() after the call to tcp_reass()).

Found by: Pawel Jakub Dawidek.
Submitted by: Raja Mukerji, Noritoshi Demizu.
Approved by: re

19 years agoMFi386: r1.221: use simple timecounter that is aware of irq0 being off.
peter [Fri, 1 Jul 2005 20:13:19 +0000 (20:13 +0000)]
MFi386: r1.221: use simple timecounter that is aware of irq0 being off.

Approved by:  re

19 years agoMistakingly undefined VN_KNOTE_LOCKED in my previous commit.
ssouhlal [Fri, 1 Jul 2005 17:13:59 +0000 (17:13 +0000)]
Mistakingly undefined VN_KNOTE_LOCKED in my previous commit.

Noticed by: Antoine Brodin <antoine.brodin@laposte.net>
Approved by: re (scottl)

19 years agoFix the recent panics/LORs/hangs created by my kqueue commit by:
ssouhlal [Fri, 1 Jul 2005 16:28:32 +0000 (16:28 +0000)]
Fix the recent panics/LORs/hangs created by my kqueue commit by:

- Introducing the possibility of using locks different than mutexes
for the knlist locking. In order to do this, we add three arguments to
knlist_init() to specify the functions to use to lock, unlock and
check if the lock is owned. If these arguments are NULL, we assume
mtx_lock, mtx_unlock and mtx_owned, respectively.

- Using the vnode lock for the knlist locking, when doing kqueue operations
on a vnode. This way, we don't have to lock the vnode while holding a
mutex, in filt_vfsread.

Reviewed by: jmg
Approved by: re (scottl), scottl (mentor override)
Pointyhat to: ssouhlal
Will be happy: everyone

19 years agoUpon relection, we shouldn't allow the tuple structs to be modified by
imp [Fri, 1 Jul 2005 15:52:50 +0000 (15:52 +0000)]
Upon relection, we shouldn't allow the tuple structs to be modified by
the functor, so make it a const pointer, and chase down the resulting
const-poisoning.

Approved by: re (scottl)

19 years agoUp the count of busses supported by usbd(8) from 4 to 40. With the advent
jhb [Fri, 1 Jul 2005 15:49:52 +0000 (15:49 +0000)]
Up the count of busses supported by usbd(8) from 4 to 40.  With the advent
of USB2 "duplicate" psuedo busses, it is not at all uncommon for machines
to have more than 4 USB busses nowadays.

PR: bin/81533
Submitted by: Darren Pilgrim dmp at bitfreak dot org
Approved by: re (scottl)
MFC after: 1 week

19 years agoUse a simpler implementation for the i8254 timecounter when using the lapic
jhb [Fri, 1 Jul 2005 15:47:27 +0000 (15:47 +0000)]
Use a simpler implementation for the i8254 timecounter when using the lapic
timer since irq0 isn't being driven at hz in that case and we don't need to
try to handle edge cases with rollover, etc. that require irq0 to be firing
for the timecounter to actually work.

Submitted by: phk
Tested by: schweikh
Approved by: re (scottl)

19 years agoFix what(1) on kernel binaries by duplicating part of version[] in sccs[]
jhb [Fri, 1 Jul 2005 15:43:09 +0000 (15:43 +0000)]
Fix what(1) on kernel binaries by duplicating part of version[] in sccs[]
and stop trying to play cute games so that sccs[] shares space with
version[].

Reported by: Jilles Tjoelker jilles at stack dot nl
Discussed with: bde, "R. Imura" imura at ryu16 dot org
Idea from: NetBSD (via bde)
Approved by: re (scottl)
MFC after: 1 week

19 years agoRemove the NQNFS paper.
phk [Fri, 1 Jul 2005 15:33:08 +0000 (15:33 +0000)]
Remove the NQNFS paper.

We removed the corresponding code long time ago and the historically
interested can find this paper in the cvs repo, there is no point
in installing it any more.

Approved by: re@

19 years agoUse m_uiotombuf() instead of own implementation. This is not just
glebius [Fri, 1 Jul 2005 15:22:47 +0000 (15:22 +0000)]
Use m_uiotombuf() instead of own implementation. This is not just
a cosmetic change. m_uiotombuf() produces a packet header mbuf, while
original implementation did not. When kernel is compiled with MAC
support, headerless mbuf will cause panic.

Reported by: Alexander Nikiforenko <asn rambler-co.ru>
Approved by: re (scottl)
MFC After: 2 weeks

19 years ago- Providing fine-grained malloc statistic by replacing M_DEVBUF with
avatar [Fri, 1 Jul 2005 15:21:30 +0000 (15:21 +0000)]
- Providing fine-grained malloc statistic by replacing M_DEVBUF with
  module-specific malloc types.  These should help us to pinpoint the
  possible memory leakage in the future.
- Implementing xpt_alloc_ccb_nowait() and replacing all malloc/free based
  CCB memory management with xpt_alloc_ccb[_nowait]/xpt_free_ccb.  Hopefully
  this would be helpful if someday we move the CCB allocator to use UMA
  instead of malloc().

Encouraged by: jeffr, rwatson
Reviewed by: gibbs, scottl
Approved by: re (scottl)

19 years agoAdd an entry about absolute PAM module paths, backdated to when the
des [Fri, 1 Jul 2005 15:12:09 +0000 (15:12 +0000)]
Add an entry about absolute PAM module paths, backdated to when the
change happened.

Submitted by: rwatson
Approved by: re (scottl)

19 years agoFix another fallout from the ifnet change that assumed that a softc
harti [Fri, 1 Jul 2005 10:45:02 +0000 (10:45 +0000)]
Fix another fallout from the ifnet change that assumed that a softc
starts with an ifatm which in turns has an ifnet. Remove also a couple
of unneccessary casts that could hide such things in the future.

Approved by: re

19 years agoBump document date. Remove EOL whitespace introduced in previous
cperciva [Fri, 1 Jul 2005 10:04:33 +0000 (10:04 +0000)]
Bump document date.  Remove EOL whitespace introduced in previous
commit.  Start new line at sentence break in previous commit.

Approved by: re (implicit, fixing a commit made 5 minutes ago)

19 years agoDocument some limitations of uid/gid rules.
cperciva [Fri, 1 Jul 2005 09:51:10 +0000 (09:51 +0000)]
Document some limitations of uid/gid rules.

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

19 years agoWhen doing ARP load balancing source IP is taken in network byte order,
glebius [Fri, 1 Jul 2005 08:22:13 +0000 (08:22 +0000)]
When doing ARP load balancing source IP is taken in network byte order,
so residue of division for all hosts on net is the same, and thus only
one VHID answers. Change source IP in host byte order.

Reviewed by: mlaier
Approved by: re (scottl)

19 years agoMake a pass and cleanup the printfs from this driver.
imp [Fri, 1 Jul 2005 05:31:23 +0000 (05:31 +0000)]
Make a pass and cleanup the printfs from this driver.

Approved by: re (scottl) blanket ep

19 years agoUpdate the diagnostics section with all the messages from the driver
imp [Fri, 1 Jul 2005 05:28:55 +0000 (05:28 +0000)]
Update the diagnostics section with all the messages from the driver
as of this date.  Bump the date as well.

Approved by: re (scottl) blanket ep

19 years agoMinor cleanup of ep driver and pccard attachment:
imp [Fri, 1 Jul 2005 04:23:32 +0000 (04:23 +0000)]
Minor cleanup of ep driver and pccard attachment:
o Grab the MAC address out of the CIS if the card has the special
  3Com 0x88 tuple.  Most 3Com cards don't have this tuple, but we
  prefer it to the eeprom since it only appears to be present when
  the eeprom doesn't have the info.  So far, I've only observed this
  on my 3C362 and 3C362B cards, but the NetBSD driver implies that
  the 3C362C also has this tuple, and that some 3C574 cards do too (none
  of mine do).  ep_pccard_mac was written after looking at the NetBSD
  code.
o Store the enet addr in the softc for this device, so we can use the
  overridden MAC to set the station address.
o Create a routine to set the station address and use it where we need it.
o setup the cmd shitfs and such before we call ep_alloc(), and remove
  setting up the cmd shift value there.  It initializes to 0, and those
  attachments that need to frob it do so before calling ep_alloc.
o Remove some obsolete comments
o No longer a need to export ep_get_macaddr, so make it static
o ep_alloc already grabs the EEPROM id, so we don't need to grab it again
  in ep_pccard_attach.
o eliminate unit, it isn't needed, fix some printfs to be device_printf
  instead.

# All my pccards except the 3C1 work now.  Didn't test ISA or cbus cards
# that I have: 3C509B-TP or 3C569B-J-TPO

Tested on: 3C589B, 3C589C, 3C589D, 3C589D-TP, 3C562, 3C562B/3C563B,
3C562D/3C563D, 3CCFE574BT, 3CXEM556, 3CCSH572BT, 3C574-TX,
3CCE589EC, 3CXE589EC, 3CCFEM556, 3C1
Approved by: re (scottl)

19 years agoUse correct pointer type. This should fix non-functional re(4)
yongari [Fri, 1 Jul 2005 04:12:42 +0000 (04:12 +0000)]
Use correct pointer type. This should fix non-functional re(4)
driver on 64bit architectures.

Approved by: re (scottl)

19 years agoAdd examples illustrating how to record system-wide profiles and
jkoshy [Fri, 1 Jul 2005 03:50:30 +0000 (03:50 +0000)]
Add examples illustrating how to record system-wide profiles and
how to convert these to gprof(1) flat profiles.  Augment description
for the '-g' option.

Remove superfluous quotes around a macro argument, bump document date [1].

Reminded by: ru [1]
Approved by: re (blanket hwpmc)

19 years agoUnbreak tinderbox builds. Remove a debug printf.
jkoshy [Fri, 1 Jul 2005 03:45:01 +0000 (03:45 +0000)]
Unbreak tinderbox builds.  Remove a debug printf.

Approved by: re (blanket hwpmc)

19 years agoAdd a much-requested feature: The ability for pccard attachments to
imp [Fri, 1 Jul 2005 03:40:28 +0000 (03:40 +0000)]
Add a much-requested feature: The ability for pccard attachments to
scan the CIS for interesting tuples.  95% of what can be obtained from
the CIS is harvested by the pccard layer and presented to the user in
standard function calls.  However, there are special needs at times
where the standard stuff doesn't suffice.  This is for those special
cases.

CARD_SCAN_CIS(device_get_parent(dev), function, argp)
scans the CIS of the card, passing each tuple to function with
the tuple and argp as its arguments.  Returning 0 continues the scan,
while returning 1 terminates the scan.  The value of the last
invocation of function is returned from this function.

int (*pccard_scan_t)(struct pccard_tuple *tuple, void *argp)
function called for each tuple.  Elements of the CIS tuple can be
read with pccard_tuple_read_{1,2,3,4,n}().  You are reading
the actual tuple memory each time, in case your card has
registers in the CIS.

# I suppose these things should be documented in pccard(4) or something like
# that.

# I plan on unifying cardbus CIS support in a similar way.

Approved by: re (scottl)

19 years agoMFP4:
jkoshy [Thu, 30 Jun 2005 19:01:26 +0000 (19:01 +0000)]
MFP4:

- pmcstat(8) gprof output mode fixes:

  lib/libpmc/pmclog.{c,h}, sys/sys/pmclog.h:
  + Add a 'is_usermode' field to the PMCLOG_PCSAMPLE event
  + Add an 'entryaddr' field to the PMCLOG_PROCEXEC event,
    so that pmcstat(8) can determine where the runtime loader
    /libexec/ld-elf.so.1 is getting loaded.

  sys/kern/kern_exec.c:
  + Use a local struct to group the entry address of the image being
    exec()'ed and the process credential changed flag to the exec
    handling hook inside hwpmc(4).

  usr.sbin/pmcstat/*:
  + Support "-k kernelpath", "-D sampledir".
  + Implement the ELF bits of 'gmon.out' profile generation in a new
    file "pmcstat_log.c".  Move all log related functions to this
    file.
  + Move local definitions and prototypes to "pmcstat.h"

- Other bug fixes:
  + lib/libpmc/pmclog.c: correctly handle EOF in pmclog_read().
  + sys/dev/hwpmc_mod.c: unconditionally log a PROCEXIT event to all
    attached PMCs when a process exits.
  + sys/sys/pmc.h: correct a function prototype.
  + Improve usage checks in pmcstat(8).

Approved by: re (blanket hwpmc)

19 years agoNew release notes: SA-05:13.ipfw, SA-05:14.bzip2, SA-05:15.tcp.
bmah [Thu, 30 Jun 2005 18:17:09 +0000 (18:17 +0000)]
New release notes:  SA-05:13.ipfw, SA-05:14.bzip2, SA-05:15.tcp.

Approved by: re (blanket relnotes)

19 years agoRemove REQUIRE and BEFORE lines since this script is not run by rcorder
brooks [Thu, 30 Jun 2005 17:50:34 +0000 (17:50 +0000)]
Remove REQUIRE and BEFORE lines since this script is not run by rcorder
at startup.  Instead it is called by other scripts.

Approved by: re (network interface startup blanket)

19 years agoUse SCTL_MASK32 to determine that the sysctl call is from a 32bit
ps [Thu, 30 Jun 2005 17:17:29 +0000 (17:17 +0000)]
Use SCTL_MASK32 to determine that the sysctl call is from a 32bit
binary for kern.cp_time.

Approved by: re

19 years ago- Retire the Early Adopter's Guide in HEAD.
rushani [Thu, 30 Jun 2005 16:26:24 +0000 (16:26 +0000)]
- Retire the Early Adopter's Guide in HEAD.

- Remove following files since their contents are merged into
  relnotes/common/new.sgml years ago.

    relnotes/common/artheader.sgml
    relnotes/common/intro.sgml
    relnotes/common/upgrading.sgml

Approved by: re (hrs)

19 years agoMFi386: revision 1.615 (change kernel crashdump format to ELF).
nyan [Thu, 30 Jun 2005 15:26:03 +0000 (15:26 +0000)]
MFi386: revision 1.615 (change kernel crashdump format to ELF).

Approved by: re (scottl)

19 years agoUse 'manual page' instead of 'man page' for consistency.
hmp [Thu, 30 Jun 2005 13:18:15 +0000 (13:18 +0000)]
Use 'manual page' instead of 'man page' for consistency.

Approved by: re (hrs)

19 years agoUse 'manual page' instead of 'man page' for consistency.
hmp [Thu, 30 Jun 2005 13:04:25 +0000 (13:04 +0000)]
Use 'manual page' instead of 'man page' for consistency.

Approved by: re (hrs)

19 years agoUse consistent translation for the word ``interface''.
rushani [Thu, 30 Jun 2005 12:54:57 +0000 (12:54 +0000)]
Use consistent translation for the word ``interface''.

Approved by: re (hrs)

19 years agoMerge the following from the English version:
rushani [Thu, 30 Jun 2005 12:54:30 +0000 (12:54 +0000)]
Merge the following from the English version:

1.3  -> 1.7 Makefile
1.65 -> 1.73 errata/article.sgml

Approved by: re (hrs)

19 years agoUpdate Russian override of dev-auto.sgml
den [Thu, 30 Jun 2005 12:07:29 +0000 (12:07 +0000)]
Update Russian override of dev-auto.sgml

Obtained from:  The FreeBSD Russian Documentation Project
Approved by:    re (blanket)

19 years agoOur bsd.*.mk only supports 6 WARNS levels and we should not use higher values
johan [Thu, 30 Jun 2005 11:56:31 +0000 (11:56 +0000)]
Our bsd.*.mk only supports 6 WARNS levels and we should not use higher values
until it does.

Approved by: re (dwhite)

19 years agoMerge the following from the English version:
den [Thu, 30 Jun 2005 11:35:03 +0000 (11:35 +0000)]
Merge the following from the English version:

   1.278 -> 1.282 hardware/common/dev.sgml
   1.31 -> 1.32 installation/common/install.sgml
   1.17 -> 1.19 installation/common/trouble.sgml
   1.6 -> 1.7 installation/common/artheader.sgml
   1.845 -> 1.879 relnotes/common/new.sgml
   1.36 -> 1.37 readme/article.sgml

Obtained from: The FreeBSD Russian Documentation Project
Approved by: re (blanket)

19 years agoJumbo-commit to enhance 32 bit application support on 64 bit kernels.
peter [Thu, 30 Jun 2005 07:49:22 +0000 (07:49 +0000)]
Jumbo-commit to enhance 32 bit application support on 64 bit kernels.
This is good enough to be able to run a RELENG_4 gdb binary against
a RELENG_4 application, along with various other tools (eg: 4.x gcore).
We use this at work.

ia32_reg.[ch]: handle the 32 bit register file format, used by ptrace,
procfs and core dumps.
procfs_*regs.c: vary the format of proc/XXX/*regs depending on the client
and target application.
procfs_map.c: Don't print a 64 bit value to 32 bit consumers, or their
sscanf fails.  They expect an unsigned long.
imgact_elf.c: produce a valid 32 bit coredump for 32 bit apps.
sys_process.c: handle 32 bit consumers debugging 32 bit targets.  Note
that 64 bit consumers can still debug 32 bit targets.

IA64 has got stubs for ia32_reg.c.

Known limitations: a 5.x/6.x gdb uses get/setcontext(), which isn't
implemented in the 32/64 wrapper yet.  We also make a tiny patch to
gdb pacify it over conflicting formats of ld-elf.so.1.

Approved by: re

19 years agoBegin promoting the AMD-originated feature flags to first class flags, now
peter [Thu, 30 Jun 2005 06:44:34 +0000 (06:44 +0000)]
Begin promoting the AMD-originated feature flags to first class flags, now
that newer Intel cpu hardware implements them too.  This includes things
like the NX (pte no-execute) flag for execute protection.  We'll need to
reference this for implementing no-exec in pmap.c at some point.

Some feature flags are duplicated in both the Intel-orignated bits and
the AMD bits.  Suppress the the duplicates correctly - the old code
assumed they were a 1:1 mapping which is not correct.  We can't just mask
off the bits present in cpu_feature.

Converge with amd64 where this originated from.

Intel cpu's that implement any AMD features will report them in dmesg now.

Approved by: re

19 years agoTidy up the markup.
ru [Thu, 30 Jun 2005 06:35:51 +0000 (06:35 +0000)]
Tidy up the markup.

Approved by: re (blanket manpages)

19 years agoDon't complain when we receive smtp, pop, nntp, www, finger, and irc
brooks [Thu, 30 Jun 2005 05:50:52 +0000 (05:50 +0000)]
Don't complain when we receive smtp, pop, nntp, www, finger, and irc
server options.

Reported by: Max Boyarov <max_b at tut dot by>
Approved by: re (dhclient blanket)

19 years agoi386->amd64 sync
peter [Thu, 30 Jun 2005 05:37:48 +0000 (05:37 +0000)]
i386->amd64 sync
Add ath_hal and ichwd modules

Approved by:  re (blanked i386<->amd64 sync)

19 years agoSync i386->amd64.
peter [Thu, 30 Jun 2005 05:33:26 +0000 (05:33 +0000)]
Sync i386->amd64.
* Add ichwd (The Intel EM64T folks have an ICH)
* Cosmetic comment syncs
* Merge cpufreq change over to NOTES
* add pbio (it compiles, but isn't useful since no boxes have ISA slots)
* copy ath settings (note: wlan disabled here since its in global NOTES)
* copy profiling, including fixing a previous i386->amd64 merge typo.

Approved by: re (blanket i386 <-> amd64 sync/convergence)

19 years agoPeople like to do RFC violating things with the domain-name option and
brooks [Thu, 30 Jun 2005 05:32:42 +0000 (05:32 +0000)]
People like to do RFC violating things with the domain-name option and
include a space seperated list of domains instead of the domain of the
host.  This is supported on too many platforms to break for now so,
remove validation of this option for the moment.

The correct solution longer term is to implement RFC 3397 support and
then treat domain-name options containing space seperated lists of
domains as domain-search options for backwards compatability.

Approved by: re (dhclient blanket)

19 years agoFixed two bugs in Perl to C conversion that prevented locale name
ru [Thu, 30 Jun 2005 05:31:01 +0000 (05:31 +0000)]
Fixed two bugs in Perl to C conversion that prevented locale name
from being parsed correctly.

OK'ed by: markm
Approved by: re (scottl)
MFC after: 3 days

19 years ago - Remove the pccard_ifconfig variable in favor of a new
brooks [Thu, 30 Jun 2005 05:02:34 +0000 (05:02 +0000)]
 - Remove the pccard_ifconfig variable in favor of a new
   ifconfig_DEFAULT variable.  Unlike pccard_ifconfig, ifconfig_DEFAULT
   applies to all interfaces that do not specify an ifconfig_<ifn>
   variable rather than just those listed in removable_interfaces.
 - Correct the list of interfaces when network_interfaces and
   removable_interfaces are both set by including removable_interfaces
   in the list of canidates.
 - When listing dhcp interfaces, include those with other ifconfig
   options so nat works.

Approved by: re (network interface startup blanket)

19 years agoFix grammar and markup nits, do some wordsmithing.
bmah [Thu, 30 Jun 2005 04:55:46 +0000 (04:55 +0000)]
Fix grammar and markup nits, do some wordsmithing.

Approved by: re (blanket relnotes)

19 years agoAdd support for starting wpa_supplicant by adding the WPA keyword to an
brooks [Thu, 30 Jun 2005 04:52:47 +0000 (04:52 +0000)]
Add support for starting wpa_supplicant by adding the WPA keyword to an
interface's ifconfig_<ifn> entry in /etc/rc.conf.

Approved by: re (network interface startup blanket)

19 years agoWhen interfaces are given on the command line, don't attempt to filter
brooks [Thu, 30 Jun 2005 04:46:21 +0000 (04:46 +0000)]
When interfaces are given on the command line, don't attempt to filter
them.  Just try to run the given command on them.  We need to be able to
run stop functions on interfaces that have been deleted to stop
wpa_supplicant.

Approved by: re (interface startup blanket)

19 years agoSecond part of commit for moving KDB_STOP_NMI from opt_global.h to
peter [Thu, 30 Jun 2005 03:38:10 +0000 (03:38 +0000)]
Second part of commit for moving KDB_STOP_NMI from opt_global.h to
opt_kdb.h.

Found by:     kris
Approved by:  re

19 years agoFix markup, correct typos, improve grammar, move the BUGS section to
jkoshy [Thu, 30 Jun 2005 02:38:46 +0000 (02:38 +0000)]
Fix markup, correct typos, improve grammar, move the BUGS section to
the end of the manual page.

Submitted by: ru
Approved by: re (blanket hwpmc)

19 years agoMatch _kvm_kvatop to it's prototype in kvm_i386.c. This unbreaks
ps [Thu, 30 Jun 2005 01:25:21 +0000 (01:25 +0000)]
Match _kvm_kvatop to it's prototype in kvm_i386.c.  This unbreaks
the build.

Approved by: re

19 years agoAdd a special-case handler for general protection faults. It appears to
peter [Thu, 30 Jun 2005 00:26:54 +0000 (00:26 +0000)]
Add a special-case handler for general protection faults.  It appears to
be possible to get the swapgs state reversed if doreti traps during
the iretq.  Attempt to handle this.  load_gs() might need special
handling too.  Running the kernel with the user's TLS and the
kernel's PCPU space interchanged would be bad(TM).

Discovered as a result of a conversation with:  bde
Approved by:  re

19 years agoConditionally weaken sys_generic.c rev 1.136 to allow certain dubious
peter [Thu, 30 Jun 2005 00:19:08 +0000 (00:19 +0000)]
Conditionally weaken sys_generic.c rev 1.136 to allow certain dubious
ioctl numbers in backwards compatability mode.  eg: an IOC_IN ioctl with
a size of zero.  Traditionally this was what you did before IOC_VOID
existed, and we had some established users of this in the tree, namely
procfs.  Certain 3rd party drivers with binary userland components also
have this too.

This is necessary to have 4.x and 5.x binaries use these ioctl's.  We
found this at work when trying to run 4.x binaries.

Approved by: re

19 years agoAdd COMPAT_FREEBSD5
peter [Thu, 30 Jun 2005 00:09:18 +0000 (00:09 +0000)]
Add COMPAT_FREEBSD5

Approved by: re

19 years agoMove the KDB_STOP_NMI option from opt_global.h to opt_kdb.h
peter [Wed, 29 Jun 2005 23:23:16 +0000 (23:23 +0000)]
Move the KDB_STOP_NMI option from opt_global.h to opt_kdb.h

Approved by: re

19 years agoClean out the leftovers from the i386_set_gsbase() TLS conversion.
peter [Wed, 29 Jun 2005 23:15:36 +0000 (23:15 +0000)]
Clean out the leftovers from the i386_set_gsbase() TLS conversion.

Like on libthr, there is an i386_set_gsbase() stub implementation here
to avoid libc.so.5 issues.  This should likely be a weak symbol and I
expect this will be fixed soon.

Approved by: re

19 years agoSupport crash dumps > 4GB in size on 32 bit platforms. _kvm_kvatop()
peter [Wed, 29 Jun 2005 22:39:41 +0000 (22:39 +0000)]
Support crash dumps > 4GB in size on 32 bit platforms.  _kvm_kvatop()
returned an lseek offset in a "u_long *" value, which can't express >4GB
offsets on 32 bit machines (eg: PAE).  Change to "off_t *" for all.

Support ELF crashdumps on i386 and amd64.

Support PAE crashdumps on i386.  This is done by auto-detecting the
presence of the IdlePDPT which means that PAE is active.

I used Marcel's _kvm_pa2off strategy and ELF header reader for ELF support
on amd64.  Paul Saab ported the amd64 changes to i386 and we implemented
the PAE support from there.

Note that gdb6 in the src tree uses whatever libkvm supports.  If you want
to debug an old crash dump, you might want to keep an old libkvm.so handy
and use LD_PRELOAD or the like.  This does not detect the old raw dump
format.

Approved by: re

19 years agoSwitch AMD64 and i386 platforms to using ELF as their kernel crash
peter [Wed, 29 Jun 2005 22:28:46 +0000 (22:28 +0000)]
Switch AMD64 and i386 platforms to using ELF as their kernel crash
dump format.  The key reason to do this is so that we can dump sparse
address space.  For example, we need to be able to skip the PCI hole
just below the 4GB boundary.  Trying to destructively dump MMIO device
registers is Really Bad(TM).  The frequent result of trying to do a
crash dump on a machine with 4GB or more ram was ugly (lockup or reboot).

This code has been taken directly from the IA64 dump_machdep.c code,
with just a few (mostly minor) mods.

Introduce a dump_avail[] array in the machdep.c code so that we have a
source of truth for what memory is present in a machine that needs to be
dumped.  We can't use phys_avail[] because all sorts of things slice
memory out of it that we really need to dump.  eg: the vm page array
and the dmesg buffer.  dump_avail[] is pretty much an unmolested version
of phys_avail[].  It does have Maxmem correction.

Bump the i386 and amd64 dump format to version 2, but nothing actually
uses this.  amd64 was actually using the i386 dump version number.

libkvm support to follow.

Approved by: re

19 years agoFix ipfw packet matching errors with address tables.
simon [Wed, 29 Jun 2005 21:36:49 +0000 (21:36 +0000)]
Fix ipfw packet matching errors with address tables.

The ipfw tables lookup code caches the result of the last query.  The
kernel may process multiple packets concurrently, performing several
concurrent table lookups.  Due to an insufficient locking, a cached
result can become corrupted that could cause some addresses to be
incorrectly matched against a lookup table.

Submitted by: ru
Reviewed by: csjp, mlaier
Security: CAN-2005-2019
Security: FreeBSD-SA-05:13.ipfw

Correct bzip2 permission race condition vulnerability.

Obtained from: Steve Grubb via RedHat
Security: CAN-2005-0953
Security: FreeBSD-SA-05:14.bzip2
Approved by: obrien

Correct TCP connection stall denial of service vulnerability.

A TCP packets with the SYN flag set is accepted for established
connections, allowing an attacker to overwrite certain TCP options.

Submitted by: Noritoshi Demizu
Reviewed by: andre, Mohan Srinivasan
Security: CAN-2005-2068
Security: FreeBSD-SA-05:15.tcp

Approved by: re (security blanket), cperciva

19 years agoSync if_bridge to NetBSD r1.31
thompsa [Wed, 29 Jun 2005 19:23:32 +0000 (19:23 +0000)]
Sync if_bridge to NetBSD r1.31

Rename conflicting variables when handling SNAP Ethernet frames.

Obtained from: NetBSD
Approved by: mlaier (mentor)
Approved by: re (blanket)

19 years agoo Fix a write mbuf-after-free bug. The duration field of the 802.11 header
damien [Wed, 29 Jun 2005 17:54:01 +0000 (17:54 +0000)]
o Fix a write mbuf-after-free bug.  The duration field of the 802.11 header
  was written in the old fragmented mbuf chain instead of the defragmented
  one.  Thus, the duration field of outgoing frames was incorrect.

o Only call m_defrag() if the mbuf fragmentation threshold is greater
  than what is currently supported by the driver.

Reviewed by:    silby (mentor)
Approved by:    re (scottl)

19 years agoRegenerate after addition of audit event type number to syscalls.master
rwatson [Wed, 29 Jun 2005 17:29:06 +0000 (17:29 +0000)]
Regenerate after addition of audit event type number to syscalls.master
file format.

Approved by: re (scottl)

19 years agoDuring the system call table format change adding audit record event
rwatson [Wed, 29 Jun 2005 17:27:40 +0000 (17:27 +0000)]
During the system call table format change adding audit record event
fields for each system call, I missed two system call files because
they weren't named syscalls.master.  Catch up with this last two,
mapping the system calls to the NULL event for now.

Spotted by: jhb
Approved by: re (scottl)

19 years ago- Change the commented out freebsd32_xxx() example to use kern_xxx() along
jhb [Wed, 29 Jun 2005 15:16:20 +0000 (15:16 +0000)]
- Change the commented out freebsd32_xxx() example to use kern_xxx() along
  with a single copyin() + translate and translate + copyout() rather than
  using the stackgap.
- Remove implementation of the stackgap for freebsd32 since it is no longer
  used for that compat ABI.

Approved by: re (scottl)

19 years agoIncrease MAXCPU to 16 in SMP kernels so that APIC IDs from 0 to 15 are
jhb [Wed, 29 Jun 2005 15:13:25 +0000 (15:13 +0000)]
Increase MAXCPU to 16 in SMP kernels so that APIC IDs from 0 to 15 are
allowed for CPUs.

Tested by: amd64 at cybernetwork dot org
Approved by: re (scottl)
MFC after: 1 week

19 years agoFix the false memory modified after free messages some users have been
silby [Wed, 29 Jun 2005 08:18:26 +0000 (08:18 +0000)]
Fix the false memory modified after free messages some users have been
reporting - in my previous change, I missed the case where a mbuf
from the packet zone was freed back to the mbuf/packet keg, where
it was subsequently put into the mbuf zone and found not to contain
the expected trash.  This change adds the necessary trash_dtor call inside
mb_fini_pack so that everything is correct.

Thanks for Bosko for finding the bug and showing me how secondary zones
work.

Approved by: re (dwhite)

19 years agoRemove isc-dhcp files from HEAD now that we're using the OpenBSD
brooks [Wed, 29 Jun 2005 01:46:40 +0000 (01:46 +0000)]
Remove isc-dhcp files from HEAD now that we're using the OpenBSD
dhclient.

Reminded by: ru
Approved by: re (blanket dhclient)

19 years agoRequire gateways for routes to be of the same address family as the
qingli [Tue, 28 Jun 2005 23:32:22 +0000 (23:32 +0000)]
Require gateways for routes to be of the same address family as the
route itself.

It fixes a bug where an IPv4 route for example has an IPv6 gateway
specified:

     route add 10.1.1.1 -inet6 fe80::1%fxp0

     Destination  Gateway       Flags  Refs  Use  Netif Expire
     10.1.1.1     fe80::1%fxp0  UGHS   0     0    fxp0

The fix rejects these illegal combinations:

     route: writing to routing socket: Invalid argument
     add host 10.1.1.1: gateway fe80::1%fxp0: Invalid argument

Reviewed by: KAME jinmei@isl.rdc.toshiba.co.jp
Reviewed by: andre (mentor)
Approved by: re
MFC after: 5

19 years agoAdd a chipset field to the lookup. Use this chipset type to determine
imp [Tue, 28 Jun 2005 21:56:04 +0000 (21:56 +0000)]
Add a chipset field to the lookup.  Use this chipset type to determine
which command to use to read the eeprom and which devices have an MII.
Simplify code by no longer using the OLDCARD compat rouintes (I don't
know if this breaks OLDCARD on pc98 or not, but OLDCARD on pc98 days
are numbered, I hope).  This also removes a number of kludges that we
had before because they are OBE.  Add a convenience routine to lookup
the device to avoid many casts in many places.

Tested with: 3C589D-TP, 3CCSH572BT
Approved by: re (scottl, blanket ep)

19 years agoDisable the drm_initmap calls in radeon_cp.c, due to them resulting in improper
anholt [Tue, 28 Jun 2005 21:38:08 +0000 (21:38 +0000)]
Disable the drm_initmap calls in radeon_cp.c, due to them resulting in improper
handling of pci resources, and mapping framebuffer leading to panics on X
startup.  The proper solution involves use of bus_alloc_resource without
RF_ACTIVE, but this code is being rewritten in DRM CVS currently, and disabling
for now doesn't remove any features, so take the easy route.

PR: kern/80718
Approved by: re (scottl)

19 years agoUse 'manual page' instead of 'man page' for consistency.
hmp [Tue, 28 Jun 2005 20:15:19 +0000 (20:15 +0000)]
Use 'manual page' instead of 'man page' for consistency.

Approved by: re (hrs)

19 years agoZero donecount on auto request sense.
sos [Tue, 28 Jun 2005 09:06:52 +0000 (09:06 +0000)]
Zero donecount on auto request sense.

PR: 81450
Approved by: re@ (scottl)

19 years agoFix panic after ifnet changes in rev. 1.30. sc->sc_ifp is a
bz [Tue, 28 Jun 2005 06:55:45 +0000 (06:55 +0000)]
Fix panic after ifnet changes in rev. 1.30. sc->sc_ifp is a
pointer now and needs to be allocated before using.

Reviewed by: gnn
Approved by: re (scottl), rwatson (mentor)

19 years agoCorrect a comment in ucred.h.
delphij [Tue, 28 Jun 2005 02:23:56 +0000 (02:23 +0000)]
Correct a comment in ucred.h.

Submitted by: Wojciech A. Koszek <dunstan at freebsd czest pl>
PR: kern/82708
Approved by: re (scottl)

19 years agoHandle B-unit break instructions. The break.b is unique in that the
marcel [Mon, 27 Jun 2005 23:51:38 +0000 (23:51 +0000)]
Handle B-unit break instructions. The break.b is unique in that the
immediate is not saved by the architecture. Any of the break.{mifx}
instructions have their immediate saved in cr.iim on interruption.
Consequently, when we handle the break interrupt, we end up with a
break value of 0 when it was a break.b. The immediate is important
because it distinguishes between different uses of the break and
which are defined by the runtime specification.
The bottomline is that when the GNU debugger replaces a B-unit
instruction with a break instruction in the inferior, we would not
send the process a SIGTRAP when we encounter it, because the value
is not one we recognize as a debugger breakpoint.

This change adds logic to decode the bundle in which the break
instruction lives whenever the break value is 0. The assumption
being that it's a break.b and we fetch the immediate directly out
of the instruction. If the break instruction was not a break.b,
but any of break.{mifx} with an immediate of 0, we would be doing
unnecessary work. But since a break 0 is invalid, this is not a
problem and it will still result in a SIGILL being sent to the
process.

Approved by: re (scottl)

19 years agoReplace the existing copyright notice with my own. Over the years I've
marcel [Mon, 27 Jun 2005 23:34:35 +0000 (23:34 +0000)]
Replace the existing copyright notice with my own. Over the years I've
changed this file so much that it's equivalent to a rewrite, and I'm not
talking about any of the cosmetic changes of course.

Approved by: re (scottl)

19 years agoCosmetic: s/u_int64_t/uint64_t/g
marcel [Mon, 27 Jun 2005 23:29:06 +0000 (23:29 +0000)]
Cosmetic: s/u_int64_t/uint64_t/g

Approved by: re (scottl)

19 years ago- Postpone SACK option processing until after PAWS checks. SACK option
ps [Mon, 27 Jun 2005 22:27:42 +0000 (22:27 +0000)]
- Postpone SACK option processing until after PAWS checks. SACK option
  processing is now done in the ACK processing case.
- Merge tcp_sack_option() and tcp_del_sackholes() into a new function
  called tcp_sack_doack().
- Test (SEG.ACK < SND.MAX) before processing the ACK.

Submitted by: Noritoshi Demizu
Reveiewed by: Mohan Srinivasan, Raja Mukerji
Approved by: re

19 years agoLibalias incorrectly applies proxy rules to the global divert
phk [Mon, 27 Jun 2005 22:21:42 +0000 (22:21 +0000)]
Libalias incorrectly applies proxy rules to the global divert
socket: it should only look for existing translation entries,
not create new ones (no matter how it got the idea).

Approved by: re(scottl)

19 years agoFix a panic when bringing up the bridge interface. We were casting a ifnet
thompsa [Mon, 27 Jun 2005 21:58:12 +0000 (21:58 +0000)]
Fix a panic when bringing up the bridge interface. We were casting a ifnet
pointer to a softc which is no longer valid since the ifnet struct was split
out from the softc.

Approved by: mlaier (mentor)
Approved by: re (blanket)

19 years agoMerge the following from the English version:
rushani [Mon, 27 Jun 2005 17:48:20 +0000 (17:48 +0000)]
Merge the following from the English version:

1.5   -> 1.7 hardware/common/artheader.sgml
1.269 -> 1.281 hardware/common/dev.sgml

Update a Japanese override of dev-auto.sgml.

Approved by: re (hrs)
Based on work by: Ryusuke Suzuki <ryusuke at nucl.sci.hokudai.ac.jp>

19 years agoremove a few uses of the word `really'
jmg [Mon, 27 Jun 2005 17:10:22 +0000 (17:10 +0000)]
remove a few uses of the word `really'

Reviewed by: hrs
Approved by: re (scottl)
MFC after: 1 week