Commit Graph

164896 Commits

Author SHA1 Message Date
Rong-En Fan
2bf43f7d0f - Remove myself from ncurses maintainer due to ENOTIME
Approved by:	re (kib@)
2011-08-10 15:49:24 +00:00
Kevin Lo
7236660627 If RTF_HOST flag is specified, then we are interested in destination
address.

PR:		kern/159600
Submitted by:	Svatopluk Kraus <onwahe at gmail dot com>
Approved by:	re (hrs)
2011-08-10 06:17:06 +00:00
Konstantin Belousov
d98d0ce27a - Move the PG_UNMANAGED flag from m->flags to m->oflags, renaming the flag
to VPO_UNMANAGED (and also making the flag protected by the vm object
  lock, instead of vm page queue lock).
- Mark the fake pages with both PG_FICTITIOUS (as it is now) and
  VPO_UNMANAGED. As a consequence, pmap code now can use use just
  VPO_UNMANAGED to decide whether the page is unmanaged.

Reviewed by:	alc
Tested by:	pho (x86, previous version), marius (sparc64),
    marcel (arm, ia64, powerpc), ray (mips)
Sponsored by:	The FreeBSD Foundation
Approved by:	re (bz)
2011-08-09 21:01:36 +00:00
Attilio Rao
2d49ef5934 Revert r224736 as the introduced value was already present.
Reported by:	tinderbox, pluknet
Approved by:	re (kib)
2011-08-09 20:55:54 +00:00
Konstantin Belousov
e047ade947 Do not update mountpoint generation counter to the value which was not
yet acted upon by devfs_populate().

Submitted by:	Kohji Okuno <okuno.kohji jp panasonic com>
Approved by:	re (bz)
MFC after:	1 week
2011-08-09 20:53:33 +00:00
Attilio Rao
b1f0f5b76e Add the PCI ID for the PCH DH89xxCC on ichsmb as got from Linux counterpart.
Sponsored by:	Sandvine Incorporated
Reviewed by:	emaste, rstone
Approved by:	re (bz)
MFC after:	3 days
2011-08-09 16:42:31 +00:00
Adrian Chadd
e69c2d83cf Remove the now unneeded references to these DFS methods.
Sorry for the noise everyone.

Approved by:	re (kib, blanket)
2011-08-09 15:46:52 +00:00
John Baldwin
bf2e38e673 Merge 220876, 220877, and 221537 from the new NFS client to the old:
Allow the NFS client to use a max file size larger than 1TB for v3 mounts.
It now allows files up to OFF_MAX subject to whatever limit the server
advertises.

Reviewed by:	rmacklem
Approved by:	re (kib)
MFC after:	1 week
2011-08-09 15:29:58 +00:00
Jonathan Anderson
3797b1fc58 Remove timeval2timespec and its converse, since we already have
TIMEVAL_TO_TIMESPEC() in <sys/timespec.h>.

Spotted by: bde
Approved by: re (kib), mentor (rwatson)
2011-08-09 14:06:50 +00:00
Ruslan Ermilov
d86a0988d2 Update to a 7-Aug-2011 release.
Approved by:	re (kib)
2011-08-09 12:54:43 +00:00
Ruslan Ermilov
9cb3faa660 Vendor import of bwk's 7-Aug-2011 release. 2011-08-09 12:23:27 +00:00
Alexander Motin
477a63a864 Do not block zero report ID. It is correct value for devices with single
ID. This fixes USB_SET_IMMED call (synchronous operation) of the uhid(4)
driver on devices with single report ID.

Reviewed by:	hselasky
Approved by:	re (kib)
MFC after:	1 week
2011-08-09 08:11:26 +00:00
Doug Barton
a2ca3bc171 Make clear that the -U option can be dangerous. [1]
In -p mode install the group file with the same permissions as normally
done in etc/Makefile.

Update the copyright.

Requested by:	peter [1]

Approved by:	re (kib)
2011-08-09 07:42:19 +00:00
Adrian Chadd
f35ec93778 Remove this call, now that I've solved the radar module problem without
needing this particular modification.

