Commit Graph

110068 Commits

Author SHA1 Message Date
cognet
d852f75fe8 Do not change the page directory and do not flush the TLB when switching to
a kernel thread.
2004-12-05 22:46:59 +00:00
cognet
8c5a104a40 Remove an unused field from the struct pv_entry.
While I'm there, fix style.
2004-12-05 22:46:30 +00:00
phk
6c14f71ef7 VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few cases
doesn't.  Most of the implementations have grown weeds for this so they
copy some fields from mnt_stat if the passed argument isn't that.

Fix this the cleaner way:  Always call the implementation on mnt_stat
and copy that in toto to the VFS_STATFS argument if different.
2004-12-05 22:41:02 +00:00
marcel
8b42e21d12 Fix null-pointer indirect function calls introduced in the previous
commit. In the new world order, the transitive closure on the vector
operations is not precomputed. As such, it's unsafe to actually use
any of the function pointers in an indirect function call. They can
be null, and we need to use the default vector in that case.
This is mostly a quick fix for the four function pointers that are
ed explicitly. A more generic or scalable solution is likely to see
the light of day.

No pathos on: current@
2004-12-05 22:30:28 +00:00
rwatson
a12b213cad Assert inpcb lock in:
tcpip_fillheaders()
  tcp_discardcb()
  tcp_close()
  tcp_notify()
  tcp_new_isn()
  tcp_xmit_bandwidth_limit()

Fix a locking comment in tcp_twstart(): the pcbinfo will be locked (and
is asserted).

MFC after:	2 weeks
2004-12-05 22:27:53 +00:00
rwatson
386bd91d54 Minor grammer fix in comment. 2004-12-05 22:20:59 +00:00
rwatson
338b787cfd Pass the inpcb reference into ip_getmoptions() rather than just the
inp->inp_moptions pointer, so that ip_getmoptions() can perform
necessary locking when doing non-atomic reads.

Lock the inpcb by default to copy any data to local variables, then
unlock before performing sooptcopyout().

MFC after:	2 weeks
2004-12-05 22:08:37 +00:00
rwatson
f2988d54de Define INP_UNLOCK_ASSERT() to assert that an inpcb is unlocked.
MFC after:	2 weeks
2004-12-05 22:07:14 +00:00
alc
fcf141e6aa Correct a sanity check in vnode_pager_generic_putpages(). The cast used
to implement the sanity check should have been changed when we converted
the implementation of vm_pindex_t from 32 to 64 bits.  (Thus, RELENG_4 is
not affected.)  The consequence of this error would be a legimate write to
an extremely large file being treated as an errant attempt to write meta-
data.

Discussed with: tegge@
2004-12-05 21:48:11 +00:00
pjd
cdb5b5cf1c 'all' argument for list_net_interfaces() is now unused, remove it. 2004-12-05 21:45:36 +00:00
rwatson
514977fc0b Push the inpcb argument into ip_setmoptions() when setting IP multicast
socket options, so that it is available for locking.
2004-12-05 21:38:33 +00:00
deischen
5a270f5b3c Make sure the first argument to the user function is 16-byte aligned.
Submitted by:	tegge
2004-12-05 21:22:08 +00:00
obrien
70d525536e When panicing in device_unbusy(), actually tell what device has the issue. 2004-12-05 20:58:56 +00:00
rwatson
8529052f76 Forced commit to note that the previous revision, 1.233, should be:
MFC after:	2 weeks
2004-12-05 19:12:06 +00:00
rwatson
ef102033be Start working through inpcb locking for ip_ctloutput() by cleaning up
modifications to the inpcb IP options mbuf:

- Lock the inpcb before passing it into ip_pcbopts() in order to prevent
  simulatenous reads and read-modify-writes that could result in races.
- Pass the inpcb reference into ip_pcbopts() instead of the option chain
  pointer in the inpcb.
- Assert the inpcb lock in ip_pcbots.
- Convert one or two uses of a pointer as a boolean or an integer
  comparison to a comparison with NULL for readability.
2004-12-05 19:11:09 +00:00
glebius
4f260d49bc - Use uint16_t to pass argument for NGM_NETFLOW_IFINFO, bump cookie.
- Always check that index number passed from userland
  is <= NG_NETFLOW_MAXIFACES. [1]
