Commit Graph

116649 Commits

Author SHA1 Message Date
Damien Bergamini
09137879a5 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)
2005-07-03 15:42:18 +00:00
Damien Bergamini
7f5ea03de8 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)
2005-07-03 15:38:41 +00:00
Damien Bergamini
3dde707f68 Add another ural(4) device (Belkin F5D7050)
Reviewed by:	silby (mentor)
Approved by:	re (scottl)
2005-07-03 15:34:32 +00:00
Yoshihiro Takahashi
811d79106f MFi386: r1.221 (Use a simpler implementation for the i8254 timecounter).
Approved by:	re (scottl)
2005-07-03 14:19:29 +00:00
Xin LI
1c70a91b10 Minor grammar fix
Submitted by:	Wojciech A. Koszek [dunstan at freebsd czest pl]
Approved by:	re (hrs)
2005-07-03 12:35:11 +00:00
R. Imura
fc1bbc7527 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)
2005-07-03 01:12:37 +00:00
Marcel Moolenaar
a2aeb24eff 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)
2005-07-02 23:52:37 +00:00
Andrew Thompson
2fcb030ad5 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)
2005-07-02 23:13:31 +00:00
Doug White
c23f4ee59f Don't ask about CD numbers if not installing from CD.
Approved by:	re
2005-07-02 22:34:22 +00:00
Xin LI
60baed3742 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)
2005-07-02 20:06:44 +00:00
Marcel Moolenaar
5116398a06 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)
2005-07-02 19:57:31 +00:00
Daniel Harris
22550c0031 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
2005-07-02 19:51:11 +00:00
Scott Long
dd3d1a98d5 Fix the alpha build by using the correct argument types for _kvm_kvatop().
Submitted by: marcel
Approved by: re (implicit)
2005-07-02 05:49:29 +00:00
Paul Saab
482ac96888 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
2005-07-01 22:54:18 +00:00
Paul Saab
69e0362019 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
2005-07-01 22:52:46 +00:00
Peter Wemm
27e11adbbb MFi386: r1.221: use simple timecounter that is aware of irq0 being off.
Approved by:  re
2005-07-01 20:13:19 +00:00
Suleiman Souhlal
2b0f687b5d Mistakingly undefined VN_KNOTE_LOCKED in my previous commit.
Noticed by: Antoine Brodin <antoine.brodin@laposte.net>
Approved by:	re (scottl)
2005-07-01 17:13:59 +00:00
Suleiman Souhlal
571dcd15e2 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
2005-07-01 16:28:32 +00:00
Warner Losh
5af5f40c75 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)
2005-07-01 15:52:50 +00:00
John Baldwin
655a4d037d 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
2005-07-01 15:49:52 +00:00
John Baldwin
7df0015945 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)
2005-07-01 15:47:27 +00:00
John Baldwin
e00515799d 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
2005-07-01 15:43:09 +00:00
Poul-Henning Kamp
453ad3b2c0 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@
2005-07-01 15:33:08 +00:00
Gleb Smirnoff
82dd5411d9 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
2005-07-01 15:22:47 +00:00
Tai-hwa Liang
362abc449c - 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)
2005-07-01 15:21:30 +00:00
Dag-Erling Smørgrav
d33db00c9b Add an entry about absolute PAM module paths, backdated to when the
change happened.

Submitted by:	rwatson
Approved by:	re (scottl)
2005-07-01 15:12:09 +00:00
Hartmut Brandt
4df70a92b5 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
2005-07-01 10:45:02 +00:00
Colin Percival
e5610d524c 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)
2005-07-01 10:04:33 +00:00
Colin Percival
4beacf6666 Document some limitations of uid/gid rules.
Approved by:	re (rwatson)
MFC after:	3 days
2005-07-01 09:51:10 +00:00
Gleb Smirnoff
a196a3c8aa 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)
2005-07-01 08:22:13 +00:00
Warner Losh
96d951d396 Make a pass and cleanup the printfs from this driver.
Approved by: re (scottl) blanket ep
2005-07-01 05:31:23 +00:00
Warner Losh
cea740ed1a 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
2005-07-01 05:28:55 +00:00
Warner Losh
880266e041 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)
2005-07-01 04:23:32 +00:00
Pyun YongHyeon
8fd99e38e0 Use correct pointer type. This should fix non-functional re(4)
driver on 64bit architectures.

Approved by:	re (scottl)
2005-07-01 04:12:42 +00:00
Joseph Koshy
1fdbf2560e 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)
2005-07-01 03:50:30 +00:00
Joseph Koshy
bf840f4a19 Unbreak tinderbox builds. Remove a debug printf.
Approved by:	re (blanket hwpmc)
2005-07-01 03:45:01 +00:00
Warner Losh
26db48b9b2 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)
2005-07-01 03:40:28 +00:00
Joseph Koshy
151392465f 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)
2005-06-30 19:01:26 +00:00
Bruce A. Mah
27a2197ea5 New release notes: SA-05:13.ipfw, SA-05:14.bzip2, SA-05:15.tcp.
Approved by:	re (blanket relnotes)
2005-06-30 18:17:09 +00:00
Brooks Davis
1985a13e74 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)
2005-06-30 17:50:34 +00:00
Paul Saab
cff2e749e2 Use SCTL_MASK32 to determine that the sysctl call is from a 32bit
binary for kern.cp_time.

Approved by:	re
2005-06-30 17:17:29 +00:00
Hideyuki KURASHINA
4c4bfd6ed4 - 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)
2005-06-30 16:26:24 +00:00
Yoshihiro Takahashi
aa6218d73b MFi386: revision 1.615 (change kernel crashdump format to ELF).
Approved by:	re (scottl)
2005-06-30 15:26:03 +00:00
Hiten Pandya
a1601503f5 Use 'manual page' instead of 'man page' for consistency.
Approved by:	re (hrs)
2005-06-30 13:18:15 +00:00
Hiten Pandya
655f01f6df Use 'manual page' instead of 'man page' for consistency.
Approved by:	re (hrs)
2005-06-30 13:04:25 +00:00
Hideyuki KURASHINA
7af2c44848 Use consistent translation for the word ``interface''.
Approved by:	re (hrs)
2005-06-30 12:54:57 +00:00
Hideyuki KURASHINA
f8f163bc0a Merge the following from the English version:
1.3  -> 1.7	Makefile
	1.65 -> 1.73	errata/article.sgml

Approved by:	re (hrs)
2005-06-30 12:54:30 +00:00
Denis Peplin
11e36541ae Update Russian override of dev-auto.sgml
Obtained from:  The FreeBSD Russian Documentation Project
Approved by:    re (blanket)
2005-06-30 12:07:29 +00:00
Johan Karlsson
5ceb03e494 Our bsd.*.mk only supports 6 WARNS levels and we should not use higher values
until it does.

Approved by:	re (dwhite)
2005-06-30 11:56:31 +00:00
Denis Peplin
7fe8d3ceb1 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)
2005-06-30 11:35:03 +00:00