]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoSupport double-width characters in vt(9)
Ed Maste [Sat, 21 Dec 2013 13:58:55 +0000 (13:58 +0000)]
Support double-width characters in vt(9)

Normal and bold fonts each have a glyph map for single or left half-
glyphs, and right half glyphs.  The flag TF_CJK_RIGHT in term_char_t
requests the right half-glyph.

Reviewed by: ed@
Sponsored by: The FreeBSD Foundation

10 years agovga_pci: Improve boot display detection
Jean-Sébastien Pédron [Sat, 21 Dec 2013 12:55:42 +0000 (12:55 +0000)]
vga_pci: Improve boot display detection

The previous code was checking the "VGA Enable" bit on the video card's
parent PCI-to-PCI bridge only. This didn't work for the case where the
video card is attached to the root PCI bus (ie. the card has no parent
PCI-to-PCI bridge).

Now, the new code:
    1. checks the "VGA Enable" bit on the parent bridge only if it's a
       PCI-to-PCI bridge;
    2. always checks the "I/O" and "Memory address space decoding" bits
       on the video card itself.

However, vendor-specific bits are not used.

This fixes the use of many integrated Radeon cards: without this patch,
we fail to detect them as the boot display and, when radeonkms looks for
the Video BIOS, it skips the shadow copy made by the System BIOS. It
then fails to fully initialize the card, because the shadow copy is the
only way to read the Video BIOS in these situations. A workaround was to
force the boot display selection using the "hw.pci.default_vgapci_unit"
tunable.

A previous version of this patch added a new function doing the checks.
Now, the vga_pci_is_boot_display() function is used to perform the
checks (only until the boot display is found) and return if the given
device is the boot display or not.

Furthermore, vga_pci_attach() logs "Boot video device" if the card being
attached it the Chosen One:
    vgapci0: <VGA-compatible display> [...]
    vgapci0: Boot video device

