195040 Commits

Author SHA1 Message Date
dim
16ced98065 MFC r263774:
Revert r263694, and apply a better fix to squelch unnecessary warnings
from clang about possible keywords being treated as identifiers for the
remainder of the translation unit (a.k.a. -Wkeyword-compat), when using
libstdc++ in combination with -Wsystem-headers.  This will not only fix
devd, but any C++ program using libstdc++.
2014-03-29 11:33:52 +00:00
edwin
24df444399 MFC of 263901, tzdata2014b
- Update antartica.
 - Comments about historical data for Hawaii.
 - Update details for Crimea on 30 March
 - Move location data Simferopol.
2014-03-29 04:44:24 +00:00
jkim
16332b280e MFC: r263435
Add new CPUTYPEs supported by Clang 3.4.
2014-03-28 20:12:30 +00:00
asomers
340d7c934c MFC r262914
sbin/devd/devd.8
sbin/devd/devd.cc
	Add a -q flag to devd that will suppress syslog logging at
	LOG_NOTICE or below.
2014-03-28 16:27:48 +00:00
kib
ef58943ab3 MFC r263475:
Fix two issues with /dev/mem access on amd64, both causing kernel page
faults.

First, for accesses to direct map region should check for the limit by
which direct map is instantiated.

Second, for accesses to the kernel map, use a new thread private flag
TDP_DEVMEMIO, which instructs vm_fault() to return error when fault
happens on the MAP_ENTRY_NOFAULT entry, instead of panicing.

MFC r263498:
Add change forgotten in r263475.  Make dmaplimit accessible outside
amd64/pmap.c.
2014-03-28 15:38:38 +00:00
asomers
31717f7c2c MFC r262912
cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c
	Fix a memory leak in uu_avl_pool_create: pthread_mutex_init without
	a corresponding pthread_mutex_destroy.  It shows up, among other
	places, when doing "zfs list".
2014-03-28 15:09:35 +00:00
brueffer
a44c2eaca9 MFC: r263169
Add support for AMD Family 16h (Kabini) sensor devices.

PR:		186587
Submitted by:	David Rufino <david.rufino at gmail.com>
2014-03-28 08:55:34 +00:00
delphij
02202f1ec4 MFC r259180 (pjd) + r263123:
Hide a few messages under bootverbose.
2014-03-28 01:13:08 +00:00
dim
6b112fdc4b MFC r263694:
Apply a temporary band-aid for building devd with clang 3.4, libstdc++
and -Wsystem-headers enabled (which is the default for any non-zero
WARNS level, crazily enough!).  This is primarily meant to be MFC'd as
soon as possible.
2014-03-27 20:46:46 +00:00
dim
33566a94ae MFC r263692:
Add a note to UPDATING about customized kernel configuration files now
requiring -gdwarf-2 for debug info, when using clang 3.4.

Suggested by:	adrian
2014-03-27 20:32:58 +00:00
brueffer
91720dd7bb MFC: r262484
In puthdr(), start the ELF .data section on a new page, as this is
what btxldr expects (.set MEM_DATA,start+0x1000 in btxldr.S).

This makes resulting ELF binaries bootable with grub, gptboot and boot2.

PR:		153801
Submitted by:	Gleb Kurtsou <gleb.kurtsou at gmail.com>
Tested by:	Ruben Kerkhof <ruben at rubenkerkhof.com>
Glanced at by:	jhb, peter
2014-03-27 20:19:11 +00:00
brueffer
af75007ff3 MFC: r263121
Re-format the license to conform to our BSD license template as much
as possible.  This does not change the wording in any way.

Remove the 3rd clause ("advertising clause") of the BSD license as
permitted by the University of Berkeley on July 22, 1999.  While the
clause itself mentions Lawrence Berkeley Laboratory, UCB is the sole
copyright holder of this file.

Reviewed by:	imp, emaste, eadler
2014-03-27 20:13:53 +00:00
asomers
df22d5312e MFC r262867
Fix PR kern/185813 "SOCK_SEQPACKET AF_UNIX sockets with asymmetrical buffers
drop packets".  It was caused by a check for the space available in a
sockbuf, but it was checking the wrong sockbuf.

