Commit Graph

163249 Commits

Author SHA1 Message Date
Ulrich Spörlein
690af69ec0 morse(6): fix typos and space-before-tabs 2011-05-14 19:03:30 +00:00
Michael Tuexen
96f4bcfff2 Fix the source address selection for boundall sockets
when sending INITs to a global IPv4 address having
only private IPv4 address.
Allow the usage of a private address and make sure
that no other private address will be used by the
association.
Initial work was done by rrs@.

MFC after: 1 week.
2011-05-14 18:22:14 +00:00
Colin Percival
e712713751 Encourage Ben Laurie to finish getting his commit bit by appointing him
as the OpenSSL maintainer.

With hat:	security-officer
Reviewed by:	simon (former maintainer)
2011-05-14 17:44:12 +00:00
Pawel Jakub Dawidek
0cddb12ffd Currently we are unable to use capsicum for the primary worker process,
because we need to do ioctl(2)s, which are not permitted in the capability
mode. What we do now is to chroot(2) to /var/empty, which restricts access
to file system name space and we drop privileges to hast user and hast
group.

This still allows to access to other name spaces, like list of processes,
network and sysvipc.

To address that, use jail(2) instead of chroot(2). Using jail(2) will restrict
access to process table, network (we use ip-less jails) and sysvipc (if
security.jail.sysvipc_allowed is turned off). This provides much better
separation.

MFC after:	1 week
2011-05-14 17:02:03 +00:00
Pawel Jakub Dawidek
bcc9f32110 When using capsicum to sanbox, still use other methods first, just in case
one of them have some problems.
2011-05-14 16:55:24 +00:00
Adrian Chadd
acc8122719 Fix the Merlin 5ghz fast-clock EEPROM fetch to return the correct value.
The eeprom Get method should return HAL_OK if fastclock is enabled in the
EEPROM. It was returning the opposite of what it should have.

Submitted by:	Matthew Fleming <mdf356@gmail.com>
2011-05-14 15:24:15 +00:00
Adrian Chadd
92ffeb633d Fix the eeprom set API method to return HAL_STATUS.
The code assumed it could return HAL_OK, HAL_EINVAL and other
HAL_STATUS types; so it shouldn't be declared as returning HAL_BOOL.

This commit was brought to you by the Clang compiler.

Submitted by:	Matthew Fleming <mdf356@gmail.com>
2011-05-14 15:12:02 +00:00
Marcel Moolenaar
767ca6ed1a Prefer switching the memory stack from user to kernel *before* switching
the register stack. While the ordering doesn't matter, it creates an
invariant not previously there: the memory stack pointer will always be
larger than the register stack pointer. With this invariant in place,
it's easier to add instrumentation code that detects a stack overflow
because in such a scenario the memory stack pointer and register stack
pointers have crossed each other.

Aside: basic kernel operation needs about half the stack size (~16K)
at most. We have plenty of head room on the kernel stack...
2011-05-14 14:55:15 +00:00
Marcel Moolenaar
65385d6d79 Sharpening the saw:
o   Clobber the register that holds the restart token immediately after
    crossing the restart point. This prevents false positives (i.e. a
    nested exception that we don't know can happen and that is being
    treated as one we know by virtue of a lingering restart token).
o   Now that the bootstrap kernel stack is free, switch onto it and call
    trap() for nested traps that we don't know about. In trap we panic()
    so that we can analyze the condition.
2011-05-14 14:47:19 +00:00
John Baldwin
5891ebd6cd Oops, fix order of sequence numbers in KASSERT()'s to catch negative
receive windows to match the labels in the panic message.

Submitted by:	trociny
2011-05-14 14:41:40 +00:00
Marcel Moolenaar
7fb64531d3 Be pedantic: mark the pcpu pointer (= register r13) itself as volatile. 2011-05-14 14:40:24 +00:00
Marcel Moolenaar
dc03be9d67 Turn ia64_srlz() and ia64_srlz_i() into defines so that the code is
still correct when inlining is disabled.
2011-05-14 14:36:08 +00:00
Adrian Chadd
047d6827d0 Import initial EEPROM code for Kite (AR9287).
I've tested this locally and it does indeed read and attach to an AR9287
EEPROM. But a lot more code needs to be ported over to the HAL before
the AR9287 is functional.

I'm importing this separate from the rest of the codebase (and unlinked from
the build for now) in case someone wishes to begin fiddling with porting
the rest of the code over from Linux ath9k.

Obtained from:	Linux ath9k
2011-05-14 14:25:15 +00:00
Jilles Tjoelker
d69e16c977 sh: Add tests for lines that look like heredoc delimiters but are not. 2011-05-14 14:19:30 +00:00
Jilles Tjoelker
b1865d5303 network.subr: Use printf(1) builtin for hexprint function.
Now that printf(1) is a shell builtin, there is no need to emulate it
anymore. The external printf(1) is /usr/bin/printf and therefore may not be
available in early boot.

