Commit Graph

178903 Commits

Author SHA1 Message Date
Rui Paulo
eaba9848dd Introduce PLATFORMMETHOD_END and use it. 2013-02-13 02:21:45 +00:00
Andrey Zonov
4b03484ff7 - Make actually printing path of AF_LOCAL socket types.
MFC after:	1 week
2013-02-12 19:10:54 +00:00
Andrey Zonov
449df4ecb8 - Use correct size of copying different socket structures.
MFC after:	1 week
2013-02-12 18:48:11 +00:00
Marcel Moolenaar
f1acb9d36e Eliminate the PC_CURTHREAD symbol and load the current thread's
thread structure pointer atomically from r13 (the pcpu pointer)
for the current CPU/core.
Add a CTASSERT in machdep.c to make sure that pc_curthread is in
fact the first field in struct pcpu.

The only non-atomic operations left were those related to process-
space operations, such as casuword, subyte, suword16, fubyte,
fuword16, copyin, copyout and their variations.

The casuword function has been re-structured more complete than
the others. This way we have an example of a better bundling
without introducing a lot of risk when we get it wrong. The
other functions can be rebundled in separate commits and with
the appropriate testing.
2013-02-12 17:38:35 +00:00
Marcel Moolenaar
22aa5c496b Eliminate padding by moving 'narg' next to 'code'. Both are 32-bit
entities in the syscall_args structure that otherwise has 64-bit
only fields.
2013-02-12 17:24:41 +00:00
Konstantin Belousov
dd0b4fb6d5 Reform the busdma API so that new types may be added without modifying
every architecture's busdma_machdep.c.  It is done by unifying the
bus_dmamap_load_buffer() routines so that they may be called from MI
code.  The MD busdma is then given a chance to do any final processing
in the complete() callback.

The cam changes unify the bus_dmamap_load* handling in cam drivers.

The arm and mips implementations are updated to track virtual
addresses for sync().  Previously this was done in a type specific
way.  Now it is done in a generic way by recording the list of
virtuals in the map.

Submitted by:	jeff (sponsored by EMC/Isilon)
Reviewed by:	kan (previous version), scottl,
	mjacob (isp(4), no objections for target mode changes)
Discussed with:	     ian (arm changes)
Tested by:	marius (sparc64), mips (jmallet), isci(4) on x86 (jharris),
	amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)
2013-02-12 16:57:20 +00:00
Marcel Moolenaar
44c169253d Now that we actually use more memory descriptors, make sure to dump
them as well.
2013-02-12 16:51:43 +00:00
Sergey Kandaurov
e6043cf0e1 o Bring in sync decoding the first nfssvc(2) parameter (flags) with
the current definitions location.
o Respect numbers in NFSSVC_* (e.g. NFSSVC_V4ROOTEXPORT).

MFC after:	1 week
2013-02-12 13:01:34 +00:00
Gleb Smirnoff
23f4fd6da4 Substitute '#ifdef ALIGNED_POINTER' with '#ifndef __NO_STRICT_ALIGNMENT',
since the former is defined everywhere. This cuts off some code not
necessary on non strict aligment arches.

Reviewed by:	adrian
Sponsored by:	Nginx, Inc.
2013-02-12 11:24:37 +00:00
Oleksandr Tymoshenko
bb2902189e Remove debug output 2013-02-12 07:27:40 +00:00
Andrew Turner
b27ca6313e When clang builds libc it may insert calls to __aeabi_* functions. Normally
this is not a problem as they are resolved by libgcc. The exception is for
the __aeabi_mem* functions. These call back into libc to the appropriate
function. This causes issues for static binaries as we only link against
libc once so there is no way for it to call into libgcc and back.

The fix for this is to include these symbols in libc but keep them hidden
so binaries use the libgcc version.
2013-02-12 06:04:51 +00:00
Andrew Turner
8a166cafe0 Allow us to build clang for ARM EABI. Clang and llvm use the
arm-gnueabi-freebsd10.0 triple for EABI. Use this when we are on arm or
armv6 and are building for EABI.

