]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMFhead @ r291345
ngie [Thu, 26 Nov 2015 01:05:54 +0000 (01:05 +0000)]
MFhead @ r291345

8 years agoReplace the retval.sh shell script with a native DTrace script.
gnn [Thu, 26 Nov 2015 00:53:39 +0000 (00:53 +0000)]
Replace the retval.sh shell script with a native DTrace script.

Suggested by: markj

8 years agoParseTrackInput: do not access beyond end of buffer.
sjg [Thu, 26 Nov 2015 00:26:23 +0000 (00:26 +0000)]
ParseTrackInput: do not access beyond end of buffer.

Reviewed by: dim

8 years agoSummary: A simple script to print the return value of any function,
gnn [Wed, 25 Nov 2015 22:59:41 +0000 (22:59 +0000)]
Summary: A simple script to print the return value of any function,
with or without wild cards.

8 years agoFollow-up r291338 to handle .d, .y and .l files better as well.
bdrewery [Wed, 25 Nov 2015 22:40:14 +0000 (22:40 +0000)]
Follow-up r291338 to handle .d, .y and .l files better as well.

X-MFC-With: r291338
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoFollow-up r291330: h_testbits.h is only needed by xdr_test.
bdrewery [Wed, 25 Nov 2015 22:33:25 +0000 (22:33 +0000)]
Follow-up r291330: h_testbits.h is only needed by xdr_test.

X-MFC-With: r291330
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoFix the "common object" handling to not depend on ".o" if SRCS only contains
bdrewery [Wed, 25 Nov 2015 22:32:16 +0000 (22:32 +0000)]
Fix the "common object" handling to not depend on ".o" if SRCS only contains
headers.

This resulted in 'don't know how to make .o.' errors after the changes in
r289286.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoLink fclose(3) to fdclose(3)
ngie [Wed, 25 Nov 2015 22:07:18 +0000 (22:07 +0000)]
Link fclose(3) to fdclose(3)

X-MFC with: r285140
MFC after: 3 weeks (need to evaluate whether or not r285140 can be MFCed)
Sponsored by: EMC / Isilon Storage Division

8 years agoFix building sys/modules/if_enc by adding missing headers
ngie [Wed, 25 Nov 2015 21:16:10 +0000 (21:16 +0000)]
Fix building sys/modules/if_enc by adding missing headers

X-MFC with: r291292, r291299 (if that ever happens)
Pointyhat to: ae

8 years agoRename Makefile.inc1 to dtrace.test.mk to avoid clash with top-level Makefile.inc1.
bdrewery [Wed, 25 Nov 2015 20:43:45 +0000 (20:43 +0000)]
Rename Makefile.inc1 to dtrace.test.mk to avoid clash with top-level Makefile.inc1.

Discussed with: ngie, markj
Sponsored by: EMC / Isilon Storage Division

8 years agoAvoid requiring 'make depend' here.
bdrewery [Wed, 25 Nov 2015 20:38:20 +0000 (20:38 +0000)]
Avoid requiring 'make depend' here.

Really this should not be a DPSRCS.  The acct_test.c should not #include
convert.c, but just link it in as a normal SRCS.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoReplace DPSRCS that work fine in SRCS.
bdrewery [Wed, 25 Nov 2015 20:38:17 +0000 (20:38 +0000)]
Replace DPSRCS that work fine in SRCS.

This is so that 'make depend' is not a required build step in these
files.

DPSRCS is overall unneeded.  DPSRCS already contains SRCS, so anything
which can safely be in SRCS should be.  DPSRCS is mostly just a way to
generate files that should not be linked into the final PROG/LIB.  For
headers and grammars it is safe for them to be in SRCS since they will
be excluded during linking and installation.

The only remaining uses of DPSRCS are for generating .c or .o files that
must be built before 'make depend' can run 'mkdep' on the SRCS c files
list.  A semi-proper example is in tests/sys/kern/acct/Makefile where a
checked-in .c file has an #include on a generated .c file.  The
generated .c file should not be linked into the final PROG though since
it is #include'd.  The more proper way here is just to build/link it in
though without DPSRCS.  Another example is in sys/modules/linux/Makefile
where a shell script runs to parse a DPSRCS .o file that should not be
linked into the module.  Beyond those, the need for DPSRCS is largely
unneeded, redundant, and forces 'make depend' to be ran.  Generally,
these Makefiles should avoid the need for DPSRCS and define proper
dependencies for their files as well.

An example of an improper usage and why this matters is in usr.bin/netstat.
nl_defs.h was only in DPSRCS and so was not generated during 'make all',
but only during 'make depend'.  The files including it lacked proper
depenencies on it, which forced running 'make depend' to workaround that
bug.  The 'make depend' target should mostly be used for incremental build
help, not to produce a working build.  This specific example was broken in
the meta build until r287905 since it does not run 'make depend'.

