]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agohwpmc: add initial Intel Broadwell support.
rpaulo [Sun, 5 Apr 2015 05:14:20 +0000 (05:14 +0000)]
hwpmc: add initial Intel Broadwell support.

The full list of aliases and events will follow in a subsequent
commit.

MFC after: 1 month

9 years agoRemove whitespace.
rpaulo [Sun, 5 Apr 2015 05:09:38 +0000 (05:09 +0000)]
Remove whitespace.

9 years agohead/sys/amd64/amd64/support.S: unroll loop
eadler [Sun, 5 Apr 2015 05:07:24 +0000 (05:07 +0000)]
head/sys/amd64/amd64/support.S: unroll loop
unroll the loop in ENTRY(pagezero)
acc' to the submitter this results in a reproducible 1% perf
improvement under buildworld like workload

I validated correctness and run-testing, but not performance impact

Submitted by: lidl@pix.net
Reviewed by: adrian
PR: 199151
MFC After: 1 month

9 years agoOops, add missing file from previous commit.
adrian [Sun, 5 Apr 2015 05:00:25 +0000 (05:00 +0000)]
Oops, add missing file from previous commit.

(Sorry bsdimp, I did break the build.)

9 years agoAdd support for the MIPS74K SoC family performance counters events.
adrian [Sun, 5 Apr 2015 02:57:02 +0000 (02:57 +0000)]
Add support for the MIPS74K SoC family performance counters events.

These are similar to the mips24k performance counters - some are
available on perfcnt0/3, some are available on perfcnt1/4.
However, the events aren't all the same.

* Add the events, named the same as from Linux oprofile.
* Verify they're the same as  "MIPS32(R) 74KTM Processor Core Family
  Software User's Manual"; Document Number: MD00519; Revision 01.05.
* Rename INSTRUCTIONS to something else, so it doesn't clash with
  the alias INSTRUCTIONS.  I'll try to tidy this up later; there
  are a few other aliases to add and shuffle around.

Tested:

* QCA9558 SoC (AP135 board) - MIPS74Kc core (no FPU.)
* make universe; where it didn't fail for other reasons.

TODO:

* It'd be nice to support the four performance counters
  in at least this hardware, rather than just two.

Reviewed by: bsdimp ("looks good; don't break world".)

9 years agoAdd file missed in r281096.
jhibbits [Sun, 5 Apr 2015 02:43:36 +0000 (02:43 +0000)]
Add file missed in r281096.

9 years agoUnify Book-E and AIM trap.c
jhibbits [Sun, 5 Apr 2015 02:42:52 +0000 (02:42 +0000)]
Unify Book-E and AIM trap.c

Summary:
Book-E and AIM trap.c are almost identical, except for a few bits.  This is step
1 in unifying them.

This also renumbers EXC_DEBUG, to not conflict with AIM vector numbers.  Since
this is the only one thus far that is used in the switch statement in trap(),
it's the only one renumbered.  If others get added to the switch, which conflict
with AIM numbers, they should also be renumbered.

Reviewers: #powerpc, marcel, nwhitehorn

Reviewed By: marcel

Subscribers: imp

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

9 years agoRestore proper error from oshmctl(2), used by COMPAT_43, when the
kib [Sat, 4 Apr 2015 23:56:38 +0000 (23:56 +0000)]
Restore proper error from oshmctl(2), used by COMPAT_43, when the
segment cannot be found.  Broken by r280323.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 years agoRe-add machine/bus.h to machine/fdt.h on arm, it's still needed.
andrew [Sat, 4 Apr 2015 23:10:13 +0000 (23:10 +0000)]
Re-add machine/bus.h to machine/fdt.h on arm, it's still needed.

9 years agoInclude vm/pmap.h for pmap_kextract.
andrew [Sat, 4 Apr 2015 23:03:11 +0000 (23:03 +0000)]
Include vm/pmap.h for pmap_kextract.

9 years agoInclude machine/intr.h for arm_post_filter.
andrew [Sat, 4 Apr 2015 23:00:37 +0000 (23:00 +0000)]
Include machine/intr.h for arm_post_filter.

9 years agoDon't include unneeded files in the arm machine/fdt.h. While here, remove
andrew [Sat, 4 Apr 2015 22:22:04 +0000 (22:22 +0000)]
Don't include unneeded files in the arm machine/fdt.h. While here, remove
it from more files.

9 years agoRemove icl_conn_connected(); was unused.
trasz [Sat, 4 Apr 2015 22:11:38 +0000 (22:11 +0000)]
Remove icl_conn_connected(); was unused.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoMove the definition of fdt_localbus_devmap to a Marvell specific file as
andrew [Sat, 4 Apr 2015 22:05:43 +0000 (22:05 +0000)]
Move the definition of fdt_localbus_devmap to a Marvell specific file as
it's only used there.

