Commit Graph

112949 Commits

Author SHA1 Message Date
cognet
1d3e66119d Bring in a more healthy version of the libpthread for arm, which uses
ARM_TP_ADDRESS.
2005-02-26 19:06:49 +00:00
cognet
215f3724e9 Instead of using sysarch() to store-retrieve the tp, add a magic address,
ARM_TP_ADDRESS, where the tp will be stored. On CPUs that support it, a cache
line will be allocated and locked for this address, so that it will never go
to RAM. On CPUs that does not, a page is allocated for it (it will be a bit
slower, and is wrong for SMP, but should be fine for UP).
The tp is still stored in the mdthread struct, and at each context switch,
ARM_TP_ADDRESS gets updated.

Suggested by:   davidxu
2005-02-26 18:59:01 +00:00
sam
ff9e0a0b15 plug memory leak
Noticed by:	Coverity Prevent analysis tool
2005-02-26 18:55:53 +00:00
ps
8a9f0287c7 Minor cleanup in nfs_request() and removal of a comment that doesn't
reflect reality.

Submitted by:	Mohan Srinivasan
2005-02-26 18:55:36 +00:00
sam
b34010820f move ptr deref's to after null checks
Noticed by:	Coverity Prevent analysis tool
2005-02-26 18:52:54 +00:00
bmah
45aee98493 New release notes: moused(8) -V (+MFC).
MFCs noted:  TCP random ephemeral port rate limiting, syslogd(8)
logpriv (with a few grammar fixes), tail -f,

Other changes:  Minor grammar fixes to rc.conf interface renaming and
rc.d/moused notes.
2005-02-26 16:33:04 +00:00
glebius
e4430a0f02 Remove carp_softc.sc_ifp member in favor of union pointers in struct ifnet.
Obtained from:	OpenBSD
2005-02-26 13:55:07 +00:00
yar
e415dfedf2 Add a neat remark on the popular belief that the universe is a safe
the man ought to break open and rob.
2005-02-26 12:49:03 +00:00
davidxu
0c0aa6f24b Mark _rtld_allocate_tls and _rtld_free_tls as weak symbols for Variant I
tls.

Reviewed by: dfr
2005-02-26 10:39:49 +00:00
glebius
9fe33a3c38 Staticize local functions. 2005-02-26 10:33:14 +00:00
das
42533c1784 Un-document the non-extant exp10() and exp10f() functions.
exp10() was a casualty of the transition away from the VAX.
2005-02-26 08:54:45 +00:00
harti
c7007db817 Major clean up and split the Var_Parse monster function into three
functions: one for the single letter variables, one for the others
and one that does the recursive expansion.

Patches:	7.68-7.79

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-26 08:54:40 +00:00
wpaul
1e79e22150 Don't need to do MmInitializeMdl() in ndis_mtop() anymore:
IoInitializeMdl() does it internally (and doing it again here
messes things up).
2005-02-26 07:11:17 +00:00
bmah
5c2c0dcf38 MFCs noted: cpufreq(4) (partial), matcd(4) removed, rm(1) -I.
Other changes:  Minor punctuation fixes in hptmv(4) note.
2005-02-26 05:24:40 +00:00
trhodes
11880a1bd0 Fix mismerge.
Noticed by:	tjr
2005-02-26 04:14:20 +00:00
sam
3ce4145b68 move ptr use down to after null check
Noticed by:	Coverity Prevent analysis tool
Reviewed by:	emax
2005-02-26 02:31:34 +00:00
obrien
f04723e78d style(9). 2005-02-26 01:19:21 +00:00
marius
7e40d25501 Declare the sbus(4) front-end of puc(4) also for fhc(4), allowing
uart(4) to support the Zilog 8530 SCCs which hang off of a FireHose
bus on Sun E4000/E5000 class machines.
Beside the fact that a puc_fhc.c would just be a copy of puc_sbus.c
with s,sbus,fhc,g the reason why the declaration for fhc(4) was
sticked into puc_sbus.c is that both of these front-ends for puc(4)
will go away once there is a scc(4).

Discussed with:	marcel
Tested by:	hrs, kris
MFC after:	3 days
2005-02-26 00:25:43 +00:00
marius
6aa769b15a Add a stopgap allowing puc(4) to allocate IRQs on fhc(4). Given that
both a scc(4) is under way and fhc(4) will be change to use INOs this
shouldn't stay in HEAD for too long but we need a MFC-able solution
for FreeBSD 5.4.

