]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoFix external compiler warning(s). Avoid pointer dereferencing.
hselasky [Wed, 4 Dec 2013 12:07:46 +0000 (12:07 +0000)]
Fix external compiler warning(s). Avoid pointer dereferencing.

10 years agoChange comment to match code.
trasz [Wed, 4 Dec 2013 09:48:52 +0000 (09:48 +0000)]
Change comment to match code.

Discussed with: thompsa
Sponsored by: The FreeBSD Foundation

10 years agoUpdate release notes.
rodrigc [Wed, 4 Dec 2013 08:20:04 +0000 (08:20 +0000)]
Update release notes.

Submitted by: skreuzer

10 years agoAdd "null" backend to mdconfig(8). This does exactly what the name
trasz [Wed, 4 Dec 2013 07:38:23 +0000 (07:38 +0000)]
Add "null" backend to mdconfig(8).  This does exactly what the name
suggests, and is somewhat useful for benchmarking.

MFC after: 1 month
No objections from: kib
Sponsored by: The FreeBSD Foundation

10 years agoAvoid using a static buffer in atalk_ntoa. This will help allow users to call route...
eadler [Wed, 4 Dec 2013 05:06:56 +0000 (05:06 +0000)]
Avoid using a static buffer in atalk_ntoa.  This will help allow users to call route(1) as a library.

Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de> (older version)
Discussed on: -hackers
Reviwed by: adri (different older version)

10 years agoAdd const qualifier where appropriate
eadler [Wed, 4 Dec 2013 04:29:52 +0000 (04:29 +0000)]
Add const qualifier where appropriate

Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de>

10 years agoAdd const qualifier where appropriate
eadler [Wed, 4 Dec 2013 04:28:49 +0000 (04:28 +0000)]
Add const qualifier where appropriate

Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de>

10 years agoTurn 'n' into a local variable. This is required for additional changes.
eadler [Wed, 4 Dec 2013 04:28:00 +0000 (04:28 +0000)]
Turn 'n' into a local variable.  This is required for additional changes.

Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de>

10 years agoext2fs: add two new reserved inodes.
pfg [Wed, 4 Dec 2013 02:27:52 +0000 (02:27 +0000)]
ext2fs: add two new reserved inodes.

According to online documentation [1], Ext4 has two new "special"
inodes so add the new exclude and replica inodes.

Reference:
[1] https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout

Reported by: Mike Ma
MFC after: 3 weeks

10 years agoEnable some previously-disabled DTrace tests for umod, ufunc and usym. They
markj [Wed, 4 Dec 2013 01:40:39 +0000 (01:40 +0000)]
Enable some previously-disabled DTrace tests for umod, ufunc and usym. They
expect the installed ksh binary to be named "ksh", which is not the case
when it's installed on FreeBSD via the shells/ksh93 port. Allow for it to be
"ksh93" as well so that the tests can actually pass.

10 years agoThe uaddr, ufunc, umod and usym functions all seem to work as expected on
markj [Wed, 4 Dec 2013 01:35:04 +0000 (01:35 +0000)]
The uaddr, ufunc, umod and usym functions all seem to work as expected on
FreeBSD, so stop hiding them behind a "#if defined(sun)".

Reported by: Prashanth Kumar <pra_udupi@yahoo.co.in>

10 years agosvn r251516 resized the buf argument a bit too much. Pass a hardcoded
sbruno [Wed, 4 Dec 2013 00:28:44 +0000 (00:28 +0000)]
svn r251516 resized the buf argument a bit too much.  Pass a hardcoded
size of 6 to humanize_number() to resolve this.

PR: 184405
Submitted by: jhb
MFC after: 2 weeks

10 years agoBreak the loop once we know we have the SYF_CAPENABLED flag.
pjd [Wed, 4 Dec 2013 00:10:37 +0000 (00:10 +0000)]
Break the loop once we know we have the SYF_CAPENABLED flag.

10 years agoOnly the shared library is installed in /lib/. Static library and symlink
pjd [Tue, 3 Dec 2013 23:16:08 +0000 (23:16 +0000)]
Only the shared library is installed in /lib/. Static library and symlink
to shared library stays in /usr/lib/. Don't delete them.

Reported by: jkim

10 years agoUpdate LLDB to upstream r196322 snapshot
emaste [Tue, 3 Dec 2013 22:26:38 +0000 (22:26 +0000)]
Update LLDB to upstream r196322 snapshot

Upstream revisions of note:
r196298 - Fix use of std::lower_bound
r196322 - Fix log message for new invalidation checks

Sponsored by: DARPA, AFRL

10 years agoThe rc system aggressively caches the contents of /etc/rc.conf in order to
cperciva [Tue, 3 Dec 2013 21:55:57 +0000 (21:55 +0000)]
The rc system aggressively caches the contents of /etc/rc.conf in order to
improve boot performance; this produces arguably astonishing (non-)results
if /etc/rc.conf is modified during the boot process.