The gnu/lib/libreadline/readline case is fine since bsd.lib.mk has 'OBJS:
SRCS:M*.h' when there is no .depend file.

Sponsored by: EMC / Isilon Storage Division
MFC after: 1 week

8 years agoRemove redundant DPSRCS which were already in SRCS.
bdrewery [Wed, 25 Nov 2015 20:38:07 +0000 (20:38 +0000)]
Remove redundant DPSRCS which were already in SRCS.

DPSRCS already contains all of SRCS.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoHave syslogd honor 'mesg' status when logging to users.
lidl [Wed, 25 Nov 2015 20:01:11 +0000 (20:01 +0000)]
Have syslogd honor 'mesg' status when logging to users.

PR: bin/196742
Submitted by: jef at mail acme com
Approved by: rpaulo (mentor)
Differential Revision: https://reviews.freebsd.org/D4270

8 years agoDefine a LIB<NAME>DIR for every library that LIBADD provides.
bdrewery [Wed, 25 Nov 2015 19:49:55 +0000 (19:49 +0000)]
Define a LIB<NAME>DIR for every library that LIBADD provides.

This is going to be used to allow DIRDEPS to be bootstrapped off of
LIBADD/DPADD.  It currently works for internal libraries which have a
DIR defined for them but also use the .a library from a src-mapped obj
directory.  It can also be useful for using -L without a --sysroot per
LIBADD to use the OBJDIR version of the libraries.

I didn't review every LIBADD, so it is possible this is missing some.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix spelling error.
bdrewery [Wed, 25 Nov 2015 19:48:09 +0000 (19:48 +0000)]
Fix spelling error.

8 years agoMETA MODE: Avoid dirdep dependency on lib/libmd.
bdrewery [Wed, 25 Nov 2015 19:45:04 +0000 (19:45 +0000)]
META MODE: Avoid dirdep dependency on lib/libmd.

