]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 years agoNo need to free the softc, because it wasn't allocated.
le [Tue, 22 Jun 2004 18:13:43 +0000 (18:13 +0000)]
No need to free the softc, because it wasn't allocated.

20 years agoUse the maximum physical bus when rescanning those targets. This
ps [Tue, 22 Jun 2004 17:39:57 +0000 (17:39 +0000)]
Use the maximum physical bus when rescanning those targets.  This
fixes a panic on cards which do not have any drives attached.

20 years agoFix a paste-o in key_cmpspidx_withmask().
bms [Tue, 22 Jun 2004 17:17:44 +0000 (17:17 +0000)]
Fix a paste-o in key_cmpspidx_withmask().

PR: misc/67013
Submitted by: Zhenmin <zli4@cs.uiuc.edu>

20 years agoAdjust the system endian and a.out headers to be more MI and cross-building
obrien [Tue, 22 Jun 2004 17:05:39 +0000 (17:05 +0000)]
Adjust the system endian and a.out headers to be more MI and cross-building
friendly.  Use the systems headers rather than local versions.

Reviewed by: ru

20 years agoUse nanoseconds and then lexicographic ordering when the seconds of
dwmalone [Tue, 22 Jun 2004 16:02:29 +0000 (16:02 +0000)]
Use nanoseconds and then lexicographic ordering when the seconds of
the [acm]time are the same. I was going to use Scott's patch, but I
couldn't get the style quite right, so I used a patch of my own.

Submitted by: Scott Mitchell <scott+freebsd at fishballoon.org>
MFC after: 3 weeks

20 years agoDon't sleep in the g_down path. More error checks to come.
le [Tue, 22 Jun 2004 14:54:31 +0000 (14:54 +0000)]
Don't sleep in the g_down path.  More error checks to come.

20 years agoMerged from sys/dev/sio/sio.c revisions 1.439 and 1.440.
nyan [Tue, 22 Jun 2004 12:12:10 +0000 (12:12 +0000)]
Merged from sys/dev/sio/sio.c revisions 1.439 and 1.440.

20 years agoMFi386: revision 1.592.
nyan [Tue, 22 Jun 2004 12:11:20 +0000 (12:11 +0000)]
MFi386: revision 1.592.

20 years agoUse the right ordering of args on mtx_init(). No functional changes
sos [Tue, 22 Jun 2004 11:18:25 +0000 (11:18 +0000)]
Use the right ordering of args on mtx_init(). No functional changes
since the args in question was all zero's.

Found by: Jimmy Olgeni <olgeni@FreeBSD.org>

20 years agoWhitespace cleanup.
des [Tue, 22 Jun 2004 10:33:58 +0000 (10:33 +0000)]
Whitespace cleanup.

20 years agoUpdate reference to FAQ (3.16 -> 5.3, still hardcoded)
den [Tue, 22 Jun 2004 10:11:26 +0000 (10:11 +0000)]
Update reference to FAQ (3.16 -> 5.3, still hardcoded)

20 years agong_fec(4) is not anymore incompatible with ng_ether(4).
ru [Tue, 22 Jun 2004 09:23:31 +0000 (09:23 +0000)]
ng_fec(4) is not anymore incompatible with ng_ether(4).

Submitted by: Gleb Smirnoff

20 years agofix handling of an unknown progeam name
eik [Tue, 22 Jun 2004 09:18:50 +0000 (09:18 +0000)]
fix handling of an unknown progeam name

Noticed by: Joshua Goodall <joshua@roughtrade.net>
Approved by: ru

20 years agoFixed copyright owner.
ru [Tue, 22 Jun 2004 09:11:01 +0000 (09:11 +0000)]
Fixed copyright owner.

20 years agoDocument the "fec" Netgraph node type.
ru [Tue, 22 Jun 2004 09:09:18 +0000 (09:09 +0000)]
Document the "fec" Netgraph node type.

Submitted by: Gleb Smirnoff
OK'ed by: julian, wpaul

20 years agoSet up logging before trying to lock the sandbox; otherwise tbmaster(1)
des [Tue, 22 Jun 2004 08:34:46 +0000 (08:34 +0000)]
Set up logging before trying to lock the sandbox; otherwise tbmaster(1)
will just log a mysterious "tinderbox returned exit code 35".

