Commit Graph

206877 Commits

Author SHA1 Message Date
Alan Somers
b5bbeb2117 Fix "mount -a" for NFS and ZFS filesystems with shared mountpoints
sbin/mount.c
	Check whether an fstab entry has the same fstype as a mounted
	filesystem before declaring it to be mounted. This will allow NFS
	filesystems that share a mountpoint with a local filesystem to be
	automatically mounted at boot.

	This is not such an unusual situation. For example, if somebody uses
	the standard installer with a ZFS root, he'll get a /usr/home
	filesystem, even though he may choose to mount /usr/home over NFS.

Reviewed by:	trasz
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D4556
2015-12-21 22:19:22 +00:00
Oleksandr Tymoshenko
a0becfc978 - Add driver for i.MX 6 HDMI framer
- Enable HDMI driver in IMX6 config

Reviewed by:	andrew, ian, mmel
Differential Revision:	https://reviews.freebsd.org/D4174
2015-12-21 21:40:15 +00:00
Enji Cooper
870c2f7af9 Integrate tools/regression/mac/mac_bsdextended and
tools/regression/mac/mac_portacl into the FreeBSD test suite as
tests/sys/mac/bsdextended and tests/sys/mac/portacl, respectively

MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
2015-12-21 21:24:03 +00:00
Enji Cooper
1dc3084804 Make the mac_portacl testcases work / more robust
- A trap(1) call has been added to the test scripts to better
  ensure that the tests do a better job at trying to restore the
  test host state at the end of the tests (if the test was
  interrupted before it would leave the system in an odd state,
  potentially making the test results for subsequent runs
  non-deterministic).
- Add root user checks
- Fix nc(1) usage:
  -- -o is deprecated
  -- Using `-w 10` will make the call timeout after 10 seconds so it
     doesn't block indefinitely
- Use local variables
- Be more terse in the error messages
- Parameterize out "127.0.0.1"

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-12-21 21:15:23 +00:00
Warner Losh
23df2d677f Revert this change. It broke the trampoline build. Until I'm sure
nothing else is broken, I'm reverting.
2015-12-21 20:36:01 +00:00
Oleksandr Tymoshenko
c0f3a6c2bb Add CCM functions to enable HDMI framer and IPU units (video controller)
Reviewed by:	andrew, ian
Differential Revision:	https://reviews.freebsd.org/D4168
2015-12-21 20:17:24 +00:00
Jeremie Le Hen
3c62527d03 Add port for IRC over TLS/SSL, as noted in RFC 7194.
PR:		192505
Submitted by:	loic.blot@unix-experience.fr
MFC after:	3 days
2015-12-21 20:14:40 +00:00
Ed Maste
2dfc9e2cd4 loader.efi: strip trailing whitespace
Sponsored by:	The FreeBSD Foundation
2015-12-21 19:56:11 +00:00
John Baldwin
16d63436e3 As previously noted in r290409, purge old entries from MAINTAINERS. 2015-12-21 19:15:06 +00:00
Michael Tuexen
fe4a59b30a Stop processing of a SACK when the association has been aborted.
MFC after: 3 days
2015-12-21 18:52:02 +00:00
Warner Losh
e581fd9e95 Configure the Atmel eval boards to boot the same way. This gives
them the same layout as other embedded systems.
2015-12-21 18:27:51 +00:00
Ian Lepore
9b4d9c162a Add a mips implementation of OF_decode_addr(). 2015-12-21 18:19:14 +00:00
Ian Lepore
bc7b930020 Implement OF_decode_addr() for arm. Move most of powerpc's implementation
into a new function that other platforms can share.

This creates a new ofw_reg_to_paddr() function (in a new ofw_subr.c file)
that contains most of the existing ppc implementation, mostly unchanged.
The ppc code now calls the new MI code from the MD code, then creates a
ppc-specific bus_space mapping from the results. The new arm implementation
does the same in an arm-specific way.

This also moves the declaration of OF_decode_addr() from ofw_machdep.h to
openfirm.h, except on sparc64 which uses a different function signature.

This will help all FDT platforms to set up early console access using
OF_decode_addr().
2015-12-21 18:07:32 +00:00
Hajimu UMEMOTO
bf23199477 Use _map_v4v6_address().
MFC after:	1 week
2015-12-21 17:54:23 +00:00
Ian Lepore
91ee346313 Make the building of libsmb and mount_smbfs unconditional, now that r292552
has eliminated alignment and endian problems that were making it fail on
some platforms.

PR:        180438
PR:        189415
2015-12-21 17:41:08 +00:00
Ian Lepore
69ba629255 Avoid unaligned memory accesses when encoding netbios names in libsmb.
The current code for encoding a netbios name converts each byte to a 16-bit
value and stores the result by casting a char* to u_short*, resulting in
alignment faults on strict-alignment platforms.

This change reimplements the encoding routine using only byte accesses to
memory. There is no particular reason to work with 16-bit values just
because the encoding process creates two bytes of output for every byte of
input. Working a byte at at time also avoids endian problems for big-endian
platforms.

