Commit Graph

209462 Commits

Author SHA1 Message Date
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
Bryan Drewery
bd08afe1c9 DIRDEPS_BUILD: Add a sure way to prohibit building 'all' during dirdeps phase.
This obsoletes the _SKIP_BUILD check but keeps it for now until it
proves to be enough.

In the dirdeps build the first 'make all' or 'make' ran would invoke
'make dirdeps' which builds dependencies and then builds the current
directory in a sub-make (when BUILD_AT_LEVEL0 is no, which for us it
is).  This behavior causes things attached to 'all:' to build in the
dirdeps phase AND the sub-make phase which creates all kinds of problems
for staging, meta file tracking, and races.

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:23 +00:00
Bryan Drewery
bffd819972 DIRDEPS_BUILD: Reduce restaging here.
This also fixes meta tracking for the beforeinstall since it had been
marked .PHONY before (in bsd.sys.mk).

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:20 +00:00
Bryan Drewery
5e8745cc86 DIRDEPS_BUILD: Fix building during dirdeps.
Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:17 +00:00
Bryan Drewery
9c7086241d DIRDEPS_BUILD: Avoid rebuilds due to changed build commands with newly staged tools.
This is a follow-up to r291561 which reworked the bootstrap tool PATH
handling.

An example of this is when building lib/clang/libclangedit.  At first
clang-tblgen will not be staged in the host tree so it will have
CLANG_TBLGEN=clang-tblgen set and exported.  During the build though it
will stage clang-tblgen and then find it via the PATH.  On the next
build it finds clang-tblgen in the stage directory and would set
CLANG_TBLGEN=<stagedir/usr/bin>/clang-tblgen thus causing the build
command to change.  In both cases the same exact tool was used though so
there is no need to rebuild.  If the tool did change the normal
meta/filemon handling would pick that up via timestamp comparisons and
rebuild.

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:13 +00:00
Bryan Drewery
d5cc057985 DIRDEPS_BUILD: Fix staging of share/sendmail and share/examples.
Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:09 +00:00
Bryan Drewery
4d7ae5ef71 DIRDEPS_BUILD: export DESTDIR for STAGING.
An example of where this is needed is in share/examples which for
'etc-examples' runs 'make -C SRCTOP/etc etc-examples' which installs
to the default DESTDIR otherwise.

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:05 +00:00
Bryan Drewery
fa3afecf97 DIRDEPS_BUILD: Extend beforeinstall: staging hack.
Most beforeinstall: usage is not adding commands but only adding
targets, such as in share/sendmail.

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:02 +00:00
Bryan Drewery
55f6623d83 Remove out-of-place make(buildincludes) check.
This came in r239572 for META_MODE handling but it doesn't make sense
since the staging is always done in make(all); make(buildincludes)
is never actually ran in the META_MODE build.

Reported by:	bapt
Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:44:59 +00:00
Bryan Drewery
f883c0ad24 DIRDEPS_BUILD: None of this is needed anymore.
This file is using stage-install, so all of the .dirdep files
are properly handled.  The cookie handling also properly
handles rebuilds with .meta files.  DESTDIR from bsd.sys.mk is also
respected for staging.  This logic came in r239572.

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:44:56 +00:00
Bryan Drewery
588f5cb86d DIRDEPS_BUILD: Remove the cookie when target is out-of-date.
The meta file may decide the target is out of date but nothing
ensures that the *next* build will build this target if it
fails this time for some reason; it is still out-of-date
until it succeeds.

Convert the include/ cookie usage to the global versions.

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:44:27 +00:00
Navdeep Parhar
959824daba cxgbe(4): sysctls to display the TOE's TCP timers.
cask:~# sysctl -d dev.t5nex.0.toe
dev.t5nex.0.toe.finwait2_timer: FINWAIT2 timer (us)
dev.t5nex.0.toe.initial_srtt: Initial SRTT (us)
dev.t5nex.0.toe.keepalive_intvl: Keepidle interval (us)
dev.t5nex.0.toe.keepalive_idle: Keepidle idle timer (us)
dev.t5nex.0.toe.persist_max: Persist timer max (us)
dev.t5nex.0.toe.persist_min: Persist timer min (us)
dev.t5nex.0.toe.rexmt_max: Retransmit max (us)
dev.t5nex.0.toe.rexmt_min: Retransmit min (us)
dev.t5nex.0.toe.dack_timer: DACK timer (us)
dev.t5nex.0.toe.dack_tick: DACK tick (us)
dev.t5nex.0.toe.timestamp_tick: TCP timestamp tick (us)
dev.t5nex.0.toe.timer_tick: TP timer tick (us)
...

