Commit Graph

116831 Commits

Author SHA1 Message Date
Dima Dorfman
1ee6b74603 Fix fdcheckstd to pass the file descriptor along through vn_open. When
opening a device, devfs_open needs the file descriptor to install its
own fileops. Failing to pass the file descriptor causes the vnode to
be returned with the regular vnops, which will cause a panic on the
first read or write because devfs_specops is not meant to support
those operations.

This bug caused a panic after exec'ing any set[ug]id program with
fds 0..2 closed (i.e., if any action had to be taken by fdcheckstd, we
would panic if the exec'd program ever tried to use any of those
descriptors).

Reviewed by:	phk
Approved by:	re (scottl)
2005-06-25 03:34:49 +00:00
Olivier Houchard
758c41b8cc - Use a TAILQ instead of parsing the array to find a free dmamap.
- Inline busdma_alloc_dmamap, busdma_free_dmamap and bus_dmamap_sync_buf.

Approved by:	re (blanket)
2005-06-24 23:57:27 +00:00
Eric Anholt
f3eb3a3b13 Mark the permanent map for radeon registers read-only. Failure to set this flag
allowed writing to the registers by any user that can open the DRI device, and
therefore ability to initiate DMA.  This came in with the merge from DRI CVS on
2005-04-15.

Approved by:	re (scottl)
Obtained from:	DRM CVS
2005-06-24 22:21:28 +00:00
Doug White
ff50922b16 Backout the change I made before 5.4-R since I wasn't aware that it was only
a problem with one particular switch module.  Create a kernel option
BGE_FAKE_AUTONEG that restores the 5.4 behavior, which should make the DNLK
switch module work. IBM/Intel blades with Intel or AD switch modules should
work without patching or kernel options with this commit.

Hardware for testing provided by several folks, including
Danny Braniss <danny@cs.huji.ac.il>, Achim Patzner <ap@bnc.net>,
and OffMyServer.

Approved by: re
2005-06-24 21:43:47 +00:00
John Baldwin
de1c01ad37 Correct the amount of data to allocate in these local copies of
exec_copyin_strings() to catch up to rev 1.266 of kern_exec.c.  This fixes
panics on amd64 with compat binaries since exec_free_args() was freeing
more memory than these functions were allocating and the mismatch could
cause memory to be freed out from under other concurrent execs.

Approved by:	re (scottl)
2005-06-24 17:41:28 +00:00
Joseph Koshy
21ce09ca81 - Tidy markup. [1]
- Remove mention of an unimplemented option.
- Clarify the behavior of pmcstat when logging PMCs are
  requested, but no log output file is specified.
- Add a cross-reference to pmclog(3).
- Bump document date.

Reviewed by:	ru
Submitted by:	ru [1]
Approved by:	re (blanket hwpmc)
2005-06-24 17:24:55 +00:00
Ruslan Ermilov
9abe909b54 - Tidy up the markup.
- Clarify the sections on "Cascading P4 PMCs" and
  "Precise Event Based Sampling" (1)
- Bump document date.

Reviewed by:	jkoshy
Submitted by:	jkoshy (1)
Approved by:	re (blanket)
2005-06-24 16:56:24 +00:00
Ruslan Ermilov
e7d86e80dc Tidy up the markup, fixed the HISTORY section (1).
Reviewed by:	jkoshy
Submitted by:	jkoshy (1)
Approved by:	re (blanket)
2005-06-24 16:19:46 +00:00
Ruslan Ermilov
f711ce99e5 Tidy up the markup.
Reviewed by:	jkoshy
Approved by:	re (blanket)
2005-06-24 16:13:36 +00:00
Joseph Koshy
9798d180e8 Sync the usage message with the code.
Approved by:	re (hwpmc blanket)
Pointed out by:	ru
2005-06-24 15:43:13 +00:00
Warner Losh
ab581af779 Eliminate unused argument in PCMCIA_CARD macro.
Provide a backwards compatible way to have the extra macro by defining
PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that
want/need to have the same driver on 5 and 6 with pccard attachments.

Approved by: re (dwhite)
2005-06-24 14:36:54 +00:00
Warner Losh
a3e5dcfd76 Add wireless + flash CF card I have
Approved by: re (pccard API changes)
2005-06-24 14:32:24 +00:00
Dag-Erling Smørgrav
31ac1af064 Remove duplicate REISERFS option.
Approved by:	re (scottl)
Pointy hat to:	dumbbell
2005-06-24 13:19:09 +00:00
Pawel Jakub Dawidek
400a74bff8 Close another information leak in ktrace(2): one was able to find active
process groups outside a jail, etc. by using ktrace(2).

