]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoMerge sendmail 8.14.4 to HEAD
Gregory Neil Shapiro [Tue, 26 Jan 2010 04:41:15 +0000 (04:41 +0000)]
Merge sendmail 8.14.4 to HEAD

MFC after: 4 days

14 years agoImport sendmail 8.14.4
Gregory Neil Shapiro [Tue, 26 Jan 2010 04:17:18 +0000 (04:17 +0000)]
Import sendmail 8.14.4

14 years agoCreate the "cfecons" tty directly using tty_makedev(). It is not clear what
Neel Natu [Tue, 26 Jan 2010 03:42:34 +0000 (03:42 +0000)]
Create the "cfecons" tty directly using tty_makedev(). It is not clear what
the intention of having two ttys pointing to the same cfe console device was.

Also we were not initializing the output[] array passed in as input to
tty_makedev() so one name of the ttys was garbage.

Fix the code that calls cfe_write() to deal with the case where only a partial
buffer is written out.

cfe_cngetc() needs to return if there is no character available as input.
If we don't do this then the cfe_timeout() function will spin forever
because cfe_cngetc() will only ever return if there is valid input.

Approved by: imp (mentor)

14 years agoInstall the XTLB exception handler for Sibyte processors.
Neel Natu [Tue, 26 Jan 2010 03:39:10 +0000 (03:39 +0000)]
Install the XTLB exception handler for Sibyte processors.

This is a workaround for the fact that the CFE is compiled as a 64-bit
application and therefore sets the SR_KX bit every time we call into
it (for e.g. console).

A TLB miss for any address above 0xc0000000 with the SR_KX bit set will
end up at the XTLB exception vector. We workaround this by copying the
standard TLB handler at the XTLB exception vector.

Approved by: imp (mentor)

14 years agoAdd a DDB command "show trapframe" to dump out contents of the trapframe
Neel Natu [Tue, 26 Jan 2010 03:29:52 +0000 (03:29 +0000)]
Add a DDB command "show trapframe" to dump out contents of the trapframe
specified by the first argument.

Approved by: imp (mentor)

14 years agoPrint the address of the base of the stackframe in DDB backtrace output.
Neel Natu [Tue, 26 Jan 2010 03:24:11 +0000 (03:24 +0000)]
Print the address of the base of the stackframe in DDB backtrace output.

Approved by: imp (mentor)

14 years agoDoh. Remove extra pcpu initialization that I thought was needed, but
Warner Losh [Tue, 26 Jan 2010 02:39:14 +0000 (02:39 +0000)]
Doh.  Remove extra pcpu initialization that I thought was needed, but
isn't needed since we moved all that into mips_pcpu0_init.

14 years agoFix a problem seen when a new process was returning to userland
Neel Natu [Tue, 26 Jan 2010 02:26:04 +0000 (02:26 +0000)]
Fix a problem seen when a new process was returning to userland
through fork_trampoline.

This was caused because we were clearing the SR_INT_IE and setting
SR_EXL bits of the status register at the same time. This meant
that if an interrupt happened while this MTC0 was making its way
through the pipeline the exception processing would see the
status register with SR_EXL bit set. This in turn would mean that
the COP_0_EXC_PC would not be updated so the return from exception
would be to an incorrect address.

It is easy to verify this fix by a program that forks in a loop
and the child just exits:

while (1) {
pid_t pid = vfork();
if (pid == 0)
       _exit(0);
if (pid != -1)
       waitpid(pid, NULL, 0);
}

Also remove two instances where we set SR_EXL bit gratuitously in exception.S.

Approved by: imp (mentor)

14 years ago- style(9)
Gabor Kovesdan [Mon, 25 Jan 2010 23:44:00 +0000 (23:44 +0000)]
- style(9)

Approved by: delphij

14 years agoCache failing and opened catalogs in catopen() and related functions.
Gabor Kovesdan [Mon, 25 Jan 2010 23:37:49 +0000 (23:37 +0000)]
Cache failing and opened catalogs in catopen() and related functions.
Continuous catopen() calls cause 4 failig stat(2) each, which means a lot
of overhead.  It is also a good idea to keep the opened catalogs in the memory
to speed up further catopen() calls to the same catalog since these catalogs
are not big at all.  In this case, we count references and only free() the
allocated space when the reference count reaches 0.  The reads and writes to
the cache are syncronized with an rwlock when these functions are called from
a threaded program.

Requested by: kib
Approved by: delphij

14 years agoRemove vestigial NetBSD compatibility shim.
Ed Maste [Mon, 25 Jan 2010 20:59:04 +0000 (20:59 +0000)]
Remove vestigial NetBSD compatibility shim.

14 years agoGo through with write_metadata() non-error-handling and make it return "void".
Ivan Voras [Mon, 25 Jan 2010 20:51:40 +0000 (20:51 +0000)]
Go through with write_metadata() non-error-handling and make it return "void".
This is mostly to avoid dead variable assignment warning by LLVM.
No functional change.

