Commit Graph

93518 Commits

Author SHA1 Message Date
Warner Losh
4cd54ca658 Add a new variable 'skipPCCARD'. This variable will cause sysinstall
to ignore all PC Card devices.

Submitted by: Anders Nordby
PR: bin/37650

MFC After: 2 weeks
2003-08-20 06:24:12 +00:00
Mike Makonnen
130112f793 Add a general mechanism for creating and applying
devfs(8) rules in rc(8). It is most useful for applying
rules to devfs(5) mount points in /dev or inside jails.
The following line of script is sufficient to
mount a relatively useful+secure devfs(5) in a jail:

	devfs_mount_jail /some/jail/dev

Some new shell routines available to scripts that source
rc.subr(5):
	o devfs_link		- Makes it a little easier to create symlinks
	o devfs_init_rulesets	- Create devfs(8) rulesets from devfs.rules
	o devfs_set_ruleset	- Set a ruleset to a devfs(5) mount
	o devfs_apply_ruleset	- Apply a ruleset to a devfs(5) mount
	o devfs_domount		- Mount devfs(5) and apply some ruleset
	o devfs_mount_jail	- Mount devfs(5) and apply a ruleset
				  appropriate to jails.

Additional rulesets can be specified in /etc/devfs.rules.
If the devfs_system_ruleset variable is defined in rc.conf
and it contains the name of a ruleset defined in /etc/defaults/devfs.rules
or user supplied rulesets in /etc/devfs.rules then that ruleset will
be applied to /dev at startup by the /etc/rc.d/devfs script. It can
also be applied post-startup:

	/etc/rc.d/devfs start

This is a more flexible mechanism than the previous method of using
/etc/devfs.conf. However, that method is still available.

Note: since devfs(8) doesn't provide any way for creating symlinks
as part of a ruleset, anyone wishing to create symlinks in a devfs(5)
as part of the bootup sequence will still have to rely on /etc/devfs.conf.
2003-08-20 06:15:18 +00:00
Warner Losh
74a9cb0969 Use CBB_CARD_PRESENT instead of checking STATE_CD directly since it is
hard to get right.
2003-08-20 06:13:01 +00:00
Alan Cox
2094a9b6ce Lock the pmap's tsb object when performing vm_page_grab() on it. 2003-08-20 06:11:39 +00:00
Doug Ambrisko
50b09b375f Fix panic from having multiple locks held when updating firmware. AN_LOCK
was asserted during a tsleep resulting in a panic in tsleep.
2003-08-20 05:52:48 +00:00
Warner Losh
f1b0a0f432 pc98pcic isn't the name of the media driver. tcic likely will never
happen (unless someone sends one to me).  Kill bogus module depend
that I commented out over a year ago.
2003-08-20 05:50:56 +00:00
Warner Losh
82d2e53a57 When debugging CIS, only print 10 CISTPL_NULLs. Chances are good they
are all bogus, and the cards that don't decode things quite right
often have hundreds of them.  This will fix starvation of small dmesg
buffers and allow better debugging to happen.  I thought about adding
an override, but there is such a thing as too many knobs. :-)
2003-08-20 05:44:55 +00:00
Warner Losh
45cc9f5f4f Fix an extreme edge case in leap second handling. We need to call
ntp_update_second twice when we have a large step in case that step
goes across a scheduled leap second.  The only way this could happen
would be if we didn't call tc_windup over the end of day on the day of
a leap second, which would only happen if timeouts were delayed for
seconds.  While it is an edge case, it is an important one to get
right for my employer.

Sponsored by: Timing Solutions Corporation
2003-08-20 05:34:27 +00:00
Marcel Moolenaar
4a98d8b095 Undo the mistake made in revision 1.77 of trap.c and which was the
ultimate trigger for the follow-up fixes in revisions 1.78, 1.80,
1.81 and 1.82 of trap.c. I was simply too pre-occupied with the
gateway page and how it blurs kernel space with user space and
vice versa that I couldn't see that it was all a load of bollocks.

