Commit Graph

15413 Commits

Author SHA1 Message Date
dteske
f2c181fe22 Add "GELI Passphrase:" prompt to boot loader.
A new loader.conf(5) option of geom_eli_passphrase_prompt="YES" will now
allow you to enter your geli(8) root-mount credentials prior to invoking
the kernel.

See check-password.4th(8) for details.

Differential Revision:	https://reviews.freebsd.org/D2105
Reviewed by:	imp, kmoore
Discussed on:	-current
MFC after:	3 days
X-MFC-to:	stable/10
Relnotes:	yes
2015-04-16 20:53:15 +00:00
neel
e8382eebf0 If the number of guest vcpus is less than '1' then flag it as an error.
MFC after:	1 week
2015-04-16 20:11:49 +00:00
emaste
eb791735b7 vidcontrol: make size argument optional again for syscons
r273544 changed the -f option allow no arguments in vt mode (used to
reset the font back to the default), but broke the optionality of the
size argument for syscons. Drop the required argument from syscons'
optstring for -f so the optional argument handler works the same way
for both syscons and vt.

Reported by:	bde
Sponsored by:	The FreeBSD Foundation
2015-04-16 01:47:05 +00:00
allanjude
ac2c19f721 Fix syntax errors in conditions for new features in freebsd-update
Differential Revision:	https://reviews.freebsd.org/D1550
Submitted by:	kmoore
Approved by:	delphij
Obtained from:	PCBSD
MFC after:	1 week
X-MFC-With:	279571
Sponsored by:	ScaleEngine Inc.
2015-04-15 20:55:43 +00:00
tychon
98c2a4bca4 Prior to aborting due to an ioport error, it is always interesting to
see what the guest's %rip is.

Reviewed by:	grehan
2015-04-15 18:49:03 +00:00
neel
f6d3ccf1a3 Initialize 'error' before use.
Reported by:	Coverity Scan
CID:		1249748, 1249747, 1249751, 1249749
MFC after:	1 week
2015-04-15 05:04:42 +00:00
delphij
8c6f9cd4e5 Eliminate unused headers. 2015-04-14 18:13:55 +00:00
takawata
7a032b3c81 Accept LE event on hccontrol socket. 2015-04-12 15:08:41 +00:00
takawata
646368c717 Add HCI/LMP revision information. 2015-04-12 14:38:18 +00:00
emaste
1714ca6a68 Fix libfifolog dependency on libz
Consumers should not need to encode fifolog's dependency on libz.
Handle it automatically in src.libnames.mk.

Differential Revision:	https://reviews.freebsd.org/D2278
Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
2015-04-10 21:24:38 +00:00
bapt
491d8d9470 rtsold does not need to link to libkvm 2015-04-09 21:52:14 +00:00
bapt
bc4e6f7d48 rpc.locked does not need to link to libutil 2015-04-09 21:48:17 +00:00
bapt
582db181fd bhyvectl does not need to link to libutil 2015-04-09 21:39:58 +00:00
bapt
2ef8ecc842 Fix overlinking in bhyve:
libvmmapi is actually needed to be linked to libutil, not bhyve nor bhyveload
2015-04-09 21:38:40 +00:00
bapt
968497a5fe authpf does not need to link to libmd 2015-04-09 21:33:57 +00:00
jkim
a8a7a11457 Print 64-bit addresses cleary with leading zeros to avoid confusions.
MFC after:	1 week
2015-04-09 21:32:40 +00:00
jkim
7952f98556 Do not crash when RSDT/XSDT contains an empty entry.
Reported by:	Slawa Olhovchenkov <slw@zxy.spb.ru>
MFC after:	3 days
2015-04-09 21:26:23 +00:00
bapt
9844ff4bf4 bsnmptools does not depends on libcrypto 2015-04-09 21:05:48 +00:00
glebius
800a95f423 Remove 'netstat -anr' from crashinfo. 2015-04-09 07:49:42 +00:00
takawata
411a5fdbb3 Check l2cap socket initialisation and define L2CAP_SOCKET_CHECKED
This will fix build.
2015-04-07 16:48:23 +00:00
mav
979d590154 Remove hard limits on number of accepting NFS connections.
Limits of 5 connections set long ago creates problems for SPEC benchmark.
Make the NFS follow system-wide maximum.