Reviewed by: kib@, jhb@ (both a previous version)
Tested by: lunatic_ (#freebsd-xorg, integrated Radeon card,
xmj (#freebsd-xorg, i915+NVIDIA cards)

10 years agoFix build with WITHOUT_CAPSICUM.
Glen Barber [Sat, 21 Dec 2013 12:45:35 +0000 (12:45 +0000)]
Fix build with WITHOUT_CAPSICUM.

Submitted by: dt71 gmx com
Sponsored by: The FreeBSD Foundation

10 years agoswapon: Fix buffer overflow when configuring encrypted swap on GBDE.
Jilles Tjoelker [Sat, 21 Dec 2013 11:59:58 +0000 (11:59 +0000)]
swapon: Fix buffer overflow when configuring encrypted swap on GBDE.

PR: bin/184950
Tested by: Radim Kolar
MFC after: 3 days

10 years agoAdd suspend/resume state saving for OpenPIC on PowerMac. It's likely this
Justin Hibbits [Sat, 21 Dec 2013 04:31:54 +0000 (04:31 +0000)]
Add suspend/resume state saving for OpenPIC on PowerMac.  It's likely this
can be used on the others (cpcht and psim), but that has not been tested.

10 years agoAdd quirks to make my old SanDisk Cruzer Mini 128MB happy.
Don Lewis [Sat, 21 Dec 2013 03:05:13 +0000 (03:05 +0000)]
Add quirks to make my old SanDisk Cruzer Mini 128MB happy.

MFC after: 1 week

10 years agoFix a brain-o. I had misread the limit as a size, but it's a pointer.
Justin Hibbits [Sat, 21 Dec 2013 00:37:32 +0000 (00:37 +0000)]
Fix a brain-o.  I had misread the limit as a size, but it's a pointer.

Submitted by: Howard Su
MFC after: 2 weeks
X-MFC-with: r259668

10 years agobump Dd
John-Mark Gurney [Sat, 21 Dec 2013 00:15:37 +0000 (00:15 +0000)]
bump Dd

Reminded by: gjb

10 years agoAdd suspend/resume to DBDMA and ATA on PowerMacs.
Justin Hibbits [Sat, 21 Dec 2013 00:07:56 +0000 (00:07 +0000)]
Add suspend/resume to DBDMA and ATA on PowerMacs.

This, and several subsequent commits, are suspend/resume for various PowerMac
drivers, which will include a change to the global suspend/resume code
eventually.

10 years agodocument the m_getjcl function...
John-Mark Gurney [Fri, 20 Dec 2013 23:57:05 +0000 (23:57 +0000)]
document the m_getjcl function...

10 years agodocument how to install when src is newer than the world.. This allows
John-Mark Gurney [Fri, 20 Dec 2013 23:34:10 +0000 (23:34 +0000)]
document how to install when src is newer than the world..  This allows
people to build -current systems from older systems...

Thanks to:      Thomas Mueller

10 years agoFix a couple bugs in FBT PowerPC. Clamp the size to a 'instruction size' not
Justin Hibbits [Fri, 20 Dec 2013 23:18:14 +0000 (23:18 +0000)]
Fix a couple bugs in FBT PowerPC.  Clamp the size to a 'instruction size' not
'byte size', and fix a typo.

MFC after: 2 weeks

10 years agoExtend libteken to support CJK fullwidth characters.
Ed Schouten [Fri, 20 Dec 2013 21:31:50 +0000 (21:31 +0000)]
Extend libteken to support CJK fullwidth characters.

Introduce a new formatting bit (TF_CJK_RIGHT) that is set when putting a
cell that is the right part of a CJK fullwidth character. This will
allow drivers like vt(9) to support fullwidth characters properly.

emaste@ has a patch to extend vt(9)'s font handling to increase the
number of Unicode -> glyph maps from 2 ({normal,bold)} to 4
({normal,bold} x {left,right}). This will need to use this formatting
bit to determine whether to draw the left or right glyph.

Reviewed by: emaste

10 years agogcc: clean some warnings from -Wformat-security
Pedro F. Giffuni [Fri, 20 Dec 2013 20:57:13 +0000 (20:57 +0000)]
gcc: clean some warnings from -Wformat-security

Obtained from: Apple GCC 4.2 - 5646 (Radar 5764921)
MFC after: 1 week

10 years agoAdd another Haswell model (0x45) to the set of supported chips.
George V. Neville-Neil [Fri, 20 Dec 2013 20:22:10 +0000 (20:22 +0000)]
Add another Haswell model (0x45) to the set of supported chips.
Model 0x45 appears, for example, in late 2013 Mac Book Pro models
and is properly emulated by VMware.

10 years agoMove list of ttys handling from the allocating procedures, to the
Gleb Smirnoff [Fri, 20 Dec 2013 19:45:51 +0000 (19:45 +0000)]
Move list of ttys handling from the allocating procedures, to the
device creation stage. A device creation can fail, and in that case
an entry already on the list will be freed.

Sponsored by: Nginx, Inc.

10 years agoFix build.
Gleb Smirnoff [Fri, 20 Dec 2013 19:44:29 +0000 (19:44 +0000)]
Fix build.

10 years agoRevert r259619:
Pedro F. Giffuni [Fri, 20 Dec 2013 18:16:02 +0000 (18:16 +0000)]
Revert r259619:
Fixes GCC libstdc++/29286

The fix seems to work for amd64 but causes segfaults on powerpc.
At this time gcc is much more important on powerpc than on amd64.

Reported by: andreast

10 years agogcc: revert Rvalue references.
Pedro F. Giffuni [Fri, 20 Dec 2013 18:09:34 +0000 (18:09 +0000)]
gcc: revert Rvalue references.

They are very useful but at this time I prefer not to figure out
some  minor conflicts with the bigger Apple's blocks support
patch that is being worked on for current.

10 years agoRemove several linear list traversals per request from RPC server code.
Alexander Motin [Fri, 20 Dec 2013 17:39:07 +0000 (17:39 +0000)]
Remove several linear list traversals per request from RPC server code.

  Do not insert active ports into pool->sp_active list if they are success-
fully assigned to some thread.  This makes that list include only ports that
really require attention, and so traversal can be reduced to simple taking
the first one.

  Remove idle thread from pool->sp_idlethreads list when assigning some
work (port of requests) to it.  That again makes possible to replace list
traversals with simple taking the first element.

10 years agoAdd suspend/resume handlers for ATI backlight ppc driver.
Justin Hibbits [Fri, 20 Dec 2013 16:37:03 +0000 (16:37 +0000)]
Add suspend/resume handlers for ATI backlight ppc driver.

With this, also shut shut off the display (DPMS-style) and disable the clocking
when the backlight level is set to 0.  This is taken from the radeonkms driver
(radeon_legacy_encoders.c) which doesn't yet support PowerPC, and won't for a
while, as it's missing full AGP support.

10 years agogcc: merge upstream fix and new feature.
Pedro F. Giffuni [Fri, 20 Dec 2013 16:01:02 +0000 (16:01 +0000)]
gcc: merge upstream fix and new feature.

Fix for PR c++/29928

Add support for Rvalue references as described here:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html

Obtained from: gcc 4.3 (rev. 124724, 125211; GPLv2)
MFC after: 2 weeks

10 years agoEnable AltGr key by default.
Aleksandr Rybalko [Fri, 20 Dec 2013 15:45:22 +0000 (15:45 +0000)]
Enable AltGr key by default.

Asked by: many
Sponsored by: The FreeBSD Foundation

10 years agoSet mouse level per window, instead of global.
Aleksandr Rybalko [Fri, 20 Dec 2013 15:37:57 +0000 (15:37 +0000)]
Set mouse level per window, instead of global.

Sponsored by: The FreeBSD Foundation

10 years agogcc: more diff reductions against Apple GCC.
Pedro F. Giffuni [Fri, 20 Dec 2013 14:56:52 +0000 (14:56 +0000)]
gcc: more diff reductions against Apple GCC.

Mostly cosmetical changes to aid further merges.

Obtained from: gcc 4.3 (rev. 120611, 124839; GPLv2)
MFC after: 1 week

10 years agoo Remove assertions on ipa_version as sometimes the version detection
Attilio Rao [Fri, 20 Dec 2013 14:03:56 +0000 (14:03 +0000)]
o Remove assertions on ipa_version as sometimes the version detection
  using cpuid can be quirky (this is the case of VMWare without the
  vPMC support) but fail to probe hwpmc.
o Apply the fix for XEON family of processors as established by
  315338-020 document (bug AJ85).

Sponsored by: EMC / Isilon storage division
Reviewed by: fabient

10 years agoFix build broken in r259644.
Gleb Smirnoff [Fri, 20 Dec 2013 13:18:50 +0000 (13:18 +0000)]
Fix build broken in r259644.

Submitted by: tuexen
Pointy hat to: glebius

10 years agoFurther split kvm(3) and sysctl interfaces for route table printing.
Alexander V. Chernikov [Fri, 20 Dec 2013 12:08:36 +0000 (12:08 +0000)]
Further split kvm(3) and sysctl interfaces for route table printing.

MFC after: 4 weeks
Sponsored by: Yandex LLC

10 years agoixgbe(4) takes packet counters from hardware in ixgbe_update_stats_counters(),
Gleb Smirnoff [Fri, 20 Dec 2013 10:57:47 +0000 (10:57 +0000)]
ixgbe(4) takes packet counters from hardware in ixgbe_update_stats_counters(),
so we don't need to do a per packet increment, which trashes cache line.

Submitted by: oleg

10 years agoDisable the now unpredicably bogus check for whether we have
Adrian Chadd [Fri, 20 Dec 2013 07:41:03 +0000 (07:41 +0000)]
Disable the now unpredicably bogus check for whether we have
eneough queue space before queuing a bunch of IP fragments.

As the comment in the committed change says, in the post-if_transmit(),
post-SMP, post-preemption world, there's just too much overlapping
concurrent code paths and different approaches to driver transmit
queue management to have this code even remotely be effective.

The only specific place it could be useful is if ALTQ is enabled
but again it doesn't at all promise that all the fragments will be
transmitted anyway.

The main reason for committing this change is to disable a parallel
place where the drops counter is incremented.  This is a side effect
of an upcoming change to ixgbe/cxgbe to handle the queue drops
counter slightly better.

Sponsored by: Netflix, Inc.

10 years agoRe-arrange bits in the amd64/pmap 'pm_flags' field.
Neel Natu [Fri, 20 Dec 2013 05:50:22 +0000 (05:50 +0000)]
Re-arrange bits in the amd64/pmap 'pm_flags' field.

The least significant 8 bits of 'pm_flags' are now used for the IPI vector
to use for nested page table TLB shootdown.

Previously we used IPI_AST to interrupt the host cpu which is functionally
correct but could lead to misleading interrupt counts for AST handler. The
AST handler was also doing a lot more than what is required for the nested
page table TLB shootdown (EOI and IRET).

10 years agoAdd identification and necessary type checks for Krait CPU cores. Krait CPU is used in
Ganbold Tsagaankhuu [Fri, 20 Dec 2013 00:56:23 +0000 (00:56 +0000)]
Add identification and necessary type checks for Krait CPU cores. Krait CPU is used in
Qualcomm Snapdragon S4 and Snapdragon 400/600/800 SoCs and has architectural
similarities to ARM Cortex-A15. As for development boards IFC6400 series embedded
boards from Inforce Computing uses Snapdragon S4 Pro/APQ8064.

Approved by: stas (mentor)

10 years agoUse more fine-grained kvm(3) symbol lookup: routing code retrieves only
Alexander V. Chernikov [Fri, 20 Dec 2013 00:17:26 +0000 (00:17 +0000)]
Use more fine-grained kvm(3) symbol lookup: routing code retrieves only
necessary symbols needed per subsystem. Main kvm(3) init is now delayed
as much as possbile. This finally fixes performance issues reported in
kern/167204.
Some non-working code (ng_socket.ko symbol addresses calculation) removed.
Some global variables eliminated.

PR: kern/167204
MFC after: 4 weeks

10 years agoAdd an option to ignore accesses by the guest to unimplemented MSRs.
Neel Natu [Thu, 19 Dec 2013 22:27:28 +0000 (22:27 +0000)]
Add an option to ignore accesses by the guest to unimplemented MSRs.

Also, ignore a couple of SandyBridge uncore PMC MSRs that Centos 6.4 writes
to during boot.

Reviewed by: grehan

10 years agoPrevent users from deactivating the last component of a mirror.
Andrey V. Elsukov [Thu, 19 Dec 2013 22:13:12 +0000 (22:13 +0000)]
Prevent users from deactivating the last component of a mirror.

PR: 184985
MFC after: 1 week

10 years agoFix compilation on 32 bit architectures and use INT64_MAX instead of
Stefan Eßer [Thu, 19 Dec 2013 21:35:33 +0000 (21:35 +0000)]
Fix compilation on 32 bit architectures and use INT64_MAX instead of
LONG_MAX for the upper bound check.

10 years agoRework flow control for connection-oriented (TCP) RPC server.
Alexander Motin [Thu, 19 Dec 2013 21:31:28 +0000 (21:31 +0000)]
Rework flow control for connection-oriented (TCP) RPC server.

  When processing receive buffer, write the amount of data, expected
in present request record, into socket's so_rcv.sb_lowat to make stack
aware about our needs.  When processing following upcalls, ignore them
until socket collect enough data to be read and processed in one turn.
  This change reduces number of context switches and other operations
in RPC stack during large NFS writes (especially via non-Jumbo networks)
by order of magnitude.

  After precessing current packet, take another look into the pending
buffer to find out whether the next packet had been already received.
If not, deactivate this port right there without making RPC code to
push this port to another thread just to find that there is nothing.
If the next packet is received partially, also deactivate the port, but
also update socket's so_rcv.sb_lowat to not be woken up prematurely.
  This change additionally reduces number of context switches per NFS
request about in half.

10 years agoMFV of r259624, tzdata2013i
Edwin Groothuis [Thu, 19 Dec 2013 20:19:57 +0000 (20:19 +0000)]
MFV of r259624, tzdata2013i

Removed support for solar-time-based time zones
Jordan stays at summer time this year.
Fix historical data for Cuba

Obtained from:  ftp://ftp.iana.org/tz/releases/

10 years agoVendor import of tzdata2013i:
Edwin Groothuis [Thu, 19 Dec 2013 20:15:49 +0000 (20:15 +0000)]
Vendor import of tzdata2013i:

Removed support for solar-time-based time zones
Jordan stays at summer time this year.
Fix historical data for Cuba

Obtained from: ftp://ftp.iana.org/tz/releases/

10 years agogcc: backport upstream fix for issue with C++'s placement new
Pedro F. Giffuni [Thu, 19 Dec 2013 18:27:32 +0000 (18:27 +0000)]
gcc: backport upstream fix for issue with C++'s placement new

Fixes GCC libstdc++/29286

Obtained from: gcc 4.3 (rev. 125603, 125653; GPLv2)
MFC after: 2 weeks

10 years agoEnable mouse support for terminal clients (like dialog(1)).
Aleksandr Rybalko [Thu, 19 Dec 2013 15:31:20 +0000 (15:31 +0000)]
Enable mouse support for terminal clients (like dialog(1)).

Sponsored by: The FreeBSD Foundation

10 years agottm_bo_vm_lookup_rb: actually make use of the red-black tree
Andriy Gapon [Thu, 19 Dec 2013 12:00:48 +0000 (12:00 +0000)]
ttm_bo_vm_lookup_rb: actually make use of the red-black tree

Previously the code would just iterate over the whole tree as if it were
just a list.

Without this change I would observe X server becoming more and more
jerky over time.

MFC after: 5 days

10 years agoFix overflow for timeout values of more than 68 years, which is the maximum
Stefan Eßer [Thu, 19 Dec 2013 09:01:46 +0000 (09:01 +0000)]
Fix overflow for timeout values of more than 68 years, which is the maximum
covered by sbintime (LONG_MAX seconds).

Some programs use timeout values in excess of 1000 years. The conversion
to sbintime caused wrap-around on overflow, which resulted in short or
negative timeout values. This caused long delays on sockets opened by
affected programs (e.g. OpenSSH).

Kernels compiled without -fno-strict-overflow were not affected, apparently
because the compiler tested the sign of the timeout value before performing
the multiplication that lead to overflow.

When the -fno-strict-overflow option was added to CFLAGS, this optimization
was disabled and the test was performed on the result of the multiplication.
Negative products were caught and resulted in EINVAL being returned, but
wrap-around to positive values just shortened the timeout value to the
residue of the result that could be represented by sbintime.

The fix is to cap the timeout values at the maximum that can be represented
by sbintime, which is 2^31 - 1 seconds or more than 68 years.

After this change, the kernel can be compiled with -fno-strict-overflow
with no ill effects.

MFC after: 3 days

10 years agoWhen using a bootpool, set the cachefile property so that it gets
Devin Teske [Thu, 19 Dec 2013 06:43:52 +0000 (06:43 +0000)]
When using a bootpool, set the cachefile property so that it gets
imported automatically upon reboot to the newly installed system.

MFC after: 1 day

10 years agoFix a regression that occurred with SVN revisions 259474 and 259476 where
Devin Teske [Thu, 19 Dec 2013 06:41:30 +0000 (06:41 +0000)]
Fix a regression that occurred with SVN revisions 259474 and 259476 where
installation to 3-4+ (depending on vdev type) vdevs would result in odd
error messages where the zpool `create' command appeared to repeat itself
(an artifact of printf when you supply too many arguments -- caused by
neglecting to properly quote the multi-word expansion of $*vdevs when
creating the pool(s)). Example error below (taken from bsdinstall_log):

DEBUG: zfs_create_boot: Creating root pool...
DEBUG: zfs_create_boot: zpool create -o altroot=/mnt -m none -f "zroot" \
ada0p3.nop ada1p3.nopzpool create ada2p3.nop "ada3p3.nop"
DEBUG: zfs_create_boot: retval=1 <output below>
cannot open 'ada1p3.nopzpool': no such GEOM provider

10 years agoBump the loader version to 3.2 after various dosfs fixes (in particular).
Marcel Moolenaar [Thu, 19 Dec 2013 05:28:43 +0000 (05:28 +0000)]
Bump the loader version to 3.2 after various dosfs fixes (in particular).

10 years agoFix readdir for the root directory on a FAT32 file system. The root
Marcel Moolenaar [Thu, 19 Dec 2013 05:23:10 +0000 (05:23 +0000)]
Fix readdir for the root directory on a FAT32 file system. The root
directory is like any subdirectory and as such needs to use a real
cluster number. To this end, keep a DE structure for the root in
the DOS_FS structure and populate it accordingly.

While here:
o   allow consecutive path separators by skipping them all.
o   add missing $FreeBSD$ keyword to dosfs.h.

10 years agoFix doc build.
Glen Barber [Thu, 19 Dec 2013 05:22:48 +0000 (05:22 +0000)]
Fix doc build.

Sponsored by: The FreeBSD Foundation

10 years agoAdd item for pkg(8).
Craig Rodrigues [Thu, 19 Dec 2013 04:55:35 +0000 (04:55 +0000)]
Add item for pkg(8).

10 years agoInvoke the kld_* event handlers from linker_load_file() and
Mark Johnston [Thu, 19 Dec 2013 03:48:36 +0000 (03:48 +0000)]
Invoke the kld_* event handlers from linker_load_file() and
linker_unload_file() rather than kern_kldload() and kern_kldunload(). This
ensures that the handlers are invoked for files that are loaded/unloaded
automatically as dependencies. Previously, they were only invoked for files
loaded by a user.

As a side effect, the kld_load and kld_unload handlers are now invoked with
the kernel linker lock exclusively held.

Reported by: avg
Reviewed by: jhb
MFC after: 2 weeks

10 years agoAdd entry for bhyve.
Craig Rodrigues [Thu, 19 Dec 2013 03:21:53 +0000 (03:21 +0000)]
Add entry for bhyve.

10 years agoMake the world a bit more secure place (hopefully) and turn the casperd on
Pawel Jakub Dawidek [Thu, 19 Dec 2013 00:53:11 +0000 (00:53 +0000)]
Make the world a bit more secure place (hopefully) and turn the casperd on
by default.

Sponsored by: The FreeBSD Foundation

10 years agoIf we cannot connect to casperd we don't enter sandbox, but if we can connect
Pawel Jakub Dawidek [Thu, 19 Dec 2013 00:51:48 +0000 (00:51 +0000)]
If we cannot connect to casperd we don't enter sandbox, but if we can connect
to casperd, but we cannot access the service we need we exit with an error.
This should not happen and just indicates some configuration error which
should be fixed, so we force the user to do it by failing.

Discussed with: emaste

10 years agoMFV r258923: 4188 assertion failed in dmu_tx_hold_free(): dn_datablkshift != 0
Pawel Jakub Dawidek [Wed, 18 Dec 2013 21:45:46 +0000 (21:45 +0000)]
MFV r258923: 4188 assertion failed in dmu_tx_hold_free(): dn_datablkshift != 0

illumos/illumos-gate@bb411a08b05466bfe0c7095b6373bbc1587e259a

MFC after: 3 days

10 years agoIndent.
Craig Rodrigues [Wed, 18 Dec 2013 21:23:16 +0000 (21:23 +0000)]
Indent.

10 years agoAdd SVN revision numbers for Chelsio updates.
Craig Rodrigues [Wed, 18 Dec 2013 21:22:16 +0000 (21:22 +0000)]
Add SVN revision numbers for Chelsio updates.

10 years agoIn bsdinstall_log, it's rather confusing to see the following sequence:
Devin Teske [Wed, 18 Dec 2013 21:16:57 +0000 (21:16 +0000)]
In bsdinstall_log, it's rather confusing to see the following sequence:
  DEBUG: Running installation step: hostname
  rm: /tmp/bsdinstall_etc/fstab: No such file or directory

The two lines are unrelated, and the rm is spurious. Let's add `-f' to
that rm(1) so it doesn't confuse us when debugging an install.

MFC after: 3 days

10 years agoAdd SVN revision numbers for Mellanox updates.
Craig Rodrigues [Wed, 18 Dec 2013 21:14:43 +0000 (21:14 +0000)]
Add SVN revision numbers for Mellanox updates.

10 years agoFix "[: -eq: argument expected" error introduced by SVN r256343. The code
Devin Teske [Wed, 18 Dec 2013 21:13:50 +0000 (21:13 +0000)]
Fix "[: -eq: argument expected" error introduced by SVN r256343. The code
should not have used DIALOG_CANCEL because dialog.subr wasn't included to
define it. The effect of the error was that you could not cancel the
partition dialog. Discovered by checking bsdinstall_log for something else.

MFC after: 3 days

10 years agocxgbe.4: Belated update to the man page to reflect T5 support.
Navdeep Parhar [Wed, 18 Dec 2013 20:37:49 +0000 (20:37 +0000)]
cxgbe.4: Belated update to the man page to reflect T5 support.

MFC after: 1 day

10 years agoAdd net.inet.ip.fw.dyn_keep_states sysctl which
Alexander V. Chernikov [Wed, 18 Dec 2013 20:17:05 +0000 (20:17 +0000)]
Add net.inet.ip.fw.dyn_keep_states sysctl which
re-links dynamic states to default rule instead of
flushing on rule deletion.
This can be useful while performing ruleset reload
(think about `atomic` reload via changing sets).
Currently it is turned off by default.

MFC after: 2 weeks
Sponsored by: Yandex LLC

10 years agoRestore corefiles handling via kvm(3).
Alexander V. Chernikov [Wed, 18 Dec 2013 20:04:04 +0000 (20:04 +0000)]
Restore corefiles handling via kvm(3).

Found by: John-Mark Gurney <jmg at funkthat.com>
MFC after: 4 weeks

10 years agoCommit 2/2: vendor whitespace changes to the driver.
Xin LI [Wed, 18 Dec 2013 19:25:40 +0000 (19:25 +0000)]
Commit 2/2: vendor whitespace changes to the driver.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by: 黃清隆 <ching2048 areca com tw>

10 years agoCommit 1/2: update arcmsr(4) to 1.20.00.29 in order to add
Xin LI [Wed, 18 Dec 2013 19:23:05 +0000 (19:23 +0000)]
Commit 1/2: update arcmsr(4) to 1.20.00.29 in order to add
support of ARC-1883 SAS 12Gb/s RAID controllers.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by: 黃清隆 <ching2048 areca com tw>

10 years agoSwitch netstat -rn to use standard API for retrieving list of routes
Alexander V. Chernikov [Wed, 18 Dec 2013 18:25:27 +0000 (18:25 +0000)]
Switch netstat -rn to use standard API for retrieving list of routes
instead of peeking inside in-kernel radix via kget.
This permits us to change kernel structures without breaking userland.
Additionally, this change provide more reliable and faster output.

`Refs` and `Use` fields available in IPv4 by default (and via -W
for other families) were removed. `Refs` is radix-specific thing
which is not informative for users. `Use` field value is handy sometimes,
but a) current API does not support it and b) I'm not sure we will
support per-rte pcpu counters in near future.