Pointed out by: trasz
Approved by: gnn (mentor)

14 years agoo add more notification strings in iwn_intr_str()
Rui Paulo [Mon, 25 Jan 2010 19:36:48 +0000 (19:36 +0000)]
o add more notification strings in iwn_intr_str()
o sync with OpenBSD code

Submitted by: Bernhard Schmidt <bschmidt at techwires.net>
MFC after: 3 days

14 years agoExport knowledge of the special bus space we use for the console to
Warner Losh [Mon, 25 Jan 2010 19:27:20 +0000 (19:27 +0000)]
Export knowledge of the special bus space we use for the console to
obio.  Take advantage of the fact that obio only really supports uart
at the moment to use the uart bus tag always for IOPORT allocations.

# this needs to be redone to conform to FreeBSD standards and allow for
# additional drivers for SoC hardware to attach

14 years agoTurn on debugging on the fpa unit. Fix some printfs that were only
Warner Losh [Mon, 25 Jan 2010 19:25:21 +0000 (19:25 +0000)]
Turn on debugging on the fpa unit.  Fix some printfs that were only
enabled for debugging.  This should be turned off before we release,
but we need it for the moment.

14 years agoStore the mutex in the correct location. Before, we were storing it
Warner Losh [Mon, 25 Jan 2010 19:01:38 +0000 (19:01 +0000)]
Store the mutex in the correct location.  Before, we were storing it
in the pcb at the td_lock offset, rather than in the struct thread at
the td_lock offset.  And we were storing a pointer to the old thread
rather than to the mutex.  Why this didn't always kill us, I'll never
know.

Fix an obsolete comment and update the prototype in the comments.
Also note what variables are in what registers since this function is
a little complex...

neel@ found this problem and proposed this fix.  This cures a number
of different problem reports out there, and gets us booting octeon to
the login prompt...

Submitted by: neel@
Reviewed by: rrs@, gonzo@

14 years agoConnect smbfs related libraries and tool on sparc64.
Pyun YongHyeon [Mon, 25 Jan 2010 18:52:47 +0000 (18:52 +0000)]
Connect smbfs related libraries and tool on sparc64.

Reviewed by: marius

14 years agoBuild smbfs kernel module on sparc64.
Pyun YongHyeon [Mon, 25 Jan 2010 18:50:58 +0000 (18:50 +0000)]
Build smbfs kernel module on sparc64.

14 years agoshi1_remark is in little endian format, convert it to host ordering.
Pyun YongHyeon [Mon, 25 Jan 2010 18:35:58 +0000 (18:35 +0000)]
shi1_remark is in little endian format, convert it to host ordering.
Also remove upper 16bits which always seem to be 0xFFFF. We don't
allocate more than 64KB buffer anyway.
This change make smbutil work on sparc64.

Reviewed by: marius, bp
Approved by: bp

14 years agoRemove unneeded variables.
Edward Tomasz Napierala [Mon, 25 Jan 2010 17:00:21 +0000 (17:00 +0000)]
Remove unneeded variables.

Found with: clang

14 years agoRemove pointless assignment.
Edward Tomasz Napierala [Mon, 25 Jan 2010 16:58:58 +0000 (16:58 +0000)]
Remove pointless assignment.

Found with: clang

14 years agoFix device name for root....
Warner Losh [Mon, 25 Jan 2010 16:55:31 +0000 (16:55 +0000)]
Fix device name for root....
Indent rgmii correctly.
Remove stale comments.

14 years agoRemove some pointless variable assignments.
Edward Tomasz Napierala [Mon, 25 Jan 2010 16:55:30 +0000 (16:55 +0000)]
Remove some pointless variable assignments.

Found with: clang

14 years agoComment out the led wheel code for the moment. Likely it shouldn't
Warner Losh [Mon, 25 Jan 2010 16:44:18 +0000 (16:44 +0000)]
Comment out the led wheel code for the moment.  Likely it shouldn't
even be here in the first place, but it is cool to see FreeBSD
scrolling on the LED pannel of the octeon board when we're running...

14 years agoRemove unused variable.
Edward Tomasz Napierala [Mon, 25 Jan 2010 16:10:22 +0000 (16:10 +0000)]
Remove unused variable.

Found with: clang

14 years agoReturn proper error code.
Edward Tomasz Napierala [Mon, 25 Jan 2010 16:09:50 +0000 (16:09 +0000)]
Return proper error code.

Found with: clang

14 years agoActualize.
Ruslan Ermilov [Mon, 25 Jan 2010 14:17:36 +0000 (14:17 +0000)]
Actualize.

