Warner Losh [Thu, 21 Aug 2003 18:05:35 +0000 (18:05 +0000)]
Sort the vendors into three sections. First section is for those
vendors that list the vendor ID in the proper byte order. The second
section is for vendors that get it backwards. The third is for what
appear to be 'random' ones (although 0xcxxx appears to be coherent
enough that maybe somebody else is assigning those numbers).
Warner Losh [Thu, 21 Aug 2003 17:49:50 +0000 (17:49 +0000)]
Compaq's ID is 0x138. However, it looks like they also released
something with the vendor ID of 0x183. That could be a typo, or it
could be Paralon Technologies. Add an entry for Paralon, but don't
use it yet.
Robert Watson [Thu, 21 Aug 2003 17:28:45 +0000 (17:28 +0000)]
Retrofit of mac_test regression and consistency test module for MAC
Framework labels:
- Re-work the label state assertions to use a set of central
ASSERT_type_LABEL() assertions.
- Test to make sure labels passed to externalize/internalize calls haven't
been destroyed.
- For access control checks, assert the condition of all labels passed in.
- For life cycle events, assert the condition of all labels passed in.
- Add new entry point implementations for new MAC Framework entry points:
mac_test_reflect_mbuf_icmp(), mac_test_reflect_mbuf_tcp(),
mac_test_check_vnode_deleteextattr(), mac_test_check_vnode_listextattr().
Warner Losh [Thu, 21 Aug 2003 16:40:20 +0000 (16:40 +0000)]
Vendor 0xb is intersil, not Netgear. The MA401RA is just Netgear's
modle number, and I continue to use it as a place holder until I find
out what Intersil's name for it is.
Robert Watson [Thu, 21 Aug 2003 16:22:52 +0000 (16:22 +0000)]
Generally rename things to represent the fact that this is now the
mac_stub policy and no longer mac_none (as found in the repocopy).
Add comment to this effect.
Robert Watson [Thu, 21 Aug 2003 13:53:01 +0000 (13:53 +0000)]
Add mac_check_vnode_deleteextattr() and mac_check_vnode_listextattr():
explicit access control checks to delete and list extended attributes
on a vnode, rather than implicitly combining with the setextattr and
getextattr checks. This reflects EA API changes in the kernel made
recently, including the move to explicit VOP's for both of these
operations.
Minimal update to make it easier to increase the buffer-size lpd uses
when reading/writing spool files. I intend to do a more elaborate
version, but I want to get this much in before 4.9-release. As written,
this results in no change to the object code.
Warner Losh [Wed, 20 Aug 2003 23:43:20 +0000 (23:43 +0000)]
In my efforts to make checking the CD bits less error-prone, I
introduced an error. In power_enable_socket, we only return ENODEV if
there isn't a card, not if there is a card. Ooops.
Mike Makonnen [Wed, 20 Aug 2003 22:35:55 +0000 (22:35 +0000)]
Write the short and long version of the month
names in Amharic instead of English.
Also, remove some extra names I had previously considered
including. They don't make sense since the calendar names
don't match up.
Robert Watson [Wed, 20 Aug 2003 19:16:49 +0000 (19:16 +0000)]
Remove about 40 lines of #ifdef/#endif by using new macros
MAC_DEBUG_COUNTER_INC() and MAC_DEBUG_COUNTER_DEC() to maintain
debugging counter values rather than #ifdef'ing the atomic
operations to MAC_DEBUG.
Warner Losh [Wed, 20 Aug 2003 19:12:46 +0000 (19:12 +0000)]
bde made a number of suggested improvements to the code. This commit
represents the pruely stylistic changes and should have no net impact
on the rest of the code.
bde's more substantive changes will follow in a separate commit once
we've come to closure on them.
Bosko Milekic [Wed, 20 Aug 2003 18:22:06 +0000 (18:22 +0000)]
In sysctl_vm_zone, do not calculate per-cpu cache stats on
UMA_ZFLAG_INTERNAL zones at all. Apparently, Wilko's alpha
was crashing while entering multi-user because, I think, we
were calculating the garbage cachefree for pcpu caches that
essentially don't exist for at least the 'zones' zone and it so
happened that we were reading from an unmapped location.
Confirmed to fix crash: wilko
Helped debug: wilko, gallatin
Robert Watson [Wed, 20 Aug 2003 17:32:17 +0000 (17:32 +0000)]
Before digging into IGMP locking, do a whitespace and prototype cleanup:
prefer tabs to 8 spaces, focus on consistent indentation, prefer modern
C function prototypes. Not all the way to style(9), but substantially
closer.
Bruce M Simpson [Wed, 20 Aug 2003 14:46:40 +0000 (14:46 +0000)]
Add the IP_ONESBCAST option, to enable undirected IP broadcasts to be sent on
specific interfaces. This is required by aodvd, and may in future help us
in getting rid of the requirement for BPF from our import of isc-dhcp.
David Xu [Wed, 20 Aug 2003 13:43:35 +0000 (13:43 +0000)]
_thr_sig_check_pending is also called by scope system thread when it leaves
critical region, we wrap some syscalls for thread cancellation point, and
when syscalls returns, we call _thr_leave_cancellation_point, at the time
if a signal comes in, it would be buffered, and when the thread leaves
_thr_leave_cancellation_point, buffered signals will be processed, to avoid
messing up normal syscall errno, we should save and restore errno around
signal handling code.
Hartmut Brandt [Wed, 20 Aug 2003 08:25:36 +0000 (08:25 +0000)]
Get rid of a __DECONST by strdup'ing the string in question. When
called this way the program just prints its help intro, so the
memory leak is not a problem.
Mike Makonnen [Wed, 20 Aug 2003 06:50:34 +0000 (06:50 +0000)]
o Reduce rc(8) startup clutter by turning the informational messages
off by default.
o Apparently the routine displaying the informational messages wasn't
checking its knob in rc.conf, so fix that as well.
Warner Losh [Wed, 20 Aug 2003 06:27:21 +0000 (06:27 +0000)]
The PCMCIA Standard dictates that those funny cards you insert into
laptops are "PC Cards" and uses said term consistantly. Allow my
foolish hobgoblins to get the better of me and become consistant.
Mike Makonnen [Wed, 20 Aug 2003 06:15:18 +0000 (06:15 +0000)]
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.
Warner Losh [Wed, 20 Aug 2003 05:50:56 +0000 (05:50 +0000)]
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.
Warner Losh [Wed, 20 Aug 2003 05:44:55 +0000 (05:44 +0000)]
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. :-)
Warner Losh [Wed, 20 Aug 2003 05:34:27 +0000 (05:34 +0000)]
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.
Marcel Moolenaar [Wed, 20 Aug 2003 05:30:35 +0000 (05:30 +0000)]
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.
Doug Ambrisko [Wed, 20 Aug 2003 03:46:05 +0000 (03:46 +0000)]
- 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.
Daniel Eischen [Wed, 20 Aug 2003 02:34:14 +0000 (02:34 +0000)]
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.
Garrett Wollman [Tue, 19 Aug 2003 23:01:46 +0000 (23:01 +0000)]
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.
Sam Leffler [Tue, 19 Aug 2003 22:17:04 +0000 (22:17 +0000)]
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)
David E. O'Brien [Tue, 19 Aug 2003 21:57:29 +0000 (21:57 +0000)]
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)
Sam Leffler [Tue, 19 Aug 2003 21:35:08 +0000 (21:35 +0000)]
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)
Scott Long [Tue, 19 Aug 2003 21:31:45 +0000 (21:31 +0000)]
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.
Sam Leffler [Tue, 19 Aug 2003 21:28:45 +0000 (21:28 +0000)]
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"
Garrett Wollman [Tue, 19 Aug 2003 20:38:44 +0000 (20:38 +0000)]
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.
Alan Cox [Tue, 19 Aug 2003 18:20:34 +0000 (18:20 +0000)]
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.
Sam Leffler [Tue, 19 Aug 2003 17:51:11 +0000 (17:51 +0000)]
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.
Jeffrey Hsu [Tue, 19 Aug 2003 17:22:51 +0000 (17:22 +0000)]
* 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.