Commit Graph

196428 Commits

Author SHA1 Message Date
marck
0051467f2a MFC: Make BSD tree more contemporary-looking.
This is actually batch of MFCs from the beginning of stable/10 branch.
2014-08-21 11:48:37 +00:00
kib
afeea342d6 MFC r269656:
Implement and use proc_realparent(9).

MFC r270024 (by markj):
Correct the order of arguments passed to LIST_INSERT_AFTER().

For merge, the p_treeflag member of struct proc was moved to the end
of the structure, to keep KBI intact.
2014-08-21 10:46:19 +00:00
dumbbell
9ac8060e57 vt(4): Colors are indexed against a console palette, not a VGA palette
Rename vt_generate_vga_palette() to vt_generate_cons_palette() and
change it to build a palette where the color index is the same than in
terminal escape codes, not the VGA index. That's what TCHAR_CREATE()
uses and passes to vt(4).

The main differences between both orders are:
    o  Blue and red are swapped (1 <-> 4)
    o  Yellow and cyan are swapped (3 <-> 6)

The problem remained unnoticed, because the RGB bit indexes passed to
vt_generate_vga_palette() were reversed. This inversion was cancelled
by the colors inversions in the generated palette. For instance, red
(0xff0000) and blue (0x0000ff) have bytes in opposite order, but were
swapped in the palette. But after changing the value of blue (see last
paragraph), the modified color was in fact the red one.

While here, tune the palette to better match console colors and improve
the readability (especially the dark blue).

This is an MFC of r269783 and r269791.
2014-08-21 10:18:42 +00:00
peter
644cd5de6d MFC r270062: switch rpc mount protocol for showmount and umount from
mountv1 to mountv3 - it breaks by default on the new netapp release with
the legacy protocols removed.
2014-08-21 04:31:48 +00:00
eadler
7d882e21ec MFC r265256:
Syntax fix
2014-08-21 04:26:16 +00:00
rmacklem
e390c0ba15 MFC: r270005
Try to clarify how file systems are exported for NFSv4.
This is a content change.
2014-08-21 01:07:27 +00:00
luigi
223d76dc50 MFC 270063: update of netmap code
(vtnet and cxgbe not merged yet because we need some other mfc first)
2014-08-20 23:34:36 +00:00
slm
b63e85f63f MFC r269314 and r269316
r269314:
Bring in LSI's phase16 - phase18 changes
* Implements Start Stop Unit for SATA direct-attach devices in IR mode to avoid
  data corruption.
* Use CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT and CAM_TID_INVALID

r269316:
Bring in LSI's phase19 changes
* Removed unused mpssas_discovery_timeout function.
* Don't alter mapping boundaries if not raid firmware.
* Check free_busaddr instead of post_busaddr (diff minimisation really)

Approved by:	ken (co-mentor) and smh
2014-08-20 23:09:27 +00:00
jilles
5d7615994f MFC r268429: Don't install locale1.0 if MK_NLS == no.
The test locale1.0 depends on locale support; it is meaningless without a
working LC_MESSAGES.

I added an OptionalObsoleteFiles.inc entry.

PR:		181151
Submitted by:	Garrett Cooper (original version)
Sponsored by:	EMC / Isilon Storage Division
2014-08-20 19:39:07 +00:00
loos
e4ebeceadb MFC r267021:
FreeBSD, historically, has always used 8-bit addresses for i2c devices
  (7-bit device address << 1), always leaving the room for the read/write
  bit.

  This commit convert ti_i2c and revert r259127 on bcm2835_bsc to make them
  compatible with 8-bit addresses.  Previous to this commit an i2c device
  would have different addresses depending on the controller it was attached
  to (by example, when compared to any iicbb(4) based i2c controller), which
  was a pretty annoying behavior.

  Also, update the PMIC i2c address on beaglebone* DTS files to match the
  new address scheme.

  Now the userland utilities need to do the correct slave address shifting
  (but it is going to work with any i2c controller on the system).

  Discussed with:	ian

MFC r267834:

  Clarify the expected usage of I2C 7-bit slave addresses on ioctl(2)
  interface.

  While here add the cross reference to iic(4) on iicbus(4).

  CR:		D210
  Suggested by:	jmg