14 years agoCall ieee80211_radiotap_rx, not ieee80211_radiotap_tx on sta_input()
Rui Paulo [Mon, 25 Jan 2010 12:23:51 +0000 (12:23 +0000)]
Call ieee80211_radiotap_rx, not ieee80211_radiotap_tx on sta_input()

PR: 143163
Submitted by: Alexander Egorenkov <egorenar at gmail.com>
MFC after: 3 days

14 years agoOn FreeBSD, time_t is 64-bit for all platforms except i386 and powerpc,
Xin LI [Mon, 25 Jan 2010 07:52:54 +0000 (07:52 +0000)]
On FreeBSD, time_t is 64-bit for all platforms except i386 and powerpc,
where the type is 32-bit.  ZFS can handle 64-bit timestamp internally
but zfs_setattr() would check if the time value can fit, we change the
checking macros to match 64-bit timestamp if the platform supports it.

This change has some downsides like, while you can import zfs on 32-bit
platforms, the timestamp would overflow if they are out of the range.

This fixes the Y2.038K issue on platforms using 64-bit timestamps.

Reviewed by: pjd
MFC after: 1 month

14 years agoAdd an example, derived from the basic demo phk once sent me.
Joerg Wunsch [Mon, 25 Jan 2010 06:37:44 +0000 (06:37 +0000)]
Add an example, derived from the basic demo phk once sent me.

14 years agoUpgrade to BIND 9.6.1-P3.
Doug Barton [Mon, 25 Jan 2010 06:18:31 +0000 (06:18 +0000)]
Upgrade to BIND 9.6.1-P3.

This version address the following vulnerabilities:

BIND 9 Cache Update from Additional Section
https://www.isc.org/advisories/CVE-2009-4022v6
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4022
A nameserver with DNSSEC validation enabled may incorrectly add
unauthenticated records to its cache that are received during the
resolution of a recursive client query

BIND 9 DNSSEC validation code could cause bogus NXDOMAIN responses
https://www.isc.org/advisories/CVE-2010-0097
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-0097
There was an error in the DNSSEC NSEC/NSEC3 validation code that could
cause bogus NXDOMAIN responses (that is, NXDOMAIN responses for records
proven by NSEC or NSEC3 to exist) to be cached as if they had validated
correctly

These issues only affect systems with DNSSEC validation enabled.

14 years agoCommit copyright-only changes to generated files as part of the
Doug Barton [Mon, 25 Jan 2010 04:42:54 +0000 (04:42 +0000)]
Commit copyright-only changes to generated files as part of the
9.6.1-P3 update

14 years agoVendor import of BIND 9.6.1-P3
Doug Barton [Mon, 25 Jan 2010 04:22:19 +0000 (04:22 +0000)]
Vendor import of BIND 9.6.1-P3

14 years ago- Call post-boot fixup function in order to get proper static
Oleksandr Tymoshenko [Mon, 25 Jan 2010 00:44:05 +0000 (00:44 +0000)]
- Call post-boot fixup function in order to get proper static
    symbols resolving in DDB
- When zeroing .bss/.sbss do not round end address to page boundary,
    it's not neccessary and might destroy data pased by trampoline or
    boot loader

14 years agoFixes for ls(1) long format (-l) output:
Jaakko Heinonen [Sun, 24 Jan 2010 19:23:07 +0000 (19:23 +0000)]
Fixes for ls(1) long format (-l) output:

- Allow -h option to work if the listing contains at least one device
  file.
- Align major and minor device numbers correctly to the size field.

PR: bin/125678
Approved by: trasz (mentor)
MFC after: 1 month

14 years agoPrint full path in the error message. It's possible that fts(3)
Jaakko Heinonen [Sun, 24 Jan 2010 19:17:35 +0000 (19:17 +0000)]
Print full path in the error message. It's possible that fts(3)
provides an empty fts_name and reporting the full path is more
appropriate especially with the -R option.

PR: bin/107515
Submitted by: bde
Approved by: trasz (mentor)
MFC after: 1 week

14 years agoAdd man pages for the gpib(4), pcii(4), and tnt4882(4) drivers.
Joerg Wunsch [Sun, 24 Jan 2010 19:11:08 +0000 (19:11 +0000)]
Add man pages for the gpib(4), pcii(4), and tnt4882(4) drivers.

MFC after: 3 days

14 years agoSplit out an invariant in order to better check that newtd, when
Attilio Rao [Sun, 24 Jan 2010 18:16:38 +0000 (18:16 +0000)]
Split out an invariant in order to better check that newtd, when
provided, must be on a runqueue.

Tested by: Giovanni Trematerra
<giovanni dot trematerra at gmail dot com>
MFC: 2 weeks
X-MFC: r202889

14 years agoo Write the soft reset bit in the cavium core to reset. [1]
Warner Losh [Sun, 24 Jan 2010 18:05:38 +0000 (18:05 +0000)]
o Write the soft reset bit in the cavium core to reset. [1]
o panic if the board boot descriptor is too old...