It's not the IP address that matters, it's the privilege level that
counts. We never run in user space with lifted permissions and we
sure can not run in kernel space without it. Sure, the gateway page
is the exception, but not if you look at the privilege level. It's
user space if you run with user permissions and kernel space otherwise.

So, we're back to looking at the privilege level like it should be.
There's no other way.

Pointy hat: marcel
2003-08-20 05:30:35 +00:00
Alan Cox
2b12cfb461 - Lock the pte object when performing vm_page_grab().
- Insure that the page table page is zero filled before adding it
   to the page table.
2003-08-20 05:09:55 +00:00
Doug Ambrisko
6d2a9bd669 On Dell boxes such as the PE2650 we need to disable 3 led mode for the
link LED to work.

Reviewed by:	wpaul
Obtained from:	Linux driver
2003-08-20 04:06:00 +00:00
Doug Ambrisko
e8ef0c2923 - Add support for Cisco latest firmware RID sizes that supports 25 SSIDs!
- Fix up TX speed changes.
- Make mpi-350 cards sort-of work with new firmware.  It RXs okay but TXs
  only work for about 14 packets then fails to get an interrupt.  The
  TX watchdog fires.  It has been reported that my hack for now doesn't
  break cards with the older firmware.  It appears my card has lost
  the ability to RX or TX at all but other peoples cards work.  I assume
  it got damaged in tansport.

MFC:	1 week.
2003-08-20 03:46:05 +00:00
Hidetoshi Shimokawa
a1c9e73ab8 Fill reserved fields of transmitting packets header with zero.
This fixes the if_fwe problem with 1394b chip.

PR and Tested by: nork
2003-08-20 03:11:37 +00:00
Daniel Eischen
83e3877521 Add back a loop for up to PTHREAD_DESTRUCTOR_ITERATIONS to
destroy thread-specific data.  Display a warning when thread
specific data remains after PTHREAD_DESTRUCTOR_ITERATIONS.

Reviewed by:	davidxu
2003-08-20 02:34:14 +00:00
David E. O'Brien
c1f61aa934 Document the OFW_NEWPCI commit to sparc64 generic. 2003-08-20 01:52:30 +00:00
David E. O'Brien
c5f8ff3aee Remove the vestiges of the old pre-"X_AS_PKG" way we used to handled the
installing XFree86 (version 3.3.6 and before).

Reviewed by:	jhb
2003-08-19 23:23:27 +00:00
Garrett Wollman
89a26fd1fc Add a kluge suggested by Marcel to paper over the difference between
gethostname()'s old and new signatures without requiring a library
bump.  Note that programs which called gethostname() with a negative
argument were already broken, since the same type conversion was done
by the old implementation.  Add a note in the Makefile so that whoever
next bumps the libc revision will delete the kluge at the same time
(as it will no longer be necessary).  This is only operative on 64-bit
platforms.

Submitted by:	marcel
2003-08-19 23:01:46 +00:00
Sam Leffler
0a915fad5d MFp4 changes to fix locking issues and correct reference
count handling of station entries in hostap mode:

Input path:

o driver is now expected to find the node associated with the
  sender of a received frame; use ic_bss if none is located
o driver passes the (referenced) node into ieee80211_input for
  use within the wlan module and is responsible for cleaning up
  on return
o the antenna state is no longer passed up with each frame; this
  is now considered driver-private state and drivers are responsible
  for keeping it in the driver-private part of a node

Output path:

Revamp output path for management frames to eliminate redundant
locking that causes problems and to correct reference counting
bogosity that occurs when stations are timed out due to inactivity
(in AP mode).  On output the refcnt'd node is stashed in the pkthdr's
recvif field (yech) and retrieved by the driver.  This eliminates
an unref/ref scenario and related node table unlock/lock due to the
driver looking up the node.  This is particularly important when
stations are timed out as this causes a lock order reversal that
can result in a deadlock.  As a byproduct we also reduce the overhead
for sending management frames (minimal).  Additional fallout from
this is a change to ieee80211_encap to return a refcn't node for
tieing to the outbound frame.  Node refcnts are not reclaimed until
after a frame is completely processed (e.g. in the tx interrupt
handler).  This is especially important for timed out stations as
this deref will be the final one causing the node entry to be
reclaimed.