It can be called during ath_dfs_radar_enable() and still achieve the
same functionality, so I am.

Approved by:	re (kib, blanket)
2011-08-09 04:24:56 +00:00
Dimitry Andric
f989887b32 Fix buffer overflow in sys/boot/common/util.c's printf(), when printing
large (>= 10^10) numbers.  In theory, 20 characaters should be enough,
but bump the buffer to 32 characters, so we have some room for the
future.

Reviewed by:	pjd
Approved by:	re (kib)
2011-08-08 20:53:04 +00:00
Jonathan Anderson
ef5502c5dd Create timeval2timespec() and timespec2timeval().
These functions will be used by process descriptors to convert process
creation time into process descriptor [acm]time.

Approved by: re (kib), mentor (rwatson)
Suggested by: jhb
Sponsored by: Google Inc
2011-08-08 20:36:52 +00:00
Adrian Chadd
ef068c6d9f And add another missing brace. Another pointy hat moment.
This one however isn't used by any public code yet, so it
didn't break the build.

Approved by:	re (kib, blanket)
2011-08-08 19:03:26 +00:00
Adrian Chadd
ffae5d00d2 Bitten again by the optional HALDEBUG compilation.
Remove this debugging, it's not needed anymore and when not enabled,
those variables trigger a compiler warning.

Approved by:	re (kib, blanket)
Pointy-hat-to:	adrian, for not testing a non-debug compile of this code enough
2011-08-08 18:05:22 +00:00
Adrian Chadd
7dd4de1301 The older HAL code sets up the regulatory domain once; FreeBSD/net80211
allows it to be overridden at runtime.

Thus, add a function which updates ah_dfsDomain after a channel set
call to ath_hal_set_channels().

Approved by:	re (kib, blanket)
2011-08-08 17:33:35 +00:00
Bernhard Schmidt
d4b82f4d63 When setting a fixed channel on adapters with 11n support the scan
channel list ends up with 2 entries, the HT and the legacy channel.
The scan itself is currently always done at legacy rates so we end
up receiving scan results for legacy networks on the HT channel and
erroneously assigning the BSS to the 11n channel. As the channel's
capabilities are used to setup the adapter we might end up with
non-working settings and/or firmware crashes.

Fix this by ensuring that scan results received on a HT channel
are only assigned to that channel if the htcap IE is available,
else use the legacy channel equivalent.

Tested by:	Pawel Worach, Raoul Megelas, Maciej Milewski,
		Andrei <az at azsupport dot com>
Approved by:	re (kib)
2011-08-08 16:29:07 +00:00
Adrian Chadd
8db87e4079 Introduce some more DFS related hooks, inspired both by local work
and the Atheros reference code.

The radar detection code needs to know what the current DFS domain is.
Since net80211 doesn't currently know this information, it's extracted
from the HAL regulatory domain information.

The specifics:

* add a new ath_dfs API hook, ath_dfs_init_radar_filters(), which
  updates the radar filters whenever the regulatory domain changes.
* add HAL_DFS_DOMAIN which describes the currently configured DFS domain .
* add a new HAL internal variable which tracks the currently configured
  HAL DFS domain.
* add a new HAL capability, HAL_CAP_DFS_DMN, which returns the currently
  configured HAL DFS domain setting.
* update the HAL DFS domain setting whenever the channel setting is
  updated.

Since this isn't currently used by any radar code, these should all
be no-ops for existing users.

Obtained from:	Atheros
Submitted by:	KBC Networks, sibridge
Approved by:	re (kib, blanket)
2011-08-08 16:22:42 +00:00
Adrian Chadd
6bd78ef403 .. and add a missing bracket.
Approved by:	re (kib, blanket)
2011-08-08 15:42:37 +00:00
Adrian Chadd
aa2c3507bc Fix method naming to match the reference HAL definition.
Obtained from:	Atheros
Approved by:	re (kib, blanket)
2011-08-08 15:41:03 +00:00
Martin Matuska
d16eac5c57 Revert r224655 and r224614 because vn_fullpath* does not always work
on nullfs mounts.

Change shall be reconsidered after 9.0 is released.