MFC after:	1 week
2015-04-07 10:25:27 +00:00
jkim
9435c121fa Tidy up battery status information. Remove a trailing white space.
PR:		193671
2015-04-06 21:51:55 +00:00
dteske
9df5b4c66d Unbreak ZFS+GELI install option.
Reported by:	delphij
Submitted by:	delphij
Pointy hat to:	dteske (me)
MFC after:	3 days
X-MFC-to:	stable/10 stable/9
X-MFC-with:	r281160
2015-04-06 19:26:45 +00:00
mav
bda694b503 Make ctld to not exit on ECONNABORTED on accept().
That is not really an error for the main process.

MFC after:	1 week
Sponsored by:	iXsystems, Inc.
2015-04-06 18:56:02 +00:00
dteske
1290072850 Fix permissions on ZFS root encryption key (644 -> 600).
MFC after:	3 days
X-MFC-to:	stable/10 stable/9
Security:	CVE-2015-1415
Reported by:	Pierre Kim
2015-04-06 18:03:35 +00:00
rakuco
e0eccb778c bthidd: Remove unused macros from hid.c.
ASIZE() was never used, and min() stopped being used in r207812.

Differential Revision:	https://reviews.freebsd.org/D2230
Reviewed by:	emax
Approved by:	emax
MFC after:	1 week
2015-04-06 12:36:24 +00:00
glebius
78d51c7b15 Stop including if_var.h from userland.
Sponsored by:	Nginx, Inc.
2015-04-06 09:42:23 +00:00
rakuco
a87f17c507 bthidd: Consider usage ranges when dealing with array inputs.
So far, we were always using HID_USAGE() to determine the Usage ID of a
certain HID report input item. This does not work as intended if a field
is an array and the allowed usages are specified with a usage range, as
HID_USAGE() will return 0. We need to use the field value as an index in
the usage range list in this case instead.

This makes the volume keys in a Microsoft Bluetooth Mobile Keyboard
5000 be properly recognized. The relevant part of the HID report looks
like this:

  0xA1, 0x01,        // Collection (Application)
  0x85, 0x07,        //   Report ID (7)
  0x05, 0x0C,        //   Usage Page (Consumer)
  0x19, 0x00,        //   Usage Minimum (Unassigned)
  0x2A, 0xFF, 0x03,  //   Usage Maximum (0x03FF)
  0x95, 0x01,        //   Report Count (1)
  0x75, 0x10,        //   Report Size (16)
  0x15, 0x00,        //   Logical Minimum (0)
  0x27, 0xFF, 0x03, 0x00, 0x00,  //   Logical Maximum (1023)
  0x81, 0x00,        //   Input (Data,Array,Abs,No Wrap,Linear,Preferred
                     //   State,No Null Position)

When a key such as "volume down" is pressed, the following data is
transferred through Interrupt In:

  0x07 0xEA 0x00

Differential Revision:	https://reviews.freebsd.org/D2229
Reviewed by:	emax
Approved by:	emax
MFC after:	1 week
2015-04-05 18:53:48 +00:00
jpaetzel
4e7da03796 Fix thinko/copypaste error.
When checking the length of the mutual secret password the variable for
the secret password was used by mistake.  This resulted in ctld never
warning about the length of the mutual secret being wrong even if it was.

MFC after:	3 days
Sponsored by:	iXsystems
2015-04-04 20:55:47 +00:00
bapt
89080383fe Allow fetching pkg(8) even if servers/proxies are not passing Content-length 2015-04-03 17:35:30 +00:00
markj
97599fcfd9 arp(8): add support for printing and deleting entries of type
IFT_INFINIBAND, used in IPoIB.

