]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
23 years agoAdd SKI_ROOT_FILESYSTEM option.
dfr [Fri, 9 Mar 2001 13:46:03 +0000 (13:46 +0000)]
Add SKI_ROOT_FILESYSTEM option.

23 years agoAllow the config file to specify a root filesystem filename.
dfr [Fri, 9 Mar 2001 13:45:31 +0000 (13:45 +0000)]
Allow the config file to specify a root filesystem filename.

23 years agoAdjust a comment slightly.
dfr [Fri, 9 Mar 2001 13:44:53 +0000 (13:44 +0000)]
Adjust a comment slightly.

23 years agoAdd new option -m which allows the user to set IP TTL.
ru [Fri, 9 Mar 2001 13:20:23 +0000 (13:20 +0000)]
Add new option -m which allows the user to set IP TTL.

23 years agobye-bye documented raw devices
obrien [Fri, 9 Mar 2001 13:06:53 +0000 (13:06 +0000)]
bye-bye documented raw devices

23 years agobye-bye documented raw device
obrien [Fri, 9 Mar 2001 13:06:09 +0000 (13:06 +0000)]
bye-bye documented raw device

23 years agoRemove tunefs'ing that was OBE by rev 1.30.
obrien [Fri, 9 Mar 2001 12:33:53 +0000 (12:33 +0000)]
Remove tunefs'ing that was OBE by rev 1.30.

Submitted by: bde

23 years agoWarner gave a nice followup in email, and I thought it would be nice to
obrien [Fri, 9 Mar 2001 12:29:08 +0000 (12:29 +0000)]
Warner gave a nice followup in email, and I thought it would be nice to
get it in the CVS logs.  This pertains to rev 1.30 (and the MFC of it):

  Space optimization forces the kernel to always use fragments to store
  parts of file, rather than using an entire block when less than an
  entire block has been written.  This forces files to be as small as
  they can be at the minor cost of time to do all the fussy stuff.  The
  cpio image that we put on the disk was so close to filling the disk
  exactly that this minor minor difference made a big difference.  The
  system changed things to time optmization on the first write.  When
  the end of file was hit, it tried to allocate a full block (4k), but
  there was only 3k left on the disk (since you get only 1407 blocks on
  a 1.44 floppy) so it failed.  So this change nails the space
  optmiziation in place for the whole operation.

23 years agoMake it possible to use IP_TTL and IP_TOS setsockopt(2) options
ru [Fri, 9 Mar 2001 12:22:51 +0000 (12:22 +0000)]
Make it possible to use IP_TTL and IP_TOS setsockopt(2) options
on certain types of SOCK_RAW sockets.  Also, use the ip.ttl MIB
variable instead of MAXTTL constant as the default time-to-live
value for outgoing IP packets all over the place, as we already
do this for TCP and UDP.

Reviewed by: wollman

23 years agoDefine KINFO_PROC_SIZE for ia64.
dfr [Fri, 9 Mar 2001 11:34:29 +0000 (11:34 +0000)]
Define KINFO_PROC_SIZE for ia64.

23 years agoThis is the getsid() we are talking about, not setsid().
ru [Fri, 9 Mar 2001 11:16:09 +0000 (11:16 +0000)]
This is the getsid() we are talking about, not setsid().

PR: docs/25626
Submitted by: Yoshihiko Sarumaru <mistral@imasy.or.jp>

23 years agomdoc(7) police revision 1.15:
ru [Fri, 9 Mar 2001 11:02:01 +0000 (11:02 +0000)]
mdoc(7) police revision 1.15:

- replaced Oo/Oc enclosures with Op;
- removed hard sentence breaks;
- removed doubled space.

23 years agoPush the test for a disconnected socket when accept()ing down to the
jlemon [Fri, 9 Mar 2001 08:16:40 +0000 (08:16 +0000)]
Push the test for a disconnected socket when accept()ing down to the
protocol layer.  Not all protocols behave identically.  This fixes the
brokenness observed with unix-domain sockets (and postfix)

23 years agoThe TCP sequence number used for sending a RST with the ipfw reset rule
jlemon [Fri, 9 Mar 2001 08:13:08 +0000 (08:13 +0000)]
The TCP sequence number used for sending a RST with the ipfw reset rule
is already in host byte order, so do not swap it again.

Reviewed by: bfumerola