Additional semi-related changes:
o replace m_copym use with m_copypacket (optimization)
o add assert to verify ic_bss is never free'd during normal operation
o add comments explaining calling conventions by drivers for frames
  going in each direction
o remove extraneous code that "cannot be executed" (e.g. because
  pointers may never be null)
2003-08-19 22:17:04 +00:00
David E. O'Brien
05ca5d4af2 Enable OFW_NEWPCI until jmg's 2003/06/21 18:26:08 PDT bus commit is fixed
that caused a 3-4 times slow down in performance.
(the primary Sparc64 developers are all using OFW_NEWPCI already, so it is
the best code path for users)
2003-08-19 21:57:29 +00:00
Sam Leffler
d1d0cf62fe o pass control frames up the stack when in monitor mode (the 802.11 layer will
quietly discard them; this just permits them to be collected with bpf)
o add a counter for the number of rate control frames discarded when not in
  monitor mode
o move the rx "too short" statistic in the stat structure so non-error rx stats
  are together (NB: ABI change to apps that collect stats via driver ioctl)
2003-08-19 21:35:08 +00:00
Scott Long
b88ffdc860 Make aac(4) compile cleanly on 64-bit machines. The code was already 64-bit
safe, but some (unneeded and/or harmless) downcasts were generating warnings.
The driver still is not endian-clean.
2003-08-19 21:31:45 +00:00
Sam Leffler
9cccabebd7 o correct beacon frame length calculation and add an assert to catch any future
mistakes (this mistake was not an issue because the length is only used to
  decide whether or not to allocate a cluster)
o while here, move a beacon length comment to the "right place"
2003-08-19 21:28:45 +00:00
Sam Leffler
1b1a8e411e maintain a table for mapping hardware rate codes to 802.11 rates for
calculating the rate for each rx'd frame
2003-08-19 21:24:16 +00:00
Sam Leffler
2274d8c885 mark the scan and calibrate callouts MPSAFE 2003-08-19 21:05:47 +00:00
Sam Leffler
91a2b886de remove unneeded include files 2003-08-19 21:03:30 +00:00
Garrett Wollman
73282a3b6c Update gethostname() prototype to match source and standard. 2003-08-19 20:39:49 +00:00
Garrett Wollman
effcb5eca3 Change gethostname() to set errno to ENAMETOOLONG instead of ENOMEM
when the buffer is not long enough to hold the current host name.
POSIX does not standardize error returns for gethostname(), so it
doesn't matter which one we use, but ENAMETOOLONG is at least a little
more intuitive, and mi suggests the existence of prior art.  I've been
running with this change for a while on my home machine with no
effect.  At the same time, I've updated the prototype for
gethostname() to use the correct standard type (size_t) for the
namelen argument.

All of the in-tree callers fall into one of the following categories:
1) Call perror() or equivalent when gethostname() fails.
2) Ignore gethostname()'s return value entirely, potentially resulting
in data corruption if the buffer is too small.
3) Fall back to a (possibly sensible) default value if gethostname()
fails.

Many of the callers I examined shows signs of confusion about the
correct sizing of the host name buffer.  gethostname(3) now has more
information about this, as well as updated standards information.

PR:		48114
Submitted by:	mi (in part)
2003-08-19 20:38:44 +00:00
Alan Cox
1e584e46be Eliminate a possible race condition for multithreaded applications in
_pmap_allocpte(): Guarantee that the page table page is zero filled before
adding it to the directory.  Otherwise, a 2nd, 3rd, etc. thread could
access a nearby virtual address and use garbage for the address
translation.

Discussed with:	peter, tegge
2003-08-19 18:20:34 +00:00
David E. O'Brien
c518eb4885 Expand the fdisk size display toggling to include GB. 2003-08-19 17:51:49 +00:00
Sam Leffler
c06eb4e293 Change instances of callout_init that specify MPSAFE behaviour to
use CALLOUT_MPSAFE instead of "1" for the second parameter.  This
does not change the behaviour; it just makes the intent more clear.
2003-08-19 17:51:11 +00:00
David E. O'Brien
9d6f37e490 Properly quote the lib path. 2003-08-19 17:30:46 +00:00
Sam Leffler
91a9d708ba add R_Zalloc definition that returns pre-zero'd memory 2003-08-19 17:23:07 +00:00
Jeffrey Hsu
9ba208b413 * Bug fix in bw_meter_process(): the periodically processed bins
of bw_meter entries were processed up to one second ahead.
  After an unappropriate rescheduling of some of the bw_meter
  entries, the upcalls weren't delivered.

