Commit Graph

78081 Commits

Author SHA1 Message Date
Yaroslav Tykhiy
8af7c9a3c0 Re-use passive data ports with the SO_REUSEADDR
socket option to avoid exausting the passive port
space by TIME_WAIT'ing connections.

PR:		bin/36955
Submitted by:	Maxim Konovalov <maxim@FreeBSD.org>
MFC after:	2 weeks
2002-07-24 16:11:34 +00:00
Robert Drehmel
adf721d1cb Allow selection of the affected terminal using redirection
of standard input or standard output, like mesg(1) does.

Suggested by:	sheldonh
2002-07-24 15:48:17 +00:00
Robert Watson
eeb9251884 Under #ifdef DIAGNOSTIC, NULL out componentname pointers if we free the
pnbuf to increase the chances of detecting use of a free'd name buffer
if SAVENAME or SAVESTART wasn't passed in.  Curiously, running with these
changes doesn't panic the kernel, and should.
2002-07-24 15:42:22 +00:00
Yaroslav Tykhiy
57d4ef078c Remove the outdated casts to "char *" from the setsockopt(2),
write(2), and getipnodebyaddr(3) calls.  Now all the above functions
accept "void *" in that arguments and have prototypes.  Thus, the
casts are useless under the normal circumstances (and would be harmful
if the functions had no prototypes.)

MFC after:	2 weeks
2002-07-24 15:30:53 +00:00
Bosko Milekic
4151d2e620 Move m_freem() from uipc_mbuf.c to subr_mbuf.c so it can take advantage
of the inlines, like its cousin, m_free().  Also, make a small (first
step?) optimisation of m_free() to use the MBP_PERSIST{,ENT} interface
to hold the lock across frees when possible.  The thing is that right
now, we can only do this easily for at most across one mbuf + one
cluster free, as the comment mentions (it also explains why).  Anyway,
some basic tests revealed a 5-10% overall improvement.  Some of the
results can be found here:
http://people.freebsd.org/~bmilekic/code/measure.txt
2002-07-24 15:11:23 +00:00
Johan Karlsson
688806903a Move whereis(1) relnote to 'userland changes' section.
Approved by: bmah, sheldonh (mentor)
2002-07-24 14:51:24 +00:00
Yaroslav Tykhiy
406d1ae93a Clean up the syslog(3) messages on the setsockopt(2) errors:
o Always check a setsockopt(2) return value
o Use a consistent message format
o Don't abort if the failed setsockopt(2) was actually not vital
o Use LOG_WARNING, not LOG_ERR, in non-fatal cases

MFC after:	1 week
2002-07-24 14:50:17 +00:00
Johan Karlsson
8e4c33e9e7 Teach whereis(1) about games.
Approved by:	joerg, sheldonh (mentor)
2002-07-24 14:35:29 +00:00
Robert Watson
30268a208b Stick a dark comment in about the fact that the NFS server code allocates
a ucred by itself as part of an nfs descriptor, then bzero's the ucred,
fails to initialize the mutex, etc.  This is very bad, but I don't have
time to fix it right now.  nfsd should instead hold a cred pointer,
and the credential should be properly initialized, probably from a
descendent of a kernel process credential.
2002-07-24 14:24:16 +00:00
Mike Barcroft
5f0de71223 Catch up to rev 1.87 of sys/sys/socketvar.h (sb_cc changed from u_long
to u_int).