9 years agoutimensat: Correct Capsicum required capability rights.
jilles [Sat, 4 Apr 2015 21:47:54 +0000 (21:47 +0000)]
utimensat: Correct Capsicum required capability rights.

9 years agoStop using machine/fdt.h in the arm kernel code when we don't need it.
andrew [Sat, 4 Apr 2015 21:34:26 +0000 (21:34 +0000)]
Stop using machine/fdt.h in the arm kernel code when we don't need it.

9 years agoFix thinko/copypaste error.
jpaetzel [Sat, 4 Apr 2015 20:55:47 +0000 (20:55 +0000)]
Fix thinko/copypaste error.

When checking the length of the mutual secret password the variable for
the secret password was used by mistake.  This resulted in ctld never
warning about the length of the mutual secret being wrong even if it was.

MFC after: 3 days
Sponsored by: iXsystems

9 years agoFix build race on armv6* and powerpc*.
andreast [Sat, 4 Apr 2015 20:30:20 +0000 (20:30 +0000)]
Fix build race on armv6* and powerpc*.
Tested with cross builds amd64 -> armv6(hf) and powerpc(64).

Suggested by: andrew@

9 years agofts: Don't return FTS_SLNONE if it's not a symlink (if race).
jilles [Sat, 4 Apr 2015 20:22:12 +0000 (20:22 +0000)]
fts: Don't return FTS_SLNONE if it's not a symlink (if race).

When following symlinks, fts returned FTS_SLNONE when fstatat(flag=0)
failed, but a subsequent fstatat(flag=AT_SYMLINK_NOFOLLOW) succeeded. This
incorrectly triggered if a filename existed to be read from the directory,
was deleted before the fstatat(flag=0) and created again after the
fstatat(flag=0).

Fix this by only returning FTS_SLNONE if the result from
fstatat(flag=AT_SYMLINK_NOFOLLOW) is actually a symlink. If it is not a
symlink, treat it as if fstatat(flag=0) succeeded.

PR: 196724
Reported and tested by: pho
MFC after: 1 week

9 years agoMake sure forth manpages are only installed once.
bapt [Sat, 4 Apr 2015 19:56:54 +0000 (19:56 +0000)]
Make sure forth manpages are only installed once.

Differential Revision: https://reviews.freebsd.org/D2224
Reviewed by: imp

9 years agoReplace vm_fault()'s heuristic for automatic cache behind with a heuristic
alc [Sat, 4 Apr 2015 19:10:22 +0000 (19:10 +0000)]
Replace vm_fault()'s heuristic for automatic cache behind with a heuristic
that performs the equivalent of an automatic madvise(..., MADV_DONTNEED).
The current heuristic, even with the improvements that I made a few years
ago, is a good example of making the wrong trade-off, or optimizing for
the infrequent case.  The infrequent case being reading a single file that
is much larger than memory using mmap(2).  And, in this case, the page
daemon isn't the bottleneck; it's the I/O.

In all other cases, the current heuristic has too many false positives,
i.e., it caches too many pages that are later reused.  To give one
example, thousands of pages are cached by the current heuristic during a
buildworld and all of them are reactivated before the buildworld
completes.  In particular, clang reads source files using mmap(2) and
there are some relatively large source files in our source tree, e.g.,
sqlite, that are read multiple times.  With the new heuristic, I see fewer
false positives and they have a much lower cost.

I actually tried something like this more than two years ago and it
didn't perform as well as the cache behind heuristic.  However, that was
before the changes to the page daemon in late summer of 2013 and the
existence of pmap_advise().  In particular, with the page daemon doing
its work more frequently and in smaller batches, it now completes its
work while the application accessing the file is blocked on I/O.
Whereas previously, the page daemon appeared to hog the CPU for so long
that it caused "hiccups" in the application's execution.

Finally, I'll add that the elimination of cache pages is a prerequisite
for NUMA support.

Reviewed by: jeff, kib
Sponsored by: EMC / Isilon Storage Division

9 years agoMove uart_fdt_get_clock and uart_fdt_get_shift to uart_bus_fdt.c, we may
andrew [Sat, 4 Apr 2015 18:45:25 +0000 (18:45 +0000)]
Move uart_fdt_get_clock and uart_fdt_get_shift to uart_bus_fdt.c, we may
not build uart_cpu_fdt.c in all configs.

9 years agoRemove the extra copy of uart_fdt_get_clock and uart_fdt_get_shift. While
andrew [Sat, 4 Apr 2015 09:57:52 +0000 (09:57 +0000)]
Remove the extra copy of uart_fdt_get_clock and uart_fdt_get_shift. While
here also use OF_getencprop in uart_fdt_get_clock.

Sponsored by: The FreeBSD Foundation