Since performance considerations make it infeasible to automatically detect
if the cached /etc/rc.conf parameters should be invalidated, provide a
mechanism for explicitly requesting that /etc/rc.conf be reloaded: Catch
SIGALRM and reload /etc/rc.conf if it is received.

Discussed on: freebsd-rc
MFC after: 3 days

10 years agoAdd a new sysctl / loader tunable kern.panic_reboot_wait_time which
cperciva [Tue, 3 Dec 2013 21:35:25 +0000 (21:35 +0000)]
Add a new sysctl / loader tunable kern.panic_reboot_wait_time which
defaults to PANIC_REBOOT_WAIT_TIME (a long-existing kernel config
setting).  Use this now-variable value in place of the defined constant
to control how long the system waits after a panic before rebooting.

10 years agolldb: Threaded inferior support for FreeBSD
emaste [Tue, 3 Dec 2013 21:29:45 +0000 (21:29 +0000)]
lldb: Threaded inferior support for FreeBSD

This is in the process of being submitted to the upstream LLDB
repository.  The thread list functionality is modelled in part on
GDBRemoteCommunicationClient.

LLDB bug pr16696 and code review D2267

Sponsored by: DARPA, AFRL

10 years agoVarious updates and tweaks to the wait(2) manpage.
jhb [Tue, 3 Dec 2013 21:00:13 +0000 (21:00 +0000)]
Various updates and tweaks to the wait(2) manpage.

PR: docs/183904
Submitted by: Michael Galassi <michaelgalassi@gmail.com>
Reviewed by: kib, wblock (earlier version)

10 years agoUpdate LLDB to upstream r196259 snapshot
emaste [Tue, 3 Dec 2013 19:23:54 +0000 (19:23 +0000)]
Update LLDB to upstream r196259 snapshot

Sponsored by: DARPA, AFRL

10 years agoImport lldb as of SVN r196259 (git 3be86e5)
emaste [Tue, 3 Dec 2013 18:51:59 +0000 (18:51 +0000)]
Import lldb as of SVN r196259 (git 3be86e5)

(A number of files not required for the FreeBSD build have been removed.)

Sponsored by: DARPA, AFRL

10 years agocxgbe(4): T4_SET_SCHED_CLASS and T4_SET_SCHED_QUEUE ioctls to program
np [Tue, 3 Dec 2013 18:34:52 +0000 (18:34 +0000)]
cxgbe(4):  T4_SET_SCHED_CLASS and T4_SET_SCHED_QUEUE ioctls to program
scheduling classes in the chip and to bind tx queue(s) to a scheduling
class respectively.  These can be used for various kinds of tx traffic
throttling (to force selected tx queues to drain at a fixed Kbps rate,
or a % of the port's total bandwidth, or at a fixed pps rate, etc.).

Obtained from: Chelsio

10 years agoWorkaround lldb issue with main module base address
emaste [Tue, 3 Dec 2013 18:12:51 +0000 (18:12 +0000)]
Workaround lldb issue with main module base address

On FreeBSD lldb sometimes reloads the the main module's (executable's)
symbols at the wrong address.  Work around this for now by explicitly
reloading at base_address=0 when it happens.

A proper fix is needed but early testers have reported this issue so
this workaround should allow them to make further progress.

http://llvm.org/bugs/show_bug.cgi?id=17880

10 years agoProperly report an error instead of panicing when user tries to create
trasz [Tue, 3 Dec 2013 18:04:14 +0000 (18:04 +0000)]
Properly report an error instead of panicing when user tries to create
LUN backed by non-disk device, e.g. /dev/null.

Reviewed by: ken (earlier version)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoFix an off-by-one error in r228960. The maximum priority delta provided
jhb [Tue, 3 Dec 2013 14:50:12 +0000 (14:50 +0000)]
Fix an off-by-one error in r228960.  The maximum priority delta provided
by SCHED_PRI_TICKS should be SCHED_PRI_RANGE - 1 so that the resulting
priority value (before nice adjustment) is between SCHED_PRI_MIN and
SCHED_PRI_MAX, inclusive.

Submitted by: kib
Reported by: pho
MFC after: 1 week

10 years agoAdd libcapsicum and libcasper libraries that were moved from /usr/lib/ to /lib/.
pjd [Tue, 3 Dec 2013 13:38:13 +0000 (13:38 +0000)]
Add libcapsicum and libcasper libraries that were moved from /usr/lib/ to /lib/.

Reviewed by: glebius

10 years agoInitialize cookie before use.
pjd [Tue, 3 Dec 2013 13:28:05 +0000 (13:28 +0000)]
Initialize cookie before use.

Reported by: Coverity
Coverity CID: 1135292

