Commit Graph

175040 Commits

Author SHA1 Message Date
Andrew Turner
e376173cab Get libcompiler-rt and libgcc building on ARM with clang.
* Don't provide clear_cache or the __sync_* functions on ARM with clang as
  they are provided by clang as builtin functions.
* Tell clang it is aloud to compile some libgcc code using heinous GCC
  extensions.
2012-12-18 07:26:55 +00:00
Kevin Lo
c7dada99bb Fix typo in comment.
Reviewed by:	thompsa
2012-12-18 06:37:23 +00:00
Andrey A. Chernov
412fcd3f6c More correct version of prev. fix. 2012-12-18 04:44:36 +00:00
Rick Macklem
13870d5d7b Piete.Brooks at cl.cam.ac.uk reported via email a crash which was
caused by use of an invalid kgss_gssd_handle during an upcall to
the gssd daemon when it has exited. This patch seems to avoid the
crashes by holding a reference count on the kgss_gssd_handle until
the upcall is done. It also adds a new mutex kgss_gssd_lock used to
make manipulation of kgss_gssd_handle SMP safe.

Tested by:	Illias A. Marinos, Herbert Poeckl
Reviewed by:	jhb
MFC after:	2 weeks
2012-12-18 00:25:48 +00:00
Jim Harris
61ba2ac6b4 Use CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT to report nonexistent
LUNs for the virtual processor device.  This removes lots of CAM warnings,
and follows similar recent changes to tws(4) and twa(4) drivers.

Also fix case where CAM_REQ_CMP was getting OR'd with CAM_DEV_NOT_THERE
in the nonexistent LUN case, resulting in different CAM status (CAM_UA_TERMIO)
getting reported to CAM.  This issue existing previously, but was more subtle
because it changed CAM_SEL_TIMEOUT to CAM_CMD_TIMEOUT.

Sponsored by:	Intel
Reported and tested by:	Willem Jan Withagen <wjw@digiware.nl>
MFC after:	1 week
2012-12-18 00:00:07 +00:00
Ed Maste
44383aa35e Hide OBJCOPY and others in POSIX mode
Submitted by: Garrett Cooper
2012-12-17 21:09:44 +00:00
Andrey V. Elsukov
f491274582 Since we use different flags to detect tcp forwarding, and we share the
same code for IPv4 and IPv6 in tcp_input, we should check both
M_IP_NEXTHOP and M_IP6_NEXTHOP flags.

MFC after:	3 days
2012-12-17 20:55:33 +00:00
Andrey A. Chernov
89bae3c5d0 Fix:
line 11: Malformed conditional
(${TARGET} == "arm" || ${TARGET_ARCH} == "powerpc64")
2012-12-17 19:17:10 +00:00
Andrey V. Elsukov
79672fd277 Use M_PROTO7 flag for M_IP6_NEXTHOP, because M_PROTO2 was used for
M_AUTHIPHDR.

Pointy hat to:	ae
Reported by:	Vadim Goncharov
MFC after:	3 days
2012-12-17 14:36:56 +00:00
Eitan Adler
49a8f2aa6c Fix warning from valgrind when a failed entry is tested.
PR:		kern/173008
Submitted by:	Zhihao Yuan <lichray@gmail.com>
Reviewed by:	gabor
Approved by:	cperciva (implicit)
MFC after:	1 week
2012-12-17 12:57:36 +00:00
Pawel Jakub Dawidek
f06f465db7 Minor style tweaks.
Obtained from:	WHEEL Systems
2012-12-17 10:51:22 +00:00
Pawel Jakub Dawidek
c52ff61196 Better variables naming in expand_name() to be more consistent with coredump().
Obtained from:	WHEEL Systems
2012-12-17 10:48:10 +00:00
Jilles Tjoelker
571d9493ad libc/iconv: Fix race condition with setting FD_CLOEXEC.
A fork/exec could happen between open and fcntl, leaking a file descriptor.
Using O_CLOEXEC fixes this and as a side effect simplifies the code.

NetBSD already had this (I checked this after making the change myself).

Reviewed by:	gabor
2012-12-17 10:38:51 +00:00
Gabor Kovesdan
790ffa6cfd - Fix handling of .mps files
PR:		bin/161454
Submitted by:	Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>
2012-12-17 10:12:12 +00:00
Pawel Jakub Dawidek
f5002be657 Warn about reaching various PF limits.
Reviewed by:	glebius
Obtained from:	WHEEL Systems
2012-12-17 10:10:13 +00:00
Gabor Kovesdan
ab28d4d3cf - Use unsigned int for values obtained with sysctlbyname(). This fixes
sparc64 performance problems.

Submitted by:	Oleg Moskalenko <oleg.moskalenko@citrix.com>
Tested by:	trasz
2012-12-17 09:36:43 +00:00
Pyun YongHyeon
9f988ef16b Make sure to stop both TX and RX MACs in ale_stop_mac(). Previously
it used to stop TX MAC only such that MAC reconfiguration after
getting a link didn't work as expected.