9 years agoUse OF_getencprop over OF_getprop and fdt32_to_cpu. The latter may give
andrew [Sat, 4 Apr 2015 09:21:56 +0000 (09:21 +0000)]
Use OF_getencprop over OF_getprop and fdt32_to_cpu. The latter may give
us the wrong data in the failure case if shift was not zero.

Sponsored by: The FreeBSD Foundation

9 years agoAdd support for arm64 to the existing arm generic timer driver:
andrew [Sat, 4 Apr 2015 09:07:31 +0000 (09:07 +0000)]
Add support for arm64 to the existing arm generic timer driver:
 - Add macros to handle the differences in accessing these registers on arm
   and arm64.
 - Use the fdt data to detect if we are on an ARMv7 or ARMv8.
 - Use the virtual timer by default on arm64, we may not have access to
   the physical timer.

Differential Revision: https://reviews.freebsd.org/D2208
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation

9 years agoRemove useless initialization.
kib [Sat, 4 Apr 2015 08:44:20 +0000 (08:44 +0000)]
Remove useless initialization.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 years agourtwn: blink the LED when scanning.
rpaulo [Sat, 4 Apr 2015 08:41:02 +0000 (08:41 +0000)]
urtwn: blink the LED when scanning.

Previously, the driver was trying to blink the LED in the newstate
function, but that only gets called once (unlike OpenBSD's net80211
stack).  Move the LED blinking to set_channel().

While there, don't try to set the channel when we switch to the SCAN
state.  This is already accomplished by the set_channel() function.

MFC after: 1 week

9 years agoRemove whitespace.
rpaulo [Sat, 4 Apr 2015 08:36:02 +0000 (08:36 +0000)]
Remove whitespace.

9 years agoFix whitespace.
jhibbits [Sat, 4 Apr 2015 06:24:03 +0000 (06:24 +0000)]
Fix whitespace.

9 years agoAdd mpc85xx_gpio to the build conf.
jhibbits [Sat, 4 Apr 2015 06:22:14 +0000 (06:22 +0000)]
Add mpc85xx_gpio to the build conf.

Missed this in the previous commit.

9 years agoloader/EFI: improve the help of the 'mode' command.
rpaulo [Sat, 4 Apr 2015 04:30:37 +0000 (04:30 +0000)]
loader/EFI: improve the help of the 'mode' command.

9 years agoRemove an unnecessary space in a printf call.
rpaulo [Sat, 4 Apr 2015 04:29:31 +0000 (04:29 +0000)]
Remove an unnecessary space in a printf call.

9 years agoboot1 EFI: reset the screen and select the best mode.
rpaulo [Sat, 4 Apr 2015 04:27:54 +0000 (04:27 +0000)]
boot1 EFI: reset the screen and select the best mode.

It's necessary to reset the screen to make sure any vendor pixels are
gone when we start boot1.  In the Lenovo X1 (3rd gen), this is the
only way to clear the screen.  Previously, the Lenovo logo would only
disappear after the kernel started scrolling the display.

After resetting the screen, EFI could put us in the worst LCD mode
(oversized characters), so we now find the largest mode we can use and
hope it's the most appropriate one (it's not trivial to tell what's
the correct LCD resolution at this point).  It's worth noting that the
final stage loader has a 'mode' command that can be used to switch
text modes.

While there, enable the software cursor, just like in the legacy boot
mode.

MFC after: 1 week

9 years agoRemove whitespace.
rpaulo [Sat, 4 Apr 2015 04:18:52 +0000 (04:18 +0000)]
Remove whitespace.

9 years agoAdd a GPIO driver for the mpc85xx.
jhibbits [Sat, 4 Apr 2015 02:34:40 +0000 (02:34 +0000)]
Add a GPIO driver for the mpc85xx.

This has only been tested on the RB800, using the RB800's FDT, and pulls the
GPOUT and GPIN registers from the FDT.

9 years agoDo not install scripts multiple time when using bsd.progs.mk
bapt [Sat, 4 Apr 2015 00:31:40 +0000 (00:31 +0000)]
Do not install scripts multiple time when using bsd.progs.mk

9 years agoRegen for r281053
bdrewery [Fri, 3 Apr 2015 23:58:40 +0000 (23:58 +0000)]
Regen for r281053

9 years agoRemove specific reference to g++(1) for WITH_CXX as it may be clang.
bdrewery [Fri, 3 Apr 2015 23:55:04 +0000 (23:55 +0000)]
Remove specific reference to g++(1) for WITH_CXX as it may be clang.

MFC after: 1 week

9 years agoUpdate FREEBSD-Xlist for llvm.
dim [Fri, 3 Apr 2015 19:49:39 +0000 (19:49 +0000)]
Update FREEBSD-Xlist for llvm.

