Commit Graph

15436 Commits

Author SHA1 Message Date
bapt
0659e9b5d2 Remove extendline definition
Remove now unused PWBUFSZ define
2015-05-10 11:24:16 +00:00
bapt
6097f34be5 Use calloc(3) instead of malloc(3) + memset(3)
While here check the return of calloc(3)
2015-05-10 11:18:01 +00:00
bapt
7b3f5d741e The initial logic for allocating the new string was wrong, the conversion
to strndup(3) duplicated the same mistake, actually strdup(3) is good enough
to allocate the new string.
2015-05-10 10:15:36 +00:00
bapt
091698a77d Use strndup(3) instead of malloc(3) + memcpy(3)
Check the return of strndup
2015-05-10 10:02:09 +00:00
bapt
065d18b9ef Remove useless call to extendarray 2015-05-10 09:33:15 +00:00
bapt
ebdc3de2ac The pwdb function is only used once to check the database rename it
pwdb_check and simplify it accordingly
2015-05-10 09:23:03 +00:00
bapt
15b9b89c4b if the check of the pw db fails return the failed value 2015-05-10 09:11:12 +00:00
bapt
cac4a2a5a5 Some style(9) fixes 2015-05-10 09:02:15 +00:00
bapt
8b6866b1a0 Replace sprintf(3) with snprintf(3) 2015-05-09 22:48:48 +00:00
bapt
0d7a61d5ba Use snprintf(3) instead of sprintf(3)
Remove useless "else"
2015-05-09 22:43:44 +00:00
bapt
ee9e5523ab Remove now unused LNBUFSZ buffer size 2015-05-09 22:08:30 +00:00
bapt
6fcebe0418 Return from the function as early as possible
This reduces the depth of the if statements and improves clarity of the code
2015-05-09 21:53:33 +00:00
bapt
f8a287817e Remove some uneeded headers 2015-05-09 19:29:55 +00:00
bapt
defd9f5516 Remove unneeded headers 2015-05-09 19:22:33 +00:00
bapt
f0a46849ff Replace malloc(3) + strcpy(3) + strcat(3) by asprintf(3) 2015-05-09 19:12:16 +00:00
bapt
332806b946 Use snprintf(3) instead of strcpy(3) + strncat(3) 2015-05-09 19:09:34 +00:00
bapt
33ff7a2e5e Use sbuf(9) instead of homebrewed buffered string 2015-05-09 19:00:16 +00:00
stas
42ca9843bb Fix the double space in comment.
While here, change the comment style to match the rest of the file.
2015-05-09 00:48:44 +00:00
jhb
57645743ad Use the kern.bootfile sysctl to set the default kernel path rather than
hardcoding /boot/kernel. This allows pmcstat(8) to work without -k when
using nextboot -k or 'boot foo' at the loader to boot alternate kernels.

Differential Revision:	https://reviews.freebsd.org/D2425
Reviewed by:	adrian, emaste, gnn
MFC after:	2 weeks
Sponsored by:	Norse Corp, Inc.
2015-05-08 16:02:31 +00:00
neel
7fdf1e8707 Allow byte reads of AHCI registers.
This is needed to support Windows guests that use byte reads to access certain
AHCI registers (e.g. PxTFD.Status and PxTFD.Error).

Reviewed by:	grehan, mav
Reported by:	Leon Dang (ldang@nahannisys.com)
Differential Revision:	https://reviews.freebsd.org/D2469
MFC after:	2 weeks
2015-05-07 18:35:15 +00:00
mav
eb1da25535 Add memory barrier to r281764.
While race at this point may cause only a single packet delay and so was
not really reproduced, it is better to not have it at all.

MFC after:	1 week
2015-05-06 18:04:31 +00:00
neel
7776059e98 Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup().
Prior to this change both functions returned 0 for success, -1 for failure
and +1 to indicate that an exception was injected into the guest.