Old method of retrieving data is still supported (either by defining
NewTree=0 or running netstat with -A). However, Refs/Use fields are
hidden.

Sponsored by: Yandex LLC
MFC after: 4 weeks
PR: kern/167204

10 years agoFix an inappropriate free of a non-dynamic value. While here, make the
Marcel Moolenaar [Wed, 18 Dec 2013 17:03:43 +0000 (17:03 +0000)]
Fix an inappropriate free of a non-dynamic value. While here, make the
code more naive and robust:
1.  When setting ev_value, also always set ev_flags appropriately
2.  Always check ev_value and ev_flags before calling free.

Both the value and the EV_DYNAMIC property can come directly from the
consumers of the environment functionality, so it's good to be careful.
And since this code is typically not looked at for long periods of
time, it's good to have it be a little "dumb-looking".

Trigger case for the bug:
        env_setenv("foo", 0, "1", NULL, NULL);
        env_setenv("foo", 0, "2", NULL, NULL);

Obtained from: Juniper Networks, Inc.

10 years agogcc: add Apple compatible -Wnewline-eof
Pedro F. Giffuni [Wed, 18 Dec 2013 15:27:48 +0000 (15:27 +0000)]
gcc: add Apple compatible -Wnewline-eof

Fix document: "Apple compatible" suits better the origin.