Requested by:	re (kib)
Approved by:	re (kib)
2011-08-08 14:02:08 +00:00
Adrian Chadd
60829c4817 Add another HAL method - ah_isFastClockEnabled - which returns AH_TRUE
if 5ghz fast clock is enabled in the current operating mode.

It's slightly dirty, but it's part of the reference HAL and used by
the (currently closed-source) radar event code to map radar pulses
back to microsecond durations.

Obtained from:	Atheros
Approved by:	re (kib, blanket)
2011-08-08 13:15:39 +00:00
Rick Macklem
6c8ea37c68 Change "options NFSCLIENT" to "options NFSCL" in diskless.8,
since that is now the default NFS client.
This is a content change.

Reported by:	shuvaev at physik.uni-wuerzburg.de
Approved by:	re (hrs)
2011-08-08 13:13:22 +00:00
Kevin Lo
e9ff3d45e4 In rtinit1(), before rtrequest1_fib() is called, info.rti_flags is
initialized by flags (function argument) or-ed with ifa->ifa_flags.
If both NIC has a loopback route to itself, so IFA_RTSELF is set on ifa(s).
As IFA_RTSELF is defined by RTF_HOST, rtrequest1_fib() is called with
RTF_HOST flag even if netmask is not NULL. Consequently, netmask is set
to zero in rtrequest1_fib(), and request to add network route is changed
under hands to request to add host route.

Tested by:	Andrew Boyer <aboyer at averesystems.com>
Submitted by:	Svatopluk Kraus <onwahe at gmail dot com>
Approved by:	re (hrs)
2011-08-08 05:25:51 +00:00
Kevin Lo
8945a9a003 catstrg() does not set the resulting string length.
PR:	bin/152549
Submitted by:	Henning Petersen <henning dot petersen at t-online dot de>
Approved by:	re (hrs)
2011-08-08 05:22:09 +00:00
Hiroki Sato
3462b16f29 Fix a pathname (s,netinet/if_ether.h,net/ethernet.h,).
PR:		docs/159341
Submitted by:	Garrett Cooper
Approved by:	re (kib)
2011-08-08 03:09:03 +00:00
Martin Matuska
b837506cbc Merge revision 3554 from libarchive's release/2.8 branch:
Partial merge of 2431 from trunk:  Retry writes on EINTR.
This should fix the SIGINT handler in bsdtar.
Note:  The rest of r2431 can't be merged, since it interacts
with a big write-side rearchitecture.

PR:		bin/149409
Reviewed by:	kientzle
Approved by:	re (kib)
MFC after:	3 days
2011-08-07 20:24:32 +00:00
Rick Macklem
88c037e26a Change all the sample kernel configurations to use
NFSCL, NFSD instead of NFSCLIENT, NFSSERVER since
NFSCL and NFSD are now the defaults. The client change is
needed for diskless configurations, so that the root
mount works for fstype nfs.
Reported by seanbru at yahoo-inc.com for i386/XEN.

Approved by:	re (hrs)
2011-08-07 20:16:46 +00:00
Attilio Rao
ea056888f5 Convert pmcstat about using cpuset_t rather than relying on plain 32 bit
ints.  That fixes a first bug where pmcstat wasn't using the old
cpumask_t interface and now also brings the full support for more
than 32 cpus.

While here, make the functions pmcstat_clone_event_descriptor() and
pmcstat_get_cpumask() private to pmcstat.

The problem of assuming cpu dense masks still persists and should be
eventually fixed, as reported by avg.

Tested by:	pluknet
Reviewed by:	gnn
Approved by:	re (kib)
2011-08-07 18:37:05 +00:00
Marius Strobl
ef6f47c4ae Change lwp to int64_t as thr_pread_long() always uses a 64-bit value
in order to account for LP64 targets when cross-debugging on ILP32,
allowing r224683 to compile on ILP32.
Note that thr_p{read,write}_{long,ptr}() still incorrectly use the size
of the respective types on the host rather than that on the target when
accessing the target address space which still needs to be fixed. This
means that r224683 alone may not be sufficient to solve the problem it's
intended to fix when cross-debugging.