OK'ed by:	rwatson
Approved by:	re (scottl)
MFC after:	1 week
2005-06-24 12:05:24 +00:00
Ruslan Ermilov
5c52b5abbc Tidy up the markup.
Approved by:	re (blanket)
2005-06-24 10:57:53 +00:00
Hiroki Sato
6d880fa65e Document floppy disk based installation is not supported
on FreeBSD/sparc64 now.

Pointed out by:	Brett D.Estrade (estrabd at mailcan dot com)
Approved by:	re (implicitly)
2005-06-24 09:07:04 +00:00
Tai-hwa Liang
7c20d5d795 Fixing a memory leak in xpt_release_device(), which can be quickly
(depends on how many memory you have) observed through "tar -tvf /dev/sa0."

   Without this patch, RELENG_5 and HEAD panics with something like:

     kmem_malloc(4096): kmem_map too small: 42258432 total allocated

   RELENG_4 doesn't panic but spews following errors:

     camq_init: - cannot malloc array!

Reviewed by:	gibbs, scottl
Approved by:	re (scottl)
MFC after:	3 days
2005-06-24 08:09:05 +00:00
Peter Wemm
8015e78d5d kvm_openfiles() uses the supplied buffer for storing error messages
in future calls, so we can't free it here.  The right place to free the
buffer would be to be after kvm_close(), but we don't do that yet.  A
static buffer would work too.

Reviewed by:  marcel (who has other plans for this anyway)
Approved by:  re
2005-06-24 00:50:12 +00:00
Peter Wemm
46007a41da Various trivial comment fixes
Approved by: re
2005-06-24 00:45:01 +00:00
Peter Wemm
e973a7af90 Eliminate a source of 'trap xx with interrupts disabled'. I was jumping to
the wrong backend code and neglecting to re-enable interrupts after the
stack prep.

Approved by:  re
2005-06-24 00:38:36 +00:00
Peter Wemm
2cfe3fda19 Set ki_tdev to NODEV rather than NULL.
Approved by:  re
2005-06-24 00:37:04 +00:00
Peter Wemm
a202ff9ebf MFi386: 1.258: Minor cleanups
Approved by:  re (blanket i386<->amd64 sync)
2005-06-24 00:29:53 +00:00
Peter Wemm
4da0d332f4 Move HWPMC_HOOKS into its own opt_hwpmc_hooks.h file. It doesn't merit
being in opt_global.h and forcing a global recompile when only a few files
reference it.

Approved by:  re
2005-06-24 00:16:57 +00:00
Pawel Jakub Dawidek
06a137780b Actually only protect mount-point if security.jail.enforce_statfs is set to 2.
If we don't return statistics about requested file systems, system tools
may not work correctly or at all.

Approved by:	re (scottl)
2005-06-23 22:13:29 +00:00
John Baldwin
bc2e774a37 Various and sundry style fixes and comment cleanups.
Approved by:	re (scottl)
2005-06-23 21:56:45 +00:00
John Baldwin
57dbcb11db Fix a typo in a comment.
Approved by:	re (scottl)
2005-06-23 21:55:43 +00:00
John Baldwin
849bfaf9af Adjust some comments to be a bit more correct.
Approved by:	re (scottl)
2005-06-23 21:55:11 +00:00
John Baldwin
dc802c0628 Fix a typo.
Approved by:	re (scottl)
2005-06-23 21:54:17 +00:00
Ollivier Robert
c0027f5b49 Add Meinberg clocks to the default ntpd. It contains both a DCF77 and a GPS
receiver.

PR:				bin/78207
Submitted by:	Joerg Pulz <Joerg.Pulz@frm2.tum.de>
Approved by:    re (scottl)
2005-06-23 21:37:27 +00:00
Warner Losh
d980b05275 Add back missing copyright and license statement. This is identical
to the statement in ip_mroute.h, as well as being the same as what
OpenBSD has done with this file.  It matches the copyright in NetBSD's
1.1 through 1.14 versions of the file as well, which they subsequently
added back.

It appears to have been lost in the 4.4-lite1 import for FreeBSD 2.0,
but where and why I've not investigated further.  OpenBSD had the same
problem.  NetBSD had a copyright notice until Multicast 3.5 was
integrated verbatim back in 1995.  This appears to be the version that
made it into 4.4-lite1.

Approved by: re (scottl)
MFC after: 3 days
2005-06-23 18:42:58 +00:00
Darren Reed
0e6e3d9f1c Remove these files from src/contrib/ipfilter as they are already present
in src/sys/contrib/ipfilter/netinet.  Makefile's reachover bits find what
they need so building is unaffected.

