Dimitry Andric [Mon, 26 Jan 2015 21:19:24 +0000 (21:19 +0000)]
Pull in r227062 from upstream clang trunk (by Renato Golin):
Allows Clang to use LLVM's fixes-x18 option
This patch allows clang to have llvm reserve the x18
platform register on AArch64. FreeBSD will use this in the kernel for
per-cpu data but has no need to reserve this register in userland so
will need this flag to reserve it.
This uses llvm r226664 to allow this register to be reserved.
uid and gid are never and should never be negative. The pw(8) manpage clearly
states the -u and -g arguments are for uids/gids, hence using negative values is
abusing a bug in former versions of pw(8)
John Baldwin [Mon, 26 Jan 2015 16:29:14 +0000 (16:29 +0000)]
- Update a disabled KASSERT() to use sbused() instead of accessing
the no-longer existant sb_cc sockbuf member.
- Use sbavail() instead of sbused() in t4_soreceive_ddp() to match the
usage in soreceive_stream() on which it is based.
John Baldwin [Mon, 26 Jan 2015 16:26:28 +0000 (16:26 +0000)]
Fix a couple of panics when detaching from a cxgbe/cxl interface that was
never brought up:
- Allow NULL to be passed to sglist_free().
- Don't try to stop an interface that was never fully initialized.
Ensure that _tmppt KVA is used exclusively by providing exclusive sx
lock around the mapping and uiomove(). Before r277643, it was
partially protected by Giant (but potential sleeping in fault from
uiomove() would still allow other thread to reuse the mapping).
Noted by: ian
Reviewed by: alc, ian
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks
Roger Pau Monné [Mon, 26 Jan 2015 08:42:47 +0000 (08:42 +0000)]
amd64: allow base memory segment to start at address different than 0
Current code requires that the first physical memory segment starts at 0,
but this is not really needed. We only need to make sure the bootstrap code
and page tables for APs are allocated below 4GB.
This patch removes this requirement and allows booting a Dell R710 from
UEFI, where the first physical memory segment starts at 0x10000.
- Increase default i2c bus timeout to 5 seconds from 1 second. Sometimes
1 second is not enugh for TDA19988 HDMI framer (e.g. on Beaglebone Black)
- Add per-device i2c_timout sysctl (dev.iichb.X.i2c_timeout) to control
I2C bus timeout manually
- Pass softc instead of device_t to all sysctl handlers
John Baldwin [Sun, 25 Jan 2015 20:37:32 +0000 (20:37 +0000)]
natd(8) will work with an unconfigured interface and effectively not do
anything until the interface is assigned an address. This fixes
ipfw_nat to do the same by using an IP of INADDR_ANY instead of
aborting the nat setup if the requested interface is not yet configured.
John Baldwin [Sun, 25 Jan 2015 20:16:45 +0000 (20:16 +0000)]
If the boot-time memory test is enabled, output a dot ('.') for
each GB of RAM tested so people watching the console can see that
the machine is making progress and not hung.
PR: 196650
Submitted by: Ravi Pokala <rpokala@panasas.com>
Suggestions from: Eric van Gyzen <eric@vangyzen.net>
MFC after: 2 weeks
John Baldwin [Sun, 25 Jan 2015 19:45:44 +0000 (19:45 +0000)]
Use an sbuf to generate the output of the net.inet.tcp.hostcache.list
sysctl to avoid a possible buffer overflow if the cache grows while the
text is being generated.
Mark Johnston [Sun, 25 Jan 2015 00:47:06 +0000 (00:47 +0000)]
gr_equal(): Fix a crash that could occur if the first group's member list
was longer than the second's. There is no need to compute and compare the
member list lengths in a separate pass, since we now just return false when
comparing member names if the list lengths are not equal.
Ian Lepore [Sat, 24 Jan 2015 20:18:37 +0000 (20:18 +0000)]
Reimplement fdt_clock_register_provider() correctly. It turns out you
can't use OF_xref_from_device() to implement the function that registers
the xref association with the device.
Will Andrews [Sat, 24 Jan 2015 17:32:45 +0000 (17:32 +0000)]
Add vm.panic_on_oom sysctl, which enables those who would rather panic than
kill a process, when the system runs out of memory. Defaults to off.
Usually, this is most useful when the OOM condition is due to mismanagement
of memory, on a system where the applications in question don't respond well
to being killed.
In theory, if the system is properly managed, it shouldn't be possible to
hit this condition. If it does, the panic can be more desirable for some
users (since it can be a good means of finding the root cause) rather than
killing the largest process and continuing on its merry way.
As kib@ mentions in the differential, there is also protect(1), which uses
procctl(PROC_SPROTECT) to ensure that some processes are immune. However,
a panic approach is still useful in some environments. This is primarily
intended as a development/debugging tool.
Ryan Stone [Sat, 24 Jan 2015 16:59:38 +0000 (16:59 +0000)]
vmspace_release() may sleep if the last reference is being released,
so add a WITNESS_WARN() to catch cases where it is called with a
non-sleepable lock held.
Avoid calling vmspace_free() while owning the process lock. Freeing
of an vm space may require obtaining sleepable locks. Hold the
process to keep the pointer valid, and change trylock to lock, since
there is no longer two process locks owned simultaneously in
vm_pageout_oom().
Note that after the process lock is dropped, process might exec, and
no longer qualify as the owner of biggest vm space.
In collaboration with: rstone
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Ruslan Bukin [Sat, 24 Jan 2015 13:07:07 +0000 (13:07 +0000)]
Add support for audio transmitting, include drivers for:
o Digital Audio Multiplexer (AUDMUX)
o Smart Direct Memory Access Controller (SDMA)
o Synchronous Serial Interface (SSI)
Disable by default as it depends on SDMA firmware.
Remove Giant from /dev/mem and /dev/kmem. It is definitely not needed
for i386, and from the code inspection, nothing in the
arm/mips/sparc64 implementations depends on it.
Discussed with: imp, nwhitehorn
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks
Luigi Rizzo [Sat, 24 Jan 2015 08:48:05 +0000 (08:48 +0000)]
do not strip /stand
This is a temporary workaround until the elftoolchain's version
of strip is fixed:
The previous (GNU) strip, when acting on a file with multiple links,
would modify the one and only file in place (which means creating
a new stripped copy, and then writing it back to the original).
The new version from elftoolchain creates the new file and then
unlinks the old one and renames the new.
With multiple hard links, the original remains alive. In the /stand
directory, this ends up creating 80+ copies of the same file.
Will Andrews [Sat, 24 Jan 2015 00:43:02 +0000 (00:43 +0000)]
When creating or updating a node, use vfs_timestamp() for "now" instead
of gethrestime(), to allow the administrator to decide the appropriate
timestamp precision instead of always using nanosecond precision.
Will Andrews [Fri, 23 Jan 2015 23:53:56 +0000 (23:53 +0000)]
Fix panic in firewire and creation of invalid config ROM.
(This change was supposed to be included in r277508.)
sys/boot/i386/libfirewire/firewire.c:
Fix configuration ROM generation count wrapping logic
so that the generation count is never outside of
allowed limits (0x2 -> 0xF).
Ed Maste [Fri, 23 Jan 2015 21:34:08 +0000 (21:34 +0000)]
Restore addr2line to cross tools
Addr2line is not required for the build, and a per-arch binary is no
longer required with the switch to the ELF Tool Chain. However, building
these tools during the cross tools stage can be useful for developers
who cross build HEAD from stable/10, and adds very little to the build
time.