]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoRevert inadvertent commit of an incorrect patch
Dag-Erling Smørgrav [Tue, 24 Nov 2015 16:07:03 +0000 (16:07 +0000)]
Revert inadvertent commit of an incorrect patch

8 years agoRemove description of the now-defunct NoneEnabled option.
Dag-Erling Smørgrav [Tue, 24 Nov 2015 16:06:15 +0000 (16:06 +0000)]
Remove description of the now-defunct NoneEnabled option.

8 years agoCorrect alignment of the addresses in the `netstat -aW' output.
Hajimu UMEMOTO [Tue, 24 Nov 2015 14:25:40 +0000 (14:25 +0000)]
Correct alignment of the addresses in the `netstat -aW' output.

8 years agoFlush all kernel mappings from TLB(s) in time when they are cleared.
Svatopluk Kraus [Tue, 24 Nov 2015 13:57:41 +0000 (13:57 +0000)]
Flush all kernel mappings from TLB(s) in time when they are cleared.
Replace tlb_flush_local() by tlb_flush() as even not global mappings
could be fetched to TLB(s) on other cores by speculative table walk.

From OS point of view, it was not a problem as either such mappings
were not used anymore or they were flushed from TLB(s) when reused.
However, from hardware point of view, it was a problem. Not flushed
mappings could be a target for speculative reads or prefetches (which
might be quite aggresive on ARM cores). As speculative read can fill
cacheline, it can cause a real problem, when physical page is reused,
but mapped with different memory attributes.

Anyhow, it's good to have only valid mappings in TLB(s).

Approved by: kib (mentor)

8 years agoAdd myself (lidl) to the calendar.freebsd file.
Kurt Lidl [Tue, 24 Nov 2015 13:47:21 +0000 (13:47 +0000)]
Add myself (lidl) to the calendar.freebsd file.

Approved by: rpaulo (mentor)
Differential Revision: https://reviews.freebsd.org/D4264

8 years agoAdd some defines needed by the coming mlx5 infiniband support.
Hans Petter Selasky [Tue, 24 Nov 2015 12:11:56 +0000 (12:11 +0000)]
Add some defines needed by the coming mlx5 infiniband support.

Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoAdd missing error check after xo_parse_args() in netstat(8).
Hajimu UMEMOTO [Tue, 24 Nov 2015 11:07:37 +0000 (11:07 +0000)]
Add missing error check after xo_parse_args() in netstat(8).

Submitted by: Oliver Pinter
Differential Revision: https://reviews.freebsd.org/D4233

8 years agoAdd support for moving the DMAP range. This is needed as some AMD SoCs
Andrew Turner [Tue, 24 Nov 2015 11:01:43 +0000 (11:01 +0000)]
Add support for moving the DMAP range. This is needed as some AMD SoCs
place physical memory at an address outside the old DMAP range. This is an
issue as we rely on being able to move from PA -> VA using this range.

Obtained from: Patrick Wildt <patrick@bitrig.org> (earlier version)
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D3885

8 years agoRework the vnode cache recycling to meet free and unused vnodes
Konstantin Belousov [Tue, 24 Nov 2015 09:45:36 +0000 (09:45 +0000)]
Rework the vnode cache recycling to meet free and unused vnodes
targets.  See the comment above wantfreevnodes variable for the
description of the algorithm.

The vfs.vlru_alloc_cache_src sysctl is removed.  New code frees
namecache sources as the last chance to satisfy the highest watermark,
instead of selecting the source vnodes randomly. This provides good
enough behaviour to keep vn_fullpath() working in most situations.
The filesystem layout with deep trees, where the removed knob was
required, is thus handled automatically.

Submitted by: bde
Discussed with: mckusick
Tested by: pho
MFC after: 1 month

8 years agoOn PowerPC 64bit, the linux-compat mb() definition is implemented with
Konstantin Belousov [Tue, 24 Nov 2015 09:13:21 +0000 (09:13 +0000)]
On PowerPC 64bit, the linux-compat mb() definition is implemented with
lwsync instruction, which does not provide Store/Load barrier.  Fix
this by using "full" sync barrier for mb().

atomic_store_rel() does not need full barrier, change mb() call there
to the lwsync instruction if not hitting the known CPU erratas
(i.e. on 32bit).  Provide powerpc_lwsync() helper to isolate the
lwsync/sync compile time selection, and use it in atomic_store_rel()
and several other places which duplicate the code.

Noted by: alc
Reviewed and tested by: nwhitehorn
Sponsored by: The FreeBSD Foundation

8 years agoAdd dependency to uether.
Kevin Lo [Tue, 24 Nov 2015 08:34:48 +0000 (08:34 +0000)]
Add dependency to uether.

Reviewed by: hselasky

8 years agoRemove unneeded libutil dependency for sendmail.
Bryan Drewery [Tue, 24 Nov 2015 04:19:55 +0000 (04:19 +0000)]
Remove unneeded libutil dependency for sendmail.