2014-08-20 19:37:05 +00:00
asomers
5efc9173fa MFC devd-related changes
r270004
Convert devd's client socket to type SOCK_SEQPACKET.

  This change consists of two merges from projects/zfsd/head along with the
  addition of an ATF test case for the new functionality.

  sbin/devd/tests/Makefile
  sbin/devd/tests/client_test.c
        Add ATF test cases for reading events from both devd socket types.

  r266519:
  sbin/devd/devd.8
  sbin/devd/devd.cc
        Create a new socket, of type SOCK_SEQPACKET, for communicating with
        clients. SOCK_SEQPACKET sockets preserve record boundaries,
        simplying code in the client. The old SOCK_STREAM socket is retained
        for backwards-compatibility with existing clients.

  r269993:
  sbin/devd/devd.8
        Fix grammar bug.

r270019 (from bz)
Remove bogus ; at the end of the if condition in order to unbreak gcc builds
  after r270004.

  MFC after:    4 days
  X-MFX with:   r270004
2014-08-20 19:30:58 +00:00
loos
5bf7922115 MFC r266923:
Ignore IIC_ENOADDR from iicbus_reset() as it only means we have a
  master-only controller.

  This fixes the iic bus scan with i2c(8) (on supported controllers).

  Tested with gpioiic(4).