Noticed by:	sparc64 tinderbox
2002-07-24 14:21:41 +00:00
John Baldwin
a2959ac694 Move sio's ebus attachment to the MI files section so it is compiled in
for any machines that use ebus.
2002-07-24 12:43:27 +00:00
John Baldwin
ba268f0312 Move sio_isa.c back to MD files files due to PC98 brain damage. 2002-07-24 12:35:52 +00:00
Yoshihiro Takahashi
ebe3c68929 MFi386: revision 1.407 (move the em driver entry to MI file) 2002-07-24 12:33:39 +00:00
Marc Fonvieille
d4b7dd491c Remove the word IPSec to respect RFCs (for example
http://www.ietf.org/rfc/rfc2401.txt), IPsec is the right word and
already in the dictionary.

PR:		in part docs/38668
Reviewed by:	murray
MFC after:	10 days
2002-07-24 10:24:52 +00:00
Julian Elischer
205683663f When suspending a thread, update the appropriate (sic) statistic. 2002-07-24 07:29:16 +00:00
Julian Elischer
38038891e9 revert some of the handling of STOP signals in
issignal(). Let thread_suspend_check() actually do the suspension
at the user boundary.

Submitted by:	David Xu <bsddiy@yahoo.com>
2002-07-24 07:23:41 +00:00
John Polstra
f824b5187e Widen struct sockbuf's sb_timeo member to int from short. With
non-default but reasonable values of hz this member overflowed,
breaking NFS over UDP.

Also, as long as I'm plowing up struct sockbuf ... Change certain
members from u_long/long to u_int/int in order to reduce wasted
space on 64-bit machines.  This change was requested by Andrew
Gallatin.

Netstat and systat need to be rebuilt.  I am incrementing
__FreeBSD_version in case any ports need to change.
2002-07-24 03:02:43 +00:00
Luigi Rizzo
be1826c354 Only log things net.inet.ip.fw.verbose is set 2002-07-24 02:41:19 +00:00
Tim J. Robbins
be58cc483e Avoid calling el_resize() from a signal handler, even though libedit
itself does that if you set EL_SIGNAL. Instead, set a flag and check it
before calling el_gets(). This is safer, but slower to respond to changes.

Pointed out by:	mp
2002-07-24 02:06:07 +00:00
Jake Burkholder
11e3f06011 Fix warning. 2002-07-24 01:09:38 +00:00
Alfred Perlstein
b605b54ce3 Attempt to clarify comment in selrecord. 2002-07-24 00:29:22 +00:00
Sebastien Gioria
711d6888df More userland section translation 2002-07-23 20:16:09 +00:00
Dag-Erling Smørgrav
99260419d6 Install more man pages - I thought I'd committed this ages ago... 2002-07-23 17:59:46 +00:00
Dag-Erling Smørgrav
c6b7459669 Whitespace nit. 2002-07-23 17:57:17 +00:00
Bruce A. Mah
8379dedf67 Updated release notes: lint 20020719, smbfs-1.4.5, texinfo 4.2. 2002-07-23 16:00:19 +00:00
Tom Rhodes
a38d3fb35e Revert previous delta for cut(1) and calendar(1) as they were not applied
correctly.  My fault, forgot that -current was checked out.
2002-07-23 15:09:56 +00:00
Tim J. Robbins
9de7305e58 Catch SIGWINCH in interactive shells and call el_resize() to update
libedit's idea of the window size.
2002-07-23 15:05:00 +00:00
Bosko Milekic
dd4ac026f7 Introduce mb_free() to the MBP_PERSIST{,ENT} interface. What this means
is that grouped frees will be done as most often as possible without
dropping the cache lock in between.  So, for the most part, they'll be
done without the lock being dropped.  This is particularly true if you
have something that does a grouped m_getm() or m_getcl() (a cluster and
mbuf at the same time) - most likely getting the buffers from the
same per-CPU cache - and then frees them with m_free{,m}().  Unless
the buffers' underlying buckets were moved, the free will be done without
the lock getting dropped in between.  So far, only m_free() has been
shown how to do this, and m_freem() will shortly follow.

Since I'm here, I also fixed a small (but mostly harmless) type-mismatch
introduced in the last commit.
2002-07-23 14:55:33 +00:00
Alexander Kabaev
61698e0ca1 Fix the sound driver vchan support to work when hw.snd.maxautovchans
has been specified through /boot/loader.conf as opposed to setting it
in /etc/sysctl.conf. Only PCMDIR_PLAY channel can be used as a parent
of virtual channel. Do not initialize a new vchan for a given physical
channel if other physical channel already has one created.

PR:	31597
Approved by:	obrien (mentor)
2002-07-23 14:50:51 +00:00
Juli Mallett
58a8e6d20e Remove duplicate __FBSDID() - spotted by trying to build with a non-GNU
compiler.
2002-07-23 14:39:20 +00:00
Tim J. Robbins
8030ad187e Mention the new bind(1) sh builtin. 2002-07-23 14:38:07 +00:00
Alexander Kabaev
1c4229a6a7 Fix DIOCGMEDIASIZE and DIOCGSECTORSIZE ioctls to work for all
disk devices. This fixes the problem with these ioctls returning
EINVAL for plain slice devices with no disklabel on them.

The patch incorporates improvements and style fixes from BDE.

Reviewed by:	bde
Approved by:	obrien (mentor)
2002-07-23 14:30:27 +00:00
Robert Watson
060c42c3d2 Mention SAVENAME and SAVESTART in the namei(9) operation flag description
since apparently people were missing that you aren't supposed to access
the name buffer following namei() unless you specify one of these flags.

Pointed out by:	green
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-07-23 13:16:36 +00:00
Robert Watson
fd3083e0f8 Update ucred.9 to talk a bit more about correct use of credentials,
including documenting that ucreds must not be pulled out of thin air,
when to use td_cred vs. p_ucred, how to avoid race conditions in
credential updates, and why to use p_ucred when targetting a thread
or process in an access control operation involving two processes.

Reviewed by:	julian, jhb (earlier revision)
2002-07-23 13:09:24 +00:00
Juli Mallett
698f822d6d Turn on emacs line editing mode by default, as this is what most shells do
these days, and the average user expects ^A and arrow keys to work, however
if they know nothing of editing modes, they will think sh(1) just sucks.  It
is likely that because of defaults on most systems and with most shells that
anyone who actually wants vi(1) editing mode will have 'set -o vi'.  This
won't affect existing accounts, this way, of course.  Only accounts with
.shrc from new etc/skel will be affected.  This is much better than making
the change in sh(1).
2002-07-23 12:28:16 +00:00
Tim J. Robbins
ecd807fb6d Call el_source() to read the contents of .editrc when line editing is enabled.
Obtained from:	NetBSD
MFC after:	2 weeks
2002-07-23 12:26:34 +00:00
Daniel C. Sobral
8f32fe91de s/ifdef/ifndef/.
Fenner got this inverted through a misunderstanding between us.
2002-07-23 12:25:34 +00:00
Tim J. Robbins
088acf9001 Add a `bind' builtin command, which is simply a wrapper around libedit's
builtin command of the same name. This allows the key bindings for the
shell's line editor to be changed.

MFC after:	2 weeks
2002-07-23 11:50:53 +00:00
Ruslan Ermilov
95ad74d7cf Dependencies are delimited by space not tab. 2002-07-23 09:15:45 +00:00
Marc Fonvieille
a9b45e7499 s/IPSEC/IPsec according to RFCs
PR:		in part docs/38668
Reviewed by:	charnier
MFC after:	10 days
2002-07-23 08:38:03 +00:00
Peter Wemm
b618108fff de-count pci 2002-07-23 06:38:47 +00:00
Peter Wemm
697fc40af6 de-count pci now that ahc/ahd are taken care of. 2002-07-23 06:36:23 +00:00
Peter Wemm
ec7892680f pci is (finally) no longer a 'count' device. ahc/ahd were the last
holdouts.
2002-07-23 06:33:08 +00:00
Peter Wemm
65c4663d5f Minimal tweak to not depend on NPCI, but still maintain portability
to 4.x which still does need it (since pci_if.h isn't generated without
pci being present)
2002-07-23 06:31:45 +00:00
Eric Melville
4d01a8fb5f Handle directories correctly.
PR:		40801
MFC after:	5 days
2002-07-23 04:54:57 +00:00
Alan Cox
2999e9faca o Lock page queue accesses by vm_page_dontneed().
o Assert that the page queue lock is held in vm_page_dontneed().
2002-07-23 04:39:48 +00:00
Andrew R. Reiter
ef098feafc - Pass the VM_ALLOC_WIRED flag to vm_page_alloc() in pmap_growkernel() so
that we can avoid a call to vm_page_lock_queues().

Approved by:	peter
2002-07-23 04:18:10 +00:00
Alan Cox
8ffc151979 o Extend the scope of the page queues lock in vm_pageout_scan()
to cover the traversal of the cache queue.
2002-07-23 02:42:25 +00:00
Andrew R. Reiter
5d3232048e - Make use of the VM_ALLOC_WIRED flag in the call to vm_page_alloc() in
do_sendfile().  This allows us to rearrange an if statement in order to
  avoid doing an unnecesary call to vm_page_lock_queues(), and an attempt
  at re-wiring the pages (which were wired in the vm_page_alloc() call).

Reviewed by:	alc, jhb
2002-07-23 01:09:34 +00:00
Bill Fenner
c898fd637d Add '+FreeBSD' to the version string, to reflect that this program
bears little relationship to the one from LBL with the same
 name and version number.
2002-07-23 00:56:52 +00:00