Commit Graph

198170 Commits

Author SHA1 Message Date
Jilles Tjoelker
59966d51c6 restore: Preserve timestamps to the nanosecond.
The restore utility already knows the full-resolution timestamps, so the
only thing to do is to stop converting the timespecs to timevals and use
futimens() and utimensat().

Differential Revision:	https://reviews.freebsd.org/D2020
Reviewed by:	jhb
2015-03-14 13:45:43 +00:00
Ian Lepore
b36424bd4b Revert r279934, r279938; this is going to be fixed in sbuf instead.
PR:		195668
2015-03-14 13:04:39 +00:00
Ian Lepore
59daf5b0ce Revert r279933; this is going to be fixed in sbuf instead.
PR:		195668
2015-03-14 13:02:08 +00:00
Ian Lepore
ed9dd64b8c Revert r279932; this is going to be fixed in the sbuf code instead.
PR:		195668
2015-03-14 13:00:37 +00:00
Dimitry Andric
25e141edd2 Pull in r231965 from upstream compiler-rt trunk (by Jörg Sonnenberger):
Refactor float to integer conversion to share the same code.
  80bit Intel/PPC long double is excluded due to lacking support
  for the abstraction. Consistently provide saturation logic.
  Extend to long double on 128bit IEEE extended platforms.

  Initial patch with test cases from GuanHong Liu.
  Reviewed by Steve Canon.

  Differential Revision: http://reviews.llvm.org/D2804

Pull in r232107 from upstream compiler-rt trunk (by Ed Maste):

  Use signed int implementation for __fixint

Requested by:	emaste
2015-03-14 12:40:19 +00:00
Dimitry Andric
cee9be4971 Allow relative pathnames in SRCS, so as to enable building software
which includes more than one file with the same name, in different
directories.

For example, setting:

SRCS+=	foo/foo.c bar/foo.c baz/foo.c

will now create separate objdirs 'foo', 'bar' and 'baz' for each of the
sources in the list, and use those objdirs for the corresponding object
files.

Reviewed by:	brooks, imp
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D1984
2015-03-14 12:29:44 +00:00
Alexander Motin
b441dabf7e Slightly polish virtual AHCI CD reporting.
MFC after:	2 weeks
2015-03-14 12:18:26 +00:00
Alexander Motin
fb329df8e4 Fix NOP and IDLE commands for virtual AHCI disks.
MFC after:	2 weeks
2015-03-14 10:38:25 +00:00
Alexander Motin
1fcb801948 Add support for NCQ variant of DSM TRIM for virtual AHCI disks.
The code is not really tested yet due to lack of initiator support.

Requested by:	imp
MFC after:	2 weeks
2015-03-14 09:46:43 +00:00
Alexander Motin
9009f43407 Improve NCQ errors reporting for virtual AHCI disks.
While this implementation is still not perfect, previous was just broken.

MFC after:	2 weeks
2015-03-14 08:45:54 +00:00
Adrian Chadd
af1357897d Compile some modules - I'm going to eventually just compile all the
modules, but these are a subset of things that are worth playing with
in deployed APs.

(ipfw in particular is rather nice.)
2015-03-14 08:29:03 +00:00
Adrian Chadd
22aeed02bf Add board support for the TP-Link TL-WR1043nd v2.
This is a QCA9558 based design with on-chip 2GHz 3x3 11n wifi,
AR8327N switch, 64MB RAM and 8MB flash.

Of course, it runs FreeBSD.
2015-03-14 07:59:54 +00:00
Neel Natu
18a2b08e65 Use lapic_ipi_alloc() to dynamically allocate IPI slots needed by bhyve when
vmm.ko is loaded.

Also relocate the 'justreturn' IPI handler to be alongside all other handlers.

Requested by:	kib
2015-03-14 02:32:08 +00:00
Neel Natu
8958d18cb3 Add x86 specific APIs 'lapic_ipi_alloc()' and 'lapic_ipi_free()' to allow IPI
vectors to be dynamically allocated. This allows kernel modules like vmm.ko
to allocate unique IPI slots when loaded (as opposed to hard allocating one
or more vectors).

Also, reorganize the fixed IPI vectors to create a contiguous space for
dynamic IPI allocation.

Reviewed by:	kib, jhb
Differential Revision:	https://reviews.freebsd.org/D2042
2015-03-14 00:30:41 +00:00
Navdeep Parhar
070d262707 cxgbe(4): fix if_media handling for T520-BT cards. 1Gbps and 100Mbps
are valid for this card.

MFC after:	1 week
2015-03-14 00:02:53 +00:00
Alexander Motin
dcd0c998a9 Remove incorrect SERR register setting.
At this point we have nothing to report through that register.