PR:		180438
PR:		189415
Differential Revision:	https://reviews.freebsd.org/D4622
2015-12-21 17:17:00 +00:00
Hajimu UMEMOTO
86acfcf878 Simplify _map_v4v6_address().
Suggested by:	hrs
MFC after:	1 week
2015-12-21 16:55:36 +00:00
Ed Maste
203b6f692c makefs: use ENTRY macro for diff reduction with NetBSD
Sponsored by:	The FreeBSD Foundation
2015-12-21 16:12:41 +00:00
Enji Cooper
9b6e69c757 - Convert testcase to TAP format
- Use nitems(x) instead of handrolled sizeof(x) / sizeof(*x) macro
- Do not mark count != 0 case with bsde_get_rule_count as a failure; this
  generates false positives on systems with ugidfw rules set on it

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-12-21 12:43:04 +00:00
Enji Cooper
f1c6f7e2d7 Redo the TAP integration so it works with Kyua
Kyua needs numbers in the TAP results :/, but prove doesn't

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-12-21 12:39:16 +00:00
Hans Petter Selasky
c4e58b4efe Implement drain_workqueue() function.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2015-12-21 12:20:02 +00:00
Hans Petter Selasky
9782763db2 In the zero delay case in queue_delayed_work() use the return value
from taskqueue_enqueue() instead of reading "ta_pending" unlocked and
also ensure the callout is stopped before proceeding.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2015-12-21 12:13:03 +00:00
Hans Petter Selasky
55d445d317 Minor workqueue cleanup:
- Make some functions global instead of inline to ease debugging.
- Fix some minor style issues.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2015-12-21 11:58:59 +00:00
Konstantin Belousov
44de1ba141 Recheck curthread->td_su after the VFS_SYNC() call, and re-sync if the
ast was rescheduled during VFS_SYNC().  It is possible that enough
parallel writes or slow/hung volume result in VFS_SYNC() deferring to
the ast flushing of workqueue.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-12-21 11:50:32 +00:00
Hajimu UMEMOTO
e85324c92f If we end up following a CNAME chain that does not find
any data return that instead of internal error.

PR:		156684
Obtained from:	NetBSD
MFC after:	1 week
2015-12-21 11:24:14 +00:00
Hans Petter Selasky
c094330345 Implement sleepable RCU mechanism using shared exclusive locks.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2015-12-21 11:03:12 +00:00
Hans Petter Selasky
cee21041cf Implement ACCESS_ONCE(), WRITE_ONCE() and READ_ONCE().
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2015-12-21 10:56:38 +00:00
Ulrich Spörlein
5a95a154ec Fix 'make depend' 2015-12-21 09:38:45 +00:00
Enji Cooper
8304a7b913 Skip the testcases if mac_bsdextended(4) isn't detected on the
system

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-12-21 08:58:14 +00:00
Enji Cooper
f33a82e070 Mark subject matching jailid testcase as an unexpected failure with
TODO to ensure that the testcase isn't marked as a failure

PR: 205481
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-12-21 08:53:26 +00:00
Enji Cooper
5f249cb8c9 Make test_matches.sh into a series of TAP testcases
Use temporary filesystems / memory disks instead of a hardcoded path
which doesn't exist on test systems

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-12-21 08:14:45 +00:00
Enji Cooper
7b98ae5ad2 - Use 1 for an exit code instead of -1 with err, errx, and exit
- Add unistd.h for getuid(3)
- Sort #includes

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-12-21 07:04:01 +00:00
Warner Losh
17df9f4dcf There's no such program as [-n :(. Add the missing space. Also,
work when the object directory doesn't exist yet. realpath hates
us, so use the backup of the realpath arg when that happens.
2015-12-21 05:08:20 +00:00
Conrad Meyer
986fd63b46 x86: Add CPUID_STDEXT_* macros for CPU feature bits
A follow-up to r292478 and r292488.

Sponsored by:	EMC / Isilon Storage Division
2015-12-21 04:42:58 +00:00
Ian Lepore
ebe8a6e100 Add strlcat() and strlcpy() to libstand32. This should have been part of
r292234, but I forgot there was a libstand32.

Submitted by:	martymac
Pointy hat:	ian
2015-12-21 02:02:43 +00:00
Adrian Chadd
aefdcce869 [mips] print out l2 cache configuration if it exists.
The Ingenic JZ7480 SoC that is on the Imagination Technologies CI20 board
has an L2 cache:

Cache info:
  picache_stride    = 4096
  picache_loopcount = 8
  pdcache_stride    = 4096
  pdcache_loopcount = 8
cpu0: Ingenic Xburst processor v79.2
  MMU: Standard TLB, 32 entries
  L1 i-cache: 8 ways of 128 sets, 32 bytes per line
  L1 d-cache: 8 ways of 128 sets, 32 bytes per line
  L2 cache: 8 ways of 256 sets, 128 bytes per line, 256 KiB total size
  Config1=0xbe67338b<WatchRegs,EJTAG,FPU>
  Config2=0x80000267
  Config3=0x20