Discussed with:	marcel
Tested by:	hrs, kris
MFC after:	3 days
2005-02-26 00:22:52 +00:00
wpaul
9e24dd7b20 MDLs are supposed to be variable size (they include an array of pages
that describe a buffer of variable size). The problem is, allocating
MDLs off the heap is slow, and it can happen that drivers will allocate
lots and lots of lots of MDLs as they run.

As a compromise, we now do the following: we pre-allocate a zone for
MDLs big enough to describe any buffer with 16 or less pages. If
IoAllocateMdl() needs a MDL for a buffer with 16 or less pages, we'll
allocate it from the zone. Otherwise, we allocate it from the heap.
MDLs allocate from the zone have a flag set in their mdl_flags field.
When the MDL is released, IoMdlFree() will uma_zfree() the MDL if
it has the MDL_ZONE_ALLOCED flag set, otherwise it will release it
to the heap.

The assumption is that 16 pages is a "big number" and we will rarely
need MDLs larger than that.

- Moved the ndis_buffer zone to subr_ntoskrnl.c from kern_ndis.c
  and named it mdl_zone.

- Modified IoAllocateMdl() and IoFreeMdl() to use uma_zalloc() and
  uma_zfree() if necessary.

- Made ndis_mtop() use IoAllocateMdl() instead of calling uma_zalloc()
  directly.

Inspired by: discussion with Giridhar Pemmasani
2005-02-26 00:22:16 +00:00
marius
4c62ed1167 Remove duplicate FBSDID. 2005-02-26 00:21:25 +00:00
cognet
a9cc7c83d3 Add the field in the md part of the struct thread required by ARM_[GET|SET]_TP. 2005-02-26 00:02:14 +00:00
sam
f85432c419 kill unused variable
Noticed by:	Coverity Prevent analysis tool
2005-02-25 23:15:48 +00:00
njl
8c51d598f4 Quiet error messages if the requested sysctls are not present.
MFC after:	1 day
2005-02-25 23:14:41 +00:00
sam
30efc0eef2 kill unused value
Noticed by:	Coverity Prevent analysis tool
2005-02-25 23:06:25 +00:00
sam
903110054c remove dead code
Noticed by:	Coverity Prevent analysis tool
2005-02-25 22:58:25 +00:00
cognet
8b08dd2363 Implement two new sysarch for arm, ARM_GET_TP and ARM_SET_TP, to work around
the lack of tls on arm.
2005-02-25 22:56:16 +00:00
cognet
f1b8c3de78 Make sure casuptr() reset pcb->pcb_onfault when returning. 2005-02-25 22:54:56 +00:00
trhodes
059683b0a3 Remove recently added note about DEVICE_POLLING not working with SMP.
Remove warning from kern_poll.c to allow DEVICE_POLLING to be built with SMP.

Discussed with:	ru, glebius
2005-02-25 22:07:51 +00:00
njl
502dd5feca Remove unused variable.
Noticed by:	Coverity tool
2005-02-25 22:01:58 +00:00
sam
c0c58b05fc avoid null ptr deref
Noticed by:	Coverity Prevent analysis tool
Reviewed by:	scottl
2005-02-25 21:57:46 +00:00
rwatson
9732e702d0 Insert missing increment of (i) when walking the temporary semaphore
vector during fork.

Fix assertion which contained an off-by-one error.

Submitted by:	Antoine Brodin < antoine dot brodin at laposte dot net >
2005-02-25 21:00:14 +00:00
sam
5d31a52f86 o avoid potential null ptr deref if symbol lookup fails
o unload module if symbol lookup fails

Noticed by:	Coverity Prevent analysis tool (null ptr deref)
Reviewed by:	bms, imp, dwhite
2005-02-25 20:50:20 +00:00
sam
49034f5bee correct bounds check of fd parameter
Noticed by:	Coverity Prevent analysis tool
2005-02-25 20:15:11 +00:00
njl
927fc878ac Add notes on merging acpi_perf and acpi_throttle to acpi.ko 2005-02-25 20:10:38 +00:00
sam
c2e1872ddd fail gracefully rather than using an invalid array index if unable
to allocate a bar; it's unclear whether this can happen in practice

Noticed by:	Coverity Prevent analysis tool
Discussed with:	marcel
2005-02-25 19:47:18 +00:00
brooks
3a2242d11f Change the definition of struct if_data's member ifi_epoch from wall
clock time to uptime because wall clock time may go backwards.