- Increase NG_NETFLOW_MAXIFACES up to 512. [2]

Noticed by:	Roman Palagin [1]
Requested by:	Yuri Y. Bushmelev [2]
MFC after:	1 week
2004-12-05 14:30:38 +00:00
ru
0d2cefc65d Show divert(4) sockets as well. 2004-12-05 14:17:14 +00:00
rwatson
7679ddf408 Correct a misspelling in a comment. 2004-12-05 13:28:52 +00:00
rwatson
c39858036f Acquire socket receive buffer mutex before appending and then waking up
a receive socket in DDP.  This reduces the number of mutex operations
required to deliver to a socket by two, and is the model used in other
protocols.
2004-12-05 13:27:30 +00:00
simon
cf8726aa55 DDB_UNATTENDED is now called KDB_UNATTENDED.
MFC after:	3 days
2004-12-05 12:48:07 +00:00
dhartmei
de7cd2f92a IPv6 packets can contain headers (like options) before the TCP/UDP/ICMP6
header. pf finds the first TCP/UDP/ICMP6 header to filter by traversing
the header chain. In the case where headers are skipped, the protocol
checksum verification used the wrong length (included the skipped headers),
leading to incorrectly mismatching checksums. Such IPv6 packets with
headers were silently dropped.

Discovered by:	Bernhard Schmidt
MFC after:	1 week
2004-12-05 12:15:43 +00:00
rse
68bef2dca5 Use "ifconfig -l" instead of "list_network_interfaces all" in
ifnet_rename() to support situations where rc.conf's $network_interfaces
variable is set to an explicit list of network interfaces (instead of
the default "auto").

Using "list_network_interfaces all" resulted in using
$network_interfaces for both interface _renaming_ and interface
_configuration_ which obviously cannot work either before (if the
new name is in $network_interfaces) or after (if the old name is in
$network_interfaces) renaming the interface.
2004-12-05 09:51:48 +00:00
rse
638d03f597 fix typo: s/intefraces/interfaces/ 2004-12-05 09:01:20 +00:00
imp
29f3f48407 Start to add GIANT_REQUIRED; macros in places where giant is required
and that I've verified things seem to basically work.  I was able to
boot and hot plug usb devices.  Please let me know if this causes
problems for anybody.

The push down of giant has proceeded to the point that this will start
to matter more and more.
2004-12-05 07:55:30 +00:00
marcel
89c49e5178 Source changes to allow building a cross-debugger. Move solib.c and
solib-svr4.c to the MD makefiles because they are native files for
alpha and sparc64, but target files for amd64, i386 and ia64.

Note that kgdb(1) does not yet build as a cross-debugger due to
libkvm.
2004-12-05 06:59:01 +00:00
marcel
b898758464 o Don't limit GPT as a rank 2 provider. Allow it to be connected
anywhere in the DAG. This includes configurations that are not
   allowed by the EFI specification.
o  Reject a GPT partition table if it's not preceeded by a PMBR.
   There's no need to preserve the MBR partitioning anymore as GPT
   is mature and with the first bullet extending the applicability
   of GPT, it's better to be a bit more strict.
2004-12-05 06:02:21 +00:00
obrien
91a6b9ee83 Now as a full blown port. 2004-12-05 04:16:36 +00:00
marcel
97caf4c3a0 Fix previous commit. GDB_CROSS_DEBUGGER needs to be defined for all
subdirectories.
2004-12-05 04:08:22 +00:00
njl
c3df9439cf Grab Giant around calls to DEVICE_SUSPEND/RESUME in acpi_SetSleepState().
If we are resuming non-MPSAFE drivers, they need Giant held for them.
This may fix some obscure suspend/resume problems.  It has fixed keyrate
setting problems that were triggered by cardbus (MPSAFE) changing the
ordering for syscons resume (non-MPSAFE).  Also, add some asserts that
Giant is held in our suspend/resume and shutdown methods.

Found by:	iedowse
MFC after:	2 days
2004-12-05 01:35:18 +00:00
kris
cb6038510d Add more frequently-used locale directories. This is in preparation
for cleanup of pkg-plist files with respect to handling of the share/locale
subdirectories.