2015-12-21 01:48:16 +00:00
Ian Lepore
38b65fa05c Replace some references to KERNPHYSADDR with the equivelent value passed in
from the bootloader.
2015-12-21 01:14:54 +00:00
Ian Lepore
bfb14e93a2 Change KERNVIRTADDR to 0xc0000000 since the low-order bits no longer need to
match the physical load address.  Remove the *PHYSADDR symbols which are no
longer necessary.

Also remove a bunch of comments, most of which which have been wrong for
quite some time now, and the rest of which are mooted by these changes.  All
that's left in this file is assigning a single symbol to its cannonical
value, not much to comment on anymore.
2015-12-20 23:38:14 +00:00
Ian Lepore
6a6d0fff18 Allow armv4/5 kernels to be loaded on any 2MB boundary, like armv6/7.
This eliminates the reliance on PHYSADDR and KERNPHYSADDR compile-time
symbols (except when the rom-copy code is enabled) by using the current
PC and the assumption that the entry-point routine is in the first 1MB
section of the text segment.

Other cleanups done:

 - Reduce the initarm() stack size back to 2K.  It got increased to
   4 * 2K when this file was supporting multicore armv6, but that
   support is now in locore-v6.S.

 - When building the temporary startup page tables, map the entire
   4GB address space as VA=PA before mapping the kernel at its loaded
   location.  This allows access to boot parameters stored somewhere
   in ram by the bootloader, regardless of where that may be.

 - When building the page table entry for supporting EARLY_PRINTF, map
   the section as uncached unbuffered, since it is presumably device
   registers.

Note that this restores the ability to use loader(8)/ubldr on armv4/5
kernels.  That was broken in r283035, the point at which ubldr started
loading an arm kernel at any 2MB boundary.

Also note that after this, there is no reason to set KERNVIRTADDR to
anything other than 0xc0000000, and no need for PHYSADDR or KERNPHYSADDR
symbols at all.
2015-12-20 23:31:11 +00:00
Christian Brueffer
8a0f5c0b6c Merge from contrib/openbsm to bring the kernel audit bits up to date with OpenBSM 1.2 alpha 4:
- remove $P4$
- fix a comment
2015-12-20 23:22:04 +00:00
Jilles Tjoelker
59797edfd8 libc: Use namespace.h in a few more files.
libc now no longer calls fstat(), socketpair() and wait(), only the
underscore-prefixed versions (_waitpid() instead of wait()).
2015-12-20 23:05:20 +00:00
Ian Lepore
f3be407b23 Tidy up mips ofw_machdep.h. Don't include openfirm.h because openfirm.h
is what includes machine/ofw_machdep.h.  Don't declare OF_decode_addr();
it isn't implemented yet on mips and the declaration for it is about to
be commonized into openfirm.h.
2015-12-20 19:09:12 +00:00
Cy Schubert
ec992425dc Don't assume checksums will be calculated later when fastfoward is
enabled (by default in r290383).

PR:		72210
MFC after:	1 week
2015-12-20 18:02:13 +00:00
Jilles Tjoelker
cc684f839e sh/mknodes: Close files and check for errors when writing.
This is a build tool only and does not affect run time.

PR:		204951
MFC after:	1 week
2015-12-20 16:40:36 +00:00
Jilles Tjoelker
17981398bd libthr: Don't use both __sys_open() and __sys_openat(). 2015-12-20 16:33:56 +00:00
Ed Maste
09e4ee9af3 loader.efi: refresh size in GetMemoryMap retry loop
If ExitBootServices fails due to a changed efi_mapkey then GetMemoryMap
must be called again. In this case it is also possible for the memory
map to grow, so repeat the initial GetMemoryMap call to fetch the new
size.

Also roll bi_add_efi_data_and_exit into bi_load_efi_data as there's no
need for it to be a separate function.

PR:		202455
Reported by:	Berislav Purgar <bpurgar@gmail.com>
Tested by:	Berislav Purgar <bpurgar@gmail.com>
Reviewed by:	kib
MFC after:	1 week
MFC with:	r292338
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D4621
2015-12-20 16:07:09 +00:00
Hajimu UMEMOTO
b1f9559ae4 addrinfo.ai_family is an address family, not a protocol family.
PR:		162434
MFC after:	1 week
2015-12-20 15:18:50 +00:00
Jilles Tjoelker
11022e84d8 clock_gettime(2),gettimeofday(2): Remove [EFAULT] error.
Depending on system configuration and parameters, clock_gettime() and
gettimeofday() may not be system calls. If so, passing an invalid pointer
will cause a signal and not an [EFAULT] error.

From a standards perspective, this is OK since passing an invalid pointer is
undefined behaviour.

MFC after:	1 week
2015-12-20 15:11:11 +00:00
Hajimu UMEMOTO
7f7cd1d54c Restore a day of the week in date(1) output for Japanese locales.
It was lost by recent locale change.
2015-12-20 14:59:30 +00:00
Konstantin Belousov
af98578a60 Fix lockf(3) cancellation behaviour.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-12-20 11:55:39 +00:00