This is a change in the API which will impact SNMP agents who are using
ifi_epoch to set RFC2233's ifCounterDiscontinuityTime.  None are know to
exist today.  This will not impact applications that are using the
<index, epoch> tuple to verify interface uniqueness except that it
eliminates a race which could lead to a false assumption of uniqueness.

Because this is a behavior change, bump __FreeBSD_version.

Discussed with:	re (jhb, scottl)
MFC after:	3 days
Pointed out by:	pkh (way back at EuroBSDCon)
Pointy hat:	brooks
2005-02-25 19:46:41 +00:00
sam
5f255e99e6 fixup signal mapping:
o change the mapping arrays to have a zero offset rather than base 1;
  this eliminates lots of signo adjustments and brings the code
  back inline with the original netbsd code
o purge use of SVR4_SIGTBLZ; SVR4_NSIG is the only definition for
  how big a mapping array is
o change the mapping loops to explicitly ignore signal 0
o purge some bogus code from bsd_to_svr4_sigset
o adjust svr4_sysentvec to deal with the mapping table change

Enticed into fixing by:	Coverity Prevent analysis tool
Glanced at by:	marcel, jhb
2005-02-25 19:34:10 +00:00
trhodes
4199a6f8af Resort the CPU list with regards to recently added CPUs.
Prodded by:	glewis
2005-02-25 19:32:51 +00:00
rwatson
801aa8d3c8 Add an exit hook, sem_forkhook(), which walks the list of POSIX semaphores
owned by a process when it forks, and creates a matching set of references
for the child process, as prescribed by POSIX.

In order to avoid races with other threads in the parent process during
fork(), it is necessary to allocate a temporary reference list while
holding the sem_lock, then transfer those references to the new process
once the sem_lock is released.  The implementation is inefficient but
appears functional; in order to improve the efficiency, it will be
necessary to modify the existing structures and logic, which generally
rely on O(n) operations over the global set of semaphores.
2005-02-25 19:10:51 +00:00
wpaul
8448ca174a Add macros to construct Windows IOCTL codes, and to extract function
codes from an IOCTL. (The USB module will need them later.)
2005-02-25 18:25:48 +00:00
pjd
4ea75ad3da Add a missing comma. 2005-02-25 17:22:23 +00:00
rwatson
2ee837b433 Assert sem_lock in id_to_sem() and sem_lookup_byname(), since these
functions iterate over the global POSIX semaphore lists.

MFC after:	3 days
2005-02-25 17:01:35 +00:00
njl
b869007e12 Instead of assuming units of bytes, it seems more likely that this is
a bitfield.
2005-02-25 16:57:34 +00:00
hrs
1a9520ab04 New release notes:
syslogd(8) /var/run/logpriv,
	tail -f multiple file support, and
	ehci(4) improved.

Update release notes:
	sort "rm -I" entry,
	add the reasons why T/TCP support removed, and
	remove duplicated snd_audiocs(4) entry[1].

Pointed out by:	bmah[1]
2005-02-25 16:40:37 +00:00
glebius
8c4b1b38e5 Fix prototype for bpf_mtap2().
MFC after:	3 days
2005-02-25 15:58:05 +00:00
bmah
5a8f7d290d New release notes: HZ change, MAXSHELLCMDLEN change, Heimdal 0.6.3,
OpenSSL 0.9.7e.

MFC noted:  libarchive/bsdtar ISO/ZIP support.
2005-02-25 15:46:10 +00:00
harti
2ddbdd3ecb Change the return value of Var_Subst to return a Buffer instead
of a char *.

Patch:		7.49

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-25 13:16:56 +00:00
sobomax
7ed931b24f Welcome to the 21st century: increase MAXSHELLCMDLEN from 128 bytes to
PAGE_SIZE.

Unlike originator of the PR suggests retain MAXSHELLCMDLEN definition
(he has been proposing to replace it with PAGE_SIZE everywhere), not only
this reduced the diff significantly, but prevents code obfuscation and also
allows to increase/decrease this parameter easily if needed.

PR:		kern/64196
Submitted by:	Magnus Bäckström <b@etek.chalmers.se>
2005-02-25 11:49:42 +00:00
glebius
7eaefc3009 New lines when logging. 2005-02-25 11:26:39 +00:00