Obtained from: [1] looking at the cavium sdk's executive code

14 years agoWhile flushing the multicast filter of an interface, do not zero the relevant
Shteryana Shopova [Sun, 24 Jan 2010 16:17:58 +0000 (16:17 +0000)]
While flushing the multicast filter of an interface, do not zero the relevant
ifmultiaddr structures' reference to the parent interface, unless the parent
interface is really detaching. While here, program only link layer multicast
filters to a wlan's hardware parent interface.

PR: kern/142391, kern/142392
Reviewed by: sam, rpaolo, bms
MFC after: 1 week

14 years agoMove out code that does POSIX.1e ACL inheritance into separate routines.
Edward Tomasz Napierala [Sun, 24 Jan 2010 15:12:27 +0000 (15:12 +0000)]
Move out code that does POSIX.1e ACL inheritance into separate routines.

Reviewed by: rwatson

14 years ago- Fix the kthread_{suspend, resume, suspend_check}() locking.
Attilio Rao [Sun, 24 Jan 2010 15:07:00 +0000 (15:07 +0000)]
- Fix the kthread_{suspend, resume, suspend_check}() locking.
  In the current code, the locking is completely broken and may lead
  easilly to deadlocks. Fix it by using the proc_mtx, linked to the
  suspending thread, as lock for the operation.  Keep using the
  thread_lock for setting and reading the flag even if it is not entirely
  necessary (atomic ops may do it as well, but this way the code is more
  readable).
- Fix a deadlock within kthread_suspend().
  The suspender should not sleep on a different channel wrt the suspended
  thread, or, otherwise, the awaker should wakeup both. Uniform the
  interface to what the kproc_* counterparts do (sleeping on the same
  channel).
- Change the kthread_suspend_check() prototype.
  kthread_suspend_check() always assumes curthread and must only refer to
  it, so skip the thread pointer as it may be easilly mistaken.
  If curthread is not a kthread, the system will panic.

In collabouration with: jhb
Tested by: Giovanni Trematerra
<giovanni dot trematerra at gmail dot com>
MFC: 2 weeks

14 years agoAdd support for four more nfsmb controllers, shipping on at least the
Gavin Atkinson [Sun, 24 Jan 2010 14:57:54 +0000 (14:57 +0000)]
Add support for four more nfsmb controllers, shipping on at least the
ASUS Atom ION boards.

PR: kern/142571
Submitted by: oliver
Approved by: ed (mentor)
MFC after: 1 week

14 years agoImprove the ttyname(3) manual page.
Ed Schouten [Sun, 24 Jan 2010 14:44:05 +0000 (14:44 +0000)]
Improve the ttyname(3) manual page.

- Remove unrelated references to tty(5).
- Remove unneeded relation with FILE *.
- Add better cross references.

14 years agoRemove unneeded setpassent() calls.
Ed Schouten [Sun, 24 Jan 2010 14:29:40 +0000 (14:29 +0000)]
Remove unneeded setpassent() calls.

lastlogin no longer requires the use of the passwd database.

14 years agoAdd files to remove when MK_DICT=no.
Antoine Brodin [Sun, 24 Jan 2010 14:13:56 +0000 (14:13 +0000)]
Add files to remove when MK_DICT=no.

14 years agoAdd files to remove when MK_CVS=no.
Antoine Brodin [Sun, 24 Jan 2010 14:09:45 +0000 (14:09 +0000)]
Add files to remove when MK_CVS=no.

14 years agoAdd files to remove when MK_CTM=no.
Antoine Brodin [Sun, 24 Jan 2010 14:06:19 +0000 (14:06 +0000)]
Add files to remove when MK_CTM=no.

14 years agoAdd files to remove when MK_CPP=no.
Antoine Brodin [Sun, 24 Jan 2010 14:04:38 +0000 (14:04 +0000)]
Add files to remove when MK_CPP=no.

14 years agoFix array overflow. This routine is only called from procfs,
Edward Tomasz Napierala [Sun, 24 Jan 2010 12:13:38 +0000 (12:13 +0000)]
Fix array overflow.  This routine is only called from procfs,
which is not mounted by default, and I've been unable to trigger
a panic without this fix applied anyway.

Reviewed by: kib, cperciva

14 years agoShrink encoded line length from 76 to 72 characters.
Stephen McKay [Sun, 24 Jan 2010 11:54:32 +0000 (11:54 +0000)]
Shrink encoded line length from 76 to 72 characters.

Some Exchange systems wrap lines over 75 characters long while converting
messages to quoted-printable, preventing ctm_rmail from reassembling
emailed deltas.  For a negligible loss of encoding efficiency, this change
allows ctm deltas to once more pass through Exchange undamaged.