MFC r267009:

  Remove the unnecessary i2c slave address assignment.

  The ti_i2c controller only works in the master mode and the i2c address
  passed on iicbus_reset() is used to set the controller slave address when
  operating as an i2c slave (which isn't currently supported).

  When talking to a slave, the slave address is correctly provided to
  ti_i2c_tranfer().
2014-08-20 19:12:19 +00:00
davide
b3fbbb0dde Complete MFC of r270233, also unbreak the build.
Reported by:	grehan
2014-08-20 18:40:29 +00:00
loos
f091b317e3 MFC r266960:
Configure the analog input 7 which, on BBB, is connected to the 3V3B rail
  through a voltage divisor (R163 and R164 on page 4 of BBB schematic).

  Add a note about this on ti_adc(4) man page.  The ti_adc(4) man page will
  first appear on 10.1-RELEASE.

  Suggested by: Sulev-Madis Silber (ketas)
  Manual page reviewed by:      brueffer (D127)
2014-08-20 18:10:12 +00:00
loos
a23b573cf1 MFC r266937:
Export two new settings for the AM335x PWM, the clock prescaler (clkdiv)
  and the actual PWM frequency.

  Enforce the maximum value for the period sysctl.

  The frequency systcl now allows the direct setting of the PWM frequency
  (it will try to find the better clkdiv and period for a given frequency,
  i.e. the ones that will give the better PWM resolution).

  This allows the use lower frequencies on the PWM.  Without changing the
  clock prescaler the minimum PWM frequency was 1.52kHz.

  PWM frequencies checked with an osciloscope.

  PWM output tested with some R/C servos at 50Hz.
2014-08-20 17:57:23 +00:00
loos
86cfba48f8 MFC r266922:
Add a bounds verification to the SCL and SDA pin values.

  At attach, print the SCL and SDA pin numbers.

  Remove a stray blank line.

  Remove the GPIOBUS locking from gpioiic_reset(), it is already called with
  this lock held.  This fixes a crash when you try to scan the iicbus with
  i2c(8).
2014-08-20 17:39:53 +00:00
luigi
b2918a5219 MFC 259907 (dates back to december)
use the correct netmap <-> nic slot mapping on the transmit ring for 'lem'.
This bug would manifest only in netmap mode and on packets transmitted after
a NIC reset while netmap mode is active.
2014-08-20 17:33:32 +00:00
davide
4c6c2c8b89 MFC r269502:
Fix an overflow in getsockopt(). optval isn't big enough to hold
sbintime_t.
Re-introduce r255030 behaviour capping socket timeouts to INT_32
if they're too large.
2014-08-20 17:26:05 +00:00
markj
c044c8f131 MFC r269524:
Preserve the errno value of an ioctl before calling free(3). Previously,
errno was very occasionally being clobbered, resulting in a bogus error from
dt_consume() and thus an error from dtrace(1).
2014-08-20 14:57:55 +00:00
kib
68885db3a4 MFC r269907:
Fix leaks of unqueued unwired pages.
2014-08-20 08:24:37 +00:00
ian
c4195049f5 MFC r266473,267331,267511:
Use an intermediate target to associate with _SUBDIR which is marked .MAKE
  this allows make -n to do tree walks as expected without
  doing anything else (as intended).
  Use prefix _sub. to help avoid conflict with any real target.

  Put the test suite in its own tests.txz distribution file.
  Force all the contents of /usr/tests to go into a separate distribution
  file so that users of binary releases can easily choose to not install

  Create a mechanism for providing fine-grained build order dependencies
  during SUBDIR_PARALLEL builds.  This augments the coarse .WAIT mechanism,
  which is still useful if you've got a situation such as "almost everything
  depends on A and B".
2014-08-19 23:33:51 +00:00
grehan
6dd00f0d03 MFC r266103
Update dis_tables.c to the latest Illumos version.

This includes decodes of recent Intel instructions, in particular
VT-x and related instructions. This allows the FBT provider to
locate the exit points of routines that include these new
instructions.

Illumos issues:
 3414 Need a new word of AT_SUN_HWCAP bits
 3415 Add isainfo support for f16c and rdrand
 3416 Need disassembler support for rdrand and f16c
 3413 isainfo -v overflows 80 columns
 3417 mdb disassembler confuses rdtscp for invlpg
 1518 dis should support AMD SVM/AMD-V/Pacifica instructions
 1096 i386 disassembler should understand complex nops
 1362 add kvmstat for monitoring of KVM statistics
 1363 add vmregs[] variable to DTrace
 1364 need disassembler support for VMX instructions
 1365 mdb needs 16-bit disassembler support

This corresponds to Illumos-gate (github) version
eb23829ff08a873c612ac45d191d559394b4b408
2014-08-19 23:15:47 +00:00
grehan
855cd37c4f MFC r265098
Bump WITNESS_PENDLIST by MAXCPU to account for the
pmap pvlist locks which are scaled by MAXCPU.
2014-08-19 23:08:47 +00:00
dumbbell
7daa04d352 vt(4): Add vtbuf_dirty*_locked() to lock vtbuf once, not twice
In several functions, vtbuf_putchar() in particular, the lock on vtbuf
is acquired twice:
    1. once by the said functions;
    2. once in vtbuf_dirty().

Now, vtbuf_dirty_locked() and vtbuf_dirty_cell_locked() allow to
acquire that lock only once.

This improves the input speed of vt(4). To measure the gain, a
50,000-lines file was displayed on the console using cat(1). The time
taken by cat(1) is reported below:
    o  On amd64, with vt_vga:
        - before: 1.0"
        - after:  0.5"
    o  On sparc64, with creator_vt:
        - before: 13.6"
        - after:  10.5"

This is an MFC of r269780.
2014-08-19 20:53:28 +00:00
bdrewery
93714464a8 Bump __FreeBSD_version after r269490 so ports can use it. 2014-08-19 15:49:38 +00:00
hselasky
263b5853fc MFC r269859:
Fix for memory leak.

Sponsored by:	Mellanox Technologies
2014-08-19 11:04:24 +00:00
grehan
5d455a50f5 MFC r267921, r267934, r267949, r267959, r267966, r268202, r268276,
r268427, r268428, r268521, r268638,	r268639, r268701, r268777,
    r268889, r268922, r269008, r269042,	r269043, r269080, r269094,
    r269108, r269109, r269281, r269317,	r269700, r269896, r269962,
    r269989.

Catch bhyve up to CURRENT.

Lightly tested with FreeBSD i386/amd64,	Linux i386/amd64, and
OpenBSD/amd64. Still resolving an	issue with OpenBSD/i386.

Many thanks to jhb@ for	all the	hard work on the prior MFCs !

r267921 - support the "mov r/m8, imm8" instruction
r267934 - document options
r267949 - set DMI vers/date to fixed values
r267959 - doc: sort cmd flags
r267966 - EPT misconf post-mortem info
r268202 - use correct flag for event index
r268276 - 64-bit virtio capability api
r268427 - invalidate guest TLB when cr3 is updated, needed for TSS
r268428 - identify vcpu's operating mode
r268521 - use correct offset in guest logical-to-linear translation
r268638 - chs value
r268639 - chs fake values
r268701 - instr emul operand/address size override prefix support
r268777 - emulation for legacy x86 task switching
r268889 - nested exception support
r268922 - fix INVARIANTS build
r269008 - emulate instructions found in the OpenBSD/i386 5.5 kernel
r269042 - fix fault injection
r269043 - Reduce VMEXIT_RESTARTs in task_switch.c
r269080 - fix issues in PUSH emulation
r269094 - simplify return values from the inout handlers
r269108 - don't return -1 from the push emulation handler
r269109 - avoid permanent sleep in vm_handle_hlt()
r269281 - list VT-x features in base kernel dmesg
r269317 - Mark AHCI fatal errors as not completed
r269700 - Support PCI extended config space in bhyve
r269896 - Minor cleanup
r269962 - use max guest memory when creating IOMMU domain
r269989 - fix interrupt mode names
2014-08-19 01:20:24 +00:00
mckusick
4791bac9b4 MFC of 269533 (by mckusick):
Add support for multi-threading of soft updates.

Replace a single soft updates thread with a thread per FFS-filesystem
mount point. The threads are associated with the bufdaemon process.

Reviewed by:  kib
Tested by:    Peter Holm and Scott Long
MFC after:    2 weeks
Sponsored by: Netflix

MFC of 269853 (by kib):

Revision r269457 removed the Giant around mount and unmount code, but
r269533, which was tested before r269457 was committed, implicitely
relied on the Giant to protect the manipulations of the softdepmounts
list.  Use softdep global lock consistently to guarantee the list
structure now.

Insert the new struct mount_softdeps into the softdepmounts only after
it is sufficiently initialized, to prevent softdep_speedup() from
accessing bare memory.  Similarly, remove struct mount_softdeps for
the unmounted filesystem from the tailq before destroying structure
rwlock.

Reported and tested by: pho
Reviewed by:    mckusick
Sponsored by:   The FreeBSD Foundation
2014-08-18 22:53:48 +00:00
asomers
5482ed4923 MFC r269977
Skip pgrep-j and pkill-j if jail or jls is not installed.

Even though jail is part of the base system, it can be disabled by src.conf
settings. Therefore, it should be listed as a required program for tests that
use it.
2014-08-18 20:21:12 +00:00
mav
f3589bc4f2 MFC r269183, r269191:
Add netmasks support to initiator-portal option.
2014-08-18 16:06:04 +00:00
mav
0959ad1632 MFC r269492:
Improve locking of multicast addresses in VLAN and LAGG interfaces.

This fixes several scenarios of reproducible panics, cause by races
between multicast address changes and interface destruction.
2014-08-18 15:54:35 +00:00
royger
b8303841b8 MFC r269814:
blkfront: add support for unmapped IO

Sponsored by:	Citrix Systems R&D
Tested by:	robak
PR:		191173
2014-08-18 08:50:05 +00:00
delphij
23b6125361 MFC r269543: MFV r269542:
In vdev_get_stats, check that the vdev is not a hole before computing the
fragmentation.  This fixes a panic when removing log device.

Illumos issue:
    5049 panic when removing log device
2014-08-18 05:22:09 +00:00
delphij
8a1512ebf1 MFC r269431: MFV r269427:
In dnode_children_t, use C99's "[]" idiom for declaring the variable
sized array dnc_children at the end of the structure.

This prevents the compiler from mistakenly optimizing away accesses
beyond the array's defined size.

Illumos issue:
    5038 Remove "old-style" flexible array usage in ZFS.
    Author: Justin T. Gibbs <justing@spectralogic.com>
2014-08-18 05:17:24 +00:00
delphij
f0e0389097 MFC r269430: MFV r269426:
Double test device size for ztest(1).

Illumos issue:
    5039 ztest should default to larger device sizes
    Author: Matthew Ahrens <mahrens@delphix.com>
2014-08-18 05:13:46 +00:00
ache
e3bbb42f27 MFC: r269875
According to opie code and even direct mention in opie(4) challenge buffer
size must be OPIE_CHALLENGE_MAX + 1, not OPIE_CHALLENGE_MAX

Reviewed by:    des
2014-08-18 03:06:49 +00:00
ache
2090706028 Direct commit to stable/10 reflecting r269961 because the rest can't be
merged.

Bump version because challenge buffer size changed.
2014-08-18 02:42:23 +00:00
ache
2c79d328e1 Direct commit to stable/10 reflecting r269815 because rest can't be merged
Add otp-sha
2014-08-18 02:32:48 +00:00
ache
3b103d7c51 MFC: r269806,r269809,r269811,r269810
r269806:
Fix too long (seed length >12 chars) challenge handling.
1) " ext" length should be included into OPIE_CHALLENGE_MAX (as all places
of opie code expects that).
2) Overflow check in challenge.c is off by 1 even with corrected
OPIE_CHALLENGE_MAX
3) When fallback to randomchallenge() happens and rval is 0 (i.e.
challenge is too long), its value should be set to error state too.