PR:		151594
Submitted by:	Anthony Cornehl <accornehl@gmail.com>
Reviewed by:	hselasky
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-04-02 18:18:40 +00:00
tychon
0b17a7a512 Prior to aborting due to an instruction emulation error, it is always
interesting to see what the guest's %rip and instruction bytes are.

Reviewed by:	grehan
2015-04-01 20:36:07 +00:00
dteske
d004477d05 Whoops! "arc commit --revision" != "arc diff --update" 2015-04-01 02:05:26 +00:00
dteske
454ddb0c34 Add "GELI Passphrase:" prompt to boot loader.
Summary:
Add "GELI Passphrase:" prompt to boot loader.

A new loader.conf(5) option of geom_eli_passphrase_prompt="YES" will now
allow you to enter your geli(8) root-mount credentials prior to invoking
the kernel.

See check-password.4th(8) for details.

Differential Revision:	https://reviews.freebsd.org/D2105
Reviewed by:	(your name[s] here)
MFC after:	3 days
X-MFC-to:	stable/10
Relnotes:	yes

Test Plan:
Drop a head copy of check-password.4th into /boot and then apply the patch
(only the patch to /boot/check-password.4th is required; no other changes are
required but you do have to have a HEAD copy of check-password.4th to
apply the patch).

NB: The rest of your /boot files can be up to 2 years old but no older.
NB: The test won't work unless your kernel has the following change

https://svnweb.freebsd.org/base?view=revision&revision=273489

Now, put into /boot/loader.conf:

geom_eli_passphrase_prompt="YES"

and reboot.

You should be prompted for a GELI passphrase before the menu (if enabled),
just after loading loader.conf(5).

NB: It doesn't matter if you're using GELI or not. However if you are using
GELI and a sufficiently new enough release (has SVN r273489) and you entered
the proper passphrase to mount your GELI encrypted root device(s), you should
notice that the boot process did not stop (you went from loader all the way to login).

Reviewers: cperciva, allanjude, scottl, kmoore

Subscribers: jkh, imp

Differential Revision: https://reviews.freebsd.org/D2105
2015-04-01 02:01:34 +00:00
dteske
9c696b424e Fix typo in a comment.
MFC after:	3 days
X-MFC-to:	stable/10 stable/9
2015-03-31 21:34:42 +00:00
cy
8560674afd MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284)
Thanks to roberto for providing pointers to wedge this into HEAD.

Approved by:	roberto
2015-03-30 13:30:15 +00:00
vangyzen
2ea615c75c pmcstat.8: fix -a flag description; improve -m flag to match
The -a flag reads a file saved by -O, not -o.

The -m flag requires the -R flag.  Copy that paragraph from -a.

Reviewed by:	adrian
Approved by:	kib (mentor)
MFC after:	1 week
Sponsored by:	Dell Inc
2015-03-28 21:28:22 +00:00
emaste
3bc38f9112 crunchide: arm64 support
Submitted by:	andrew@
Sponsored by:	The FreeBSD Foundation
2015-03-27 19:34:24 +00:00
grehan
d96cec83fc Move legacy interrupt allocation for virtio devices to common code.
There are a number of assumptions about legacy interrupts always
being available in virtio so don't allow back-ends to make the
decision to support them.

This fixes the issue seen with virtio-rnd on OpenBSD. MSI-x vectors
were not being used, and the virtio-rnd backend wasn't allocating a
legacy interrupt resulting in a bhyve assert and guest exit.

Reported by:	Julian Hsiao, madoka at nyanisore dot net
Reviewed by:	neel
MFC after:	1 week
2015-03-27 01:58:44 +00:00
brueffer
c504b60c4e Rough first mdoc, spelling and grammar cleanup pass. 2015-03-26 15:54:54 +00:00
rrs
aa21557237 Opps its section 8 not 1 silly.
MFC after:	3 days
Sponsored by:	Netflix
2015-03-26 15:43:57 +00:00
rrs
28ddb599ff Update the manual page to be a bit more sane. It still
may need some work, but at least now it will read properly.
(gnn you are still on the hook to help out with this
like you committed).