9 years agoAdd the llvm-cov and llvm-profdata tools, when WITH_CLANG_EXTRAS is
dim [Fri, 3 Apr 2015 19:43:39 +0000 (19:43 +0000)]
Add the llvm-cov and llvm-profdata tools, when WITH_CLANG_EXTRAS is
defined.  These help with processing coverage and profile data.

9 years agoMore ARM EABI object attributes in binutils. This adds support to binutils
andrew [Fri, 3 Apr 2015 19:33:26 +0000 (19:33 +0000)]
More ARM EABI object attributes in binutils. This adds support to binutils
to include the Unaligned Access and Floating-point Half-precision
attributes. the former marks ELF objects that may access ARMv6 style
unaligned data, the latter that the binary uses the VFPv3/Advanced SIMD
half-precision extension.

These may be emmitted by clang so it's best to print a warning when the
linker hits one of them.

Differential Revision: http://reviews.freebsd.org/D2194
Submitted by: Michal Meloun <meloun@miracle.cz>
MFC after: 1 week

9 years agoAdd clang patch corresponding to r281046.
dim [Fri, 3 Apr 2015 18:42:38 +0000 (18:42 +0000)]
Add clang patch corresponding to r281046.

9 years agoPull in r227115 from upstream clang trunk (by Ben Langmuir):
dim [Fri, 3 Apr 2015 18:38:37 +0000 (18:38 +0000)]
Pull in r227115 from upstream clang trunk (by Ben Langmuir):

  Fix assert instantiating string init of static variable

  ... when the variable's type is a typedef of a ConstantArrayType. Just
  look through the typedef (and any other sugar).  We only use the
  constant array type here to get the element count.

This fixes an assertion failure when building the games/redeclipse port.

Reported by: amdmi3

9 years agoAllow fetching pkg(8) even if servers/proxies are not passing Content-length
bapt [Fri, 3 Apr 2015 17:35:30 +0000 (17:35 +0000)]
Allow fetching pkg(8) even if servers/proxies are not passing Content-length

9 years agoAdd the start of the efi fdt bindings. These will be used on arm and arm64.
andrew [Fri, 3 Apr 2015 15:47:48 +0000 (15:47 +0000)]
Add the start of the efi fdt bindings. These will be used on arm and arm64.

Sponsored by: The FreeBSD Foundation

9 years agoClean up more x86 only options in the efi code.
andrew [Fri, 3 Apr 2015 15:25:59 +0000 (15:25 +0000)]
Clean up more x86 only options in the efi code.

9 years agoMake ZFS ARC track both KVA usage and fragmentation.
mav [Fri, 3 Apr 2015 14:45:48 +0000 (14:45 +0000)]
Make ZFS ARC track both KVA usage and fragmentation.

Even on Illumos, with its much larger KVA, ZFS ARC steps back if KVA usage
reaches certain threshold (3/4 on i386 or 16/17 otherwise).  FreeBSD has
even less KVA, but had no such limit on archs with direct map as amd64.
As result, on machines with a lot of RAM, during load with very small user-
space memory pressure, such as `zfs send`, it was possible to reach state,
when there is enough both physical RAM and KVA (I've seen up to 25-30%),
but no continuous KVA range to allocate even single 128KB I/O request.

Address this situation from two sides:
 - restore KVA usage limitations in a way the most close to Illumos;
 - introduce new requirement for KVA fragmentation, specifying that we
should have at least one sequential KVA range of zfs_max_recordsize bytes.

Experiments show that first limitation done alone is not sufficient.  On
machine with 64GB of RAM it is sometimes needed to drop up to half of ARC
size to get at leats one 1MB KVA chunk.  Statically limiting ARC to half
of KVA/RAM is too strict, so second limitation makes it to work in cycles:
accumulate trash up to certain critical mass, do massive spring-cleaning,
and then start littering again. :)

MFC after: 1 month

9 years agoAdd more documentation about the "net.inet.ip.random_id" sysctl knob
hselasky [Fri, 3 Apr 2015 14:00:08 +0000 (14:00 +0000)]
Add more documentation about the "net.inet.ip.random_id" sysctl knob
and how it can affect information flow between observers.

MFC after: 1 week

9 years agoOnly enable the efi framebuffer on x86 for now
andrew [Fri, 3 Apr 2015 12:54:38 +0000 (12:54 +0000)]
Only enable the efi framebuffer on x86 for now

9 years agoOnly include machine/specialreg.h on x86
andrew [Fri, 3 Apr 2015 12:30:18 +0000 (12:30 +0000)]
Only include machine/specialreg.h on x86

9 years agoOnly enable comconsole and nullconsole on x86.
andrew [Fri, 3 Apr 2015 12:08:08 +0000 (12:08 +0000)]
Only enable comconsole and nullconsole on x86.

