Commit Graph

206090 Commits

Author SHA1 Message Date
Bryan Drewery
277fbb92d5 Remove redundant DPSRCS which were already in SRCS.
DPSRCS already contains all of SRCS.

MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-11-25 20:38:07 +00:00
Kurt Lidl
247027652e 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
2015-11-25 20:01:11 +00:00
Bryan Drewery
ebf076dfa5 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
2015-11-25 19:49:55 +00:00
Bryan Drewery
f198d81722 Fix spelling error. 2015-11-25 19:48:09 +00:00
Bryan Drewery
c2a55defd7 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
2015-11-25 19:45:04 +00:00
Bryan Drewery
2802302e64 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
2015-11-25 19:45:01 +00:00
Bryan Drewery
cf10dd450d Stop looking up the same id(1) results in sub-makes.
Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:44:58 +00:00
Bryan Drewery
5a0d38b3aa META MODE: Remove unneeded libmd.host dependency for xinstall.host.
This is chasing r291026.

Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:44:55 +00:00
Bryan Drewery
4aa63711a7 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
2015-11-25 19:44:51 +00:00
Bryan Drewery
b791fbe630 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
2015-11-25 19:44:43 +00:00
Bryan Drewery
a2d333f340 META MODE: Add more hosttools needed pre-universe.
Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:44:34 +00:00
Bryan Drewery
80dfd0d4a2 META MODE: Show PATH on errors.
Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:44:31 +00:00
Bryan Drewery
0695a3bcd6 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
2015-11-25 19:44:28 +00:00
Bryan Drewery
08b20c637c 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
2015-11-25 19:13:45 +00:00
Bryan Drewery
5e2f7161d7 META MODE: Define variables this file uses that were defined elsewhere.
Discussed with:	sjg
Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:13:42 +00:00
Bryan Drewery
02d37cd3e4 META MODE: Don't truncate DIRDEPS for bootstrapping during gendirdeps.
Reviewed by:	sjg
Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:13:39 +00:00
Bryan Drewery
db548a6148 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
2015-11-25 19:13:35 +00:00
Bryan Drewery
bb8cd0c6f0 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
2015-11-25 19:13:32 +00:00
Bryan Drewery
393608176b META MODE: Fix 'make the-lot' with recent locale changes
Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:13:28 +00:00
Bryan Drewery
8e8319a68d 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
2015-11-25 19:10:59 +00:00
Bryan Drewery
24b1e7f11d META MODE: Avoid creating TESTS directories for bootstrap.
Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:10:56 +00:00
Bryan Drewery
1db83e6350 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
2015-11-25 19:10:53 +00:00
Bryan Drewery
7b3ea376a2 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
2015-11-25 19:10:28 +00:00
Glen Barber
a9bf704474 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
2015-11-25 19:10:04 +00:00
Bryan Drewery
cd209ea8c1 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
2015-11-25 18:37:42 +00:00
Adrian Chadd
94a88508a5 [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.
2015-11-25 18:24:49 +00:00
Adrian Chadd
75426752f5 [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.
2015-11-25 18:16:42 +00:00
Hans Petter Selasky
b35ff88448 Update usage:
- Add missing description of "-c" option.
- Add one more usage example.
2015-11-25 14:51:44 +00:00
Fabien Thomas
edd0e0b098 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
2015-11-25 14:45:43 +00:00
Hans Petter Selasky
10ac20335c 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.
2015-11-25 13:26:42 +00:00
Andrey V. Elsukov
03b7b4bf05 Fix the build. 2015-11-25 11:31:07 +00:00
Hajimu UMEMOTO
0eaa116e1e Fix udp entry of `netstat -TW'. 2015-11-25 11:20:54 +00:00
Enji Cooper
0b5cc81d3b Link localeconv(3) to localeconv_l(3)
MFC after: 3 days
2015-11-25 09:12:30 +00:00
Andrey V. Elsukov
ef91a9765d 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).
2015-11-25 07:31:59 +00:00
Andrey V. Elsukov
0991fe0117 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.
2015-11-25 07:14:58 +00:00
Conrad Meyer
c4492f4758 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
2015-11-25 01:59:08 +00:00
Jilles Tjoelker
a83f6e1ad9 sh: Remove global state from nodes.c.
No functional change is intended.
2015-11-24 22:47:19 +00:00
Konstantin Belousov
2a8a46b161 Correct the number of DTLB entries reported for the CPUID Leaf 2
descriptor 0x6c.

Confirmed by:	Intel
MFC after:	3 days
2015-11-24 19:55:11 +00:00
Alexander Motin
e2929f5f91 Rename ASYNC_LIP_F8 to ASYNC_LIP_NOS_OLS_RECV.
New name better repsents its meaning for modern chips.
2015-11-24 19:20:49 +00:00
Andriy Voskoboinyk
974d2101ba 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
2015-11-24 19:20:45 +00:00
Conrad Meyer
e7f64f2e33 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
2015-11-24 18:51:17 +00:00
Nathan Whitehorn
8accb33404 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
2015-11-24 16:10:21 +00:00
Dag-Erling Smørgrav
af12673615 Revert inadvertent commit of an incorrect patch 2015-11-24 16:07:03 +00:00
Dag-Erling Smørgrav
db83e5424b Remove description of the now-defunct NoneEnabled option. 2015-11-24 16:06:15 +00:00
Hajimu UMEMOTO
046aad399a Correct alignment of the addresses in the `netstat -aW' output. 2015-11-24 14:25:40 +00:00
Svatopluk Kraus
b09e6b5c6e 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)
2015-11-24 13:57:41 +00:00
Kurt Lidl
3164bb81e6 Add myself (lidl) to the calendar.freebsd file.
Approved by:	rpaulo (mentor)
Differential Revision:	https://reviews.freebsd.org/D4264
2015-11-24 13:47:21 +00:00
Hans Petter Selasky
3884ff1831 Add some defines needed by the coming mlx5 infiniband support.
Sponsored by:	Mellanox Technologies
MFC after:	1 week
2015-11-24 12:11:56 +00:00
Hajimu UMEMOTO
06ff7ccb5f Add missing error check after xo_parse_args() in netstat(8).
Submitted by:	Oliver Pinter
Differential Revision:	https://reviews.freebsd.org/D4233
2015-11-24 11:07:37 +00:00
Andrew Turner
ac4dad9e2f 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
2015-11-24 11:01:43 +00:00