23 years agoFix mtx_legal2block. The only time that it is bad to block on a mutex is
jhb [Fri, 9 Mar 2001 07:24:17 +0000 (07:24 +0000)]
Fix mtx_legal2block.  The only time that it is bad to block on a mutex is
if we hold a spin mutex, since we can trivially get into deadlocks if we
start switching out of processes that hold spinlocks.  Checking to see if
interrupts were disabled was a sort of cheap way of doing this since most
of the time interrupts were only disabled when holding a spin lock.  At
least on the i386.  To fix this properly, use a per-process counter
p_spinlocks that counts the number of spin locks currently held, and
instead of checking to see if interrupts are disabled in the witness code,
check to see if we hold any spin locks.  Since child processes always
start up with the sched lock magically held in fork_exit(), we initialize
p_spinlocks to 1 for child processes.  Note that proc0 doesn't go through
fork_exit(), so it starts with no spin locks held.

Consulting from: cp

23 years agoUse the kthread API to create and destroy AIO daemons.
alc [Fri, 9 Mar 2001 06:27:01 +0000 (06:27 +0000)]
Use the kthread API to create and destroy AIO daemons.

Submitted by: jhb

23 years agoAdd a new informative KASSERT to ensure that a process is in the SRUN state
jhb [Fri, 9 Mar 2001 03:59:50 +0000 (03:59 +0000)]
Add a new informative KASSERT to ensure that a process is in the SRUN state
before we return it to cpu_switch().

23 years agoDocument how to compile KTR into the kernel, tweak its behavior, and
jhb [Fri, 9 Mar 2001 03:43:18 +0000 (03:43 +0000)]
Document how to compile KTR into the kernel, tweak its behavior, and
examine the event logs in ddb(4).

23 years agoDocument the ithread_* API used to manage interrupt threads and their
jhb [Fri, 9 Mar 2001 03:30:20 +0000 (03:30 +0000)]
Document the ithread_* API used to manage interrupt threads and their
list of handlers.

23 years agoAdd 2001 to copyright.
jhb [Fri, 9 Mar 2001 03:17:18 +0000 (03:17 +0000)]
Add 2001 to copyright.

23 years agoThe new version of the daylight time saving support. This time it works
babkin [Fri, 9 Mar 2001 03:14:09 +0000 (03:14 +0000)]
The new version of the daylight time saving support. This time it works
for any change of the time zone offset from GMT. To enable use the
option -s.

23 years ago- Add 2001 to copyright.
jhb [Fri, 9 Mar 2001 03:09:30 +0000 (03:09 +0000)]
- Add 2001 to copyright.
- Kthread functions return an error status, they don't set errno to an
  error status.
- Remove the BUGS section as all the bugs listed have been fixed now.

23 years agoThe 'gdb' command works on the alpha as well as the i386.
jhb [Fri, 9 Mar 2001 03:07:53 +0000 (03:07 +0000)]
The 'gdb' command works on the alpha as well as the i386.

23 years agonewfs with `-m 1'
obrien [Fri, 9 Mar 2001 01:03:15 +0000 (01:03 +0000)]
newfs with `-m 1'