It included libutil.h for setproctitle(3), which was moved from libutil to libc
in r65353 in 2000.

Reviewed by: gshapiro [sendmail change]
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4261

8 years agobc(1): Fix memory corruption issues
Pedro F. Giffuni [Tue, 24 Nov 2015 04:15:13 +0000 (04:15 +0000)]
bc(1): Fix memory corruption issues

Fix crashes and hangs found by AFL.
Improve handling of non-ascii chars.

Obtained from: OpenBSD (CVS rev 1.49)

8 years ago[ath] migrate ioctl and busdma memory operations out into separate source files.
Adrian Chadd [Tue, 24 Nov 2015 03:42:58 +0000 (03:42 +0000)]
[ath] migrate ioctl and busdma memory operations out into separate source files.

This should be a big no-op pass; and reduces the size of if_ath.c.

I'm hopefully soon going to take a whack at the USB support for ath(4)
and this'll require some reuse of the busdma memory code.

8 years agoCompute the median of the data set as the midpoint between the two middle
Marcelo Araujo [Tue, 24 Nov 2015 02:30:59 +0000 (02:30 +0000)]
Compute the median of the data set as the midpoint between the two middle
values when the data set has an even number of elements.

PR: 201582
Submitted by: Marcus Reid <marcus@blazingdot.com>
Reviewed by: imp
Approved by: bapt (mentor)

8 years agoConnect ypldap(8) to the build.
Marcelo Araujo [Tue, 24 Nov 2015 02:27:59 +0000 (02:27 +0000)]
Connect ypldap(8) to the build.

Approved by: bapt (mentor)

8 years agoFix ld not respecting --sysroot.
Bryan Drewery [Tue, 24 Nov 2015 00:49:29 +0000 (00:49 +0000)]
Fix ld not respecting --sysroot.

ld(1) uses the /usr/libdata/ldscripts when linking. These scripts add in the
default search paths of /lib and /usr/lib via 'SEARCH_DIR("DIR")'. These
need to be prefixed by '=' so that the --sysroot flag is respected. This
is not a problem with buildworld since the TOOLS_PREFIX is baked into the
cross-ld. However it is a problem when trying to use ld(1) with --sysroot
anywhere else as it ends up still reading /lib and /usr/lib despite --sysroot.

The default --sysroot (TARGET_SYSTEM_ROOT) is '/' for /usr/bin/ld.

I found this while building with META MODE with uses only --sysroot with
/usr/bin/ld, and found that libraries that I had not built in its sysroot
directory were leaking in. This didn't happen with ports binutils either.  This
would also impact external compiler support.

Reviewed by: bapt, brooks
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4262

8 years agoAdd a new -B flag for use with list mode (-l) that lists details about
John Baldwin [Mon, 23 Nov 2015 23:48:07 +0000 (23:48 +0000)]
Add a new -B flag for use with list mode (-l) that lists details about
bridges.  Currently this includes information about what resources a
bridge decodes on the upstream side for use by downstream devices including
bus numbers, I/O port resources, and memory resources.  Windows and bus
ranges are enumerated for both PCI-PCI bridges and PCI-CardBus bridges.

To simplify the implementation, all enumeration is done by reading the
appropriate config space registers directly rather than querying the
bridge driver in the kernel via new ioctls.  This does result in a few
limitations.

First, an unimplemented window in a PCI-PCI bridge cannot be accurately
detected as accurate detection requires writing to the window base
register.  That is not safe for pciconf(8).  Instead, this assumes that
any window where both the base and limit read as all zeroes is
unimplemented.

Second, the PCI-PCI bridge driver in a tree has a few quirks for
PCI-PCI bridges that use subtractive decoding but do not indicate that
via the progif config register.  The list of quirks is duplicated in
pciconf's source.

Reviewed by: imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4171

8 years agocolldef(1) and mklocale(1) reappeared in r291115.
Jung-uk Kim [Mon, 23 Nov 2015 23:36:57 +0000 (23:36 +0000)]
colldef(1) and mklocale(1) reappeared in r291115.

8 years agoThere seems to be no reason to duplicate CANONICALOBJDIR logic from bsd.obj.mk,
Bryan Drewery [Mon, 23 Nov 2015 23:04:52 +0000 (23:04 +0000)]
There seems to be no reason to duplicate CANONICALOBJDIR logic from bsd.obj.mk,
which is included for crunchgen builds.

No change in build output occurred with this change.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd destroy_object callback to object rewriting framework.
Andrey V. Elsukov [Mon, 23 Nov 2015 22:06:55 +0000 (22:06 +0000)]
Add destroy_object callback to object rewriting framework.
It is called when last reference to named object is going to be released
and allows to do additional cleanup for implementation of named objects.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

8 years agoRemove "disable" hint, which duplicates system-wide "disabled".
Alexander Motin [Mon, 23 Nov 2015 20:44:49 +0000 (20:44 +0000)]
Remove "disable" hint, which duplicates system-wide "disabled".