Reviewed by:	dim
2013-02-12 05:56:00 +00:00
Pawel Jakub Dawidek
04f5c32651 Style. 2013-02-11 23:14:54 +00:00
Marius Strobl
18716f9f4b Update comments to reflect r246689. 2013-02-11 23:05:10 +00:00
Pawel Jakub Dawidek
9270ed9d38 Style. 2013-02-11 22:54:23 +00:00
Marius Strobl
bdc5f0172e Make SYSCTL_{LONG,QUAD,ULONG,UQUAD}(9) work as advertised and also handle
constant values.

Reviewed by:	kib
MFC after:	3 days
2013-02-11 21:50:00 +00:00
Martin Matuska
6a33bbc041 Merge zfs_ioctl.c code that should have been merged together with ZFS v28.
Fixes several problems if working with read-only pools.

Changed code originaly introduced in onnv-gate 13061:bda0decf867b
Contains changes up to illumos-gate 13700:4bc0783f6064

PR:		kern/175897
Suggested by:	avg

MFC after:	2 weeks
2013-02-11 21:10:55 +00:00
Michael Tuexen
2416af26a0 Send the adaptation layer indication only if set by the user.
MFC after: 3 days
Discussed with: rrs
2013-02-11 21:02:49 +00:00
Neel Natu
485b3300cc Implement guest vcpu pinning using 'pthread_setaffinity_np(3)'.
Prior to this change pinning was implemented via an ioctl (VM_SET_PINNING)
that called 'sched_bind()' on behalf of the user thread.

The ULE implementation of 'sched_bind()' bumps up 'td_pinned' which in turn
runs afoul of the assertion '(td_pinned == 0)' in userret().

Using the cpuset affinity to implement pinning of the vcpu threads works with
both 4BSD and ULE schedulers and has the happy side-effect of getting rid
of a bunch of code in vmm.ko.

Discussed with:	grehan
2013-02-11 20:36:07 +00:00
Xin LI
f667ff300d Use the right year.
Noticed by:	Denis Ahrens <denis h3q com>
2013-02-11 18:22:26 +00:00
Martin Matuska
9689178c3f MFV r246633:
Import vendor bugfixes regarding SA rounding, header size and layout.
This was already partially fixed by avg.

Illumos ZFS issues:
  3512 rounding discrepancy in sa_find_sizes()
  3513 mismatch between SA header size and layout

References:
  https://www.illumos.org/issues/3512
  https://www.illumos.org/issues/3513

MFC after:	2 weeks
2013-02-11 14:29:38 +00:00
Martin Matuska
bb03847418 MFV r246394:
Add tunable to allow block allocation on degraded vdevs.

Illumos ZFS issues:
  3507 Tunable to allow block allocation even on degraded vdevs

References:
  https://www.illumos.org/issues/3507

MFC after:	2 weeks
2013-02-11 13:59:57 +00:00
Michael Tuexen
c53f854a17 Don't send kernel provided information in the User Initiated
ABORT cause, since the user can also provide this kind of
information. So the receiver doesn't know who provided the
information.
While there: Fix a bug where the stack would send a malformed
ABORT chunk when using a send() call with SCTP_ABORT|SCT_SENDALL
flags.

MFC after: 3 days
2013-02-11 13:57:03 +00:00
Sergey Kandaurov
b57181586c Major update for unix_cmsg from Andrey Simonenko.
Quoting the submitter:
- Added tests for SCM_BINTIME, LOCAL_PEERCRED, cmsghdr.cmsg_len
- Code that checks correctness of groups was corrected (getgroups(2) change)
- unix_cmsg.c was completely redesigned and simplified
- Use less timeout value in unix_cmsg.c for faster work
- Added support for not sending data in a message, not sending data and
  data array associated with a cmsghdr structure in a message
