According to a clarification at http://austingroupbugs.net/view.php?id=503
ptsname may set errno, so avoid saving and restoring errno across the
function.
Avoid mapping ENOENT to ENOTDIR for non-existent path components.
The ENOTDIR mapping was introduced in r235266 for kern/128933 based on
an interpretation of the somewhat ambiguous language in the POSIX realpath
specification. The interpretation is inconsistent with Solaris and Linux,
a regression from 9.0, and does not appear to be permitted by the
description of ENOTDIR:
20 ENOTDIR Not a directory. A component of the specified pathname
existed, but it was not a directory, when a directory was
expected.
MFC r239818:
- Don't take an account of locked memory for current process in vslock(9).
There are two consumers of vslock(9): sysctl code and drm driver. These
consumers are using locked memory as transient memory, it doesn't belong
to a process's memory.
MFC r239895:
- Remove accounting of locked memory from vsunlock(9) that I missed in r239818.
Do not increment the parent firmware's reference count when any other
firmware image in the module is registered. Instead, do it when the
other image is itself referenced.
This allows a module with multiple firmware images to be automatically
unloaded when none of the firmware images are in use.
- Pacific/Fiji will go into DST from 21 October 2012 till 20 January 2013.
- Fix offset for Pacific/Tokelau.
- Gaza and West Bank had DST from 29 March to 28 September 2012.
- Syria has DST from April till October
- Morocco had DST from April to September 2012 except for 20 July to 20 August.
- Cuba changed to DST from 1 April 2012 only.
- Haiti has DST between 8 March and 1 November in 2012.
dim [Wed, 12 Sep 2012 18:15:17 +0000 (18:15 +0000)]
MFC r239872:
Teach libdwarf about the DW_FORM_flag_present dwarf attribute, so
programs using libdwarf (such as ctfconvert) don't error out on files
containing the attribute.
dim [Wed, 12 Sep 2012 17:50:56 +0000 (17:50 +0000)]
MFC r239870:
Teach gdb about the DW_FORM_flag_present dwarf attribute, so it doesn't
error out on files that contain it. (This attribute can be emitted by
newer versions of clang.)
MFC r240286:
At least from A70M FCH chipsets AMD started to use their real vendor ID
(1022) in HPET. But according to report they still haven't fixed problem
with level-triggered interrupts.
Make workaround used for earlier chipsets apply to this new ID also.
Make sure that arraysz is initialized to a value larger than zero.
arraysz could get initialized to zero on ZFS because ZFS reports
directory sizes differently compared to UFS.
Add TRIM support, enabled by default.
Fix a bug installing components from a localPath.
Allow autosizing of any partition, not just the last partition.
Adjust how ZFS is laid out to work with Boot Environments.
Merge r238990 (manually resolving absence of r237263):
Fix races between in_lltable_prefix_free(), lla_lookup(),
llentry_free() and arptimer():
o Use callout_init_rw() for lle timeout, this allows us safely
disestablish them.
- This allows us to simplify the arptimer() and make it
race safe.
o Consistently use ifp->if_afdata_lock to lock access to
linked lists in the lle hashes.
o Introduce new lle flag LLE_LINKED, which marks an entry that
is attached to the hash.
- Use LLE_LINKED to avoid double unlinking via consequent
calls to llentry_free().
- Mark lle with LLE_DELETED via |= operation istead of =,
so that other flags won't be lost.
o Make LLE_ADDREF(), LLE_REMREF() and LLE_FREE_LOCKED() more
consistent and provide more informative KASSERTs.
The patch is a collaborative work of all submitters and myself.
PR: kern/165863
Submitted by: zont, rstone
Submitted by: Eric van Gyzen <eric_van_gyzen dell.com>
Merge r238989:
The llentry_update() is used only by flowtable and the latter
always passes NULL pointer to it. Thus, code can be simplified
and function renamed to llentry_alloc() to match rtalloc().
Merge r232054 by kmacy:
When using flowtable llentrys can outlive the interface with
which they're associated at which the lle_tbl pointer points
to freed memory and the llt_free pointer is no longer valid.
Move the free pointer in to the llentry itself and update the
initalization sites.
MFC r238471:
Implement DT_RUNPATH and -z nodefaultlib.
MFC note: The ld_library_path_rpath default value was flipped to true,
effectively reverting rtld back to the pre-patch behaviour, unless
LD_LIBRARY_PATH_RPATH environment variable is set and its value is 0/N/n.
Merge r238516 from head:
If ip_output() returns EMSGSIZE to tcp_output(), then the latter calls
tcp_mtudisc(), which in its turn may call tcp_output(). Under certain
conditions (must admit they are very special) an infinite recursion can
happen.
To avoid recursion we can pass struct route to ip_output() and obtain
correct mtu. This allows us not to use tcp_mtudisc() but call tcp_mss_update()
directly.
r238002 by tuexen@:
Remove dead code (on FreeBSD) as suggested by glebius@.
r238016:
Remove route caching from IP multicast routing code. There is no
reason to do that, and also, cached route never got unreferenced,
which meant a reference leak.
Reviewed by: bms
r238092:
When ip_output()/ip6_output() is supplied a struct route *ro argument,
it skips FLOWTABLE lookup. However, the non-NULL ro has dual meaning
here: it may be supplied to provide route, and it may be supplied to
store and return to caller the route that ip_output()/ip6_output()
finds. In the latter case skipping FLOWTABLE lookup is pessimisation.
The difference between struct route filled by FLOWTABLE and filled
by rtalloc() family is that the former doesn't hold a reference on
its rtentry. Reference is hold by flow entry, and it is about to
be released in future. Thus, route filled by FLOWTABLE shouldn't
be passed to RTFREE() macro.
- Introduce new flag for struct route/route_in6, that marks route
not holding a reference on rtentry.
- Introduce new macro RO_RTFREE() that cleans up a struct route
depending on its kind.
- All callers to ip_output()/ip6_output() that do supply non-NULL
but empty route should use RO_RTFREE() to free results of
lookup.
- ip_output()/ip6_output() now do FLOWTABLE lookup always when
ro->ro_rt == NULL.
change ALWAYS_ASSUME_YES to ASSUME_ALWAYS_YES for consistency with pkg(8)
if not on a tty prompt about the missing pkg(8) but default on 'no' except if
ASSUME_ALWAYS_YES is set
Make use of GEOM Gate direct reads feature. This allows HAST to serve
reads with native speed of the underlying provider.
There are three situations when direct reads are not used:
1. Data is being synchronized and synchronization source is the secondary
node, which means secondary node has more recent data and we should read
from it.
2. Local read failed and we have to try to read from the secondary node.
3. Local component is unavailable and all I/O requests are served from the
secondary node.
Extend GEOM Gate class to handle read I/O requests directly within the kernel.
This will allow HAST to read directly from the local component without
even communicating userland daemon.
Sponsored by: Panzura, http://www.panzura.com
r238868:
Reorder things in g_gate_create() so at the moment when g_new_geomf()
is called name is properly initialized.
Discussed with: pjd
r239131:
In g_gate_dumpconf() always check the result of g_gate_hold().
This fixes "Negative sc_ref" panic possible when sysctl_kern_geom_confxml()
is run simultaneously with destroying GATE device.
MFC r239769:
- Don't allow watchdogd(8) to be swapped out.
On machines with huge amount of swap and high IO activity,
watchdogd(8) may wait for a swap memory longer than timeout and
sometimes fires.
MFC r239896:
- It's also need to lock current memory.
dim [Sat, 8 Sep 2012 11:34:22 +0000 (11:34 +0000)]
MFC r239680:
Add libcxxrt's objects (prefixing them with cxxrt_ to avoid collisions)
to libc++.a and libc++_p.a, to make static linking of C++ executables
with libc++ easier. This is similar to the approach used in libstdc++.
MFC r239686:
When using -stdlib=libc++, add the correct dependency to .depend in
bsd.prog.mk.
For building libstdc++ and libsupc++, filter out any -stdlib=libc++
option from CXXFLAGS, otherwise these libraries will not build.
Similarly, filter out any -std=xxx options that aren't supported.
MFC r230454:
Use provided name when allocating ksid domain. It isn't really used on FreeBSD,
but should fix a panic when pool is imported from another OS that is using this.
No objections from; pjd
Approved by: cperciva (implicit)
dim [Fri, 7 Sep 2012 18:03:29 +0000 (18:03 +0000)]
MFC r239962:
Fix a twelve year old bug in readelf: when process_dynamic_segment()
encounters a DT_RUNPATH entry, the global dynamic_info[] array is
overrun, causing some other global variable to be overwritten.
In my testcase, this was the section_headers variable, leading to
segfaults or jemalloc assertions when it was freed later on.
Thanks to Koop Mast for providing samples of a few "bad" .so files.
dim [Fri, 7 Sep 2012 17:58:36 +0000 (17:58 +0000)]
MFC r239959:
Work around several warnings from clang in the xfs filesystem, when
linking it statically into the kernel. With our gcc in base there are
no warnings, so also remove the WERROR= from the module makefile.
Noted by: Eir Nym <eirnym@gmail.com>
MFC r240011:
Partially revert r239959, after actually fixing most of the clang
warnings in sys/gnu/fs/xfs. The only warnings that still need to be
suppressed are those about array bound overruns of flexible array
members in xfs_dir2_{block,sf}.c, which are too expensive (in terms of
cascading code changes) to fix.
dim [Fri, 7 Sep 2012 17:51:12 +0000 (17:51 +0000)]
MFC r239869:
Remove the argument-less .align directive in sys/i386/bios/smapi_bios.S.
Specifying no argument is undocumented in the gas manual, and clang's
integrated assembler refuses to parse it. Also, removing it causes no
change at all in the resulting object file.
MFC many cxgb and cxgbe features and fixes (r239258, r239259, r239264,
r239266, r239336, r239338, r239339, r239341, r239344, r239514, r239527,
r239528, r239544.
r239258:
Convert some fixed parameters to tunables (with reasonable default
values).
- cong_drop specifies what to do on congestion: nothing, backpressure,
or drop.
- fl_pktshift specifies the padding before Ethernet payload.
- fl_pad specifies the boundary upto which to pad Ethernet payload.
- spg_len controls the length of the status page.
r239259:
if_iqdrops should include frames truncated within the chip.
r239264:
Assume INET, INET6, and TCP_OFFLOAD when the driver is built out of tree and
KERNBUILDDIR is not set.
r239266:
The size of the buffers in an Ethernet freelist has to be higher than the
interface's MTU. Initialize such freelists with correct values.
This wasn't a problem for common MTUs (1500 and 9000) as the buffers (2048
and 9216 in size) happened to have enough spare room. I ran into it when
playing around with unusual MTUs.
r239336:
Allow for a different handler for each type of firmware message.
r239338:
Add a routine (t4_set_tcb_field) to update arbitrary parts of a hardware
TCB. Filters are programmed by modifying the TCB too (via a different
routine) and the reply to any TCB update is delivered via a
CPL_SET_TCB_RPL. Figure out whether the reply is for a filter-write or
something else and route it appropriately.
r239339:
Make room for DDP page pods in the default configuration profile. While
here, bump up the L2 table's size to 4K entries.
r239341:
Initialize various DDP parameters in the main cxgbe(4) driver:
- Setup multiple DDP page sizes. When the driver attempts DDP it will
try to combine physically contiguous pages into regions of these sizes.
- Set the indicate size such that the payload carried in the indicate can
be copied in the header mbuf (and the 16K rx buffer can be recycled).
- Set DDP threshold to the max payload that the chip will coalesce and
deliver to the driver (this is ~16K by default, which is also why the
offload rx queue is backed by 16K buffers). If the chip is able to
coalesce up to the max it's allowed to, it's a good sign that the peer
is transmitting in bulk without any TCP PSH.
r239344:
Support for TCP DDP (Direct Data Placement) in the T4 TOE module.
Basically, this is automatic rx zero copy when feasible. TCP payload is
DMA'd directly into the userspace buffer described by the uio submitted
in soreceive by an application.
- Works with sockets that are being handled by the TCP offload engine
of a T4 chip (you need t4_tom.ko module loaded after cxgbe, and an
"ifconfig +toe" on the cxgbe interface).
- Does not require any modification to the application.
- Not enabled by default. Use hw.t4nex.<X>.toe.ddp="1" to enable it.
r239514:
Minor cleanup: use bitwise ops instead of pointless wrappers around
setbit/clrbit.
r239527:
Cannot hold a mutex around vm_fault_quick_hold_pages, so don't. Tweak
some comments while here.
r239528:
Avoid a NULL pointer dereference.
r239544:
Deal with the case where a syncache entry added by the TOE driver is
evicted from the syncache but a later syncache_expand succeeds because
of syncookies. The TOE driver has to resort to more direct means to
install its hooks in the socket in this case.
thomas [Thu, 6 Sep 2012 07:45:45 +0000 (07:45 +0000)]
MFC: merge rev. 239012 from head to stable/9
New command "gmultipath prefer" to force selection of a specified
provider in an Active/Passive configuration.