Approved by:	re (hrs)
2011-08-07 15:52:13 +00:00
Martin Matuska
e967c8b899 Add compatibility for ISO images created with unfixed makefs that
violated ECMA-119 (ISO9660): allow reserved4 to be 0x20 in PVD.
This allows tar to read FreeBSD distribution ISO images created
with makefs prior to NetBSD bin/45217 bugfix (up to 9.0-BETA1).

In addition, merge following important bugfixes from
libarchive's release/2.8 branch:

Revision 2812:
Merge 2811 from trunk:  Don't try to verify that compression-level=0
produces larger results than the default compression, since this isn't
true for all versions of liblzma.

Revision 2817:
Merge 2814 from trunk: Fix Issue 121 (mtree parser error)
http://code.google.com/p/libarchive/issues/detail?id=121

Revision 2820:
Fix issue 119.
Change the file location check that a file location does not exceed
volume block. New one is that a file content does not exceed volume
block(end of an ISO image). It is better than previous check even
if the issue did not happen.

While reading an ISO image generated by an older version of mkisofs
utility, a file location indicates the end the ISO image if its file
size is zero and it is the last file of all files of the ISO image,
so it is possible that the location value is the same as the number
of the total block of the ISO image.

http://code.google.com/p/libarchive/issues/detail?id=119

Revision 2955:
Issue 134:  Fix libarchive 2.8 crashing in archive_write_finish() when
the open has failed and we're trying to write Zip format.

http://code.google.com/p/libarchive/issues/detail?id=134

Revision 2958:
Followup on Issue 134:
 1) Port test_open_failure to libarchive 2.8 branch to test
    the problem reported in Issue 134.
    This test also shows that archive_read_open() sometimes
    fails to report open errors correctly.
 2) Fix the bug in archive_read.c
 3) Comment out the tests that close functions are invoked
    promptly when open fails; that's fully fixed in libarchive 3.0,
    but I don't think it's worth fixing here.

Revision 3484:
Use uintmax_t with %ju

Revision 3487:
Fix issue 163.
Correctly allocate enough memory for a input buffer saved.

http://code.google.com/p/libarchive/issues/detail?id=163

Revision 3542:
Merge 2516, 2536 from trunk:  Allow path table offset values of
0 and 18, which are used by some ISO writers.

Reviewed by:	kientzle
Approved by:	re (kib)
MFC after:	3 days
2011-08-07 08:42:36 +00:00
Martin Matuska
51db4bad81 Fix NetBSD PR bin/44114:
makefs with -t cd9660 -o rockridge against directories with
deep structure creates a corrupted cd9660 image.

http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=44114

Fix NetBSD PR bin/45217:
makefs creates ISO9660 images that violate the ECMA-119 (ISO9660)
specification. This is caused by erroneously writing 32 bytes
with value 0x20 to the volume_set_id field and 128 bytes with value 0x20
to the the following 37-byte fields in the PVD:
copyright_file_id, abstract_file_id, bibliographic_file_id

This causes, among other unwanted results the reserved4 field to be
overwritten with the value 0x20. To comply with the specification,
this field muse be zero. As a result, all FreeBSD distribution
images created with makefs have not been 100% valid ISO9660 files.

http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=45217

Reviewed by:	kientzle
Approved by:	re (kib)
Obtained from:	NetBSD
MFC after:	3 days
2011-08-07 08:35:15 +00:00
Alan Cox
12f4b65fa6 Fix an error in kmem_alloc_attr(). Unless "tries" is updated,
kmem_alloc_attr() could get stuck in a loop.

Approved by:	re (kib)
MFC after:	3 days
2011-08-07 00:11:39 +00:00
Robert Watson
e397f116c3 Properly initialise the "len" argument to getsockname(2) in the tcpdrop
regression test so that it works (more) consistently.

Approved by:	re (bz)
Sponsored by:	Juniper Networks
2011-08-06 19:20:17 +00:00
Marius Strobl
39c5320dad Compile fbsd-threads.c. Amongst others this is necessary for a working
kgdb(1).