8 years agoRevert r291170
Enji Cooper [Mon, 23 Nov 2015 19:44:39 +0000 (19:44 +0000)]
Revert r291170

The mlx5* driver(s) are built [*]/installed separate from the OFED stack thanks
to recent refactoring done in the linuxkpi(4) module.

Always install the manpages instead of conditionally installing them if
MK_OFED != no

* Further refactoring of sys/ofed and linuxkpi(4) is pending to fully divorce
  mlx5* from ofed headers

MFC after: never
Requested by: hps

8 years agonewfs_msdos: rework error handling for eventual use in makefs
Ed Maste [Mon, 23 Nov 2015 18:58:00 +0000 (18:58 +0000)]
newfs_msdos: rework error handling for eventual use in makefs

Return -1 on errors from mkfs_msdos() instead of err()/errx(), to
allow different consumers to handle errors as appropriate.

Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation

8 years agoUpdate $NetBSD$ ID
Ed Maste [Mon, 23 Nov 2015 18:56:10 +0000 (18:56 +0000)]
Update $NetBSD$ ID

NetBSD mkfs_msdos.h rev 1.3 removed the no-endorsement clause from the
license block, which had already been done in the source I imported in
r289629.

8 years agoThe buffer passed to an sbuf drain callback is not necessarily
Mark Johnston [Mon, 23 Nov 2015 18:45:35 +0000 (18:45 +0000)]
The buffer passed to an sbuf drain callback is not necessarily
null-terminated, so don't assume that it is.

Reported by: pho
X-MFC-With: r291059

8 years agoUse #ifdef to get the file compiling without errors
Andrew Turner [Mon, 23 Nov 2015 18:20:32 +0000 (18:20 +0000)]
Use #ifdef to get the file compiling without errors

8 years agoProvide support for userland binaries using the new ELFv2 ABI. This is a
Nathan Whitehorn [Mon, 23 Nov 2015 17:07:51 +0000 (17:07 +0000)]
Provide support for userland binaries using the new ELFv2 ABI. This is a
new, simplified, ELF ABI that avoids some of the stranger aspects of the
existing 64-bit PowerPC ABI (function descriptors, in particular). Actually
generating such executables requires a new version of binutils and a newer
compiler (either GCC or clang) than GCC 4.2.1.

8 years agoOnly enable the first interrupt for now, we don't correctly configure or
Andrew Turner [Mon, 23 Nov 2015 17:05:28 +0000 (17:05 +0000)]
Only enable the first interrupt for now, we don't correctly configure or
route interrupts to the needed cpu.

Sponsored by: ABT Systems Ltd

8 years agoFix target mode support for Qlogic 2200 FC adapters.
Alexander Motin [Mon, 23 Nov 2015 15:49:50 +0000 (15:49 +0000)]
Fix target mode support for Qlogic 2200 FC adapters.

Now target mode works for all supported FC adapters except ancient 2100,
which is not tested.

8 years agoFix dumpon compatibility with dumpdev kenv
Steven Hartland [Mon, 23 Nov 2015 14:06:21 +0000 (14:06 +0000)]
Fix dumpon compatibility with dumpdev kenv

The dumpdev kenv supports devices without the /dev/ prefix, fix dumpon to
also support this which is required after r288153.

MFC after: 1 week
Sponsored by: Multiplay

8 years agoFix inconsistent use of malloc type for cdev private data.
Svatopluk Kraus [Mon, 23 Nov 2015 13:23:53 +0000 (13:23 +0000)]
Fix inconsistent use of malloc type for cdev private data.
Remove M_VCHIQ malloc type, now not used anywhere.

Reviewed by: gonzo
Approved by: kib (mentor)

8 years agoFix compile warning about shifting signed negative constant.
Hans Petter Selasky [Mon, 23 Nov 2015 12:55:37 +0000 (12:55 +0000)]
Fix compile warning about shifting signed negative constant.

MFC after: 3 days

8 years agoRetire the NONE cipher option.
Dag-Erling Smørgrav [Mon, 23 Nov 2015 12:48:13 +0000 (12:48 +0000)]
Retire the NONE cipher option.

8 years agomarkup fixes
Dag-Erling Smørgrav [Mon, 23 Nov 2015 12:47:08 +0000 (12:47 +0000)]
markup fixes

8 years agoRevert r291142.
Svatopluk Kraus [Mon, 23 Nov 2015 11:19:00 +0000 (11:19 +0000)]
Revert r291142.

The not quite consistent logic for bounce pages allocation is utilizited
by re(4) interface which can hang now.

Approved by: kib (mentor)

8 years agoRip off target mode support for parallel SCSI QLogic adapters.
Alexander Motin [Mon, 23 Nov 2015 10:06:19 +0000 (10:06 +0000)]
Rip off target mode support for parallel SCSI QLogic adapters.

