jlemon [Sat, 25 Nov 2000 08:00:10 +0000 (08:00 +0000)]
Change the driver to allocate its own callout structure, and modify
the interface to use callout_* instead of timeout(). Also add an
IS_MPSAFE #define (currently off) which will mark the driver as mpsafe
to the upper layers.
jlemon [Sat, 25 Nov 2000 07:35:38 +0000 (07:35 +0000)]
Lock down the network interface queues. The queue mutex must be obtained
before adding/removing packets from the queue. Also, the if_obytes and
if_omcasts fields should only be manipulated under protection of the mutex.
IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on
the queue. An IF_LOCK macro is provided, as well as the old (mutex-less)
versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which
needs them, but their use is discouraged.
Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF,
which takes care of locking/enqueue, and also statistics updating/start
if necessary.
jlemon [Sat, 25 Nov 2000 06:22:16 +0000 (06:22 +0000)]
Revert the last commit to the callout interface, and add a flag to
callout_init() indicating whether the callout is safe or not. Update
the callers of callout_init() to reflect the new interface.
green [Sat, 25 Nov 2000 04:13:05 +0000 (04:13 +0000)]
Security fix: correctly set groups according to the user. Previously,
root's groups' permissions were being used, so a user could read up to
16 (excluding initial whitespace) bytes of e.g. a wheel-accessible file.
Also, don't allow blocking on the opening of ~/.fakeid, so replace a fopen()
with open() and fdopen(). I knew I'd be going to hell for using C file
streams instead of POSIX syscalls...
rwatson [Sat, 25 Nov 2000 03:53:42 +0000 (03:53 +0000)]
o Make systat/vmstat.c use sysctl() to retrieve cp_time, bufspace,
maxvnodes, numvnodes, freevnodes, nchstats, and numdirtybuffers.
o Make the hw.ncpu error checking code a little more rigorous by
sanity checking the returned data size.
o Didn't fix machine-dependent non-sysctl-exported variables:
intrnames, eintrnames, intrcnt, eintrcnt, as these variables are
defined and exported from machine-dependent kernel code in
assembly. This should probably be fixed somehow.
peter [Sat, 25 Nov 2000 03:36:09 +0000 (03:36 +0000)]
Update the ed driver to probe and attach under a NEWCARD kernel (I was
using a cardbus based system with pccbb providing the pcic interface).
Something isn't quite right.. when the driver allocates and activates
its resources, the IO space that was requested reads as all zeros (versus
the original 0xff's as it normally is when there is no device responding).
Also, deactivate the resources before releasing them. OLDCARD doesn't
seem to care but NEWCARD/CARDBUS get rather unhappy if you release
a resource that hasn't been deactivated yet.
jake [Sat, 25 Nov 2000 03:34:49 +0000 (03:34 +0000)]
- Rename callout_reset to _callout_reset and add a flags argument.
- Add macros callout_reset, which does the obvious, and
mp_callout_reset, which passes the CALLOUT_MPSAFE flag.
green [Sat, 25 Nov 2000 02:00:35 +0000 (02:00 +0000)]
In env_destroy(), it is a bad idea to env_swap(self, 0) to switch
back to the original environ unconditionally. The setting of the
variable to save the previous environ is conditional; it happens when
ENV.e_committed is set. Therefore, don't try to swap the env back
unless the previous env has been initialized.
sheldonh [Fri, 24 Nov 2000 11:13:15 +0000 (11:13 +0000)]
(forced commit)
More detail describing why chmod is installed into ${INSTALLTMP} since
rev 1.176:
We use Perl's MakeMaker-generated makefiles to install Perl. Since we
can't hack up MakeMaker's MM_Unix.pm to suit our build, we need chmod
to be around until we use our own makefiles to install perl.
* Some dummynet code incorrectly handled a malloc()-allocated pseudo-mbuf
header structure, called "pkt," and could consequently pollute the mbuf
free list if it was ever passed to m_freem(). The fix involved passing not
pkt, but essentially pkt->m_next (which is a real mbuf) to the mbuf
utility routines.
* Also, for dummynet, in bdg_forward(), made the code copy the ethernet header
back into the mbuf (prepended) because the dummynet code that follows expects
it to be there but it is, unfortunately for dummynet, passed to bdg_forward
as a seperate argument.
PRs: kern/19551 ; misc/21534 ; kern/23010
Submitted by: Thomas Moestl <tmoestl@gmx.net>
Reviewed by: bmilekic
Approved by: luigi
ru [Thu, 23 Nov 2000 08:51:33 +0000 (08:51 +0000)]
Starting from groff(1) version 1.12, -msafer is now the default,
but index building for 13.viref requires the use of .sy request.
Repair the index building by running groff(1) in unsafe -U mode.
marcel [Thu, 23 Nov 2000 03:21:58 +0000 (03:21 +0000)]
Don't unregister the ioctl handlers before we verified we
can unload. Doing so leaves the linuxulator in a crippled
state (no ioctl support) when Linux binaries are run at
unload time.
While here, consistently spell ELF in capitals and perform
some minor style improvements.
wpaul [Thu, 23 Nov 2000 00:28:43 +0000 (00:28 +0000)]
Update the probe some more to deal with 16/32 bit issues. If the chip
is already in 32-bit mode, we need to be able to detect this and still
read the chip ID code. Detecting 32-bit mode is actually a little
tricky, since we want to avoid turning it on accidentally. The easiest
way to do it is to just try and read the PCI subsystem ID from the
bus control registers using 16-bit accesses and compare that with the
value read from PCI config space. If they match, then we know we're in
16-bit mode, otherwise we assume 32-bit mode.
kris [Wed, 22 Nov 2000 11:09:30 +0000 (11:09 +0000)]
Create temporary files in a secure directory, instead of using multiple
filenames based on a single invocation of mktemp() in /tmp, which is
easily predictable after the first one.