9 years agoo Remove superfluous includes
br [Fri, 3 Apr 2015 11:37:23 +0000 (11:37 +0000)]
o Remove superfluous includes
o Avoid NULL pointer access
o Fix 'set but not used' warning

Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de>

9 years agoMerge the common parts of the SOCKIT and SOCKIT-BERI kerenel, and mark the
andrew [Fri, 3 Apr 2015 11:12:59 +0000 (11:12 +0000)]
Merge the common parts of the SOCKIT and SOCKIT-BERI kerenel, and mark the
former as NO_UNIVERSE.

9 years agoAdd space for future expansion [1]. While here clean up a little, spsr is
andrew [Fri, 3 Apr 2015 10:56:42 +0000 (10:56 +0000)]
Add space for future expansion [1]. While here clean up a little, spsr is
only 32-bits, and mark the holes in the struct with a pad member.

Suggested by: kib [1]
Sponsored by: The FreeBSD Foundation

9 years agoFix merge error.
cy [Fri, 3 Apr 2015 10:20:59 +0000 (10:20 +0000)]
Fix merge error.

Submitted by: jkim

9 years agoRemove rednandt file.
cy [Fri, 3 Apr 2015 10:17:36 +0000 (10:17 +0000)]
Remove rednandt file.

Submitted by: jkim

9 years agoAdd support for thread local storage on arm64 to the runtime linker. The
andrew [Fri, 3 Apr 2015 09:35:52 +0000 (09:35 +0000)]
Add support for thread local storage on arm64 to the runtime linker. The
ABI specifies that, for R_AARCH64_TLSDESC relocations, we use the symbol
value, addend, and object tls offset to calculate the offset from the tls
base. We then cache this value for future reference.

Differential Revision: https://reviews.freebsd.org/D2183
Reviewed by: kib
Sponsored by: The FreeBSD Foundation

9 years agoFix powerpc/ps3 build, too.
jkim [Fri, 3 Apr 2015 02:37:43 +0000 (02:37 +0000)]
Fix powerpc/ps3 build, too.