14 years agoAdd support for the NM10 chipset.
Remko Lodder [Sun, 24 Jan 2010 10:50:20 +0000 (10:50 +0000)]
Add support for the NM10 chipset.

PR: kern/143118
Submitted by: Koshin sumitani <ksumitani at mui dot biglobe dot ne dot jp>
Approved by: imp (mentor, implicit)
MFC after: 3 days

14 years agoMake strsignal(3) thread-safe.
Hajimu UMEMOTO [Sun, 24 Jan 2010 10:35:26 +0000 (10:35 +0000)]
Make strsignal(3) thread-safe.

MFC after: 2 weeks

14 years agoCorrect a typo.
Bjoern A. Zeeb [Sun, 24 Jan 2010 10:22:39 +0000 (10:22 +0000)]
Correct a typo.

Submitted by: kensmith
MFC after: 3 days

14 years ago- Introduce kernel_kseg0_end variable that marks first address in KSEG0
Oleksandr Tymoshenko [Sun, 24 Jan 2010 03:10:48 +0000 (03:10 +0000)]
- Introduce kernel_kseg0_end variable that marks first address in KSEG0
    available for use. All data below this address considered to be used
    by kernel. Along with kernel own data it might be symbol tables
    prepeared by trampoline code, boot loader service data passed for
    further analysis by kernel, etc... By default kernel_kseg0_end points
    to the end of loaded kernel.

- Introduce mips_postboot_fixup function. It checks for symbol information
    copied by ELF trampoline and passes it to KDB

14 years ago- Copy symbol-related tables (.symtab and .strtab) to the end of
Oleksandr Tymoshenko [Sun, 24 Jan 2010 02:59:22 +0000 (02:59 +0000)]
- Copy symbol-related tables (.symtab and .strtab) to the end of
    relocated kernel. We use magic number to signal kernel that
    symbol data is present.

