]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoo Add Moxa Technologies CP-104EL PCI Express 4 port Serial card.
maxim [Sat, 12 Jan 2008 19:14:29 +0000 (19:14 +0000)]
o Add Moxa Technologies CP-104EL PCI Express 4 port Serial card.

PR: kern/119515
Submitted by: Gavin Stone-Tolcher
MFC after: 1 month

16 years agoo Correct an info about "Firewalls and Internet Security" book: name,
maxim [Sat, 12 Jan 2008 19:02:09 +0000 (19:02 +0000)]
o Correct an info about "Firewalls and Internet Security" book: name,
authors list, ISBN, URLs.

PR: conf/119590
MFC after: 1 week

16 years agoPlug memory leaks that is observed when argbuf or argspc is used in the
delphij [Sat, 12 Jan 2008 00:54:47 +0000 (00:54 +0000)]
Plug memory leaks that is observed when argbuf or argspc is used in the
context.

Submitted by: Michal Vranek <michal.vranek seznam cz>
PR: bin/118380
MFC after: 1 month

16 years ago - Handle the case where interface from "middle" is missing by
delphij [Sat, 12 Jan 2008 00:11:26 +0000 (00:11 +0000)]
 - Handle the case where interface from "middle" is missing by
   more carefully inspecting the return value from sysctl(3). [1]
 - Use calloc instead of malloc+memset of zero.

Submitted by: Alexander Chernikov <admin su29 net> [1]
PR: bin/119581
MFC after: 2 weeks

16 years agoThe previous revision broke the case of reconnecting to a TCP NFS server
jhb [Fri, 11 Jan 2008 23:57:39 +0000 (23:57 +0000)]
The previous revision broke the case of reconnecting to a TCP NFS server
via a new socket during an NFS operation as that reconnect takes place in
the context of an arbitrary thread with an arbitrary credential.  Ideally
we would like to use the mount point's credential for the entire process
of setting up the socket to connect to the NFS server.  Since some of the
APIs (sobind(), etc.) only take a thread pointer and infer the credential
from that instead of a direct credential, work around the problem by
temporarily changing the current thread's credential to that of the mount
point while connecting the socket and then reverting back to the original
credential when we are done.

Reviewed by: rwatson
Tested on: UDP, TCP, TCP with forced reconnect

16 years agoRemove from the default empty zone list zones that, unlike the others,
dougb [Fri, 11 Jan 2008 22:41:21 +0000 (22:41 +0000)]
Remove from the default empty zone list zones that, unlike the others,
could theoretically be allocated one day.