PR:	kern/173652
2012-12-17 06:01:57 +00:00
Rui Paulo
d48fc6b377 amd64 only has rela sections. 2012-12-17 00:34:07 +00:00
Rick Macklem
765782e799 Fix the gssd daemon so that it uses syslog() to report
an error instead of calling err() when it is daemonized,
so that the error gets logged.

Discussed with:	rwatson, jhb
Tested by:	Illias A. Marinos, Herbert Poeckl
MFC after:	2 weeks
2012-12-17 00:31:55 +00:00
Hiroki Sato
0a16fa86cb - Fix strtol() error handling.
- Add a range condition of given FIB number and the related error messages.
- Fix free() problem.

Spotted by:	Artyom Mirgorodskiy
Discussed with:	glebius
2012-12-16 23:46:59 +00:00
Pawel Jakub Dawidek
11631ad0d6 Use new savecore(8) option and limit number of kernel dumps that will
be kept around to the 10 most recent ones.

Add UPDATING entry with info how to return to the previous behaviour (no
limits).

Obtained from:	WHEEL Systems
2012-12-16 23:29:56 +00:00
Pawel Jakub Dawidek
165557e269 With rotating kernel dumps the higest dump number is not necessarily the
last one. To make it easier to find the last one create symlinks with 'last'
suffix that will point to the files of the last coredump, eg.:

	info.last -> info.5
	textdump.tar.last.gz -> textdump.tar.5.gz

Reviewed by:	avg
Obtained from:	WHEEL Systems
2012-12-16 23:09:27 +00:00
Pawel Jakub Dawidek
eeff0b1b27 Implement -m option to savecore(8) that allows to limit number of kernel
dumps stored. Once the limit is reached it restarts from 0.

Reviewed by:	avg
Obtained from:	WHEEL Systems
2012-12-16 23:06:12 +00:00
Pawel Jakub Dawidek
30f6c389ae Make use of the fact that we changed working directory to the dump directory
earlier.

Obtained from:	WHEEL Systems
2012-12-16 23:04:31 +00:00
Eitan Adler
7cb0189de6 Minor wording improvments to some manual pages
Approved by:	bcr (mentor)
Obtained from:	DragonflyBSD (a5294ca835317c68c919ab43936da4f05ab6e926)
MFC after:	3 days
2012-12-16 23:00:13 +00:00
Pawel Jakub Dawidek
3a6e0febc2 Sort flags properly.
Obtained from:	WHEEL Systems
2012-12-16 22:59:58 +00:00
Pawel Jakub Dawidek
87c3930b34 Prefer snprintf() over sprintf().
Obtained from:	WHEEL Systems
2012-12-16 22:59:25 +00:00
Marius Strobl
d464a3641d Revert r237842 and switch back to SCHED_ULE. All problems I encountered
with the latter have been fixed with r241780.

MFC after:	3 days
2012-12-16 20:54:07 +00:00
Marius Strobl
c0c11f4c92 Restore pre-r234898 printing of boot loader and path.
MFC after:	3 days
2012-12-16 20:43:29 +00:00
Pawel Jakub Dawidek
dd57ce87eb Move expand_name() after process lock is released.
This fixed panic where we hold mutex (process lock) and try to obtain sleepable
lock (vnode lock in expand_name()). The panic could occur when %I was used
in kern.corefile.

Additionally we avoid expand_name() overhead when coredumps are disabled.

Obtained from:	WHEEL Systems
2012-12-16 14:53:27 +00:00
Edward Tomasz Napierala
be1bfa99a4 When growing a filesystem, don't leave unused space at the end
if there is not enough room for a full cylinder group.

Reviewed by:	mckusick@
2012-12-16 14:37:25 +00:00
Pawel Jakub Dawidek
2ce1b32df2 Don't add audit record when coredumps are disabled or name cannot be expanded.
Discussed with:	rwatson
Obtained from:	WHEEL Systems
2012-12-16 14:24:59 +00:00
Pawel Jakub Dawidek
7e73ee85ab Make the check easier to read.
Obtained from:	WHEEL Systems
2012-12-16 14:14:18 +00:00
Pawel Jakub Dawidek
b039f8c2aa Use 'cred' variable.
Obtained from:	WHEEL Systems
2012-12-16 13:56:38 +00:00
Oleksandr Tymoshenko
6565185ed6 Fix comment to represent actual file purpose
Spotted by: gavin@
2012-12-16 00:20:16 +00:00
Pawel Jakub Dawidek
03385af198 sbuf_trim() cannot be used on sbuf with drain function set.
This fixes panic when listing sysctls on INVARIANTS-enabled kernel while
having wbwd loaded.

