kientzle [Thu, 26 Aug 2004 03:53:43 +0000 (03:53 +0000)]
Don't edit permissions of pre-existing directories during extract.
This closes a security hole. Otherwise, libarchive will happily
extract into directories to which it lacks write permissions by
resetting the permissions during the extract.
simon [Thu, 26 Aug 2004 00:19:54 +0000 (00:19 +0000)]
- Add a HARDWARE section which lists supported devices.
- Mark up each item in the device list with .It, as per mdoc(7) and to
make it simpler for auto generated Hardware Notes to parse the manual
page.
brueffer [Wed, 25 Aug 2004 22:39:05 +0000 (22:39 +0000)]
- put the list of supported adapters into a HARDWARE section
- make the Buffalo entry look better
- properly capitalize Ethernet and Fast Ethernet
- bump document date
marius [Wed, 25 Aug 2004 22:15:33 +0000 (22:15 +0000)]
Don't call uart_bus_probe() for non-matching PnP-devices. Trying to probe
the keyboard controller with uart_bus_probe() caused a hang here on an i386
machine.
ru [Wed, 25 Aug 2004 22:06:29 +0000 (22:06 +0000)]
Fix "make world DESTDIR=/mnt" to work again. A recent change
to make(1) that causes command-line variables to be passed as
command-line variables to sub-processes that make(1) executes
broke it. By changing the type of all DESTDIR variables used
internally in Makefile.inc1, from environment to command-line
variables of the highest priority, I was able to "make world"
with success, with the command-line variable DESTDIR set.
rwatson [Wed, 25 Aug 2004 21:24:36 +0000 (21:24 +0000)]
Don't hold the UNIX domain socket subsystem lock over the body of the
UNIX domain socket garbage collection implementation, as that risks
holding the mutex over potentially sleeping operations (as well as
introducing some nasty lock order issues, etc). unp_gc() will hold
the lock long enough to do necessary deferal checks and set that it's
running, but then release it until it needs to reset the gc state.
imp [Wed, 25 Aug 2004 19:39:13 +0000 (19:39 +0000)]
Recommend using make kernel for current -> current upgrades. No reason
to have multiple commands for that.
Use relative paths into the src tree consistantly in the instructions.
Fix minor nits that have crept into things.
mlaier [Wed, 25 Aug 2004 18:49:32 +0000 (18:49 +0000)]
Document supported devices here (for lack of a better place). Users
interested in ALTQ are likely to type in "man altq" at some point and maybe
they will scroll down to the bottom as well.
obrien [Wed, 25 Aug 2004 18:28:15 +0000 (18:28 +0000)]
Fix a bug in in_cksum_hdr w/o -O.
The C code assumes that the carry bit is always kept from the previous
operation. However, the pointer indexing requires another add operation.
Thus, the carry bit from the first operation is tromped over by the
"addl" operation that ends up following it, so the "adcl" that follows
that has no effect because the carry bit is cleared before it.
The result is checksum failure on received packets.
The larger issue is that there isn't any other way of preventing the compiler
inserting arbitrary instructions between different __asm statements (and
that the commit message in revision 1.13 of in_cksum.h is wrong on
this point). From
http://developer.apple.com/documentation/DeveloperTools/gcc-3.3/gcc/Extended-Asm.html
---8<---8<---8<---
You can't expect a sequence of volatile asm instructions to remain
perfectly consecutive. If you want consecutive output, use a single
asm. Also, GCC will perform some optimizations across a volatile
asm instruction; GCC does not "forget everything" when it encounters
a volatile asm instruction the way some other compilers do.
---8<---8<---8<---
Also, this change also makes the ASM code much easier to read.
PR: 69257
Submitted by: Mike Bristow <mike@urgle.com>, Qing Li <qing.li@bluecoat.com>
rwatson [Wed, 25 Aug 2004 16:52:59 +0000 (16:52 +0000)]
Convert a mtx_lock(&Giant) to a mtx_unlock(&Giant) in nfsrv_link() to
prevent leakage of Giant. With INVARIANTS, this results in an
assertion failure following execution of the RPC. Without INVARIANTS,
it could result in problems if the NFS server is killed causing nfsd
to return to user space holding Giant.
roam [Wed, 25 Aug 2004 16:36:17 +0000 (16:36 +0000)]
Do not display bogus entries for sockets in the TIME_WAIT or similar
states that no longer have a corresponding file descriptor - until now,
sockstat would mostly randomly match null kern.file.*.xf_data fields
with the first mostly-closed socket.
pjd [Wed, 25 Aug 2004 09:31:30 +0000 (09:31 +0000)]
Allocate memory when dumping pipes with M_WAITOK flag.
On a system with huge number of pipes, M_NOWAIT failes almost always,
because of memory fragmentation.
My fix is different than the patch proposed by Pawel Malachowski,
because in FreeBSD 5.x we cannot sleep while holding dummynet mutex
(in 4.x there is no such lock).
My fix is also ugly, but there is no easy way to prepare nice and clean fix.
marcel [Wed, 25 Aug 2004 08:03:48 +0000 (08:03 +0000)]
Get a step closer to profiling the kernel by fixing the definitions
of the MCOUNT_ENTER, MCOUNT_EXIT and MCOUNT_DECL defines. Also make
sure there's a prototype of _MCOUNT_DECL(). This allows us to build
a kernel. There are still unresolved symbols, so linking fails.
marcel [Wed, 25 Aug 2004 07:42:34 +0000 (07:42 +0000)]
Make profiling actually work. The gcc compiler emits a call to the
_mcount() stub when profiling is enabled. Emit this code sequence
for assembly routines as welli (MCOUNT definition in <machine/asm.h>.
We do not pass the GOT entry however as the 4th argument, because it's
not used. The _mcount() stub calls __mcount(), which does the actual
work. Define _MCOUNT_DECL to define __mcount. We do not have an
implementation of mcount(), so we define MCOUNT as empty, but have a
weak alias to _mcount() in _mcount.S.
Note that the _mcount() stub in the kernel is slightly different from
the stub in userland. This is because we do not have to worry about
nested routines in the kernel.
obrien [Wed, 25 Aug 2004 03:38:05 +0000 (03:38 +0000)]
No longer do special handling of Perl. FreeBSD users have all of 5.x
to get used to the fact that Perl is no longer part of the base system.
It is practically impossible to install any useful package and not get
Perl automatically pulled in as a dependency. So the typical user will
get their Perl.
This change greatly reduces the amount of manual labor in building the
miniinst.iso in release building.
rwatson [Wed, 25 Aug 2004 03:37:25 +0000 (03:37 +0000)]
if_dc includes locking, but that locking is disabled by a #ifdef
by default. As such, mark if_dc as IFF_NEEDSGIANT until such
time as appropriate locking review and testing can take place,
and the locking can be enabled by default.
rwatson [Wed, 25 Aug 2004 01:23:38 +0000 (01:23 +0000)]
In nfs_timer(), pass curthread rather than &thread0 into the protocol
send routine. In IPv6 UDP, the thread will be passed to suser(), which
asserts that if a thread is used for a super user check, it be
curthread. Many of these protocol entry points probably need to
accept credentials instead of threads.
paul [Tue, 24 Aug 2004 23:12:16 +0000 (23:12 +0000)]
Add a CVSTAG makefile variable that can be set in /etc/make.conf that
determines which CVS tag to track when running make update. This makes
it easier to configure a box to track a particular release if it does
automated updates from a cvs repository.
imp [Tue, 24 Aug 2004 23:09:57 +0000 (23:09 +0000)]
Clarify what the lockfunc is used for. When it will be called and
when it won't be called. The old wording was correct, but not
sufficiently specific to understand when and how it would be called.
The new wording describes the current implementation's usage (which
should be updated if other appropriate times are decided upon),
specifically that it is called only when the load operation is
deferred to keep the locking state consistent. When the operation
isn't deferred, the calling routine is assumed to have a coherent
locking world.
josef [Tue, 24 Aug 2004 21:37:46 +0000 (21:37 +0000)]
Add snapshots.se.freebsd.org to list of available ftp mirrors.
Dont forget to use X-LATEST as Release Name (where X is version major number)
when you choose a snapshot server.
jhb [Tue, 24 Aug 2004 20:21:21 +0000 (20:21 +0000)]
Fix the ABI wrappers to use kern_fcntl() rather than calling fcntl()
directly. This removes a few more users of the stackgap and also marks
the syscalls using these wrappers MP safe where appropriate.
Tested on: i386 with linux acroread5
Compiled on: i386, alpha LINT
brueffer [Tue, 24 Aug 2004 17:38:53 +0000 (17:38 +0000)]
- move the list of supported adapters to a HARDWARE section
- correct entry for the Belkin card (we don't support 10GbE in sk(4)) :-)
- properly capitalize Gigabit Ethernet
- wordsmithing on a sentence
- bump document date
tjr [Tue, 24 Aug 2004 13:00:55 +0000 (13:00 +0000)]
Replace the current implementations of ftw() and nftw() with the OpenBSD
implementations written by Todd C. Miller. These are cleaner, less buggy
and actively maintained.
rwatson [Tue, 24 Aug 2004 05:28:18 +0000 (05:28 +0000)]
Conditional acquisition of socket buffer mutexes when testing socket
buffers with kqueue filters is no longer required: the kqueue framework
will guarantee that the mutex is held on entering the filter, either
due to a call from the socket code already holding the mutex, or by
explicitly acquiring it. This removes the last of the conditional
socket locking.
imp [Tue, 24 Aug 2004 05:19:15 +0000 (05:19 +0000)]
Set the description to NULL in the right detach routine. This should
keep dangling pointers to strings in loaded modules from hanging
around after the drivers are unloaded.
rwatson [Tue, 24 Aug 2004 04:59:26 +0000 (04:59 +0000)]
Make sure to properly initialize 'size' to sizeof(sin) before passing
it into accept(). Depending on the initial value in memory, it is
otherwise possible to get EINVAL.
rwatson [Tue, 24 Aug 2004 04:02:41 +0000 (04:02 +0000)]
Add a basic kqueue + UNIX domain socket pair regression test to do some
elementary exercising of kqueues on datagram and stream sockets. Note
that the datagram write kqueue case is left untested due to potentially
confusing behavior for the developer (me) that might require attention.
dwhite [Tue, 24 Aug 2004 03:47:41 +0000 (03:47 +0000)]
Pick up changes in rev 1.8 of src/sys/dev/ic/mpt_netbsd.c from NetBSD.
Set the DMA SGL length correctly if the DMA request must be chained because
it is too large to fit in one SGL.
This should fix this driver for some Dell Precision systems.
RELENG_5 candidate.
PR: kern/66479
Submitted by: HITOSHI Osada <qfh02545@nifty.com>
peter [Tue, 24 Aug 2004 00:15:37 +0000 (00:15 +0000)]
struct tm.tm_year is listed as 'years since 1900', and is signed. On
64 bit systems, years roughly -2^31 through 2^31 can be represented in
time_t without any trouble. 32 bit time_t systems only range from
roughly 1902 through 2038. As a consequence, none of the date munging
code for all the various calendar tweaks before then is present. There
are other problems including the fact that there was no 'year zero' and
so on. So rather than get excited about trying to figure out when the
calendar jumped by two weeks etc, simply disallow negative (ie: prior to
1900) years.
This happens to have an important side effect. If you bzero a 'struct
tm', it corresponds to 'Jan 0, 1900, 00:00 GMT'. This happens to be
representable (after canonification) in 64 bit time_t space. Zero tm
structs are generally an error and mktime normally returns -1 for them.
Interestingly, it tries to canonify the 'jan 0' to 'dec 31, 1899', ie:
year -1. This conveniently trips the negative year test above, which
means we can trivially detect the null 'tm' struct.
This actually tripped up code at work. :-/ (Don't ask)
imp [Mon, 23 Aug 2004 23:28:02 +0000 (23:28 +0000)]
Even in a 80 column, fixed point font, there's plenty of room for all
the arguments to bus_dmamap_load, so don't use '...' but list the
actual args. '...' usually means a variable number of args (cf
printf(3)), but bus_dmamap_load takes a fixed number of arguments.
imp [Mon, 23 Aug 2004 23:17:31 +0000 (23:17 +0000)]
In the SYNOPSIS section, move the bus_dmamem_alloc function prototype
to just before bus_dmamem_free, which is (a) more logical; (b) likely
what was originally intended and (c) matches the order in the NAME and
FUNCTIONS sections.
peter [Mon, 23 Aug 2004 21:39:29 +0000 (21:39 +0000)]
Commit Doug White and Alan Cox's fix for the cross-ipi smp deadlock.
We were obtaining different spin mutexes (which disable interrupts after
aquisition) and spin waiting for delivery. For example, KSE processes
do LDT operations which use smp_rendezvous, while other parts of the
system are doing things like tlb shootdowns with a different mutex.
This patch uses the common smp_rendezvous mutex for all MD home-grown
IPIs that spinwait for delivery. Having the single mutex means that
the spinloop to aquire it will enable interrupts periodically, thus
avoiding the cross-ipi deadlock.
mjacob [Mon, 23 Aug 2004 19:04:19 +0000 (19:04 +0000)]
Until I can get a clearer architecture from PHK about why he wants
the geometry code to grab a mutex that prohibits any driver on the
stack below it from sleeping, it's not safe to allow anything in
the top half of isp to sleep (excepting the thread that Fibre Channel
instances use to re-scan loops/fabrics).
imp [Mon, 23 Aug 2004 18:51:36 +0000 (18:51 +0000)]
Add a blanket note about 5.x being the same as 6.0 and vice versa for
the time being. Also add a note that says we are going to remove the
band-aides for 4.early -> 6.0 after 5.3-RELEASE so people get used to
the idea, even though it has been planned since before 5.0 was
released.
le [Mon, 23 Aug 2004 17:50:18 +0000 (17:50 +0000)]
Compare the addresses of two RAID5 work packets directly instead
of the addresses of their related bios when locking one out, since
they could share a bio and this could lead to parity corruption.
njl [Mon, 23 Aug 2004 16:28:42 +0000 (16:28 +0000)]
Rework sysresource management. Instead of having each sysresource object
hold its own values, pass them up to the parent (acpi0) and merge/uniq them
on the way. After the namespace evaluation, acpi will reserve these
resources and manage them via rman before bus_generic_probe() and
bus_generic_attach(). This is necessary because some systems specify
conflicting resources in separate sysresource objects. It's also cleaner
in that the interface between sysresource and acpi is now merely the parent's
resource list. This code handles the following cases:
1. Unique resource: add it to the parent via bus_set_resource().
2. New wholly contained in old: discard new.
3. New tail overlaps old head: grow old head downward.
AND/OR
4. New head overlaps old tail: grow old tail upward.
obrien [Mon, 23 Aug 2004 16:25:07 +0000 (16:25 +0000)]
Forced commit to document:
Doug Rabson <dfr@nlsystems.com>
Message-Id: <200408220940.18504.dfr@nlsystems.com>
Size does matter for the alpha loader. The firmware gives it 256k
of address space which we overflowed many years ago. I extended it
in sys/boot/alpha/common/main.c:extend_heap() by adding 512k to the
loader's mapped address space.