- Existent tests were improved
- unix_cmsg.t was redesigned and simplified

Correctness of unix_cmsg verified on 7.1-STABLE, 9.1-STABLE and 10-CURRENT.

PR:		bin/131567
Submitted by:	Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
MFC after:	2 weeks
2013-02-11 12:56:23 +00:00
Martin Matuska
ff20578569 MFV r246392:
Import vendor ZFS bugfix fixing a possible deadlock in arc_read().

Illumos ZFS issues:
  3498 panic in arc_read(): !refcount_is_zero(&pbuf->b_hdr->b_refcnt)

References:
  https://www.illumos.org/issues/3498

MFC after:	2 weeks
2013-02-11 12:42:11 +00:00
Oleksandr Tymoshenko
2655166c71 A10 reset mechanism is the same for all boards in this family so remove
redundant reset function implementation pointer. We might want to
ressurect it later when support for other Allwinner chips is introduced.
2013-02-11 11:33:56 +00:00
Oleksandr Tymoshenko
3748deb755 Add watchdog driver for Allwinner A10 2013-02-11 11:31:23 +00:00
Gleb Smirnoff
24421c1c32 Resolve source address selection in presense of CARP. Add a couple
of helper functions:

- carp_master()   - boolean function which is true if an address
		    is in the MASTER state.
- ifa_preferred() - boolean function that compares two addresses,
		    and is aware of CARP.

  Utilize ifa_preferred() in ifa_ifwithnet().

  The previous version of patch also changed source address selection
logic in jails using carp_master(), but we failed to negotiate this part
with Bjoern. May be we will approach this problem again later.

