Commit Graph

186346 Commits

Author SHA1 Message Date
Aleksandr Rybalko
008f5a254f Enable AltGr key by default.
Asked by:	many
Sponsored by:	The FreeBSD Foundation
2013-12-20 15:45:22 +00:00
Aleksandr Rybalko
d454a052df Set mouse level per window, instead of global.
Sponsored by:	The FreeBSD Foundation
2013-12-20 15:37:57 +00:00
Pedro F. Giffuni
62f78f3261 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
2013-12-20 14:56:52 +00:00
Attilio Rao
026346c8f1 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
2013-12-20 14:03:56 +00:00
Gleb Smirnoff
f56831a217 Fix build broken in r259644.
Submitted by:	tuexen
Pointy hat to:	glebius
2013-12-20 13:18:50 +00:00
Alexander V. Chernikov
8e1dc13857 Further split kvm(3) and sysctl interfaces for route table printing.
MFC after:	4 weeks
Sponsored by:	Yandex LLC
2013-12-20 12:08:36 +00:00
Gleb Smirnoff
46bf53de69 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
2013-12-20 10:57:47 +00:00
Adrian Chadd
ac7e121247 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.
2013-12-20 07:41:03 +00:00
Neel Natu
5515bb73e6 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).
2013-12-20 05:50:22 +00:00
Ganbold Tsagaankhuu
543c9e95f2 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)
2013-12-20 00:56:23 +00:00
Alexander V. Chernikov
fc47e028bb 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
2013-12-20 00:17:26 +00:00
Neel Natu
851d84f1b5 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
2013-12-19 22:27:28 +00:00
Andrey V. Elsukov
7c5710dbaf Prevent users from deactivating the last component of a mirror.
PR:		184985
MFC after:	1 week
2013-12-19 22:13:12 +00:00
Stefan Eßer
774e8d906f Fix compilation on 32 bit architectures and use INT64_MAX instead of
LONG_MAX for the upper bound check.
2013-12-19 21:35:33 +00:00
Alexander Motin
7455eb71a1 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.
2013-12-19 21:31:28 +00:00
Edwin Groothuis
668615cd26 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/
2013-12-19 20:19:57 +00:00
Edwin Groothuis
fd093921ed 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/
2013-12-19 20:15:49 +00:00
Pedro F. Giffuni
915b4b42ae 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
2013-12-19 18:27:32 +00:00
Aleksandr Rybalko
0a036e525d Enable mouse support for terminal clients (like dialog(1)).
Sponsored by:	The FreeBSD Foundation
2013-12-19 15:31:20 +00:00
Andriy Gapon
ea2705e8bf 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
2013-12-19 12:00:48 +00:00
Stefan Eßer
53d5cc255d 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
2013-12-19 09:01:46 +00:00
Devin Teske
6311cc9efe 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
2013-12-19 06:43:52 +00:00
Devin Teske
4b4b90d5a8 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
2013-12-19 06:41:30 +00:00
Marcel Moolenaar
ad098e2975 Bump the loader version to 3.2 after various dosfs fixes (in particular). 2013-12-19 05:28:43 +00:00
Marcel Moolenaar
72cad431b8 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.
2013-12-19 05:23:10 +00:00
Glen Barber
18f3ddcdee Fix doc build.
Sponsored by:	The FreeBSD Foundation
2013-12-19 05:22:48 +00:00
Craig Rodrigues
75381a059a Add item for pkg(8). 2013-12-19 04:55:35 +00:00
Mark Johnston
8f7254629f 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
2013-12-19 03:48:36 +00:00
Craig Rodrigues
8cf9cdeb65 Add entry for bhyve. 2013-12-19 03:21:53 +00:00
Pawel Jakub Dawidek
f01f744647 Make the world a bit more secure place (hopefully) and turn the casperd on
by default.

Sponsored by:	The FreeBSD Foundation
2013-12-19 00:53:11 +00:00
Pawel Jakub Dawidek
8ff3952b72 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
2013-12-19 00:51:48 +00:00
Pawel Jakub Dawidek
4106732882 MFV r258923: 4188 assertion failed in dmu_tx_hold_free(): dn_datablkshift != 0
illumos/illumos-gate@bb411a08b0

MFC after:	3 days
2013-12-18 21:45:46 +00:00
Craig Rodrigues
6168ea49fe Indent. 2013-12-18 21:23:16 +00:00
Craig Rodrigues
4c099f7e5c Add SVN revision numbers for Chelsio updates. 2013-12-18 21:22:16 +00:00
Devin Teske
2d5cf580aa 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
2013-12-18 21:16:57 +00:00
Craig Rodrigues
7e9787e273 Add SVN revision numbers for Mellanox updates. 2013-12-18 21:14:43 +00:00
Devin Teske
31a0cf130a 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
2013-12-18 21:13:50 +00:00
Navdeep Parhar
ad016cb8ab cxgbe.4: Belated update to the man page to reflect T5 support.
MFC after:	1 day
2013-12-18 20:37:49 +00:00
Alexander V. Chernikov
fb2b51fab1 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
2013-12-18 20:17:05 +00:00
Alexander V. Chernikov
11188df260 Restore corefiles handling via kvm(3).
Found by:	John-Mark Gurney <jmg at funkthat.com>
MFC after:	4 weeks
2013-12-18 20:04:04 +00:00
Xin LI
47e52731cc Commit 2/2: vendor whitespace changes to the driver.
Many thanks to Areca for continuing to support FreeBSD.

Submitted by:	黃清隆 <ching2048 areca com tw>
2013-12-18 19:25:40 +00:00
Xin LI
224a78aeed 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>
2013-12-18 19:23:05 +00:00
Alexander V. Chernikov
c49b4b8055 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
2013-12-18 18:25:27 +00:00
Marcel Moolenaar
07fb02c0d5 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.
2013-12-18 17:03:43 +00:00
Pedro F. Giffuni
505ca70a65 gcc: add Apple compatible -Wnewline-eof
Fix document: "Apple compatible" suits better the origin.

MFC after:	1 week
2013-12-18 15:27:48 +00:00
Pedro F. Giffuni
cfbe5d01ee 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
2013-12-18 14:53:36 +00:00
Gleb Smirnoff
a95ecdf0cf 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.
2013-12-18 12:53:48 +00:00
Gleb Smirnoff
e1e585a87c - 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.
2013-12-18 12:50:43 +00:00
Ruslan Ermilov
0f987f1f08 shm_open(2): Fixed the history information.
While here, sort xrefs.

Reviewed by:	jhb
2013-12-18 12:18:17 +00:00
Kevin Lo
9df3ee0758 Use 'val' instead of 'val & 0xff' since the last argument of run_bbp_write()
is uint8_t.

Spotted by:	yongari
2013-12-18 08:53:40 +00:00