Commit graph

209484 commits

Author SHA1 Message Date
Jilles Tjoelker 7d980385e8 sh: Fix copying uninitialized field 'special'.
This just copied uninitialized data and did not depend on it later, so it
should not be dangerous.

Found by:	clang static analyzer
2016-03-13 22:54:14 +00:00
Bjoern A. Zeeb 19edab1711 Remove duplicate external declaration of tcprexmtthresh making
gcc compiles barf.
2016-03-13 21:26:18 +00:00
Maxim Sobolev 6e5a582da2 In the de-duplication mode, when found matching md5 checksum also read
back block and compare actual content. Just output original block
instead of back reference in the unlikely event of collision.
2016-03-13 21:09:08 +00:00
Bryan Drewery 2b2ab443c0 Follow-up r296700: Fix incorrectly declaring these as .MAIN.
This broke bootstrap-tools at least for DIRDEPS_BUILD.

Sponsored by:	EMC / Isilon Storage Division
2016-03-13 20:51:45 +00:00
Jakub Wojciech Klama bb3844b388 Check value returned from ucl_parser_add_file().
Reviewed by:	trasz
Approved by:	trasz (mentor)
MFC after:	1 month
Sponsored by:	iXsystems, Inc.
2016-03-13 19:50:17 +00:00
Ian Lepore e282d8f5bc Require firewall setup before running rc.d/netwait, otherwise the ping
packets sent by netwait may not get through.

PR:		207916
Submitted by:	John.Marshall@riverwillow.com.au (ipfw), ian@ (pf, ipfilter)
2016-03-13 19:42:59 +00:00
Robert Watson bc84fc89be Put IPSec's anouncement of its successful intialisation under bootverbose:
now that it's a default kernel option, we don't really need to tell the
world about it on every boot, especially as it won't be used by most users.
2016-03-13 19:27:46 +00:00
Bryan Drewery 1270146286 We only support GCC 4.8 for these flags.
- 4.7 introduced maybe-uninitialized
- 4.8 introduced aggressive-loop-optimizations

Sponsored by:	EMC / Isilon Storage Division
2016-03-13 19:17:48 +00:00
Ian Lepore 79b05c7ff0 Fix a bug in bsdgrep that caused the program to hang in a tight loop for
some combinations of command line options and search patterns.  The code was
examining regexec flags looking for a regcomp flag value.  The fix is to
look in the struct field where the decoded regcomp flag was stored when the
regex was compiled.

With this fix, it's possible to build WITHOUT_GNU_GREP_COMPAT and
WITH_BSDGREP and have a usable GPL-free grep (which of course lacks gnugrep
extensions).  It now passes the kyua tests except for one test that requires
the -z/--null-data gnu extension, and one test involving outputting context
lines across multiple files which appears to sometimes output an extra
delimiter line ("--") between matches (a rather obscure failure of a rather
obscure feature, so bsdgrep should be generally usable now).
2016-03-13 14:53:12 +00:00
Edward Tomasz Napierala 49d8ebfe0e Remove name length limitation from autofs(5). The linear search with
strlens is somewhat suboptimal, but it's a temporary measure that will
be replaced with red-black trees later on.

PR:		204417
Reviewed by:	kib@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5266
2016-03-13 14:17:23 +00:00
Jared McNeill e9a37ecaab Add HDMI device nodes to Banana Pi dts.
PR:		207912
Approved by:	gonzo (mentor)
2016-03-13 01:49:36 +00:00
Jared McNeill f7f2f3a975 Fix display output for non-HDMI display devices.
Only set the display to HDMI mode if a CEA-861 extension block was found
on the connected display.

PR:		207912
Approved by:	gonzo (mentor)
2016-03-13 01:47:42 +00:00
Warner Losh bb52d711d0 Use the newly minted Makefile.libcompat to implement libsoft libraries
for the armv6 ABI switch. This also make WITH_LIBSOFT functional on
the arm platform. As a transition thing, this seems to work even
without switching the ABI (we basically build the same libraries
twice when MK_LIBSOFT=yes until the ABI cut over next
month). MK_LIBSOFT remains default no.
2016-03-12 23:25:05 +00:00
Alexander Motin 2c4f4af7a8 dd report short write as error, so don't halt on it. 2016-03-12 23:04:10 +00:00
Justin T. Gibbs 5405e7e2ee Provide high precision conversion from ns,us,ms -> sbintime in kevent
In timer2sbintime(), calculate the second and fractional second portions of
the sbintime separately. When calculating the the fractional second portion,
use a 64bit multiply to prevent excess truncation. This avoids the ~7% error
in the original conversion for ns, and smaller errors of the same type for us
and ms.

