Commit Graph

199633 Commits

Author SHA1 Message Date
Sean Bruno
bf3befadc1 Fix native-xtools breakage when building a gcc enabled target on a clang
enabled host.  Build a one-off gperf and put it in the PATH for the rest
of the target so the ONE call to gperf by the gcc build picks it up and
DTRT.

Reviewed by:	imp
2015-04-30 00:17:32 +00:00
Neel Natu
787fb3d026 Re-implement RTC current time calculation to eliminate the possibility of
losing time.

The problem with the earlier implementation was that the uptime value
used by 'vrtc_curtime()' could be different than the uptime value when
'vrtc_time_update()' actually updated 'base_uptime'.

Fix this by calculating and updating the (rtctime, uptime) tuple together.

MFC after:	2 weeks
2015-04-29 23:44:28 +00:00
Mariusz Zaborski
be73922fcd Save errno from close override.
Approved by:	pjd (mentor)
2015-04-29 22:59:44 +00:00
Mariusz Zaborski
0bb5e6ef80 Remove the nvlist_.*[fv] functions.
Those functions are problematic, because there is no way to report
memory allocation problems without complicating the API, so we can
either abort or potentially return invalid results. None of which is
acceptable.

In most cases the caller knows the size of the name, so he can allocate
buffer on the stack and use snprintf(3) to prepare the name.

After some discussion the conclusion is to removed those functions,
which also simplifies the API.

Discussed with: pjd, rstone
Approved by:	pjd (mentor)
2015-04-29 22:57:04 +00:00
Michael Gmelin
681476b551 Bump __FreeBSD_version for smb(4) changes in r281985
Differential Revision:	https://reviews.freebsd.org/D2398
Reviewed by:	bapt, flo
Approved by:	bapt, flo
2015-04-29 22:50:41 +00:00
Sean Bruno
7f6cee3376 Obsolute /usr/bin/gperf for non-gcc enabled targets.
Leave it as valid for mips/sparc64 gcc enabled targets.

Reviewed by:	imp@
2015-04-29 22:46:30 +00:00
Mariusz Zaborski
37c6848ce6 Remove the use of nvlist_.*[fv] functions from tests.
Approved by:	pjd (mentor)
2015-04-29 22:46:18 +00:00
Mariusz Zaborski
256b83ab83 Remove the use of nvlist_.*[vf] functions from casper and replace
them with snprintf(3). Assert the results of snprintf(3).

Approved by:	pjd (mentor)
2015-04-29 22:33:53 +00:00
Mariusz Zaborski
bed3fb70df Remove the use of nvlist_.*[vf] functions from libcapsicum and replace
them with snprintf(3). Assert the results of snprintf(3).

Approved by:	pjd (mentor)
2015-04-29 22:19:40 +00:00
Mariusz Zaborski
3cfb71c186 Remove recursion from descriptor-related functions.
Approved by:	pjd (mentor)
2015-04-29 22:15:02 +00:00
Mariusz Zaborski
44c125c4ce Nvlist functionality is not used within interrupt context, so we should
use M_WAITOK to allocate memory.

Approved by:	pjd (mentor)
2015-04-29 22:00:26 +00:00
Mariusz Zaborski
003e3ea15b Always use the nv_malloc macro instead of malloc(3).
Approved by:	pjd (mentor)
2015-04-29 21:54:34 +00:00
Mariusz Zaborski
906289c2ec Style fixes.
Approved by:	pjd (mentor)
2015-04-29 21:50:04 +00:00
Ed Maste
2c48063b30 vt: fix vt_fb_bitblt_bitmap mask corruption
Previously the mask wrapped when one or more of the mask bytes extended
past the right edge of the window. Simplify the logic and use the same
byte offset and bit in both the pattern and mask.

PR:		199648
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2360
2015-04-29 20:30:11 +00:00
Pedro F. Giffuni
1faac5bc09 Revert r281889:
The change would appease the static analyzers but it is pretty much a
no-op. I need to trust static analyzers much less, especially for the
kernel.

Requested by:	jkim
2015-04-29 20:08:03 +00:00
Konstantin Belousov
8f96f18a1b Remove the #ifdef DEBUG code, which is not compilable on 64bit
architectures.  It seems to be an overlooked chunk in the r15645.

PR:	199767
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-04-29 19:47:18 +00:00
Enji Cooper
7ad92e6ab7 Fix typo. It should have been atf_tc_skip, not atf_skip
Reported by: many, Jenkins
Pointyhat to: ngie
MFC after: 4 days
2015-04-29 19:08:11 +00:00
George V. Neville-Neil
9fe48b8076 Brief demo script showing the various values that can be read via the new SIFTR statically defined tracepoint (SDT).
Reviewed by:	bz, markj
2015-04-29 18:07:58 +00:00
John Baldwin
4dc78216f8 Don't free mbufs when stopping an interface in netmap mode.
Currently if you ifconfig down a vtnet interface while it is being used
via netmap, the kernel panics due to trying to treat the cookie values
in the virtio rings as mbufs to be freed. When netmap is enabled, these
cookie values are pointers to something else.