Reviewed by:	marcel
Approved by:	re (kib)
MFC after:	1 week
2011-08-06 17:53:45 +00:00
Marius Strobl
6055164bb1 Implement functions necessary for compiling fbsd-threads.c.
Reviewed by:	marcel
Approved by:	re (kib)
MFC after:	1 week
2011-08-06 17:52:25 +00:00
Marius Strobl
70b9a9a9f6 Implement
Reviewed by:	marcel
Approved by:	re (kib)
MFC after:	1 week
2011-08-06 17:50:37 +00:00
Marius Strobl
21a305d4af Use the size of struct fpreg rather than of the pointer to it when copying
the FPU state.

Reviewed by:	marcel
Approved by:	re (kib)
MFC after:	1 week
2011-08-06 17:49:21 +00:00
Marius Strobl
e31fe879a8 The tid member of struct pthread actually is long so read it as such.
Accessing it as an int causes failure on big-endian LP64, i.e. mips64be,
powerpc64 and sparc64.

Reviewed by:	marcel
Approved by:	re (kib)
MFC after:	1 week
2011-08-06 17:48:30 +00:00
Marius Strobl
1fc2c55253 - Merge from r147740:
When the last, possibly partially filled buffer is flushed, we didn't
  reset fragsz to 0 and as such would stop reflecting reality.
- Use __FBSDID.
- Wrap a too long line.

Approved by:	re (kib)
MFC after:	1 week
2011-08-06 17:45:52 +00:00
Marius Strobl
d16ea2be4e Remove a shortcut which is invalid with MAXCPU > IDR_CHEETAH_MAX_BN_PAIRS.
Approved by:	re (kib)
2011-08-06 17:45:11 +00:00
Marcel Moolenaar
d69bc9bcbe Add support for PBVM addresses. In a nutshell this means:
o   get the physical address and size of the PBVM page table. This
    can be found in the bootinfo structure, of which the physical
    address is recorded as the ELF entry point.
o   translate region 4 virtual addresses to physical addresses using
    the PBVM page table.

In _kvm_kvatop() make the distinction between physical address and
core file offset a little clearer to avoid confusion. To further
enhance readability, always store the translated address into pa
so that it's obvious how the translation from va to pa happened.

Approved by:	re (blanket)
2011-08-06 15:59:54 +00:00
Doug Barton
c2aedca43b Rather than edit the nsswitch.conf file based on ${MK_NIS} == "no"
comment out the NIS _compat options by default, but leave them in
the file for the convenience of users who want to enable it.

Update the comment in the file accordingly.

Reviewed by:	ed
Approved by:	re (hrs)
2011-08-06 09:16:53 +00:00
Doug Barton
7fab6043a0 Gavin documented these alternate options in good faith in r222751
based on the patch in the PR, however he was unaware that they were
undocumented intentionally. This patch moves the information about
these alternates into a comment which also explains why they are
undocumented.

Approved by:	re (hrs)
2011-08-06 09:13:09 +00:00
Doug Barton
368397e827 Fix a silly typo on my part.
Approved by:	re (hrs)
2011-08-06 09:11:30 +00:00
Marcel Moolenaar
3b6ecbbdf1 Fix kernel core dumps now that the kernel is using PBVM. The basic
problem to solve is that we don't have a fixed mapping from kernel
text to physical address so that libkvm can bootstrap itself. We
solve this by passing the physical address of the bootinfo structure
to the consumer as the entry point of the core file. This way,
libkvm can extract the PBVM page table information and locate the
kernel in the core file.
We also need to dump memory chunks of type loader data, because
those hold the kernel and the PBVM page table (among other things).

Approved by:	re (blanket)
2011-08-06 03:40:33 +00:00
Marcel Moolenaar
1af1866850 Follow-up commit: refactor pmap_kextract() to make it easier to
catch and debug issues like the one fixed in the previous commit:
Replace all return statements with goto statements so that we end
up at a single place with a value for the physical address.
Print a message for all unknown KVA addresses.

Approved by:	re (blanket)
2011-08-05 23:10:47 +00:00