Alan Cox [Mon, 6 May 2002 06:20:04 +0000 (06:20 +0000)]
o Header files shouldn't depend on options: Provide prototypes
for uiomoveco(), uioread(), and vm_uiomove() regardless
of whether ENABLE_VFS_IOOPT is defined or not.
Jeff Roberson [Mon, 6 May 2002 04:47:43 +0000 (04:47 +0000)]
Hold the currently selected vnode's lock across the call to VOP_GETVOBJECT.
Don't try to create a vm object before the file system has a chance to finish
initializing it. This is incorrect for a number of reasons. Firstly, that
VOP requires a lock which the file system may not have initialized yet. Also,
open and others will create a vm object if it is necessary later.
Tim J. Robbins [Mon, 6 May 2002 04:33:04 +0000 (04:33 +0000)]
Affect the first of stdin, stdout and stderr that is attached to a terminal.
Write status information to stdout instead of stderr.
Exit status when an error occurs musn't be 1, that is reserved for
indicating that messages are disabled.
These changes bring mesg(1) up to SUSv3 conformance.
Juli Mallett [Mon, 6 May 2002 03:38:28 +0000 (03:38 +0000)]
-I and -J both set the same variable, replstr, to the string to replace with
a line of input, and both work differently, so prevent them from both being
passed to xargs(1).
Bruce Evans [Mon, 6 May 2002 03:13:08 +0000 (03:13 +0000)]
Include <sys/queue.h> so that this file provides its own namespace
pollution which is required for its includes of <sys/_lock.h> and
<sys/_mutex.h> to work.
Mark Peek [Mon, 6 May 2002 00:25:36 +0000 (00:25 +0000)]
- Properly initialize the count_win when the user turns the info window
back on (and count_win is recreated).
- Create info_win as the same size for all invocations.
Bruce Evans [Mon, 6 May 2002 00:05:44 +0000 (00:05 +0000)]
Restored db_elf.c from the Attic. This will be used for a quick fix for
the longstanding brokenness of symbols in ddb at boot time. It doesn't
compile and is not attached to the build yet.
Alan Cox [Sun, 5 May 2002 22:42:40 +0000 (22:42 +0000)]
o Condition the compilation of uiomoveco() and vm_uiomove()
on ENABLE_VFS_IOOPT.
o Add a comment to the effect that this code is experimental
support for zero-copy I/O.
Chris Costello [Sun, 5 May 2002 22:09:12 +0000 (22:09 +0000)]
Begin to turn some of the code in this man page into documentation.
Move the code that I have not yet finished documenting into the
`IMPLEMENTATION NOTES' section.
Sponsored by: DARPA, NAI Labs
Obtained from: TrustedBSD Project
Luigi Rizzo [Sun, 5 May 2002 21:34:10 +0000 (21:34 +0000)]
Fix a couple of problems which could cause panics at runtime:
+ setting a bandwidth too large for a pipe (above 2Gbit/s) could
cause the internal representation (which is int) to wrap to a
negative number, causing an infinite loop in the kernel;
+ (see PR bin/35628): when configuring RED parameters for a queue,
the values are not passed to the kernel resulting in panics at
runtime (part of the problem here is also that the kernel does
not check for valid parameters being passed, but this will be
fixed in a separate commit).
These are both critical fixes which need to be merged into 4.6-RELEASE.
Maxim Sobolev [Sun, 5 May 2002 21:03:25 +0000 (21:03 +0000)]
New feature: allow origins of all dependencies be recorded into package list
using new `@comment DEPORIGIN:...' directive. This would allow us to make
many neat things including:
- easier binary upgrades;
- source upgrades without using external tools by simply extending
bsd.port.mk and pkg_install tools;
- mixed-mode upgrades (source + binary);
- depreciate and deorbit silly +REQUIRED_BY files in the near future.
This feature is no-op until appropriate bsd.port.mk patch is committed, and
even when it is already committed packages generated will remain 100%
compatible with old set of pkg_install tools (module all those neat
features, of course).
Maxim Sobolev [Sun, 5 May 2002 20:50:27 +0000 (20:50 +0000)]
In a origin lookup mode (-O) don't bail out when encountering empty package
directory, because this prevent this option from being used from the
package-depends target of bsd.port.mk since it creates such empty dir
during its normal operation.
Luigi Rizzo [Sun, 5 May 2002 20:43:27 +0000 (20:43 +0000)]
Bring in a slightly older version of usr/bin/passwd which does not
require libpam and all the libraries that libpam brings in.
We have no room for those on picobsd images.
Maxime Henrion [Sun, 5 May 2002 13:47:21 +0000 (13:47 +0000)]
Add a KERNELDUMPMAGIC_CLEARED macro to unbreak savecore. Since
it is a "magic" value, what it expands to is not really important.
I set it to "Cleared Kernel Dump", but that can be changed later
if someone thinks it's not good enough.
Juli Mallett [Sun, 5 May 2002 06:42:44 +0000 (06:42 +0000)]
Modify the -p implementation to use a user's locale, so they can respond to
the prompt in their native language.
Also make the prompt fit what POSIX asks for (?...).
This should not affect use of -p with yes(1) [as every locale I know of matches
'y' as YESEXPR as well], but that's what -t is for anyway. -p is meant to be
really used interactively.
Alan Cox [Sun, 5 May 2002 05:36:28 +0000 (05:36 +0000)]
o Remove GIANT_REQUIRED from vm_map_lookup() and vm_map_lookup_done().
o Acquire and release Giant around vm_map_lookup()'s call
to vm_object_shadow().
Juli Mallett [Sun, 5 May 2002 04:42:50 +0000 (04:42 +0000)]
Check for possible overflow from sysconf _SC_ARG_MAX and error out in a
correct manner. Revert my incorrect change to use err(3) for malloc(3)
failing. Use a size_t variable to store the size of the argument buffer
we allocate, and remove silly casts as the result of having this around.
Modify the math in some of the paranoid checks for buffer overflow to
account for the fact we now are dealing with the actual size of the
buffer. Remove the static qualifier for arg_max, and the bogus setting
of it to -1.
Include <limits.h> for the definitions we use to check for possible
overflows.
Bruce Evans [Sun, 5 May 2002 04:33:09 +0000 (04:33 +0000)]
Fixed breakage of binary compatibility of the kern.clockrate sysctl in
sys/time.h rev.1.53, etc. Zero out the entire struct clkinfo and not
just the new spare part of it so that there is no possibility of leaking
kernel stack context to userland.
Bruce Evans [Sun, 5 May 2002 03:19:48 +0000 (03:19 +0000)]
Fixed checking for VM86 mode in doreti which I broke in rev.1.30. Only
the case of VM86 calls from the kernel was broken, so this bug was not
a security hole.
PR: 36710
Submitted by: David Xu <davidx@viasoft.com.cn> (version for RELENG_4)
MFC after: 3 days
Juli Mallett [Sun, 5 May 2002 02:46:53 +0000 (02:46 +0000)]
In an effort to make this utility easier to work with at a source level, move
out the parse loop to a seperate function, and move local variables around as
is needed. To keep the state of some variables and keep from having huge arg
lists to functions, make a bunch global.
Change use of err(3) in situations where malloc(3) will be setting errno to
errx(3) since assuming malloc(3) sets errno is non-portable, and provides no
more useful information in the context of FreeBSD.
Submitted by: bde (err/errx), Carl Schmidt <cschmidt@slackerbsd.org> (some
of the movement of the input loop to a function)
Approved by: src/tools/regression/usr.bin/xargs
Bill Fenner [Sun, 5 May 2002 01:04:00 +0000 (01:04 +0000)]
- revert back to vmcore.#
- reimplement -z
- use syslog()
- improve consistancy of messages
- allow -f to recover cleared dumps
- return bufsize to 1024 * 1024
- return the ability to write sparse files
- update man page
- fix minfree to require 2k for info file instead of the kernel size
- include Berkeley copyright too due to amount of old code copied
Crist J. Clark [Sun, 5 May 2002 00:59:37 +0000 (00:59 +0000)]
Remove leading whitespace from the setuid file lists.
Due to the way we run ls(1), through xargs(1), the leading whitespace
can change even when the setuid files haven't. To avoid displaying
these lines, we currently run diff(1) with the '-w' option. However,
this is probably not the ideal way to go; there is a very, very small
possibility for diff(1) to miss things is shouldn't. So, with the
leading space cleaned, we can revert to the '-b' option which is
"safer."
PR: conf/37618
Reviewed by: brian
MFC after: 3 days
Doug Barton [Sat, 4 May 2002 22:45:12 +0000 (22:45 +0000)]
* Add some niceties to make the -p option quieter, and better behaved
* Take a simple idea about setting the screen width using stty (for sdiff's
purposes) thoughtfully suggested by Joerg to an absurd conclusion.
Jeff Roberson [Sat, 4 May 2002 21:49:29 +0000 (21:49 +0000)]
Use pages instead of uz_maxpages, which has not been initialized yet, when
creating the vm_object. This was broken after the code was rearranged to
grab giant itself.
Alan Cox [Sat, 4 May 2002 20:23:48 +0000 (20:23 +0000)]
o Make _vm_object_allocate() and vm_object_allocate() callable
without holding Giant.
o Begin documenting the trivial cases of the locking protocol
on vm_object.
Bill Fenner [Sat, 4 May 2002 17:45:48 +0000 (17:45 +0000)]
Restore the ability interrupt dumps on i386, based on
the old kern_shutdown.c . Other archs might be able to
use similar code but I don't have anything to test on.
Maxime Henrion [Sat, 4 May 2002 15:42:38 +0000 (15:42 +0000)]
When a program launched on the local console exits, the shell will
call read() to get the next command, and scread() disables the
screensaver. We don't want this behaviour in the sc_saver_keybonly
case.
Doug Rabson [Sat, 4 May 2002 12:21:32 +0000 (12:21 +0000)]
Use region 7 addresses for the slabs in the PV and PT zones so that we
don't confuse the zone allocater by translating region 5 addresses to
region 7 addresses (which is unavoidable for PTEs).
Do not call nge_tick() if we get an PHY interrupt, nge_tick() calls
mii_tick() which should only be called once per second.
Our current MII/PHY state-engine is not able to deal with PHY
interrupts as far as I can tell, and most net drivers don't seem
to use the link/status change call-back mechanism. It seems that
MII/PHY was orphaned before it grew up.
Clean up mii/phy drivers: Remove the MIIF_DOINGAUTO which doesn't really
do anything at the end of the day except bloat the drivers which has
copy&pasted it.
Maxime Henrion [Sat, 4 May 2002 10:36:35 +0000 (10:36 +0000)]
Restore the minfree functionality into savecore. This patch
restores the check_space() function with small modifications
to make it work with the current code. The patch was slightly
modified by Bill Fenner to handle error messages better.
Make sure we don't index the pm_rid array out of bounds in
pmap_ensure_rid(). This can happen because the function is
called for both user and kernel addresses, while the rid array
only has room for user addresses. This bug got exposed by rev
1.58 of ia64/ia64/pmap.c and rev 1.8 of ia64/include/pmap.h.
Warner Losh [Sat, 4 May 2002 04:59:20 +0000 (04:59 +0000)]
Try to de-confuse ad-hoc, demo ad-hoc and ibss:
o Don't ever refer to ad-hoc mode in the raw. Instead, refer to it as
demo ad-hoc mode or lucent legacy demo ad-hoc or some variation on this
theme.
o Talk about point-to-point modes rather than ad-hoc modes. Use ibss where
appropriate.
o Fix type IBBS -> IBSS
Juli Mallett [Fri, 3 May 2002 20:46:10 +0000 (20:46 +0000)]
Rename `eqrelval' which was renamed from `eqrel' to quiet a shadow warning
to `op' as suggested by Bruce, as this is used to store the operator between
vl and vr.
Robert Watson [Fri, 3 May 2002 20:28:38 +0000 (20:28 +0000)]
Various updates to VOP_ATTRIB(9): mention locks being shared/exclusive
for VOP_GETATTR() and VOP_SETATTR(), reference VOP_NULL() to suggest
clearing all of *vap with it before setting specific values. Cross
reference VFS(9). Indicate that failure modes are possible from
VOP_GETATTR() and that an errno value is returned.
Juli Mallett [Fri, 3 May 2002 19:45:41 +0000 (19:45 +0000)]
Fix a bug whereby we were getting ~0 and comparing it to maxsize, i.e. if
s1 was 0 length, and replstr was 0 length, etc., we would end up subtracting
one from zero and seeing if it was greater than the size_t (unsigned) var
maxsize... This would cause us to return a string consisting of essentially
only match, which is not the right behaviour if we have 0 length inpline.
Warner Losh [Fri, 3 May 2002 18:11:17 +0000 (18:11 +0000)]
Minor tweaks:
o go ahead and document ibss-master and ibss modes, since there are
patches in the pipeline to support them.
o Note that they aren't implemented yet.
o Note that different regulatory domains have different default
channels.
o Note that Lucent cards prior to firmware 6.0.4 do not support
ibss mode, and only support the older demo ad-hoc mode.
o Note that PRISM2 chipsets do not support WDS mode of operation
(the mysterious -p 2 option).
Juli Mallett [Fri, 3 May 2002 17:41:54 +0000 (17:41 +0000)]
Move substitution out to a function, prerun(), and replace use of run() with
it. It handles everything (right now) that needs done before run(), except
the -J case, because while that would be easy, I don't quite understand -J.