* pim_register_prepare() uses the appropriate sw_csum flag to
  call ip_fragment() so the IP checksum is computed properly.

* Modify pim_register_prepare() to take care of IP packets that
  don't need fragmentation.

* Add-back in_delayed_cksum() to encap_send(), because it seems it
  should be there.

Submitted by:	Pavlin Radoslavov <pavlin@icir.org>
2003-08-19 17:22:51 +00:00
Sam Leffler
d5882c1117 remove #define no longer used 2003-08-19 17:12:21 +00:00
Sam Leffler
53b57cd1ab add missing unlock when in_pcballoc returns an error 2003-08-19 17:11:46 +00:00
Sam Leffler
588523fae3 use ETHER_IS_MULTICAST instead of explicit check 2003-08-19 17:04:13 +00:00
Sam Leffler
0143cfd730 "short cable" fix for DP8315
Derived from:	netbsd and tech note at soekris web site
MFC after:	1 week
2003-08-19 16:57:00 +00:00
Sam Leffler
e540880d41 correct typo in comment 2003-08-19 16:41:12 +00:00
Bruce A. Mah
0698b57374 New release note: WITH_DYNAMICROOT.
Modified release note:  Fix up some typos and improve markup in
rescue(8) note.
2003-08-19 16:03:01 +00:00
Bruce A. Mah
a76984e64f Add a bit of text saying that mentions of specific devices are
gradually going away.
2003-08-19 15:34:06 +00:00
Olivier Houchard
a7e15683be Use bus_child_present() to make sure the card is still there before calling
epstop() in ep_detach().
This fixes a freeze that happens when ejecting a ep(4) pcmcia card.
2003-08-19 14:06:42 +00:00
Paul Saab
ad8fc00c75 Don't tsleep on NULL 2003-08-19 12:22:17 +00:00
Dag-Erling Smørgrav
39082bb4a5 Some servers respond to RETR in active mode with 125 (connection already
open) rather than 150 (opening connection).  There's no reason why we
shouldn't accept that.

PR:		misc/42172
MFC in:		3 days
2003-08-19 11:43:11 +00:00
Dag-Erling Smørgrav
134ce0f9cc Add pfs_visible() checks to pfs_getattr() and pfs_getextattr(). This
also fixes pfs_access() since it relies on VOP_GETATTR() which will call
pfs_getattr().  This prevents jailed processes from discovering the
existence, start time and ownership of processes outside the jail.

PR:		kern/48156
2003-08-19 10:26:41 +00:00
Hidetoshi Shimokawa
98b8dc587d Remove unused code. 2003-08-19 08:59:07 +00:00
Hidetoshi Shimokawa
29b187dc39 Drop too short packets. 2003-08-19 08:50:35 +00:00
Hidetoshi Shimokawa
f9c8c31d33 Allow to access phy registers via ioctl(). 2003-08-19 08:47:49 +00:00
David Xu
9fbc7f7255 Support printing 64 bits pointer and long integer.
Reviewed by: deischen
2003-08-19 08:29:33 +00:00
Gordon Tetlow
c45db69312 Explicitly add libz and libcrypto to LDADD for any ssh utilities missing
it. While not strictly required, it unbreaks the cross-build world that
is resulting from moving the libraries around.

I have a more permanent solution to this problem in the works, but I
asked des for permission to commit this to get the ball rolling. This
also makes the ssh build more along the lines of what the openssh-portable
and OpenBSD openssh Makefile glue does.

Reviewed by:	des
2003-08-19 07:45:03 +00:00
Murray Stokely
0530edef90 Fix typo. It's 'bsdiff' not 'bsddiff'. 2003-08-19 05:48:08 +00:00