This is needed even with `-o space' as the kernel decides to be "helpful"
and not really do space optimization.  Looking at src/sys/ufs/ffs/ffs_alloc.c
we see why: if (fs->fs_minfree <= 5 ||
            fs->fs_cstotal.cs_nffree >
            (off_t)fs->fs_dsize * fs->fs_minfree / (2 * 100))
            break;
            log(LOG_NOTICE, "%s: optimization changed from SPACE to TIME\n"

I have picked `1' vs. `0' just incase some code somewhere has the assumption
the %free can never be `0'.

Helped with understanding why -m 1 made a different: imp

23 years agoStick the I-O DATA PCLA/TE PC Card adapter entry in the right sort order.
sanpei [Fri, 9 Mar 2001 00:30:48 +0000 (00:30 +0000)]
Stick the I-O DATA PCLA/TE PC Card adapter entry in the right sort order.

23 years agoTalk a little more about the differences between PPPoE on FreeBSD & OpenBSD.
brian [Fri, 9 Mar 2001 00:12:09 +0000 (00:12 +0000)]
Talk a little more about the differences between PPPoE on FreeBSD & OpenBSD.

23 years agoMAXPATHLEN -> PATH_MAX
brian [Thu, 8 Mar 2001 23:51:50 +0000 (23:51 +0000)]
MAXPATHLEN -> PATH_MAX
Don't assume MAXHOSTNAMELEN includes the NUL
Correct a diagnostic
Use "localhost" in our prompt instead of ""

23 years agoFix potential crash caused by packets with bogus ACK's.
archie [Thu, 8 Mar 2001 20:10:02 +0000 (20:10 +0000)]
Fix potential crash caused by packets with bogus ACK's.

Reported by: Fabien THOMAS <fabient@netasq.com>

23 years agoFix is a similar race condition as existed in the mbuf code. When we go
bmilekic [Thu, 8 Mar 2001 19:21:45 +0000 (19:21 +0000)]
Fix is a similar race condition as existed in the mbuf code. When we go
into an interruptable sleep and we increment a sleep count, we make sure
that we are the thread that will decrement the count when we wakeup.
Otherwise, what happens is that if we get interrupted (signal) and we
have to wake up, but before we get our mutex, some thread that wants
to wake us up detects that the count is non-zero and so enters wakeup_one(),
but there's nothing on the sleep queue and so we don't get woken up. The
thread will still decrement the sleep count, which is bad because we will
also decrement it again later (as we got interrupted) and are already off
the sleep queue.

23 years agoIt was possible for ip_forward() to supply to icmp_error()
iedowse [Thu, 8 Mar 2001 19:03:26 +0000 (19:03 +0000)]
It was possible for ip_forward() to supply to icmp_error()
an IP header with ip_len in network byte order. For certain
values of ip_len, this could cause icmp_error() to write
beyond the end of an mbuf, causing mbuf free-list corruption.
This problem was observed during generation of ICMP redirects.

We now make quite sure that the copy of the IP header kept
for icmp_error() is stored in a non-shared mbuf header so
that it will not be modified by ip_output().

Also:
- Calculate the correct number of bytes that need to be
  retained for icmp_error(), instead of assuming that 64
  is enough (it's not).
- In icmp_error(), use m_copydata instead of bcopy() to
  copy from the supplied mbuf chain, in case the first 8
  bytes of IP payload are not stored directly after the IP
  header.
- Sanity-check ip_len in icmp_error(), and panic if it is
  less than sizeof(struct ip). Incoming packets with bad
  ip_len values are discarded in ip_input(), so this should
  only be triggered by bugs in the code, not by bad packets.

This patch results from code and suggestions from Ruslan, Bosko,
Jonathan Lemon and Matt Dillon, with important testing by Mike
Tancsa, who could reproduce this problem at will.

Reported by: Mike Tancsa <mike@sentex.net>
Reviewed by: ru, bmilekic, jlemon, dillon

23 years agoMake the wait for sendfile buffers interruptable. Stops one process
dwmalone [Thu, 8 Mar 2001 16:28:10 +0000 (16:28 +0000)]
Make the wait for sendfile buffers interruptable. Stops one process
consuming them all and then getting stuck.

Reviewed by: dg
Reviewed by: bmilekic
Observed by: Andreas Persson <pap@garen.net>

23 years agoTake the KINFO_PROC_SIZE back down to 912 on alpha.
gallatin [Thu, 8 Mar 2001 15:17:38 +0000 (15:17 +0000)]
Take the KINFO_PROC_SIZE back down to 912 on alpha.

Since the compiler lays out the stuct so that pointers are naturally
(8-byte) aligned aligned, adding the int ki_layout didn't change the size of
the stuct; it just converted the alignment padding to a usable struct
field.

23 years agoReplaced p (undeclared) with curproc (after i386/isa/npx.c).
kato [Thu, 8 Mar 2001 14:25:51 +0000 (14:25 +0000)]
Replaced p (undeclared) with curproc (after i386/isa/npx.c).

23 years agoSubmitted by: Ian Dowse <iedowse@maths.tcd.ie>, David Cross <dec@freebsd.org>
dec [Thu, 8 Mar 2001 13:57:41 +0000 (13:57 +0000)]
Submitted by: Ian Dowse <iedowse@maths.tcd.ie>, David Cross <dec@freebsd.org>
Reviewed by: David Cross <dec@freebsd.org>, jkh <jkh@freebsd.org>
Approved by: jkh <jkh@freebsd.org>
Obtained from: Ian Dowse <iedowse@maths.tcd.ie>, David Cross <dec@freebsd.org>
We have been running this patch on a production NIS server for 2.5 weeks now.
Normally we would have ypserv die at least once a week, and often many times
a day.

This patch treats and error from select as zeroing out the FD_SET to indicate
that no fds are ready for reading.  This is safe because the rpc code
always re-inits the FDSET before calling select.

23 years agoFix a paste-o which introduced a syntax error.
jkh [Thu, 8 Mar 2001 10:41:40 +0000 (10:41 +0000)]
Fix a paste-o which introduced a syntax error.

23 years agoTUNSIFINFO now requires uid 0 to change the interface MTU.
brian [Thu, 8 Mar 2001 10:33:30 +0000 (10:33 +0000)]
TUNSIFINFO now requires uid 0 to change the interface MTU.

Reviewed by: Mark Knight <markk@knigma.org>

23 years agoFix some of the security profile messages to be more explanatory
jkh [Thu, 8 Mar 2001 10:16:56 +0000 (10:16 +0000)]
Fix some of the security profile messages to be more explanatory
and also obey most of the rules of english in their construction.

Add a help screen for the security menu which gives the user a rough idea
just what the various security profiles do.

23 years agoMove _PATH_DEFTAPE to <paths.h> to remove all the duplication of definitons,
obrien [Thu, 8 Mar 2001 09:04:40 +0000 (09:04 +0000)]
Move _PATH_DEFTAPE to <paths.h> to remove all the duplication of definitons,
and remove leading `r'(aw) from it.