Hacks to enable target mode there complicated code, while didn't really
work.  And for outdated hardware fixing it is not really interesting.

Initiator mode tested with Qlogic 1080 adapter is still working fine.

8 years agoIntegrate contrib/netbsd-tests/kernel/t_mqueue into the FreeBSD test
Enji Cooper [Mon, 23 Nov 2015 09:17:25 +0000 (09:17 +0000)]
Integrate contrib/netbsd-tests/kernel/t_mqueue into the FreeBSD test
suite as tests/sys/kern/mqueue_test

MFC after: 1 week

8 years agoFix up convert.c generation
Enji Cooper [Mon, 23 Nov 2015 09:15:20 +0000 (09:15 +0000)]
Fix up convert.c generation

- Use a temporary file for convert.c to reduce likelihood of an interrupted
  build resulting in bad code being written to convert.c
- Truncate the file instead of appending to it to ensure that the file being
  touched will not result in duplicate declarations/definitions from
  kern_acct.c if/when kern_acct.c changes.

MFC after: 1 week

8 years agoUse __MAKE_SHELL instead of HOST_SHELL when generating aton_ether_subr.c
Enji Cooper [Mon, 23 Nov 2015 07:57:41 +0000 (07:57 +0000)]
Use __MAKE_SHELL instead of HOST_SHELL when generating aton_ether_subr.c
(HOST_SHELL is used in NetBSD)

This fixes permission denied issues when gen_ether_subr is not executable

MFC after: 3 days
Reported by: José Pérez <fbl@aoek.com>
Suggested by: bdrewery, sjg

8 years agoSplit kerne timekeep ABI structure vdso_sv_tk out of the struct
Konstantin Belousov [Mon, 23 Nov 2015 07:09:35 +0000 (07:09 +0000)]
Split kerne timekeep ABI structure vdso_sv_tk out of the struct
sysentvec.  This allows the timekeep data to be shared between similar
ABIs which cannot share sysentvec.

Make the timekeep_push_vdso() tick callback to the timekeep structures
instead of sysentvecs.  If several sysentvec share the vdso_sv_tk
structure, we would update the userspace data several times on each
tick, without the change.

Only allocate vdso_sv_tk in the exec_sysvec_init() sysinit when
sysentvec is marked with the new SV_TIMEKEEP flag.  This saves
allocation and update of unneeded vdso_sv_tk for ABIs which do not
provide userspace gettimeofday yet, which are PowerPCs arches right
now.

Make vdso_sv_tk allocator public, namely split out and export
alloc_sv_tk() and alloc_sv_tk_compat32().  ABIs which share timekeep
data now can allocate it manually and share as appropriate.

Requested by: nwhitehorn
Tested by: nwhitehorn, pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoInstall mce(4) and mlx5en(4) if MK_OFED != no
Enji Cooper [Mon, 23 Nov 2015 00:43:23 +0000 (00:43 +0000)]
Install mce(4) and mlx5en(4) if MK_OFED != no

MFC after: 1 week

8 years agoBump .Dd
Enji Cooper [Mon, 23 Nov 2015 00:40:08 +0000 (00:40 +0000)]
Bump .Dd

8 years ago- Fix bad double space between HW and LRO
Enji Cooper [Mon, 23 Nov 2015 00:39:48 +0000 (00:39 +0000)]
- Fix bad double space between HW and LRO
- Fix improperly capitalized `interface`

MFC after: 1 week

8 years agoBump .Dd
Enji Cooper [Sun, 22 Nov 2015 23:16:15 +0000 (23:16 +0000)]
Bump .Dd

8 years agoRecommend cc -Wall instead of gcc -Wall
Enji Cooper [Sun, 22 Nov 2015 23:15:44 +0000 (23:15 +0000)]
Recommend cc -Wall instead of gcc -Wall

MFC after: 1 week

8 years agoDon't explicitly set INET/INET6 in the Makefile; opt_inet.h and opt_inet6.h
Enji Cooper [Sun, 22 Nov 2015 23:07:07 +0000 (23:07 +0000)]
Don't explicitly set INET/INET6 in the Makefile; opt_inet.h and opt_inet6.h
already do this

MFC after: never (depends on kern.opts.mk; will not be MFCed probably)

8 years agoPrint more detailed info about the disk and partition chosen for booting.
Ian Lepore [Sun, 22 Nov 2015 20:38:50 +0000 (20:38 +0000)]
Print more detailed info about the disk and partition chosen for booting.
No behavioral changes, just cosmetics.

A partition number of zero is not a wildcard, it's the 'a' partition in
a BSD slice, so don't print it as "<auto>".  (Only slices are 1-based,
unit and partition numbers are 0-based and -1 is their wildcard marker.)

Also, after doing all the probing and choosing, print the final result as
"Booting from <disk spec>" where disk spec has all the wildcards resolved
and looks like familiar BSD slice-and-partition notation (disk0s3a, etc).