MFC after: 1 week

10 years agogcc: add Apple compatible -Wnewline-eof
Pedro F. Giffuni [Wed, 18 Dec 2013 14:53:36 +0000 (14:53 +0000)]
gcc: add Apple compatible -Wnewline-eof

GCC 4.2 and previous have always warned about
"No newline at end of file".

Upstream GCC removed the warning completely but
Apple made it an optional warning. Adopt it for
compatibility with older GCC and clang.

While here, add comment to complement r258712.

Obtained from: Apple Inc. (Apple GCC 4.2 - 5531)
MFC after: 1 week

10 years agoMake nmdm(4) destroy devices when both sides of a pair are disconnected.
Gleb Smirnoff [Wed, 18 Dec 2013 12:53:48 +0000 (12:53 +0000)]
Make nmdm(4) destroy devices when both sides of a pair are disconnected.
This makes it possible to kldunload nmdm.ko when there are no users of it.

Reviewed by: kib
Sponsored by: Nginx, Inc.

10 years ago- Rename tty_makedev() into tty_makedevf() and make it capable
Gleb Smirnoff [Wed, 18 Dec 2013 12:50:43 +0000 (12:50 +0000)]
- Rename tty_makedev() into tty_makedevf() and make it capable
  to fail and return error.
- Use make_dev_p() in tty_makedevf() instead of make_dev_cred().
- Always pass MAKEDEV_CHECKNAME flag.
- Optionally pass MAKEDEV_REF flag.
- Provide macro for compatibility with old API.

