summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Map PIE binaries at non-zero base address.kib2009-10-101-10/+14
| | | | | | | Discussed with: bz Reviewed by: kan Tested by: bz (i386, amd64), bsam (linux) MFC after: some time
* Define architectural load bases for PIE binaries. Addresses were selectedkib2009-10-108-0/+21
| | | | | | | | | | by looking at the bases used for non-relocatable executables by gnu ld(1), and adjusting it slightly. Discussed with: bz Reviewed by: kan Tested by: bz (i386, amd64), bsam (linux) MFC after: some time
* Do not map segments of zero length.kib2009-10-101-1/+4
| | | | | | | Discussed with: bz Reviewed by: kan Tested by: bz (i386, amd64), bsam (linux) MFC after: some time
* Calculate relocation base for the main object, and apply the relocationkib2009-10-101-14/+15
| | | | | | | | | | | | | | adjustment for all virtual addresses encoded into the ELF structures of it. PIE binary could and should be loaded at non-zero mapbase. For sym_zero pseudosymbol used as a return value from find_symdef() for undefined weak symbols, st_value also should be adjusted, since _rtld_bind corrects symbol values by relocbase. Discussed with: bz Reviewed by: kan Tested by: bz (i386, amd64), bsam (linux) MFC after: some time
* Postpone dropping fp till both kq_global and kqueue mutexes arekib2009-10-101-3/+3
| | | | | | | | | | unlocked. fdrop() closes file descriptor when reference count goes to zero. Close method for vnodes locks the vnode, resulting in "sleepable after non-sleepable". For pipes, pipe mutex is before kqueue lock, causing LOR. Reported and tested by: pho MFC after: 2 weeks
* Correct include order as indicated by bz.tuexen2009-10-101-2/+1
| | | | | Approved by: re (mentor) MFC after: 3 days
* Fix typo which has survived amazingly long!eri2009-10-101-1/+1
| | | | | Approved by: mlaier(mentor) MFC after: 3 days
* Do not include vnet.h twice.tuexen2009-10-091-1/+0
| | | | | Approved by: rrs (mentor) MFC after: 3 days
* atomic_cmpset_barr_* was added in order to cope with compilers willing toattilio2009-10-092-96/+92
| | | | | | | | | | | | | | | | | specify their own version of atomic_cmpset_* which could have been different than the membar version. Right now, however, FreeBSD is bound mostly to GCC-like compilers and it is desired to add new support and compat shim mostly when there is a real necessity, in order to avoid too much compatibility bloats. In this optic, bring back atomic_cmpset_{acq, rel}_* to be the same as atomic_cmpset_* and unwind the atomic_cmpset_barr_* introduction. Requested by: jhb Reviewed by: jhb Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
* Improved one-line description of this module (taken from NOTES).brueffer2009-10-091-1/+1
|
* Merge upstream r421: grammar nit in pam.conf(5).des2009-10-091-1/+1
|
* If provider is open for writing when we taste it, skip it for classes thatpjd2009-10-096-0/+25
| | | | | | | | | | | | | | | | | | | | depend on on-disk metadata. This was we won't attach to providers that are used by other classes. For example we don't want to configure partitions on da0 if it is part of gmirror, what we really want is partitions on mirror/foo. During regular work it works like this: if provider is open for writing a class receives the spoiled event from GEOM and detaches, once provider is closed the taste event is send again and class can rediscover its metadata if it is still there. This doesn't work that way when new class arrives, because GEOM gives all existing providers for it to taste, also those open for writing. Classes have to decided on their own if they want to deal with such providers (eg. geom_dev) or not (classes modified by this commit). Reported by: des, Oliver Lehmann <lehmann@ans-netz.de> Tested by: des, Oliver Lehmann <lehmann@ans-netz.de> Discussed with: phk, marcel Reviewed by: marcel MFC after: 3 days
* Export disk serial numbers for adaX disks.pjd2009-10-091-0/+2
| | | | | Reviewed by: mav MFC after: 3 days
* Use correct arguments when calling SCTP_RTALLOC().tuexen2009-10-081-2/+2
| | | | | Approved by: rrs (mentor) MFC after: 0 days
* Properly mark ZFS properties which are not changeable under FreeBSD.trasz2009-10-081-1/+6
| | | | Reviewed by: pjd
* Clean up amd64 suspend/resume code.jkim2009-10-083-33/+35
| | | | | | | | - Allocate memory for wakeup code after ACPI bus is attached. The early memory allocation hack was inherited from i386 but amd64 does not need it. - Exclude real mode IVT and BDA explicitly. Improve comments about memory allocation and reason for the exclusions. It is a no-op in reality, though. - Remove an unnecessary CLD from wakeup code and re-align.
* Allow file system owner to modify system flags if securelevel permits.pjd2009-10-083-12/+17
| | | | MFC after: 3 days
* File system owner is when uid matches and jail matches.pjd2009-10-081-3/+2
| | | | MFC after: 3 days
* 'aclmode' and 'aclinherit' properties should work as advertised; don'ttrasz2009-10-081-2/+0
| | | | refuse to set them.
* Fix so that round robing stream scheduling works as advertisedrrs2009-10-081-25/+4
| | | | MFC after: 0 days
* Discard Device Control Strings and Operating System Commands.ed2009-10-083-3/+35
| | | | | | | | | | | | | | These strings often contain things like: - Window titles. - Extended key map functionality. - Color palette switching. We could look at these features in the future (if people consider them to be important enough), but we'd better discard them now. This fixes some artifacts people reported when using TERM=xterm. Reported by: des@, Paul B. Mahol
* Add a special workaround to handle UIO_NOCOPY case. This fixes datadelphij2009-10-071-24/+80
| | | | | | | | corruption observed when sendfile() is being used. PR: kern/127213 Submitted by: gk MFC after: 2 weeks
* Fix build on amd64.delphij2009-10-071-4/+5
| | | | | PR: misc/139409 Submitted by: gk
* Clarify quoting of word in ${v=word} in sh(1).jilles2009-10-071-0/+3
|
* Add the comment "(FreeBSD only)" to the altmonth_x keywordsedwin2009-10-071-12/+12
| | | | MFC after: 1 week
* On FreeBSD it is enough to report provider removal when orphan event ispjd2009-10-071-20/+0
| | | | | | | received, we don't have to do it on every ENXIO error in I/O path. Solaris has no GEOM so they have to handle it in a less clean way. MFC after: 3 days
* Fix white-spaces.pjd2009-10-071-6/+6
| | | | MFC after: 3 days
* Add a new errno, ENOTCAPABLE, to be returned when a process requests anrwatson2009-10-073-1/+9
| | | | | | | | operation on a file descriptor that is not authorized by the descriptor's capability flags. MFC after: 1 month Sponsored by: Google
* Handle GRANTED_RES messages more gracefully: Send along a grant cookiezml2009-10-073-18/+152
| | | | | | | | | to reference the lock, look up the grant cookie when the GRANTED_RES comes back. Properly handle the case of an error on the grant. Add a short expiration window so that granted locks are not freed immediately. Approved by: dfr (mentor) MFC after: 2 weeks
* On command timeout handle frozen command first, to not run it insidemav2009-10-072-6/+8
| | | | | | XXX_end_transaction(). Submitted by: avg
* - Give a name to the host coalescing bug fix WDMA mode register bit insteadstas2009-10-072-1/+2
| | | | | of using hardcoded value in the code. Obtained from: OpenBSD
* - Document that 'Dell PowerEdge R710' has bce(4) supported NIC.simon2009-10-071-1/+3
| | | | | | - Bump document date. MFC after: 3 days
* - Document new revisions of chips supported.stas2009-10-071-4/+4
|
* When run() returns an error, print the error message also injh2009-10-071-2/+6
| | | | | | | | | non-interactive mode. Previously error messages were printed only in interactive mode. PR: bin/124517 Approved by: trasz (mentor) MFC after: 1 month
* - Add support for new BGE chips (5761, 5784 and 57780). These chips uses newstas2009-10-072-74/+173
| | | | | | | | | | | 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. PR: kern/127587 Tested by: Thomas Quinot <thomas@quinot.org> (BCM7561 A0) MFC after: 2 weeks Obtained from: OpenBSD
* Fix situation where Mac OS X NFS client creates a file and when it triespjd2009-10-071-1/+17
| | | | | | | | | to set ownership and mode in the same setattr operation, the mode was overwritten by secpolicy_vnode_setattr(). PR: kern/118320 Submitted by: Mark Thompson <info-gentoo@mark.thompson.bz> MFC after: 3 days
* Add parsing code for TCP UTO (User Timeout Option).rpaulo2009-10-072-0/+14
| | | | | Submitted by: fangwang@ Obtained from: //depot/projects/soc2009/tcputo/
* - All the functions in atomic.h needs to be in "physical" form (likeattilio2009-10-062-91/+79
| | | | | | | | | | | | not defined through macros or similar) in order to be later compiled in the kernel and offer this way the support for modules (and compatibility among the UP case and SMP case). Fix this for the newly introduced atomic_cmpset_barr_* cases by defining and specifying a template. Note that the new DEFINE_CMPSET_GEN() template save more typing on amd64 than the current code. [1] - Fix the style for memory barriers on amd64. [1] Reported by: Paul B. Mahol <onemda at gmail dot com>
* sh: Send the "xyz: not found" message to redirected fd 2.jilles2009-10-063-7/+32
| | | | | | | | | | This also fixes that trying to execute a non-regular file with a command name without '/' returns 127 instead of 126. The fix is rather simplistic: treat CMDUNKNOWN as if the command were found as an external program. The resulting fork is a bit wasteful but executing unknown commands should not be very frequent. PR: bin/137659
* Prevent paging pressure from draining arc too muchkmacy2009-10-061-3/+6
| | | | | | - always drain arc if above arc_c_max - never drain arc if arc is below arc_c_max MFC after: 3 days
* Remove tcp_input lock statistics; these are intended for debugging onlyrwatson2009-10-061-32/+2
| | | | | | | and are not intended to ship in 8.0 as they dirty additional cache lines in a performance-critical per-packet path. MFC after: 3 days
* Fix tcsh losing history when tcsh terminates because the pty beneath itrdivacky2009-10-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is closed. Diagnosed by Ted Anderson: New signal queuing logic was introduced in 6.15 and allows the signal handlers to be run explicitly by calling handle_pending_signals, instead of immediately when the signal is delivered. This function is called at various places, typically when receiving a EINTR from a slow system call such as read or write. In the pty exit case, it was called from xwrite, called from flush, while printing the "exit" message after receiving EOF when reading from the pty (note that the read did not return EINTR but zero bytes, indicating EOF). The SIGHUP handler, phup(), called rechist, which opened the history file and began writing the merged history to it. This process invoked flush recursively to actually write the data. In this case, however, the flush noticed it was being called recursively and decided fail by calling stderror. My conclusion was that the signal was being handled at a bad time. But whether to fix flush not to care about the recursive call, or to handle the signal some other time and when to handle it, was unclear to me. However, by adding an extra call to handle_pending_signals, just after process() returns to main(), I was able to avoid the truncated history after network outages and similar failures. I verified this fix in version 6.17. Approved by: ed (mentor) MFC after: 1 week
* In rtld's map_object(), use pread(..., 0) rather than read() to read therwatson2009-10-061-1/+1
| | | | | | | | | 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. MFC after: 1 month Sponsored by: Google
* Add basename_r(3) to complement basename(3). basename_r(3) which acceptsrwatson2009-10-065-13/+34
| | | | | | | | a caller-allocated buffer of at least MAXPATHLEN, rather than using a global buffer. MFC after: 1 month Sponsored by: Google
* Per their definition, atomic instructions used in conjuction withattilio2009-10-062-92/+140
| | | | | | | | | | | | | | | | | | | | | | | | memory barriers should also ensure that the compiler doesn't reorder paths where they are used. GCC, however, does that aggressively, even in presence of volatile operands. The most reliable way GCC offers for avoid instructions reordering is clobbering "memory" even if that is theoretically an heavy-weight operation, flushing the content of all the registers and forcing reload of them (We could rely, however, on gcc DTRT by just understanding the purpose as this is a well-known pattern for many modern operating-systems). Not all our memory barriers, right now, clobber memory for GCC-like compilers. The most notable cases are IA32 and amd64 where the memory barrier are treacted the same as normal atomic instructions. Fix this by offering the possibility to implement atomic instructions with memory barriers separately from the normal version and implement the GCC-like specific one using memory clobbering. Thanks to Chris Lattner (@apple) for his discussion on llvm specifics. Reported by: jhb Reviewed by: jhb Tested by: rdivacky, Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
* Expand $FreeBSD$des2009-10-060-0/+0
|
* o Fix typo: "an in particular" -> "and in particular".maxim2009-10-061-1/+1
| | | | | | PR: docs/139370 Submitted by: Kenyon Ralph MFC after: 1 week
* "Potluck Pogo" was a collection of Walt Kelly's "Pogo" cartoonsdougb2009-10-062-2/+2
| | | | first published in 1955. "Putluck Pogo" seems to be a typo.
* In tcp_input(), we acquire a global write lock at first only if arwatson2009-10-051-1/+4
| | | | | | | | | | | | segment is likely to trigger a TCP state change (i.e., FIN/RST/SYN). If we later have to upgrade the lock, we acquire an inpcb reference and drop both global/inpcb locks before reacquiring in-order. In that gap, the connection may transition into TIMEWAIT, so we need to loop back and reevaluate the inpcb after relocking. MFC after: 3 days Reported by: Kamigishi Rei <spambox at haruhiism.net> Reviewed by: bz
* Fix build on amd64, where sysctl arg1 is a pointer.rwatson2009-10-051-1/+1
| | | | | Reported by: Mr Tinderbox MFC after: 3 months
OpenPOWER on IntegriCloud