16 years agoMFamd64 (everything possible up to 1.19; mainly the amd64 implementations
bde [Fri, 11 Jan 2008 18:59:35 +0000 (18:59 +0000)]
MFamd64 (everything possible up to 1.19; mainly the amd64 implementations
of fpget*() and fpset*()).

The i386 fpget*() were efficient but a bit obfuscated (using macros
and a case statement to demultiplex them through a single inline).
The demultiplexing mainly gave smaller source code.

The i386 fpset*() were obfuscated in the same way and were very
inefficient due to the case statement not having enough cases or
complexity so all cases used the FP environment.

This also fixes a harmless bug in rev.1.12.  fpsetmask() extracted the
old value from the bit-field twice, but the doubled shift was harmless
since the shift count is 0.

All fp*() interfaces are now inline functions on i386.  They used to
be macros that call (a different set of) inline functions.  This is a
small ABI change which shouldn't cause problems since cases where
inlining fails (mainly -O0) only give (working) static functions.

16 years agoSeparate fpresetsticky() from the other fpset functions so that the
bde [Fri, 11 Jan 2008 18:27:01 +0000 (18:27 +0000)]
Separate fpresetsticky() from the other fpset functions so that the
others can be replaced cleanly by the amd64 versions.   There is no
current amd64 version to merge, but there is an old one which is
similar.

Fix the following bugs in fpresetsticky():
- garbage args clobbered non-sticky bits in the status register
- the return value was usually garbage since it was masked with the
  arg instead of with the field selector.

Optimize fpresetsticky() to avoid using the environment as in
feclearexcept() (use only fnclex() if possible) and also to avoid
using fnclex() for null changes.  The second of these optimizations
might not be so good since its branch might cost more than it saves.

16 years agoMFamd64 1.15-1.18 (cosmetic changes, mainly to comments). The inline
bde [Fri, 11 Jan 2008 17:54:20 +0000 (17:54 +0000)]
MFamd64 1.15-1.18 (cosmetic changes, mainly to comments).  The inline
functions haven't been cleaned up here because the amd64 cleanups
don't apply directly and the functions here will be merged or rewritten
later.

16 years agoFix fpset*() to not trap if there is a currently unmasked exception.
bde [Fri, 11 Jan 2008 17:11:32 +0000 (17:11 +0000)]
Fix fpset*() to not trap if there is a currently unmasked exception.
Unmasked exceptions (which can be fixed up using fpset*() before they
trap) are very rare, especially on amd64 since SSE exceptions trap
synchronously, but I want to merge the faster amd64 implementations of
fpset*() back to i386 without introducing the bug on i386.

The i386 implementation has always avoided the trap automatically by
changing things using load/store of the FP environment, but this is
very slow.  Most changes only affect the control word, so they can
usually be done much more efficiently, and amd64 has always done this,
but loading the control word can trap.

This version use the fast method only in the usual case where it will
not trap.  This only costs a couple of integer instructions (including
one branch which I haven't optimized carefully yet) in the usual case,
but bloats the inlines a lot.  The inlines were already a bit too large
to handle both the FPU and SSE.

16 years agoThe wakeup() line from the rev. 1.319 is wrong and reintroduces
kib [Fri, 11 Jan 2008 16:50:52 +0000 (16:50 +0000)]
The wakeup() line from the rev. 1.319 is wrong and reintroduces
a panic race on module unload. The wakeup() is internal to
kproc_exit/kthread_exit. The correct fix is to fix the msleep() in
detach to sleep on fdc->fdc_thread instead of &fdc->fdc_thread.

Noted and reviewed by: jhb
Pointy hat to: kib
MFC after: 1 week

16 years agolockmgr() function will return successfully when trying to work under
attilio [Fri, 11 Jan 2008 16:38:12 +0000 (16:38 +0000)]
lockmgr() function will return successfully when trying to work under
panic but it won't actually lock anything.
This can lead some paths to reach lockmgr_disown() with inconsistent
lock which will let trigger the relative assertions.

Fix those in order to recognize panic situation and to not trigger.

Reported by: pho
Submitted by: kib

16 years agoFix some style bugs:
bde [Fri, 11 Jan 2008 14:11:46 +0000 (14:11 +0000)]
Fix some style bugs:
- fix a previous style fix: shifts should be in the correct direction even
  if they are null.
- restore a comment about namespace pollution from floatingpoint.h 1.12 and
  update it.
- remove unused namespace pollution FP_*REG.
- improve some comments.
- sort macro definitions for entry points.
- don't use underscores for macro args.

16 years agoAdd entries for manpages for pmc_x86_get_msr(3), kthread_create(9),
jhb [Fri, 11 Jan 2008 13:41:31 +0000 (13:41 +0000)]
Add entries for manpages for pmc_x86_get_msr(3), kthread_create(9),
shm_open(3), and shm_unlink(3).

16 years agoFix unload of the fdc.ko:
kib [Fri, 11 Jan 2008 11:53:04 +0000 (11:53 +0000)]
Fix unload of the fdc.ko:

Wakeup the thread doing the fdc_detach() when the fdc worker thread exits [1].
Write access to the write-protected floppy shall call device_unbusy() to
pair the device_busy() in the fd_access() [2].

PR: 116537 [1], 116539 [2]
MFC after: 1 week

16 years ago- Correct the range check in the double version to catch negative values
das [Fri, 11 Jan 2008 04:18:25 +0000 (04:18 +0000)]
- Correct the range check in the double version to catch negative values
  that would overflow.
- Style fixes and improved handling of NaNs suggested by bde.

16 years agoBe more aggressive about tx cleaning - when multiples streams were running the tx
kmacy [Fri, 11 Jan 2008 02:26:54 +0000 (02:26 +0000)]
Be more aggressive about tx cleaning - when multiples streams were running the tx
queue could fill up and stop getting cleaned.

16 years agoIf we're not running with multiqueue enabled we need to wait to acquire the
kmacy [Thu, 10 Jan 2008 23:51:34 +0000 (23:51 +0000)]
If we're not running with multiqueue enabled we need to wait to acquire the
rspq lock. Not doing so was causing us to skip re-enabling the interrupt.

- remove duplicate credits sysctl
- add support for dumping hardware context of the txq
- decrement budget_left when we break out of the process_responses loop

16 years agoWork around problems with the ppbus(4)'s interesting way of managing
jhb [Thu, 10 Jan 2008 23:43:47 +0000 (23:43 +0000)]
Work around problems with the ppbus(4)'s interesting way of managing
interrupt handlers for child devices by adding a dummy handler that is
always present so that the underlying interrupt thread is always around
avoiding panics from stray interrupts.

MFC after: 3 days

16 years agoPass curthread to various socket routines (socreate(), sobind(), and
jhb [Thu, 10 Jan 2008 23:36:00 +0000 (23:36 +0000)]
Pass curthread to various socket routines (socreate(), sobind(), and
soconnect()) instead of &thread0 when establishing a connection to the NFS
server.  Otherwise inconsistent credentials may be used when setting up
the NFS socket.

MFC after: 1 week
Reviewed by: rwatson

16 years agoAdd a feature_present(3) function which checks to see if a named kernel
jhb [Thu, 10 Jan 2008 22:11:21 +0000 (22:11 +0000)]
Add a feature_present(3) function which checks to see if a named kernel
feature is present by checking the kern.features sysctl MIB.

MFC after: 1 week

16 years agoDon't zero td_runtime when billing thread CPU usage to the process;
rwatson [Thu, 10 Jan 2008 22:11:20 +0000 (22:11 +0000)]
Don't zero td_runtime when billing thread CPU usage to the process;
maintain a separate td_incruntime to hold unbilled CPU usage for
the thread that has the previous properties of td_runtime.

When thread information is requested using the thread monitoring
sysctls, export thread td_runtime instead of process rusage runtime
in kinfo_proc.

This restores the display of individual ithread and other kernel
thread CPU usage since inception in ps -H and top -SH, as well for
libthr user threads, valuable debugging information lost with the
move to try kthreads since they are no longer independent processes.

There is universal agreement that we should rewrite the process and
thread export sysctls, but this commit gets things going a bit
better in the mean time.  Likewise, there are resevations about the
continued validity of statclock given the speed of modern processors.

Reviewed by: attilio, emaste, jhb, julian

16 years agoAdd IFT_BRIDGE to the Ethernet section so l2 addresses are formatted correctly.
thompsa [Thu, 10 Jan 2008 20:53:13 +0000 (20:53 +0000)]
Add IFT_BRIDGE to the Ethernet section so l2 addresses are formatted correctly.

PR: bin/119542
Submitted by: Niki Denev

16 years agoRemoved a contraction.
brueffer [Thu, 10 Jan 2008 19:11:37 +0000 (19:11 +0000)]
Removed a contraction.

16 years agoFix non-SMP kernel regression introduced in the previous commit.
jkim [Thu, 10 Jan 2008 16:31:14 +0000 (16:31 +0000)]
Fix non-SMP kernel regression introduced in the previous commit.

Reviewed by: jkoshy

16 years agoDisable the check for errata AE18. On MacBooks (1,1 version) there's
rpaulo [Thu, 10 Jan 2008 16:09:22 +0000 (16:09 +0000)]
Disable the check for errata AE18.  On MacBooks (1,1 version) there's
no problem with coretemp and C3 state.

Approved by: njl (mentor)

16 years agoA real gem from freebsd-current@
des [Thu, 10 Jan 2008 14:51:24 +0000 (14:51 +0000)]
A real gem from freebsd-current@

16 years agoRemove "lock pushdown" todo item in comment -- I did that for 7.0.
rwatson [Thu, 10 Jan 2008 12:38:17 +0000 (12:38 +0000)]
Remove "lock pushdown" todo item in comment -- I did that for 7.0.

MFC after: 3 weeks

16 years agoCorrect typos in comments.
rwatson [Thu, 10 Jan 2008 12:29:12 +0000 (12:29 +0000)]
Correct typos in comments.

MFC after: 3 weeks

16 years agoWhen one tries to allocate memory with the M_WAITOK flag and we are short in
pjd [Thu, 10 Jan 2008 08:36:38 +0000 (08:36 +0000)]
When one tries to allocate memory with the M_WAITOK flag and we are short in
address space in kmem map call vm_lowmem event in a loop and wait a bit for
subsystems to reclaim some memory which in turn will reclaim address space as
well.

Note, this is a work-around.

Reviewed by: alc
Approved by: alc
MFC after: 3 days

16 years agoAdd support for selectively dumping the state of the hardware response queue.
kmacy [Thu, 10 Jan 2008 06:54:20 +0000 (06:54 +0000)]
Add support for selectively dumping the state of the hardware response queue.
Change ordering of a couple of types.

16 years agoshould always free when refcount is 1
kmacy [Thu, 10 Jan 2008 06:52:48 +0000 (06:52 +0000)]
should always free when refcount is 1

16 years agoquiet compiler complaint about unused parameters
sam [Thu, 10 Jan 2008 04:28:26 +0000 (04:28 +0000)]
quiet compiler complaint about unused parameters

16 years agoquiet compiler complaint about comparing &v against NULL
sam [Thu, 10 Jan 2008 04:26:44 +0000 (04:26 +0000)]
quiet compiler complaint about comparing &v against NULL

16 years agoMake sure that grog is linked to me, and that I (in *-ports*) am
edwin [Thu, 10 Jan 2008 01:25:40 +0000 (01:25 +0000)]
Make sure that grog is linked to me, and that I (in *-ports*) am
linked to the people I helped out, and add them to the overview
too.

Approved by: grog@

16 years agoBump FreeBSD_version in order to reflect vn_lock() prototype changes.
attilio [Thu, 10 Jan 2008 01:25:23 +0000 (01:25 +0000)]
Bump FreeBSD_version in order to reflect vn_lock() prototype changes.

16 years agoUpdate vn_lock() prototype accordingly with the 'thread' argument removal.
attilio [Thu, 10 Jan 2008 01:23:59 +0000 (01:23 +0000)]
Update vn_lock() prototype accordingly with the 'thread' argument removal.

16 years agovn_lock() is currently only used with the 'curthread' passed as argument.
attilio [Thu, 10 Jan 2008 01:10:58 +0000 (01:10 +0000)]
vn_lock() is currently only used with the 'curthread' passed as argument.
Remove this argument and pass curthread directly to underlying
VOP_LOCK1() VFS method. This modify makes the code cleaner and in
particular remove an annoying dependence helping next lockmgr() cleanup.
KPI results, obviously, changed.

Manpage and FreeBSD_version will be updated through further commits.

As a side note, would be valuable to say that next commits will address
a similar cleanup about VFS methods, in particular vop_lock1 and
vop_unlock.

Tested by: Diego Sardina <siarodx at gmail dot com>,
Andrea Di Pasquale <whyx dot it at gmail dot com>

16 years agohttp://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/conventions...
edwin [Thu, 10 Jan 2008 01:10:31 +0000 (01:10 +0000)]
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/conventions.html

4.1 point 6:

Add an entry for yourself to src/share/misc/committers-repository.dot,
where repository is either doc, ports or src, depending on the
commit privileges you obtained.

Approved by: grog@

16 years ago- make 9k clusters the default unless a tunable is set
kmacy [Thu, 10 Jan 2008 00:55:42 +0000 (00:55 +0000)]
- make 9k clusters the default unless a tunable is set
- return the error from cxgb_tx_common so that when an error is hit we dont
  spin forever in the taskq thread
- remove unused rxsd_ref
- simplify header_offset calculation for embedded mbuf headers
- fix memory leak by making sure that mbuf header initialization took place
- disable printf's for stalled queue, don't do offload/ctrl queue restart
  when tunnel queue is restarted
- add more diagnostic information about the txq state
- add facility to dump the actual contents of the hardware queue using sysctl

16 years agoRefine textdump comments slightly.
rwatson [Thu, 10 Jan 2008 00:26:47 +0000 (00:26 +0000)]
Refine textdump comments slightly.

MFC after: 3 months

16 years agoFix a buffer overflow in the processing of various SCSI commands. This likely
scottl [Wed, 9 Jan 2008 20:02:56 +0000 (20:02 +0000)]
Fix a buffer overflow in the processing of various SCSI commands.  This likely
fixes a an great number of weird problems that have been reported with this
driver.

PR: 119114
Submitted by: Jens Rehsack

16 years agoImprove -u (limit uid lookups) behavior.
obrien [Wed, 9 Jan 2008 18:06:24 +0000 (18:06 +0000)]
Improve -u (limit uid lookups) behavior.

Submitted by: David Frascone <dave@frascone.com>
PR: 119490

16 years agoThis commit was generated by cvs2svn to compensate for changes in r175189,
obrien [Wed, 9 Jan 2008 16:46:14 +0000 (16:46 +0000)]
This commit was generated by cvs2svn to compensate for changes in r175189,
which included commits to RCS files with non-trunk default branches.

16 years agoBring in fix for Binutils PR other/16240: Check for a failure return from
obrien [Wed, 9 Jan 2008 16:46:14 +0000 (16:46 +0000)]
Bring in fix for Binutils PR other/16240: Check for a failure return from
cplus_demangle_type.  This is the rev 1.50-1.51 change.

Our addr2line, etc.. would crash if used on C++ code that contains
certain symbol types.  One example is
_ZN13PatternDriver23StringScalarDeleteValueC1ERKNS_25ConflateStringScalarValueERKNS_25AbstractStringScalarValueERKNS_12TemplateEnumINS_12pdcomplementELZNS_16complement_namesEELZNS_14COMPLEMENTENUMEEEE

16 years agoSimplify the ifdefs:
bde [Wed, 9 Jan 2008 15:03:03 +0000 (15:03 +0000)]
Simplify the ifdefs:
- fix this to compile with C++ by casting ints to enums in a few places
  and by using the correct parameter type for _fpsetprec().  Remove
  __cplusplus ifdefs which disabled the buggy code.
- remove __CC_SUPPORTS___INLINE ifdefs.  `__inline' vs `inline', and either
  of these #defined away, are supposed to be handled by very old ifdefs
  in <sys/cdefs.h>.  Thus the __CC_SUPPORTS___INLINE macro is not needed
  here (or anywhere else that it used).  It is less needed here than in
  most places, since this file is userland-only and userland is far from
  supporting INTEL_COMPILER.  The __CC_SUPPORTS___INLINE__ macro which
  was used here is even less needed.  It is to support spelling `inline'
  as `__inline__' instead of the usual spelling `__inline'.

Fix some style bugs that I missed in the previous commit (remove unused
asms and sort more variables).

16 years agoFix some style bugs (mainly, use explicit shifts when accessing bit-fields
bde [Wed, 9 Jan 2008 13:35:31 +0000 (13:35 +0000)]
Fix some style bugs (mainly, use explicit shifts when accessing bit-fields
even if the shift count happens to be 0, sort declarations, and spell
__inline normally).

16 years agoImprove some comments.
bde [Wed, 9 Jan 2008 10:42:47 +0000 (10:42 +0000)]
Improve some comments.

16 years agoRevise the TECHNICAL DETAILS section.
ru [Wed, 9 Jan 2008 09:38:53 +0000 (09:38 +0000)]
Revise the TECHNICAL DETAILS section.

Reviewed by: skv

16 years agomake nqsets a uint32_t so that sysctl will work
kmacy [Wed, 9 Jan 2008 08:12:24 +0000 (08:12 +0000)]
make nqsets a uint32_t so that sysctl will work
add 2 fields for allowing queue dumping

16 years agoFix typos.
brueffer [Wed, 9 Jan 2008 08:08:56 +0000 (08:08 +0000)]
Fix typos.

16 years agodon't decrement ref count below 1 for EXT_PACKET
kmacy [Wed, 9 Jan 2008 08:01:42 +0000 (08:01 +0000)]
don't decrement ref count below 1 for EXT_PACKET

16 years agoEXT_PACKET is one of the valid mbuf types
kmacy [Wed, 9 Jan 2008 08:01:08 +0000 (08:01 +0000)]
EXT_PACKET is one of the valid mbuf types

16 years agoFix KASSERT in m_free_fast - the LIST_EMPTY check only applies to packet headers.
kmacy [Wed, 9 Jan 2008 06:29:49 +0000 (06:29 +0000)]
Fix KASSERT in m_free_fast - the LIST_EMPTY check only applies to packet headers.
In the non packet header case there may be data there.

16 years agoAdd lockmgr_disown() and relative explanation.
attilio [Wed, 9 Jan 2008 02:10:32 +0000 (02:10 +0000)]
Add lockmgr_disown() and relative explanation.

16 years agoBump FreeBSD_version in order to reflect lockmgr_disown() function
attilio [Wed, 9 Jan 2008 00:03:50 +0000 (00:03 +0000)]
Bump FreeBSD_version in order to reflect lockmgr_disown() function
introduction.

16 years agoFix a last second typo about recent lockmgr_disown() introduction.
attilio [Wed, 9 Jan 2008 00:02:43 +0000 (00:02 +0000)]
Fix a last second typo about recent lockmgr_disown() introduction.

16 years agoRemove explicit calling of lockmgr() with the NULL argument.
attilio [Tue, 8 Jan 2008 23:48:31 +0000 (23:48 +0000)]
Remove explicit calling of lockmgr() with the NULL argument.
Now, lockmgr() function can only be called passing curthread and the
KASSERT() is upgraded according with this.

In order to support on-the-fly owner switching, the new function
lockmgr_disown() has been introduced and gets used in BUF_KERNPROC().
KPI, so, results changed and FreeBSD version will be bumped soon.
Differently from previous code, we assume idle thread cannot try to
acquire the lockmgr as it cannot sleep, so loose the relative check[1]
in BUF_KERNPROC().

Tested by: kris

[1] kib asked for a KASSERT in the lockmgr_disown() about this
condition, but after thinking at it, as this is a well known general
rule, I found it not really necessary.

16 years agoRegen for shm_open(2) and shm_unlink(2).
jhb [Tue, 8 Jan 2008 22:01:26 +0000 (22:01 +0000)]
Regen for shm_open(2) and shm_unlink(2).

16 years agoAdd a new file descriptor type for IPC shared memory objects and use it to
jhb [Tue, 8 Jan 2008 21:58:16 +0000 (21:58 +0000)]
Add a new file descriptor type for IPC shared memory objects and use it to
implement shm_open(2) and shm_unlink(2) in the kernel:
- Each shared memory file descriptor is associated with a swap-backed vm
  object which provides the backing store.  Each descriptor starts off with
  a size of zero, but the size can be altered via ftruncate(2).  The shared
  memory file descriptors also support fstat(2).  read(2), write(2),
  ioctl(2), select(2), poll(2), and kevent(2) are not supported on shared
  memory file descriptors.
- shm_open(2) and shm_unlink(2) are now implemented as system calls that
  manage shared memory file descriptors.  The virtual namespace that maps
  pathnames to shared memory file descriptors is implemented as a hash
  table where the hash key is generated via the 32-bit Fowler/Noll/Vo hash
  of the pathname.
- As an extension, the constant 'SHM_ANON' may be specified in place of the
  path argument to shm_open(2).  In this case, an unnamed shared memory
  file descriptor will be created similar to the IPC_PRIVATE key for
  shmget(2).  Note that the shared memory object can still be shared among
  processes by sharing the file descriptor via fork(2) or sendmsg(2), but
  it is unnamed.  This effectively serves to implement the getmemfd() idea
  bandied about the lists several times over the years.
- The backing store for shared memory file descriptors are garbage
  collected when they are not referenced by any open file descriptors or
  the shm_open(2) virtual namespace.

Submitted by: dillon, peter (previous versions)
Submitted by: rwatson (I based this on his version)
Reviewed by: alc (suggested converting getmemfd() to shm_open())

16 years agoHonour the logical current working directory ($PWD) when using config's
emaste [Tue, 8 Jan 2008 21:10:13 +0000 (21:10 +0000)]
Honour the logical current working directory ($PWD) when using config's
-d destdir option.  For an automounted src tree using the logical cwd
in the Makefile keeps amd(8)'s mount timeout refreshed.  Code to check
$PWD's validity cribbed from pwd(1).

Discussed on hackers@.

16 years agoun-__P()
obrien [Tue, 8 Jan 2008 19:08:58 +0000 (19:08 +0000)]
un-__P()

16 years ago- Remove kH and *6 from xterm. They are defined to the same key as @7 (kp_end).
rafan [Tue, 8 Jan 2008 16:00:24 +0000 (16:00 +0000)]
- Remove kH and *6 from xterm. They are defined to the same key as @7 (kp_end).
  As ncurses has the limitation that it returns the first matched key symbol,
  you can not use END in ncurses based program, like mutt, with xterm.
- Add @8 (kp_enter) definition for xterm so you can use ENTER in xterm with
  ncurses based program.

I also found that NetBSD's xterm does the same thing.

PR: 100150
Reported by: Arseny Nasokin <tarc at tarc.po.cs.msu.su>
Discussed with: Thomas Dickey, Ulrich Spoerlein <uspoerlein at gmail.com>
Reviewed by: freebsd-arch@
MFC after: 2 month

16 years ago- This driver will first appear in FreeBSD 6.3, not 7.0
gabor [Tue, 8 Jan 2008 15:36:06 +0000 (15:36 +0000)]
- This driver will first appear in FreeBSD 6.3, not 7.0

Submitted by: thompsa
MFC after: 0 days

16 years agoWhen MAC is enabled in the kernel, fix a panic triggered by a locking
csjp [Tue, 8 Jan 2008 14:58:41 +0000 (14:58 +0000)]
When MAC is enabled in the kernel, fix a panic triggered by a locking
assertion hit in swapoff_one() when we un-mount a swap partition.  We
should be using curthread where we used thread0 before.  This change
also replaces the thread argument with a credential argument, as the
MAC framework only requires the cred.

It should be noted that this allows the machine to be rebooted without
panicing with "cannot differ from curthread or NULL" when MAC is enabled.

Submitted by: rwatson
Reviewed by: attilio
MFC after: 2 weeks

16 years agoAdd an additional make variable EXTRAMIBSYMS which allows to specify
harti [Tue, 8 Jan 2008 12:55:56 +0000 (12:55 +0000)]
Add an additional make variable EXTRAMIBSYMS which allows to specify
definition files that are used only for extracting symbols. This is useful
for inter-module dependencies and files containing only enum-definitions.

MFC after: 4 weeks

16 years agoConvert a PMAP_DIAGNOSTIC to a KASSERT.
alc [Tue, 8 Jan 2008 08:30:30 +0000 (08:30 +0000)]
Convert a PMAP_DIAGNOSTIC to a KASSERT.

16 years agoWelcome unzip(1), a pure BSD drop-in replacement for ports/unzip. In its
des [Tue, 8 Jan 2008 08:00:06 +0000 (08:00 +0000)]
Welcome unzip(1), a pure BSD drop-in replacement for ports/unzip.  In its
current state, it can handle all but four of the 991 zip files (including
jar files) I was able to identify in the ports tree.  The remaining four
are two self-extracting archives and two which have garbage preceding the
first local header.  This limitation is a feature of libarchive(3) which
I am currently working to resolve.

The code is unnecessarily large due to the need to emulate the exact
command-line syntax and behaviour of ports/unzip.  My initial incompatible
implementation was one quarter the size of the one I am committing here.

16 years agoA new configuration variable, daily_status_mail_rejects_shorten, allows
dds [Tue, 8 Jan 2008 07:22:43 +0000 (07:22 +0000)]
A new configuration variable, daily_status_mail_rejects_shorten, allows
the rejected mail reports to tally the rejects per blacklist without
providing details about individual sender hosts.  The default configuration
keeps the reports in their original form.

MFC after: 1 week

16 years agoClose a race in the kern.ttys sysctl handler that resulted in panics in
jhb [Tue, 8 Jan 2008 04:53:28 +0000 (04:53 +0000)]
Close a race in the kern.ttys sysctl handler that resulted in panics in
dev2udev() when a tty was being detached concurrently with the sysctl
handler:
- Hold the 'tty_list_mutex' lock while we read all the fields out of the
  struct tty for copying out later.  Previously the pty(4) and pts(4)
  destroy routines could set t_dev to NULL, drop their reference on the
  tty and destroy the cdev while the sysctl handler was attempting to
  invoke dev2udev() on the cdev being destroyed.  This happened when the
  sysctl handler read the value of t_dev prior to it being set to NULL
  either due to it being stale or due to timing races.  By holding the
  list lock we guarantee that the destroy routines will block in ttyrel()
  in that case and not destroy the cdev until after we've copied all of our
  data.  We may see a NULL cdev pointer or we may see the previous value,
  but the previous value will no longer point to a destroyed cdev if we
  see it.
- Fix the ttyfree() routine used by tty device drivers in their detach
  methods to use ttyrel() on the tty so we don't leak them.  Also, fix it
  to use the same order of operations as pty/pts destruction (set t_dev
  NULL, ttyrel(), destroy_dev()) so it cooperates with the sysctl handler.

MFC after: 3 days
Tested by: avatar

16 years agoLock the vnode interlock while reading v_usecount to update si_usecount
jhb [Tue, 8 Jan 2008 04:45:24 +0000 (04:45 +0000)]
Lock the vnode interlock while reading v_usecount to update si_usecount
in a cdev in devfs_reclaim().

MFC after: 3 days
Reviewed by: jeff (a while ago)

16 years agoFix logic in skipcount handling (used to sample every 1/N lock operations
kris [Tue, 8 Jan 2008 01:11:40 +0000 (01:11 +0000)]
Fix logic in skipcount handling (used to sample every 1/N lock operations
to reduce profiling overhead)

16 years agoFree MAC label on a POSIX semaphore when the semaphore is freed.
rwatson [Mon, 7 Jan 2008 22:03:19 +0000 (22:03 +0000)]
Free MAC label on a POSIX semaphore when the semaphore is freed.

MFC after: 3 days
Submitted by: jhb

16 years agoAdd COMPAT_FREEBSD7 and enable it in configs that have COMPAT_FREEBSD6.
jhb [Mon, 7 Jan 2008 21:40:11 +0000 (21:40 +0000)]
Add COMPAT_FREEBSD7 and enable it in configs that have COMPAT_FREEBSD6.

16 years agoMake ftruncate a 'struct file' operation rather than a vnode operation.
jhb [Mon, 7 Jan 2008 20:05:19 +0000 (20:05 +0000)]
Make ftruncate a 'struct file' operation rather than a vnode operation.
This makes it possible to support ftruncate() on non-vnode file types in
the future.
- 'struct fileops' grows a 'fo_truncate' method to handle an ftruncate() on
  a given file descriptor.
- ftruncate() moves to kern/sys_generic.c and now just fetches a file
  object and invokes fo_truncate().
- The vnode-specific portions of ftruncate() move to vn_truncate() in
  vfs_vnops.c which implements fo_truncate() for vnode file types.
- Non-vnode file types return EINVAL in their fo_truncate() method.

Submitted by: rwatson

16 years agoOnly use sockoptname() to parse socket option names for SOL_SOCKET
jhb [Mon, 7 Jan 2008 18:50:25 +0000 (18:50 +0000)]
Only use sockoptname() to parse socket option names for SOL_SOCKET
requests.

MFC after: 3 days
Reported by: Michiel Boland  michiel boland.org

16 years agog_vfs_close() wants the sx topology lock held while executing, so just
attilio [Mon, 7 Jan 2008 16:51:24 +0000 (16:51 +0000)]
g_vfs_close() wants the sx topology lock held while executing, so just
add correct locking to the operation of unmounting.
This will prevent debugging kernels from panicking if mounting a
non-hpfs partition (I'm not sure if this can be a problem with a
successful mounting operation though).

MFC: 3 days

16 years agoFix typos and date format.
brueffer [Mon, 7 Jan 2008 16:47:30 +0000 (16:47 +0000)]
Fix typos and date format.

16 years agoForced commit to note that the previous commit log should have been:
gabor [Mon, 7 Jan 2008 14:55:20 +0000 (14:55 +0000)]
Forced commit to note that the previous commit log should have been:
- ipmi(4) appeared in FreeBSD 6.2, not in 6.3

16 years ago- ipmi(4) appeared in FreeBSD 6.2, not in 5.3
gabor [Mon, 7 Jan 2008 14:51:17 +0000 (14:51 +0000)]
- ipmi(4) appeared in FreeBSD 6.2, not in 5.3

Submitted by: brix,
Michael Fuckner <michael@fuckner.net>
MFC after: 0 days

16 years agoFix incorrect dependencies of zyd(4).
weongyo [Mon, 7 Jan 2008 11:31:55 +0000 (11:31 +0000)]
Fix incorrect dependencies of zyd(4).

Approved by: thompsa (mentor)

16 years agoTypo; s/relied/replied
schweikh [Mon, 7 Jan 2008 10:31:17 +0000 (10:31 +0000)]
Typo; s/relied/replied

16 years agoAdd support for ICH8M.
des [Mon, 7 Jan 2008 09:46:39 +0000 (09:46 +0000)]
Add support for ICH8M.

PR: kern/119351
Submitted by: Takeharu KATO <takeharu1219@ybb.ne.jp>
MFC after: 1 week

16 years agoAdd the SparkLAN RT2573, found in HP s3200n
kevlo [Mon, 7 Jan 2008 09:14:37 +0000 (09:14 +0000)]
Add the SparkLAN RT2573, found in HP s3200n

Obtained from: OpenBSD

16 years agoAdd a forward compatability hook so that current cvs can recognize future
peter [Mon, 7 Jan 2008 07:47:21 +0000 (07:47 +0000)]
Add a forward compatability hook so that current cvs can recognize future
CVSROOT/config file options that control keyword expansion.   cvs-1.12 has
its own $Id$ expansion controls and they're configured in CVSROOT/config
rather than CVSROOT/options.  The problem is that current cvs-1.11.x
doesn't understand the future keywords.....

Add trivial forward support for the new keywords for when cvs-1.12
hits the tree down the road. CVSROOT/options won't be going away - cvsup
uses it.

16 years agosem_post() requires to return -1 on error.
davidxu [Mon, 7 Jan 2008 02:26:29 +0000 (02:26 +0000)]
sem_post() requires to return -1 on error.

16 years agoFix mvec code to handle the case of the packet zone
kmacy [Mon, 7 Jan 2008 01:18:16 +0000 (01:18 +0000)]
Fix mvec code to handle the case of the packet zone
this was missed in the initial import

16 years agoAdd a missing \n.
cognet [Mon, 7 Jan 2008 00:36:09 +0000 (00:36 +0000)]
Add a missing \n.

16 years agoShrink the size of struct vm_page on amd64 and i386 by eliminating
alc [Sun, 6 Jan 2008 18:51:04 +0000 (18:51 +0000)]
Shrink the size of struct vm_page on amd64 and i386 by eliminating
pv_list_count from struct md_page.  Ever since Peter rewrote the pv
entry allocator for amd64 and i386 pv_list_count has been correctly
maintained but otherwise unused.

16 years agoWhen the ms/req fields exceed 1 second, drop the fractions to fit more digits.
phk [Sun, 6 Jan 2008 12:12:44 +0000 (12:12 +0000)]
When the ms/req fields exceed 1 second, drop the fractions to fit more digits.

This is unfortunately necessary with some flash based devices which can
get hundreds of seconds behind with softupdates enabled.

16 years agomdoc and language fixes for the previous commit, also bump .Dd.
brueffer [Sat, 5 Jan 2008 23:41:15 +0000 (23:41 +0000)]
mdoc and language fixes for the previous commit, also bump .Dd.

16 years agoUse our standard section 4 SYNOPSIS, utilize .Tn and fix capitalization.
brueffer [Sat, 5 Jan 2008 23:27:59 +0000 (23:27 +0000)]
Use our standard section 4 SYNOPSIS, utilize .Tn and fix capitalization.

16 years agoClean up after previous commit (typo fixes, removed contractions,
brueffer [Sat, 5 Jan 2008 23:21:32 +0000 (23:21 +0000)]
Clean up after previous commit (typo fixes, removed contractions,
utilized .Tn and capitalized PCI).

16 years ago"redacted" replaced for clarity.
grog [Sat, 5 Jan 2008 21:39:21 +0000 (21:39 +0000)]
"redacted" replaced for clarity.

16 years agoAfter applying LCONVPATH() to the path, do use the converted path
kib [Sat, 5 Jan 2008 12:36:35 +0000 (12:36 +0000)]
After applying LCONVPATH() to the path, do use the converted path
instead of original user-mode string in the linux_stat() and
linux_lstat() syscalls.

Tested by: Peter Holm
MFC after: 3 days

16 years agoIn sequential_heuristic():
bde [Sat, 5 Jan 2008 08:54:51 +0000 (08:54 +0000)]
In sequential_heuristic():
- spell 16384 as 16384 and not as BKVASIZE.  16384 is (not quite) just a
  magic size that works well in practice.  BKVASIZE should be MAXBSIZE
  (65536), but is 16384 because i386's don't have enough kva for it to
  be MAXBSIZE; 16384 works (not so well) for it for much the same reasons
  that it works well in the heuristic.
- expand and/or add comments about this and other details.
- don't explicitly inline this function.
- fix some other style bugs.

16 years agoFall back to the binary-specified interpreter (ld-elf.so.1) if the
peter [Sat, 5 Jan 2008 08:35:56 +0000 (08:35 +0000)]
Fall back to the binary-specified interpreter (ld-elf.so.1) if the
ABI override binary isn't found.  This could probably be smoother, but
it is what I did in p4 change #126891 on 2007/09/27.  It should solve
the "ld-elf32.so.1"-in-chroot problem.

16 years ago - Restore timeslicing code for all bit SCHED_FIFO priority classes.
jeff [Sat, 5 Jan 2008 04:47:31 +0000 (04:47 +0000)]
 - Restore timeslicing code for all bit SCHED_FIFO priority classes.

Reported by: Peter Jeremy <peterjeremy@optushome.com.au>

16 years ago- This driver will has already appeared in 6.2
gabor [Fri, 4 Jan 2008 12:58:09 +0000 (12:58 +0000)]
- This driver will has already appeared in 6.2

MFC after: 0 days

16 years ago- This driver will first appear in 6.3, not 7.0
gabor [Fri, 4 Jan 2008 12:57:34 +0000 (12:57 +0000)]
- This driver will first appear in 6.3, not 7.0

MFC after: 0 days