10 years agoFix comparisons in assertions.
pjd [Tue, 3 Dec 2013 13:26:37 +0000 (13:26 +0000)]
Fix comparisons in assertions.

Reported by: Coverity
Coverity CID: 1130048

10 years agoAdd DragonFly BSD fingerprints to pf.os
eadler [Tue, 3 Dec 2013 04:32:02 +0000 (04:32 +0000)]
Add DragonFly BSD fingerprints to pf.os

Obtained From: DragonFly BSD (commit 321b0bb006b0857d2c212dc8cd12a36d750bcf9a)

10 years agoAdd an autologin entry for the console.
eadler [Tue, 3 Dec 2013 04:13:55 +0000 (04:13 +0000)]
Add an autologin entry for the console.

Obtained From: DragonFly BSD (commit f95025e8c9a4471edb610557263b12acd8e7fb3a)

10 years agoAdd Veritas NetBackup
eadler [Tue, 3 Dec 2013 04:03:19 +0000 (04:03 +0000)]
Add Veritas NetBackup

Obtained From: DragonFly BSD

10 years agoAdd the Short Message Peer-to-Peer protocol
eadler [Tue, 3 Dec 2013 03:57:22 +0000 (03:57 +0000)]
Add the Short Message Peer-to-Peer protocol

PR: conf/183398
Submitted by: olgeni

10 years agoUse mkstemp(3) to create the temporary file used in the FreeBSD-specific
markj [Tue, 3 Dec 2013 03:40:47 +0000 (03:40 +0000)]
Use mkstemp(3) to create the temporary file used in the FreeBSD-specific
portions of dtrace_program_link().

10 years agoThe 'protection' field in the VM exit collateral for the PAGING exit is not
neel [Tue, 3 Dec 2013 01:21:21 +0000 (01:21 +0000)]
The 'protection' field in the VM exit collateral for the PAGING exit is not
used - get rid of it.

10 years agoRename 'vm_interrupt_hostcpu()' to 'vcpu_notify_event()' because the function
neel [Tue, 3 Dec 2013 00:43:31 +0000 (00:43 +0000)]
Rename 'vm_interrupt_hostcpu()' to 'vcpu_notify_event()' because the function
has outgrown its original name. Originally this function simply sent an IPI
to the host cpu that a vcpu was executing on but now it does a lot more than
just that.

Reviewed by: grehan@

10 years agoRight now LOCK_DEBUG is enabled if KTR is on.
attilio [Mon, 2 Dec 2013 22:34:47 +0000 (22:34 +0000)]
Right now LOCK_DEBUG is enabled if KTR is on.
This is to support LOCK_LOG_* functionality effectively in debugging
environments but it is overkill because really LOCK_DEBUG should be on
only if (KTR_COMPILE & KTR_LOCK) is true.
Fix this by applying the correct logic.
In this process, move the KTR classes to its own header to reduce
namespace pollution.

Sponsored by: EMC / Isilon storage division
Reviewed by: jhb

10 years agoFix typo.
nwhitehorn [Mon, 2 Dec 2013 22:00:15 +0000 (22:00 +0000)]
Fix typo.

10 years agomdoc: quote string properly.
joel [Mon, 2 Dec 2013 19:49:52 +0000 (19:49 +0000)]
mdoc: quote string properly.

10 years agoFix PKG_ABI detection in bsdconfig(8) after pkg-1.2 is released, since
gjb [Mon, 2 Dec 2013 19:02:58 +0000 (19:02 +0000)]
Fix PKG_ABI detection in bsdconfig(8) after pkg-1.2 is released, since
the format of 'pkg -vv' output has changed.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoTurn off the dvdrom target by default. dvd1.iso is now built by
gjb [Mon, 2 Dec 2013 18:47:57 +0000 (18:47 +0000)]
Turn off the dvdrom target by default.  dvd1.iso is now built by
specifying 'WITH_DVD=1' during 'make release'.

This caused some problems during the freebsd-update builds for
10.0-BETA4.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoRemove fdtbus_bs_tag definition, which is now obsolete. The remainder of
nwhitehorn [Mon, 2 Dec 2013 17:45:43 +0000 (17:45 +0000)]
Remove fdtbus_bs_tag definition, which is now obsolete. The remainder of
this file is also slated for future demolition.

10 years agoBoth libcasper and libcapsicum libraries have to be installed in /lib/,
pjd [Mon, 2 Dec 2013 17:07:22 +0000 (17:07 +0000)]
Both libcasper and libcapsicum libraries have to be installed in /lib/,
as they are used by /sbin/casperd.

10 years agoRegression tests for existing Casper services.
pjd [Mon, 2 Dec 2013 17:01:01 +0000 (17:01 +0000)]
Regression tests for existing Casper services.

Sponsored by: The FreeBSD Foundation