8 years agoExplicitly call SEND CHANGE REQUEST for pre-24xx chips in target mode.
Alexander Motin [Sun, 22 Nov 2015 17:03:38 +0000 (17:03 +0000)]
Explicitly call SEND CHANGE REQUEST for pre-24xx chips in target mode.

While later firmware always registers for RSCN requests, older one does
it only in initiator mode.  But in target mode there RSCN can be the only
way to detect gone intiator.

8 years agoGenerate fake ISPASYNC_CHANGE_PDB on fake login on pre-24xx.
Alexander Motin [Sun, 22 Nov 2015 16:55:43 +0000 (16:55 +0000)]
Generate fake ISPASYNC_CHANGE_PDB on fake login on pre-24xx.

This makes port scanner fix absent port ID for added initiator.

8 years agoGracefully stop firmware before resetting chip when changing role.
Alexander Motin [Sun, 22 Nov 2015 15:57:54 +0000 (15:57 +0000)]
Gracefully stop firmware before resetting chip when changing role.

8 years agoAdd some more asynchronous event status codes.
Alexander Motin [Sun, 22 Nov 2015 11:44:30 +0000 (11:44 +0000)]
Add some more asynchronous event status codes.

8 years agoAdd mode mailbox command codes.
Alexander Motin [Sun, 22 Nov 2015 11:13:09 +0000 (11:13 +0000)]
Add mode mailbox command codes.

8 years agoRecord proper commit message for r291157.
Konstantin Belousov [Sun, 22 Nov 2015 09:50:13 +0000 (09:50 +0000)]
Record proper commit message for r291157.

The r289895 revision did not accounted for the block containing the
requested page, when calculating the run of pages.  Include the pages
before/after the requested page, that fit into the reqblock, into the
calculation.

Noted by: glebius
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoNoted by: glebius
Konstantin Belousov [Sun, 22 Nov 2015 09:48:03 +0000 (09:48 +0000)]
Noted by: glebius
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoIgnore the inbound checksum flags when doing packet forwarding in netvsc driver.
Wei Hu [Sun, 22 Nov 2015 05:26:13 +0000 (05:26 +0000)]
Ignore the inbound checksum flags when doing packet forwarding in netvsc driver.

PR: 20363
Submitted by: whu
Reviewed by: royger, whu
Approved by: royger
MFC after: 1 week
Relnotes: No
Sponsored by: Microsoft OSTC
Differential Revision:  https://reviews.freebsd.org/D4131

8 years agobc: sync with OpenBSD
Pedro F. Giffuni [Sun, 22 Nov 2015 02:43:14 +0000 (02:43 +0000)]
bc: sync with OpenBSD

tty.c Rev. 1.3
Avoid unintended problems with operator precedence when doing an
assignment and comparison.

bc.1, Rev. 1.31, 1.32
'.Ql Quit' -> '.Ql quit' because only the lowercase command is valid.
Clarify sentence about `quit` in BUGS section.

extern.h, Rev. 1.12
whitespace

bc.y, Rev. 1.47
Prefer setvbuf() to setlinebuf() for portability

Obtained from: OpenBSD
MFC after: 2 weeks

8 years ago[mips]: Don't hard-code PHYS_AVAIL_ENTRIES.
Adrian Chadd [Sun, 22 Nov 2015 02:40:19 +0000 (02:40 +0000)]
[mips]: Don't hard-code PHYS_AVAIL_ENTRIES.

8 years agoRemove unneeded includes of opt_kdtrace.h.
Mark Johnston [Sun, 22 Nov 2015 02:01:01 +0000 (02:01 +0000)]
Remove unneeded includes of opt_kdtrace.h.

As of r258541, KDTRACE_HOOKS is defined in opt_global.h, so opt_kdtrace.h
is not needed when defining SDT(9) probes.

8 years agoRemove a debug panic that crept into r291151
Justin Hibbits [Sun, 22 Nov 2015 01:20:36 +0000 (01:20 +0000)]
Remove a debug panic that crept into r291151

8 years agoModernize mpc85xx PCI hostbridge driver.
Justin Hibbits [Sun, 22 Nov 2015 01:16:43 +0000 (01:16 +0000)]
Modernize mpc85xx PCI hostbridge driver.

Summary:
* Take advantage of NEW_PCIB to remove a lot of setup code.
* Fix some bugs related to multiple PCI bridges.

There's still room for more cleanup, and still some bugs leftover, but this
cleans up a lot.

Test Plan: Tested on P5020 board with IDT PCIe switch.

Differential Revision: https://reviews.freebsd.org/D4127