Sponsored by:	Netflix.
2015-03-26 15:40:47 +00:00
allanjude
33a91f2762 Fix typo in jail(8) man page
PR:		198790
Differential Revision:	https://reviews.freebsd.org/D2111
Submitted by:	Jimmy Olgeni
Approved by:	wblock (mentor)
Sponsored by:	ScaleEngine Inc.
2015-03-22 20:38:28 +00:00
dteske
7527b791eb Update copyright(s)
MFC after:	3 days
X-MFC-to:	stable/10
2015-03-21 03:54:11 +00:00
dteske
85a1f00de7 Whitespace cleanup(s).
MFC after:	3 days
X-MFC-to:	stable/10
2015-03-21 03:52:43 +00:00
mav
54b9845962 Add missing variable initialization.
Reported by:	Coverity
CID:		1288938
MFC after:	3 days
2015-03-20 16:05:13 +00:00
mav
7904a438e5 Add comment explaining existing powerd behavior on SMP systems.
MFC after:	1 week
2015-03-20 15:07:05 +00:00
allanjude
746d3f6f85 Remove a non-required unsafe condition added in the previous commit
Reviewed by:	bapt
Approved by:	dteske
Sponsored by:	ScaleEngine Inc.
2015-03-18 23:47:30 +00:00
allanjude
19ab8c6fb0 Fix the handbook install option in bsdinstall
bsdconfig's f_package_add doesn't seem to support using the pkg repo from /etc/pkg/FreeBSD.conf, it also tries to run the commands on the installer image, not in the destination chroot

Instead, manually bootstrap pkg in the chroot, and then install the requested packages (in the chroot)

Doesn't use pkg -c, because pkg is not installed on the installer image

PR:		196250
Differential Revision:	https://reviews.freebsd.org/D2026
Approved by:	bapt
Sponsored by:	ScaleEngine Inc.
2015-03-18 23:24:38 +00:00
mav
55b7ea0246 Report that we may have write cache, and that we do support FLUSH.
FreeBSD guest driver does not use that legacy flag, but Linux seems does.

MFC after:	2 weeks
2015-03-16 20:13:25 +00:00
mav
cfdd687fd7 Increase S/G list size of 32 to 33 entries.
32 entries are not enough for the worst case of misaligned 128KB request,
that made FreeBSD to chunk large quests in odd pieces.

MFC after:	2 weeks
2015-03-16 09:15:59 +00:00
mav
2b87ed684f Pre-allocate one extra request per processing thread.
Processing threads call callbacks before freeing requests.  As result,
new requests may arrive before old ones are freed.

MFC after:	2 weeks
2015-03-15 22:44:53 +00:00
mav
0a32d97912 According to Linux and QEMU, s/n equal to buffer is not zero-terminated.
This makes same s/n reported for both virtio and AHCI drivers.

MFC after:	2 weeks
2015-03-15 17:45:16 +00:00
mav
72856e7d90 Close potential race on blockif_close().
Reported by:	vangyzen
MFC after:	2 weeks
2015-03-15 16:18:03 +00:00
mav
2088070eaf Fix networking problem after r280026.
I've missed that network driver sometimes returns taken request back to
available queue without processing.  Add new helper function for that case.

Reported by:	flo
MFC after:	2 weeks
2015-03-15 16:09:39 +00:00
mav
cd363583ce Give AHCI disk serial based on backing file path same as for virtio block.
It is still not good that they may intersect on different hosts, but that
is better then intersecting on the same host.

MFC after:	2 weeks
2015-03-15 15:29:03 +00:00
mav
15ba37b7de Rewrite virtio block device driver to work asynchronously and use the block
I/O interface.