The numerical value of ERESTART also happens to be -1 so when these functions
returned -1 it had to be translated to a positive errno value to prevent the
VM_RUN ioctl from being inadvertently restarted. This made it easy to introduce
bugs when writing emulation code.

Fix this by adding an 'int *guest_fault' parameter and setting it to '1' if
an exception was delivered to the guest. The return value is 0 or EFAULT so
no additional translation is needed.

Reviewed by:	tychon
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D2428
2015-05-06 16:25:20 +00:00
mav
6b7074e362 Reimplement queue freeze on error, added in r282429:
It is not required to use CLO to recover from task file error, it should
be enough to do only stop/start, that does not clear the PxTFD.STS.ERR.

MFC after:	13 days
2015-05-06 09:59:19 +00:00
allanjude
9f65bd9565 Add a sanity check to the swap size in zfsboot of bsdinstall
Loop until the user enters a valid size (>100mb or 0)

Differential Revision:	https://reviews.freebsd.org/D2299
Reported By:	Shawn Webb
Reviewed by:	roberto
Approved by:	brd
MFC after:	2 weeks
Sponsored by:	ScaleEngine Inc.
2015-05-05 03:08:49 +00:00
mav
8e9264e9c5 Implement in-order execution of non-NCQ commands.
Using status updates in r282364, block queue on BSY, DRQ or ERR bits set.
This can be a performance penalization for non-NCQ commands, but it is
required for proper error recovery and standard compliance.

MFC after:	2 weeks
2015-05-04 19:55:01 +00:00
cy
6c91165dc2 Restore CPU dependent compile time conditionals.
MFC after:	1 month (with r281143 and r282408)
2015-05-04 12:42:52 +00:00
cy
1818eba70c MFV ntp 4.2.8p2 (r281348)
Reviewed by:    delphij (suggested MFC)
Approved by:	roberto
Security:       CVE-2015-1798, CVE-2015-1799
Security:       VuXML ebd84c96-dd7e-11e4-854e-3c970e169bc2
MFC after:	1 month
2015-05-04 04:45:59 +00:00
mav
4cd4238e92 Implement basic PxTFD.STS.BSY reporting.
MFC after:	2 weeks
2015-05-03 07:43:58 +00:00
glebius
1ca5d173ab Remove #ifdef IFT_FOO.
Submitted by:	Guy Yur <guyyur gmail.com>
2015-05-02 20:31:27 +00:00
oshogbo
cf66982b37 Approved, oprócz użycie RESTORE_ERRNO() do ustawiania errno.
Change the nvlist_recv() function to take additional argument that
specifies flags expected on the received nvlist. Receiving a nvlist with
different set of flags than the ones we expect might lead to undefined
behaviour, which might be potentially dangerous.

Update consumers of this and related functions and update the tests.

Approved by:	pjd (mentor)

Update man page for nvlist_unpack, nvlist_recv, nvlist_xfer, cap_recv_nvlist
and cap_xfer_nvlist.

Reviewed by:	AllanJude
Approved by:	pjd (mentor)
2015-05-02 17:45:52 +00:00
mav
843dbc5981 Initialize PxCMD on reset and make its read-only bits such.
MFC after:	2 weeks
2015-05-02 16:11:29 +00:00
mav
9b3d347cfb Handle ATA_SEND_FPDMA_QUEUED as NCQ in ahci_port_stop().
MFC after:	1 week
2015-05-02 14:43:37 +00:00
neel
9d0c86225f Advertise an additional memory BAR in the "dummy" device emulation.
This is useful for testing the MOVS emulation when both the source and
destination addresses are in the MMIO space.

MFC after:	1 week
2015-05-02 03:25:24 +00:00
emaste
e3abac9f79 crunchide: Restore local EM_AARCH64 constant for bootstrapping
Most of the EM_* constants are available in all supported host branches,
but EM_AARCH64 was added relatively recently. Add it back to fix
building HEAD on 10.x.