MFC after: 3 days
2004-12-04 23:30:36 +00:00
marks
4b4b34e8d5 Document ACPI tunable hw.acpi.serialize_methods.
Also reorder tunables.

Approved by:	njl
MFC after:	1 week
2004-12-04 23:26:46 +00:00
alc
dbfbcad51b Replace (inlined) pmap_pte() calls with smaller, faster code where
possible, such as the inner loop of pmap_copy().

Remove two comments that apply to i386 but not amd64.
2004-12-04 22:02:31 +00:00
pjd
ca88614a1e When initializing device, set d_softc and d_no fields for all components,
because we know it then and we need it when inserting a component which
wasn't destroyed while device was running.

Reported by:	Michael Handler <handler@grendel.net>
MFC after:	1 week
2004-12-04 21:20:59 +00:00
simon
174d5d0fa0 - Change license to standard 2 clause BSD. [1]
- Add a missing period.

Noticed by:	ru
Approved by:	Jorge Mario G. Mazo <jgutie11@eafit.edu.co> [1]
2004-12-04 19:01:20 +00:00
marius
1f07555c9d Revert rev. 1.166 and remove sparc64/pci/ofw_pci_if.m from MFILES again,
sparc64/pci/ofw_pci.h is no longer required for compiling modules.
2004-12-04 14:20:56 +00:00
marius
0b4d466c6f Catch up with the new device name of sab(4). The entries for tty[a,b]
can't be removed as ofw_console(4) and zs(4) use them so one has to
live with some complaints about non-existent devices at boot time and
remove the respective entries locally for now.
2004-12-04 14:03:45 +00:00
phk
c47c85d39e Remove #if 0'ed rootfs mounting code. 2004-12-04 09:58:20 +00:00
phk
3bb4ccf412 Remove embryonic rootfs mounting facility.
In the near future rootfs mounting will not require special handling
in the filesystems.
2004-12-04 09:57:38 +00:00
obrien
a49cb2018c Replace GNU tar with BSD tar. 2004-12-04 08:24:36 +00:00
brooks
ca26eca762 kmod.mk knows how to create empty opt_*.h files so let it deal with the
NOINET6 case.

Reported by:	ru
2004-12-03 23:43:02 +00:00
phk
7a77ca68a3 Implement a function, mount_arg() for accumulating a list of mount parameters
to nmount.

Make kernel_mount() accept the output from mount_arg() and know how to
free the malloc'ed space.

Make kernel_vmount() use the new function.
2004-12-03 22:38:06 +00:00
phk
8bc17baa39 Sort and wash #includes. 2004-12-03 21:29:25 +00:00
phk
81de6df0c1 When omount() is called, check if the filesystem have a cmount method
and if so call it.

The cmount method will gather and interpret omount() style arguments,
and issue a kern_[v]mount() call to execute the corresponding nmount
operation.
2004-12-03 21:14:46 +00:00
phk
a3935187b0 typo in comment. 2004-12-03 20:36:55 +00:00
phk
3c01ff1abb Add vfs_cmount() method to vfs_ops, this is to convert old-style mount
args to nmount request.
2004-12-03 19:33:19 +00:00
phk
81f68b35d9 Add early checks for MNT_ROOTFS since we need to allow it later on in
the code path.
2004-12-03 19:25:44 +00:00
phk
05e3a601c2 Retire unused vfs_mount() function in the name of nmount migration. 2004-12-03 18:40:58 +00:00
mdodd
5f1d43e2ed - Simplify pcn_probe() by moving vendor/device matching code to pcn_match().
- Avoid LOR in pcn_probe() by removing useless mutex stuff.
2004-12-03 18:35:00 +00:00
mdodd
aa6945f506 - Move chip ID code into separate function.
- Initialize sc->pcn_type during ATTACH as softc contents may not surivive
  from PROBE.
- Print out chip-id to assist with ongoing pcn(4) debugging efforts.
2004-12-03 18:21:30 +00:00
phk
b0e48f2258 Do not blindly pass linux filesystem specific mount data across. 2004-12-03 18:14:22 +00:00