To demonstrate the bug, run opiepasswd with valid seed:
opiepasswd -s 1234567890123456
and notice that it falls back to randomchallenge() (i.e. no
1234567890123456 in the prompt).

r269809:
When sha1 support was added, they forget to increase OPIE_HASHNAME_MAX

r269811:
Last '/' for program name, not first one.

r269810:
Link otp-sha1 to match real challenge prompt, not otp-sha.

PR:     191511
Submitted by: mitsururike@gmail.com (partially, PR 269806)
2014-08-18 02:13:45 +00:00
rmacklem
cdfc4fb07a MFC: r269788
Document the use of the vfs.nfsd sysctls that control the size of
the NFS server's DRC for TCP.
This is a content change.
2014-08-17 19:24:26 +00:00
mav
e13575583f MFC r269631:
Reduce reported additional INQUIRY data length.

sizeof(struct scsi_inquiry_data) of 256 bytes combined with off-by-one
error in the changed code gave total INQUIRY data length above 255 bytes,
that was maximal INQUIRY length in SPC-2.  While SPC-3 increased the
maximal length to 64K, at least sg3_utils are still confused by that.
2014-08-17 18:26:34 +00:00
mav
b70f4cf9fc MFC r269622:
Fix several issues and inconsistencies in UNMAP capabilities reporting.