Noticed by:	adrian, jmallett
2015-04-30 23:48:05 +00:00
trasz
0ef7434713 Remove oldnfs remnants from nfsd(8).
Reviewed by:	rmacklem@
Sponsored by:	The FreeBSD Foundation
2015-04-30 12:55:27 +00:00
trasz
3bcd59aa88 Remove oldnfs leftovers from mountd(8).
Reviewed by:	rmacklem@
Sponsored by:	The FreeBSD Foundation
2015-04-29 12:33:00 +00:00
smh
091e83ecee Standardise chmod, chflags, chown and chgrp recursive symlink processing
chmod, chflags, chgrp, chmod and chown now affect symlinks in -R mode as
defined in symlink(7); previously symlinks were silently ignored.

Differential Revision:	https://reviews.freebsd.org/D2316
Reviewed by:	jilles
MFC after:	1 month
Relnotes:	yes
Sponsored by:	Multiplay
2015-04-29 00:49:00 +00:00
neel
0151349b05 Implement the century byte in the RTC. Some guests require this field to be
properly set.

Reported by:	Leon Dang (ldang@nahannisys.com)
MFC after:	2 weeks
2015-04-28 23:44:47 +00:00
emaste
6df58ba6b5 crunchide: add basic string table sanity checks
Reported by:	Coverity Scan
CID:		978805, 980919
Sponsored by:	The FreeBSD Foundation
2015-04-28 13:04:51 +00:00
jgh
876a1be7b7 - remove -l option from ntpdate manpage, as it is no longer an option
Differential Revision:	https://reviews.freebsd.org/D2358
Submitted by:	gnn@
Approved by:	wblock (mentor)
MFC after:	after 1 week
2015-04-27 15:22:57 +00:00
trasz
b02ea1ffbd Make setproctitle(3) work in Capsicum capability mode. This makes
ctld(8) child processes to indicate initiator address and name in
their titles, similar to what iscsid(8) child processes do.

PR:		181352
Differential Revision:	https://reviews.freebsd.org/D2363
Reviewed by:	rwatson@, mjg@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-27 11:18:16 +00:00
ngie
2e18ab7ef6 ath3kfw, bcmfw, bthidcontrol, bthidd all require usb(4); build them
conditionally if MK_USB != no

MFC after: 1 week
2015-04-27 06:34:51 +00:00
grembo
9da00f2a97 Expand SMBUS API to add smbus_trans() function.
Differential Revision:	https://reviews.freebsd.org/D1955
Reviewed by:	adrian, jhb, wblock
Approved by:	adrian, jhb
2015-04-25 16:15:01 +00:00
neel
fe295d11a1 Don't allow guest to modify readonly bits in the PCI config 'status' register.
Reported by:	Leon Dang (ldang@nahannisys.com)
MFC after:	2 weeks
2015-04-24 19:15:38 +00:00
joel
129e69d895 Fix minor mdoc issues. 2015-04-24 14:36:06 +00:00
jhb
e4683250d1 Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.

Approved by:	Hudson River Trading LLC (who owns ACT LLC)
MFC after:	1 week
2015-04-23 14:22:20 +00:00
trasz
9eaaafc5b6 Add hint about "volmode=dev" to ctl.conf(5).
Differential Revision:	https://reviews.freebsd.org/D2328
Reviewed by:	allanjude@, bcr@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-21 09:11:28 +00:00
rpaulo
84f11f7741 Fix wpa/hostapd build without OpenSSL. 2015-04-21 02:00:37 +00:00
rpaulo
842f4520d0 Merge wpa_supplicant/hostapd 2.4.
Major changes are: SAE, Suite B, RFC 7268, EAP-PKE, ACS, and tons of
bug fixes.

Relnotes:	yes
2015-04-21 01:45:11 +00:00
mav
28d6acc050 Don't set bits that should be zero for SATA devices.
Old value made Linux think that it is PATA device with SATA bridge.

MFC after:	2 weeks
2015-04-20 19:11:27 +00:00