Commit Graph

112454 Commits

Author SHA1 Message Date
Robert Watson
a7ae36bc45 Correct a typo in the comment describing soreceive_rcvoob().
MFC after:	3 days
2005-02-18 19:15:22 +00:00
Robert Watson
1b5c4b15b4 In soconnect(), when resetting so->so_error, the socket lock is not
required due to a straight integer write in which minor races are not
a problem.
2005-02-18 19:13:51 +00:00
Robert Watson
11d06c4b78 Re-style do_setopt_accept_filter() to match uipc_accf.c style, and fix
one other style nit in the file.

MFC after:	3 days
2005-02-18 19:01:22 +00:00
John Baldwin
38765a3178 - Add a custom version of exec_copyin_args() to deal with the 32-bit
pointers in argv and envv in userland and use that together with
  kern_execve() and exec_free_args() to implement freebsd32_execve()
  without using the stackgap.
- Fix freebsd32_adjtime() to call adjtime() rather than utimes().  Still
  uses stackgap for now.
- Use kern_setitimer(), kern_getitimer(), kern_select(), kern_utimes(),
  kern_statfs(), kern_fstatfs(), kern_fhstatfs(), kern_stat(),
  kern_fstat(), and kern_lstat().

Tested by:	cokane (amd64)
Silence on:	amd64, ia64
2005-02-18 18:56:04 +00:00
Robert Watson
78e436448f Move do_setopt_accept_filter() from uipc_socket.c to uipc_accf.c, where
the rest of the accept filter code currently lives.

MFC after:	3 days
2005-02-18 18:54:42 +00:00
John Baldwin
1d15fdd97b - Add a custom version of exec_copyin_args() to deal with the 32-bit
pointers in argv and envv in userland and use that together with
  kern_execve() and exec_free_args() to implement linux_execve() for the
  amd64/linux32 ABI without using the stackgap.
- Implement linux_nanosleep() using the recently added kern_nanosleep().
- Use linux_emul_convpath() instead of linux_emul_find() in
  exec_linux_imgact_try().

Tested by:	cokane
Silence on:	amd64
2005-02-18 18:51:59 +00:00
Robert Watson
1ed716a149 Minor style tweaks: line wrap comments and lines more consistently.
MFC after:	3 days
2005-02-18 18:49:44 +00:00
Robert Watson
627de7fa2c Re-order checks in socheckuid() so that we check all deny cases before
returning accept.

MFC after:	3 days
2005-02-18 18:43:33 +00:00
John Baldwin
fb72f180d5 - Implement osf1_emul_find() using kern_alternate_path(). This changes
the semantics in that the returned filename to use is now a kernel
  pointer rather than a user space pointer.  This required changing the
  arguments to the CHECKALT*() macros some and changing the various system
  calls that used pathnames to use the kern_foo() functions that can accept
  kernel space filename pointers instead of calling the system call
  directly.
- Use kern_open(), kern_stat(), kern_lstat(), kern_fstat(), kern_access(),
  kern_truncate(), kern_pathconf(), kern_execve(), kern_select(),
  kern_setitimer(), kern_getitimer(), kern_statfs(), and kern_fstatfs().

Silence on:	alpha@
2005-02-18 18:37:26 +00:00
John Baldwin
f4b3589bdb Use LCONVPATHEXIST() rather than CHECKALTEXIST() and use
exec_copyin_args(), kern_execve(), and exec_free_args() rather than
execve() to eliminate stackgap use from Alpha's linux_execve().

Silence on:	alpha@
2005-02-18 18:32:32 +00:00
Warner Losh
2daa7a07ae For the I/O port case, we need to set ok to 1 if we have what looks
like a valid range.  We already do this in the memory case (although
the code there is somewhat different than the I/o case because we have
to deal with different kinds of memory).  Since most laptops don't
have non-subtractive bridges, this wasn't seen in practice.

Evidentally the Compaq R3000 hits this problem with PC Cards.

Some minor style fixes while I'm here.

Submitted by: Jung-uk Kim
2005-02-18 17:35:03 +00:00
Olivier Houchard
1a34245881 Support high vectors for arm9.
Obtained from:	NetBSD
2005-02-18 17:29:12 +00:00
Daniel Eischen
0e963ec574 Somewhere along the line, tick accumulation for SA threads was
changed to use the statclock.  Make sure we calculate the value
of a tick correctly in userland.

Noticed by:	Kazuaki Oda <kaakun at highway dot ne dot jp>
2005-02-18 16:07:05 +00:00
Marius Strobl
7b50d90fde Silence witness warnings about duplicate pmap lock emitted since
rev. 1.145 of sys/sparc64/sparc64/pmap.c.

