]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
9 years agoMFC r268286: Fix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT
cy [Sat, 12 Jul 2014 05:59:19 +0000 (05:59 +0000)]
MFC r268286: Fix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT
(NO_INET6) are specified.

Approved by: glebius (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@268563 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267643, r267873, r268391, r268398:
mav [Sat, 12 Jul 2014 04:34:39 +0000 (04:34 +0000)]
MFC r267643, r267873, r268391, r268398:
Introduce fine-grained CTL locking to improve SMP scalability.

Split global ctl_lock, historically protecting most of CTL context:
 - remaining ctl_lock now protects lists of fronends and backends;
 - per-LUN lun_lock(s) protect LUN-specific information;
 - per-thread queue_lock(s) protect request queues.
This allows to radically reduce congestion on ctl_lock.

Create multiple worker threads, depending on number of CPUs, and assign
each LUN to one of them.  This allows to spread load between multiple CPUs,
still avoiging congestion on queues and LUNs locks.

On 40-core server, exporting 5 LUNs, each backed by gstripe of SATA SSDs,
accessed via 6 iSCSI connections, this change improves peak request rate
from 250K to 680K IOPS.

Sponsored by: iXsystems, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268556 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268283:
mav [Sat, 12 Jul 2014 02:40:25 +0000 (02:40 +0000)]
MFC r268283:
Improve readability of XML generated by CTL_LUN_LIST.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268555 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268392:
mav [Sat, 12 Jul 2014 02:33:03 +0000 (02:33 +0000)]
MFC r268392:
Do not return statuses for aborted iSCSI commands.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268554 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268204:
mav [Sat, 12 Jul 2014 02:29:33 +0000 (02:29 +0000)]
MFC r268204:
Use separate memory type M_CTLIO for I/Os.

CTL allocate large amount of RAM.  This change give some more stats.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268553 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267933:
mav [Sat, 12 Jul 2014 02:28:11 +0000 (02:28 +0000)]
MFC r267933:
Simplify statistics calculation.

Instead of trying to guess size of disk I/O operations (it just won't work
that way for newly added commands, and is equal to data move size for old
ones), account data move traffic.  If disk I/Os are that interesting, then
backends have to account and provide that information.

Block backend already exports the information about disk I/Os via devstat,
so having it here too is excessive.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268552 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267906:
mav [Sat, 12 Jul 2014 02:26:11 +0000 (02:26 +0000)]
MFC r267906:
Allow MODE SENSE commands through Write Exclusive persistent reservation,
as required by SPC-4.

Report that fact in persistent reservation capabilities.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268551 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267905:
mav [Sat, 12 Jul 2014 02:24:52 +0000 (02:24 +0000)]
MFC r267905:
Add READ BUFFER and improve WRITE BUFFER SCSI commands support.

This gives some use to 512KB per-LUN buffers, allocated for Copan-specific
processor code and not used.  It allows, for example, to test transport
performance and/or correctness without accessing the media, as supported
by Linux version of sg3_utils.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268550 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267877:
mav [Sat, 12 Jul 2014 02:17:10 +0000 (02:17 +0000)]
MFC r267877:
Lock devstat updates in block backend to make it usable.  Polish lock names.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268549 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268419:
mav [Sat, 12 Jul 2014 02:03:29 +0000 (02:03 +0000)]
MFC r268419:
Fix use-after-free on XPT_RESET_BUS.

That command is not queued, so does not use later status update.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268546 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267986:
mav [Sat, 12 Jul 2014 01:59:07 +0000 (01:59 +0000)]
MFC r267986:
Remove odd practice of inverting error codes.

-EPERM is equal to ERESTART, returning which from ioctl() handler causes
infinite syscall restart.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268545 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267984:
delphij [Fri, 11 Jul 2014 00:26:57 +0000 (00:26 +0000)]
MFC r267984:

Use Intel's official name (Secure Key) per Intel® Digital Random Number
Generator (DRNG) Software Implementation Guide.

Reviewed by: kib
Approved by: so

git-svn-id: svn://svn.freebsd.org/base/stable/10@268519 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoCorrect memset size.
delphij [Fri, 11 Jul 2014 00:14:29 +0000 (00:14 +0000)]
Correct memset size.

Submitted by: Sascha Wildner (swildner at dragonflybsd dot org)
Reviewed by: Kashyap Desai <kashyap.desai avagotech.com>

git-svn-id: svn://svn.freebsd.org/base/stable/10@268518 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267886:
delphij [Fri, 11 Jul 2014 00:11:24 +0000 (00:11 +0000)]
MFC r267886:

Use correct length for buffer.

Submitted by: Sascha Wildner <swildner dragonflybsd org>

git-svn-id: svn://svn.freebsd.org/base/stable/10@268517 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267887:
delphij [Fri, 11 Jul 2014 00:08:13 +0000 (00:08 +0000)]
MFC r267887:

Correct buffer size.

Submitted by: Sascha Wildner <swildner dragonflybsd org>

git-svn-id: svn://svn.freebsd.org/base/stable/10@268516 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267897: MFV r267843:
delphij [Fri, 11 Jul 2014 00:00:00 +0000 (00:00 +0000)]
MFC r267897: MFV r267843:

Update file/libmagic to 5.19.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268515 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268212:
kib [Thu, 10 Jul 2014 09:09:37 +0000 (09:09 +0000)]
MFC r268212:
Note that most errors are possible for all syscalls from utimes(2)
family.  Minor wording corrections.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268484 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268211:
kib [Thu, 10 Jul 2014 09:08:02 +0000 (09:08 +0000)]
MFC r268211:
Micro-manage clang to get the expected inlining for cpu_search().

git-svn-id: svn://svn.freebsd.org/base/stable/10@268483 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoBump __FreeBSD_version after last SA-14:17.kmem so we have something
peter [Wed, 9 Jul 2014 00:12:15 +0000 (00:12 +0000)]
Bump __FreeBSD_version after last SA-14:17.kmem so we have something
to test against in the freebsd.org cluster.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268442 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoDocument FreeBSD-SA-14:17.kmem
gjb [Tue, 8 Jul 2014 23:07:09 +0000 (23:07 +0000)]
Document FreeBSD-SA-14:17.kmem

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@268439 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoFix kernel memory disclosure in control message and SCTP notifications.
delphij [Tue, 8 Jul 2014 21:54:50 +0000 (21:54 +0000)]
Fix kernel memory disclosure in control message and SCTP notifications.

Security: FreeBSD-SA-14:17.kmem
Security: CVE-2014-3952, CVE-2014-3953

git-svn-id: svn://svn.freebsd.org/base/stable/10@268432 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoDocument r268091, disklabel64 partition scheme.
gjb [Tue, 8 Jul 2014 15:11:33 +0000 (15:11 +0000)]
Document r268091, disklabel64 partition scheme.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@268412 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoDocument r268161, mkimg(1) merged to stable/10.
gjb [Tue, 8 Jul 2014 15:09:55 +0000 (15:09 +0000)]
Document r268161, mkimg(1) merged to stable/10.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@268411 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoRegen src.conf(5) after r268399
emaste [Tue, 8 Jul 2014 14:11:28 +0000 (14:11 +0000)]
Regen src.conf(5) after r268399

git-svn-id: svn://svn.freebsd.org/base/stable/10@268400 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268022: Rename the WITHOUT_VT_SUPPORT knob to WITHOUT_VT
emaste [Tue, 8 Jul 2014 14:04:36 +0000 (14:04 +0000)]
MFC r268022: Rename the WITHOUT_VT_SUPPORT knob to WITHOUT_VT

  The _SUPPORT knobs have a consistent meaning which differs from the
  behaviour controlled by this knob.  As the knob is opt-out and has not
  appeared in a release the impact should be low.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268399 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268393: [mdoc] Fix previous.
pluknet [Tue, 8 Jul 2014 13:16:03 +0000 (13:16 +0000)]
MFC r268393: [mdoc] Fix previous.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268396 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268059: Add missing VT_ kernel config knobs
emaste [Tue, 8 Jul 2014 09:47:52 +0000 (09:47 +0000)]
MFC r268059: Add missing VT_ kernel config knobs

git-svn-id: svn://svn.freebsd.org/base/stable/10@268389 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268090:
ae [Tue, 8 Jul 2014 01:01:30 +0000 (01:01 +0000)]
MFC r268090:
  Document all aliases supported by GEOM_PART class.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268379 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268089:
ae [Tue, 8 Jul 2014 00:59:35 +0000 (00:59 +0000)]
MFC r268089:
  Linux uses its own UUID for data partitions.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268378 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoTemporary disable build of vt_efifb vt(4) driver, not all parts of UEFI support
ray [Mon, 7 Jul 2014 21:27:47 +0000 (21:27 +0000)]
Temporary disable build of vt_efifb vt(4) driver, not all parts of UEFI support
here yet.
This direct commit to STABLE-10, because HEAD already support UEFI FB.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@268372 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC of r263873.
ray [Mon, 7 Jul 2014 19:31:02 +0000 (19:31 +0000)]
MFC of r263873.

Pointed by:     Ivan Klymenko <fidaj@ukr.net>

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@268371 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268049:
ume [Mon, 7 Jul 2014 15:31:46 +0000 (15:31 +0000)]
MFC r268049:
Fix ifconfig to show pltime and vltime with -L option,
again after usage change from time_second to time_uptime.

PR: 188520
Submitted by: Guy Yur <guyyur__at__gmail.com>

git-svn-id: svn://svn.freebsd.org/base/stable/10@268367 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years ago267622 Log:
ray [Mon, 7 Jul 2014 14:16:05 +0000 (14:16 +0000)]
267622 Log:
  Rename vt(4) vga module to dismiss interference with syscons(4) vga module.
267623 Log:
  Remove stale link to deleted vt(4) xboxfb driver.
267624 Log:
  syscons(4) and vt(4) can be built together now.
267625 Log:
  Allow to disable syscons(4) if "hw.syscons.disable" kenv is set.
267626 Log:
  Suspend vt(4) initialization if "kern.vt.disable" kenv is set.
267965 by emaste@ Log:
  Use a common tunable to choose between vt(4)/sc(4)
  With this change and previous work from ray@ it will be possible to put
  both in GENERIC, and have one enabled by default, but allow the other to
  be selected via the loader.
  (The previous implementation had separate kern.vt.disable and
  hw.syscons.disable tunables, and would panic if both drivers were
  compiled in and neither was explicitly disabled.)
268175 by emaste@ Log:
  Fix vt(4) detection in kbdcontrol and vidcontrol
  As sc(4) and vt(4) coexist and are both enabled in GENERIC, the existence
  of a vt(4) sysctl is not sufficient to determine that vt(4) is in use.
  Reported by:  Trond Endrestøl
268045 by emaste@ Log:
  Add vt(4) to GENERIC and retire the separate VT config
  vt(4) and sc(4) can now coexist in the same kernel.  To choose the vt
  driver, set the loader tunable kern.vty=vt .

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@268366 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC 267756:
ache [Mon, 7 Jul 2014 05:31:50 +0000 (05:31 +0000)]
MFC 267756:

Merge intermediate OpenBSD v1.25 changes (almost identical to ours)
to reduce diff and bump OpenBSD patch level to v1.26.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268355 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267745, r268268:
pfg [Mon, 7 Jul 2014 02:47:41 +0000 (02:47 +0000)]
MFC r267745, r268268:
getopt(3): recognize option:: as GNU extension for "optional options".

Also ANSIfy a function declaration.

While here update the OpenBSD patch level in getopt_long.c as we
already have the corresponding change.

Obtained from: NetBSD
MFC after: 2 weeks

git-svn-id: svn://svn.freebsd.org/base/stable/10@268352 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268002:
mjg [Sun, 6 Jul 2014 23:27:13 +0000 (23:27 +0000)]
MFC r268002:

Call fdcloseexec right after fdunshare.

No functional changes.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268348 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFH: r264781, r267669, r267670
bapt [Sun, 6 Jul 2014 23:24:06 +0000 (23:24 +0000)]
MFH: r264781, r267669, r267670

Simplify reading pw.conf(5) by using getline(3)

Removed compatibility with pre FreeBSD 2.2 pw_mkdb command [1]
Fix some broken indentattion [1]

Fix changing the username [2]

PR: 189172 [1], 189173 [2]
Submitted by: fullermd@over-yonder.net [1][2]

git-svn-id: svn://svn.freebsd.org/base/stable/10@268346 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268001:
mjg [Sun, 6 Jul 2014 23:23:01 +0000 (23:23 +0000)]
MFC r268001:
Make fdunshare accept only td parameter.

Proc had to match the thread anyway and 2 parameters were inconsistent
with the rest.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268345 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268000:
mjg [Sun, 6 Jul 2014 23:20:48 +0000 (23:20 +0000)]
MFC r268000:

Make sure to always clear p_fd for process getting rid of its filetable.

Filetable can be shared with other processes. Previous code failed to
clear the pointer for all but the last process getting rid of the table.
This is mostly cosmetics.

Get rid of 'This should happen earlier' comment. Clearing the pointer in
this place is fine as consumers can reliably check for files availability
by inspecting fd_refcnt and vnodes availabity by NULL-checking them.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268344 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoAdd mergeinfo missed in r268335-r268341
mjg [Sun, 6 Jul 2014 23:17:21 +0000 (23:17 +0000)]
Add mergeinfo missed in r268335-r268341

Prodded by: gjb

git-svn-id: svn://svn.freebsd.org/base/stable/10@268343 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267947:
mjg [Sun, 6 Jul 2014 23:01:29 +0000 (23:01 +0000)]
MFC r267947:

Check lower bound of cmsg_len.

If passed cm->cmsg_len was below cmsghdr size the experssion:
datalen = (caddr_t)cm + cm->cmsg_len - (caddr_t)data;

would give negative result. However, in practice it would not
result in a crash because the kernel would try to obtain garbage fds
for given process and would error out with EBADF.

PR: 124908
Submitted by: campbell mumble.net (modified a little)

git-svn-id: svn://svn.freebsd.org/base/stable/10@268341 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267760:
mjg [Sun, 6 Jul 2014 22:58:53 +0000 (22:58 +0000)]
MFC r267760:
Tidy up fd-related functions called by do_execve

o assert in each one that fdp is not shared
o remove unnecessary NULL checks - all userspace processes have fdtables
and kernel processes cannot execve
o remove comments about the danger of fd_ofiles getting reallocated - fdtable
is not shared and fd_ofiles could be only reallocated if new fd was about to be
added, but if that was possible the code would already be buggy as setugidsafety
work could be undone

git-svn-id: svn://svn.freebsd.org/base/stable/10@268340 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267755:
mjg [Sun, 6 Jul 2014 22:56:34 +0000 (22:56 +0000)]
MFC r267755:

Don't take filedesc lock in fdunshare().

We can read refcnt safely and only care if it is equal to 1.

If it could suddenly change from 1 to something bigger the code would be
buggy even in the previous form and transitions from > 1 to 1 are equally racy
and harmless (we copy even though there is no need).

git-svn-id: svn://svn.freebsd.org/base/stable/10@268339 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267710:
mjg [Sun, 6 Jul 2014 22:54:17 +0000 (22:54 +0000)]
MFC r267710:

fd: replace fd_nfiles with fd_lastfile where appropriate

fd_lastfile is guaranteed to be the biggest open fd, so when the intent
is to iterate over active fds or lookup one, there is no point in looking
beyond that limit.

Few places are left unpatched for now.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268338 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267708:
mjg [Sun, 6 Jul 2014 22:51:53 +0000 (22:51 +0000)]
MFC r267708:

do_dup: plug redundant adjustment of fd_lastfile

By that time it was already set by fdalloc, or was there in the first place
if fd is replaced.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268337 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r265247:
mjg [Sun, 6 Jul 2014 22:49:07 +0000 (22:49 +0000)]
MFC r265247:
Request a non-exiting process in sysctl_kern_proc_{o,}filedesc

This fixes a race with exit1 freeing p_textvp.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268336 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r265206:
mjg [Sun, 6 Jul 2014 22:47:18 +0000 (22:47 +0000)]
MFC r265206:

Ignore the error from pipespace_new when creating a pipe.

It can fail if pipe map is exhausted (as a result of too many pipes created),
but it is not fatal and could be provoked by unprivileged users. The only
consequence is worse performance with given pipe.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268335 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268193, r268203:
pfg [Sun, 6 Jul 2014 17:29:19 +0000 (17:29 +0000)]
MFC r268193, r268203:

Fix sed(1) usage: the -i extension is not an optional.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268325 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268125:
pfg [Sun, 6 Jul 2014 17:18:48 +0000 (17:18 +0000)]
MFC r268125:

Small merges from OpenSolaris:

These have no effect on FreeBSD, in fact they are ifdef'ed,
but make easier future merges:

6699767 panic in spec_open()

6718877 crgetzoneid() use can cause problems when forking processes with
USDT providers in a non global zone

git-svn-id: svn://svn.freebsd.org/base/stable/10@268323 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268232:
gjb [Sun, 6 Jul 2014 03:31:01 +0000 (03:31 +0000)]
MFC r268232:
  The u-boot tarball needed for some boards, BEAGLEBONE for
  example, explicitly hard-code gcc(1) as the compiler.

  Partially revert r264703, which did a post-chroot install
  of gcc(1).  This was initially removed because gcc(1) fails
  to build usr.bin/dtc/ causing the xdev target to fail.  So
  this time, move the gcc(1) installation after xdev is built.

  This change is likely applicable to stable/10 arm build
  failures, as well.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@268305 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268012, r268196:
bryanv [Sat, 5 Jul 2014 03:48:22 +0000 (03:48 +0000)]
MFC r268012, r268196:

  - Remove some write only variables
  - Give each interrupt a descriptive name when using MSIX

git-svn-id: svn://svn.freebsd.org/base/stable/10@268281 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268178:
mav [Sat, 5 Jul 2014 01:14:14 +0000 (01:14 +0000)]
MFC r268178:
Fix bug in sync control in new "dev" mode of ZVOL (r265678).

Don't check ZVOL_WCE flag, used in Solaris to control device "write cache".
It is not applicable on FreeBSD and by default set to "disable".

git-svn-id: svn://svn.freebsd.org/base/stable/10@268274 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267648:
mav [Fri, 4 Jul 2014 16:17:15 +0000 (16:17 +0000)]
MFC r267648:
serial_num and device_id fields are not necessarily null-terminated.

Before this it was impossible to use all 16 bytes of serial number, and
client always got serial number NULL-terminated, that is not required.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268262 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267641:
mav [Fri, 4 Jul 2014 16:11:30 +0000 (16:11 +0000)]
MFC r267641:
Add some more CTL_FLAG_ABORT check points.

This should allow to abort commands doing mostly disk I/O, such as VERIFY
or WRITE SAME.  Before this change CTL_FLAG_ABORT was only checked around
data moves, which for these commands may not happen for a very long time.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268261 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267637:
mav [Fri, 4 Jul 2014 16:10:14 +0000 (16:10 +0000)]
MFC r267637:
Add iSCSI Target Name ID descriptor to VPD 83h.

It shall/should be there according to SPC-4, and istgt also provides it.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268260 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267610 (by trasz):
mav [Fri, 4 Jul 2014 16:09:09 +0000 (16:09 +0000)]
MFC r267610 (by trasz):
Rework session termination in iSCSI target to actually wait
for any outstanding commands to be properly aborted by CTL.
Without it, in some cases (such as files backing the LUNs
stored on failing disk drives), terminating a busy session
would result in panic.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268259 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267574 (by trasz):
mav [Fri, 4 Jul 2014 16:07:57 +0000 (16:07 +0000)]
MFC r267574 (by trasz):
Make cs_terminating a bool; no functional changes.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268258 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267547, r267551 (by trasz):
mav [Fri, 4 Jul 2014 16:06:56 +0000 (16:06 +0000)]
MFC r267547, r267551 (by trasz):
Add LUN-associated name to VPD, to make Hyper-V Failover Cluster happy.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268257 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267051:
mav [Fri, 4 Jul 2014 15:09:56 +0000 (15:09 +0000)]
MFC r267051:
- Add support for SG_GET_SG_TABLESIZE IOCTL to report that we don't support
scatter/gather lists.
- Return error for still unsupported SG 3.x API read/write calls.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268255 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r268095
marius [Fri, 4 Jul 2014 13:57:58 +0000 (13:57 +0000)]
MFC: r268095

Actually pro AMD chipsets, making r244146 work.

Sponsored by: Bally Wulff Games & Entertainment GmbH

git-svn-id: svn://svn.freebsd.org/base/stable/10@268250 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267960:
hselasky [Fri, 4 Jul 2014 06:03:54 +0000 (06:03 +0000)]
MFC r267960:
Don't hide zero-length strings when doing sysctl listings.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268243 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267909: Document EINVAL.
pluknet [Thu, 3 Jul 2014 17:35:01 +0000 (17:35 +0000)]
MFC r267909: Document EINVAL.

PR: 191382

git-svn-id: svn://svn.freebsd.org/base/stable/10@268223 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267955 and r268209:
hselasky [Thu, 3 Jul 2014 16:13:44 +0000 (16:13 +0000)]
MFC r267955 and r268209:
- Add proper rangechecks in "axge_rx_frame()" function and
fix receive loop header parsing.
- Disable hardware checksumming until it is properly tested.

PR: 191432

git-svn-id: svn://svn.freebsd.org/base/stable/10@268219 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267912, r267915:
ume [Thu, 3 Jul 2014 15:56:30 +0000 (15:56 +0000)]
MFC r267912, r267915:
- Exclude loopback address rather than loopback interface.
- style(9)

Spotted by: melifaro

git-svn-id: svn://svn.freebsd.org/base/stable/10@268216 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r267852
daichi [Thu, 3 Jul 2014 10:59:42 +0000 (10:59 +0000)]
MFC: r267852

Fixed an IIC timing issue between the glxiic master and a slave of
peripheral devices.  When transmitting (rx) from slave to master,
sometimes nAKC delays. As a result, some slaves fails their
transmission.

Submitted by: Masanori OZAWA <ozawa@ongs.co.jp>
Reviewed by: brix

git-svn-id: svn://svn.freebsd.org/base/stable/10@268210 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268078 and r268080:
hselasky [Thu, 3 Jul 2014 06:44:55 +0000 (06:44 +0000)]
MFC r268078 and r268080:
Fix for memory use after free() and mtx_destroy().

git-svn-id: svn://svn.freebsd.org/base/stable/10@268206 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r263380 & r268185: Add KTR events for the PMAP interface functions.
marcel [Wed, 2 Jul 2014 23:57:55 +0000 (23:57 +0000)]
MFC r263380 & r268185: Add KTR events for the PMAP interface functions.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268201 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r263323: Fix and improve exception tracing.
marcel [Wed, 2 Jul 2014 23:47:43 +0000 (23:47 +0000)]
MFC r263323: Fix and improve exception tracing.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268200 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r263254: Move the implementation of kdb_cpu_trap() from <machine/kdb.h>
marcel [Wed, 2 Jul 2014 23:37:14 +0000 (23:37 +0000)]
MFC r263254: Move the implementation of kdb_cpu_trap() from <machine/kdb.h>
to machdep.c.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268199 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r263253: Don't use the ITC as the faulting address for external
marcel [Wed, 2 Jul 2014 23:33:07 +0000 (23:33 +0000)]
MFC r263253: Don't use the ITC as the faulting address for external
interrupts.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268198 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMerge r268071, 268072, 268088
scottl [Wed, 2 Jul 2014 23:32:05 +0000 (23:32 +0000)]
Merge r268071, 268072, 268088

 Refactor some code in mps.c to reduce header pollution.
 Add accessor functions for manipulating the CAM CCB status field.
 Don't overload the CCB status field within the driver.

Reviewed by:    gibbs, slm
Obtained from:  Netflix, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268197 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r263248 & r263257: In intr_event_handle() we already save and set
marcel [Wed, 2 Jul 2014 23:23:18 +0000 (23:23 +0000)]
MFC r263248 & r263257: In intr_event_handle() we already save and set
td_intr_frame, so don't do it also in ia64_handle_intr().

git-svn-id: svn://svn.freebsd.org/base/stable/10@268195 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r262726: When reading physical memory, make sure to access it using
marcel [Wed, 2 Jul 2014 23:12:56 +0000 (23:12 +0000)]
MFC r262726: When reading physical memory, make sure to access it using
the right memory attributes.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268194 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r259959 & r260009: Add prototypical support for minidumps.
marcel [Wed, 2 Jul 2014 23:05:57 +0000 (23:05 +0000)]
MFC r259959 & r260009: Add prototypical support for minidumps.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268192 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r257484: Change PAL_PTCE_INFO related variables.
marcel [Wed, 2 Jul 2014 22:19:59 +0000 (22:19 +0000)]
MFC r257484: Change PAL_PTCE_INFO related variables.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268189 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r257477: Purge the translation cache of APs before we unleash them.
marcel [Wed, 2 Jul 2014 22:06:31 +0000 (22:06 +0000)]
MFC r257477: Purge the translation cache of APs before we unleash them.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268184 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC 257475: Respect the kern.smp.disabled tunable.
marcel [Wed, 2 Jul 2014 21:53:34 +0000 (21:53 +0000)]
MFC 257475: Respect the kern.smp.disabled tunable.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268181 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267680:
dteske [Wed, 2 Jul 2014 19:25:25 +0000 (19:25 +0000)]
MFC r267680:
Fix a code typo that prevented mkdir from firing (unnoticed
usually because another part of the code succeeded in making
the same directory).

git-svn-id: svn://svn.freebsd.org/base/stable/10@268170 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r266814
truckman [Wed, 2 Jul 2014 17:32:43 +0000 (17:32 +0000)]
MFC r266814

Initialize r_flags the same way in all cases using a sanitized copy of
flags that has several bits cleared. The RF_WANTED and RF_FIRSTSHARE
bits are invalid in this context, and we want to defer setting RF_ACTIVE
in r_flags until later.  This should make rman_get_flags() return
the correct answer in all cases.

Add a KASSERT() to catch callers which incorrectly pass the RF_WANTED
or RF_FIRSTSHARE flags.

Do a strict equality check on the share type bits of flags.  In
particular, do an equality check on RF_PREFETCHABLE.  The previous
code would allow one type of mismatch of RF_PREFETCHABLE but disallow
the other type of mismatch.  Also, ignore the the RF_ALIGNMENT_MASK
bits since alignment validity should be handled by the amask check.
This field contains an integer value, but previous code did a strange
bitwise comparison on it.

Leave the original value of flags unmolested as a minor debug aid.

Change the start+amask overflow check to a KASSERT() since it is just
meant to catch a highly unlikely programming error in the caller.

Reviewed by: jhb

git-svn-id: svn://svn.freebsd.org/base/stable/10@268167 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC mkimg(1) -- revisions 268159, 268134, 266556, 266514, 266513,
marcel [Wed, 2 Jul 2014 14:54:41 +0000 (14:54 +0000)]
MFC mkimg(1) -- revisions 268159, 268134, 266556, 266514, 266513,
266512, 266511, 266510, 266509, 266176, 265468, 265467,
265462, 265170, 263926, 263924, 263923, 263919 and 263918.

Revision 267182 changed mkimg.1 alongside other unrelated manpages.
The change to mkimg.1 has been applied without registering a merge
of the revision. This allows a future merge of r267182 to happen.

Relnotes: yes

git-svn-id: svn://svn.freebsd.org/base/stable/10@268161 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267651 (by attilio):
kib [Wed, 2 Jul 2014 13:09:26 +0000 (13:09 +0000)]
MFC r267651 (by attilio):
Add the possibility to specify ecx when performing cpuid calls.

MFC r267673:
Restore the ABI of the cpuctl(4) ioctl request CPUCTL_CPUID.

MFC r267814:
Make cpuctl_do_cpuid() and cpuctl_do_cpuid_count() return void.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268157 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267871: Introduce $RA_SERVER to set default whois server.
ume [Wed, 2 Jul 2014 11:49:15 +0000 (11:49 +0000)]
MFC r267871: Introduce $RA_SERVER to set default whois server.

Requested by: nork
Reviewed by: nork

git-svn-id: svn://svn.freebsd.org/base/stable/10@268154 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267516i (by joel):
mav [Wed, 2 Jul 2014 10:49:06 +0000 (10:49 +0000)]
MFC r267516i (by joel):
mdoc: add missing width to Bl -tag.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268153 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267506:
mav [Wed, 2 Jul 2014 10:48:06 +0000 (10:48 +0000)]
MFC r267506:
Document additional LUN/backend options.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268152 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267537:
mav [Wed, 2 Jul 2014 10:45:31 +0000 (10:45 +0000)]
MFC r267537:
Add support for VERIFY(10/12/16) and COMPARE AND WRITE SCSI commands.

Make data_submit backends method support not only read and write requests,
but also two new ones: verify and compare.  Verify just checks readability
of the data in specified location without transferring them outside.
Compare reads the specified data and compares them to received data,
returning error if they are different.

VERIFY(10/12/16) commands request either verify or compare from backend,
depending on BYTCHK CDB field.  COMPARE AND WRITE command executed in two
stages: first it requests compare, and then, if succeesed, requests write.
Atomicity of operation is guarantied by CTL request ordering code.

Sponsored by: iXsystems, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268151 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267519:
mav [Wed, 2 Jul 2014 10:43:53 +0000 (10:43 +0000)]
MFC r267519:
Make backends track completion by processed number of sectors instead of
total transfer size.

Commands such as VERIFY or COMPARE AND WRITE may have transfer size not
matching directly to number of sectors.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268150 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267515:
mav [Wed, 2 Jul 2014 10:42:43 +0000 (10:42 +0000)]
MFC r267515:
Remove memcpy() from ctl_private[] accesses.

That union is aligned enough to access data directly.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268149 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267514:
mav [Wed, 2 Jul 2014 10:41:11 +0000 (10:41 +0000)]
MFC r267514:
Move kern_total_len setting from backend to core code.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268148 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267500:
mav [Wed, 2 Jul 2014 10:39:45 +0000 (10:39 +0000)]
MFC r267500:
Format Portal Group Tag same as istgt does -- %4.4x instead of %x.

SPC-4 spec tells it should be "two or more hexadecimal digits".
RFC3720 tells it is 16-bit value.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268147 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267499:
mav [Wed, 2 Jul 2014 10:38:22 +0000 (10:38 +0000)]
MFC r267499:
Remove custom processing for "file" option.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268146 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267496, r267498:
mav [Wed, 2 Jul 2014 10:37:22 +0000 (10:37 +0000)]
MFC r267496, r267498:
Add "vendor", "product" and "revision" options to control inquiry data.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268145 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267485:
mav [Wed, 2 Jul 2014 10:36:04 +0000 (10:36 +0000)]
MFC r267485:
Remove non-functional remnants of control LUN -- 18MB of RAM for nothing.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268144 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267481, r267952:
mav [Wed, 2 Jul 2014 10:35:06 +0000 (10:35 +0000)]
MFC r267481, r267952:
Implement small KPI to access LUN options instead doing it by hands.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268143 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r265323 (by trasz):
mav [Wed, 2 Jul 2014 10:32:44 +0000 (10:32 +0000)]
MFC r265323 (by trasz):
Provide better descriptions for 'struct ctl_scsiio' fields; based mostly
on emails from ken@.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268142 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267872:
mav [Wed, 2 Jul 2014 10:20:08 +0000 (10:20 +0000)]
MFC r267872:
Allow to use iSCSI immediate data by several ctl_datamove() calls.

While for FreeBSD client that is only a minor optimization, VMWare client
doesn't support additional data requests after all data being sent once as
immediate.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268141 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267606:
mav [Wed, 2 Jul 2014 10:18:42 +0000 (10:18 +0000)]
MFC r267606:
On discovery stage add set of TargetAddress keys to reply, reporting to
the client all the portal groups addresses and ports.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268140 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r266981:
mav [Wed, 2 Jul 2014 10:16:12 +0000 (10:16 +0000)]
MFC r266981:
Overhaul CAM SG driver IOCTL interfaces.

Make it really work for native FreeBSD programs.  Before this it was broken
for years due to different number of pointer dereferences in Linux and
FreeBSD IOCTL paths, permanently returning errors to FreeBSD programs.
This change breaks the driver FreeBSD IOCTL ABI, making it more strict,
but since it was not working any way -- who bother.

Add shims for 32-bit programs on 64-bit host, translating the argument
of the SG_IO IOCTL for both FreeBSD and Linux ABIs.

With this change I was able to run 32-bit Linux sg3_utils tools and simple
32 and 64-bit FreeBSD test tools on both 32 and 64-bit FreeBSD systems.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268139 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMVC r268014:
pfg [Wed, 2 Jul 2014 01:28:38 +0000 (01:28 +0000)]
MVC r268014:
Reduce some warnings in the Solaris unicode support.

Clean some warnings from parenthesis and minor style issues.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268132 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC 266322,266323:
jhb [Tue, 1 Jul 2014 18:23:00 +0000 (18:23 +0000)]
MFC 266322,266323:
- Use 'RESOURCE' instead of the more generic 'TYPE' for the resource name
  column header when displaying resource usage.  This more closely matches
  other procstat displays.
- Add descriptions of the display formats for -e, -l, -r, and -x.  Fix a few
  typos in indent settings while here.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268108 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267372-267374: fix various misimplementation of instructions.
delphij [Tue, 1 Jul 2014 15:55:41 +0000 (15:55 +0000)]
MFC r267372-267374: fix various misimplementation of instructions.

Submitted by: Wolf Ramovsky <wolf.ramovsky gmail.com>

git-svn-id: svn://svn.freebsd.org/base/stable/10@268100 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f