9 years agoFix mips build, really. :-(
jkim [Fri, 3 Apr 2015 02:31:59 +0000 (02:31 +0000)]
Fix mips build, really. :-(

9 years agoRevert .PATH changes to fix mips build.
jkim [Fri, 3 Apr 2015 02:27:40 +0000 (02:27 +0000)]
Revert .PATH changes to fix mips build.

Reported by: bz
Pointy hat to: jkim

9 years agoRemove redundant mtx_lock/unlock in ciss_name_device. This is a guaranteed
peter [Thu, 2 Apr 2015 23:12:18 +0000 (23:12 +0000)]
Remove redundant mtx_lock/unlock in ciss_name_device. This is a guaranteed
insta-panic on device add/remove.  This is only called from the notify
thread which already holds the lock while calling this function.

9 years agofortune/tools/do_uniq.py
eadler [Thu, 2 Apr 2015 22:42:23 +0000 (22:42 +0000)]
fortune/tools/do_uniq.py

slight imporvements to do_uniq.py:
- use with open()
- don't depend on sys.argv directly
- fix style

9 years agoWhen an mbuf allocation fails in the receive path, the mbuf containing the received...
davidcs [Thu, 2 Apr 2015 21:55:03 +0000 (21:55 +0000)]
When an mbuf allocation fails in the receive path, the mbuf containing the received packet is not sent to the host net
work stack and is reused again on the receive ring.  Remaining received packets in the ring are not processed in that
invocation of bxe_rxeof() and defered to the task thread.

MFC after: 5 days

9 years agoMake die available as rtld_die for use by MD relocation code
emaste [Thu, 2 Apr 2015 21:35:36 +0000 (21:35 +0000)]
Make die available as rtld_die for use by MD relocation code

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2213

9 years agolibc: Eliminate duplicate copies of __vdso_gettc.c
emaste [Thu, 2 Apr 2015 21:18:11 +0000 (21:18 +0000)]
libc: Eliminate duplicate copies of __vdso_gettc.c

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2152

9 years agoSpeed up symbol lookup for the amd64 kernel modules.
kib [Thu, 2 Apr 2015 20:14:51 +0000 (20:14 +0000)]
Speed up symbol lookup for the amd64 kernel modules.

Amd64 uses relocatable object files as the modules format.  It is good
WRT not having unneeded overhead for PIC code, in particular, due to
absence of useless GOT and PLT.  But the cost is that the module
linking process cannot use hash to speed up the symbol lookup, and
that each reference to the symbol requiring a relocation, instead of
single-place relocation in GOT.

Cache the successfull symbol lookup results in the module symbol
table, using the newly allocated SHN_FBSD_CACHED value from
SHN_LOOS-HIOS range as an indicator.  The SHN_FBSD_CACHED together
with the non-existent definition of the found symbol are reverted
after successfull relocations, which is done under kld_sx lock, so it
should not be visible to other consumers of the symbol table.

Submitted by: Conrad Meyer
Differential Revision:  https://reviews.freebsd.org/D1718
MFC after: 3 weeks

9 years agoInstall newly added brand-*.4th and logo-*.4th files and reduce duplication.
jkim [Thu, 2 Apr 2015 20:07:05 +0000 (20:07 +0000)]
Install newly added brand-*.4th and logo-*.4th files and reduce duplication.

Reviewed by: dteske
Pointy hat to: dteske

9 years agoMove i386/efi files to new home in efi/loader/arch/i386
emaste [Thu, 2 Apr 2015 18:57:35 +0000 (18:57 +0000)]
Move i386/efi files to new home in efi/loader/arch/i386

This was not (and still is not) connected to the build, but the EFI
loader is in the process of being built for other than amd64 so these
files ought to live in their eventual MD location.

9 years agoUse proper CHAN_TCP_PACKET_DEFAULT for agent forwarding when HPN disabled.
bdrewery [Thu, 2 Apr 2015 18:43:25 +0000 (18:43 +0000)]
Use proper CHAN_TCP_PACKET_DEFAULT for agent forwarding when HPN disabled.

The use of CHAN_TCP_WINDOW_DEFAULT here was fixed in upstream OpenSSH
in CVS 1.4810, git 5baa170d771de9e95cf30b4c469ece684244cf3e:

  - dtucker@cvs.openbsd.org 2007/12/28 22:34:47
    [clientloop.c]
    Use the correct packet maximum sizes for remote port and agent forwarding.
    Prevents the server from killing the connection if too much data is queued
    and an excessively large packet gets sent.  bz #1360, ok djm@.

The change was lost due to the the way the original upstream HPN patch
modified this code. It was re-adding the original OpenSSH code and never
was properly fixed to use the new value.

MFC after: 2 weeks

9 years agoarp(8): add support for printing and deleting entries of type
markj [Thu, 2 Apr 2015 18:18:40 +0000 (18:18 +0000)]
arp(8): add support for printing and deleting entries of type
IFT_INFINIBAND, used in IPoIB.

PR: 151594
Submitted by: Anthony Cornehl <accornehl@gmail.com>
Reviewed by: hselasky
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd stub functions to build libkvm. There will be added, but we need them
andrew [Thu, 2 Apr 2015 17:30:19 +0000 (17:30 +0000)]
Add stub functions to build libkvm. There will be added, but we need them
now get the toolchain target building.

Differential Revision: https://reviews.freebsd.org/D2185
Sponsored by: The FreeBSD Foundation

9 years agoExclude the floating-point functions from libgcc_s on arm64, they are
andrew [Thu, 2 Apr 2015 17:06:15 +0000 (17:06 +0000)]
Exclude the floating-point functions from libgcc_s on arm64, they are
unneeded and will be provided by compiler-rt.

Sponsored by: The FreeBSD Foundation

9 years agoOnly use the CROSS_BINUTILS_PREFIX tool if it exists.
andrew [Thu, 2 Apr 2015 17:03:02 +0000 (17:03 +0000)]
Only use the CROSS_BINUTILS_PREFIX tool if it exists.

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation

9 years agoExtend fixes made in r278103 and r38754 by copying the complete packet
hselasky [Thu, 2 Apr 2015 15:47:37 +0000 (15:47 +0000)]
Extend fixes made in r278103 and r38754 by copying the complete packet
header and not only partial flags and fields. Firewalls can attach
classification tags to the outgoing mbufs which should be copied to
all the new fragments. Else only the first fragment will be let
through by the firewall. This can easily be tested by sending a large
ping packet through a firewall. It was also discovered that VLAN
related flags and fields should be copied for packets traversing
through VLANs. This is all handled by "m_dup_pkthdr()".

Regarding the MAC policy check in ip_fragment(), the tag provided by
the originating mbuf is copied instead of using the default one
provided by m_gethdr().

Tested by: Karim Fodil-Lemelin <fodillemlinkarim at gmail.com>
MFC after: 2 weeks
Sponsored by: Mellanox Technologies
PR: 7802

9 years agoProvide better debugging information in tcp_timer_activate() and
jch [Thu, 2 Apr 2015 14:43:07 +0000 (14:43 +0000)]
Provide better debugging information in tcp_timer_activate() and
tcp_timer_active()

Differential Revision: https://reviews.freebsd.org/D2179
Suggested by: bz
Reviewed by: jhb
Approved by: jhb

9 years agoProvide a comment explaining issues with the counter(9) trick, so that
glebius [Thu, 2 Apr 2015 14:22:59 +0000 (14:22 +0000)]
Provide a comment explaining issues with the counter(9) trick, so that
people won't copy and paste it blindly.

Prodded by: ian
Sponsored by: Nginx, Inc.

9 years agoAdd articles, avoid use of "you", simplify a few sentences.
wblock [Thu, 2 Apr 2015 13:51:06 +0000 (13:51 +0000)]
Add articles, avoid use of "you", simplify a few sentences.

MFC after: 1 week

9 years agoStop including machine/fdt.h, it's not needed.
andrew [Thu, 2 Apr 2015 13:02:25 +0000 (13:02 +0000)]
Stop including machine/fdt.h, it's not needed.

Sponsored by: The FreeBSD Foundation

9 years agoWe may not be using gcc to compile this.
andrew [Thu, 2 Apr 2015 12:58:04 +0000 (12:58 +0000)]
We may not be using gcc to compile this.

Sponsored by: The FreeBSD Foundation

9 years agoAdd the generic timer registers to sysreg.h and cpu-v6.h, and use the
andrew [Thu, 2 Apr 2015 12:56:06 +0000 (12:56 +0000)]
Add the generic timer registers to sysreg.h and cpu-v6.h, and use the
access functions in the generic timer driver.

Differential Revision: https://reviews.freebsd.org/D2198
Sponsored by: The FreeBSD Foundation

9 years agoAdd IPv6 example to iscsi.conf(5) and tweak ordering.
trasz [Thu, 2 Apr 2015 11:52:34 +0000 (11:52 +0000)]
Add IPv6 example to iscsi.conf(5) and tweak ordering.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoUpdate open(2) to make it more obvious that O_NOCTTY and O_TTY_INIT
trasz [Thu, 2 Apr 2015 11:41:04 +0000 (11:41 +0000)]
Update open(2) to make it more obvious that O_NOCTTY and O_TTY_INIT
are ignored.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoRewrite iscsi.conf(5) to better match iscsictl(8).
trasz [Thu, 2 Apr 2015 11:18:43 +0000 (11:18 +0000)]
Rewrite iscsi.conf(5) to better match iscsictl(8).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoRemove unused code.
trasz [Thu, 2 Apr 2015 10:19:24 +0000 (10:19 +0000)]
Remove unused code.

Differential Revision: https://reviews.freebsd.org/D2195
Reviewed by: kib@, imp@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoEnsure the cross assembler, linker and objcopy are used for the build32
dim [Thu, 2 Apr 2015 06:58:17 +0000 (06:58 +0000)]
Ensure the cross assembler, linker and objcopy are used for the build32
stage, just like for the regular world stage.

Reviewed by: rodrigc, imp, bapt, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D2187

9 years ago- Make interrupt resource optional: some upstream FDT blobs (e.g. TI's) do
gonzo [Thu, 2 Apr 2015 03:25:35 +0000 (03:25 +0000)]
- Make interrupt resource optional: some upstream FDT blobs (e.g. TI's) do
    not have interupt property in pl310 node. Interrupt is used only to
    detect cache activity when L2 cache is disabled, it's not vital for
    normal operations.
- Fix intrhook allocation/initialization

9 years agoHandle multiple "gpio-leds"-compatible nodes
gonzo [Thu, 2 Apr 2015 02:43:48 +0000 (02:43 +0000)]
Handle multiple "gpio-leds"-compatible nodes

There are cases when gpioled nodes in DTS come from different sources
(e.g. standard Beaglebone Black LEDs in main DTS + shield LEDs in
overlay DTS) so instead of handling only first compatible node go
through all child nodes

9 years agoUse ^[[m mode-ending (as-in screen.4th `me') versus ^[[37m
dteske [Thu, 2 Apr 2015 01:49:12 +0000 (01:49 +0000)]
Use ^[[m mode-ending (as-in screen.4th `me') versus ^[[37m

MFC after: 3 days
X-MFC-to: stable/10

9 years agoEliminate literal escape sequences from *.4th
dteske [Thu, 2 Apr 2015 01:48:12 +0000 (01:48 +0000)]
Eliminate literal escape sequences from *.4th

Suggested by: alfred
MFC after: 3 days
X-MFC-to: stable/10

9 years agoUse fg/b/me from screen.4th instead of literals
dteske [Thu, 2 Apr 2015 01:46:17 +0000 (01:46 +0000)]
Use fg/b/me from screen.4th instead of literals

MFC after: 3 days
X-MFC-to: stable/10

9 years agoTry to unbreak the build after r280971 by providing the missing
bz [Thu, 2 Apr 2015 00:30:53 +0000 (00:30 +0000)]
Try to unbreak the build after r280971 by providing the missing
#include header for SYSINIT.

9 years agoo Use new function ip_fillid() in all places throughout the kernel,
glebius [Wed, 1 Apr 2015 22:26:39 +0000 (22:26 +0000)]
o Use new function ip_fillid() in all places throughout the kernel,
  where we want to create a new IP datagram.
o Add support for RFC6864, which allows to set IP ID for atomic IP
  datagrams to any value, to improve performance. The behaviour is
  controlled by net.inet.ip.rfc6864 sysctl knob, which is enabled by
  default.
o In case if we generate IP ID, use counter(9) to improve performance.
o Gather all code related to IP ID into ip_id.c.

Differential Revision: https://reviews.freebsd.org/D2177
Reviewed by: adrian, cy, rpaulo
Tested by: Emeric POUPON <emeric.poupon stormshield.eu>
Sponsored by: Netflix
Sponsored by: Nginx, Inc.
Relnotes: yes

9 years agoPrior to aborting due to an instruction emulation error, it is always
tychon [Wed, 1 Apr 2015 20:36:07 +0000 (20:36 +0000)]
Prior to aborting due to an instruction emulation error, it is always
interesting to see what the guest's %rip and instruction bytes are.

Reviewed by: grehan

9 years agoMake changes to busdma code in tx/rx path similar to the ones made in r257541.
erj [Wed, 1 Apr 2015 17:19:55 +0000 (17:19 +0000)]
Make changes to busdma code in tx/rx path similar to the ones made in r257541.

- bus_dmamap_create() does not take the BUS_DMA_NOWAIT flag
- properly unload maps
- do not assign NULL to dma map pointers

Submitted by: Konstantin Belousov <kostikbel@gmail.com>
Approved by: jfv (mentor)
MFC after: 1 week

9 years agoCorrectly handle __fcntl_compat symbol for the !SYSCALL_COMPAT case.
kib [Wed, 1 Apr 2015 16:55:30 +0000 (16:55 +0000)]
Correctly handle __fcntl_compat symbol for the !SYSCALL_COMPAT case.
Both .weak and .alias assembler directives only work when assembling
the file which defines the symbol.

Reported and tested by: andrew
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoFix integer truncation bug in malloc(9)
rstone [Wed, 1 Apr 2015 12:42:26 +0000 (12:42 +0000)]
Fix integer truncation bug in malloc(9)

A couple of internal functions used by malloc(9) and uma truncated
a size_t down to an int.  This could cause any number of issues
(e.g. indefinite sleeps, memory corruption) if any kernel
subsystem tried to allocate 2GB or more through malloc.  zfs would
attempt such an allocation when run on a system with 2TB or more
of RAM.

Note to self: When this is MFCed, sparc64 needs the same fix.

Differential revision: https://reviews.freebsd.org/D2106
Reviewed by: kib
Reported by: Michael Fuckner <michael@fuckner.net>
Tested by: Michael Fuckner <michael@fuckner.net>
MFC after: 2 weeks

9 years agopf: Deal with runt packets
kp [Wed, 1 Apr 2015 12:16:56 +0000 (12:16 +0000)]
pf: Deal with runt packets

On Ethernet packets have a minimal length, so very short packets get padding
appended to them. This padding is not stripped off in ip6_input() (due to
support for IPv6 Jumbograms, RFC2675).
That means PF needs to be careful when reassembling fragmented packets to not
include the padding in the reassembled packet.

While here also remove the 'Magic from ip_input.' bits. Splitting up and
re-joining an mbuf chain here doesn't make any sense.

Differential Revision: https://reviews.freebsd.org/D2189
Approved by: gnn (mentor)

9 years agoPreserve IPv6 fragment IDs accross reassembly and refragmentation
kp [Wed, 1 Apr 2015 12:15:01 +0000 (12:15 +0000)]
Preserve IPv6 fragment IDs accross reassembly and refragmentation

When forwarding fragmented IPv6 packets and filtering with PF we
reassemble and refragment. That means we generate new fragment headers
and a new fragment ID.

We already save the fragment IDs so we can do the reassembly so it's
straightforward to apply the incoming fragment ID on the refragmented
packets.

Differential Revision: https://reviews.freebsd.org/D2188
Approved by: gnn (mentor)

9 years agomultiboot: fix error codes
royger [Wed, 1 Apr 2015 10:10:20 +0000 (10:10 +0000)]
multiboot: fix error codes

Return EINVAL instead of EFTYPE if we have a multiboot kernel loaded but
failed to load the modules. This makes it clear that the kernel/module
should be handled by the multiboot handler but something went wrong.

Sponsored by: Citrix Systems R&D

9 years agomultiboot: zero mod list array
royger [Wed, 1 Apr 2015 10:02:28 +0000 (10:02 +0000)]
multiboot: zero mod list array

Zero the list of modules array before using it, or else we might pass
uninitialized data in unused fields of the struct that will make Xen choke.
Also add a check to make sure malloc succeeds.

Sponsored by: Citrix Systems R&D