MFC after:	2 weeks
2015-03-13 21:01:25 +00:00
Alexander Motin
9463f47b3a Change prdbc value reporting.
MFC after:	2 weeks
2015-03-13 20:56:17 +00:00
Edward Tomasz Napierala
a52c3ec43c Mark xo_err(3), xo_errx(3), and xo_errc(3) as __dead2.
Differential Revision:	https://reviews.freebsd.org/D2059
Reviewed by:	marcel@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-13 20:14:55 +00:00
Alexander Motin
295e61d6a3 Polish AHCI disk identify data and fix speed negotiation.
MFC after:	2 weeks
2015-03-13 20:14:35 +00:00
Alexander Motin
c21b342b8e Fix SATA Gen3 speed constants.
MFC after:	1 week
2015-03-13 20:08:35 +00:00
Pedro F. Giffuni
cf0f0b800c libc: plug memory leaks in edge cases for the posix1e code.
CID:	1016705
CID:	1016706
CID:	1016707

Differential Revision:	https://reviews.freebsd.org/D2023
2015-03-13 18:42:43 +00:00
Alexander Motin
5f6b63de7a Add support for PIO variants of READ/WRITE commands for AHCI disks.
AHCI API hides all PIO specifics, so this functionality is almost free.

MFC after:	2 weeks
2015-03-13 18:35:38 +00:00
Alexander Motin
f7c5bc2cfe Use ahci_write_fis_d2h() for commands completion.
MFC after:	2 weeks
2015-03-13 18:04:07 +00:00
Alexander Motin
0b9d25c935 Add DSM TRIM command support for virtual AHCI disks.
It works only for virtual disks backed by ZVOLs and raw devices supporting
BIO_DELETE.  Virtual disks backed by files won't report this capability.

MFC after:	2 weeks
Relnotes:	yes
2015-03-13 16:43:52 +00:00
Andrey V. Elsukov
dc9fa19b3b Properly initialize scope zone id when next hop address stored
directly in the O_FORWARD_IP6 opcode. Use getnameinfo(3) to formatting
the IPv6 addresses of such opcodes.

Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
2015-03-13 13:46:50 +00:00
Edward Tomasz Napierala
286c4906d6 Add -noauto autofs map, for automatic handling of fstab entries
marked "noauto".

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-13 12:44:46 +00:00
Edward Tomasz Napierala
52df29e6a5 Get executable direct maps to work.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-13 12:27:59 +00:00
Edward Tomasz Napierala
cd3772d076 Rework the concat() algorithm to be correct in all cases.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-13 11:26:02 +00:00
John Baldwin
8f73e77536 - Align comment for df flags variable in periodic.conf.
- Note default value of df flags variable in periodoc.conf(5).

MFC after:	1 week
2015-03-13 09:50:29 +00:00
John Baldwin
07bf9879f3 Simplify string mangling in ifmaybeload().
- Use strlcpy() instead of strcpy().
- Use strlcat() instead of a strlcpy() with a magic number subtracted
  from the length.
- Replace strncmp(..., strlen(foo) + 1) with strcmp(...).

Differential Revision:	https://reviews.freebsd.org/D1814
Reviewed by:	rpaulo
MFC after:	2 weeks
2015-03-13 09:45:06 +00:00
John Baldwin
02cbfd02ba Enable bzipfs support in the EFI loader.
- Add bzipfs to the list of supported filesystems in the EFI loader.
- Increase the heap size allocated for the EFI loader from 2MB to 3MB.

Differential Revision:	https://reviews.freebsd.org/D2053
Reviewed by:	benno, emaste, imp
MFC after:	2 weeks
Sponsored by:	Cisco Systems, Inc.
2015-03-13 09:41:27 +00:00
John Baldwin
ad06e987b1 The System V ABI for amd64 allows functions to use space in a 128 byte
redzone below the stack pointer for scratch space and requires
interrupt and signal frames to avoid overwriting it. However, EFI uses
the Windows ABI which does not support this. As a result, interrupt
handlers in EFI push their interrupt frames directly on top of the
stack pointer. If the compiler used the red zone in a function in the
EFI loader, then a device interrupt that occurred while that function
was running could trash its local variables.  In practice this happens
fairly reliable when using gzipfs as an interrupt during decompression
can trash the local variables in the inflate_table() function
resulting in corrupted output or hangs.

Fix this by disabling the redzone for amd64 EFI binaries. This
requires building not only the loader but any libraries used by the
loader without redzone support.

Thanks to Jilles for pointing me at the redzone once I found the stack
corruption.

Differential Revision:	https://reviews.freebsd.org/D2054
Reviewed by:	imp
MFC after:	2 weeks
Sponsored by:	Cisco Systems, Inc.
2015-03-13 09:38:16 +00:00
Andrey V. Elsukov
2530ed9e70 Fix `ipfw fwd tablearg'. Use dedicated field nh4 in struct table_value
to obtain IPv4 next hop address in tablearg case.

Add `fwd tablearg' support for IPv6. ipfw(8) uses INADDR_ANY as next hop
address in O_FORWARD_IP opcode for specifying tablearg case. For IPv6 we
still use this opcode, but when packet identified as IPv6 packet, we
obtain next hop address from dedicated field nh6 in struct table_value.

Replace hopstore field in struct ip_fw_args with anonymous union and add
hopstore6 field. Use this field to copy tablearg value for IPv6.