14 years agoChanges the order of the setting the int happened (inside
Randall Stewart [Sun, 24 Jan 2010 01:06:02 +0000 (01:06 +0000)]
Changes the order of the setting the int happened (inside
the lock).

14 years agoRemove cpu_boot() and call efi_reset_system() directly from
Marcel Moolenaar [Sat, 23 Jan 2010 23:16:50 +0000 (23:16 +0000)]
Remove cpu_boot() and call efi_reset_system() directly from
cpu_reset().

14 years agoOn LP64 struct ifid is 64-bit aligned while struct fid is 32-bit aligned
Marius Strobl [Sat, 23 Jan 2010 22:38:01 +0000 (22:38 +0000)]
On LP64 struct ifid is 64-bit aligned while struct fid is 32-bit aligned
so on architectures with strict alignment requirements we can't just simply
cast the latter to the former but need to copy it bytewise instead.

PR: 143010
MFC after: 3 days

14 years agoMerge r202882 from amd64/i386:
Marius Strobl [Sat, 23 Jan 2010 22:11:18 +0000 (22:11 +0000)]
Merge r202882 from amd64/i386:

For PT_TO_SCE stop that stops the ptraced process upon syscall entry,
syscall arguments are collected before ptracestop() is called. As a
consequence, debugger cannot modify syscall or its arguments.

In syscall(), reread syscall number and arguments after ptracestop(),
if debugger modified anything in the process environment. Since procfs
stopevent requires number of syscall arguments in p_xstat, this cannot
be solved by moving stop/trace point before argument fetching.

Move the code to read arguments into separate function
fetch_syscall_args() to avoid code duplication. Note that ktrace point
for modified syscall is intentionally recorded twice, once with original
arguments, and second time with the arguments set by debugger.

PT_TO_SCX stop is executed after cpu_syscall_set_retval() already.

Reviewed by: kib

14 years agoFix breakage introduced to the tnt4882 driver in r202870. This PCI
Joerg Wunsch [Sat, 23 Jan 2010 21:33:33 +0000 (21:33 +0000)]
Fix breakage introduced to the tnt4882 driver in r202870.  This PCI
frontend uses the same uPD7210 backend as the pcii ISA frontend, so
the backend has to cope with both situations.

Also, hide the first printf in pcii_probe (address mismatch) behind
bootverbose as the ISA bus parent tries to probe all configured ISA
devices against each driver, so a the console has been cluttered with
this message for a bunch of unrelated driver probes.

MFC after: 3 days

14 years agoSimplify the mapping of the system message buffer. Use the direct map just
Alan Cox [Sat, 23 Jan 2010 20:28:37 +0000 (20:28 +0000)]
Simplify the mapping of the system message buffer.  Use the direct map just
like ia64 does.

14 years agoUnbreak world:
Antoine Brodin [Sat, 23 Jan 2010 19:29:42 +0000 (19:29 +0000)]
Unbreak world:
- WITHOUT_OPENSSH (and WITH_KERBEROS)
- WITHOUT_KERBEROS and WITH_GSSAPI

PR: 137483
Submitted by: bf
MFC after: 2 weeks

Note: this breaks harder world WITHOUT_GSSAPI (and WITH_KERBEROS), but well

14 years agoHandle a race between pmap_kextract() and pmap_promote_pde(). This race is
Alan Cox [Sat, 23 Jan 2010 18:42:28 +0000 (18:42 +0000)]
Handle a race between pmap_kextract() and pmap_promote_pde().  This race is
known to cause a kernel crash in ZFS on i386 when superpage promotion is
enabled.

Tested by: netchild
MFC after: 1 week

14 years agoEMPTY records don't have a timestamp.
Ed Schouten [Sat, 23 Jan 2010 17:58:40 +0000 (17:58 +0000)]
EMPTY records don't have a timestamp.

14 years agoUnbreak world WITHOUT_OPENSSL:
Antoine Brodin [Sat, 23 Jan 2010 17:31:13 +0000 (17:31 +0000)]
Unbreak world WITHOUT_OPENSSL:
the new dc(1) depends on crypto(3) and bc(1) depends on dc(1).

14 years ago- Fix a race in sched_switch() of sched_4bsd.
Attilio Rao [Sat, 23 Jan 2010 15:54:21 +0000 (15:54 +0000)]
- Fix a race in sched_switch() of sched_4bsd.
  In the case of the thread being on a sleepqueue or a turnstile, the
  sched_lock was acquired (without the aid of the td_lock interface) and
  the td_lock was dropped. This was going to break locking rules on other
  threads willing to access to the thread (via the td_lock interface) and
  modify his flags (allowed as long as the container lock was different
  by the one used in sched_switch).
  In order to prevent this situation, while sched_lock is acquired there
  the td_lock gets blocked. [0]
- Merge the ULE's internal function thread_block_switch() into the global
  thread_lock_block() and make the former semantic as the default for
  thread_lock_block(). This means that thread_lock_block() will not
  disable interrupts when called (and consequently thread_unlock_block()
  will not re-enabled them when called). This should be done manually
  when necessary.
  Note, however, that ULE's thread_unblock_switch() is not reaped
  because it does reflect a difference in semantic due in ULE (the
  td_lock may not be necessarilly still blocked_lock when calling this).
  While asymmetric, it does describe a remarkable difference in semantic
  that is good to keep in mind.

[0] Reported by: Kohji Okuno
<okuno dot kohji at jp dot panasonic dot com>
Tested by: Giovanni Trematerra
<giovanni dot trematerra at gmail dot com>
MFC: 2 weeks

14 years agoDocument pthread_timedjoin_np.
Konstantin Belousov [Sat, 23 Jan 2010 13:08:47 +0000 (13:08 +0000)]
Document pthread_timedjoin_np.
Note implementation-defined EOPNOTSUPP error [1].

PR: threads/143115 [1]
MFC after: 3 days

14 years agoReapply r201145 to lib/libc/gen/sem.c
Antoine Brodin [Sat, 23 Jan 2010 12:48:46 +0000 (12:48 +0000)]
Reapply r201145 to lib/libc/gen/sem.c

14 years agoFor PT_TO_SCE stop that stops the ptraced process upon syscall entry,
Konstantin Belousov [Sat, 23 Jan 2010 11:45:35 +0000 (11:45 +0000)]
For PT_TO_SCE stop that stops the ptraced process upon syscall entry,
syscall arguments are collected before ptracestop() is called. As a
consequence, debugger cannot modify syscall or its arguments.

For i386, amd64 and ia32 on amd64 MD syscall(), reread syscall number
and arguments after ptracestop(), if debugger modified anything in the
process environment. Since procfs stopeven requires number of syscall
arguments in p_xstat, this cannot be solved by moving stop/trace point
before argument fetching.

Move the code to read arguments into separate function
fetch_syscall_args() to avoid code duplication. Note that ktrace point
for modified syscall is intentionally recorded twice, once with original
arguments, and second time with the arguments set by debugger.

PT_TO_SCX stop is executed after cpu_syscall_set_retval() already.

Reported by: Ali Polatel <alip exherbo org>
Briefly discussed with: jhb
MFC after: 3 weeks

14 years agoStaticise sigqueue manipulation functions used only in kern_sig.c.
Konstantin Belousov [Sat, 23 Jan 2010 11:43:30 +0000 (11:43 +0000)]
Staticise sigqueue manipulation functions used only in kern_sig.c.

MFC after: 1 week

14 years agoDo not check for existence of symlink source for the link action. This
Konstantin Belousov [Sat, 23 Jan 2010 11:42:31 +0000 (11:42 +0000)]
Do not check for existence of symlink source for the link action. This
does not work for link in subdirectory, and sometimes it is useful to
create symlink in advance for dynamically created device node.

MFC after: 1 week

14 years agoJust ignore the timestamps given to pututxline().
Ed Schouten [Sat, 23 Jan 2010 08:43:21 +0000 (08:43 +0000)]
Just ignore the timestamps given to pututxline().

I've noticed many applications do a bad job at timekeeping, for several
reasons:

- Applications like screen(1) don't update time records when restoring
  the old user login record.
- Many applications only set ut_tv.tv_sec, not ut_tv.tv_usec.

This causes many problems for tools such as ac(8), which require the
timestamps to be properly ordered. This is why I've decided to let the
utmpx code obtain valid timestamps itself.

14 years agoDon't try to hardlink block or character device nodes that come out
Tim Kientzle [Sat, 23 Jan 2010 07:57:17 +0000 (07:57 +0000)]
Don't try to hardlink block or character device nodes that come out
of cpio archives.

14 years agoUse a simpler memory-management strategy for the file objects.
Tim Kientzle [Sat, 23 Jan 2010 07:55:53 +0000 (07:55 +0000)]
Use a simpler memory-management strategy for the file objects.
Instead of trying to reference-count them and free them as soon
as they are no longer needed, we now just keep them around and free
them all when we release the archive object.  This fixes a number
of minor memory leaks, especially when reading damaged archives.

14 years agoIf we can't stat a file, return the correct ARCHIVE_FAILED (this entry can't
Tim Kientzle [Sat, 23 Jan 2010 07:54:15 +0000 (07:54 +0000)]
If we can't stat a file, return the correct ARCHIVE_FAILED (this entry can't
be processed any further) and a suitable error string.
In particular, this improves the error-reporting when cpio -o is
given a nonexistent filename.