sys/sys/sockbuf.h
sys/kern/uipc_sockbuf.c
	Add sbappendaddr_nospacecheck_locked(), which is just like
	sbappendaddr_locked but doesn't validate the receiving socket's space.
	Factor out common code into sbappendaddr_locked_internal().  We
	shouldn't simply make sbappendaddr_locked check the space and then call
	sbappendaddr_nospacecheck_locked, because that would cause the O(n)
	function m_length to be called twice.

sys/kern/uipc_usrreq.c
	Use sbappendaddr_nospacecheck_locked for SOCK_SEQPACKET sockets,
	because the receiving sockbuf's size limit is irrelevant.

tests/sys/kern/unix_seqpacket_test.c
	Now that 185813 is fixed, pipe_128k_8k fails intermittently due to
	185812.  Make it fail every time by adding a usleep after starting the
	writer thread and before starting the reader thread in test_pipe.  That
	gives the writer time to fill up its send buffer.  Also, clear the
	expected failure message due to 185813.  It actually said "185812", but
	that was a typo.

PR:		kern/185813
2014-03-27 16:47:35 +00:00
hselasky
5d4dbd39e3 MFC r263423:
Try to resolve a possible deadlock when detaching USB devices which
create character devices. The deadlock can happen if an application is
issuing IOCTLs which require USB refcounting, at the same time the USB
device is detaching.

There is already a counter in place in the USB device structure to
detect this situation, but it was not always checked ahead of invoking
functions that might destroy character devices, like detach, set
configuration, set alternate interface or detach active kernel driver.
2014-03-27 06:59:56 +00:00
hselasky
609200cd25 MFC r263291 and r263292:
Update USB template manual page.
2014-03-27 06:55:26 +00:00
delphij
800e1a055e MFC r262501:
Refresh our implementation of OpenBSD's Blowfish password format.

Notable changes:

 - Support of $2b$ password format to address a problem where very
   long passwords (more than 256 characters, when an integer
   overflow would happen and cause the length to wrap at 256).
 - Updated pseudo code in comments to reflect the reality.
 - Removed our local shortcut of processing magic string and rely
   on the centralized and tigntened validation.
 - Diff reduction from upstream.

For now we are still generating the older $2a$ format of password
but we will migrate to the new format once the format is formally
finalized.
2014-03-27 00:23:44 +00:00
delphij
9c78ab8bb8 MFC r262991:
Correct a typo in nlm_find_host_by_addr(): the intention of the
code is to give "<unknown>" rather than comparing the buffer
against it.
2014-03-26 23:57:09 +00:00
dim
904b8fb3b3 MFC r262657:
Apply fix for lldb not linking after the sparc backend import.

Reported by:	se
Pointy hat to:	dim
2014-03-26 20:10:07 +00:00
kib
4d414590eb MFC r263349:
Make the array pointed to by AT_PAGESIZES auxv properly aligned.
2014-03-26 16:59:28 +00:00
dim
45ae227ed4 MFC r263312:
Pull in r196939 from upstream llvm trunk (by Reid Kleckner):

  Reland "Fix miscompile of MS inline assembly with stack realignment"

  This re-lands commit r196876, which was reverted in r196879.

  The tests have been fixed to pass on platforms with a stack alignment
  larger than 4.

  Update to clang side tests will land shortly.

Pull in r196986 from upstream llvm trunk (by Reid Kleckner):

  Revert the backend fatal error from r196939

  The combination of inline asm, stack realignment, and dynamic allocas
  turns out to be too common to reject out of hand.

  ASan inserts empy inline asm fragments and uses aligned allocas.
  Compiling any trivial function containing a dynamic alloca with ASan is
  enough to trigger the check.

  XFAIL the test cases that would be miscompiled and add one that uses the
  relevant functionality.