This avoids using the staged headers for sys/crypto/sha2/*.h, such as sha256.h,
which added an unneeded pre-build dependency on libmd to libcrypt.  This
header is an INCS in lib/libmd, but found via .PATH in sys/crypto/sha2.
Since the libcrypt build was already using the in-src libmd headers
directly, just teach it how to find the sha256.h header as well.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Fix MACHINE=host builds.
bdrewery [Wed, 25 Nov 2015 19:45:01 +0000 (19:45 +0000)]
META MODE: Fix MACHINE=host builds.

We need to not use -nostdinc since it breaks building of clang itself.  Use
-isystem rather than -I/usr/include and -nostdinc which gets us using
the stage include directory before searching the real host headers.
This allows removing more of the -I hacks to get host headers since the
headers are no longer excluded.  The -B seemed unneeded.

This fixes building of secure/lib/libcrypto which was looking at the
/usr/include/openssl/asn1.h header rather than the staged one.

This fixes building of clang which wants to find its own internal
headers in the STAGEDIR/usr/lib/clang/* path.

Sponsored by: EMC / Isilon Storage Division

8 years agoStop looking up the same id(1) results in sub-makes.
bdrewery [Wed, 25 Nov 2015 19:44:58 +0000 (19:44 +0000)]
Stop looking up the same id(1) results in sub-makes.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Remove unneeded libmd.host dependency for xinstall.host.
bdrewery [Wed, 25 Nov 2015 19:44:55 +0000 (19:44 +0000)]
META MODE: Remove unneeded libmd.host dependency for xinstall.host.

This is chasing r291026.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Fix 'make bootstrap-tools'.
bdrewery [Wed, 25 Nov 2015 19:44:51 +0000 (19:44 +0000)]
META MODE: Fix 'make bootstrap-tools'.

The main problem was bitrot after elftoolchain being swapped in for the
GNU toolchain.

This also reworks how the list of 'host allowed' libraries is determined
to only allow INTERNALLIBs, which is needed for libelftc to come in.

For usr.bin/readelf use the same hack, as libelf and libdward, to bring in
the needed sys/ headers for host builds.  This has not yet been a problem due
to readelf not being built as a host tool in buildworld.  This is possible
in the meta build though when building the toolchain.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Don't create .meta files when symlinking sources into the obj directory.
bdrewery [Wed, 25 Nov 2015 19:44:43 +0000 (19:44 +0000)]
META MODE: Don't create .meta files when symlinking sources into the obj directory.

Tracking these leads to situations where meta mode will consider the
file to be out of date if /bin/sh or /bin/ln are newer than the source
file.  There's no reason for meta mode to do this as make is already
handling the rebuild dependency fine.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Add more hosttools needed pre-universe.
bdrewery [Wed, 25 Nov 2015 19:44:34 +0000 (19:44 +0000)]
META MODE: Add more hosttools needed pre-universe.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Show PATH on errors.
bdrewery [Wed, 25 Nov 2015 19:44:31 +0000 (19:44 +0000)]
META MODE: Show PATH on errors.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Need to include the LEGACY_TOOLS directories into PATH.
bdrewery [Wed, 25 Nov 2015 19:44:28 +0000 (19:44 +0000)]
META MODE: Need to include the LEGACY_TOOLS directories into PATH.

This is just as Makefile.inc1 does it for these phases.  Otherwise some
of the build tools are not found and used properly, such as 'make-roken'
in the kerberos5 build on older releases.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Don't add staged DPADDs to DIRDEPS when bootstrapping gendirdeps.
bdrewery [Wed, 25 Nov 2015 19:13:45 +0000 (19:13 +0000)]
META MODE: Don't add staged DPADDs to DIRDEPS when bootstrapping gendirdeps.

This was finding libraries that were installed into DESTDIR/usr/lib,
where DESTDIR is the stage directory, and then adding in usr/lib to
DIRDEPS.  Just exclude the STAGE_ROOT if defined.

Discussed with: sjg
Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Define variables this file uses that were defined elsewhere.
bdrewery [Wed, 25 Nov 2015 19:13:42 +0000 (19:13 +0000)]
META MODE: Define variables this file uses that were defined elsewhere.

Discussed with: sjg
Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Don't truncate DIRDEPS for bootstrapping during gendirdeps.
bdrewery [Wed, 25 Nov 2015 19:13:39 +0000 (19:13 +0000)]
META MODE: Don't truncate DIRDEPS for bootstrapping during gendirdeps.

Reviewed by: sjg
Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Rework circular dependency guard for librtld_db/libproc.
bdrewery [Wed, 25 Nov 2015 19:13:35 +0000 (19:13 +0000)]
META MODE: Rework circular dependency guard for librtld_db/libproc.

librtld_db only needs libutil.h to build, not the libproc library.  So
it can safely use its header and allow libproc to depend on librtld_rb
to be built first to link.  This is required after fixing ld --sysroot
in r291226.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Revert r287879 so that 'make -V' still uses AUTO_OBJ.
bdrewery [Wed, 25 Nov 2015 19:13:32 +0000 (19:13 +0000)]
META MODE: Revert r287879 so that 'make -V' still uses AUTO_OBJ.

This has caused much confusion for myself as there are quite a lot of
variables that depend on having a proper ${.OBJDIR}.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Fix 'make the-lot' with recent locale changes
bdrewery [Wed, 25 Nov 2015 19:13:28 +0000 (19:13 +0000)]
META MODE: Fix 'make the-lot' with recent locale changes

Sponsored by: EMC / Isilon Storage Division

8 years agoStop building vers.c in include/ and only build the needed osreldate.h.
bdrewery [Wed, 25 Nov 2015 19:10:59 +0000 (19:10 +0000)]
Stop building vers.c in include/ and only build the needed osreldate.h.

Because of how osreldate.h was being built with newvers.sh, which always
spat out a vers.c dependent on SVN or git, the meta mode build was
considering osreldate.h to depend on the current git or SVN index.  This
would lead to entire tree rebuilds when modifying git's index.  There's
no reason to be generating vers.c here so just skip it.

While here, in mk-osreldate.sh rename PARAM_H to proper PARAMFILE (which
newvers.sh already has a default for) and remove unneeded export.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Avoid creating TESTS directories for bootstrap.
bdrewery [Wed, 25 Nov 2015 19:10:56 +0000 (19:10 +0000)]
META MODE: Avoid creating TESTS directories for bootstrap.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Don't override DESTDIR to the default when building the toolchain.
bdrewery [Wed, 25 Nov 2015 19:10:53 +0000 (19:10 +0000)]
META MODE: Don't override DESTDIR to the default when building the toolchain.

For this case, the normal META MODE staging logic should be used.  The
BSARGS having DESTDIR= is due to Makefile.inc1 overriding DESTDIR to
something when appropriate.  For the toolchain stage META MODE is in charge of
it, not Makefile.inc1.

At least include/, if staging it to the host stagedir, was impacted from
this.  Staging of include.host is not yet done.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.
bdrewery [Wed, 25 Nov 2015 19:10:28 +0000 (19:10 +0000)]
META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.

This both avoids some dependencies on xinstall.host and allows
bootstrapping on older releases to work due to lack of at least 'install -l'
support.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix tmpfs(5) '/tmp' mount point.
gjb [Wed, 25 Nov 2015 19:10:04 +0000 (19:10 +0000)]
Fix tmpfs(5) '/tmp' mount point.

A stray trailing space snuck in with one of the recent
changes, making r290550 and r290573 effectively no-op.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

8 years agoMETA MODE: Remove bin/cat.host dependency.
bdrewery [Wed, 25 Nov 2015 18:37:42 +0000 (18:37 +0000)]
META MODE: Remove bin/cat.host dependency.

This likely slipped in during early testing; local.dirdeps.mk always
excludes bin/cat.host now.

Sponsored by: EMC / Isilon Storage Division

8 years ago[ath] listen to all beacons in IBSS and software beacon miss.
adrian [Wed, 25 Nov 2015 18:24:49 +0000 (18:24 +0000)]
[ath] listen to all beacons in IBSS and software beacon miss.

I added MYBEACON support a while ago to listen to beacons that are only
for your configured BSSID.  For AR9380 and later NICs this results in
a lot less chip wakeups in station mode as it then only shows you beacons
that are destined to you.

However in IBSS mode you really do want to hear all beacons so you can do
IBSS merges.  Oops.

So only use MYBEACON for STA + not-scanning, and just use BEACON for
the other modes it used to use BEACON for.

This doesn't completely fix IBSS merges though - there are still some
conditions to chase down and fix.

8 years ago[net80211] log the A-MPDU setup attempt count as part of debugging.
adrian [Wed, 25 Nov 2015 18:16:42 +0000 (18:16 +0000)]
[net80211] log the A-MPDU setup attempt count as part of debugging.

I've seen some cases where we get stuck in a loop constantly trying to
negotiate A-MPDU TX which is definitely not supposed to happen.
This will let me see if it's something funky with the retry count or
not.

8 years agoUpdate usage:
hselasky [Wed, 25 Nov 2015 14:51:44 +0000 (14:51 +0000)]
Update usage:
- Add missing description of "-c" option.
- Add one more usage example.

8 years agoThe r241129 description was wrong that the scenario is possible
fabient [Wed, 25 Nov 2015 14:45:43 +0000 (14:45 +0000)]
The r241129 description was wrong that the scenario is possible
only for read locks on pcbs. The same race can happen with write
lock semantics as well.

The race scenario:

- Two threads (1 and 2) locate pcb with writer semantics (INPLOOKUP_WLOCKPCB)
 and do in_pcbref() on it.
- 1 and 2 both drop the inp hash lock.
- Another thread (3) grabs the inp hash lock. Then it runs in_pcbfree(),
 which wlocks the pcb. They must happen faster than 1 or 2 come INP_WLOCK()!
- 1 and 2 congest in INP_WLOCK().
- 3 does in_pcbremlists(), drops hash lock, and runs in_pcbrele_wlocked(),
 which doesn't free the pcb due to two references on it.
 Then it unlocks the pcb.
- 1 (or 2) gets wlock on the pcb, runs in_pcbrele_wlocked(), which doesn't
 report inp as freed, due to 2 (or 1) still helding extra reference on it.
 The thread tries to do smth with a disconnected pcb and crashes.

Submitted by: emeric.poupon@stormshield.eu
Reviewed by: gleb@
MFC after: 1 week
Sponsored by: Stormshield
Tested by: Cassiano Peixoto, Stormshield

8 years agoAdd simple indent wrapper tool for style(9) checking GIT/SVN patches.
hselasky [Wed, 25 Nov 2015 13:26:42 +0000 (13:26 +0000)]
Add simple indent wrapper tool for style(9) checking GIT/SVN patches.
The indent_wrapper tool only accepts full context diffs and works by
identifying the surrounding C-block touched by a diff and passing only
that to indent for styling. In the end a diff is produced or an
external tool like meld can be invoked, to show the styling
differences.

8 years agoFix the build.
ae [Wed, 25 Nov 2015 11:31:07 +0000 (11:31 +0000)]
Fix the build.

8 years agoFix udp entry of `netstat -TW'.
ume [Wed, 25 Nov 2015 11:20:54 +0000 (11:20 +0000)]
Fix udp entry of `netstat -TW'.

8 years agoLink localeconv(3) to localeconv_l(3)
ngie [Wed, 25 Nov 2015 09:12:30 +0000 (09:12 +0000)]
Link localeconv(3) to localeconv_l(3)

MFC after: 3 days

8 years agoOverhaul if_enc(4) and make it loadable in run-time.
ae [Wed, 25 Nov 2015 07:31:59 +0000 (07:31 +0000)]
Overhaul if_enc(4) and make it loadable in run-time.

Use hhook(9) framework to achieve ability of loading and unloading
if_enc(4) kernel module. INET and INET6 code on initialization registers
two helper hooks points in the kernel. if_enc(4) module uses these helper
hook points and registers its hooks. IPSEC code uses these hhook points
to call helper hooks implemented in if_enc(4).

8 years agoCheck that hhk_helper pointer isn't NULL before access.
ae [Wed, 25 Nov 2015 07:14:58 +0000 (07:14 +0000)]
Check that hhk_helper pointer isn't NULL before access.

It isn't forbidden to use NULL pointer for hook_helper in hookinfo
structure when hhook_add_hook() adds new helper hook.

8 years agoHook sbin/geom/class/tests in to the build
ngie [Wed, 25 Nov 2015 04:13:28 +0000 (04:13 +0000)]
Hook sbin/geom/class/tests in to the build

8 years agoMake sure TMPDIR is exported so /tmp is guaranteed to be defined for mktemp
ngie [Wed, 25 Nov 2015 04:12:08 +0000 (04:12 +0000)]
Make sure TMPDIR is exported so /tmp is guaranteed to be defined for mktemp

8 years agoMove the mntpoint definition down so the mktemp call get get a temporary directory...
ngie [Wed, 25 Nov 2015 04:11:25 +0000 (04:11 +0000)]
Move the mntpoint definition down so the mktemp call get get a temporary directory under $TMPDIR instead of the current directory

8 years agoRemove all explicit references to $TMPDIR
ngie [Wed, 25 Nov 2015 04:10:03 +0000 (04:10 +0000)]
Remove all explicit references to $TMPDIR

8 years agoRemove braces around us0, us1, and us2 in gmirror label operation
ngie [Wed, 25 Nov 2015 04:07:31 +0000 (04:07 +0000)]
Remove braces around us0, us1, and us2 in gmirror label operation

8 years agoProbe for the first available ggate(4) device
ngie [Wed, 25 Nov 2015 04:01:13 +0000 (04:01 +0000)]
Probe for the first available ggate(4) device

8 years agoconf.sh:
ngie [Wed, 25 Nov 2015 03:57:58 +0000 (03:57 +0000)]
conf.sh:
- Implement gconcat_test_cleanup
- Use a random name for the shsec

1_test.sh/2_test.sh:
- Attach md devices with attach_md
- Remove unnecessary mdconfig -d -u and gconcat destroy calls at the end
  of the scripts

8 years agoconf.sh:
ngie [Wed, 25 Nov 2015 03:53:14 +0000 (03:53 +0000)]
conf.sh:
- Implement gnop_test_cleanup
- Use a random name for the shsec

1_test.sh/2_test.sh:
- Attach md devices with attach_md
- Remove unnecessary mdconfig -d -u and gstripe destroy calls at the end
  of the scripts

8 years agoProbe for the first available md unit number instead of hardcoding 45
ngie [Wed, 25 Nov 2015 03:46:49 +0000 (03:46 +0000)]
Probe for the first available md unit number instead of hardcoding 45

Detach/mdconfig -d -u at the end of the test consistently

8 years agoconf.sh:
ngie [Wed, 25 Nov 2015 02:24:08 +0000 (02:24 +0000)]
conf.sh:
- Implement gshsec_test_cleanup
- Use a random name for the shsec

1_test.sh/2_test.sh:
- Attach md devices with attach_md
- Remove unnecessary mdconfig -d -u and gstripe destroy calls at the end
  of the scripts

8 years agoNTB: WC/WB isn't enough; set MMR region as UC
cem [Wed, 25 Nov 2015 01:59:08 +0000 (01:59 +0000)]
NTB: WC/WB isn't enough; set MMR region as UC

And expose vm_memattr_t of current mapping to consumers (as well as the
ability to change it to one of UC, WB, WC).

After short discussion with: jhb (but no review)
Sponsored by: EMC / Isilon Storage Division

8 years ago- Attach md devices with attach_md
ngie [Wed, 25 Nov 2015 01:29:46 +0000 (01:29 +0000)]
- Attach md devices with attach_md
- Remove unnecessary mdconfig -d -u and gstripe destroy calls at the end
  of the scripts

8 years ago- Implement gstripe_test_cleanup
ngie [Wed, 25 Nov 2015 01:27:51 +0000 (01:27 +0000)]
- Implement gstripe_test_cleanup
- Use a random name for the gstripe

8 years ago- Convert 1_test into a TAP testcase
ngie [Wed, 25 Nov 2015 01:15:25 +0000 (01:15 +0000)]
- Convert 1_test into a TAP testcase
- Use conf.sh
- Simplify the setup/cleanup steps

8 years agoAdd conf.sh for creating a mountpoint, unmounting the mountpoint and cleaning up...
ngie [Wed, 25 Nov 2015 01:14:00 +0000 (01:14 +0000)]
Add conf.sh for creating a mountpoint, unmounting the mountpoint and cleaning up any temporary md devices

8 years agoRemove useless test
ngie [Wed, 25 Nov 2015 00:52:10 +0000 (00:52 +0000)]
Remove useless test

8 years agoMove 1 to 1_test and 2 to 2_test
ngie [Wed, 25 Nov 2015 00:33:42 +0000 (00:33 +0000)]
Move 1 to 1_test and 2 to 2_test

8 years agoRemove `graid3 stop $name`
ngie [Wed, 25 Nov 2015 00:17:56 +0000 (00:17 +0000)]
Remove `graid3 stop $name`

8 years agoImplement graid3_test_cleanup, which calls graid3 stop $name, then
ngie [Wed, 25 Nov 2015 00:17:25 +0000 (00:17 +0000)]
Implement graid3_test_cleanup, which calls graid3 stop $name, then
geom_test_cleanup

8 years ago- Allocate random devices via attach_md
ngie [Wed, 25 Nov 2015 00:12:13 +0000 (00:12 +0000)]
- Allocate random devices via attach_md
- Replace hardcoded references to /tmp with $TMPDIR
- Remove all manual mdconfig -d -u calls

8 years agoLoad geom_gate.ko via kldload as `[geom ]gate load` isn't implemented.
ngie [Tue, 24 Nov 2015 23:45:38 +0000 (23:45 +0000)]
Load geom_gate.ko via kldload as `[geom ]gate load` isn't implemented.
Every time geom_subr.sh tries to run the command, it'll fail

8 years agoAdd -F pidfile to usage(..)
ngie [Tue, 24 Nov 2015 23:44:06 +0000 (23:44 +0000)]
Add -F pidfile to usage(..)

8 years agosh: Remove global state from nodes.c.
jilles [Tue, 24 Nov 2015 22:47:19 +0000 (22:47 +0000)]
sh: Remove global state from nodes.c.

No functional change is intended.

8 years agoCorrect the number of DTLB entries reported for the CPUID Leaf 2
kib [Tue, 24 Nov 2015 19:55:11 +0000 (19:55 +0000)]
Correct the number of DTLB entries reported for the CPUID Leaf 2
descriptor 0x6c.

Confirmed by: Intel
MFC after: 3 days

8 years agoRename ASYNC_LIP_F8 to ASYNC_LIP_NOS_OLS_RECV.
mav [Tue, 24 Nov 2015 19:20:49 +0000 (19:20 +0000)]
Rename ASYNC_LIP_F8 to ASYNC_LIP_NOS_OLS_RECV.

New name better repsents its meaning for modern chips.

8 years agourtwn(4): rework ROM reading.
avos [Tue, 24 Nov 2015 19:20:45 +0000 (19:20 +0000)]
urtwn(4): rework ROM reading.

- Add error handling for urtwn_(r88e_)read_rom() and
urtwn_efuse_*() functions.
- Remove code duplication between urtwn_efuse_read() and
urtwn_r88e_read_rom().
- Merge r88e_rom and (r92c_)rom structures
(only one of them can be used at the same time).
- Other minor fixes / improvements.

Tested with RTL8188EU, STA mode
(URTWN_DEBUG + USB_DEBUG, hw.usb.urtwn.debug=3, no visual differences).

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4253

8 years agontb: Add MW tunable for MMR Xeon errata workaround
cem [Tue, 24 Nov 2015 18:51:17 +0000 (18:51 +0000)]
ntb: Add MW tunable for MMR Xeon errata workaround

Adds a new tunable, ntb.hw.b2b_mw_idx, which specifies the offset (from the
total number of memory windows) to use for register access on hardware with
the SDOORBELL_LOCKUP errata.  The default is -1, i.e., the last memory
window.

We map BARs before the b2b_mw_idx is selected, so map them all as memory
windows initially.  The register memory window should not be write-combined,
so we explicitly disable WC on the selected MW later.

This introduces a layer of abstraction between consumer memory window
indices, which exclude any exclusive errata-workaround BARs, and internal
memory window indices, which include such BARs.  An internal routine,
ntb_user_mw_to_idx(), converts the former to the latter.  Public APIs have
been updated to use this instead of assuming the exclusive workaround BAR is
the last available MW.

Sponsored by: EMC / Isilon Storage Division

8 years agoUse what we really mean (powerpc_lwsync()) rather than the Linux-compat
nwhitehorn [Tue, 24 Nov 2015 16:10:21 +0000 (16:10 +0000)]
Use what we really mean (powerpc_lwsync()) rather than the Linux-compat
mb() here and provide some more documentation on what, exactly, makes this
code safe.

Requested by and discussed with: kib, alc

8 years agoRevert inadvertent commit of an incorrect patch
des [Tue, 24 Nov 2015 16:07:03 +0000 (16:07 +0000)]
Revert inadvertent commit of an incorrect patch

8 years agoRemove description of the now-defunct NoneEnabled option.
des [Tue, 24 Nov 2015 16:06:15 +0000 (16:06 +0000)]
Remove description of the now-defunct NoneEnabled option.

8 years agoCorrect alignment of the addresses in the `netstat -aW' output.
ume [Tue, 24 Nov 2015 14:25:40 +0000 (14:25 +0000)]
Correct alignment of the addresses in the `netstat -aW' output.

8 years agoFlush all kernel mappings from TLB(s) in time when they are cleared.
skra [Tue, 24 Nov 2015 13:57:41 +0000 (13:57 +0000)]
Flush all kernel mappings from TLB(s) in time when they are cleared.
Replace tlb_flush_local() by tlb_flush() as even not global mappings
could be fetched to TLB(s) on other cores by speculative table walk.

From OS point of view, it was not a problem as either such mappings
were not used anymore or they were flushed from TLB(s) when reused.
However, from hardware point of view, it was a problem. Not flushed
mappings could be a target for speculative reads or prefetches (which
might be quite aggresive on ARM cores). As speculative read can fill
cacheline, it can cause a real problem, when physical page is reused,
but mapped with different memory attributes.

Anyhow, it's good to have only valid mappings in TLB(s).

Approved by: kib (mentor)

8 years agoAdd myself (lidl) to the calendar.freebsd file.
lidl [Tue, 24 Nov 2015 13:47:21 +0000 (13:47 +0000)]
Add myself (lidl) to the calendar.freebsd file.

Approved by: rpaulo (mentor)
Differential Revision: https://reviews.freebsd.org/D4264

8 years agoAdd some defines needed by the coming mlx5 infiniband support.
hselasky [Tue, 24 Nov 2015 12:11:56 +0000 (12:11 +0000)]
Add some defines needed by the coming mlx5 infiniband support.

Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoAdd missing error check after xo_parse_args() in netstat(8).
ume [Tue, 24 Nov 2015 11:07:37 +0000 (11:07 +0000)]
Add missing error check after xo_parse_args() in netstat(8).

Submitted by: Oliver Pinter
Differential Revision: https://reviews.freebsd.org/D4233

8 years agoAdd support for moving the DMAP range. This is needed as some AMD SoCs
andrew [Tue, 24 Nov 2015 11:01:43 +0000 (11:01 +0000)]
Add support for moving the DMAP range. This is needed as some AMD SoCs
place physical memory at an address outside the old DMAP range. This is an
issue as we rely on being able to move from PA -> VA using this range.

Obtained from: Patrick Wildt <patrick@bitrig.org> (earlier version)
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D3885

8 years agoIncrease the timeout for onetime_test and onetime_a_test to 10 minutes
ngie [Tue, 24 Nov 2015 09:52:46 +0000 (09:52 +0000)]
Increase the timeout for onetime_test and onetime_a_test to 10 minutes

8 years agoRework the vnode cache recycling to meet free and unused vnodes
kib [Tue, 24 Nov 2015 09:45:36 +0000 (09:45 +0000)]
Rework the vnode cache recycling to meet free and unused vnodes
targets.  See the comment above wantfreevnodes variable for the
description of the algorithm.

The vfs.vlru_alloc_cache_src sysctl is removed.  New code frees
namecache sources as the last chance to satisfy the highest watermark,
instead of selecting the source vnodes randomly. This provides good
enough behaviour to keep vn_fullpath() working in most situations.
The filesystem layout with deep trees, where the removed knob was
required, is thus handled automatically.

Submitted by: bde
Discussed with: mckusick
Tested by: pho
MFC after: 1 month

8 years agoOn PowerPC 64bit, the linux-compat mb() definition is implemented with
kib [Tue, 24 Nov 2015 09:13:21 +0000 (09:13 +0000)]
On PowerPC 64bit, the linux-compat mb() definition is implemented with
lwsync instruction, which does not provide Store/Load barrier.  Fix
this by using "full" sync barrier for mb().

atomic_store_rel() does not need full barrier, change mb() call there
to the lwsync instruction if not hitting the known CPU erratas
(i.e. on 32bit).  Provide powerpc_lwsync() helper to isolate the
lwsync/sync compile time selection, and use it in atomic_store_rel()
and several other places which duplicate the code.

Noted by: alc
Reviewed and tested by: nwhitehorn
Sponsored by: The FreeBSD Foundation

8 years agoDo some incremental work trying to improve the test script
ngie [Tue, 24 Nov 2015 09:08:31 +0000 (09:08 +0000)]
Do some incremental work trying to improve the test script

Unfortunately it seems that phk broke how labels/partitions were created
in r113434 and the gap was never completed, so these testcases are broken.

Exit early

8 years agoCatch relevant errors
ngie [Tue, 24 Nov 2015 09:05:28 +0000 (09:05 +0000)]
Catch relevant errors

8 years agoAdd dependency to uether.
kevlo [Tue, 24 Nov 2015 08:34:48 +0000 (08:34 +0000)]
Add dependency to uether.

Reviewed by: hselasky

8 years ago- Account for stripesize/stripeoffset in diskinfo output
ngie [Tue, 24 Nov 2015 07:55:55 +0000 (07:55 +0000)]
- Account for stripesize/stripeoffset in diskinfo output
- Remove c partitions from output (/dev/md32c was an alias for
  /dev/md32 that was deprecated in 8.x)

8 years agoMFhead @ r291235
ngie [Tue, 24 Nov 2015 05:12:40 +0000 (05:12 +0000)]
MFhead @ r291235

8 years agoRemove unneeded libutil dependency for sendmail.
bdrewery [Tue, 24 Nov 2015 04:19:55 +0000 (04:19 +0000)]
Remove unneeded libutil dependency for sendmail.

It included libutil.h for setproctitle(3), which was moved from libutil to libc
in r65353 in 2000.

Reviewed by: gshapiro [sendmail change]
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4261

8 years agobc(1): Fix memory corruption issues
pfg [Tue, 24 Nov 2015 04:15:13 +0000 (04:15 +0000)]
bc(1): Fix memory corruption issues

Fix crashes and hangs found by AFL.
Improve handling of non-ascii chars.

Obtained from: OpenBSD (CVS rev 1.49)

8 years ago[ath] migrate ioctl and busdma memory operations out into separate source files.
adrian [Tue, 24 Nov 2015 03:42:58 +0000 (03:42 +0000)]
[ath] migrate ioctl and busdma memory operations out into separate source files.

This should be a big no-op pass; and reduces the size of if_ath.c.

I'm hopefully soon going to take a whack at the USB support for ath(4)
and this'll require some reuse of the busdma memory code.

8 years agoCompute the median of the data set as the midpoint between the two middle
araujo [Tue, 24 Nov 2015 02:30:59 +0000 (02:30 +0000)]
Compute the median of the data set as the midpoint between the two middle
values when the data set has an even number of elements.

PR: 201582
Submitted by: Marcus Reid <marcus@blazingdot.com>
Reviewed by: imp
Approved by: bapt (mentor)

8 years agoConnect ypldap(8) to the build.
araujo [Tue, 24 Nov 2015 02:27:59 +0000 (02:27 +0000)]
Connect ypldap(8) to the build.

Approved by: bapt (mentor)

8 years agoFix ld not respecting --sysroot.
bdrewery [Tue, 24 Nov 2015 00:49:29 +0000 (00:49 +0000)]
Fix ld not respecting --sysroot.

ld(1) uses the /usr/libdata/ldscripts when linking. These scripts add in the
default search paths of /lib and /usr/lib via 'SEARCH_DIR("DIR")'. These
need to be prefixed by '=' so that the --sysroot flag is respected. This
is not a problem with buildworld since the TOOLS_PREFIX is baked into the
cross-ld. However it is a problem when trying to use ld(1) with --sysroot
anywhere else as it ends up still reading /lib and /usr/lib despite --sysroot.

The default --sysroot (TARGET_SYSTEM_ROOT) is '/' for /usr/bin/ld.

I found this while building with META MODE with uses only --sysroot with
/usr/bin/ld, and found that libraries that I had not built in its sysroot
directory were leaking in. This didn't happen with ports binutils either.  This
would also impact external compiler support.

Reviewed by: bapt, brooks
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4262

8 years agoAdd a new -B flag for use with list mode (-l) that lists details about
jhb [Mon, 23 Nov 2015 23:48:07 +0000 (23:48 +0000)]
Add a new -B flag for use with list mode (-l) that lists details about
bridges.  Currently this includes information about what resources a
bridge decodes on the upstream side for use by downstream devices including
bus numbers, I/O port resources, and memory resources.  Windows and bus
ranges are enumerated for both PCI-PCI bridges and PCI-CardBus bridges.

To simplify the implementation, all enumeration is done by reading the
appropriate config space registers directly rather than querying the
bridge driver in the kernel via new ioctls.  This does result in a few
limitations.

First, an unimplemented window in a PCI-PCI bridge cannot be accurately
detected as accurate detection requires writing to the window base
register.  That is not safe for pciconf(8).  Instead, this assumes that
any window where both the base and limit read as all zeroes is
unimplemented.

Second, the PCI-PCI bridge driver in a tree has a few quirks for
PCI-PCI bridges that use subtractive decoding but do not indicate that
via the progif config register.  The list of quirks is duplicated in
pciconf's source.

Reviewed by: imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4171

8 years agocolldef(1) and mklocale(1) reappeared in r291115.
jkim [Mon, 23 Nov 2015 23:36:57 +0000 (23:36 +0000)]
colldef(1) and mklocale(1) reappeared in r291115.

8 years agoThere seems to be no reason to duplicate CANONICALOBJDIR logic from bsd.obj.mk,
bdrewery [Mon, 23 Nov 2015 23:04:52 +0000 (23:04 +0000)]
There seems to be no reason to duplicate CANONICALOBJDIR logic from bsd.obj.mk,
which is included for crunchgen builds.

No change in build output occurred with this change.

Sponsored by: EMC / Isilon Storage Division