10 years agoProvide reproducibility between builds by building pkg(8) from ports,
gjb [Mon, 2 Dec 2013 14:28:30 +0000 (14:28 +0000)]
Provide reproducibility between builds by building pkg(8) from ports,
instead of using pkg-bootstrap.

This should resolve a problem that was discovered during 10.0-BETA4
freebsd-update(8) builds,

Reported by: secteam (delphij)
MFC after: 3 days
X-MFC-to-10: possibly immediately, pending freebsd-update(8) builds
Sponsored by: The FreeBSD Foundation

10 years agoEnable missing Access Flag for secondary cores on ARMv6/v7
zbb [Mon, 2 Dec 2013 13:09:59 +0000 (13:09 +0000)]
Enable missing Access Flag for secondary cores on ARMv6/v7

Spotted by: Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf

> Description of fields to fill in above:                     76 columns --|
> PR:            If a GNATS PR is affected by the change.
> Submitted by:  If someone else sent in the change.
> Reviewed by:   If someone else reviewed your modification.
> Approved by:   If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after:     N [day[s]|week[s]|month[s]].  Request a reminder email.
> Security:      Vulnerability reference (one per line) or description.
> Empty fields above will be automatically removed.

M    sys/arm/arm/locore.S

10 years agoForgot to 'svn add' lib/libcasper/ directory.
pjd [Mon, 2 Dec 2013 10:18:25 +0000 (10:18 +0000)]
Forgot to 'svn add' lib/libcasper/ directory.

Reported by: glebius

10 years agoGrammar fix.
trasz [Mon, 2 Dec 2013 09:47:22 +0000 (09:47 +0000)]
Grammar fix.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoFix typos.
trasz [Mon, 2 Dec 2013 09:23:34 +0000 (09:23 +0000)]
Fix typos.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoThe RUN_MAX_TXSZ constat is defined as Tx desc + Tx wireless info + MCLBYTES +
kevlo [Mon, 2 Dec 2013 09:07:43 +0000 (09:07 +0000)]
The RUN_MAX_TXSZ constat is defined as Tx desc + Tx wireless info + MCLBYTES +
max padding.  We were lucky in that run(4) working fine since both
rt2860_rxwi and rt2860_txwi structure sizes are the same.

10 years agoPlease welcome casperd daemon. It (and its services) will be responsible for
pjd [Mon, 2 Dec 2013 08:21:28 +0000 (08:21 +0000)]
Please welcome casperd daemon. It (and its services) will be responsible for
giving access to functionality that is not available in capability mode
sandbox. The functionality can be precisely restricted.