This panic was not fatal, at worst one additional space was printed.

Also sbuf_trim() makes some sense even if drain function is set. The drain
function is called only when buffer is to be expanded. So we could still trim
existing buffer before drain is called. In this case it worked just fine - the
trailing space was correctly trimmed.

Obtained from:	WHEEL Systems
MFC after:	1 week
2012-12-15 22:26:16 +00:00
Andrew Turner
d39894842b Ignore a warning in ubldr where clang doesn't understand the %D printf
specifier from libstand.
2012-12-15 21:47:05 +00:00
Andrew Turner
70b6701d78 Also remove -Werror on arm with clang as there are warnings. 2012-12-15 21:33:12 +00:00
Andrew Turner
d131070105 Don't define CTORS_SECTION_ASM_OP and DTORS_SECTION_ASM_OP on arm when
built with clang. When these are defined the lists are defined similar to:

asm(".section .ctors");
STATIC func_ptr __CTOR_LIST__[1] = { (func_ptr) (-1) };
asm(".section .dtors");
STATIC func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) };

The problem is clang will move the two arrays out of the .ctors and .dtors
sections causing these sections to contain a single null address. By not
defining these macros we use the version of the code that places the arrays
is their sections by using __attribute__((section(".ctors"))) and similar
for .dtors.

Submitted by:	Daisuke Aoyama <aoyama AT peach.ne.jp>
2012-12-15 21:24:31 +00:00
Andrew Turner
384f99dea7 Recognise vfpv2 as a value for the ARM .fpu asm directive. Clang generates
these even when building soft floating-point code

Submitted by:	Daisuke Aoyama <aoyama AT peach.ne.jp>
2012-12-15 21:12:13 +00:00
Andrew Turner
2890206e6e Fix a comment in an asm block to work with compilers other than GCC 2012-12-15 21:06:14 +00:00
Andrey V. Elsukov
68eba526b9 In additional to the tailq of IPv6 addresses add the hash table.
For now use 256 buckets and fnv_hash function. Use xor'ed 32-bit
s6_addr32 parts of in6_addr structure as a hash key. Update
in6_localip and in6_is_addr_deprecated to use hash table for fastest
lookup.

Sponsored by:	Yandex LLC
Discussed with:	dwmalone, glebius, bz
2012-12-15 20:04:24 +00:00
Mikolaj Golub
3cfa2135c5 Change iostat -Ix to display total duration of transactions instead
of average duration, and total busy time instead of %.

This looks more useful when one runs `iostat -Ix` periodically to
collect statistics: e.g. now it is possible to calculate busy %
between two runs subtracting total busy times and dividing per time
period.

Average duration and % busy are still available via `iostat -x`.
2012-12-15 18:21:09 +00:00
Mikolaj Golub
fdd6757e71 New devstat metrics for devstat_compute_statistics():
DSM_TOTAL_DURATION
  DSM_TOTAL_DURATION_READ
  DSM_TOTAL_DURATION_WRITE
  DSM_TOTAL_DURATION_FREE
  DSM_TOTAL_DURATION_OTHER
  DSM_TOTAL_BUSY_TIME
2012-12-15 18:19:48 +00:00
Poul-Henning Kamp
efe3d4d7c9 Update to the new and brighter pkg world 2012-12-15 17:54:29 +00:00
Mikolaj Golub
bf1e95a21c In pfioctl, if the permission checks failed we returned with vnet context
set.

As the checks don't require vnet context, this is fixed by setting
vnet after the checks.

PR:		kern/160541
Submitted by:	Nikos Vassiliadis (slightly different approach)
2012-12-15 17:19:36 +00:00
Robert Watson
6f1cbda73d Four .c files from OpenBSM are used, in modified form, by the kernel to
implement the BSM audit trail format.  Rename the kernel versions of the
files to match the userspace filenames so that it's easier to work out
what they correspond to, and therefore ensure they are kept in-sync.

Obtained from:	TrustedBSD Project
2012-12-15 15:21:09 +00:00
Robert Watson
f7d2299713 Merge OpenBSM 1.2-alpha3 from the vendor branch to 10-CURRENT; this version
included various upstreamed patches from the FreeBSD base to make OpenBSM
compile more easily with bmake, higher warning levels, clang, and several
other loose ends.

Obtained from:	TrustedBSD Project
2012-12-15 14:59:00 +00:00
Robert Watson
911ea853e5 Vendor import of OpenBSM 1.2-alpha3. This eliminates most local patches
made relative to OpenBSM 1.2-alpha2 in order to build OpenBSM as part of
the FreeBSD base.

Obtained from:	TrustedBSD Project
2012-12-15 13:27:45 +00:00
Hans Petter Selasky
0d8a95f1b8 Regenerate usb.conf
MFC after:	1 week
2012-12-15 10:56:16 +00:00