23 years agoMFS: Belatedly bump SHLIB_MAJOR corresponding to OpenSSL 0.9.6
kris [Thu, 8 Mar 2001 07:57:49 +0000 (07:57 +0000)]
MFS: Belatedly bump SHLIB_MAJOR corresponding to OpenSSL 0.9.6

23 years agoChange check_sign to proper "pkg_sign" reference.
jkh [Thu, 8 Mar 2001 02:26:33 +0000 (02:26 +0000)]
Change check_sign to proper "pkg_sign" reference.

Noted by: Andrew Hesford <ajh3@chmod.ath.cx>

23 years agozeropad mac address ouput
billf [Thu, 8 Mar 2001 01:52:49 +0000 (01:52 +0000)]
zeropad mac address ouput

PR: bin/25584
Submitted by: David Xu <davidx@viasoft.com.cn>
Reviewed by: wollman, billf

23 years agoMove configuration of work_memory to oltr_init() rather than
mdodd [Thu, 8 Mar 2001 01:38:58 +0000 (01:38 +0000)]
Move configuration of work_memory to oltr_init() rather than
oltr_pci_attach().  This only affects the OC-3139 and OC-3540.

MFC candidate.

PR: kern/24074

23 years agoMake the SYSCTL_OUT handlers sysctl_old_user() and sysctl_old_kernel()
tmm [Thu, 8 Mar 2001 01:20:43 +0000 (01:20 +0000)]
Make the SYSCTL_OUT handlers sysctl_old_user() and sysctl_old_kernel()
more robust. They would correctly return ENOMEM for the first time when
the buffer was exhausted, but subsequent calls in this case could cause
writes ouside of the buffer bounds.

Approved by: rwatson

23 years agoFix two bugs in null suffix handling. Both occured only after the suffix
tmm [Thu, 8 Mar 2001 00:55:08 +0000 (00:55 +0000)]
Fix two bugs in null suffix handling. Both occured only after the suffix
list was cleared.
Rules with null suffixes would not be rebuilt when the suffixes were
added again.
Adding null suffix rules would fail when a rule for the same source was
declared before the suffix list was cleared.

PR: 23328, 24102
Reviewed by: will
Approved by: rwatson

23 years agoRemember to actually program the MAC address into the unicast filter
wpaul [Wed, 7 Mar 2001 18:52:22 +0000 (18:52 +0000)]
Remember to actually program the MAC address into the unicast filter
in vr_init(). The VIA Rhine chip happens to be able to automatically
read its station address from the EEPROM automatically when reset,
so you don't need to program the filter if you want to keep using the
factory default address, but if you want to change it with "ifconfig vr0
ether xx:xx:xx:xx:xx:xx" then we need to manually set it in the init
routine.

23 years agoBring our local hack for wakeup back from
iwasaki [Wed, 7 Mar 2001 15:22:14 +0000 (15:22 +0000)]
Bring our local hack for wakeup back from
sys/contrib/dev/acpica/Subsystem/Hardware/Attic/hwxface.c to the proper
location after AcpiEnterSleepState().

 - Wait for the WAK_STS bit
 - Evaluate the _WAK method and check result code

23 years agoAdd GVC1601 - Rockwell V.34 Plug & Play Modem
sanpei [Wed, 7 Mar 2001 14:27:56 +0000 (14:27 +0000)]
Add GVC1601 - Rockwell V.34 Plug & Play Modem

PR: kern/25204
Submitted by: Victor Ivanov <v0rbiz@icon.bg>

23 years agoAdd IOD0081 - I-O DATA DEVICE,INC. IFML-560
sanpei [Wed, 7 Mar 2001 14:19:55 +0000 (14:19 +0000)]
Add IOD0081 - I-O DATA DEVICE,INC. IFML-560

