Commit Graph

112776 Commits

Author SHA1 Message Date
David E. O'Brien
ecb90dcc75 style(9). 2005-02-26 01:19:21 +00:00
Marius Strobl
099894cc96 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 Strobl
ad11db7c28 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
Bill Paul
a944e196da 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 Strobl
e1e33cb261 Remove duplicate FBSDID. 2005-02-26 00:21:25 +00:00
Olivier Houchard
b6e4194946 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 Leffler
aedaf6e272 kill unused variable
Noticed by:	Coverity Prevent analysis tool
2005-02-25 23:15:48 +00:00
Nate Lawson
4fbce3b11c Quiet error messages if the requested sysctls are not present.
MFC after:	1 day
2005-02-25 23:14:41 +00:00
Sam Leffler
937003c8b0 kill unused value
Noticed by:	Coverity Prevent analysis tool
2005-02-25 23:06:25 +00:00
Sam Leffler
ba1a42195c remove dead code
Noticed by:	Coverity Prevent analysis tool
2005-02-25 22:58:25 +00:00
Olivier Houchard
a74985cdd4 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
Olivier Houchard
38e285f83a Make sure casuptr() reset pcb->pcb_onfault when returning. 2005-02-25 22:54:56 +00:00
Tom Rhodes
183a16a3ec 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
Nate Lawson
ac8671f18f Remove unused variable.
Noticed by:	Coverity tool
2005-02-25 22:01:58 +00:00
Sam Leffler
72046dcea3 avoid null ptr deref
Noticed by:	Coverity Prevent analysis tool
Reviewed by:	scottl
2005-02-25 21:57:46 +00:00
Robert Watson
fa6fc5b819 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 Leffler
d40b07dfe4 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 Leffler
3b30e64d22 correct bounds check of fd parameter
Noticed by:	Coverity Prevent analysis tool
2005-02-25 20:15:11 +00:00
Nate Lawson
915a554b41 Add notes on merging acpi_perf and acpi_throttle to acpi.ko 2005-02-25 20:10:38 +00:00
Sam Leffler
f111c2680b 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 Davis
bc9d299133 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 Leffler
960f641e6d 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
Tom Rhodes
8c38f62e6a Resort the CPU list with regards to recently added CPUs.
Prodded by:	glewis
2005-02-25 19:32:51 +00:00
Robert Watson
590f242cc0 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
Bill Paul
849bcccac9 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
Pawel Jakub Dawidek
4a06539f21 Add a missing comma. 2005-02-25 17:22:23 +00:00
Robert Watson
955ec4156c 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
Nate Lawson
f45fc848c5 Instead of assuming units of bytes, it seems more likely that this is
a bitfield.
2005-02-25 16:57:34 +00:00
Hiroki Sato
fb52e6480c 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
Gleb Smirnoff
4291a5982a Fix prototype for bpf_mtap2().
MFC after:	3 days
2005-02-25 15:58:05 +00:00
Bruce A. Mah
95f685ceea 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
Hartmut Brandt
179078e76d 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
Maxim Sobolev
90dc539be0 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
Gleb Smirnoff
88bf82a62e New lines when logging. 2005-02-25 11:26:39 +00:00
Gleb Smirnoff
947b7cf3c6 Embrace macros with do {} while (0)
Submitted by:	maxim
2005-02-25 10:49:47 +00:00
Gleb Smirnoff
442af10ad1 Update description of net.inet.carp.log 2005-02-25 10:38:43 +00:00
Maxim Sobolev
6916a1da50 o Replace two while {} do loops with more appropriate do {} while loops. This
doesn't change functionality, but makes code more logical.

Obtained from:	DrafonFlyBSD

o Use VOP_GETATTR() to obtain actual size of file and parse no more than that.
  Previously, we parsed MAXSHELLCMDLEN characters regardless of the actual file
  size. This makes the following working:

$ printf '#!/bin/echo' > /tmp/test.sh
$ chmod 755 /tmp/test.sh
$ /tmp/test.sh

Previously, attempts to execve() that shell script has been failing with bogus
ENAMETOOLONG.

PR:		kern/64196
Submitted by:	Magnus B.ckstr.m <b@etek.chalmers.se>
2005-02-25 10:17:53 +00:00
Gleb Smirnoff
39aeaa0eb5 Call carp_carpdev_state() from carp_set_addr6(). See log for rev 1.4.
Sponsored by:	Rambler
2005-02-25 10:12:11 +00:00
Gleb Smirnoff
1e9e65729b Improve logging:
- Simplify CARP_LOG() and making it working (we don't have addlog in FreeBSD).
 - Introduce CARP_DEBUG() which logs with LOG_DEBUG severity when
   net.inet.carp.log > 1
 - Use CARP_DEBUG to log state changes of carp interfaces.

After CARP_LOG() cleanup it appeared that carp_input_c() does not need sc
argument. Remove it.

Sponsored by:	Rambler
2005-02-25 10:09:44 +00:00
Hartmut Brandt
3f5ccaeca5 The chip specific functions have been split out in their own
C files to simplify adding of new PHY chips.
Include the split out .c files in the module build too.
2005-02-25 09:49:29 +00:00
Maxim Sobolev
b4305f8d91 Try harder to not exceed MAXSHELLCMDLEN when parsing first line of shell
script. Otherwise it's possible to panic kernel by constructing a shell
script with first line not ending in '\n'.

Also, treat '\0' as line terminating character, which may me useful in
some situations.

Submitted by:	gad
2005-02-25 08:42:04 +00:00
Bill Paul
ed7003a9f3 Fix a couple of callback instances that should have been wrapped with
MSCALLx().

Add definition for STATUS_PENDING error code.
2005-02-25 08:34:32 +00:00
Xin LI
130d7d9ffb Remove acpi_perf from {ARCH}/conf/NOTES, to make tinderbox happy.
Reported by:	tinderbox
Inspired by:	acpi_perf build structure removal commit
2005-02-25 07:10:37 +00:00
Pyun YongHyeon
35113f4d80 Add missing ofw_bus_if.h to SRCS.
Submitted by:	joerg
2005-02-25 06:59:56 +00:00
Bill Paul
17bd4e32e1 Compute the right length to use with bzero() when initializing an IRP
in IoInitializeIrp() (must use IoSizeOfIrp() to account for the stack
locations).
2005-02-25 06:31:45 +00:00
Jacques Vidrine
72a11ddc6c File removed in update from OpenSSL 0.9.7d -> 0.9.7e. 2005-02-25 06:22:30 +00:00
Jacques Vidrine
3c96cf2e8b This commit was generated by cvs2svn to compensate for changes in r142430,
which included commits to RCS files with non-trunk default branches.
2005-02-25 06:14:53 +00:00
Jacques Vidrine
d6608aaa6e Update OpenSSL 0.9.7d -> 0.9.7e. 2005-02-25 06:04:12 +00:00
Jacques Vidrine
5203f6dc3a Resolve conflicts after import of OpenSSL 0.9.7e. 2005-02-25 05:49:44 +00:00
Jacques Vidrine
eb8fd19957 This commit was generated by cvs2svn to compensate for changes in r142425,
which included commits to RCS files with non-trunk default branches.
2005-02-25 05:39:05 +00:00