8 years agoWhen the nfsd threads are terminated, the NFSv4 server state
Rick Macklem [Sat, 21 Nov 2015 23:55:46 +0000 (23:55 +0000)]
When the nfsd threads are terminated, the NFSv4 server state
(opens, locks, etc) is retained, which I believe is correct behaviour.
However, for NFSv4.1, the server also retained a reference to the xprt
(RPC transport socket structure) for the backchannel. This caused
svcpool_destroy() to not call SVC_DESTROY() for the xprt and allowed
a socket upcall to occur after the mutexes in the svcpool were destroyed,
causing a crash.
This patch fixes the code so that the backchannel xprt structure is
dereferenced just before svcpool_destroy() is called, so the code
does do an SVC_DESTROY() on the xprt, which shuts down the socket upcall.

Tested by: g_amanakis@yahoo.com
PR: 204340
MFC after: 2 weeks

8 years agoUpdate the imx5/imx6 cpu_reset() implementation based on a new understanding
Ian Lepore [Sat, 21 Nov 2015 23:30:47 +0000 (23:30 +0000)]
Update the imx5/imx6 cpu_reset() implementation based on a new understanding
of the SRS (software reset) bit in the watchdog control register.  Despite
what the manual seems to imply, this bit DOES trigger an immediate reset, as
opposed to simply flagging the type of reset as software-triggered.

8 years agoAdd a missing brace to fix vmstat -s output.
Mark Johnston [Sat, 21 Nov 2015 23:04:12 +0000 (23:04 +0000)]
Add a missing brace to fix vmstat -s output.

8 years agoIncrease maximal value of vports tunable to 254.
Alexander Motin [Sat, 21 Nov 2015 21:44:11 +0000 (21:44 +0000)]
Increase maximal value of vports tunable to 254.

I am not sure this value is really viable yet, but that is what chips
officially support in NPIV mode (in loop mode maximum is 125).

8 years agoAdd support for Kana and Eisu keys to the USB keyboard driver.
Hans Petter Selasky [Sat, 21 Nov 2015 21:18:55 +0000 (21:18 +0000)]
Add support for Kana and Eisu keys to the USB keyboard driver.

PR: 204709
Submitted by: naito.yuichiro@gmail.com
MFC after: 3 days

8 years agoFix scancodes for Kana and Eisu keys.
Hans Petter Selasky [Sat, 21 Nov 2015 21:14:16 +0000 (21:14 +0000)]
Fix scancodes for Kana and Eisu keys.

PR: 204709
Submitted by: naito.yuichiro@gmail.com
MFC after: 3 days

8 years agoFix target mode with fabric for pre-24xx chips.
Alexander Motin [Sat, 21 Nov 2015 21:01:00 +0000 (21:01 +0000)]
Fix target mode with fabric for pre-24xx chips.

For those chips we are not receiving login events, adding initiators
based on ATIO requests.  But there is no port ID in that structure, so
in fabric mode we have to explicitly fetch it from firmware to be able
to do normal scan after that.

8 years agoUpdate Qlogic 23XX firmware from 3.03.26 to 3.03.28
Alexander Motin [Sat, 21 Nov 2015 20:52:40 +0000 (20:52 +0000)]
Update Qlogic 23XX firmware from 3.03.26 to 3.03.28

8 years agoFix BUS_DMA_MIN_ALLOC_COMP flag logic. When bus_dmamap_t map is being
Svatopluk Kraus [Sat, 21 Nov 2015 19:55:01 +0000 (19:55 +0000)]
Fix BUS_DMA_MIN_ALLOC_COMP flag logic. When bus_dmamap_t map is being
created for bus_dma_tag_t tag, bounce pages should be allocated
only if needed.

Before the fix, they were allocated always if BUS_DMA_COULD_BOUNCE flag
was set but BUS_DMA_MIN_ALLOC_COMP not. As bounce pages are never freed,
it could cause memory exhaustion when a lot of such tags together with
their maps were created.

Note that there could be more maps in one tag by current design.
However BUS_DMA_MIN_ALLOC_COMP flag is tag's flag. It's set after
bounce pages are allocated. Thus, they are allocated only for first
tag's map which needs them.

Approved by: kib (mentor)

8 years agoFix the handling of IPSec policies in the SCTP stack. At least
Michael Tuexen [Sat, 21 Nov 2015 18:21:16 +0000 (18:21 +0000)]
Fix the handling of IPSec policies in the SCTP stack. At least
make sure they are not leaked...

MFC after:  1 week

8 years agoRevert part of r291137 which seems correct, bit does not fix the
Michael Tuexen [Sat, 21 Nov 2015 16:46:59 +0000 (16:46 +0000)]
Revert part of r291137 which seems correct, bit does not fix the
resource problem I'm currently hunting down.

MFC after: 1 week
X-MFC with: 291137

8 years agoDocument why we use -z nonexecstack in the Makefile since it
Warner Losh [Sat, 21 Nov 2015 16:37:11 +0000 (16:37 +0000)]
Document why we use -z nonexecstack in the Makefile since it
is so unusual. Turn off mis-match warnings for building uathload
because the firmware .o file is produced in a way that we
can't get to match exactly. This fixes the build on mips,
so stop excluding it from the build.