Note that other netmap-aware drivers don't seem to need this as they
store the mbuf pointers in the software rings that mirror the hardware
descriptor rings, and since netmap doesn't touch those, the software
state always has NULL mbuf pointers causing the loops to free mbufs to
not do anything. However, vtnet reuses the same state area for both
netmap and non-netmap mode, so it needs to explicitly avoid looking at
the rings and treating the cookie values as mbufs if netmap is
enabled.

Differential Revision:	https://reviews.freebsd.org/D2348
Reviewed by:	adrian, bryanv, luigi
MFC after:	1 week
Sponsored by:	Norse Corp, Inc.
2015-04-29 17:48:25 +00:00
George V. Neville-Neil
981ad3ecf9 Brief demo script showing the various values that can be read via
the new SIFTR statically defined tracepoint (SDT).

Differential Revision:	https://reviews.freebsd.org/D2387
Reviewed by:	bz, markj
2015-04-29 17:19:55 +00:00
Scott Long
16be867406 Revert r282227. It is clearly incorrect as it frees an object that is still
referenced.  I think that there does exist an unlikely edge case for a
memory leak, but only if a driver is incorrectly written and specifies no
valid range of targets to scan.  That can be fixed in a follow-up commit.

Obtained from:	Netflix, Inc.
2015-04-29 17:18:41 +00:00
Edward Tomasz Napierala
82224d7df8 Remove spurious period.
MFC after:	1 month
Sponsored by:	International OCD Foun^W^W^WThe FreeBSD Foundation
2015-04-29 17:01:28 +00:00
Brad Davis
f3e74005fc Fix typo 2015-04-29 16:52:43 +00:00
Edward Tomasz Napierala
aae2a24b49 Make rctl(8) more user-friendly when RACCT/RCTL is disabled for some reason.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-29 16:41:49 +00:00
Baptiste Daroussin
7c05ee19ee Fix mis usage of ms(7) macros
Submitted by:	heirloom doctools upstream
2015-04-29 16:41:48 +00:00
Glen Barber
687b992534 Document r280297, OpenSSL updated to version 1.0.1m.
Sponsored by:	The FreeBSD Foundation
2015-04-29 16:15:26 +00:00
Scott Long
affc4a4bff Improve support for blacklisting bad memory locations. The user can supply
a text file with a list of physical memory addresses to exclude, and have it
loaded at boot time via the provided example in loader.conf.  The tunable
'vm.blacklist' remains, but using an external file means that there's no
practical limit to the size of the list.  This change also improves the
scanning algorithm for processing the list, scanning the list only once
instead of scanning it for every page in the system.  Both the sysctl and
the file can be unsorted and contain duplicates so long as each entry is
numeric (decimal or hex) and is separated by a space, comma, or newline
character.  The sysctl 'vm.page_blacklist' is now provided to report what
memory locations were successfully excluded.

Reviewed by:	imp, emax
Obtained from:	Netflix, Inc.
MFC after:	3 days
2015-04-29 15:57:14 +00:00
Pedro F. Giffuni
bfce3bb269 Fix memory leak in scsi_scan_bus()
CID:	1007770
PR:	199671
2015-04-29 15:46:57 +00:00
Pedro F. Giffuni
3b7176c90a Plug memory leaks in kbdmux(4) (take 2)
This is a fix to the previous attempt in r281889, which some (most?)
keyboards.

Discussed with:	emaste, jkim

Found by:	clang static analyzer
CID:		1007072
CID:		1007073
CID:		1007074
2015-04-29 15:41:19 +00:00
Andrew Turner
85ffc58684 Add pmap_mapbios and pmap_unmapbios. These will be needed to support acpi.
Sponsored by:	The FreeBSD Foundation
2015-04-29 15:00:43 +00:00
Steven Hartland
eee7269ff8 Correct date typo in UPDATING
MFC after:	1 month
X-MFC-With: r282208
Sponsored by:	Multiplay
2015-04-29 14:17:40 +00:00
Baptiste Daroussin
429af67f07 Remove never written documentation 2015-04-29 13:30:04 +00:00
Baptiste Daroussin
af02ca259d Explicitly declare to not print the current date
Found with heirloom-doctools which uses the original AT&T macros
2015-04-29 12:57:55 +00:00
Roger Pau Monné
f0e31fe074 vt_vga: add a timeout while waiting for vertical retrace
On one of my systems FreeBSD will fail to boot because vt_vga gets stuck
waiting for the vertical retrace if there's no monitor attached. Fix this by
adding a timeout and exiting if the vertical retrace times out.

Sponsored by: Citrix Systems R&D
Reviewed by: emaste, dumbbell
Differential Revision: https://reviews.freebsd.org/D2397
2015-04-29 12:53:41 +00:00
George V. Neville-Neil
3e126de6bd Make it possible to statically link SIFTR into the kernel
as a new option.