Pull in r202930 from upstream llvm trunk (by Hans Wennborg):

  Check for dynamic allocas and inline asm that clobbers sp before building
  selection dag (PR19012)

  In X86SelectionDagInfo::EmitTargetCodeForMemcpy we check with MachineFrameInfo
  to make sure that ESI isn't used as a base pointer register before we choose to
  emit rep movs (which clobbers esi).

  The problem is that MachineFrameInfo wouldn't know about dynamic allocas or
  inline asm that clobbers the stack pointer until SelectionDAGBuilder has
  encountered them.

  This patch fixes the problem by checking for such things when building the
  FunctionLoweringInfo.

  Differential Revision: http://llvm-reviews.chandlerc.com/D2954

Together, these commits fix the problem encountered in the devel/emacs
port on the i386 architecture, where a combination of stack realignment,
alloca() and memcpy() could incidentally clobber the %esi register,
leading to segfaults in the temacs build-time utility.

See also: http://llvm.org/PR18171 and http://llvm.org/PR19012

Reported by:	ashish
PR:		ports/183064

MFC r263313:

Pull in r203311 from upstream llvm trunk (by Arnold Schwaighofer):

  ISel: Make VSELECT selection terminate in cases where the condition type has to
  be split and the result type widened.

  When the condition of a vselect has to be split it makes no sense widening the
  vselect and thereby widening the condition. We end up in an endless loop of
  widening (vselect result type) and splitting (condition mask type) doing this.
  Instead, split both the condition and the vselect and widen the result.

  I ran this over the test suite with i686 and mattr=+sse and saw no regressions.

  Fixes PR18036.

