jhb [Thu, 17 Feb 2011 17:03:56 +0000 (17:03 +0000)]
Save a copy of errno before invoking syslog() if accept() or select() fail.
syslog() can trash the errno value causing nfsd to exit for non-fatal
errors like ECONNABORTED from accept().
jpaetzel [Thu, 17 Feb 2011 16:33:41 +0000 (16:33 +0000)]
Add "Extract Only" functionality to pc-sysinstall. This allows disk setup to
be done manually, pc-sysinstall is pointed to a mount-point for installation.
osa [Thu, 17 Feb 2011 12:21:14 +0000 (12:21 +0000)]
Fix the beginning day of the Great Lent, it starts on Monday for 7 weeks before Paskha.
Fix the Exaltation of the Holy Cross day.
Add more Twelve holidays (dvunadesyatye prazdniki).
adrian [Thu, 17 Feb 2011 05:56:03 +0000 (05:56 +0000)]
Add in ANI parameters for the AR9280. These aren't enabled by default
as they're likely not entirely correct, but they give people something
to toy with to compare behaviour/performance.
Disable the anti-noise part, as this apparently interferes with
RIFS. I haven't verified this.
VNET socket push back:
try to minimize the number of places where we have to switch vnets
and narrow down the time we stay switched. Add assertions to the
socket code to catch possibly unset vnets as seen in r204147.
While this reduces the number of vnet recursion in some places like
NFS, POSIX local sockets and some netgraph, .. recursions are
impossible to fix.
The current expectations are documented at the beginning of
uipc_socket.c along with the other information there.
Sponsored by: The FreeBSD Foundation
Sponsored by: CK Software GmbH
Reviewed by: jhb
Tested by: zec
dim [Wed, 16 Feb 2011 20:46:57 +0000 (20:46 +0000)]
Fix the last binary in the base system that still has an executable
stack, /usr/sbin/uathload.
Since this program links in a .o file containing a firmware blob, and
there is no clean way to add a .note.GNU-stack section to this .o file,
we simply use the -z noexecstack option to ld here.
adrian [Wed, 16 Feb 2011 20:07:44 +0000 (20:07 +0000)]
Modify the spi flash driver to allow smaller read IO sizes, but enforce
the larger, aligned write+erase sizes the driver currently implements.
This preserves write behaviour but makes the flash driver usable for things
like a read-only FFS or a geom_uzip/geom_compress .
Note that since GEOM will now return the sector size as being smaller,
writes of sector size/alignment will now fail with an EIO. Code which
writes to the flash device will have to be (for now) manually taught
about the flash write blocksize.
imp [Wed, 16 Feb 2011 18:05:10 +0000 (18:05 +0000)]
Remove reading of symbols from a.out loaded files. Since we are tight
on space for clang and a.out support is only needed for /boot/loader,
they are excess bytes that serve no useful purpose other than to
support really old kernels (FreeBSD < 3.2 or so). Prefer clang
support over support for these old kernels and remove this code. We
gain about 100 bytes of space this way.
dchagin [Wed, 16 Feb 2011 17:50:21 +0000 (17:50 +0000)]
To avoid excessive code duplication create wrapper for fill regs
from stack frame. Change the trap() code to use newly created function
instead of explicit regs assignment.
dim [Tue, 15 Feb 2011 22:03:09 +0000 (22:03 +0000)]
Fix some leftover binaries and shared libraries in the system that still
have an executable stack, due to linking in hand-assembled .S or .s
files, that have no .GNU-stack sections:
dchagin [Tue, 15 Feb 2011 21:42:48 +0000 (21:42 +0000)]
Make a linux_rt_sigtimedwait() system call is actually working.
1) Translate the native signal number in the appropriate Linux signal.
2) Remove bogus code, which can lead to a panic as it calls
kern_sigtimedwait with same ksiginfo.
3) Return the corresponding signal number.
dim [Tue, 15 Feb 2011 20:18:52 +0000 (20:18 +0000)]
Apply a few small optimizations to boot2's code, to make it shrink a
little further. This gets us further on the way to be able to build it
successfully with clang. Using in-tree gcc, this shrinks boot2.bin with
60 bytes, the in-tree clang shaves off 72 bytes, and ToT clang 84 bytes.
yongari [Tue, 15 Feb 2011 18:16:04 +0000 (18:16 +0000)]
Fix a regression introduced in r215906. The change made in r215906
caused link re-negotiation whenever application joins or leaves a
multicast group. If driver is running, it would have established a
link so there is no need to start re-negotiation. The re-negotiation
broke established link which in turn stopped multicast application
working while re-negotiation is in progress.
kib [Tue, 15 Feb 2011 09:03:58 +0000 (09:03 +0000)]
Since r218070 reenabled the call to vm_map_simplify_entry() from
vm_map_insert(), the kmem_back() assumption about newly inserted
entry might be broken due to interference of two factors. In the low
memory condition, when vm_page_alloc() returns NULL, supplied map is
unlocked. If another thread performs kmem_malloc() meantime, and its
map entry is placed right next to our thread map entry in the map,
both entries wire count is still 0 and entries are coalesced due to
vm_map_simplify_entry().
Mark new entry with MAP_ENTRY_IN_TRANSITION to prevent coalesce.
Fix some style issues, tighten the assertions to account for
MAP_ENTRY_IN_TRANSITION state.
marius [Mon, 14 Feb 2011 21:50:51 +0000 (21:50 +0000)]
- Use the correct DMA tag/map pair for synchronize the FC scratch area.
- Allocate coherent DMA memory for the request/response queue area and
and the FC scratch area.
These changes allow isp(4) to work properly on sparc64 with usage of the
IOMMU streaming buffers enabled.
adrian [Mon, 14 Feb 2011 21:24:54 +0000 (21:24 +0000)]
Some statistics additions - prepare for error codes > 32 (since the AR5416
error mask is > 5 bits) and add some extra CRC/HT40/ShortGI counters to
help debug 802.11n issues.
hselasky [Mon, 14 Feb 2011 08:14:06 +0000 (08:14 +0000)]
* Fix page fault caused by referring freed node.
While updating Tx stats, already freed node could be referred and cause
page fault. To avoid such panic, spool Tx stats in driver's softc. Then,
on every ratectl interval, grab node though ieee80211_iterate_nodes() and
update ratectl stats.
luigi [Mon, 14 Feb 2011 08:09:02 +0000 (08:09 +0000)]
Correct a subtle bug in the 'gsched_rr' disk scheduler.
The algorithm is supposed to work as follows:
in order to prevent starvation, when a new client starts being served we
record the start time and reset the counter of bytes served.
We then switch to a new client after a certain amount of time or bytes,
even if the current one still has pending requests.
To avoid charging a new client the time of the first seek,
we start counting time when the first request is served.
Unfortunately a bug in the previous version of the code failed
to set the start time in certain cases, resulting in some processes
exceeding their timeslice.
The fix (in this patch) is trivial, though it took a while to find
out and replicate the bug.
Thanks to Tommaso Caprai for investigating and fixing the problem.
marcel [Sun, 13 Feb 2011 19:46:55 +0000 (19:46 +0000)]
Use the preload_fetch_addr() and preload_fetch_size() convenience
functions to obtain the address and size of the preloaded pool
configuration file/repository.
rrs [Sun, 13 Feb 2011 14:48:11 +0000 (14:48 +0000)]
Fix a bug reported by Jonathan Leighton in his web-sctp testing
at the Univ-of-Del. Basically when a 1-to-1 socket did a
socket/bind/send(data)/close. If the timing was right
we would dereference a socket that is NULL.
alc [Sun, 13 Feb 2011 14:46:39 +0000 (14:46 +0000)]
Eliminate tn_reg.tn_aobj_pages. Instead, correctly maintain the vm
object's size field. Previously, that field was always zero, even
when the object tn_reg.tn_aobj contained numerous pages.
deischen [Sun, 13 Feb 2011 04:44:06 +0000 (04:44 +0000)]
Oops, revert an accidental local change that got added in
my last commit (r218627). No damage was done in the last
commit, just some duplicated code was added (which is now
removed).
simon [Sat, 12 Feb 2011 21:30:46 +0000 (21:30 +0000)]
Fix Incorrectly formatted ClientHello SSL/TLS handshake messages could
cause OpenSSL to parse past the end of the message.
Note: Applications are only affected if they act as a server and call
SSL_CTX_set_tlsext_status_cb on the server's SSL_CTX. This includes
Apache httpd >= 2.3.3, if configured with "SSLUseStapling On".
brucec [Sat, 12 Feb 2011 20:42:53 +0000 (20:42 +0000)]
If the pf.conf(5) example file is copied when setting up a firewall it's
easy to forget about icmp. Update the file to show allowing icmp through
the firewall.
kib [Sat, 12 Feb 2011 13:17:14 +0000 (13:17 +0000)]
In checker, read journal by sectors.
Due to UFS insistence to pretend that device sector size is 512 bytes,
sector size is obtained from ioctl(DIOCGSECTORSIZE) for real devices,
and from the label otherwise. The file images without label have to
be made with 512 sector size.
In collaboration with: pho
Reviewed by: jeff
Tested by: bz, pho
kib [Sat, 12 Feb 2011 13:12:45 +0000 (13:12 +0000)]
When creating a directory entry for the journal, always read at least
the fragment, and write the full block. Reading less might not work
due to device sector size bigger then size of direntries in the
last directory fragment.
Reported by: bz
In collaboration with: pho
Reviewed by: jeff
Tested by: bz, pho
kib [Sat, 12 Feb 2011 12:52:12 +0000 (12:52 +0000)]
Use the native sector size of the device backing the UFS volume for SU+J
journal blocks, instead of hard coding 512 byte sector size. Journal need
to atomically write the block, that can only be guaranteed at the device
sector size, not larger. Attempt to write less then sector size results in
driver errors.
Note that this is the first structure in UFS that depends on the
sector size. Other elements are written in the units of fragments.
In collaboration with: pho
Reviewed by: jeff
Tested by: bz, pho
kib [Sat, 12 Feb 2011 12:46:00 +0000 (12:46 +0000)]
Replace ERROR() macro with inline function. In-tree gcc cannot tolerate
the construct like printf("%\s", NULL) resulting from macroexpand of
ERROR(u, NULL), making it impossible to use LIBUFS_DEBUGGING.
With inline function, compiler cannot detect the NULL argument to
known function and does not try to convert it into puts().
mav [Sat, 12 Feb 2011 07:06:40 +0000 (07:06 +0000)]
Disable NCQ for multiport Marvell 88SX61XX SATA controllers. Simultaneous
active I/O to several disks (copying large file on ZFS) causes timeout after
just a few seconds of run. Single port 88SX6111 seems like not affected.
Skip reading transferred bytes count for these controllers. It works for
88SX6111, but 88SX6145 always returns zero there. Haven't tested others,
but better to be safe.