This fixes races with simultaneous creation and desctruction of
ttys, and makes it possible to call tty_makedevf() from device
cloners.

A race in tty_watermarks() still exist, since the latter drops
lock for M_WAITOK allocation. This will be addressed in separate
commit.

Reviewed by: kib
Sponsored by: Nginx, Inc.

10 years agoshm_open(2): Fixed the history information.
Ruslan Ermilov [Wed, 18 Dec 2013 12:18:17 +0000 (12:18 +0000)]
shm_open(2): Fixed the history information.

While here, sort xrefs.

Reviewed by: jhb

10 years agoUse 'val' instead of 'val & 0xff' since the last argument of run_bbp_write()
Kevin Lo [Wed, 18 Dec 2013 08:53:40 +0000 (08:53 +0000)]
Use 'val' instead of 'val & 0xff' since the last argument of run_bbp_write()
is uint8_t.

Spotted by: yongari

10 years agoFix style: add tab after #define.
Kevin Lo [Wed, 18 Dec 2013 08:39:12 +0000 (08:39 +0000)]
Fix style: add tab after #define.

10 years agoFix typo in comment.
Kevin Lo [Wed, 18 Dec 2013 07:47:50 +0000 (07:47 +0000)]
Fix typo in comment.

10 years agoAdd support to IQ calibration.
Kevin Lo [Wed, 18 Dec 2013 07:34:57 +0000 (07:34 +0000)]
Add support to IQ calibration.