It may be faster to use printf directly but the function is useful for
compatibility.
2011-05-14 12:22:58 +00:00
Hans Petter Selasky
e1f3a66f15 Add new USB ID's.
Submitted by:	Jim Bryant
MFC after:	3 days
2011-05-14 12:16:09 +00:00
Rebecca Cran
d1b9bdd11a gcc and clang semantics imply certain -mno-* flags when other certain -mno-*
flags are also specified. This change makes use of this behaviour and removes
unneeded -mno-* flags.

Note that clang does not yet enable AVX support for any CPU. However at some
point in the future it will and since we definitely want to disable it for the
kernel, we might as well add the -mno-avx flag now.

Submitted by:	arundel
2011-05-14 11:26:00 +00:00
Adrian Chadd
d6415a7cf6 When disabling RIFS for Sowl (AR9160) and Howl (AR9130), make sure RIFS
is totally disabled.

The Atheros HAL code does this for Sowl/Howl but not for Owl (AR5416) where
RIFS is disabled by default.

This seems to quieten the occasional baseband hang I've been seeing with
the AR9160 in STA mode under constant heavy traffic load.

Obtained from:	Atheros
2011-05-14 05:43:33 +00:00
Warner Losh
9df02b5476 Restore BOOT2CFG, accidentally removed in r212938.
PR:		157020
2011-05-14 04:32:30 +00:00
Adrian Chadd
b357d5767b Major fix: when doing open-loop TX power calibration, adjust
the correct CCK rates rather than adjusting the first handful.
This may have affected some AR9280 based NICs.

Minor fix: merlin check update
2011-05-14 04:17:16 +00:00
Adrian Chadd
98cdd90425 Fixes from the Atheros HAL - formatting; update Merlin checks to be consistent.
Nothing functional should change with this commit.
2011-05-14 04:05:23 +00:00
Stanislav Sedov
0d1d6d589b - Fix several typos [1]
- fuser(1) writes usernames to stderr, not stdout [1]
- Add history section.

Submitted by: Pieter de Goeje <pieter@degoeje.nl> [1]
2011-05-14 04:02:56 +00:00
Maxim Sobolev
ea640d778b Add new modifier - "R", when it is specified the path to pid file
will be considered as a path to a binary or a shell script to be executed
after rotation has been completed instead of sending signal to the process
id in that file.

Sponsored by:	Sippy Software, Inc.
From the:	FreeBSD hacking lounge at BSDCan
2011-05-14 03:00:55 +00:00
Attilio Rao
a072b80e7e Remove actual files supporting sun4v.
Approved by:	re
2011-05-14 01:56:48 +00:00
Attilio Rao
4b547324c0 Disconnect sun4v architecture from the three.
Some files keep the SUN4V tags as a code reference, for the future,
if any rewamped sun4v support wants to be added again.

Reviewed by:	marius
Tested by:	sbruno
Approved by:	re
2011-05-14 01:53:38 +00:00
Adrian Chadd
307abf289d Even though initial calibrations aren't done (yet), add this so we're
consistent with the Atheros HAL.
2011-05-14 01:41:36 +00:00
John Baldwin
5b4f35a4f0 Merge comments about converting directory entries to be more direct and
concise.

Inspired by:	Gleb Kurtsou
2011-05-14 01:10:57 +00:00
Stanislav Sedov
3e00bad1b4 - Bump __FreeBSD_version to note the revision when libprocstat(3) and fuser(1)
have been added to the tree.
2011-05-13 23:10:55 +00:00
Xin LI
61382374d1 Constify a few string variables. While I'm there, also convert usage() to
use a prototype.

MFC after:	2 weeks
2011-05-13 22:35:06 +00:00
Warner Losh
9a6e729a11 If there's no package directory, don't try to install packages from
it.  Instead, report that 0 packages are reported.

PR:		misc/140436
2011-05-13 19:40:02 +00:00
Matthew D Fleming
cfb00e5aa7 Move the ZERO_REGION_SIZE to a machine-dependent file, as on many
architectures (i386, for example) the virtual memory space may be
constrained enough that 2MB is a large chunk.  Use 64K for arches
other than amd64 and ia64, with special handling for sparc64 due to
differing hardware.

Also commit the comment changes to kmem_init_zero_region() that I
missed due to not saving the file.  (Darn the unfamiliar development
environment).

Arch maintainers, please feel free to adjust ZERO_REGION_SIZE as you
see fit.

Requested by:	alc
MFC after:	1 week
MFC with:	r221853
2011-05-13 19:35:01 +00:00
Matthew D Fleming
89cb2a19ec Usa a globally visible region of zeros for both /dev/zero and the md
device.  There are likely other kernel uses of "blob of zeros" than can
be converted.

Reviewed by:	alc
MFC after:	1 week
2011-05-13 18:48:00 +00:00
Warner Losh
14f9771b27 Add ${} around variable dereference...
Submitted by:	garrett coopper
2011-05-13 18:46:20 +00:00
Warner Losh
94a74d9427 Implement -f to inhibit copying s1 partition out for speed.
(-z not taken from PR, it is no longer needed since we basically always
 do that now)