PR: 198139
Reviewed by: jhb
MFC after: 1 week
Differential Revision:    https://reviews.freebsd.org/D5397
2016-03-12 23:02:53 +00:00
John Baldwin 823590d40e Regen. 2016-03-12 22:55:07 +00:00
John Baldwin f479b2ac89 Do not include system call wrappers in libc for old FreeBSD system calls.
The base system libc is only used to run binaries built on FreeBSD 7.0 and
later.  It does not need to include system call wrappers for system calls
only used by FreeBSD binaries built on versions older than 7.0.  This was
already true for "COMPAT" system calls, but now wrappers for system calls
used on FreeBSD 4 and 6 are excluded as well.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D5597
2016-03-12 22:53:46 +00:00
Bryan Drewery 1329d41cb6 Enable FAST_DEPEND by default.
Missed in r296668.

Discussed on:	arch
Sponsored by:	EMC / Isilon Storage Division
2016-03-12 22:25:10 +00:00
Bryan Drewery ec4047ade2 Reduce duplicated logic from r291744.
Sponsored by:	EMC / Isilon Storage Division
2016-03-12 22:21:14 +00:00
Bryan Drewery ebf5587eca Stop looking up these values in every subdir on install.
This was slowing down installkernel since it was rerunning this in
every module directory.

Sponsored by:	EMC / Isilon Storage Division
2016-03-12 22:21:02 +00:00
Ed Maste 6d51bbb52a boot/efi: Prefer nm to objdump
Both objdump and nm are equally capable of reporting undefined symbols.

This gets us a step closer to building without binutils as we have an nm
implementation from ELF Tool Chain.

Reviewed by:	bdrewery
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5613
2016-03-12 21:44:33 +00:00
Jean-Sébastien Pédron 33a4a11703 drm/i915: Import Linux commit 168f83660211b9e059e3bc0638daaa01e9ea0b71
This makes sure the default context of each ring is cleaned up with the
ring itself and fixes a memory leak.

Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date:   Fri May 3 16:29:08 2013 +0300

    drm/i915: unreference default context on module unload

    Before module unload is called, gpu_idle() will switch
    to default context. This will increment ref count of base
    object as the default context is 'running' on module unload
    time. Unreference the drm object so that when context
    is freed, base object is freed as well.

    v2: added comment to explain the refcounts (Ben Widawsky)

    Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
    Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Obtained from:	Linux
2016-03-12 20:05:23 +00:00
Enji Cooper 45dc13f1ea Better handle filesystems mounted with -o noexec
ftruncate/11, open/20, and truncate/11 copy sleep(1) to a temporary file on the
target filesystem, execute the binary, then expect a result. This doesn't work
with scenarios where the target binary cannot be executed, e.g. the filesystem
was mounted with -o noexec.

Ensure the filesystem hasn't been mounted with -o noexec for the testcases
before executing them.

Differential Revision: https://reviews.freebsd.org/D5622
MFC after: 1 week
Reviewed by: markj
Sponsored by: EMC / Isilon Storage Division
2016-03-12 19:41:38 +00:00
Ed Maste cb1469fdd6 Bump BOOTSTRAPPING test for libelf after cross-endian fix in r296685 2016-03-12 19:08:13 +00:00
Ed Maste 65d641e6bb Bump __FreeBSD_version for libelf cross-endian fix in r296685 2016-03-12 19:05:41 +00:00
Bryan Drewery 048ce0938e Follow-up r296709: Fix build32 not properly building all libraries.
Pointyhat to:	bdrewery
Reported by:	antoine
2016-03-12 18:41:27 +00:00
Dimitry Andric 353cae4976 Fix the following gcc warnings on sparc64, when TCP_OFFLOAD is not
defined:

    sys/dev/cxgbe/t4_main.c:7474: warning: 'sysctl_tp_tick' defined but not used
    sys/dev/cxgbe/t4_main.c:7505: warning: 'sysctl_tp_dack_timer' defined but not used
    sys/dev/cxgbe/t4_main.c:7519: warning: 'sysctl_tp_timer' defined but not used

This just adds a bunch of #ifdef TCP_OFFLOAD in the right places.

Reviewed by:	np
Differential Revision: https://reviews.freebsd.org/D5620
2016-03-12 18:38:51 +00:00
Dimitry Andric e74d991d69 Fix gcc warnings about possibly uninitialized variables in gpioctl.c.
Noticed by:	bz
2016-03-12 15:10:30 +00:00
Konstantin Belousov 250d9fd8aa Fix handling of umtxp resource limit in sh(1)/ulimit(1), limits(1), add
login.conf(5) support.

Reviewed by:	jilles
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D5610
2016-03-12 14:54:34 +00:00
Jean-Sébastien Pédron 77e6a4072b drm/i915: Call i915_gem_gtt_fini() when the device is detached
This fixes several memory leaks. Apparently, this problem exists in
Linux 3.8 but the code changed in Linux 3.9 so it may be fixed upstream
already. Still, this is something we need to pay attention to.
2016-03-12 11:57:32 +00:00
Jean-Sébastien Pédron 538cf7be5e drm/i915: Fix page fault handler failure
... when __wait_seqno() is interrupted by a signal. In this case,
__wait_seqno() returns -ERESTARTSYS. Like we already do in drm_ioctl(),
we need to convert this error to a common code such as -EINTR, so the
page fault handler is restarted.