14 years agoOverhaul of the pcii driver:
Joerg Wunsch [Sat, 23 Jan 2010 07:54:06 +0000 (07:54 +0000)]
Overhaul of the pcii driver:

. Properly allocate all IO space resources.  These cards scatter their
  IO addresses over a range of 0x1600 bytes, and they require an
  additional address for "special interrupt handling".

. Implement the "special interrupt handling" per the GPIB-PCIIA
  Technical Reference Manual; this was apparently not declared for the
  clone card this driver has been originally implemented for, but it
  turned out to be needed for both, an original NI brand PCII/PCIIA
  card as well as the Axiom AX5488 clone.

. Add some diagnostic messages for various resource allocation etc.
  failures during probe.

. Add some comments about the structure of the IO address space that
  is used by these cards.

MFC after: 1 day

14 years agoInitialize the allocated 'struct zip'.
Tim Kientzle [Sat, 23 Jan 2010 07:52:44 +0000 (07:52 +0000)]
Initialize the allocated 'struct zip'.

14 years agoFix a memory leak when a filter fails to initialize.
Tim Kientzle [Sat, 23 Jan 2010 07:52:13 +0000 (07:52 +0000)]
Fix a memory leak when a filter fails to initialize.

14 years agoEliminate octeonregs.h. It was a copy of maltaregs.h with
Warner Losh [Sat, 23 Jan 2010 06:42:47 +0000 (06:42 +0000)]
Eliminate octeonregs.h.  It was a copy of maltaregs.h with
s/malta/octeon/gi done...

14 years ago- Move .text and all sections up to .bss inclusive to the beginning of
Oleksandr Tymoshenko [Sat, 23 Jan 2010 05:59:10 +0000 (05:59 +0000)]
- Move .text and all sections up to .bss inclusive to the beginning of
    the script.  Trampoline kernel builder assumes that .text goes right
    after headers and places startup function first in .text segment.

14 years agoRemove Sibyte specific code from locore.S that sets the k0seg coherency.
Neel Natu [Sat, 23 Jan 2010 03:19:13 +0000 (03:19 +0000)]
Remove Sibyte specific code from locore.S that sets the k0seg coherency.

Move it to platform_start() instead.

Approved by: imp (mentor)

14 years agoDon't forget to release the adapter lock for a no-op.
Navdeep Parhar [Sat, 23 Jan 2010 01:44:30 +0000 (01:44 +0000)]
Don't forget to release the adapter lock for a no-op.

14 years agoMigrate from old "DDB" style debugger to newer KDB style.
Warner Losh [Sat, 23 Jan 2010 00:24:31 +0000 (00:24 +0000)]
Migrate from old "DDB" style debugger to newer KDB style.

14 years agoUpdate from old DDB convetion to initialize debugger to new KDB way.
Warner Losh [Sat, 23 Jan 2010 00:18:12 +0000 (00:18 +0000)]
Update from old DDB convetion to initialize debugger to new KDB way.
Always call kdb_init().  If we have KDB enabled, then provide a handy
place to break to the debugger.

14 years ago - Collapase short and long options together;
Xin LI [Fri, 22 Jan 2010 23:50:46 +0000 (23:50 +0000)]
 - Collapase short and long options together;
 - Use consistent marking up with bc(1)'s reference section.