PR:		misc/151698
Submitted by:	lev@
2011-05-13 18:36:24 +00:00
Warner Losh
b0effdce7c Copy symbolic links as files rather than recreating the links.
PR:		misc/151697
Submitted by:	lev@
MFC after:	2 weeks
2011-05-13 18:28:25 +00:00
Sergey Kandaurov
e2ea39cbdb Update sticky(7) cross references.
PR:		docs/124468
X-MFC with:	r218998
2011-05-13 16:29:57 +00:00
Olivier Houchard
a44f91a9ec In pmap_change_wiring(), use the right argument for pmap_modify_pv().
It only worked because the only consumer calls pmap_change_wiring() to remove
the wiring.
2011-05-13 15:54:12 +00:00
Matthew D Fleming
359295cd2a Note that the _SWAP operation is supported for all list/queue types.
Also place STAILQ_REMOVE_HEAD in alphabetical order.  Lastly, document
the _SWAP macros.

PR:		kern/143033
MFC after:	1 week
2011-05-13 15:49:23 +00:00
Henrik Brix Andersen
adc38bf22f Allow direct children of PCI-ISA bridges to allocate resources from
the parent PCI bus.

Heavily inspired by jhb@ and a similar implementation present in
sys/dev/pci/vga_pci.c.

Reviewed by:	jhb
Approved by:	jhb
2011-05-13 15:06:35 +00:00
Adrian Chadd
4342b6100b Only do open loop power control and temperature compensation
for the AR9280 based NICs if it's actually enabled.

Some of the OLC code was erroneously called during setup
and calibration. This may have caused some incorrect behaviour.
2011-05-13 14:33:45 +00:00
Matthew D Fleming
fa2c76c975 Correctly use INOUT for the offset/len parameters to vop_allocate. As
far as I can tell this is for documentation only at the moment.
2011-05-13 14:29:28 +00:00
Alexander Motin
167aee3895 Refactor Xen PV code to use new event timers subsystem. That uses one-shot
Xen timer and time counter to provide one-shot and periodic time events.

On my tests this reduces idle interruts rate down to about 30Hz, and accor-
ding to Xen VM Manager reduces host CPU load by three times comparing to
the previous periodic 100Hz clock. Also now, when needed, it is possible to
increase HZ rate without useless CPU burning during idle periods.

Now only ia64 and some ARMs left not migrated to the new event timers.
2011-05-13 12:39:37 +00:00
Adrian Chadd
2f399d37ee Remove duplicate code - add a function which calculates the ratesArray[]
table which contains the per-rate target TX power.

This code is shared between the v14 eeprom board setup (AR5416, AR9160,
AR9280) and will also be used by the upcoming Kite (AR9287) support.
2011-05-13 10:36:38 +00:00
Adrian Chadd
68b3f39d74 Some diversity changes relating to AR9285.
* grab the main, alt and selected LNA config
* add some optional / disabled logging code
* add a check to reject packets with an invalid main rssi too,
  in case the alt is the active receive chain and main is -ve.

Note: The software-controlled combined diversity code is still disabled.
2011-05-13 09:57:12 +00:00
Ruslan Ermilov
22a2d42fa3 Fixed an embedded shell script.
Reviewed by:	sobomax
2011-05-13 09:55:48 +00:00
Dag-Erling Smørgrav
15b68c63bb Mark all socket and file descriptors close-on-exec.
PR:		bin/151866
MFC after:	3 weeks
2011-05-13 07:21:41 +00:00
Matthew D Fleming
3d08a76bbc Use a name instead of a magic number for kern_yield(9) when the priority
should not change.  Fetch the td_user_pri under the thread lock.  This
is probably not necessary but a magic number also seems preferable to
knowing the implementation details here.

Requested by:	Jason Behmer < jason DOT behmer AT isilon DOT com >
2011-05-13 05:27:58 +00:00
Alexander Motin
c4f9a10590 Fix msleep() usage in Xen balloon driver to not wake up on every HZ tick. 2011-05-13 03:40:16 +00:00
David Christensen
8fedd5eb65 - Use bus_describe_intr() to describe interrupt usage.
- Use bus_bind_intr() to bind interrupt to a CPU when RSS/TSS is used.
- Use M_DONTWAIT for RSS/TSS buffer allocation.
- Add statistic to track max DRBR queue depth.
- Fix problem in bxe_change_mtu() which referenced the old MTU size
  in a debug print statement.

MFC after:	Two weeks
2011-05-12 23:26:53 +00:00
Nathan Whitehorn
df7c03cf8b Fix pSeries/PAPR boot CD construction after actual testing. It seems that
IBM SLOF is (a) case-sensitive and (b) accepts only booting files in
certain subdirectories of the CD.
2011-05-12 22:31:13 +00:00