10 years agoFailed m_devget(9) indicates lack of free mbuf cluster. Update
Pyun YongHyeon [Wed, 18 Dec 2013 07:23:42 +0000 (07:23 +0000)]
Failed m_devget(9) indicates lack of free mbuf cluster.  Update
if_iqdrops counter for that case since the received frame is ok.
While here, simplify updating counter logic.

10 years agoUse vmcs_read() and vmcs_write() in preference to vmread() and vmwrite()
Neel Natu [Wed, 18 Dec 2013 06:24:21 +0000 (06:24 +0000)]
Use vmcs_read() and vmcs_write() in preference to vmread() and vmwrite()
respectively. The vmcs_xxx() functions provide inline error checking of
all accesses to the VMCS.

10 years agoClear f_rabuf after freeing the memory it points to. This prevents a
Marcel Moolenaar [Wed, 18 Dec 2013 04:52:30 +0000 (04:52 +0000)]
Clear f_rabuf after freeing the memory it points to. This prevents a
possible double free.

Obtained from: Juniper Networks, Inc.

10 years agoSupport long filenames.
Marcel Moolenaar [Wed, 18 Dec 2013 04:44:38 +0000 (04:44 +0000)]
Support long filenames.

Obtained from: Juniper Networks, Inc.

10 years agoFix build.
Gleb Smirnoff [Wed, 18 Dec 2013 04:36:35 +0000 (04:36 +0000)]
Fix build.

