kan [Sun, 20 Dec 2009 02:35:10 +0000 (02:35 +0000)]
MFC r198471.
Log:
Compile libgcov without stack protection. It can be linked into
both static and dynamic binaries compiled with or without stack
protection and should not depend on libssp_nonshared.a symbols.
marius [Sun, 20 Dec 2009 01:44:47 +0000 (01:44 +0000)]
MFC: r200482, r200485
o Properly support M5229 revision 0xc7 and 0xc8:
- These revisions no longer have cable detection capability.
- The UDMA support bit of register 0x4b has been dropped without an
replacement.
- According to Linux it's crucial for working ATAPI DMA support to
also set the reserved bit 1 of regsiter 0x53 with these revisions.
o Only set ATA_CHECKS_CABLE for chip versions that actually support
cable detection, i.e. neither for ALI_OLD nor for ALI_NEW revisions
>= 0xc7.
marius [Sun, 20 Dec 2009 01:38:01 +0000 (01:38 +0000)]
MFC: r200481
Specify the capability and media bits of the capabilities page in
native, i.e. big-endian, format and convert as appropriate like we
also do with the multibyte fields of the other pages. This fixes
the output of acd_describe() to match reality on big-endian machines
without breaking it on little-endian ones. While at it, also convert
the remaining multibyte fields of the pages read although they are
currently unused for consistency and in order to prevent possible
similar bugs in the future.
attilio [Sat, 19 Dec 2009 19:30:27 +0000 (19:30 +0000)]
MFC r199805:
Change gcore in order to get rid of the procfs support and use FreeBSD's
specific interfaces. Main changes:
- now gcore recognizes threads within the the process and handle dumps on
a thread scope
- the process to be analyzed should be stopped while gcore runs
- gcore may not work with processes that are being debugged with gdb or
truss
- ptrace may let interruptible calls to return EINTR, thus dirtying
signals handling within the process
kib [Sat, 19 Dec 2009 11:31:28 +0000 (11:31 +0000)]
MFC r198507:
Use kern_sigprocmask() instead of direct manipulation of td_sigmask to
reschedule newly blocked signals.
MFC r198590:
Trapsignal() calls kern_sigprocmask() when delivering catched signal
with proc lock held.
MFC r198670:
For trapsignal() and postsig(), kern_sigprocmask() is called with
both process lock and curproc->p_sigacts->ps_mtx locked. Prevent lock
recursion on ps_mtx in reschedule_signals().
kib [Sat, 19 Dec 2009 11:13:59 +0000 (11:13 +0000)]
MFC r198506:
In kern_sigsuspend(), manipulate thread signal mask using
kern_sigprocmask(). Also, do cursig/postsig loop immediately after
waiting for signal, repeating the wait if wakeup was spurious due to
race with other thread fetching signal from the process queue before us.
MFC r199136:
Use cpu_set_syscall_retval(9) to set syscall result, and return
EJUSTRETURN from kern_sigsuspend() to prevent syscall return code from
modifying wrong frame.
Take care of possibility that pending SIGCONT might be cancelled by
SIGSTOP, causing postsig() not to deliver any catched signal.
avg [Sat, 19 Dec 2009 11:05:42 +0000 (11:05 +0000)]
MFC r200053,200091: ichsmb: drop default attachment to generic smbus hw
Note that r200091 completely overrides r200053 and the merge of the
former is recorded for bookkeeping only.
r200091 won't be merged to 'more stable' branche(s) because of the POLA.
kib [Sat, 19 Dec 2009 10:54:29 +0000 (10:54 +0000)]
MFC r197963:
Put process-directed signals to the process queue unconditionally,
selecting the thread to deliver the signal only by the thread returning
to usermode.
Change cursig() and postsig() to look both into the thread and process
signal queues.
MFC r197976:
Fix typo.
MFC r200082:
Remove wrong assertion. Debugee is allowed to lose a signal
jhb [Fri, 18 Dec 2009 22:23:27 +0000 (22:23 +0000)]
MFC 200357:
Don't warn about an RSDP with a corrupt checksum. The kernel does a better
job about warning about these things later and this message can be
confusing.
jhb [Fri, 18 Dec 2009 21:21:14 +0000 (21:21 +0000)]
MFC 200310:
Fix a confusing typo in the EDD packet structure used in gptboot and
gptzfsboot. I got the segment and offset fields reversed in the structure,
but I also succeeded in crossing the assignments so the actual EDD packet
ended up correct.
jhb [Fri, 18 Dec 2009 21:01:56 +0000 (21:01 +0000)]
MFC 200309:
- Port bios_getmem() from libi386 to {gpt,}zfsboot() and use it to
safely allocate a heap region above 1MB. This enables {gpt,}zfsboot()
to allocate much larger buffers than before.
- Use a larger buffer (1MB instead of 128K) for temporary ZFS buffers. This
allows more reliable reading of compressed files in a raidz/raidz2 pool.
jhb [Fri, 18 Dec 2009 20:28:04 +0000 (20:28 +0000)]
MFC 200216,200219:
- Various small whitespace and style fixes.
- Improve the algorithm the loader uses to choose a memory range for its
heap when using a range above 1MB.
jhb [Fri, 18 Dec 2009 19:43:44 +0000 (19:43 +0000)]
MFC 200084:
Properly return an error reply if an NFS remove or link operation fails.
Previously the failing operation would allocate an mbuf and construct an
error reply, but because the function did not return 0, the NFS server
assumed it had failed to generate a reply and would leak the reply mbuf as
well as not sending the reply to the NFS client.
jhb [Fri, 18 Dec 2009 18:30:49 +0000 (18:30 +0000)]
MFC 200037:
ndis_scan_results() can sleep if the scan results are not ready when
ndis_scan() is called. However, ndis_scan() is invoked from softclock()
and cannot sleep. Move ndis_scan_results() to the ndis driver's scan_end
hook instead.
jhb [Thu, 17 Dec 2009 20:41:27 +0000 (20:41 +0000)]
MFC 199606, 199614:
Add an internal _once() method. This works identical to pthread_once(3)
with the additional property that it is safe for routines in libc to use
in both single-threaded and multi-threaded processes. Multi-threaded
processes use the pthread_once() implementation from the threading library
while single-threaded processes use a simplified "stub" version internal
to libc.
kib [Thu, 17 Dec 2009 19:53:16 +0000 (19:53 +0000)]
MFC r199829:
Implement rtld part of the support for -z nodlopen (see ld(1)).
MFC r199877:
Allow to load not-openable dso when tracing. This fixes ldd on such dso or
dso linked to non-openable object.
Remove '\n' at the end of error message.
End comments with dot.
marius [Wed, 16 Dec 2009 18:39:32 +0000 (18:39 +0000)]
MFC: r200459
Unbreak the ata_atapi() usage. Since r200171 (MFC'ed in r200432) the
mode setting functions get a ata_device type device passed instead of
a ata_channel one, thus ata_atapi() has to be adjusted accordingly.
mav [Wed, 16 Dec 2009 17:48:26 +0000 (17:48 +0000)]
MFC r200607:
Large I/Os on Promise controllers reported to cause UDMA ICRC errors and
subsequent timeouts. Restore previous limit for now, at least until
I will have hardware to experiment.
ume [Tue, 15 Dec 2009 15:01:52 +0000 (15:01 +0000)]
MFC r199995:
Don't try to bind to an anycast address. The KAME IPv6 stack doesn't
allow bind to an anycast address. It does away with an annoying
message.
stas [Tue, 15 Dec 2009 10:16:57 +0000 (10:16 +0000)]
MFC r198318:
- On entrance to the rx_eof sync RX rings maps with POSTWRITE flag
instead of POSTREAD: the hardware do not touch this memory (CPU
updates it). It is already synchronized as PREWRITE after the
processing is done.
stas [Tue, 15 Dec 2009 10:00:00 +0000 (10:00 +0000)]
- MFC r197832, r197834, r197837:
- Add support for new BGE chips (5761, 5784 and 57780). These chips uses new
BGE_PCI_PRODID_ASICREV register to store the chip identifier and its revision.
- Add new grouping macro for 7575+ chips (BGE_IS_5755_PLUS).
- Add IDs for Fujitsu-branded Broadcom adapters.
rwatson [Mon, 14 Dec 2009 13:13:43 +0000 (13:13 +0000)]
Merge r197841 from head to stable/8:
Add a new errno, ENOTCAPABLE, to be returned when a process requests an
operation on a file descriptor that is not authorized by the descriptor's
capability flags.
rwatson [Mon, 14 Dec 2009 12:19:21 +0000 (12:19 +0000)]
Merge r197808 from head to stable/8:
In rtld's map_object(), use pread(..., 0) rather than read() to read the
ELF header from the front of the file. As all other I/O on the binary
is done using mmap(), this avoids the need for seek privileges on the
file descriptor during run-time linking.
rwatson [Mon, 14 Dec 2009 00:19:31 +0000 (00:19 +0000)]
Merge r197636 from head to stable/8:
Reserve system call numbers for Capsicum security framework capabilities,
capability mode, and process descriptors: cap_new, cap_getrights, cap_enter,
cap_getmode, pdfork, pdkill, pdgetpid, and pdwait.
Obtained from: TrustedBSD Project
Sponsored by: Google
dougb [Sun, 13 Dec 2009 23:56:46 +0000 (23:56 +0000)]
MFC r200377:
Update to the December 12, 2008 version of this file. The one
substantive change is to add the IPv6 address of L. The other
changes are all CAPS LOCK related.
rnoland [Sun, 13 Dec 2009 15:03:54 +0000 (15:03 +0000)]
MFC r198694,r198697
Some general cleanup of scatter/gather memory allocation
- We don't need to check malloc return values with M_WAITOK
- remove variables that we don't really need
- cleanup the error paths by just calling drm_sg_cleanup()
- fix drm_sg_cleanup() to be safe to call at any time
antoine [Sat, 12 Dec 2009 12:34:20 +0000 (12:34 +0000)]
MFC r199187 to stable/8:
Remove trailing ";" in struct ieee80211_beacon_offsets declaration
Found by: phk's FlexeLint in September
Reviewed by: rpaulo@
mav [Sat, 12 Dec 2009 10:37:31 +0000 (10:37 +0000)]
MFC r200171, r200182, r200275, r200295, r200359:
Introduce ATA_CAM kernel option, turning ata(4) controller drivers into
cam(4) interface modules. When enabled, this option deprecates all ata(4)
peripheral drivers (ad, acd, ...) and interfaces and allows cam(4) drivers
(ada, cd, ...) and interfaces to be natively used instead.
As side effect of this, ata(4) mode setting code was completely rewritten
to make controller API more strict and permit above change. While doing
this, SATA revision was separated from PATA mode. It allows DMA-incapable
SATA devices to operate and makes hw.ata.(ata|atapi)_dma tunable work again.
Also allow ata(4) controller drivers (except some specific or broken ones)
to handle larger data transfers. Previous constraint of 64K was artificial
and is not really required by PCI ATA BM specification or hardware.
mav [Fri, 11 Dec 2009 12:44:44 +0000 (12:44 +0000)]
MFC r200353:
Limit maximum I/O size, depending on command set supported by device.
It is required to suppot non-LBA48 devices with MAXPHYS above 128K.
Same is done in ada(4).
fabient [Fri, 11 Dec 2009 12:36:02 +0000 (12:36 +0000)]
MFC 196739:
Add counters for the i7 architecture which were accidentally left
out of the original commit of i7 support. These are all the counters
on pages A-32 and A-33 of the _Intel(R) 64 and IA32 Architectures
Software Developer's Manual Vol 3B_, June 2009. Almost all
of these counters relate to operations on the L2 cache.
dougb [Fri, 11 Dec 2009 01:23:58 +0000 (01:23 +0000)]
MFC r199958:
Update to BIND 9.6.1-P2. The vulnerability this is designed to fix is
related to DNSSEC validation on a resolving name server that allows
access to untrusted users. If your system does not fall into all 3 of
these categories you do not need to update immediately.
mav [Thu, 10 Dec 2009 23:51:24 +0000 (23:51 +0000)]
MFC r200282, r200290:
Change gmirror default balance algorithm from "split" to improved "load".
"split" is very ineffective for devices with rotating media as HDDs.
To be effective, it needs that transfer time reduction due to block
splitting was bigger then access time increase due to non-sequential
access. For modern HDDs I was able to reproduce it only with read sizes
of 2MB and above, which is almost not applicable in real life.
"load" algorithm same time is more universal and effective now.
pjd [Thu, 10 Dec 2009 18:38:40 +0000 (18:38 +0000)]
MFC r200124,r200126,
r200124:
Avoid using additional variable for storing an error if we are not going
to do anything with it.
r200126:
Fix deadlock when ZVOLs are present and we are replacing dead component or
calling scrub when pool is in a degraded state. It will try to taste ZVOLs,
which will lead to deadlock, as ZVOL will try to acquire the same locks as
replace/scrub is holding already.
We can't simply skip provider based on their GEOM class, because ZVOL can have
providers build on top of it and we need to skip those as well.
We do it by asking for ZFS::iszvol attribute. Any ZVOL-based provider will give
us positive answer and we have to skip those providers.
This way we remove possibility to create ZFS pools on top of ZVOLs, but it is
not very useful anyway.
I believe deadlock is still possible in some very complex situations like when
we have MD provider on top of UFS file on top of ZVOL. When we try to replace
dead component in the pool mentioned ZVOL is based on, there might be a
deadlock when ZFS will try to taste MD provider. There is no easy way to detect
that, but it isn't very common.
r200125,r200158:
Fix order of looking for providers.
Before r200125 the order of looking for providers was wrong. It was:
1. Find provider by name.
2. Find provider by guid.
3. Find provider by name and guid.
Where it should have been:
1. Find provider by name and guid.
2. Find provider by guid.
3. Find provider by name.
syrinx [Thu, 10 Dec 2009 11:52:16 +0000 (11:52 +0000)]
MFC r200063
Fix a problem with high CPU consumption (up to 30%) by bsnmpd on a loaded system.
Instead of constantly calling the mibII_idle function when the server is not busy
call the function only once every 10 seconds to avoid bsnmpd constantly doing
gettimeofday syscalls. Make the idle polling interval confugurable via
begemotIfDataPoll.
thompsa [Wed, 9 Dec 2009 23:11:27 +0000 (23:11 +0000)]
MFC r199060
Improve support for High-speed USB audio devices.
- fix issues regarding the mixer, where the interface number was not set in
time.
- fix wrong use of resolution parameter.