Asynchronous operation, based on r280026 change, allows to not block virtual
CPU during I/O processing, that on slow/busy storage can take seconds.
Use of recently improved block I/O interface allows to process multiple
requests same time, that improves random I/O performance on wide storages.

Benchmarks of virtual disk, backed by ZVOL on RAID10 pool of 4 HDDs, show
~3.5 times random read performance improvements, while no degradation on
linear I/O.  Guest CPU usage during test dropped from 100% to almost zero.

MFC after:	2 weeks
2015-03-15 14:57:11 +00:00
mav
42641f98a6 Modify virtqueue helpers added in r253440 to allow queuing.
Original virtqueue design allows queued and out-of-order processing, but
helpers added in r253440 suppose only direct blocking in-order one.
It could be fine for network, etc., but it is a huge limitation for storage
devices.
2015-03-15 11:37:07 +00:00
mav
476187cac8 Block delete capability for read-only devices.
Submitted by:	neel
MFC after:	2 weeks
2015-03-15 08:09:56 +00:00
mav
eb63aed246 Give block I/O interface multiple (8) execution threads.
On parallel random I/O this allows better utilize wide storage pools.
To not confuse prefetcher on linear I/O, consecutive requests are executed
sequentially, following the same logic as was earlier implemented in CTL.

Benchmarks of virtual AHCI disk, backed by ZVOL on RAID10 pool of 4 HDDs,
show ~3.5 times random read performance improvements, while no degradation
on linear I/O.

MFC after:	2 weeks
2015-03-14 21:15:45 +00:00
mav
efa8369c49 Add checksums to identify data and NCQ command error log.
MFC after:	2 weeks
2015-03-14 14:06:37 +00:00
mav
75e831bbaa Slightly polish virtual AHCI CD reporting.
MFC after:	2 weeks
2015-03-14 12:18:26 +00:00
mav
dd99a4abcb Fix NOP and IDLE commands for virtual AHCI disks.
MFC after:	2 weeks
2015-03-14 10:38:25 +00:00
mav
36590090f2 Add support for NCQ variant of DSM TRIM for virtual AHCI disks.
The code is not really tested yet due to lack of initiator support.

Requested by:	imp
MFC after:	2 weeks
2015-03-14 09:46:43 +00:00
mav
9ac55a7e33 Improve NCQ errors reporting for virtual AHCI disks.
While this implementation is still not perfect, previous was just broken.

MFC after:	2 weeks
2015-03-14 08:45:54 +00:00
mav
48507f436f Remove incorrect SERR register setting.
At this point we have nothing to report through that register.

MFC after:	2 weeks
2015-03-13 21:01:25 +00:00
mav
358865b66d Change prdbc value reporting.
MFC after:	2 weeks
2015-03-13 20:56:17 +00:00
mav
9d7a73f956 Polish AHCI disk identify data and fix speed negotiation.
MFC after:	2 weeks
2015-03-13 20:14:35 +00:00
mav
eded307e2f Add support for PIO variants of READ/WRITE commands for AHCI disks.
AHCI API hides all PIO specifics, so this functionality is almost free.

MFC after:	2 weeks
2015-03-13 18:35:38 +00:00
mav
7435136f27 Use ahci_write_fis_d2h() for commands completion.
MFC after:	2 weeks
2015-03-13 18:04:07 +00:00
mav
ec9fb407ff Add DSM TRIM command support for virtual AHCI disks.
It works only for virtual disks backed by ZVOLs and raw devices supporting
BIO_DELETE.  Virtual disks backed by files won't report this capability.