Approved by: re (dwhite)
2005-06-23 14:22:02 +00:00
Darren Reed
721c3c7cc6 Fix some minor problems before release:
(1) "ipf -T" is broken for fetching single entries and
(2) loading rules with numbered collections does not order insertion right.
(3) stats aren't accumulated for hash table memory failures

Approved by: re (dwhite)
2005-06-23 14:19:02 +00:00
Ruslan Ermilov
43e8ac965c Document supported Sun hardware.
Submitted by:	marius
Approved by:	re (blanket)
2005-06-23 14:12:19 +00:00
Olivier Houchard
3ed670fe01 Remove the va == pa mapping.
Approved by:	re (blanket)
2005-06-23 11:40:45 +00:00
Olivier Houchard
00b931ab2f Call kdb_trap() on fatal abort.
Approved by:	re (blanket)
2005-06-23 11:39:18 +00:00
Olivier Houchard
31897fe80e Implement db_frame() and use it to obtain the registers value.
Approved by:	re (blanket)
2005-06-23 11:38:47 +00:00
Olivier Houchard
a95e819956 Don't abuse UMA_SLAB_KMEM.
Approved by:	re (blanket)
2005-06-23 11:37:41 +00:00
Mike Silbersack
7940f7071b Fix a read mbuf-after-free error in the iwi driver that was provoked by
the trash allocator being used on mbufs.

Reviewed by:	damien
Approved by:	re (scottl)
2005-06-23 04:34:43 +00:00
Mike Silbersack
121f050976 Change the mbuf, mbuf cluster, and mbuf packet allocation routines so that
the UMA "trash" allocator is used - this ensures that any writes to a freed
mbuf should provoke a panic.

Only enabled under INVARIANTS, of course.

Approved by:	re (scottl)
2005-06-23 04:33:39 +00:00
Paul Saab
ee515ed0d9 polled commands can read or write, so bus_dmamap_sync properly
according to the type of request.

Approved by:	re
2005-06-23 00:21:25 +00:00
Paul Saab
9004ded9df Fix for a bug in tcp_sack_option() causing crashes.
Submitted by:	Noritoshi Demizu, Mohan Srinivasan.
Approved by:	re (scottl blanket SACK)
2005-06-23 00:18:54 +00:00
David Xu
3adc17c503 Fix off-by-one nanosecond bug in macro TIMESPEC_ADD.
Reviewed by: deischen
Approved by: re (dwhite)
MFC after  : 4 days
2005-06-22 22:38:56 +00:00
David Xu
86a07ac068 Fix off-by-one nanosecond in macro TIMESPEC_ADD.
Reviewed by: deischen
Approved by: re (dwhite)
MFC after  : 4 days
2005-06-22 22:35:49 +00:00
Ruslan Ermilov
5dea8a444f Tidy up the markup.
Approved by:	re (blanket)
OK'ed by:	gad
2005-06-22 19:04:07 +00:00
Ruslan Ermilov
0d0a2dff3b Document a lot of sparc64 internals.
Submitted by:	marius
Reviewed by:	ru
Approved by:	re (blanket)
X-MFC:		not before the code in RELENG_5 matches
		these man pages or vice versa
2005-06-22 15:35:14 +00:00
John Baldwin
59c2bcbae9 Correct an error in the previous revision. RAND_MAX is the maximum value
for rand(3), not random(3).  random(3) is defined to return values between
0 and 2^31-1, so add a local RANDOM_MAX constant to this file that is
defined as 2^31-1 and use that in place of RAND_MAX.

Reviewed by:	bde
Approved by:	re (dwhite)
MFC after:	1 week
2005-06-22 15:24:00 +00:00
John Baldwin
afc7f38c6b Clear devinfo_generation in devinfo_free() since we are freeing all of the
cached state.  Otherwise, a subsequent call to devinfo_init() would succeed
without reading the device tree from the kernel thinking that the cached
state was up to date since the generation count was the same.  However,
since the cached state was actually free'd, attempts to examine the tree
after the second devinfo_init() would fail.

Reported by:	Juho Vuori juho dot vuori at kepa dot fi
Submitted by:	Stefan Farfeleder stefan at fafoe dot narf dot at
Approved by:	re (dwhite)
MFC after:	1 week
2005-06-22 15:20:11 +00:00
Ruslan Ermilov
9a7feaa13c Line up the markup.
Approved by:	re (blanket)
2005-06-22 14:55:59 +00:00
Ruslan Ermilov
02a75c6773 Fix last commit.
Approved by:	re (blanket)
2005-06-22 12:15:16 +00:00
Hartmut Brandt
19e5af94b4 Struct ifatm isn't at the beginning of the softc anymore. Use the
correct way (IFP2IFATM()) to access it.

Approved by:	re
2005-06-22 06:51:52 +00:00