Reported & tested by:	Anton Yuzhaninov <citrin citrin.ru>
Sponsored by:		Nginx, Inc
2013-02-11 10:58:22 +00:00
Sergey Kandaurov
98744c5a84 Cross-reference vfs_unbusy(9).
MFC after:	1 week
2013-02-11 10:14:12 +00:00
Brooks Davis
711781606d Add -lheimntlm to LDADD directly.
With the current binutils, symbols from libheimtlm.so are loaded because
it is referenced by DT_NEEDED.  This feature is not implemented in
mclinker (https://code.google.com/p/mclinker/issues/detail?id=104).
I encountered the same issue when linking with a recent devel/binutils
invoked via clang.  This was the only use of DT_NEEDED in the tree so
removing it simplifies toolchain requirements.

Submitted by:	Pete Chou <petechou@gmail.com> (mclinker issue)
2013-02-11 09:45:24 +00:00
Rui Paulo
392c880066 Use DEVMETHOD_END. 2013-02-11 08:20:21 +00:00
Adrian Chadd
53a835d2db Put this back into the ath taskqueue rather than the ath TX taskqueue.
This now should mean all the entry points into the software TX
scheduler are back in the same taskqueue.
2013-02-11 07:49:40 +00:00
Martin Matuska
8a2dc7faae MFV r246390:
Import minor type change in refcount.h header from vendor (illumos).

MFC after:	2 weeks
2013-02-11 07:48:57 +00:00
Adrian Chadd
a40880ade4 Go back to direct-dispatch of the software queue and frame TX paths
when they're being called from the TX completion handler.

Going (back) through the taskqueue is just adding extra locking and
latency to packet operations.  This improves performance a little bit
on most NICs.

It still hasn't restored the original performance of the AR5416 NIC
but the AR9160, AR9280 and later NICs behave very well with this.

Tested:

* AR5416 STA (still tops out at ~ 70mbit TCP, rather than 150mbit TCP..)
* AR9160 hostap (good for both TX and RX)
* AR9280 hostap (good for both TX and RX)
2013-02-11 07:48:26 +00:00
Adrian Chadd
0a83addd18 Teach athalq about the recent if_ath_alq timestamp format change. 2013-02-11 02:54:24 +00:00
Adrian Chadd
81561d0459 Extend the timestamp to be a timeval, rather than ticks.
This makes it easier to see TX and RX buffer latencies.
2013-02-11 02:48:49 +00:00
Tim Kientzle
53d21f0bbe Provide verbose help for fdt commands on platforms that use it. 2013-02-11 02:15:26 +00:00
Pawel Jakub Dawidek
6a9f247c85 Capability rights for process management via process descriptors do exist
already, so uncomment them.

Sponsored by:	The FreeBSD Foundation
2013-02-11 00:10:35 +00:00
Pawel Jakub Dawidek
42f997ba53 Add CAP_MKNOD right.
Sponsored by:	The FreeBSD Foundation
2013-02-10 23:51:26 +00:00
Jilles Tjoelker
ad7d20c921 fts: Use O_DIRECTORY when opening name that might be changed by attacker.
There are uncommon cases where fts_safe_changedir() may be called with a
non-NULL name that is not "..". Do not block or worse if an attacker put (a
(symlink to) a fifo or device where a directory used to be.

MFC after:	1 week
2013-02-10 23:09:15 +00:00
Konstantin Belousov
2871baa49a Remove the ia64-specific code fragment, which effect is more cleanly
done by the call to trans_prot() function a line before.

Discussed with:	Oliver Pinter <oliver.pntr@gmail.com>
MFC after:	1 week
2013-02-10 20:08:33 +00:00
Michael Tuexen
f0d44a49a0 Make sure that received packets for removed addresses are handled
consistently. While there, make variable names consistent.

MFC after: 3 days
2013-02-10 19:57:19 +00:00
Pedro F. Giffuni
a9d1b29995 ext2fs: Use prototype declarations for function definitions
Submitted by:	Christoph Mallon
MFC after:	2 weeks
2013-02-10 19:49:37 +00:00
Martin Matuska
f1a1c55d51 Update vendor-sys/illumos/dist to illumos-gate version 13949:4f6a155f70fe
Illumos ZFS issues:
  3512 rounding discrepancy in sa_find_sizes()
  3513 mismatch between SA header size and layout
2013-02-10 19:41:19 +00:00
Neel Natu
f37ba72632 Use the entire 64 bits of 'bar.pbi_length' when printing the bar size.
This allows bar sizes greater than or equal to 4GB to be displayed correctly.
2013-02-10 19:35:40 +00:00
Martin Matuska
fd9778c236 MFV r246388:
Import vendor bugfixes

Illumos ZFS issues:
  3422 zpool create/syseventd race yield non-importable pool
  3425 first write to a new zvol can fail with EFBIG

References:
  https://www.illumos.org/issues/3422
  https://www.illumos.org/issues/3425

MFC after:	2 weeks
2013-02-10 19:32:55 +00:00
Andrey V. Elsukov
c6e31e81e0 Add bootcamp support to the loader.
Tested by:	dchagin
MFC after:	1 week
2013-02-10 19:27:17 +00:00
Michael Tuexen
4224e03ae7 Improve code style. No functional change.
MFC after: 3 days
2013-02-10 19:21:17 +00:00
Jilles Tjoelker
17ef6d3ab8 find: Run when cwd cannot be opened, except with -execdir or -delete.
fts(3) can run (albeit more slowly and imposing the {PATH_MAX} limit) when
the current directory cannot be opened. Therefore, do not make a failure to
open the current directory (for returning to it later in -exec) fatal.

If -execdir or -delete are used, the expectation is that fts(3) will use
chdir to avoid race conditions (except for -execdir with -L). Do not break
this expectation any more than it already is by still failing if the current
directory cannot be opened.
2013-02-10 18:56:37 +00:00
Colin Percival
4bd1e0bbf8 Don't try to suppress the inclusion of the build date in named's version
string by undefining __DATE__, since (unlike gcc) clang doesn't allow us
to do that.  Instead, define NO_VERSION_DATE, which was helpfully added
to the named source code for exactly this purpose.
2013-02-10 17:58:44 +00:00