cask:~# sysctl dev.t5nex.0.toe
dev.t5nex.0.toe.finwait2_timer: 9765440
dev.t5nex.0.toe.initial_srtt: 244128
dev.t5nex.0.toe.keepalive_intvl: 73240800
dev.t5nex.0.toe.keepalive_idle: 7031116800
dev.t5nex.0.toe.persist_max: 9765440
dev.t5nex.0.toe.persist_min: 976544
dev.t5nex.0.toe.rexmt_max: 9765440
dev.t5nex.0.toe.rexmt_min: 244128
dev.t5nex.0.toe.dack_timer: 19520
dev.t5nex.0.toe.dack_tick: 32.768
dev.t5nex.0.toe.timestamp_tick: 1048.576
dev.t5nex.0.toe.timer_tick: 32.768
...
2016-03-11 23:24:04 +00:00
John Baldwin
47cedcbd72 Use SI_SUB_LAST instead of SI_SUB_SMP as the "catch-all" subsystem.
Reviewed by:	kib
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D5515
2016-03-11 23:18:06 +00:00
Dimitry Andric
9132599001 Pull in r250279 from upstream libc++ trunk (by Eric Fiselier):
Fix GCC atomic implementation in C++03

Pull in r250802 from upstream libc++ trunk (by Eric Fiselier):

  Detect relaxed constexpr rules for gcc versions

Pull in r255585 from upstream libc++ trunk (by Eric Fiselier):

  Fix various GCC mis-configurations for newer versions.

  This patch goes through and enables C++11 and C++14 features for newer GCC's.
  The main changes are:

  1. Turn on variable templates. (Uses __cpp_variable_templates)
  2. Assert atomic<Tp> is trivially copyable (Uses _GNUC_VER >= 501).
  3. Turn on trailing return support for GCC. (Uses _GNUC_VER >= 404)
  4. XFAIL void_t test for GCC 5.1 and 5.2. Fixed in GCC 6.

Together, these should fix building clang 3.8.0 as part of building
world with recent versions of gcc (e.g. the devel/*-xtoolchain-gcc
ports).
2016-03-11 22:56:16 +00:00
Ed Maste
a87342e849 libelf: correct byte count in cross-endian note translation
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-03-11 22:37:12 +00:00
Bryan Drewery
6078c8e049 Add more casper leftover files.
Reported by:	jhb
2016-03-11 22:11:36 +00:00
Gleb Smirnoff
bb7dfe5e49 Allow minimum and maximum sweep size be the same.
Submitted by:	maxim
2016-03-11 21:06:17 +00:00
Oleksandr Tymoshenko
3b2bb13317 Make it possible for operations to refer to GPIO pins by name
- Try to guess what is provided as a pin spec for -t or for get/set
    operation: number or name. Fails in case of ambiguity.
- Add -p and -N switches to force pin specification interpretation:
    -p forces spec to be pin number, -N forces it to be name

Submitted by:	Emmanuel Vadot <manu@bidouilliste.com>
Differential Revision:	https://reviews.freebsd.org/D5201
2016-03-11 21:05:16 +00:00
Jean-Sébastien Pédron
645e6cf5cc drm/i915: Fix malloc type in i915_gem_object_bind_to_gtt()
drm_mm.c expects DRM_MEM_MM, not DRM_I915_GEM.
2016-03-11 21:00:14 +00:00
Dimitry Andric
163c8ab66f Pull in r246280 from upstream libc++ trunk (by Eric Fiselier):
Fix most GCC warnings during build. Only -Wattribute left.

This helps to fix a number of -Werror warnings when building world with
recent versions of gcc (e.g. the devel/*-xtoolchain-gcc ports).
2016-03-11 20:30:06 +00:00
Justin Hibbits
bf081e9948 Add to CFLAGS, rather than replacing.
This allows additional CFLAGS, as set in bsd.cpu.mk, to go through.
2016-03-11 20:04:32 +00:00
Bryan Drewery
dfb898bee2 Avoid MK_TESTS error on stable/10 by just preventing SUBDIR recursion. 2016-03-11 19:28:43 +00:00
Bryan Drewery
abaf3e4ee2 Avoid bmake upgrade NO_MAN warning by just setting MAN to empty.
Suggested by:	imp
2016-03-11 19:24:15 +00:00