10 years agoRename the ambiguously named 'vm_setup_msi()' and 'vm_setup_msix()' to
Neel Natu [Wed, 18 Dec 2013 03:58:51 +0000 (03:58 +0000)]
Rename the ambiguously named 'vm_setup_msi()' and 'vm_setup_msix()' to
'vm_setup_pptdev_msi()' and 'vm_setup_pptdev_msix()' respectively.

It should now be clear that these functions operate on passthru devices.

10 years agoThe fasttrap fork handler is responsible for removing tracepoints in the
Mark Johnston [Wed, 18 Dec 2013 01:41:52 +0000 (01:41 +0000)]
The fasttrap fork handler is responsible for removing tracepoints in the
child process that were inherited from its parent. However, this should
not be done in the case of a vfork, since the fork handler ends up removing
the tracepoints from the shared vm space, and userland DTrace probes in the
parent will no longer fire as a result.

Now the child of a vfork may trigger userland DTrace probes enabled in its
parent, so modify the fasttrap probe handler to handle this case and handle
the child process in the same way that it would handle the traced process.
In particular, if once traces function foo() in a process that vforks, and
the child calls foo(), fasttrap will treat this call as having come from the
parent. This is the behaviour of the upstream code.

While here, add #ifdef guards to some code that isn't present upstream.

MFC after: 1 month

10 years agoSkip processing of R.Alt as a second Alt key, if sysctl kern.vt.enable_altgr is
Aleksandr Rybalko [Wed, 18 Dec 2013 00:14:58 +0000 (00:14 +0000)]
Skip processing of R.Alt as a second Alt key, if sysctl kern.vt.enable_altgr is
not zero.

Submitted by: andreast
Sponsored by: The FreeBSD Foundation

10 years agogcc: point to our address for bug reports.
Pedro F. Giffuni [Wed, 18 Dec 2013 00:10:30 +0000 (00:10 +0000)]
gcc: point to our address for bug reports.

As recommended by the FSF in gcc/version.c :

"If you distribute a modified version of GCC, please change
this to refer to a document giving instructions for reporting
bugs to you, not us."

MFC after: 2 weeks

10 years agogcc: small merges from upstream
Pedro F. Giffuni [Tue, 17 Dec 2013 23:31:51 +0000 (23:31 +0000)]
gcc: small merges from upstream

Solves GCC issues:
PR middle-end/32602
PR middle-end/32603

Updates the to documentation and processing
improvement.