8 years agoClear the so_pcb pointer in case of ipsec_init_policy() fails.
Michael Tuexen [Sat, 21 Nov 2015 16:32:14 +0000 (16:32 +0000)]
Clear the so_pcb pointer in case of ipsec_init_policy() fails.

MFC after: 1 week

8 years agoDon't send SHUTDOWN chunk when the association is in a front state
Michael Tuexen [Sat, 21 Nov 2015 16:25:09 +0000 (16:25 +0000)]
Don't send SHUTDOWN chunk when the association is in a front state
and the applications calls shutdown(..., SHUT_WR) or
shutdown(..., SHUT_RDWR).

MFC after: 1 week.

8 years agoMove hdmi_if.m to files.arm so other kernel configs can use it.
Andrew Turner [Sat, 21 Nov 2015 16:25:03 +0000 (16:25 +0000)]
Move hdmi_if.m to files.arm so other kernel configs can use it.

8 years agoCreate device options for the two common ARM timers.
Andrew Turner [Sat, 21 Nov 2015 16:23:56 +0000 (16:23 +0000)]
Create device options for the two common ARM timers.

Sponsored by: ABT Systems Ltd

8 years agoMove more bus_space_* files to be built by files.arm. This leaves the
Andrew Turner [Sat, 21 Nov 2015 15:30:08 +0000 (15:30 +0000)]
Move more bus_space_* files to be built by files.arm. This leaves the
definition in a file.* file under sys/arm/arm in the few cases we need it
for non-fdt platforms.

Sponsored by: ABT Systems Ltd

8 years agoUpdate firmware for QLogic 22xx from 2.02.06 to 2.02.08.
Alexander Motin [Sat, 21 Nov 2015 14:39:57 +0000 (14:39 +0000)]
Update firmware for QLogic 22xx from 2.02.06 to 2.02.08.

8 years agoLimit arm_base_bs_tag to ARMv4 and ARMv5, we only used it in one place in
Andrew Turner [Sat, 21 Nov 2015 13:02:34 +0000 (13:02 +0000)]
Limit arm_base_bs_tag to ARMv4 and ARMv5, we only used it in one place in
armv6 and that can use fdtbus_bs_tag.

8 years agoFix a logic inversion, we should build dtrace on armv6, not on arm and
Andrew Turner [Sat, 21 Nov 2015 12:53:44 +0000 (12:53 +0000)]
Fix a logic inversion, we should build dtrace on armv6, not on arm and
armeb.

8 years agoRevert a modification that crept in and should not
Baptiste Daroussin [Sat, 21 Nov 2015 11:06:20 +0000 (11:06 +0000)]
Revert a modification that crept in and should not

8 years agoSynchronize m4(1) with OpenBSD
Baptiste Daroussin [Sat, 21 Nov 2015 11:05:38 +0000 (11:05 +0000)]
Synchronize m4(1) with OpenBSD

8 years agocolldef(1) does not need the libc's internal collate.h header anymore
Baptiste Daroussin [Sat, 21 Nov 2015 10:52:32 +0000 (10:52 +0000)]
colldef(1) does not need the libc's internal collate.h header anymore

8 years agoAdd API to obtain primary enclosure name and ID for /dev/sesX devices.
Alexander Motin [Sat, 21 Nov 2015 10:22:01 +0000 (10:22 +0000)]
Add API to obtain primary enclosure name and ID for /dev/sesX devices.

sesX device number may change between reboots, so to properly identify
the instance we need more data.  Name and ID reported here may mach ones
reported by SCSI device, but that is not really required by specs.

MFC after: 1 week
Sponsored by: iXsystems, Inc.

8 years agoMFV r291123:
Xin LI [Sat, 21 Nov 2015 09:09:25 +0000 (09:09 +0000)]
MFV r291123:

xz 5.2.2.

MFC after: 1 month
Relnotes: yes

8 years agoVendor import of xz-5.2.2 (trimmed).
Xin LI [Sat, 21 Nov 2015 06:52:06 +0000 (06:52 +0000)]
Vendor import of xz-5.2.2 (trimmed).

8 years agotrunc_page() goes through unsigned long, which is too short.
Justin Hibbits [Sat, 21 Nov 2015 06:03:46 +0000 (06:03 +0000)]
trunc_page() goes through unsigned long, which is too short.

sizeof(unsigned long) < sizeof(vm_paddr_t) on Book-E, which uses 36-bit
addressing.  With this, a CCSR with a physical address above 4GB successfully
maps.

Sponsored by: Alex Perez/Inertial Computing

8 years agoMerge from r290547:
Marius Strobl [Sat, 21 Nov 2015 02:49:33 +0000 (02:49 +0000)]
Merge from r290547:
Since r289279 bufinit() uses mp_ncpus so adapt to what x86 does and
set this variable already in cpu_mp_setmaxid().
While at it, rename cpu_cpuid_prop() to cpu_portid_prop() as well as
the MD cpuid variable to portid to avoid confusion with the MI use
of "cpuid" and make some variable static/global in order to reduce
stack usage.

