Commit Graph

116557 Commits

Author SHA1 Message Date
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
Peter Wemm
62919d788b 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
2005-06-30 07:49:22 +00:00
Peter Wemm
d14b395392 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
2005-06-30 06:44:34 +00:00
Ruslan Ermilov
8b7475ed75 Tidy up the markup.
Approved by:	re (blanket manpages)
2005-06-30 06:35:51 +00:00
Brooks Davis
a36c0b6b78 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)
2005-06-30 05:50:52 +00:00
Peter Wemm
0ed48524c1 i386->amd64 sync
Add ath_hal and ichwd modules

Approved by:  re (blanked i386<->amd64 sync)
2005-06-30 05:37:48 +00:00
Peter Wemm
80a110932e 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)
2005-06-30 05:33:26 +00:00
Brooks Davis
b388f1cb10 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)
2005-06-30 05:32:42 +00:00
Ruslan Ermilov
76c6134966 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
2005-06-30 05:31:01 +00:00
Brooks Davis
7657f59596 - 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)
2005-06-30 05:02:34 +00:00
Bruce A. Mah
cbea18d9ae Fix grammar and markup nits, do some wordsmithing.
Approved by:	re (blanket relnotes)
2005-06-30 04:55:46 +00:00
Brooks Davis
a7e55c1e77 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)
2005-06-30 04:52:47 +00:00
Brooks Davis
d3a260999d 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)
2005-06-30 04:46:21 +00:00
Peter Wemm
48033188a6 Second part of commit for moving KDB_STOP_NMI from opt_global.h to
opt_kdb.h.

Found by:     kris
Approved by:  re
2005-06-30 03:38:10 +00:00
Joseph Koshy
d9a5f34617 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)
2005-06-30 02:38:46 +00:00
Paul Saab
da2ef70999 Match _kvm_kvatop to it's prototype in kvm_i386.c. This unbreaks
the build.

Approved by:	re
2005-06-30 01:25:21 +00:00
Peter Wemm
2bdfd0d814 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
2005-06-30 00:26:54 +00:00
Peter Wemm
2de92a386e 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
2005-06-30 00:19:08 +00:00
Peter Wemm
b107fcf877 Add COMPAT_FREEBSD5
Approved by:	re
2005-06-30 00:09:18 +00:00
Peter Wemm
f0c6706de9 Move the KDB_STOP_NMI option from opt_global.h to opt_kdb.h
Approved by:	re
2005-06-29 23:23:16 +00:00
Peter Wemm
3b4399f6a7 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
2005-06-29 23:15:36 +00:00
Peter Wemm
e55a0cd805 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
2005-06-29 22:39:41 +00:00
Peter Wemm
235a54de9d 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
2005-06-29 22:28:46 +00:00
Simon L. B. Nielsen
0a389eab22 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
2005-06-29 21:36:49 +00:00
Andrew Thompson
49808fa4fc 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)
2005-06-29 19:23:32 +00:00
Damien Bergamini
0e8975d715 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)
2005-06-29 17:54:01 +00:00
Robert Watson
269c49d31b Regenerate after addition of audit event type number to syscalls.master
file format.

Approved by:	re (scottl)
2005-06-29 17:29:06 +00:00
Robert Watson
e099829817 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)
2005-06-29 17:27:40 +00:00
John Baldwin
19042f9cce - 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)
2005-06-29 15:16:20 +00:00
John Baldwin
014693eb89 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
2005-06-29 15:13:25 +00:00
Mike Silbersack
a7b844d2be 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)
2005-06-29 08:18:26 +00:00
Brooks Davis
b97b7bab6b Remove isc-dhcp files from HEAD now that we're using the OpenBSD
dhclient.

Reminded by:	ru
Approved by:	re (blanket dhclient)
2005-06-29 01:46:40 +00:00
Qing Li
16a2e0a6c8 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
2005-06-28 23:32:22 +00:00
Warner Losh
cdcf928a55 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)
2005-06-28 21:56:04 +00:00
Eric Anholt
324f92b9af 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)
2005-06-28 21:38:08 +00:00
Hiten Pandya
571dba6ec9 Use 'manual page' instead of 'man page' for consistency.
Approved by:	re (hrs)
2005-06-28 20:15:19 +00:00
Søren Schmidt
c782b027b4 Zero donecount on auto request sense.
PR:		81450
Approved by:	re@ (scottl)
2005-06-28 09:06:52 +00:00
Bjoern A. Zeeb
066b192e3b 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)
2005-06-28 06:55:45 +00:00
Xin LI
67c7ede6d2 Correct a comment in ucred.h.
Submitted by:	Wojciech A. Koszek <dunstan at freebsd czest pl>
PR:		kern/82708
Approved by:	re (scottl)
2005-06-28 02:23:56 +00:00
Marcel Moolenaar
c31450b00d 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)
2005-06-27 23:51:38 +00:00
Marcel Moolenaar
fc37111e5d 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)
2005-06-27 23:34:35 +00:00
Marcel Moolenaar
9701d67eb8 Cosmetic: s/u_int64_t/uint64_t/g
Approved by: re (scottl)
2005-06-27 23:29:06 +00:00
Paul Saab
5a53ca1627 - 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
2005-06-27 22:27:42 +00:00