Submitted by:	alc
2005-02-18 15:37:34 +00:00
Hartmut Brandt
7f2e1af188 Push the assignments of some variables down into the sub-blocks where
it is actually needed. This makes clear in which subblocks the variables
are not needed and which can easier be split out.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-18 15:32:06 +00:00
Robert Watson
1bfca411a6 Remove basically unused root_vp pointer in udfmount.
MFC after:	1 week
Discussed with:	scottl
2005-02-18 11:47:51 +00:00
Poul-Henning Kamp
900b7e2648 Make sure to drop the VI_LOCK in vgonel();
Spotted by: Taku YAMAMOTO <taku@tackymt.homeip.net>
2005-02-18 11:13:56 +00:00
Robert Watson
0d0549a245 Run the netatalk netisrs without Giant.
MFC after:	1 week
2005-02-18 10:53:00 +00:00
Robert Watson
5d0c377bfe Conditionalize cd9660 chattiness regarding the nature of the file system
mounted (is it Joliet, RockRidge, High Sierra) based on bootverbose.
Most file systems don't generate log messages based on details of the
file system superblock, and these log messages disrupt sysinstall output
during a new install from CD.  We may want to explore exposing this
status information using nmount() at some point.

MFC after:	3 days
2005-02-18 10:49:55 +00:00
David E. O'Brien
a71cc81a25 For non-embedded platforms, increase the size of the argument list.
Note that this results in more kernel virtual memory being reserved for
temporary storage of the args.  The args temporary space is allocated out
of exec_map (a submap of kernel_map).  This will use roughly 4MB of KVM.

OK'ed by:	dg
2005-02-18 08:01:59 +00:00
Hartmut Brandt
1aaa4432a5 Push down variables into local scope in Var_Parse to make their
liveness clear for splitting up this monster function.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-18 07:33:43 +00:00
Bill Paul
e6f328fb03 Fix a couple of u_int_foos that should have been uint_foos. 2005-02-18 04:33:34 +00:00
Bill Paul
6e121c5427 Make the Win64 -> ELF64 template a little smaller by using a string
copy op to shift arguments on the stack instead of transfering each
argument one by one through a register. Probably doesn't affect overall
operation, but makes the code a little less grotty and easier to update
later if I choose to make the wrapper handle more args. Also add
comments.
2005-02-18 03:22:37 +00:00
Robert Watson
0d89301c51 In solisten(), unconditionally set the SO_ACCEPTCONN option in
so->so_options when solisten() will succeed, rather than setting it
conditionally based on there not being queued sockets in the completed
socket queue.  Otherwise, if the protocol exposes new sockets via the
completed queue before solisten() completes, the listen() system call
will succeed, but the socket and protocol state will be out of sync.
For TCP, this didn't happen in practice, as the TCP code will panic if
a new connection comes in after the tcpcb has been transitioned to a
listening state but the socket doesn't have SO_ACCEPTCONN set.

This is historical behavior resulting from bitrot since 4.3BSD, in which
that line of code was associated with the conditional NULL'ing of the
connection queue pointers (one-time initialization to be performed
during the transition to a listening socket), which are now initialized
separately.

Discussed with:	fenner, gnn
MFC after:	3 days
2005-02-18 00:52:17 +00:00
Nate Lawson
7b6b718186 Document the cpufreq_drv_type() method and info-only flag. 2005-02-18 00:28:52 +00:00
Nate Lawson
e94a0c1a18 Introduce a new method, cpufreq_drv_type(), that returns the type of the
driver.  This used to be handled by cpufreq_drv_settings() but it's
useful to get the type/flags separately from getting the settings.
(For example, you don't have to pass an array of cf_setting just to find
the driver type.)

Use this new method in our in-tree drivers to detect reliably if acpi_perf
is present and owns the hardware.  This simplifies logic in drivers as well
as fixing a bug introduced in my last commit where too many drivers attached.
2005-02-18 00:23:36 +00:00
Paul Saab
7643c37cf2 Remove 2 (SACK) fields from the tcpcb. These are only used by a
function that is called from tcp_input(), so they oughta be passed on
the stack instead of stuck in the tcpcb.