20 years agoFix typos and add spaces before `(' in some comments
brueffer [Tue, 22 Jun 2004 08:23:26 +0000 (08:23 +0000)]
Fix typos and add spaces before `(' in some comments

Submitted by: markus
Approved by: njl
MFC after: 3 days

20 years agoCatch up with g_dev_open() changes and pass over the current thread
le [Tue, 22 Jun 2004 06:38:01 +0000 (06:38 +0000)]
Catch up with g_dev_open() changes and pass over the current thread
pointer.

Submitted by:    cperciva

20 years agorevert section of code that calls netisr_queue() to match v1.33 of this file
darrenr [Tue, 22 Jun 2004 05:20:30 +0000 (05:20 +0000)]
revert section of code that calls netisr_queue() to match v1.33 of this file

20 years ago#ifdef's for FreeBSD are wrong, causing too many variable declaractions to
darrenr [Tue, 22 Jun 2004 05:16:29 +0000 (05:16 +0000)]
#ifdef's for FreeBSD are wrong, causing too many variable declaractions to
disappear.

20 years agoRegenerate after updating syscalls.master.
rwatson [Tue, 22 Jun 2004 04:36:25 +0000 (04:36 +0000)]
Regenerate after updating syscalls.master.

20 years agoMark unlink() as MPSAFE as we now acquire Giant in the unlink()
rwatson [Tue, 22 Jun 2004 04:34:55 +0000 (04:34 +0000)]
Mark unlink() as MPSAFE as we now acquire Giant in the unlink()
system call.

20 years agoAcquire Giant in link() so that the system call can be marked
rwatson [Tue, 22 Jun 2004 04:34:05 +0000 (04:34 +0000)]
Acquire Giant in link() so that the system call can be marked
MPSAFE.  Don't want to acquire Giant in kern_link() sync linux
compat code performs actions requiring Giant prior to calling
kern_link().

20 years agoRebuild following marking link() as MPSAFE.
rwatson [Tue, 22 Jun 2004 04:29:59 +0000 (04:29 +0000)]
Rebuild following marking link() as MPSAFE.

20 years agoMark link() system call as MPSAFE.
rwatson [Tue, 22 Jun 2004 04:29:27 +0000 (04:29 +0000)]
Mark link() system call as MPSAFE.

20 years agoAcquire Giant in link() so that we can mark it as MSTD in
rwatson [Tue, 22 Jun 2004 04:29:07 +0000 (04:29 +0000)]
Acquire Giant in link() so that we can mark it as MSTD in
syscalls.master.  Don't want to do it in kern_link() since the
Linux emulation code calls kern_link() after performing other
actions requiring Giant.

20 years agoMark linux_emul_convpath() as GIANT_REQUIRED.
rwatson [Tue, 22 Jun 2004 04:22:34 +0000 (04:22 +0000)]
Mark linux_emul_convpath() as GIANT_REQUIRED.

20 years agoAcquire socket lock around frobbing of socket state in divert sockets.
rwatson [Tue, 22 Jun 2004 04:00:51 +0000 (04:00 +0000)]
Acquire socket lock around frobbing of socket state in divert sockets.

20 years agoPrefer use of the inpcb as a MAC label source for outgoing packets sent
rwatson [Tue, 22 Jun 2004 03:58:50 +0000 (03:58 +0000)]
Prefer use of the inpcb as a MAC label source for outgoing packets sent
via divert sockets, when available.

20 years agoRemove spl's from uipc_socket to ease in merging.
rwatson [Tue, 22 Jun 2004 03:49:22 +0000 (03:49 +0000)]
Remove spl's from uipc_socket to ease in merging.

20 years agoone too many #endif's from the update broke the build
darrenr [Tue, 22 Jun 2004 02:44:06 +0000 (02:44 +0000)]
one too many #endif's from the update broke the build

20 years agoGet rid of a cast to '(void) ' on the return of a call to strcpy.
gad [Tue, 22 Jun 2004 02:18:29 +0000 (02:18 +0000)]
Get rid of a cast to '(void) ' on the return of a call to strcpy.

20 years agoOops. Undo that last 'const' change. It expects similar changes to some
gad [Tue, 22 Jun 2004 02:15:58 +0000 (02:15 +0000)]
Oops.  Undo that last 'const' change.  It expects similar changes to some
other files that I am not ready to commit yet...

20 years agoAdd 'const' to a few places.
gad [Tue, 22 Jun 2004 02:06:42 +0000 (02:06 +0000)]
Add 'const' to a few places.

PR: bin/65803
Submitted by: Cyrille Lefevre

20 years agoWhen displaying the "COMMAND" field for system-processes and/or kernel
gad [Tue, 22 Jun 2004 01:59:54 +0000 (01:59 +0000)]
When displaying the "COMMAND" field for system-processes and/or kernel
threads, put the command name in square brackets instead of parenthesis.
This matches NetBSD, and also seems to be what linux does.  The sentence
which is added to the man page is taken straight from NetBSD.

PR: bin/65803
Submitted by: Cyrille Lefevre
Obtained from: NetBSD

20 years agoFix another typo in the previous commit.
scottl [Mon, 21 Jun 2004 23:47:47 +0000 (23:47 +0000)]
Fix another typo in the previous commit.

20 years agoPut the pre FreeBSD-2.x tty compat code under BURN_BRIDGES.
phk [Mon, 21 Jun 2004 22:57:16 +0000 (22:57 +0000)]
Put the pre FreeBSD-2.x tty compat code under BURN_BRIDGES.

20 years agoon media exchange, update/rescan the drives. This allows a volume
ps [Mon, 21 Jun 2004 22:57:10 +0000 (22:57 +0000)]
on media exchange, update/rescan the drives.  This allows a volume
in a failed stated to come back on-line without a reboot.

20 years agoCommitt changes from 3.4.31 -> 3.4.35
darrenr [Mon, 21 Jun 2004 22:53:03 +0000 (22:53 +0000)]
Committ changes from 3.4.31 -> 3.4.35
* fix bug parsing port comparisons in proxy rules
* make parsing errors in ipf/ipnat return an error rather than return
  indicating success.
* make parsing errors in ipf/ipnat return an error rather than return
  indicating success.
* make ipfstat work as a set{g,u}id thing - gave up privs before opening
  /dev/ipl
* fix ipfstat -A
* make "ipfstat -f" output more informative
* various changes to ipsend for sending packets with ipv4 options
* ipmon was not correctly calculating the length of the IPv6 packet (excluded
  ipv6 header length)

MFC: 1 week

20 years agoThis commit was generated by cvs2svn to compensate for changes in r130887,
darrenr [Mon, 21 Jun 2004 22:47:51 +0000 (22:47 +0000)]
This commit was generated by cvs2svn to compensate for changes in r130887,
which included commits to RCS files with non-trunk default branches.

20 years agoImport ipfilter 3.4.35 onto vendor branch
darrenr [Mon, 21 Jun 2004 22:47:51 +0000 (22:47 +0000)]
Import ipfilter 3.4.35 onto vendor branch

20 years agoUpdate ipfilter from 3.4.31 -> 3.4.35. Some important changes:
darrenr [Mon, 21 Jun 2004 22:46:36 +0000 (22:46 +0000)]
Update ipfilter from 3.4.31 -> 3.4.35.  Some important changes:
* block packets that fail to create state table entries
* only allow non-fragmented packets to influence whether or not a logged
  packet is the same as the one logged before.
* correct the ICMP packet checksum fixing up when processing ICMP errors for NAT
* implement a maximum for the number of entries in the NAT table (NAT_TABLE_MAX
  and ipf_nattable_max)
* frsynclist() wasn't paying attention to all the places where interface
  names are, like it should.
* fix comparing ICMP packets with established TCP state where only 8 bytes
  of header are returned in the ICMP error.

MFC after: 1 week

20 years agoFix typo that somehow crept into the previous commit
scottl [Mon, 21 Jun 2004 22:42:46 +0000 (22:42 +0000)]
Fix typo that somehow crept into the previous commit

20 years agoUpdate previous commit to:
kbyanc [Mon, 21 Jun 2004 22:34:57 +0000 (22:34 +0000)]
Update previous commit to:
  * Obtain/release schedlock around calls to calcru.
  * Sort switch cases which do not cascade per style(9).
  * Sort local variables per style(9).
  * Remove "superfluous" whitespace.
  * Cleanup handling of NULL uap->tp in clock_getres().  It would probably
    be better to return EFAULT like clock_gettime() does by passing the
    pointer to copyout(), but I presume it was written to not fail on
    purpose in the original code.  I'll defer to -standards on this one.

Reported by: bde

20 years agoAdd the sysctl node 'kern.sched.name' that has the name of the scheduler
scottl [Mon, 21 Jun 2004 22:05:46 +0000 (22:05 +0000)]
Add the sysctl node 'kern.sched.name' that has the name of the scheduler
currently in use.  Move the 4bsd kern.quantum node to kern.sched.quantum
for consistency.

20 years agoBe BURN_BRIDGES compliant
phk [Mon, 21 Jun 2004 21:59:00 +0000 (21:59 +0000)]
Be BURN_BRIDGES compliant

20 years agoBe BURN_BRIDGES compliant.
phk [Mon, 21 Jun 2004 21:57:31 +0000 (21:57 +0000)]
Be BURN_BRIDGES compliant.

20 years agoThere is no need to call ciss_media_accept async anymore since all
ps [Mon, 21 Jun 2004 21:56:57 +0000 (21:56 +0000)]
There is no need to call ciss_media_accept async anymore since all
notify events are handled in a kthread.

20 years agoMark the thread in an exiting program as inactive.
julian [Mon, 21 Jun 2004 20:44:02 +0000 (20:44 +0000)]
Mark the thread in an exiting program as inactive.
This is not really used by the process but it's confusing to some
status readers to see zombie processes the "runnin" threads.

Pointed out by: Don Lewis <truckman@FreeBSD.org>

20 years agoCall the detach function with g_waitfor_event() so that it can access
green [Mon, 21 Jun 2004 20:42:03 +0000 (20:42 +0000)]
Call the detach function with g_waitfor_event() so that it can access
the GEOM topology.

There are still issues with not detaching from cam correctly such that
upon a device detach there's an invalid pointer dereference from the
later call to cam_rescan().

20 years agoKill g_access_rel() already now before we send it down 5-stable
phk [Mon, 21 Jun 2004 20:31:49 +0000 (20:31 +0000)]
Kill g_access_rel() already now before we send it down 5-stable

20 years agoAdd SCSI passthrough support to CISS. This allows devices like tape drives
scottl [Mon, 21 Jun 2004 20:18:40 +0000 (20:18 +0000)]
Add SCSI passthrough support to CISS.  This allows devices like tape drives
that are on a CISS bus to be exported up to CAM and made available as normal
devices.  This will typically add one or two buses to CAM, which will be
numbered starting at 32 to allow room for CISS proxy buses.  Also, the CISS
firmware usually hides disk devices, but these can also be exposed as 'pass'
devices if you set the hw.ciss.expose_hidden_physical tunable.

Sponsored by: Tape Laboratories, Inc.
MFC After: 3 days

20 years agoSpelling fixes.
mpp [Mon, 21 Jun 2004 20:10:35 +0000 (20:10 +0000)]
Spelling fixes.

20 years agoGive control devices their own cdevsw{} so that we can eliminate them
phk [Mon, 21 Jun 2004 20:09:23 +0000 (20:09 +0000)]
Give control devices their own cdevsw{} so that we can eliminate them
from the trafic functions.

Do not use com_addr() when we don't need it.

20 years agoSpelling fixes.
mpp [Mon, 21 Jun 2004 19:54:56 +0000 (19:54 +0000)]
Spelling fixes.

20 years agoCorrect an error carried over from the nsswitch.conf(5) manual page; add
des [Mon, 21 Jun 2004 19:38:58 +0000 (19:38 +0000)]
Correct an error carried over from the nsswitch.conf(5) manual page; add
a note to UPDATING since users may have to manually remove an incorrect
nsswitch.conf.

Noticed by: simon

20 years agoSpelling fixes.
mpp [Mon, 21 Jun 2004 19:38:25 +0000 (19:38 +0000)]
Spelling fixes.

20 years agoThe default setting for hosts is "files dns", not "dns files".
des [Mon, 21 Jun 2004 19:35:36 +0000 (19:35 +0000)]
The default setting for hosts is "files dns", not "dns files".

20 years agoSpelling fixes.
mpp [Mon, 21 Jun 2004 19:30:45 +0000 (19:30 +0000)]
Spelling fixes.

20 years agoRevert rev 1.140, it was a bit pre-mature.
ps [Mon, 21 Jun 2004 19:01:55 +0000 (19:01 +0000)]
Revert rev 1.140, it was a bit pre-mature.

20 years agoSpelling fixes.
mpp [Mon, 21 Jun 2004 18:57:32 +0000 (18:57 +0000)]
Spelling fixes.

20 years agoAdd a quirk for ciss to stop trying to read the serial number off
ps [Mon, 21 Jun 2004 18:34:30 +0000 (18:34 +0000)]
Add a quirk for ciss to stop trying to read the serial number off
of logical volumes.

20 years agoPR: docs/67884
mpp [Mon, 21 Jun 2004 18:24:48 +0000 (18:24 +0000)]
PR: docs/67884
Submitted by: Chirstopger Nehren <apeiron@comcast.net>

20 years agoThis should be the right set of docs sources.
obrien [Mon, 21 Jun 2004 18:23:51 +0000 (18:23 +0000)]
This should be the right set of docs sources.

20 years agoAdd manual pages for cm(4), esp(4), rc(4) and snc(4).
trhodes [Mon, 21 Jun 2004 18:20:57 +0000 (18:20 +0000)]
Add manual pages for cm(4), esp(4), rc(4) and snc(4).

20 years agoMFCronyx: add cross-references, fix history section.
rik [Mon, 21 Jun 2004 18:10:10 +0000 (18:10 +0000)]
MFCronyx: add cross-references, fix history section.

20 years agoDisable building of GDB info files until the gdb6 upgrade is finished.
obrien [Mon, 21 Jun 2004 18:09:20 +0000 (18:09 +0000)]
Disable building of GDB info files until the gdb6 upgrade is finished.

20 years agoTurned off the "calcru: negative time" warning for certain SMP cases
bde [Mon, 21 Jun 2004 17:46:27 +0000 (17:46 +0000)]
Turned off the "calcru: negative time" warning for certain SMP cases
where it is known to detect a problem but the problem is not very easy
to fix.  The warning became very common recently after a call to calcru()
was added to fill_kinfo_thread().

Another (much older) cause of "negative times" (actually non-monotonic
times) was fixed in rev.1.237 of kern_exit.c.

Print separate messages for non-monotonic and negative times.

20 years agoSpelling fixes.
mpp [Mon, 21 Jun 2004 17:42:49 +0000 (17:42 +0000)]
Spelling fixes.

20 years agoHave `ps' return the cputimes for zombies, with the assumption that
gad [Mon, 21 Jun 2004 16:53:11 +0000 (16:53 +0000)]
Have `ps' return the cputimes for zombies, with the assumption that
kvm_getprocs() will provide useful information if it can, or *it*
will provide a zero value if it can not find something appropriate.

Submitted by: bde

20 years agoUse the correct type (lwpid_t) for ki_tid .
gad [Mon, 21 Jun 2004 16:41:23 +0000 (16:41 +0000)]
Use the correct type (lwpid_t) for ki_tid .

Noticed by: julian
Approved by: julian, marcel

20 years agoFixed style bugs in previous commit (151 characters of trailing whitespace).
bde [Mon, 21 Jun 2004 16:12:02 +0000 (16:12 +0000)]
Fixed style bugs in previous commit (151 characters of trailing whitespace).

20 years agolibcompat doesn't seem to be needed any more.
phk [Mon, 21 Jun 2004 16:10:00 +0000 (16:10 +0000)]
libcompat doesn't seem to be needed any more.

20 years agolibcompat doesn't seem to be necessary any more.
phk [Mon, 21 Jun 2004 16:09:29 +0000 (16:09 +0000)]
libcompat doesn't seem to be necessary any more.

20 years agoDiscontinue use of old libcompat regexp routines.
phk [Mon, 21 Jun 2004 16:07:30 +0000 (16:07 +0000)]
Discontinue use of old libcompat regexp routines.

20 years agoMFcx(4) 1.23: markup fixes by ru@.
rik [Mon, 21 Jun 2004 15:14:27 +0000 (15:14 +0000)]
MFcx(4) 1.23: markup fixes by ru@.

20 years agoInitialize $timeout to 0.
des [Mon, 21 Jun 2004 15:08:17 +0000 (15:08 +0000)]
Initialize $timeout to 0.

20 years agoSpelling fixes.
mpp [Mon, 21 Jun 2004 14:54:43 +0000 (14:54 +0000)]
Spelling fixes.

20 years ago(1) Removed the bogus condition "p->p_pid != 1" on calling sched_exit()
bde [Mon, 21 Jun 2004 14:49:50 +0000 (14:49 +0000)]
(1) Removed the bogus condition "p->p_pid != 1" on calling sched_exit()
    from exit1().  sched_exit() must be called unconditionally from exit1().
    It was called almost unconditionally because the only exits on system
    shutdown if at all.

(2) Removed the comment that presumed to know what sched_exit() does.
    sched_exit() does different things for the ULE case.  The call became
    essential when it started doing load average stuff, but its caller
    should not know that.

(3) Didn't fix bugs caused by bitrot in the condition.  The condition was
    last correct in rev.1.208 when it was in wait1().  There p was spelled
    curthread->td_proc and was for the waiting parent; now p is for the
    exiting child.  The condition was to avoid lowering init's priority.
    It should be in sched_exit() itself.  Lowering of priorities is broken
    in other ways in at least the 4BSD scheduler, and doing it for init
    causes less noticeable problems than doing it for for shells.

Noticed by: julian (1)

20 years agoAdd a timeout after which tinderbox(1) will kill its children and exit.
des [Mon, 21 Jun 2004 14:49:22 +0000 (14:49 +0000)]
Add a timeout after which tinderbox(1) will kill its children and exit.

20 years agoSpelling fixes.
mpp [Mon, 21 Jun 2004 14:43:09 +0000 (14:43 +0000)]
Spelling fixes.

20 years agoSpelling fixes.
mpp [Mon, 21 Jun 2004 14:23:31 +0000 (14:23 +0000)]
Spelling fixes.

20 years agoSpelling fixes.
mpp [Mon, 21 Jun 2004 14:11:45 +0000 (14:11 +0000)]
Spelling fixes.

20 years agoUpdate p_runtime on exit. This fixes calcru() on zombies, and prepares
bde [Mon, 21 Jun 2004 14:03:38 +0000 (14:03 +0000)]
Update p_runtime on exit.  This fixes calcru() on zombies, and prepares
for not calling calcru() on exit.  calcru() on a zombie can happen if
ttyinfo() (^T) picks one.

PR: 52490

20 years agoPrevent the rp driver from panic'ing on first access and make at
gallatin [Mon, 21 Jun 2004 13:02:25 +0000 (13:02 +0000)]
Prevent the rp driver from panic'ing on first access and make at
least the pci device unloadable

- Use ttymalloc() rather than a plain  malloc to allocate the
  rp->rp_tty ttys.  This is now required due to the recent locking
  changes to ttys and prevents a panic due to locking an unitialized
  t_mtx.

- Allow the pci driver to be unloaded.  This involved moving
  the call rp_releaseresource() to the end of rp_pcireleaseresource(),
  since rp_pcireleaseresource() uses ctlp->dev, which is freed
  by rp_releaseresource().

- Allow the generic part of the driver to be unattached by providing
  a hook to cancel timeouts.

Glanced at by: obrien

20 years agoNew style functions, kill register keyword.
phk [Mon, 21 Jun 2004 12:28:56 +0000 (12:28 +0000)]
New style functions, kill register keyword.

20 years agoCall tzset() at startup.
brian [Mon, 21 Jun 2004 10:47:12 +0000 (10:47 +0000)]
Call tzset() at startup.

Submitted by: Andrzej Toboƅa <ato@iem.pw.edu.pl>

20 years agoPrint mediasize in human readable form as well.
pjd [Mon, 21 Jun 2004 09:20:06 +0000 (09:20 +0000)]
Print mediasize in human readable form as well.

20 years agoDon't hold topology lock while calling g_gate_release().
pjd [Mon, 21 Jun 2004 09:12:08 +0000 (09:12 +0000)]
Don't hold topology lock while calling g_gate_release().

Found by: KASSERT()

20 years ago- Missing trailing slash for a kern directory check.
pjd [Mon, 21 Jun 2004 08:41:50 +0000 (08:41 +0000)]
- Missing trailing slash for a kern directory check.
- Check in both places if ${_dir}/conf/kmod.mk exists.
- Style fixes (lines too long).

Submitted by: bde

20 years agoo Reduce path names in RRQ and WRQ packets by:
brian [Mon, 21 Jun 2004 08:01:16 +0000 (08:01 +0000)]
o Reduce path names in RRQ and WRQ packets by:

    Reducing "/+./" strings to "/"
    Reducing "/[^/]+/../" to "/"

o Don't send an OACK when the result of the [RW]RQ is an error.

These changes allow tftpd to interact with pxelinux.bin from the syslinux
package.

Whilst the path reducing code doesn't properly handle situations where the
path component before the "/../" is a symlink to (say) ".", I would suggest
that it does the right thing in terms of the clients perception of what
their path string actually represents.  This seems better than using
realpath() and breaking environments where symlinks point outside of the
directory hierarchy that tftpd is configured to allow.

20 years agoInclude module.h
scottl [Mon, 21 Jun 2004 07:27:34 +0000 (07:27 +0000)]
Include module.h

Submitted by: Koop Mast

20 years agoExtend the description of SIOC[GS]IFCAP.
yar [Mon, 21 Jun 2004 05:13:22 +0000 (05:13 +0000)]
Extend the description of SIOC[GS]IFCAP.

20 years agoMerge next step in socket buffer locking:
rwatson [Mon, 21 Jun 2004 00:20:43 +0000 (00:20 +0000)]
Merge next step in socket buffer locking:

- sowakeup() now asserts the socket buffer lock on entry.  Move
  the call to KNOTE higher in sowakeup() so that it is made with
  the socket buffer lock held for consistency with other calls.
  Release the socket buffer lock prior to calling into pgsigio(),
  so_upcall(), or aio_swake().  Locking for this event management
  will need revisiting in the future, but this model avoids lock
  order reversals when upcalls into other subsystems result in
  socket/socket buffer operations.  Assert that the socket buffer
  lock is not held at the end of the function.

- Wrapper macros for sowakeup(), sorwakeup() and sowwakeup(), now
  have _locked versions which assert the socket buffer lock on
  entry.  If a wakeup is required by sb_notify(), invoke
  sowakeup(); otherwise, unconditionally release the socket buffer
  lock.  This results in the socket buffer lock being released
  whether a wakeup is required or not.

- Break out socantsendmore() into socantsendmore_locked() that
  asserts the socket buffer lock.  socantsendmore()
  unconditionally locks the socket buffer before calling
  socantsendmore_locked().  Note that both functions return with
  the socket buffer unlocked as socantsendmore_locked() calls
  sowwakeup_locked() which has the same properties.  Assert that
  the socket buffer is unlocked on return.

- Break out socantrcvmore() into socantrcvmore_locked() that
  asserts the socket buffer lock.  socantrcvmore() unconditionally
  locks the socket buffer before calling socantrcvmore_locked().
  Note that both functions return with the socket buffer unlocked
  as socantrcvmore_locked() calls sorwakeup_locked() which has
  similar properties.  Assert that the socket buffer is unlocked
  on return.

- Break out sbrelease() into a sbrelease_locked() that asserts the
  socket buffer lock.  sbrelease() unconditionally locks the
  socket buffer before calling sbrelease_locked().
  sbrelease_locked() now invokes sbflush_locked() instead of
  sbflush().

- Assert the socket buffer lock in socket buffer sanity check
  functions sblastrecordchk(), sblastmbufchk().

- Assert the socket buffer lock in SBLINKRECORD().

- Break out various sbappend() functions into sbappend_locked()
  (and variations on that name) that assert the socket buffer
  lock.  The !_locked() variations unconditionally lock the socket
  buffer before calling their _locked counterparts.  Internally,
  make sure to call _locked() support routines, etc, if already
  holding the socket buffer lock.

- Break out sbinsertoob() into sbinsertoob_locked() that asserts
  the socket buffer lock.  sbinsertoob() unconditionally locks the
  socket buffer before calling sbinsertoob_locked().

- Break out sbflush() into sbflush_locked() that asserts the
  socket buffer lock.  sbflush() unconditionally locks the socket
  buffer before calling sbflush_locked().  Update panic strings
  for new function names.

- Break out sbdrop() into sbdrop_locked() that asserts the socket
  buffer lock.  sbdrop() unconditionally locks the socket buffer
  before calling sbdrop_locked().

- Break out sbdroprecord() into sbdroprecord_locked() that asserts
  the socket buffer lock.  sbdroprecord() unconditionally locks
  the socket buffer before calling sbdroprecord_locked().

- sofree() now calls socantsendmore_locked() and re-acquires the
  socket buffer lock on return.  It also now calls
  sbrelease_locked().

- sorflush() now calls socantrcvmore_locked() and re-acquires the
  socket buffer lock on return.  Clean up/mess up other behavior
  in sorflush() relating to the temporary stack copy of the socket
  buffer used with dom_dispose by more properly initializing the
  temporary copy, and selectively bzeroing/copying more carefully
  to prevent WITNESS from getting confused by improperly
  initialized mutexes.  Annotate why that's necessary, or at
  least, needed.

- soisconnected() now calls sbdrop_locked() before unlocking the
  socket buffer to avoid locking overhead.

Some parts of this change were:

Submitted by: sam
Sponsored by: FreeBSD Foundation
Obtained from: BSD/OS

20 years agoAdd the `-O emul' format option, which prints the name of the system-call
gad [Sun, 20 Jun 2004 23:40:54 +0000 (23:40 +0000)]
Add the `-O emul' format option, which prints the name of the system-call
emulation environment the process is in.  "emul" as a keyword is picked
up from OpenBSD.

PR: bin/65803
Submitted by: Cyrille Lefevre

20 years agoFix the following error:
marcel [Sun, 20 Jun 2004 22:32:19 +0000 (22:32 +0000)]
Fix the following error:
ld: locore.o: non-pic code with imm relocation against dynamic
symbol `__gp'

With binutils 2.15, ld(1) defines the implicit/automatic symbol __gp
as a dynamic symbol and thus will now complain when used in a non-PIC
fashion (the immediate relocation used to set the GP register). Resolve
this by defining __gp in the linker script. Make sure __gp is aligned
on a 16-byte boundary.

Note: the 0x200000 magic offset is due to having a 22-bit GP-relative
relocation. The GOT will be accessed with negative offsets from GP.

20 years agoFrom SUSv3:
gad [Sun, 20 Jun 2004 22:31:37 +0000 (22:31 +0000)]
From SUSv3:
    Any [standard output] field need not be meaningful in all
    implementations. In such a case a hyphen ('-') should be
    output in place of the field value

So have the `-O label' option print out the string "  -" if the
process has no label.

Approved by: Silence from rwatson and green (when asked in March...)

20 years agoAdd new output-format keywords of LWP and NLWP, which show the thread-id
gad [Sun, 20 Jun 2004 22:22:49 +0000 (22:22 +0000)]
Add new output-format keywords of LWP and NLWP, which show the thread-id
and number-of-threads tied to a process.  Result can be seen by typing,
e.g.:   ps -HO lwp,nlwp
These new options are not documented yet.  More options will be coming,
and I will update the man page after I get farther along.

PR: bin/65803  (though adjusted to fit our present source)
Submitted by: Cyrille Lefevre

20 years agoFill in the values for the ki_tid and ki_numthreads which have been
gad [Sun, 20 Jun 2004 22:17:22 +0000 (22:17 +0000)]
Fill in the values for the ki_tid and ki_numthreads which have been
added to kproc_info.

PR: bin/65803  (a tiny part...)
Submitted by: Cyrille Lefevre

20 years agoChange the architecture-based setting of KINFO_PROC_SIZE and KI_NSPARE so
gad [Sun, 20 Jun 2004 22:05:41 +0000 (22:05 +0000)]
Change the architecture-based setting of KINFO_PROC_SIZE and KI_NSPARE so
that it is a series of alphabetically-ordered #fidef's, from Bruce Evans.
Define two new thread-related values in kproc_info, from Cyrille Lefevre.
Also remove a few values from kproc_info that were not needed, and change
around a few comments, from me.  Changes are combined into a single commit
simply because it is a hassle to make sure that alignments and sizes are
not changed on any platform when modifying kproc_info.