This makes Windows 2012 to start using UNMAP on our disks.
2014-08-17 18:24:59 +00:00
mav
8fabb08e85 MFC r269587:
Reimplement WRITE USING TOKEN with Block Zero token using WRITE SAME.

On my ZVOL of SSDs that increases speed of zero writing in that way from
1 to 2.5GB/s by reducing CPU overhead.
2014-08-17 18:23:43 +00:00
mav
6f742fb4d6 MFC r269497:
Add support for Windows dialect of EXTENDED COPY command, aka Microsoft ODX.

This allows to avoid extra network traffic when copying files on NTFS iSCSI
disks within one storage host by drag'n'dropping them in Windows Explorer
of Windows 8/2012.  It should also accelerate Hyper-V VM operations, etc.
2014-08-17 18:22:42 +00:00
dim
197183e80f MFC r269954:
Stop telling people to directly report llvm or clang bugs upstream,
point them to the FreeBSD bug tracker instead, since we use our own
patches.
2014-08-17 13:12:07 +00:00
dim
80ec3980a5 MFC r269948:
Supplement r259111 by also using correct casts in gcc's emmintrin.h for
the first argument of the following builtin function:

* __builtin_ia32_psrlqi128() takes __v2di instead of __v4si

This should fix the following errors when building the graphics/webp
port with base gcc:

lossless_sse2.c:403: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'
lossless_sse2.c:404: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'

Reported by:	Jos Chrispijn <ports@webrz.net>
2014-08-17 13:08:15 +00:00
kib
94d67906ea MFC r269457:
Remove Giant acquisition from the mount and unmount pathes.
2014-08-17 09:07:21 +00:00
mjg
75d88c0d5a MFC r269020:
Cosmetic changes to unp_internalize

Don't throw away the result of fget_unlocked.
Move fdp increment to for loop to make it consistent with similar code
elsewhere.
2014-08-17 07:24:23 +00:00
mjg
fd678d23e5 MFC r268636:
Plug p_pptr null test in do_execve. It is always true.
2014-08-17 07:22:40 +00:00
mjg
46f8d5c454 MFC r268634:
Manage struct sigacts refcnt with atomics instead of a mutex.
2014-08-17 07:20:37 +00:00