Reported by:	Frederic Chardon <chardon.frederic@gmail.com>
Tested by:	Frederic Chardon <chardon.frederic@gmail.com>
2016-03-12 11:54:58 +00:00
Jean-Sébastien Pédron 85a60a7756 agp: Do not attach to Intel GEN6+
The i915 video driver doesn't depend on agp(4) anymore for Sandybridge
and later GPUs. Therefore, there is no need to attach agp(4) to those
devices.

While here, fix `agp_i965_res_spec` to include the aperture base for
GEN4 and GEN5.

Reviewed by:	kib
Approved by:	kib
Differential Revision:	https://reviews.freebsd.org/D5586
2016-03-12 09:44:23 +00:00
Edward Tomasz Napierala 7571d31339 Use S_BLKSIZE instead of magic constant.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-03-12 09:33:26 +00:00
Edward Tomasz Napierala 2a5a08cb38 Refactor the way we restore cn_lkflags; no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-03-12 09:05:43 +00:00
Edward Tomasz Napierala f69db55151 Remove cn_consume from 'struct componentname'. It was never set to anything
other than 0.

Reviewed by:	kib@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5611
2016-03-12 08:50:38 +00:00
Edward Tomasz Napierala 213ed83855 Fix autofs triggering problem. Assume you have an NFS server,
192.168.1.1, with share "share". This commit fixes a problem
where "mkdir /net/192.168.1.1/share/meh" would return spurious
error instead of creating the directory if the target filesystem
wasn't mounted yet; subsequent attempts would work correctly.

The failure scenario is kind of complicated to explain, but it all
boils down to calling VOP_MKDIR() for the target filesystem (NFS)
with wrong dvp - the autofs vnode instead of the filesystem root
mounted over it.

Reviewed by:	kib@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5442
2016-03-12 07:54:42 +00:00
John Baldwin 6d3eca246c Remove Symbol.map entries for old AIO system calls for FreeBSD 6 compat.
These entries should have never been present since they only exist for
compat with FreeBSD 6.x (and older) binaries.  This was missed in r296572.
Technically this breaks the ABI by removing versioned symbols.  However,
no binaries should be linked against these symbols.  No release has
shipped with a header that contained a prototype for these functions.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D5615
2016-03-12 07:13:20 +00:00
Andrew Turner cc91c4c7b4 Print the correct size of loader.efi when failing to load it into memory.
Obtained from:	AsiaBSDCon
Sponsored by:	ABT Systems Ltd
2016-03-12 06:50:16 +00:00
Navdeep Parhar 537e5f9a74 cxgbe(4): Fix typo in previous commit. 2016-03-12 03:02:33 +00:00
Navdeep Parhar 0f2f53efd2 cxgbe(4): Catch up with the latest list of card capabilities as reported
by the firmware.
2016-03-12 02:54:55 +00:00
Bryan Drewery dba75e9fa5 Move Makefile.lib32 to Makefile.libcompat and generalize it.
This is in preparation for LIBSOFT.

This file only supports *1* LIBCOMPAT value currently and must be capitalized.
In Makefile.libcompat given LIBCOMPAT=FOO there can be values set for
LIBFOOCFLAGS, LIBFOOCPUFLAGS, LIBFOOWMAKEENV, LIBFOOWMAKEFLAGS, LIBFOOCPUFLAGS,
and LIBFOODTRACE.  These will have the standard cross-build values appended
onto them.

This could be extended to support multiple libcompat libraries in the future
once there is a need.

Reviewed by:	imp
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D5612
2016-03-11 23:56:33 +00:00
Bryan Drewery b5fb065156 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:59 +00:00
Bryan Drewery 7533aa1599 Add missing CLEANFILES.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:56 +00:00
Bryan Drewery a09f4b4d12 Add more .NOMETA missed in r291320
Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:51 +00:00
Bryan Drewery 1a17ca5f2a Revert r269030. CLEANFILES is already added to .NOPATH since r241298.
Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:45 +00:00
Bryan Drewery f35f9d33f5 Remove bogus .ORDER.
This is not SUBDIR_PARALLEL and if it were this .ORDER would not work
since the targets are <target>_subdir_<subdir> not <subdir>.

MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:42 +00:00
Bryan Drewery 19f67f6910 Don't even define or append subdir targets with NO_SUBDIR.
No functional change.

This prevents adding empty targets to the main called target which is
confusing for debugging.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:39 +00:00
Bryan Drewery 480364a499 Remove exists() checks so normal out-of-date handling can be used.
This also fixes META MODE rebuilding these because the 'number of build commands'
changed from the previous build.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:36 +00:00
Bryan Drewery 95ae492929 META_MODE: We can only use a cookie if filemon is being used.
Sponsored by:	EMC / Isilon Storage Divsion
2016-03-11 23:45:32 +00:00
Bryan Drewery b7d28aff10 META_MODE: Simplify the META_COOKIE handling to use .USE/.USEBEFORE.
Extend it to other cases of meta mode cookies so they get the proper rm
cookie behavior when a .meta file detects it needs to rebuild and fails.

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:28 +00:00