Start with the following services:
- system.dns - provides API compatible to:
- gethostbyname(3),
- gethostbyname2(3),
- gethostbyaddr(3),
- getaddrinfo(3),
- getnameinfo(3),
- system.grp - provides getgrent(3)-compatible API,
- system.pwd - provides getpwent(3)-compatible API,
- system.random - allows to obtain entropy from /dev/random,
- system.sysctl - provides sysctlbyname(3-compatible API.

Sponsored by: The FreeBSD Foundation

10 years ago* Sort the copyright lines by date
adrian [Mon, 2 Dec 2013 05:45:11 +0000 (05:45 +0000)]
* Sort the copyright lines by date
* Ok ok, I've touched this enough to claim part of it.

10 years agoAdd support for BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787.
yongari [Mon, 2 Dec 2013 05:21:54 +0000 (05:21 +0000)]
Add support for BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787.
Submitted by: jhb
PR: 184304

10 years agoOverhaul the iwn(4) scan infrastructure to be slightly more "correct"
adrian [Mon, 2 Dec 2013 03:59:45 +0000 (03:59 +0000)]
Overhaul the iwn(4) scan infrastructure to be slightly more "correct"
for these chipsets.

* Correctly set the active/passive flag in the scan request - this is
  NOT a "is the channel active|passive"; it's to do with whether we
  have an SSID to actively scan for or not.  The firmware takes care
  of the active/passive setup of the channel.

* Calculate the active/passive dwell time based on the beacon interval
  and the channel mode, rather than using a hard coded value.

* For now, hardcode the scan service_time.  It's defined as:

  31:22 - number of beacon intervals to come back onto the home channel
          for;
  0:21  - time (microseconds) to come back onto the home channel for.

  When doing an active scan when the NIC is active (whether we're associated
  or not - it only matters if we've setup the NIC to a destination or not)
  this determines how much time to stay on the home channel for when
  scanning.  We can tune this based on the amount of active traffic.

  For now it's 4 beacon intervals and 100 microseconds.

* Fix the "good crc threshold" setting.  It differs based on the NIC
  firmware.  Some older firmware required a workaround; the later
  firmware instead treats the field as a flag.

* Enforce that we are not sending a scan command if one is already
  pending.  Any time this is done is a bug and it absolutely needs
  to be fixed - so be very loud.

* Add the SCAN flag to a few debug messages that are scan related but
  only occuring under STATE.

Now, this does get noisy when you're scanning in an actively busy 2GHz
network as the firmware (for reason I don't quite yet understand) seems
hell bent on staying on some passive channels longer than it should.
However, it should eventually recover and complete the scan.

This is a work in progress; please let me know if things get stuck or
if things improve!

Tested:

* intel centrino 2200
* intel centrino 2230
* intel 6200
* intel 5100
* intel 4965 (gets upset, but that's a known issue)

Obtained from: linux iwlwifi

10 years agoAdd a nand flash controller driver for Atmel at91 family. Tested only
ian [Mon, 2 Dec 2013 03:52:40 +0000 (03:52 +0000)]
Add a nand flash controller driver for Atmel at91 family.  Tested only
on at91rm9200 so far.

The files.at91 has listed a nand driver for ages, but it never existed.

10 years agoLog the rx ring offset as part of the debug message.
adrian [Mon, 2 Dec 2013 03:49:33 +0000 (03:49 +0000)]
Log the rx ring offset as part of the debug message.

10 years agolibcpp: Merge fixes from upstream
pfg [Mon, 2 Dec 2013 03:47:08 +0000 (03:47 +0000)]
libcpp: Merge fixes from upstream

GCC preprocessor/29966:
* macro.c (lex_expansion_token): Save and restore cpp_reader's
cur_token.
(_cpp_create_definition): Don't restore cur_token here.
* lex.c (_cpp_lex_token): Added assertion.

GCC preprocessor/28709:
* macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.

GCC c/31924
* expr.c (interpret_float_suffix): Check for invalid suffix.

GCC preprocessor/14331
* lex.c (_cpp_get_fresh_line):  Don't warn if no newline at EOF.

Fixup whitespacing

Obtained from: gcc per-4.3 (rev. 121340, 124356, 124358, 124730,
  125212, 125255 ; GPLv2)
MFC after: 3 weeks

10 years agoOops - fix bad indent. Sorry!
adrian [Mon, 2 Dec 2013 03:43:37 +0000 (03:43 +0000)]
Oops - fix bad indent. Sorry!

10 years agoAdd some sanity checks to the TLV fetch.
adrian [Mon, 2 Dec 2013 03:42:39 +0000 (03:42 +0000)]
Add some sanity checks to the TLV fetch.

Obtained from: Linux iwlwifi

10 years agoAdd some code to double-check whether we're correctly populating the
adrian [Mon, 2 Dec 2013 03:40:51 +0000 (03:40 +0000)]
Add some code to double-check whether we're correctly populating the
TX ring according to what the firmware requires.

The firmware requires A-MPDU sub-frames to be at a very specific ring
offset - that is, the ring slot offset should be (seqno % 256.)

This holds for every NIC I've tested thus far except the 4965,
which starts erroring out here shortly before the firmware panics.
Which is good, it's doing what it's supposed to (read: capture that
we've screwed up somewhere.)

The specifics about getting this stuff right:

* the initial seqno allocation should match up with the ringid.
* .. yes, this means we can start at a ring offset that isn't zero.
* .. because we program the start seqno in the firmware message
  to setup the AC.
* The initial seqno allocation may be non-zero _and_ frames may be
  being transmitted during a-mpdu negotiation.  I faced similar
  issues on ath(4) and had to software queue frames to that node+TID
  during A-MPDU negotiation.
* seqno allocation should be in lockstep with ring increments.
* If we fail to transmit some segment, no, we shouldn't reuse that
  ring slot.  We should just transmit a BAR (which we aren't yet
  doing, sigh) and move onto the next seqno.
* In theory there shouldn't be any holes in the seqno space when
  we are transmitting frames.

Tested:

* 4965 (throws problems, so yes we have to fix this);
* 5100 (seems ok);
* 6200 (seems ok);
* 2200 (seems ok);
* 2230 (seems ok).

10 years agoPartial revert of r258779 and r258780:
eadler [Mon, 2 Dec 2013 03:36:44 +0000 (03:36 +0000)]
Partial revert of r258779 and r258780:
The directory sys/dev/drm2/i915 is apperently contributed code.
Revert to the broken version of this file to make future imports easier.

Requested by: kib

10 years agoIn a situation where:
eadler [Mon, 2 Dec 2013 03:11:25 +0000 (03:11 +0000)]
In a situation where:
- The remote host sends a FIN
- in an ACK for a sequence number for which an ACK has already
  been received
- There is still unacked data on route to the remote host
- The packet does not contain a window update

The packet may be dropped without processing the FIN flag.

PR: kern/99188
Submitted by: Staffan Ulfberg <staffan@ulfberg.se>
Discussed with: andre
MFC after: never

10 years agoAdd definitions for the additional PIO pins found on recent AT91 SoCs.
ian [Mon, 2 Dec 2013 02:33:03 +0000 (02:33 +0000)]
Add definitions for the additional PIO pins found on recent AT91 SoCs.

10 years agoAdd new sysctl, kern.supported_abis, containing the list of FreeBSD
nwhitehorn [Mon, 2 Dec 2013 00:44:36 +0000 (00:44 +0000)]
Add new sysctl, kern.supported_abis, containing the list of FreeBSD
MACHINE_ARCH values whose binaries this kernel can run. This patch provides
a feature requested for implementing pkgng ABI identifiers in a robust
way.

The list is designed to indicate whether, say, an i386 package can be run on
the current system. If kern.supported_abis contains "i386", then the answer
is yes. Otherwise, the answer is no.

At the moment, this only supports MACHINE_ARCH and MACHINE_ARCH32. As we
gain support for more interesting combinations, this needs to become more
flexible, possibily through the sysent framework, along with the
hw.machine_arch emulation immediately preceding this code in kern_mib.c.

Reviewed by: imp
MFC after: 3 days

10 years agolibiberty: upstream updates.
pfg [Sun, 1 Dec 2013 22:08:19 +0000 (22:08 +0000)]
libiberty: upstream updates.

There is a new ChangeLog.gcc43 file but most notable:

* floatformat.c (get_field): Fix segfault with little-endian word
  order on 64-bit hosts.
  (put_field): Likewise.
  (min): Move definition.

gcc/cp/ChangeLog
2007-05-04  Geoffrey Keating  <geoffk@apple.com>

  PR 31775
  * mangle.c (write_mangled_name): Mangle static variable names.
  (write_unqualified_name): Use local-source-name for
  namespace-scope static variables.
(Completes FreeBSD's r258017 )

Obtained from: gcc 4.3 (rev. 118552, 120097, 20698, 120702,
 121364, 122972, 126588; GPLv2)
MFC after: 2 weeks

10 years agoRemove unused variable.
glebius [Sun, 1 Dec 2013 20:03:00 +0000 (20:03 +0000)]
Remove unused variable.

10 years agoRevert last few revisions; apologies for the noise. There are very rare,
nwhitehorn [Sun, 1 Dec 2013 19:59:36 +0000 (19:59 +0000)]
Revert last few revisions; apologies for the noise. There are very rare,
broken systems that require SPRG state to be preserved.

10 years agoDeleted one line too many.
nwhitehorn [Sun, 1 Dec 2013 19:56:30 +0000 (19:56 +0000)]
Deleted one line too many.

10 years agoNo actual hardware supported by FreeBSD requires this SPRG save/restore
nwhitehorn [Sun, 1 Dec 2013 19:45:04 +0000 (19:45 +0000)]
No actual hardware supported by FreeBSD requires this SPRG save/restore
paranoia, so kill it. In particular, changes to SPRG0 are dangerous, since
that is where the PCPU pointer is kept.

10 years agoRearchitect platform memory map parsing to make it less
nwhitehorn [Sun, 1 Dec 2013 19:43:15 +0000 (19:43 +0000)]
Rearchitect platform memory map parsing to make it less
Open Firmware-centric:
- Keep the static list of regions in platform.c instead of ofw_machdep.c
- Move various merging and sorting operations to platform.c as well
- Move apple_hacks code out of ofw_machdep.c and into platform_powermac.c,
  where it belongs
- Move CHRP-specific dynamic-reconfiguration memory parsing into
  platform_chrp.c instead of pretending it is shared code

10 years agoReal OF systems have an ihandle under /chosen/stdout, not a phandle. Use
nwhitehorn [Sun, 1 Dec 2013 19:05:32 +0000 (19:05 +0000)]
Real OF systems have an ihandle under /chosen/stdout, not a phandle. Use
the right type.

10 years agoOpen Firmware mandates that certain cross-references, in particular those
nwhitehorn [Sun, 1 Dec 2013 19:03:20 +0000 (19:03 +0000)]
Open Firmware mandates that certain cross-references, in particular those
in /chosen, be ihandles. The ePAPR spec makes those cross-reference phandles,
since FDT has no concept of ihandles. Have the OF FDT CI module interpret
queries about ihandles as cross-reference phandles.

10 years agoRemove unnecessary double-setting of the thread's onfault state in
nwhitehorn [Sun, 1 Dec 2013 17:29:07 +0000 (17:29 +0000)]
Remove unnecessary double-setting of the thread's onfault state in
copyinstr().

10 years agoThe kernel stack guard pages are only below the stack pointer, not above.
nwhitehorn [Sun, 1 Dec 2013 17:28:28 +0000 (17:28 +0000)]
The kernel stack guard pages are only below the stack pointer, not above.
Prevent erroneous detection of stack overflows on legitimate faults on the
page after this thread's stack.

MFC after: 3 days

10 years agotest: Simplify the code by unifying op_num and op_type.
jilles [Sun, 1 Dec 2013 17:00:57 +0000 (17:00 +0000)]
test: Simplify the code by unifying op_num and op_type.

The global variable t_wp_op is no longer needed.

10 years agoMake uart_cpu_powerpc work on both FDT and OFW systems. This is the last
nwhitehorn [Sun, 1 Dec 2013 16:02:22 +0000 (16:02 +0000)]
Make uart_cpu_powerpc work on both FDT and OFW systems. This is the last
remaining modification required to build kernels that work with both on
PowerPC.

10 years agoUse standard CLEANFILES/CLEANDIRS and clean target in bsd.obj.mk.
hrs [Sun, 1 Dec 2013 15:24:35 +0000 (15:24 +0000)]
Use standard CLEANFILES/CLEANDIRS and clean target in bsd.obj.mk.

10 years ago- Prevent TARGET and TARGET_ARCH from being defined as empty when
hrs [Sun, 1 Dec 2013 15:06:30 +0000 (15:06 +0000)]
- Prevent TARGET and TARGET_ARCH from being defined as empty when
  TARGET="" and/or TARGET_ARCH="" is specified.
- Remove extra ().

10 years agochmod(2): Document S_ISVTX following SUSv3/SUSv4.
jilles [Sun, 1 Dec 2013 12:24:57 +0000 (12:24 +0000)]
chmod(2): Document S_ISVTX following SUSv3/SUSv4.

S_ISTXT is non-standard.

While here, also update fchmodat() standards entry to POSIX.1-2008.

10 years agowaitid(2): Do not tell userland programmers to include <sys/signal.h>.
jilles [Sun, 1 Dec 2013 11:59:37 +0000 (11:59 +0000)]
waitid(2): Do not tell userland programmers to include <sys/signal.h>.

Userland should get these definitions by including <signal.h>.

10 years agoRemove trailing backslash.
pjd [Sun, 1 Dec 2013 09:52:38 +0000 (09:52 +0000)]
Remove trailing backslash.

10 years agoMove my simple logging API to a separate library. It is now already used
pjd [Sun, 1 Dec 2013 09:41:06 +0000 (09:41 +0000)]
Move my simple logging API to a separate library. It is now already used
by hastctl(8), hastd(8) and auditdistd(8) and will soon be also used
by casperd(8) and its services. There is no documentation and pjdlog.h
header file is not installed in /usr/include/ to keep it private.
Unfortunately we don't have /lib/private/ at this point, only
/usr/lib/private/, so the library is installed in /lib/.

Sponsored by: The FreeBSD Foundation

10 years agoFix hang on reboot with active iSCSI connections.
trasz [Sun, 1 Dec 2013 08:13:10 +0000 (08:13 +0000)]
Fix hang on reboot with active iSCSI connections.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoWe needlessly panic when trying to flush MKDIR_PARENT dependencies.
mckusick [Sun, 1 Dec 2013 07:34:21 +0000 (07:34 +0000)]
We needlessly panic when trying to flush MKDIR_PARENT dependencies.
We had previously tried to flush all MKDIR_PARENT dependencies (and
all the NEWBLOCK pagedeps) by calling ffs_update(). However this will
only resolve these dependencies in direct blocks. So very large
directories with MKDIR_PARENT dependencies in indirect blocks had
not yet gotten flushed. As the directory is in the midst of doing a
complete sync, we simply defer the checking of the MKDIR_PARENT
dependencies until the indirect blocks have been sync'ed.

Reported by: Shawn Wallbridge of imaginaryforces.com
Tested by:   John-Mark Gurney <jmg@funkthat.com>
PR:          183424
MFC after:   2 weeks

10 years agoMigrate the sendfile_sync structure into a public(ish) API in preparation
adrian [Sun, 1 Dec 2013 03:53:21 +0000 (03:53 +0000)]
Migrate the sendfile_sync structure into a public(ish) API in preparation
for extending and reusing it.

The sendfile_sync wrapper is mostly just a "mbuf transaction" wrapper,
used to indicate that the backing store for a group of mbufs has completed.
It's only being used by sendfile for now and it's only implementing a
sleep/wakeup rendezvous.  However, there are other potential signaling
paths (kqueue) and other potential uses (socket zero-copy write) where the
same mechanism would also be useful.

So, with that in mind:

* extract the sendfile_sync code out into sf_sync_*() methods
* teach the sf_sync_alloc method about the current config flag -
  it will eventually know about kqueue.
* move the sendfile_sync code out of do_sendfile() - the only thing
  it now knows about is the sfs pointer.  The guts of the sync
  rendezvous (setup, rendezvous/wait, free) is now done in the
  syscall wrapper.
* .. and teach the 32-bit compat sendfile call the same.

This should be a no-op.  It's primarily preparation work for teaching
the sendfile_sync about kqueue notification.

Tested:

* Peter Holm's sendfile stress / regression scripts

Sponsored by: Netflix, Inc.

10 years agor258780 should not have applied to .S files.
eadler [Sun, 1 Dec 2013 02:58:48 +0000 (02:58 +0000)]
r258780 should not have applied to .S files.

Reported by: jmallett

10 years agoMove OPTIONS_UNSET outside of the PBUILD_FLAGS variable, otherwise the
gjb [Sat, 30 Nov 2013 23:56:26 +0000 (23:56 +0000)]
Move OPTIONS_UNSET outside of the PBUILD_FLAGS variable, otherwise the
textproc/docproj port build fails.

Pointyhat: gjb
MFC after: 3 days
X-Before-RC1: yes
Sponsored by: The FreeBSD Foundation

10 years agoSort function output on name of the function.
dteske [Sat, 30 Nov 2013 23:47:18 +0000 (23:47 +0000)]
Sort function output on name of the function.

10 years agoFix undefined behavior: (1 << 31) is not defined as 1 is an int and this
eadler [Sat, 30 Nov 2013 22:17:27 +0000 (22:17 +0000)]
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this
shifts into the sign bit.  Instead use (1U << 31) which gets the
expected result.

This fix is not ideal as it assumes a 32 bit int, but does fix the issue
for most cases.

A similar change was made in OpenBSD.

Discussed with: -arch, rdivacky
Reviewed by: cperciva

10 years agoSimilar to the (1 << 31) case it is not defined to do (2 << 30).
eadler [Sat, 30 Nov 2013 22:16:37 +0000 (22:16 +0000)]
Similar to the (1 << 31) case it is not defined to do (2 << 30).

10 years agoAdd a printf to inform about the logical memory block size which is in use
andreast [Sat, 30 Nov 2013 21:54:55 +0000 (21:54 +0000)]
Add a printf to inform about the logical memory block size which is in use
by the system. This might give a hint why a pSeries system is not booting.

10 years agosh: Prefer memcpy() to strcpy() in most cases. Remove the scopy macro.
jilles [Sat, 30 Nov 2013 21:27:11 +0000 (21:27 +0000)]
sh: Prefer memcpy() to strcpy() in most cases. Remove the scopy macro.

10 years agoAdd NOPKG to disable pkg-stage.
hrs [Sat, 30 Nov 2013 17:07:53 +0000 (17:07 +0000)]
Add NOPKG to disable pkg-stage.

10 years agoMake process descriptors standard part of the kernel. rwhod(8) already
pjd [Sat, 30 Nov 2013 15:08:35 +0000 (15:08 +0000)]
Make process descriptors standard part of the kernel. rwhod(8) already
requires process descriptors to work and having PROCDESC in GENERIC
seems not enough, especially that we hope to have more and more consumers
in the base.

MFC after: 3 days

10 years agoIn
tuexen [Sat, 30 Nov 2013 12:51:19 +0000 (12:51 +0000)]
In
http://svnweb.freebsd.org/changeset/base/258221
I introduced a bug which initialized global locks
whenever the SCTP stack initialized. This was fixed in
http://svnweb.freebsd.org/changeset/base/258574
by rodrigc@. He just initialized the locks for
the default vnet. This fix reverts to the old
behaviour before r258221, which explicitly makes
sure it is only called once, because this works also on
other platforms.
MFC after: 3 days
X-MFC with: r258574.

10 years agoDisable this debugging - it's far too verbose when doing TX rate debugging.
adrian [Fri, 29 Nov 2013 22:36:00 +0000 (22:36 +0000)]
Disable this debugging - it's far too verbose when doing TX rate debugging.

10 years agoUse the correct endian-ness accessor for this TLV field.
adrian [Fri, 29 Nov 2013 22:35:24 +0000 (22:35 +0000)]
Use the correct endian-ness accessor for this TLV field.
(It's coming from firmware and thus it's defined as little-endian.)

10 years agoMake sure any waiters on the scan results get notified if the scan task
adrian [Fri, 29 Nov 2013 22:24:57 +0000 (22:24 +0000)]
Make sure any waiters on the scan results get notified if the scan task
decides to do nothing.

If this isn't done, then a scan request whilst a scan occurs in an active
channel set or a completed channel set will hang.

Tested:

* Intel 5100, STA mode

10 years agoUse the Open Firmware-based CPU frequency determination as a generic
nwhitehorn [Fri, 29 Nov 2013 21:59:03 +0000 (21:59 +0000)]
Use the Open Firmware-based CPU frequency determination as a generic
fallback if we can't measure CPU frequency. This is also useful on a
variety of embedded systems using FDT.

10 years agoFix typo.
andreast [Fri, 29 Nov 2013 20:19:00 +0000 (20:19 +0000)]
Fix typo.

10 years agoFix typo
eadler [Fri, 29 Nov 2013 20:14:26 +0000 (20:14 +0000)]
Fix typo

Reported by: emaste