Reviewed by: gabor

14 years ago - Remove --debug option and intentionally undocument -d, which is only
Xin LI [Fri, 22 Jan 2010 23:35:06 +0000 (23:35 +0000)]
 - Remove --debug option and intentionally undocument -d, which is only
   kept for compatibility with 4.4BSD behavior.
 - Sync SYNOPSIS with usage().
 - Use an alternative way to represent short and long options which have
   same semantics.

Reviewed by: gabor

14 years ago- Add support for UPDATING remote fetching.
Florent Thoumie [Fri, 22 Jan 2010 23:32:10 +0000 (23:32 +0000)]
- Add support for UPDATING remote fetching.
- Reorganize EXAMPLES section in pkg_updating(1).
- Style fixes.
- Bump PKG_INSTALL_VERSION to 20100122.

Submitted by: beat
MFC after: 1 week

14 years agoMove USD documents from /usr/share/doc/papers to to /usr/share/doc/usd.
Xin LI [Fri, 22 Jan 2010 23:19:48 +0000 (23:19 +0000)]
Move USD documents from /usr/share/doc/papers to to /usr/share/doc/usd.

Reviewed by: gabor

14 years ago- Add driver for PCF2123, SPI real time clock/calendar
Oleksandr Tymoshenko [Fri, 22 Jan 2010 22:14:12 +0000 (22:14 +0000)]
- Add driver for PCF2123, SPI real time clock/calendar

14 years agoDeclare octeon_get_clock_rate, now exported from octeon_machdep
Warner Losh [Fri, 22 Jan 2010 20:44:34 +0000 (20:44 +0000)]
Declare octeon_get_clock_rate, now exported from octeon_machdep

14 years agoRemove some irrelevant commented out make options.
Warner Losh [Fri, 22 Jan 2010 20:42:18 +0000 (20:42 +0000)]
Remove some irrelevant commented out make options.

14 years agomake note of the nonsensical nature of the values in this hints file.
Warner Losh [Fri, 22 Jan 2010 20:41:43 +0000 (20:41 +0000)]
make note of the nonsensical nature of the values in this hints file.

14 years agoo Add support for memory above 256MB on the octeon.
Warner Losh [Fri, 22 Jan 2010 20:40:07 +0000 (20:40 +0000)]
o Add support for memory above 256MB on the octeon.
o Force the ebase to be 0x80000000 (the base that we're booted with may
  need to be respected in the future).
o Initialize the clock early so we can initialize the console early
o use panic where we can now use it.
o Tag some code for parsing the boot records as belonging in the cavium sdk.
o remove support for booting on ancient boards...

# we make it further in bootstrapping now: interrupts being enabled in the
# uarts are now taking us out, it seems, for reasons unknown.

14 years agoCreate a method of last resort for rebooting the mips processor: jump
Warner Losh [Fri, 22 Jan 2010 20:32:07 +0000 (20:32 +0000)]
Create a method of last resort for rebooting the mips processor: jump
to the reset vector.  This works for many SoCs where other reset
hardware is either missing or unknown.

14 years agoYukon Ultra2 has 126MHz clock.
Pyun YongHyeon [Fri, 22 Jan 2010 20:15:49 +0000 (20:15 +0000)]
Yukon Ultra2 has 126MHz clock.

14 years agos/Mhz/MHz/g
Pyun YongHyeon [Fri, 22 Jan 2010 20:10:12 +0000 (20:10 +0000)]
s/Mhz/MHz/g

Submitted by: N.J. Mann <njm <> njm dot me dot uk >

14 years agoUse new handshake command for BCM5750 or new controllers.
Pyun YongHyeon [Fri, 22 Jan 2010 18:46:37 +0000 (18:46 +0000)]
Use new handshake command for BCM5750 or new controllers.

14 years agoFix a long standing ASF heartbeat sending bug. The initial
Pyun YongHyeon [Fri, 22 Jan 2010 18:35:50 +0000 (18:35 +0000)]
Fix a long standing ASF heartbeat sending bug. The initial
implementation of heartbeat interval was 2 but there was typo which
caused the heartbeat is sent approximately every 5 seconds. This
caused unintended controller reset by firmware because firmware
thought OS was crashed.

Submitted by: Floris Bos < info <> je-eigen-domein dot nl >
Tested by: Andrzej Tobola < ato <> iem dot pw dot edu dot pl >

14 years agoMake -U once again honor -D after my change to consolidate setting
Doug Barton [Fri, 22 Jan 2010 17:17:47 +0000 (17:17 +0000)]
Make -U once again honor -D after my change to consolidate setting
of MTREEDB with DESTDIR.

PR: bin/143089
Submitted by: Anton Yuzhaninov <citrin@citrin.ru>