Submitted by:	Mohan Srinivasan
2005-02-17 23:04:56 +00:00
Scott Long
348c9a5668 Fix a small style problem and add a __packed pragma for safety. 2005-02-17 21:09:26 +00:00
Warner Losh
e8c3bb6966 memspace is set to some value by masking off bits. When these bits
are equal to PCCARD_TPCE_FS_MEMSPACE_NONE, memspace will be zero, so
testing for this case inside of the if statement results in dead code.
We'd fail to set a value to zero that's already zero (since it is
initialized to 0 indirectly) with this code being there.  Well, except
in the very rare case that we have a card that has a defualt entry
that includes a memory space followed by one that has no memory space
(these are extremely rare, I don't recall ever having seen one :-).

Fix this by setting num_memspace to 0 in a more appropriate place.

Submitted by: Coverity Prevent analysis tool
2005-02-17 21:05:04 +00:00
Vinod Kashyap
7a824c3756 Undoing recent changes to make 3ware's i386 tools work on amd64, since there are
now amd64 versions of CLI and 3DM2 available.
2005-02-17 19:05:42 +00:00
Nate Lawson
8f118e25ec Check for the address space type first before validating it. In particular,
we want to return EOPNOTSUPP for FFixedHW no matter what the address.

Submitted by:	Bruno Ducrot
2005-02-17 19:00:14 +00:00
Warner Losh
711c07db68 Fix the support for the ax88[17]90 to print the right type, rather
than the generic ne-2000 string.  This should have no effect on the
actual support of the parts, just reporting what the part was.

Also, rename a few functins and symbols to reflect a more generic
part support that grew out of the early specific support.
2005-02-17 18:15:13 +00:00
Ruslan Ermilov
be2ff1d140 Make the on-disk format of .dat files produced by strfile(8)
architecture independent.  Besides the fixed-width types in
the header, the offsets are now stored as 64-bit off_t (also
in big endian format).

Tested on:	i386, amd64, sparc64, ia64
2005-02-17 18:06:37 +00:00
Herve Quiroz
f812d8f8c6 Add myself to the calendar 2005-02-17 16:38:56 +00:00
Lukas Ertl
3608f72533 In case of drive errors, don't close the associated consumer and
detach it, but instead let the geom wither away.

Bump copyright year.
2005-02-17 16:08:36 +00:00
Christian Brueffer
40dda406a4 Remove dublicated device entry from the synopsis.
Submitted by:	Ulrich Spoerlein <q@uni.de>
MFC after:	3 days
2005-02-17 16:01:20 +00:00
Robert Watson
1eb7608e00 Mark netatm and netnatm explicitly as requiring Giant, as they still do.
MFC after:	3 days
2005-02-17 14:21:22 +00:00
Robert Watson
1e8f89541e In accept1(), extend coverage of the socket lock from just covering
soref() to also covering the update of so_state.  While no other user
threads can update the socket state here as it's not yet hooked up to
the file descriptor array yet, the protocol could also frob the
socket state here, leading to a lost update to the so_state field.
No reported instances of this bug (as yet).

MFC after:      3 days
2005-02-17 13:00:23 +00:00
Robert Watson
280249a66a In sonewconn(), set the new socket's state to show the protocol-provided
connection status before inserting the new socket into the listen
socket's accept queue, or there might be a race in which another thread
wakes up when the accept lock is released, and sees the socket before its
state is set correctly.  The wakeup still occurs after the accept lock is
released.  There have been no diagnoses of this bug in real-world systems
(as yet).

MFC after:	3 days
2005-02-17 12:53:45 +00:00
Hartmut Brandt
5fdd47f89b Whitespace cleanup: substitute mixed tabs and spaces by canonical
whitespace and line up some variable definitions.
2005-02-17 12:35:32 +00:00
Hartmut Brandt
b2a8c56e3a Move error case to begin of if-else chain. Do not needless initialize
startc, but only at the place where the initialisation is needed. Remove
a needless else.

Submitted by:	Max Okumoto <okumoto@ucsd.edu> (partly)
2005-02-17 12:31:53 +00:00
Dag-Erling Smørgrav
b32a1f4405 Document the new default init_path.
Reminded by:	ru
MFC after:	2 weeks
2005-02-17 11:14:45 +00:00
Poul-Henning Kamp
4d8ac58b05 Introduce vx_wait{l}() and use it instead of home-rolled versions. 2005-02-17 10:49:51 +00:00
Poul-Henning Kamp
58aac12894 Convert KASSERTS to VNASSERTS 2005-02-17 10:28:58 +00:00
Dag-Erling Smørgrav
f3f4baf099 Add /rescue/init to the default init_path, before /stand/sysinstall.
MFC after:	2 weeks
2005-02-17 10:00:10 +00:00
Hartmut Brandt
3ff4a47ba0 Fix two typos in comments.
Submitted by:	ru & Max Okumoto <okumoto@ucsd.edu>
2005-02-17 09:09:34 +00:00
Hartmut Brandt
768820f8c7 Sort out the error case that a single '$' was passed a little bit
earlier instead of mixing its handling with other cases.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-17 09:01:19 +00:00
Pyun YongHyeon
a94f16f4fa Fix inteface clear time. pf printed "Thu Jan 1 09:00:01 1970"
in "pfctl -vvsI" output when pf was statically linked to kernel.

Discussed with:	mlaier
2005-02-17 03:36:31 +00:00
Nate Lawson
ededc31dd1 The correct error value for not having enough storage is E2BIG, not
ENOMEM.  The manpage and ichss(4) are correct.
2005-02-17 01:02:58 +00:00
Nate Lawson
6655857ec7 Fix the check for acpi_perf(4) so that we verify if it is fully attached
or just offering info.  In the former case, we don't probe/attach to allow
the ACPI driver precedence.  A refinement of this would be to actually
use the info provided by acpi_perf(4) to get the real CPU clock rates
instead of estimating them but since all systems that support both
acpi_perf(4) and ichss(4) export the control registers to acpi_perf(4),
it can just handle the registers on its own.
2005-02-17 01:01:40 +00:00