With this fix the original problem case from the graphics/rawtherapee
port (posted in http://llvm.org/PR18036 ) now compiles within ~97MB RSS.

Reported by:	mandree

MFC r263320:

Add separate patch files for all the customizations we have currently
applied to our copy of llvm/clang.  These can be applied in alphabetical
order to a pristine llvm/clang 3.4 release source tree, to result in the
same version used in FreeBSD.

This is intended to clearly document all the changes until now, which
mostly consist of cherry pickings from the respective upstream trunks,
plus a number of hand-written FreeBSD-specific ones.  Hopefully those
can eventually be cleaned up and sent upstream too.
2014-03-26 07:42:43 +00:00
dim
fb422e6d31 MFC r262613:
Merge the projects/clang-sparc64 branch back to head.  This brings in
several updates from the llvm and clang trunks to make the sparc64
backend fully functional.

Apart from one patch to sys/sparc64/include/pcpu.h which is still under
discussion, this makes it possible to let clang fully build world and
kernel for sparc64.

Any assistance with testing this on actual sparc64 hardware is greatly
appreciated, as there will unavoidably be bugs left.

Many thanks go to Roman Divacky for his upstream work on getting the
sparc64 backend into shape.

MFC r262985:

Repair a few minor mismerges from r262261 in the clang-sparc64 project
branch.  This is also to minimize differences with upstream.
2014-03-26 07:31:57 +00:00
kib
5a582ae617 MFC r263306:
Add some support for the PCI(e)-PCI bridges to the Intel VT-d driver.
2014-03-25 20:17:57 +00:00
kib
879dfba7f2 MFC r263305:
Provide a workaround by identity mapping the 32 pages after the bogus
entry start, which seems to be enough for the reported BIOS.
2014-03-25 20:16:28 +00:00
trasz
49c9412490 MFC 262782:
Fix missing unlock in persistent reservations code, which resulted in panics
with Hyper-V Failover Cluster.

Sponsored by:	The FreeBSD Foundation
2014-03-25 13:18:09 +00:00
trasz
59337a66a6 MFC r263356:
Make the error message more clear.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:38:43 +00:00
trasz
4a35e9f814 MFC r261752:
Empty data segment during Login Phase is rather unlikely, but it's
not, by itself, a protocol error.  This fixes interoperability with
OpenBSD initiator.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:33:16 +00:00
trasz
9a3c8da93d MFC r261751:
The log_whatever() routines don't accept NULL for format strings,
so mark them as __printflike instead of__printf0like.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:31:08 +00:00
trasz
018e61bbe4 MFC r261962:
Mention that rctl(8) was sponsored by the Foundation.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:26:00 +00:00
trasz
b25383a8f9 MFC r261764:
So, it turns out SIGCHLD is discarded by default, so we have to set up
a dummy handler to make it interrupt an ioctl(2) or select(2).

This makes those short-lived ctld(8) zombies disappear.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:24:18 +00:00
trasz
5fb75e3b8f MFC r261763:
Use new auth-type "deny" instead of using "chap" with no chap entries;
it's cleaner this way, and gives better feedback to the user.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:22:30 +00:00
trasz
d3e539d4a4 MFC r261762:
Use "default" as default discovery-auth-group, instead of "no-access".
It doesn't change visible behaviour, as previously auth-group "default"
wasn't redefinable, so by default access was always denied.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:20:29 +00:00
trasz
760d220cff MFC r261761:
Update manual page to match recent auth-group "default" changes.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:18:37 +00:00
trasz
60885b6065 MFC r261760:
Add a new auth-group "default", defaulting to deny, and make it possible
to redefine it.  From now on, assigning auth-group to a target is no longer
mandatory.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:16:52 +00:00
trasz
d57dc1f923 MFC r261759:
Make it possible to redefine portal-group "default".

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:14:48 +00:00
trasz
47c8dbe543 MFC r261758:
Add auth-type.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:12:37 +00:00
trasz
b76fc2462a MFC r261757:
Rename a variable, no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:10:30 +00:00
trasz
8783fbbc56 MFC r261756:
Yacc cleanup; no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:08:35 +00:00
trasz
225da9bc73 MFC r261755:
Make function ordering slightly more logical; no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:06:42 +00:00
trasz
c67809725b MFC r261754:
Implement initiator-name and initiator-portal restrictions.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:01:55 +00:00
trasz
cf1ffe3cac MFC r261753:
Daemonize after applying configuration, not before, so that
any problems - including "daemon already running" - are visible
on the terminal and not just in logs.

Sponsored by:	The FreeBSD Foundation
2014-03-25 12:00:05 +00:00
trasz
930438f7d5 MFC r261750:
Improve check for duplicated paths.  It shows the warning twice for every
path (once for each duplicate found), but it should do for now.

Sponsored by:	The FreeBSD Foundation
2014-03-25 11:58:24 +00:00
trasz
57c5c94274 MFC r261749:
Refactor.

Sponsored by:	The FreeBSD Foundation
2014-03-25 11:53:47 +00:00
trasz
b76cdca91a MFC r261768:
Make the debug messages during ctld(8) shutdown less confusing.

Sponsored by:	The FreeBSD Foundation
2014-03-25 11:46:46 +00:00
trasz
68324fc037 MFC r261767:
Show proper configuration file line numbers in error messages.

Sponsored by:	The FreeBSD Foundation
2014-03-25 11:45:03 +00:00
trasz
e5c161c379 MFC r261766:
Make ctld error out on invalid characters in ctl.conf.

Sponsored by:	The FreeBSD Foundation
2014-03-25 11:43:09 +00:00
trasz
70b9e78e3d MFC r261765:
Improve error reporting.

Sponsored by:	The FreeBSD Foundation
2014-03-25 11:41:10 +00:00
emaste
f9534c5185 MFC r263289: Update NetBSD Foundation copyrights to 2-clause BSD
The NetBSD Foundation states "Third parties are encouraged to change the
  license on any files which have a 4-clause license contributed to the
  NetBSD Foundation to a 2-clause license."

  This change removes clauses 3 and 4 from copyright / license blocks that
  list The NetBSD Foundation as the only copyright holder.

Sponsored by:	The FreeBSD Foundation
2014-03-24 13:48:04 +00:00
kib
b020ab10d3 MFC r263471:
Initialize vm_map_entry member wiring_thread on the map entry creation.
2014-03-24 12:40:53 +00:00
glebius
b117682e18 Merge r263497: fix ipfw + VIMAGE sysctls.
PR:		kern/187665
2014-03-24 10:19:07 +00:00
pfg
94058dd923 MFC: r263441:
msdosfs: minor format fix - spaces vs tab
2014-03-23 19:48:30 +00:00