PR: kern/25173
Submitted by: Yohsuke Fujikawa <yohsuke@mx2.nisiq.net>

23 years agoadd PC-Card entry
sanpei [Wed, 7 Mar 2001 13:30:44 +0000 (13:30 +0000)]
add PC-Card entry
Corega KK Wireless LAN PCCA-11
NEC WL11C (PC-WL/11C)
NEC Corporation PK-WL001

Submitted by: [bsd-nomads:15128] [bsd-nomads:15159]
[bsd-nomads:15176] [bsd-nomads:15283]
YAMAMOTO Shigeru <shigeru@iij.ad.jp>
NAKAGAWA Yoshihisa <y-nakaga@nwsl.mesh.ad.jp>

23 years agoadd PC-Card entry, Panasonic Flash ATA BN-040ABP3
sanpei [Wed, 7 Mar 2001 13:23:08 +0000 (13:23 +0000)]
add PC-Card entry, Panasonic Flash ATA BN-040ABP3

pccardd[358]: Card "Panasonic"("ATA") [BN-040AB-M   1.00        ] [(null)]
              matched "Panasonic" ("ATA") [BN-040AB-M ] [(null)]
ata2 at port 0x240-0x24f irq 10 slot 0 on pccard0
ad4: 39MB <BN-040AB-M 1.00                         >
[625/8/16] at ata2-master BIOSPIO

Submitted by: [bsd-nomads:15261]
<m-kawata@cd.jp.nec.com>

23 years agoMFS: update HISTORY, synch dates.
ru [Wed, 7 Mar 2001 12:52:53 +0000 (12:52 +0000)]
MFS: update HISTORY, synch dates.

23 years agoProperly detach at startup. We could be passing revoked fd's to
peter [Wed, 7 Mar 2001 10:38:46 +0000 (10:38 +0000)]
Properly detach at startup.  We could be passing revoked fd's to
child processes or starting children with no fd 0 (stdin) at all etc.
This is currently breaking on hub.freebsd.org.

23 years agoGoodbye vn, welcome md.
dcs [Wed, 7 Mar 2001 09:42:41 +0000 (09:42 +0000)]
Goodbye vn, welcome md.

23 years agoReplace custom type of comments here too.
ru [Wed, 7 Mar 2001 09:26:18 +0000 (09:26 +0000)]
Replace custom type of comments here too.