Obtained from: gcc 4.3 (rev. 119427, 126278, 126422; GPLv2)
MFC after: 2 weeks

10 years agoSimplify contiguous mask checking.
Alexander V. Chernikov [Tue, 17 Dec 2013 22:16:27 +0000 (22:16 +0000)]
Simplify contiguous mask checking.

Suggested by: glebius
MFC after: 2 weeks

10 years agoDo not create a hardware IPv6 server if the listen address is not
Navdeep Parhar [Tue, 17 Dec 2013 21:41:23 +0000 (21:41 +0000)]
Do not create a hardware IPv6 server if the listen address is not
in6addr_any and is not in the CLIP table either.  This fixes a reported
TOE+IPv6 NULL-dereference panic in do_pass_open_rpl().

While here, stop creating hardware servers for any loopback address.
It's just a waste of server tids.

MFC after: 1 week

10 years agogcc: fix ICE in rs600 when using -fno-trapping-math.
Pedro F. Giffuni [Tue, 17 Dec 2013 21:39:40 +0000 (21:39 +0000)]
gcc: fix ICE in rs600 when using -fno-trapping-math.

Solve build issue with previous change.

Obtained from: gcc 4.3 (rev. 120902; GPLv2)
MFC after: 2 weeks

10 years agogcc: fix ICE in rs600 when using -fno-trapping-math.
Pedro F. Giffuni [Tue, 17 Dec 2013 20:53:22 +0000 (20:53 +0000)]
gcc: fix ICE in rs600 when using -fno-trapping-math.

Solves GCC-PR target/30485

Obtained from: gcc 4.3 (rev. 120902; GPLv2)
MFC after: 2 weeks

10 years agoRequire a C++11 compiler to build LLDB
Ed Maste [Tue, 17 Dec 2013 18:30:37 +0000 (18:30 +0000)]
Require a C++11 compiler to build LLDB

In practice the old test (using MK_CLANG_IS_CC) is similar, but
COMPILER_FEATURES provides the information we actually want to test.

Sponsored by: DARPA, AFRL

10 years agoIf vn_open_vnode() succeeded in opening the vnode, but subsequent
Konstantin Belousov [Tue, 17 Dec 2013 17:31:16 +0000 (17:31 +0000)]
If vn_open_vnode() succeeded in opening the vnode, but subsequent
advisory lock cannot be obtained, prevent double-close of the vnode in
vn_close() called from the fdrop(), by resetting file' f_ops methods.

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

10 years agoDo not allow O_EXEC opens for fifo, return EINVAL.
Konstantin Belousov [Tue, 17 Dec 2013 17:28:02 +0000 (17:28 +0000)]
Do not allow O_EXEC opens for fifo, return EINVAL.

Besides not making sense, open(O_EXEC) for fifo creates fifoinfo with
zero readers and writers counts, which causes premature free of pipes.

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

10 years agoFix copy/paste typo.
Andrey V. Elsukov [Tue, 17 Dec 2013 16:45:19 +0000 (16:45 +0000)]
Fix copy/paste typo.

MFC after: 1 week

10 years agoFix copyright and some style(9) things.
Aleksandr Rybalko [Tue, 17 Dec 2013 15:34:38 +0000 (15:34 +0000)]
Fix copyright and some style(9) things.

Sponsored by: The FreeBSD Foundation

10 years agoAdd vt support for RPi. (No early stage yet.)
Aleksandr Rybalko [Tue, 17 Dec 2013 15:23:47 +0000 (15:23 +0000)]
Add vt support for RPi. (No early stage yet.)

Sponsored by: The FreeBSD Foundation

10 years agoSimplify the ofw_bus_lookup_imap() API slightly: make it allocate maskbuf
Nathan Whitehorn [Tue, 17 Dec 2013 15:11:24 +0000 (15:11 +0000)]
Simplify the ofw_bus_lookup_imap() API slightly: make it allocate maskbuf
internally instead of requiring the caller to allocate it.

10 years agoRemove dead code. Most of this was in an #if 0 block; the rest is not
Nathan Whitehorn [Tue, 17 Dec 2013 14:51:47 +0000 (14:51 +0000)]
Remove dead code. Most of this was in an #if 0 block; the rest is not
used and duplicates functionality in dev/ofw.

10 years agoConfigure interrupt sense based on device tree information. This extends
Nathan Whitehorn [Tue, 17 Dec 2013 14:50:35 +0000 (14:50 +0000)]
Configure interrupt sense based on device tree information. This extends
the OF interrupt map API to return sense information to the caller and
the PowerPC Open Firmware PCI base driver to use it to program the PIC.

10 years ago- Assert for not leaking readers rw locks counter on userland return.
Attilio Rao [Tue, 17 Dec 2013 13:37:02 +0000 (13:37 +0000)]
- Assert for not leaking readers rw locks counter on userland return.
- Use a correct spin_cnt for KDTRACE_HOOK case in rw read lock.

Sponsored by: EMC / Isilon storage division

10 years agoFree mbuf in case of error.
Andrey V. Elsukov [Tue, 17 Dec 2013 10:53:17 +0000 (10:53 +0000)]
Free mbuf in case of error.

MFC after: 1 week