MFC after:	2 weeks
Relnotes:	yes
2015-03-13 16:43:52 +00:00
trasz
7d384a730d Add -noauto autofs map, for automatic handling of fstab entries
marked "noauto".

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-13 12:44:46 +00:00
trasz
712aeceb14 Get executable direct maps to work.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-13 12:27:59 +00:00
trasz
29dcbee988 Rework the concat() algorithm to be correct in all cases.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-13 11:26:02 +00:00
trasz
e2d017a584 Make "automount -LL -o whatever" present options in the same order
as used by automountd(8).

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-12 12:36:08 +00:00
trasz
e47fa13bc5 Make concat() accept NULL arguments.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-12 12:17:15 +00:00
trasz
724f53c3cf Options from auto_master must be appended to options from maps,
not prepended.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-12 12:14:11 +00:00
kmoore
3247c2766c - Include commas in valid file-name chars freebsd-update will support
Approved by: cperciva
2015-03-12 06:41:01 +00:00
trasz
bf5182c099 Fix typo.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-10 14:43:07 +00:00
trasz
09be0092bd Properly pass options for direct maps.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-10 12:25:05 +00:00
trasz
6892ebe639 Fix handling of direct maps, broken in r275756. Previously, running
automount(8) would unmount direct map trigger nodes every second time.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-10 11:59:33 +00:00
trasz
1970982572 Refactor.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-10 09:53:15 +00:00
trasz
69b4b7af49 Erm, revert chunk committed by mistake.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 15:44:36 +00:00
trasz
155cef1fdb Make things more readable; no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 15:31:33 +00:00
trasz
9d17bb3d2b Remove some particularly bad code; no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 15:20:12 +00:00
trasz
558260a403 Fix memory leak.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 13:21:00 +00:00
trasz
622e1a5d99 Improve separated_concat() to properly handle the case of concatenating
"/" and "/foo".

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 13:00:59 +00:00
trasz
8822ff21ce Minor optimization/cleanup in node_path(); no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 11:59:58 +00:00
loos
5599179cc4 Put the new sentence on a new line.
Found with igor.
2015-03-08 21:11:08 +00:00
loos
04b6b93c32 Add a new ioctl to allow the setting of GPIO pin names.
When a gpiobus child is added, use its name to identify the mapped pin
names.

Make the respective changes to libgpio.

Add a new '-n' flag to gpioctl(8) to set the pin name.

Differential Revision:	https://reviews.freebsd.org/D2002
Reviewed by:	rpaulo
Requested by:	many
2015-03-08 00:47:50 +00:00
mav
a0ef792dfe Add variable initialization missed by me and clang.
Reported by:	grehan
MFC after:	2 weeks
2015-03-05 20:29:18 +00:00
mav
710980f2ff Fix error translation broken in r279658.
Reported by:	grehan
MFC after:	2 weeks
2015-03-05 20:24:34 +00:00
mav
a34b7ad0d2 Implement cache flush for ahci-hd and for virtio-blk over device.
MFC after:	2 weeks
2015-03-05 15:29:18 +00:00
mav
52d1cb2338 Add check for absent stripe size to r279652.
MFC after:	2 weeks
2015-03-05 13:52:30 +00:00
mav
02e846756e Report logical/physical sector sizes for virtual SATA disk.
MFC after:	2 weeks
2015-03-05 12:21:12 +00:00
mav
214386b6e7 Add support for TOPOLOGY feature of virtio block device.
Passing through physical block size/offset from underlying storage allows
guest to manage proper data and I/O alignment to improve performance.

MFC after:	2 weeks
2015-03-05 10:40:45 +00:00
dteske
1686d13fd7 sysrc(8): Add key-=remove' and improve key+=append' syntax
MFC after:	3 days
X-MFC-to:	stable/10 stable/9
2015-03-05 05:54:34 +00:00
mav
2a15661be2 Add example configuration for FibreChannel ports.
MFC after:	1 week
2015-03-04 14:30:09 +00:00
mav
88b2acde96 If target name starts with "naa.", set it as WWNN for CTL port.
MFC after:	1 week
Sponsored by:	iXsystems, Inc.
2015-03-04 14:12:38 +00:00
mav
9f7eac47b3 Fix handling of queued text and logout requests.
While it may have little sense, text and logout requests can be queued.
If they are, they consume cmdsn, so we should increment our conn_cmdsn.

MFC after:	1 week
2015-03-04 12:12:46 +00:00