Commit Graph

136714 Commits

Author SHA1 Message Date
brueffer
7acb3fd07e Removed a contraction. 2008-01-10 19:11:37 +00:00
jkim
951f756a2b Fix non-SMP kernel regression introduced in the previous commit.
Reviewed by:	jkoshy
2008-01-10 16:31:14 +00:00
rpaulo
8f9a1372cf Disable the check for errata AE18. On MacBooks (1,1 version) there's
no problem with coretemp and C3 state.

Approved by:	njl (mentor)
2008-01-10 16:09:22 +00:00
des
512275f6c4 A real gem from freebsd-current@ 2008-01-10 14:51:24 +00:00
rwatson
5e4b4e0b32 Remove "lock pushdown" todo item in comment -- I did that for 7.0.
MFC after:	3 weeks
2008-01-10 12:38:17 +00:00
rwatson
ffaa005137 Correct typos in comments.
MFC after:	3 weeks
2008-01-10 12:29:12 +00:00
pjd
340995c5fd 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
2008-01-10 08:36:38 +00:00
kmacy
257b751f99 Add support for selectively dumping the state of the hardware response queue.
Change ordering of a couple of types.
2008-01-10 06:54:20 +00:00
kmacy
7f86780195 should always free when refcount is 1 2008-01-10 06:52:48 +00:00
sam
5960f63b76 quiet compiler complaint about unused parameters 2008-01-10 04:28:26 +00:00
sam
575808ccee quiet compiler complaint about comparing &v against NULL 2008-01-10 04:26:44 +00:00
edwin
b94bb54417 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@
2008-01-10 01:25:40 +00:00
attilio
1e9737002a Bump FreeBSD_version in order to reflect vn_lock() prototype changes. 2008-01-10 01:25:23 +00:00
attilio
73bfa7b891 Update vn_lock() prototype accordingly with the 'thread' argument removal. 2008-01-10 01:23:59 +00:00
attilio
18d0a0dd51 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>
2008-01-10 01:10:58 +00:00
edwin
8df9c26bfd 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@
2008-01-10 01:10:31 +00:00
kmacy
7e708f7f6f - 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
2008-01-10 00:55:42 +00:00
rwatson
a61926cd92 Refine textdump comments slightly.
MFC after:	3 months
2008-01-10 00:26:47 +00:00
scottl
96b8215ee4 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
2008-01-09 20:02:56 +00:00
obrien
2678039b69 Improve -u (limit uid lookups) behavior.
Submitted by:	David Frascone <dave@frascone.com>
PR:		119490
2008-01-09 18:06:24 +00:00
obrien
915a8d4b13 This commit was generated by cvs2svn to compensate for changes in r175189,
which included commits to RCS files with non-trunk default branches.
2008-01-09 16:46:14 +00:00
obrien
4bf470afc0 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
2008-01-09 16:46:14 +00:00
bde
2d90a44ac6 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).
2008-01-09 15:03:03 +00:00
bde
35b2cbed50 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).
2008-01-09 13:35:31 +00:00
bde
b52cfc10cb Improve some comments. 2008-01-09 10:42:47 +00:00
ru
afa00fb3e4 Revise the TECHNICAL DETAILS section.
Reviewed by:	skv
2008-01-09 09:38:53 +00:00
kmacy
090825944b make nqsets a uint32_t so that sysctl will work
add 2 fields for allowing queue dumping
2008-01-09 08:12:24 +00:00
brueffer
bf42a73d64 Fix typos. 2008-01-09 08:08:56 +00:00
kmacy
a0152fef95 don't decrement ref count below 1 for EXT_PACKET 2008-01-09 08:01:42 +00:00
kmacy
513b32a117 EXT_PACKET is one of the valid mbuf types 2008-01-09 08:01:08 +00:00
kmacy
2d4fcb7dc7 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.
2008-01-09 06:29:49 +00:00
attilio
bb203b2edf Add lockmgr_disown() and relative explanation. 2008-01-09 02:10:32 +00:00
attilio
f0eca36d0b Bump FreeBSD_version in order to reflect lockmgr_disown() function
introduction.
2008-01-09 00:03:50 +00:00
attilio
c3923db2c0 Fix a last second typo about recent lockmgr_disown() introduction. 2008-01-09 00:02:43 +00:00
attilio
9e182da191 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.
2008-01-08 23:48:31 +00:00
jhb
1975c09543 Regen for shm_open(2) and shm_unlink(2). 2008-01-08 22:01:26 +00:00
jhb
8cd9437636 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())
2008-01-08 21:58:16 +00:00
emaste
23d78439c9 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@.
2008-01-08 21:10:13 +00:00
obrien
7eb385c2d8 un-__P() 2008-01-08 19:08:58 +00:00
rafan
93c568d8f7 - 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
2008-01-08 16:00:24 +00:00
gabor
2d1a3da064 - This driver will first appear in FreeBSD 6.3, not 7.0
Submitted by:	thompsa
MFC after:	0 days
2008-01-08 15:36:06 +00:00
csjp
856850f578 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
2008-01-08 14:58:41 +00:00
harti
60c8b505d8 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
2008-01-08 12:55:56 +00:00
alc
7915a2d351 Convert a PMAP_DIAGNOSTIC to a KASSERT. 2008-01-08 08:30:30 +00:00
des
2f455753ea 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.
2008-01-08 08:00:06 +00:00
dds
1484f84905 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
2008-01-08 07:22:43 +00:00
jhb
c9a8a65b69 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
2008-01-08 04:53:28 +00:00
jhb
77e5cd5541 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)
2008-01-08 04:45:24 +00:00
kris
0b7e3f244a Fix logic in skipcount handling (used to sample every 1/N lock operations
to reduce profiling overhead)
2008-01-08 01:11:40 +00:00
rwatson
d08bce9f30 Free MAC label on a POSIX semaphore when the semaphore is freed.
MFC after:	3 days
Submitted by:	jhb
2008-01-07 22:03:19 +00:00