23 years agoreplace the custom type of comments (``'\"'') with the standard one (``.\" '').
dmlb [Wed, 7 Mar 2001 09:17:26 +0000 (09:17 +0000)]
replace the custom type of comments (``'\"'') with the standard one (``.\" '').
remove the duplicate $FreeBSD$ tag.

Submitted by: ru

23 years agoSet si_iosize_max to 64K, even though the adapter seems to be able to do more.
scottl [Wed, 7 Mar 2001 08:37:49 +0000 (08:37 +0000)]
Set si_iosize_max to 64K, even though the adapter seems to be able to do more.
This puts us safely in line with Adaptec documentation and shouldn't really
affect anything.

MFC candidate for 4.3

23 years agoUpdate woith latest chipsets and options
sos [Wed, 7 Mar 2001 08:12:24 +0000 (08:12 +0000)]
Update woith latest chipsets and options

23 years agoSet NO_X during release build so the doc ports don't try to build XFree86.
jkh [Wed, 7 Mar 2001 07:39:32 +0000 (07:39 +0000)]
Set NO_X during release build so the doc ports don't try to build XFree86.

23 years agoFixes to track snapshot copy-on-write checking in the specinfo
mckusick [Wed, 7 Mar 2001 07:09:55 +0000 (07:09 +0000)]
Fixes to track snapshot copy-on-write checking in the specinfo
structure rather than assuming that the device vnode would reside
in the FFS filesystem (which is obviously a broken assumption with
the device filesystem).

23 years agoBitch more loudly when someone botches changes to kinfo_proc
mckusick [Wed, 7 Mar 2001 06:52:12 +0000 (06:52 +0000)]
Bitch more loudly when someone botches changes to kinfo_proc
in the hopes that they will actually *read* the comment above
it and *follow* the instructions so as to cause all the rest
of us less a lot less grief.

23 years agoApply i386 fix in 1.32 for the alpha too.
mckusick [Wed, 7 Mar 2001 06:48:41 +0000 (06:48 +0000)]
Apply i386 fix in 1.32 for the alpha too.

23 years agoIf SIGINFO is received during the transfer, print a status line similar
des [Wed, 7 Mar 2001 05:33:50 +0000 (05:33 +0000)]
If SIGINFO is received during the transfer, print a status line similar
to the summary shown at the end of the transfer.

Some days, I really hate Unix...

Suggested by: cracauer

23 years agoUnrevert the pmap_map() changes. They weren't broken on x86.
jhb [Wed, 7 Mar 2001 05:29:21 +0000 (05:29 +0000)]
Unrevert the pmap_map() changes.  They weren't broken on x86.

Sense beaten into me by: peter

23 years ago- Don't hold the proc lock across VREF and the fd* functions to avoid lock
jhb [Wed, 7 Mar 2001 05:21:47 +0000 (05:21 +0000)]
- Don't hold the proc lock across VREF and the fd* functions to avoid lock
  order reversals.
- Add some preliminary locking in the !RF_PROC case.
- Protect p_estcpu with sched_lock.

23 years agoDon't remember an EINTR, since the caller may want to restart the call.
des [Wed, 7 Mar 2001 05:12:14 +0000 (05:12 +0000)]
Don't remember an EINTR, since the caller may want to restart the call.

23 years agoSpelling and capitalization fixes.
gsutter [Wed, 7 Mar 2001 04:58:38 +0000 (04:58 +0000)]
Spelling and capitalization fixes.

Reviewed by: gshapiro, jake, jhb, rwatson (all within 30 seconds)

23 years agoSupport lower-case versions of the proxy environment variables.
des [Wed, 7 Mar 2001 04:45:55 +0000 (04:45 +0000)]
Support lower-case versions of the proxy environment variables.

PR: bin/25494

23 years ago- Release Giant a bit earlier on syscall exit.
jhb [Wed, 7 Mar 2001 03:53:39 +0000 (03:53 +0000)]
- Release Giant a bit earlier on syscall exit.
- Don't try to grab Giant before postsig() in userret() as it is no longer
  needed.
- Don't grab Giant before psignal() in ast() but get the proc lock instead.

23 years ago- Lock the process while sending it a signal.
jhb [Wed, 7 Mar 2001 03:42:42 +0000 (03:42 +0000)]
- Lock the process while sending it a signal.
- Attempt to define empty PROC_LOCK/UNLOCK when needed to help keep
  this driver portable.

23 years agoGrab the process lock while calling psignal and before calling psignal.
jhb [Wed, 7 Mar 2001 03:37:06 +0000 (03:37 +0000)]
Grab the process lock while calling psignal and before calling psignal.

23 years agoProtect SIGDELSET of p_siglist with the proc lock.
jhb [Wed, 7 Mar 2001 03:34:55 +0000 (03:34 +0000)]
Protect SIGDELSET of p_siglist with the proc lock.

23 years agoProc locking including using proc lock in place of proctree where
jhb [Wed, 7 Mar 2001 03:28:50 +0000 (03:28 +0000)]
Proc locking including using proc lock in place of proctree where
appropriate and locking processes while we signal them.

23 years agoProc locking.
jhb [Wed, 7 Mar 2001 03:27:32 +0000 (03:27 +0000)]
Proc locking.

23 years agoUse the proc lock to protect access to p_sigacts->ps_sigintr.
jhb [Wed, 7 Mar 2001 03:26:39 +0000 (03:26 +0000)]
Use the proc lock to protect access to p_sigacts->ps_sigintr.

23 years agoFix a formatting bug (MFC candidate)
des [Wed, 7 Mar 2001 03:22:11 +0000 (03:22 +0000)]
Fix a formatting bug (MFC candidate)

23 years agoJust hold the proc lock while getting the parent's PID rather than a
jhb [Wed, 7 Mar 2001 03:21:26 +0000 (03:21 +0000)]
Just hold the proc lock while getting the parent's PID rather than a
proctree lock.

23 years agoUse the proc lock to protect p_pptr when waking up our parent in cpu_exit()
jhb [Wed, 7 Mar 2001 03:20:15 +0000 (03:20 +0000)]
Use the proc lock to protect p_pptr when waking up our parent in cpu_exit()
and remove the mpfixme() message that is now fixed.

23 years agoJust use proc lock to protect reading of p_pptr rather than a proctree
jhb [Wed, 7 Mar 2001 03:18:36 +0000 (03:18 +0000)]
Just use proc lock to protect reading of p_pptr rather than a proctree
lock.

23 years agoProc locking identical to that of linprocfs' vnops except that we hold the
jhb [Wed, 7 Mar 2001 03:15:05 +0000 (03:15 +0000)]
Proc locking identical to that of linprocfs' vnops except that we hold the
proc lock while calling psignal.

23 years agoProtect read to p_pptr with proc lock rather than proctree lock.
jhb [Wed, 7 Mar 2001 03:10:20 +0000 (03:10 +0000)]
Protect read to p_pptr with proc lock rather than proctree lock.

23 years agoProc locking. Lock around psignal() and also ensure both an exclusive
jhb [Wed, 7 Mar 2001 03:09:40 +0000 (03:09 +0000)]
Proc locking.  Lock around psignal() and also ensure both an exclusive
proctree lock and the process lock are held when updating p_pptr and
p_oppid.  When we are just reaading p_pptr we only need the proc lock and
not a proctree lock as well.

23 years ago- Proc locking.
jhb [Wed, 7 Mar 2001 03:06:18 +0000 (03:06 +0000)]
- Proc locking.
- Remove some unneeded spl()'s.

23 years agoLock the process while sending it SIGARLM and updating p_realtimer.
jhb [Wed, 7 Mar 2001 03:02:56 +0000 (03:02 +0000)]
Lock the process while sending it SIGARLM and updating p_realtimer.

23 years ago- Proc locking.
jhb [Wed, 7 Mar 2001 03:01:53 +0000 (03:01 +0000)]
- Proc locking.
- Remove unneeded spl()'s.

23 years ago- Proc locking. Most of signal handling is now MP safe and doesn't require
jhb [Wed, 7 Mar 2001 02:59:54 +0000 (02:59 +0000)]
- Proc locking.  Most of signal handling is now MP safe and doesn't require
  Giant.  The only exception is the CANSIGNAL() macro.  Unlocking the proc
  lock around sendsig() in trapsignal() is also questionable.  Note that
  the functions sigexit(), psignal(), and issignal() must be called with
  the proc lock of the process in question held.  postsig() and
  trapsignal() should not be called with the proc lock held, but they
  also do not require Giant anymore either.
- Remove spl's that are now no longer needed as they are fully replaced.

23 years agoLock initproc when we send SIGINT to init during shutdown.
jhb [Wed, 7 Mar 2001 02:50:09 +0000 (02:50 +0000)]
Lock initproc when we send SIGINT to init during shutdown.

23 years ago- Add an extra check in priority_propagation() for UP systems to ensure we
jhb [Wed, 7 Mar 2001 02:45:15 +0000 (02:45 +0000)]
- Add an extra check in priority_propagation() for UP systems to ensure we
  don't end up back at ourselves which would indicate deadlock.
- Add the proc lock to the witness dup_list as we may hold more than one
  process lock at a time.
- Don't assert a mutex is owned in _mtx_unlock_sleep() as that is too late.
  We do the checks in the macros instead.

23 years ago- Use _PHOLD and move it before a PROC_UNLOCK to reduce the number of
jhb [Wed, 7 Mar 2001 02:36:47 +0000 (02:36 +0000)]
- Use _PHOLD and move it before a PROC_UNLOCK to reduce the number of
  mutex operations in kthread_create().
- Lock a kthread's proc before changing its parent via proc_reparent().
- Test P_KTHREAD not P_SYSTEM in kthread_suspend() and kthread_resume().
  P_SYSTEM just means that the process shouldn't be swapped and is used
  for vinum's daemon for example.
- Lock all the signal state used for suspending and resuming kthreads with
  the proc lock.

23 years ago- Lock the forklist with an sx lock.
jhb [Wed, 7 Mar 2001 02:30:39 +0000 (02:30 +0000)]
- Lock the forklist with an sx lock.
- Add proc locking to fork1().  Always lock the child procoess (new
  process) first when both processes need to be locked at the same
  time.
- Remove unneeded spl()'s as the data they protected is now locked.
- Ensure that the proctree is exclusively locked and the new process is
  locked when setting up the parent process pointer.
- Lock the check for P_KTHREAD in p_flag in fork_exit().

23 years agoCheck to see if p_fd is NULL before derferencing it in checkdirs(). It's
jhb [Wed, 7 Mar 2001 02:25:13 +0000 (02:25 +0000)]
Check to see if p_fd is NULL before derferencing it in checkdirs().  It's
possible for us to see a process in the early stages of fork before p_fd
has been initialized.  Ideally, we wouldn't stick a process on the allproc
list until it was fully created however.

23 years ago- Call proc_reparent() when handing a process off to init in exit rather
jhb [Wed, 7 Mar 2001 02:22:31 +0000 (02:22 +0000)]
- Call proc_reparent() when handing a process off to init in exit rather
  than dinking around in the process lists explicitly.
- Hold both the proctree lock and proc lock of the child process when
  reparenting a process via proc_reparent.
- Lock processes while sending them signals.
- Miscellaenous proc locking.
- proc_reparent() now asserts that the child is locked in addition to an
  exclusive proctree lock.

23 years ago- Hold both an exclusive proctree lock and the proc lock when reparenting
jhb [Wed, 7 Mar 2001 02:17:43 +0000 (02:17 +0000)]
- Hold both an exclusive proctree lock and the proc lock when reparenting
  a traced process during exit.
- Lock the parent process while sending it SIGCHLD.

23 years agoProtect p_flag with the proc lock.
jhb [Wed, 7 Mar 2001 02:07:56 +0000 (02:07 +0000)]
Protect p_flag with the proc lock.

23 years ago- Include <sys/systm.h> for KASSERT().
jhb [Wed, 7 Mar 2001 02:06:08 +0000 (02:06 +0000)]
- Include <sys/systm.h> for KASSERT().
- Move the _mtx_assert() prototype up to the top of the file with the rest
  of the function prototypes.
- Define all the mtx_foo() macros in terms of mtx_foo_flags().
- Add a KASSERT() to check for invalid options in mtx_lock_flags().
- Move the mtx_assert() to ensure a mutex is owned before releasing it
  in front of WITNESS_EXIT() in all the mtx_unlock_* macros.
- Change the MPASS* macros to be on #ifdef INVARIANTS, not just #ifdef
  MUTEX_DEBUG since most of them check to see that the mutex functions are
  called properly.  Define MPASS4() in terms of KASSERT() to do this.
- Define MPASS{,[23]} in terms of MPASS4() to simplify things and avoid
  code duplication.

23 years ago- In the locking key for struct proc, generalize the '+' symbol to mean
jhb [Wed, 7 Mar 2001 01:51:34 +0000 (01:51 +0000)]
- In the locking key for struct proc, generalize the '+' symbol to mean
  that write access to a member requires both locks and read access only
  requires one of the given locks.  Convert instances of '(c+)' to
  '(c + k)' as a result.
- Change p_pptr from (e) to (c + e).
- Change p_oppid from (c) to (c + e).
- Change p_args from (b?) to (c + k).
- Move the actual work of STOPEVENT, PHOLD, and PRELE to _STOPEVENT,
  _PHOLD, and _PRELE.  The new macros do not acquire the proc lock and
  simply assert that it is held.  The non _ prefixed macros acquire the
  proc lock and then call the _ prefixed macros.
- Add a PROC_LOCK_NOSWITCH() macro to be used when releasing the proc lock
  while already holding a spin lock (usually sched_lock).
- Add a PROC_LOCK_ASSERT() macro to be used to make assertions about the
  proc lock.  It takes the usual mtx_assert() macro arguments as its
  second argument.

23 years agoBack out the pmap_map() change for now, it isn't completely stable on the
jhb [Wed, 7 Mar 2001 01:04:17 +0000 (01:04 +0000)]
Back out the pmap_map() change for now, it isn't completely stable on the
i386.

23 years agoadd new PC-Card entry, IO Data WN-B11/PCM
sanpei [Wed, 7 Mar 2001 00:58:52 +0000 (00:58 +0000)]
add new PC-Card entry, IO Data WN-B11/PCM

Submitted by: [FreeBSD-users-jp 59373]
"Masatake E. Hori" <eddie@luft.geo.tsukuba.ac.jp>

23 years agoIn order to avoid recursing on the backing mutex for sx locks in the
jhb [Tue, 6 Mar 2001 23:13:15 +0000 (23:13 +0000)]
In order to avoid recursing on the backing mutex for sx locks in the
INVARIANTS case, define the actual KASSERT() in _SX_ASSERT_[SX]LOCKED
macros that are used in the sx code itself and convert the
SX_ASSERT_[SX]LOCKED macros to simple wrappers that grab the mutex for the
duration of the check.

23 years agoGet the arguments to the KASSERT() printf() in SX_ASSERT_XLOCKED() in
jhb [Tue, 6 Mar 2001 22:41:31 +0000 (22:41 +0000)]
Get the arguments to the KASSERT() printf() in SX_ASSERT_XLOCKED() in
the proper order.

23 years agoSawfish is invoked by the gnome stuff automatically if it exists -
jkh [Tue, 6 Mar 2001 21:46:03 +0000 (21:46 +0000)]
Sawfish is invoked by the gnome stuff automatically if it exists -
we don't need to start it explicitly.

Noted by: "Jose M. Alcaide" <jose@we.lc.ehu.es>