Reviewed by:	bz
Discussed with:	lstewart
MFC after:	2 weeks
2015-04-29 12:37:45 +00:00
Edward Tomasz Napierala
79b8680737 Remove oldnfs leftovers from mountd(8).
Reviewed by:	rmacklem@
Sponsored by:	The FreeBSD Foundation
2015-04-29 12:33:00 +00:00
Edward Tomasz Napierala
4b5c9cf62f Add kern.racct.enable tunable and RACCT_DISABLED config option.
The point of this is to be able to add RACCT (with RACCT_DISABLED)
to GENERIC, to avoid having to rebuild the kernel to use rctl(8).

Differential Revision:	https://reviews.freebsd.org/D2369
Reviewed by:	kib@
MFC after:	1 month
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2015-04-29 10:23:02 +00:00
Wei Hu
da2f98a1cf Microsoft vmbus, storage and other related driver enhancements for HyperV.
- Vmbus multi channel support.
    - Vector interrupt support.
    - Signal optimization.
    - Storvsc driver performance improvement.
    - Scatter and gather support for storvsc driver.
    - Minor bug fix for KVP driver.
Thanks royger, jhb and delphij from FreeBSD community for the reviews
and comments. Also thanks Hovy Xu from NetApp for the contributions to
the storvsc driver.

PR:     195238
Submitted by:   whu
Reviewed by:    royger, jhb, delphij
Approved by:    royger
MFC after:      2 weeks
Relnotes:       yes
Sponsored by:   Microsoft OSTC
2015-04-29 10:12:34 +00:00
Enji Cooper
c82b9f9234 ATF_REQUIRE_KERNEL_MODULE: use atf_skip, not ATF_REQUIRE_MSG so the testcase
no longer bombs out
PLAIN_REQUIRE_KERNEL_MODULE: use printf + _exit, no err so the testcase no
longer bombs out if it prints to stderr

MFC after: 5 days
2015-04-29 08:56:56 +00:00
Adrian Chadd
1a8fd8faac Constify some const parameters in seq.h.
The NUMA work I'm doing uses const for read-only parameters, which requires
the seq.h API to also use const for read-only parameters.

Reviewed by:	mjg
2015-04-29 04:08:17 +00:00
Neel Natu
b8070ef5b1 Emulate the 'bit test' instruction. Windows 7 uses 'bit test' to check the
'Delivery Status' bit in APIC ICR register.

Reported by:	Leon Dang (ldang@nahannisys.com)
MFC after:	2 weeks
2015-04-29 02:01:46 +00:00
Steven Hartland
ad34cace15 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
Warner Losh
2e8457e701 Only include CWARNFLAGS once to reduce command line size from ~1400
characters to "only" ~900 for kernel builds.
2015-04-28 23:54:55 +00:00
Neel Natu
f39630c2d6 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
Steven Hartland
aeb9d4dad9 Fix misuse of input argument in traverse_visitbp
In traverse_visitbp(), the input argument dnp is modified in the middle
to point to a temporary buffer. Originally this doesn't matter, because
no user of TRAVERSE_POST dereferences it. However, in fbeddd6 a piece of
code is added dereferencing dnp after the modification, creating a possible
bug.

We fix this by creating a new local variable cdnp for the DMU_OT_DNODE case,
so we don't modify the input argument. Also we introduce different local
variables in the DMU_OT_OBJSET case to prevent confusion between the input
argument.

Obtained from:	zfsonlinux (a585f2f844ed3d4270221fed88f5e494eb55d932)
MFC after:	2 weeks
Sponsored by:	Multiplay
2015-04-28 22:46:58 +00:00
Glen Barber
d42be3eade Refine the entry regarding devfs(5) timestamps, as of
r280949, devfs(5) updates default to seconds precision.

Submitted by:	jilles
Sponsored by:	The FreeBSD Foundation
2015-04-28 21:57:52 +00:00
Pedro F. Giffuni
33ef4de95f libgomp: bring initial BSD support from upstream.
Initial support for FreeBSD specific routines related to counting
online processors and dynamic load balancing.

Fix "detection" of the <sys/sysctl> header which upstream seems to have
done wrong.

Obtained from:	GCC pre-4.4 branch (rev. 140497; LGPLv2.1+)
2015-04-28 21:32:27 +00:00
Ruslan Bukin
a74af3dc69 o Fix bus_space_read_multi functions: correct increment value
o Use these functions for streaming

Tested with ATA (PCI bus) / Gem5 simulator

Reviewed by:	andrew
Sponsored by:	HEIF5
2015-04-28 20:33:31 +00:00
Enji Cooper
054f15ac76 Followup to r282083: add GCC_BOOTSTRAP to the list of broken options on arm64
Differential Revision: https://reviews.freebsd.org/D2379
Reviewed by: imp
2015-04-28 19:15:28 +00:00
Glen Barber
313b134f23 Document r281387, hptnr(4) driver updated to version 1.1.1.
Sponsored by:	The FreeBSD Foundation
2015-04-28 18:11:36 +00:00