Replace spare1 field in struct table_value with zoneid. Use it to keep
scope zone id for link-local IPv6 addresses. Since spare1 was used
internally, replace spare0 array with two variables spare0 and spare1.

Use getaddrinfo(3)/getnameinfo(3) functions for parsing and formatting
IPv6 addresses in table_value. Use zoneid field in struct table_value
to store sin6_scope_id value.

Since the kernel still uses embedded scope zone id to represent
link-local addresses, convert next_hop6 address into this form before
return from pfil processing. This also fixes in6_localip() check
for link-local addresses.

Differential Revision:	https://reviews.freebsd.org/D2015
Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
2015-03-13 09:03:25 +00:00
Ed Maste
596596fec7 Remove UCB advertising clause per the letter dated July 22, 1999. 2015-03-13 07:29:49 +00:00
Stanislav Sedov
0faaddb8db Fix debug symbols loading in libproc: 0 is a valid file descriptor.
Reported by:	Chris Torek <chris.torek@gmail.com>
2015-03-13 04:26:48 +00:00
Simon J. Gerraty
bedf67ae99 Make sure that -- filemon is at start of a line, so that
it is found as expected.
2015-03-13 02:54:46 +00:00
Ed Maste
371f621a11 Delete stray clause 3 and renumber. 2015-03-13 02:49:55 +00:00
Adrian Chadd
036e1c7646 Commit 802.1q configuration support for the AR8327.
This is slightly different to the other switches - the VLAN table
(VTU) programs in the vlan port mapping /and/ the port config
(tagged, untagged, passthrough, any.)

So:

* Add VTU operations to program the VTU (vlan table)
* abstract out the mirror-disable function so it's .. well, a function.
* setup the port to have a dot1q configuration for dot1q - the
  port security is VLAN (not per-port VLAN) and requires an entry
  in the VLAN table;
* add set_dot1q / get_dot1q to program the VLAN table;
* since the tagged/untagged ports are now programmed into the VTU,
  rather than global - plumb the ports /and/ untagged ports bitmaps
  through the arswitch API.

Tested:

* AP135 - QCA9558 SoC + AR8327N switch
2015-03-13 02:16:39 +00:00
Pyun YongHyeon
ce18f7cde8 Restore auto MDIX for RTL8211B and newer revision PHYs which was
broken in r279903.

Reported by:	john <> feith . com
2015-03-13 01:16:14 +00:00
Nathan Whitehorn
1cd30eb6dd Deallocate any leftover page table entries in the LPAR at boot. This
prevents contamination from a previous kernel (e.g. after shutdown -r).
2015-03-13 00:08:58 +00:00
Ryan Stone
67e51766bd hwpmc: Fix event number to match enum name
Differential revision:	https://reviews.freebsd.org/D1592
Reviewed by:	Joseph Kong
MFC after:	1 month
2015-03-12 23:44:28 +00:00
Ian Lepore
2f01da7886 Fix a paste-o, sb is already a pointer in this one. 2015-03-12 23:31:29 +00:00
Nathan Whitehorn
0aff8b5c4a Provide VSX context in ucontext(3) API. 2015-03-12 21:15:38 +00:00
Konstantin Belousov
08a80e1c0b Remove write-only variable.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2015-03-12 20:14:48 +00:00
Andrey V. Elsukov
4fb4ebe0a4 Add GUID and alias for Apple Core Storage partition.
PR:		196241
MFC after:	1 week
2015-03-12 18:51:31 +00:00
Ian Lepore
9bc58e3d33 Nullterminate strings returned via sysctl.
PR:		195668
2015-03-12 18:22:20 +00:00
Ian Lepore
0b9b8739c0 Nullterminate strings returned via sysctl.
PR:		195668
2015-03-12 18:09:39 +00:00
Ian Lepore
f3b9fcf251 Nullterminate strings returned via sysctl.
PR:		195668
2015-03-12 18:06:30 +00:00
John Baldwin
498046a190 Spin the twiddle in dosfs to give visual feedback for disk I/O on
FAT filesystems as is done for other filesystems in the loader.

MFC after:	1 week
2015-03-12 17:10:04 +00:00
John Baldwin
7939325215 Allow the EFI loader to work with large kernels and/or modules
(for example, a large mfsroot).  Note that for EFI the kernel and
modules (as well as other metadata files such as splash screens or
memory disk images) are loaded into a statically-sized staging area.
When the EFI loader exits it copies this staging area down to the
location the kernel expects to run at.
- Add bounds checking to the copy routines to fail attempts to access
  memory outside of the staging area.  Previously loading a combined
  kernel + modules larger than the staging size (32MB) would overflow
  the staging area trashing whatever memory was afterwards.  Under
  Intel's OVMF firmware for qemu this resulted in fatal faults in the
  firmware itself.  Now the attempt will fail with ENOMEM.
- Allow the staging area size to be configured at compile time via
  an EFI_STAGING_SIZE variable in src.conf or on the command line.
  It accepts the size of the staging area in MB.  The default size
  remains 32MB.

MFC after:	2 weeks
Sponsored by:	Cisco Systems, Inc.
2015-03-12 17:07:24 +00:00