PR: 204685

8 years agoAvoid a NULL pointer dereference in bounce_bus_dmamap_unload() when
Marius Strobl [Sat, 21 Nov 2015 02:08:47 +0000 (02:08 +0000)]
Avoid a NULL pointer dereference in bounce_bus_dmamap_unload() when
the map has been created via bounce_bus_dmamem_alloc(). In that case
bus_dmamap_unload(9) typically isn't called during normal operation
but still should be during detach, cleanup from failed attach etc.

Submitted by: yongari
MFC after: 3 days

8 years agoRemove a link to the now defunct "Release Engineering of Third Party Packages".
Brad Davis [Sat, 21 Nov 2015 00:35:40 +0000 (00:35 +0000)]
Remove a link to the now defunct "Release Engineering of Third Party Packages".

PR: 202803
Submitted by: Tobias Kortkamp <tobias.kortkamp@gmail.com>
MFC after: 1 week

8 years agomips: teach the malta platform about extended memory.
Adrian Chadd [Sat, 21 Nov 2015 00:22:47 +0000 (00:22 +0000)]
mips: teach the malta platform about extended memory.

Extended memory here is "physical memory above 256MB".
"memsize" in the environment only grows to 256MB; "ememsize" is the entire
memory range.  Extended memory shows up at physical address 0x90000000.

This allows for malta64 VMs to be created with > 256MB RAM, all the way
up to 2GB RAM.

Tested:

* qemu-devel package; qemu-system-mips64 -m 2048 (and -m 256 to test the
  no-ememsize case.)

TODO:

* testing mips32 with > 256MB RAM.

Reviewed by: imp

8 years agoRevert r283330 since it broke directory caching in the client.
Rick Macklem [Sat, 21 Nov 2015 00:15:41 +0000 (00:15 +0000)]
Revert r283330 since it broke directory caching in the client.
At this time I cannot see a way to fix directory caching when it
has partial blocks in the buffer cache, due to the fact that the
syscall's uio_offset won't stay the same as the lblkno * NFS_DIRBLKSIZ
offset.

Reported by: bde
MFC after: 2 weeks

8 years agoRemove remnants of the old NFS from vnode pager.
Gleb Smirnoff [Fri, 20 Nov 2015 23:52:27 +0000 (23:52 +0000)]
Remove remnants of the old NFS from vnode pager.

Reviewed by: kib
Sponsored by: Netflix

8 years agoReintegrate colldef(1) and mklocale(1)
Baptiste Daroussin [Fri, 20 Nov 2015 23:15:05 +0000 (23:15 +0000)]
Reintegrate colldef(1) and mklocale(1)

While those tools are not needed anymore they are necessary to build FreeBSD 9
and 10. it does not hurt to keep those tools around until both 9 and 10 branch
become EOLed.

Modify colldef(1) to build after the change in the collation header, and ensure
it does produce the same collation definition it used to generate for 9 and 10

Reported by: Oliver Pinter

8 years agopopen() requires check for fdopen() failure
Ravi Pokala [Fri, 20 Nov 2015 22:36:41 +0000 (22:36 +0000)]
popen() requires check for fdopen() failure

Move fdopen() up near other resource allocation like malloc(); do proper
deallocation on failure later on in the function.

Submitted by: Ramachandra Topannavar <rtopannavar@panasas.com>
Reviewed by: jilles
Approved by: jhb (mentor)
MFC after: 2 weeks
Sponsored by: Panasas, Inc.
Differential Revision: https://reviews.freebsd.org/D4126

M    lib/libc/gen/popen.c

8 years agoDisconnect unused kgzldr from sys/boot/i386
Ed Maste [Fri, 20 Nov 2015 21:56:20 +0000 (21:56 +0000)]
Disconnect unused kgzldr from sys/boot/i386

Sponsored by: The FreeBSD Foundation

8 years agoAdd support for passing TARGET_CPUTYPE into the build. It's more
Warner Losh [Fri, 20 Nov 2015 21:54:05 +0000 (21:54 +0000)]
Add support for passing TARGET_CPUTYPE into the build. It's more
important for arm and mips than for the more generic x86 systems.

8 years agoAdd aarch64 support to CPUTYPE
Warner Losh [Fri, 20 Nov 2015 21:49:49 +0000 (21:49 +0000)]
Add aarch64 support to CPUTYPE

8 years agoMakeoption ARM_LITLE_ENDIAN does nothing. Remove it since it isn't
Warner Losh [Fri, 20 Nov 2015 21:49:46 +0000 (21:49 +0000)]
Makeoption ARM_LITLE_ENDIAN does nothing. Remove it since it isn't
consistently used. It was a carry over from NetBSD that FreeBSD
doesn't use.