Commit Graph

203957 Commits

Author SHA1 Message Date
Bryan Drewery
8ddbefd8a2 Remove unneeded dependency line.
bsd.prog.mk adds 'ktutil-commands.o: ktutil-commands.h' already.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-09-24 23:08:33 +00:00
Ed Maste
453b09caf5 Rename ELFOSABI_SYSV to ELFOSABI_NONE to match current spec
Source: http://www.sco.com/developers/gabi/latest/ch4.eheader.html

Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3731
2015-09-24 21:04:48 +00:00
Ed Maste
473c31f158 readelf: Correct typo HPUS -> HPUX
Submitted by:	kib
2015-09-24 18:53:20 +00:00
Hans Petter Selasky
a130076f26 Implement support for reading USB quirks from the kernel environment.
Refer to the usb_quirk(4) manual page for more details on how to use
this new feature.

Submitted by:	Maxime Soule <btik-fbsd@scoubidou.com>
PR:		203249
MFC after:	2 weeks
2015-09-24 17:37:30 +00:00
Bryan Drewery
a00dbfa82b Fix running make in src directories without a Makefile giving confusing errors.
This fixes the following errors:
  make: don't know how to make bsd.README. Stop
  make: don't know how to make auto.obj.mk. Stop

This is easily seen in sys/dev/*.

The new behavior is now the expected output:
  make: no target to make.

This would happen as MAKESYSPATH (.../share/mk) is auto added to the -I list.
Any directory where make is ran in the src tree that has no local Makefile
would then try executing the target in share/mk/Makefile, which by default
was to build the first entry in FILES.  Of course, because bsd.README and
auto.obj.mk are not in the current directory the error is shown.

This check only works for bmake, but I will still MFC it with an extra
'!defined(.PARSEDIR) ||' guard for stable/10.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-09-24 17:36:18 +00:00
Adrian Chadd
1ff8129a59 Fix up error path handling after the recent churn.
* Don't free the mbuf in the tx path - it uses the transmit path now,
  so the caller frees the mbuf.
* Don't decrement the node ref upon error - that's up to the caller to
  do as well.

Tested:

* Intel 5300 3x3 wifi, station mode

Noticed by: <s3erios@gmail.com>
2015-09-24 17:23:41 +00:00
Ed Maste
5882166b78 Correct UPDATING entry date 2015-09-24 16:56:44 +00:00
Ed Maste
05117b57a5 Install kernel debug data under /usr/lib/debug
This avoids needing a large boot partition / file system in order to
accommodate multiple kernels, and provides consistency with userland
debug. This also simplifies the process of moving kernel debug files
to a separate package and installing them on demand.

In addition, change kernel debug file extension to .debug, to match
userland debug files.

When using the supported kernel installation method the
/usr/lib/debug/boot/kernel directory will be renamed (to kernel.old)
as is done with /boot/kernel.

Developers wishing to maintain the historical behavior of installing
debug files in /boot/kernel/ can set KERN_DEBUGDIR="" in src.conf(5).

Reviewed by:	bdrewery, brooks, imp, markj
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D1006
2015-09-24 16:55:22 +00:00
Alexander Motin
6c2acea564 Allow WRITE SAME with NDOB bit set but without UNMAP.
This combination was originally forbidden, but allowed at spc4r3.
2015-09-24 15:59:08 +00:00
Alexander Motin
4ef0129a46 Add new report types to REPORT LUNS command.
This is only for completeness, since we have nothing new to report there.
2015-09-24 12:22:47 +00:00
Alexander Motin
a6daea64fd Update WRITE ATOMIC(16) support to sbc4r8 draft.
This is only a cosmetic change.  We still don't support atomic boundary
field in the CDB, but at least now we do it formally.
2015-09-24 08:04:47 +00:00
Alexander Motin
de988746be Add support for READ BUFFER(16) command. 2015-09-24 07:16:34 +00:00
Bryan Drewery
64d6acd5e7 Note that LIBADD is only valid in /usr/src.
Sponsored by:	EMC / Isilon Storage Division
2015-09-24 00:22:48 +00:00
Bryan Drewery
fa3423b9a7 Add very basic LIBADD documentation.
Sponsored by:	EMC / Isilon Storage Division
2015-09-24 00:20:34 +00:00
Bryan Drewery
538c8eea82 Document bsd.progs.mk and add more variables overrides.
BINGRP BINMODE BINOWN LINKS MLINKS PROGNAME.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-09-24 00:17:00 +00:00
Bryan Drewery
ba7a7c1b82 RELDIR is useful without META_MODE. Always define it.
It is the CURDIR without the SRC base location in it.

Sponsored by:	EMC / Isilon Storage Division
2015-09-23 23:30:57 +00:00
Bryan Drewery
abb02fa2f9 Fix most cases of bsd.progs.mk running duplicate or missing commands.
This mostly fixes an interaction with bsd.test.mk with PROGS and SCRIPTS.
This was most notable with 'make clean' and 'make install', which r281055
and r272055 attempted to address but were inadequate.

It also addresses similar issues in bsd.progs.mk when not using bsd.test.mk.

This also fixes cases of NOT running commands in the parent when using
bsd.progs.mk:
  - 'make clean' was not run for the main process for Makefiles which had both
    FILES and SUBDIR but no PROGS or SCRIPTS.  This usually was just a
    leftover Kyuafile.auto.  One such example is usr.bin/bmake/tests/sysmk/t1/2.
  - 'make obj' was not running in the current directory with bsd.test.mk due
    to early inclusion of bsd.subdir.mk.  This was not really a problem due to
    the SUBDIRS using 'mkdir -p' for their objdirs.

There were subtle bugs causing this wrong behavior:
  1. bsd.progs.mk needs to set SCRIPTS to empty when recursing to avoid
     the sub-makes from installing, cleaning or building the SCRIPTS;
     only the parent make should be doing this.  r281055 effectively did
     the same but wasn't enough.
  2. CLEANFILES may contain (especially from *.test.mk) files which only
     the parent should clean, such as from FILES and SCRIPTS.  To resolve
     sub-makes also cleaning these, reset CLEANFILES and CLEANDIRS in the
     children before including bsd.prog.mk.  A tempting alternative would be
     to only handle CLEANFILES in the parent but then the child bsd.prog.mk
     CLEANFILES of per-PROGS wouldn't be setup.
  3. bsd.subdir.mk was included too soon in bsd.test.mk.  It needs to be
     included after bsd.prog.mk as the SCRIPTS logic is short-circuitted if
     'install:' is already defined (which bsd.subdir.mk does).  There is
     actually no need to include bsd.subdir.mk from bsd.test.mk as bsd.prog.mk
     and bsd.obj.mk will do so in the proper order.  The description in r257095
     covers this for FILES and was fixed differently, though changing the
     handling of target(install) in bsd.prog.mk may make sense after more
     research.
  4. bsd.progs.mk had extra logic to handle recursing SCRIPTS if PROGS was
     empty, which isn't its business to be doing.  SCRIPTS is handled fine
     by bsd.prog.mk.  This mostly reverts and reworks the fix in r259209 and
     partially reverts r272055.
  5. bsd.progs.mk has no need to depend 'all:' on SCRIPTS and FILES.  These
     are handled by bsd.prog.mk/bsd.files.mk fine.  This also partially reverts
     r272055.
  6. bsd.progs.mk was not drop-in safe for bsd.prog.mk.  Move the PROGS
     check from r273186 to allow it to be used safely.

Specific tested cases:
  SCRIPTS:no PROGS:no FILES:yes SUBDIR:yes
    usr.bin/bmake/tests/sysmk/t1/2

  SCRIPTS:yes PROGS:no FILES:yes SUBDIR:no
    usr.bin/bmake/tests/sysmk/t1/2/1

  SCRIPTS:yes PROGS:yes FILES:yes SUBDIR:yes
    lib/libthr/tests

  SCRIPTS:yes PROGS:no FILES:yes SUBDIR:no
    usr.bin/yacc/tests
    libexec/atf/atf-sh/tests

A full buildworld/installworld/clean comparison with mtree was also done.
The only relevant difference was the new fixed behavior of removing
Kyuafile.auto from the objdir in 'clean'.

Converting SCRIPTS to be a special case FILES group will make this less
fragile and is being explored.

One known remaining issue is 'cleandepend' removing the tags files for
every recursive call.

Note that the 'make clean' command runs for the CURDIR last, which can make
it appear to run multiple times when cleaning in tests/, but each command is
for a SUBDIR returning up the chain.  This is purely bsd.subdir.mk behavior.

PR:		191055
PR:		191955
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-09-23 23:20:49 +00:00
Bryan Drewery
b8aba4fc19 META_MODE: Fix 2nd build causing everything to rebuild due to changed CC.
In the first build the TOOLSDIR does not exit yet which causes CC to default
to the sys.mk version.  Once a TOOLSDIR is created during the build though,
this logic was changing CC to ${TOOLSDIR}/usr/bin/cc even though that file
did not exist.  Thus CC went from 'cc' to '/usr/bin/cc' which forced a
rebuild of everything while using the same compiler.  Check that TOOLSDIR is
not empty to avoid this.  If there is actually a TOOLSDIR cc then it will be
used and properly rebuild.

Sponsored by:	EMC / Isilon Storage Division
2015-09-23 22:36:01 +00:00
Bryan Drewery
4b23c482f4 META_MODE: Avoid // in meta log for tracked --sysroot files.
Sponsored by:	EMC / Isilon Storage Division
2015-09-23 22:23:59 +00:00
Bryan Drewery
075b136250 META_MODE: Follow-up r287865 and define CCACHE_DIR as realpath'd.
Filemon(4) will record paths as they are seen, not as fully resolved.  make(1)
will take the .MAKE.META.IGNORE_PATHS values and resolve them.  This creates
a discrepancy if CCACHE_DIR is a symlink.  Fix this by ensuring it is
resolved for its actual usage.

Submitted by:	sjg
2015-09-23 21:46:58 +00:00
Bryan Drewery
2254894222 Similar to r266147, don't define PROG in the test subdirs.
Magic things happen when including bsd.prog.mk in them.

Sponsored by:	EMC / Isilon Storage Division
2015-09-23 21:35:58 +00:00
Conrad Meyer
b4d7290796 geom_dev: Use kenv 'dumpdev' in the same way as rc/etc.d/dumpon
Skip a /dev/ prefix, if one is present, when checking for matching
device names for dump.

Suggested by:	avg
Reviewed by:	markj
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3725
2015-09-23 21:08:52 +00:00
Bryan Drewery
533fbec505 META_MODE: Follow-up r287879 and have 'make -V .OBJDIR' still invoke auto.obj.mk.
When inspecting this value it is more expected to have it show the
automatically-created directory value rather than CURDIR.

Sponsored by:	EMC / Isilon Storage Division
2015-09-23 20:46:23 +00:00
Ed Maste
8c034f6af7 Bring LLVM libunwind snapshot into contrib/llvm/projects 2015-09-23 19:30:46 +00:00
Ed Maste
dc24fbd60e Import LLVM libunwind snapshot revision 246528
From https://llvm.org/svn/llvm-project/libunwind/trunk/
2015-09-23 19:02:06 +00:00
Alexander Motin
ca85b7c4e9 Synchronize mode pages between HA peers.
We allow to modify only few fields in mode pages now, but still it is
not good if they unexpectedly change during failover.  Also this fixes
reporting of "Mode parameters changed" UAs on secondary node.
2015-09-23 18:33:00 +00:00
Craig Rodrigues
f1e1637581 Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
Submitted by:   Sascha Wildner <swildner@dragonflybsd.org>
Obtained from:  DragonFlyBSD (commit 5d7d35b17f98588c39b30036f1a3fe8802935c2c)
2015-09-23 16:16:16 +00:00
Alexander Motin
a85700a912 Make HA peers announce their parameters on connect.
HA protocol requires strict version, parameters and configuration match.
Differences there may cause full set of problems up to kernel panic.
To avoid that, validate peer parameters on connect, and abort connection
immediately if some mismatch detected.
2015-09-23 15:49:27 +00:00
Mateusz Guzik
3c44a3495f kqueue: simplify kern_kqueue by not refing/unrefing creds too early
No functional changes.
2015-09-23 12:45:08 +00:00
Jeff Roberson
589c956a5a - Fix a nonsense reordering that somehow slipped into my last diff.
Reported by:	pho
2015-09-23 07:44:07 +00:00
Xin LI
9ce06829f2 MFV r288140: update file to 5.25.
MFC after:	1 month
2015-09-23 05:39:20 +00:00
Xin LI
1e0fd9ee49 Vendor import of file 4.25. 2015-09-23 05:09:36 +00:00
Ed Maste
050747f2c3 elfdump: report MIPS ELF section type SHT_MIPS_REGINFO
Sponsored by:	The FreeBSD Foundation
2015-09-23 00:32:38 +00:00
Jeff Roberson
8264830c95 Some refactoring of the buf/vm interface.
- Eliminate bogus page replacement that is inconsistently applied in the
   invalidation loop in brelse.  This has been a no-op in modern times as
   biodone() is responsible for cleaning up after bogus pages.  This
   would've spammed the console with printfs at a minimum.
 - Allow the compiler and human readers alike to reason about allocbuf()
   by splitting it into constituent parts.
 - Separate the VM manipulating and buf manipulating code in brelse() and
   bufdone() so that the intentions are clear.  This makes it evident that
   there are several duplicated buf pages loops that will be consolidated
   at a later time.

Reviewed by:	kib
Tested by:	pho
Sponsored by:	EMC / Isilon Storage Division
2015-09-22 23:57:52 +00:00
Ed Maste
2ed39a2216 Add pass device to arm64 GENERIC (for smartctl)
Sponsored by:	The FreeBSD Foundation
2015-09-22 21:43:08 +00:00
Mateusz Guzik
c025b81442 amd64: plug redundant bootAP declaration
Reported by:	gcc5
2015-09-22 21:07:47 +00:00
Alexander V. Chernikov
f506d933b5 Use standard lle LLE_EXCLUSIVE request flags instead of
its redefined version.
2015-09-22 20:45:04 +00:00
Andrew Turner
faca5970b0 Add support for __atomic_FOO_fetch on arm prior to armv6. These return the
new value where the existing functions return the old value.

MFC after:	1 Week
2015-09-22 19:57:31 +00:00
Alexander V. Chernikov
8e5aadb617 Replace toe_nd6_resolve() with nd6_resolve().
Reviewed by:	np
2015-09-22 19:05:44 +00:00
Konstantin Belousov
37864a5451 Call ast when handling irq from userspace, otherwise we could miss
reschedule.  Right now arm_cpu_intr() does critical_exit() as the last
action, so the impact is not serious.

Remove duplicated interrupt disable in restore_registers macro, when
returning to usermode.  The do_ast macro disabled interrupts for us.

Reviewed by:	andrew
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3714
2015-09-22 18:30:06 +00:00
Alan Cox
15aaea7892 Change vm_page_unwire() such that it (1) accepts PQ_NONE as the specified
queue and (2) returns a Boolean indicating whether the page's wire count
transitioned to zero.

Exploit this change in vfs_vmio_release() to avoid pointlessly enqueueing
a page that is about to be freed.

(An earlier version of this change was developed by attilio@ and kmacy@.
Any errors in this version are my own.)

Reviewed by:	kib
Sponsored by:	EMC / Isilon Storage Division
2015-09-22 18:16:52 +00:00
Dmitry Marakasov
a40531fcf8 Fix crash on parsing some inf files
ndiscvt uses 16 entry array for words into which it parses
comma-separated lists of strings, like AddReg line in

    [somesection]
        AddReg = foo.reg, bar.reg, baz.reg, quiz.reg

Overflows were not checked so it crashed on a line with 17 words
encountered in some Broadcom/Dell Wireless 1704 802.11b-g-n driver

So extend the array up to 32 entries and add an overflow check.

Reviewed by:	bapt
Approved by:	bapt
MFC after:	2 weeks
Differential Revision:	D3713
2015-09-22 16:59:41 +00:00
Ed Maste
c9dbb1cc52 addr2line: skip CUs lacking debug info instead of bailing out
Some binaries (such as the FreeBSD kernel) contain a mixture of CUs
with and without debug information. Previously translate() exited upon
encountering a CU without debug information. Instead, just move on to
the next CU.

Reported by:	royger
Reviewed by:	royger
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3712
2015-09-22 16:51:40 +00:00
Bjoern A. Zeeb
6b1ad46a3b dmar_ctx_dtr() does not exist since r284869. Remove the static function
declaration to avoid a cmpile time warning.
2015-09-22 16:50:59 +00:00
Andrew Turner
9063d39e49 Don't restore interrupts when we are about to disable them in the next
instruction.
2015-09-22 16:46:34 +00:00
Jung-uk Kim
2ac9ef2836 Remove unsupported S5 (power off) state since r170976.
Reported by:	Iam Smith (smithi at nimnet dot asn dot au)
MFC after:	3 days
2015-09-22 16:35:32 +00:00
Konstantin Belousov
d50c68b2f0 Re-check for new ast after ast was handled. We should not return to
usermode with pending asts.

Reviewed by:	andrew
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3667
2015-09-22 16:29:55 +00:00
Craig Rodrigues
c6a7de08f1 Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-22 15:57:26 +00:00
Craig Rodrigues
587cf6827d Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-22 15:40:07 +00:00
Bjoern A. Zeeb
9293cfeb42 Hide an unused in FreeBSD function behind #ifdef linux to get rid of
the compile time warning.

Reviewed by:		gnn
MFC after:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D3710
2015-09-22 15:32:27 +00:00