Date: Thu, 25 Sep 2003 22:30:05 -0700 (PDT) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 38623 for review Message-ID: <200309260530.h8Q5U5i9074098@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=38623 Change 38623 by marcel@marcel_nfs on 2003/09/25 22:29:38 IFC @38620 Affected files ... .. //depot/projects/ia64/UPDATING#53 integrate .. //depot/projects/ia64/lib/libc/amd64/gen/fabs.S#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_sigaction.c#7 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#69 integrate .. //depot/projects/ia64/share/examples/scsi_target/scsi_cmds.c#3 integrate .. //depot/projects/ia64/share/examples/scsi_target/scsi_target.c#4 integrate .. //depot/projects/ia64/share/man/man4/acpi.4#13 integrate .. //depot/projects/ia64/share/man/man4/wlan.4#3 integrate .. //depot/projects/ia64/share/man/man9/Makefile#31 integrate .. //depot/projects/ia64/share/man/man9/pfil.9#4 integrate .. //depot/projects/ia64/share/man/man9/pmap.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_activate.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_addr_hint.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_change_wiring.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_clear_modify.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_copy.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_enter.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_extract.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_growkernel.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_init.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_is_modified.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_map.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_mincore.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_object_init_pt.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_page_exists_quick.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_page_protect.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_pinit.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_prefault.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_qenter.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_release.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_remove.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_zero_page.9#1 branch .. //depot/projects/ia64/sys/amd64/amd64/pmap.c#25 integrate .. //depot/projects/ia64/sys/cam/scsi/scsi_targ_bh.c#7 integrate .. //depot/projects/ia64/sys/conf/NOTES#70 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi.c#42 integrate .. //depot/projects/ia64/sys/dev/aic7xxx/aic79xx_pci.c#14 integrate .. //depot/projects/ia64/sys/dev/aic7xxx/aic7xxx_pci.c#12 integrate .. //depot/projects/ia64/sys/dev/firewire/fwphyreg.h#1 branch .. //depot/projects/ia64/sys/dev/puc/puc.c#21 integrate .. //depot/projects/ia64/sys/dev/puc/pucvar.h#12 integrate .. //depot/projects/ia64/sys/dev/uart/uart.h#3 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus.h#4 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus_acpi.c#2 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus_ebus.c#2 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus_isa.c#2 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus_pccard.c#3 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus_pci.c#2 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus_puc.c#2 integrate .. //depot/projects/ia64/sys/dev/uart/uart_core.c#5 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_alpha.c#4 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_amd64.c#4 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_i386.c#4 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_ia64.c#4 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_pc98.c#5 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_sparc64.c#5 integrate .. //depot/projects/ia64/sys/dev/uart/uart_dev_sab82532.c#5 integrate .. //depot/projects/ia64/sys/dev/uart/uart_dev_z8530.c#5 integrate .. //depot/projects/ia64/sys/netinet/icmp6.h#6 integrate .. //depot/projects/ia64/sys/netinet/ip6.h#3 integrate .. //depot/projects/ia64/sys/netkey/key.c#13 integrate .. //depot/projects/ia64/sys/netkey/key_debug.c#6 integrate .. //depot/projects/ia64/sys/netkey/key_debug.h#4 integrate .. //depot/projects/ia64/sys/netkey/keysock.c#16 integrate .. //depot/projects/ia64/usr.sbin/asf/asf.8#3 integrate .. //depot/projects/ia64/usr.sbin/asf/asf.c#2 integrate .. //depot/projects/ia64/usr.sbin/fwcontrol/fwcontrol.8#9 integrate .. //depot/projects/ia64/usr.sbin/fwcontrol/fwcontrol.c#12 integrate Differences ... ==== //depot/projects/ia64/UPDATING#53 (text+ko) ==== @@ -17,6 +17,13 @@ developers choose to disable these features on build machines to maximize performance. +20030925: + Configuring a system to use IPFILTER now requires that PFIL_HOOKS + also be explicitly configured. Previously this dependency was + magically handled through some cruft in net/pfil.h; but that has + been removed. Building a kernel with IPFILTER but not PFIL_HOOKS + will fail with obtuse errors in ip_fil.c. + 20030923: Fix a bug in arplookup(), whereby a hostile party on a locally attached network could exhaust kernel memory, and cause a system @@ -1368,4 +1375,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.267 2003/09/23 16:39:30 bms Exp $ +$FreeBSD: src/UPDATING,v 1.268 2003/09/25 16:12:12 sam Exp $ ==== //depot/projects/ia64/lib/libc/amd64/gen/fabs.S#2 (text+ko) ==== @@ -2,7 +2,7 @@ #if defined(LIBC_SCCS) RCSID("$NetBSD: fabs.S,v 1.4 1997/07/16 14:37:16 christos Exp $") #endif -__FBSDID("$FreeBSD: src/lib/libc/amd64/gen/fabs.S,v 1.1 2003/04/30 16:21:03 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/amd64/gen/fabs.S,v 1.2 2003/09/26 01:49:48 peter Exp $"); /* * Ok, this sucks. Is there really no way to push an xmm register onto @@ -13,6 +13,6 @@ movsd %xmm0, -8(%rsp) fldl -8(%rsp) fabs - fstp -8(%rsp) + fstpl -8(%rsp) movsd -8(%rsp),%xmm0 ret ==== //depot/projects/ia64/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c#3 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c,v 1.7 2003/04/18 05:04:15 deischen Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c,v 1.8 2003/09/25 13:53:49 davidxu Exp $ */ #include <errno.h> #include <pthread.h> @@ -41,9 +41,9 @@ _pthread_attr_setcreatesuspend_np(pthread_attr_t *attr) { int ret; + if (attr == NULL || *attr == NULL) { - errno = EINVAL; - ret = -1; + ret = EINVAL; } else { (*attr)->suspend = THR_CREATE_SUSPENDED; ret = 0; ==== //depot/projects/ia64/lib/libpthread/thread/thr_sigaction.c#7 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_sigaction.c,v 1.21 2003/08/18 03:58:29 davidxu Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_sigaction.c,v 1.22 2003/09/25 06:23:40 davidxu Exp $ */ #include <signal.h> #include <errno.h> @@ -42,6 +42,7 @@ _sigaction(int sig, const struct sigaction * act, struct sigaction * oact) { int ret = 0; + int err = 0; struct sigaction newact, oldact; struct pthread *curthread; kse_critical_t crit; @@ -58,14 +59,8 @@ crit = _kse_critical_enter(); curthread = _get_curthread(); KSE_LOCK_ACQUIRE(curthread->kse, &_thread_signal_lock); - /* - * Check if the existing signal action structure contents are - * to be returned: - */ - if (oact != NULL) { - /* Return the existing signal action contents: */ - oldact = _thread_sigact[sig - 1]; - } + + oldact = _thread_sigact[sig - 1]; /* Check if a signal action was supplied: */ if (act != NULL) { @@ -94,14 +89,27 @@ newact.sa_handler = (void (*) ())_thr_sig_handler; } /* Change the signal action in the kernel: */ - if (__sys_sigaction(sig, &newact, NULL) != 0) + if (__sys_sigaction(sig, &newact, NULL) != 0) { + _thread_sigact[sig - 1] = oldact; + /* errno is in kse, will copy it to thread */ + err = errno; ret = -1; + } } KSE_LOCK_RELEASE(curthread->kse, &_thread_signal_lock); _kse_critical_leave(crit); - - if (oact != NULL) + /* + * Check if the existing signal action structure contents are + * to be returned: + */ + if (oact != NULL) { + /* Return the existing signal action contents: */ *oact = oldact; + } + if (ret != 0) { + /* Return errno to thread */ + errno = err; + } } /* Return the completion status: */ ==== //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#69 (text+ko) ==== @@ -29,7 +29,7 @@ <sect1 id="support"> <sect1info> - <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.182 2003/09/13 12:51:12 nyan Exp $</pubdate> + <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.183 2003/09/25 21:15:55 wilko Exp $</pubdate> </sect1info> <title>Supported Devices</title> @@ -371,9 +371,11 @@ are not supported.</para> <para arch="alpha">Booting from these controllers is not - supported due to SRM limitations. This list includes - controllers sold by Digital/Compaq in Alpha systems in the - StorageWorks family, e.g. KZPSC or KZPAC.</para> + supported due to SRM limitations. + DAC960 controllers sold by Digital/Compaq for Alpha systems as part + of the StorageWorks family, e.g. KZPSC or KZPAC are bootable from SRM. + Note that these cards used 2.x firmware. SRM bootability of newer + firmware is unknown.</para> </note> </para> ==== //depot/projects/ia64/share/examples/scsi_target/scsi_cmds.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/share/examples/scsi_target/scsi_cmds.c,v 1.2 2003/01/16 00:24:29 njl Exp $ + * $FreeBSD: src/share/examples/scsi_target/scsi_cmds.c,v 1.3 2003/09/25 05:43:26 simokawa Exp $ */ #include <stdio.h> @@ -246,10 +246,8 @@ /* Fill out the supplied CTIO */ if (ctio != NULL) { - /* No autosense yet bcopy(sense, &ctio->sense_data, sizeof(*sense)); - ctio->sense_len = sizeof(*sense); XXX - */ + ctio->sense_len = sizeof(*sense); /* XXX */ ctio->ccb_h.flags &= ~CAM_DIR_MASK; ctio->ccb_h.flags |= CAM_DIR_NONE | /* CAM_SEND_SENSE | */ CAM_SEND_STATUS; @@ -331,7 +329,11 @@ inq = &inq_data; bzero(inq, sizeof(*inq)); inq->device = T_DIRECT | (SID_QUAL_LU_CONNECTED << 5); +#ifdef SCSI_REV_SPC inq->version = SCSI_REV_SPC; /* was 2 */ +#else + inq->version = SCSI_REV_3; /* was 2 */ +#endif /* * XXX cpi.hba_inquiry doesn't support Addr16 so we give the ==== //depot/projects/ia64/share/examples/scsi_target/scsi_target.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/share/examples/scsi_target/scsi_target.c,v 1.14 2003/01/16 00:24:29 njl Exp $ + * $FreeBSD: src/share/examples/scsi_target/scsi_target.c,v 1.15 2003/09/25 05:43:26 simokawa Exp $ */ #include <sys/types.h> @@ -45,6 +45,7 @@ #include <sys/queue.h> #include <sys/event.h> #include <sys/param.h> +#include <sys/disk.h> #include <cam/cam_queue.h> #include <cam/scsi/scsi_all.h> #include <cam/scsi/scsi_targetio.h> @@ -199,7 +200,18 @@ if (fstat(file_fd, &st) < 0) err(1, "fstat file"); - volume_size = st.st_size / sector_size; +#if __FreeBSD_version >= 500000 + if ((st.st_mode & S_IFCHR) != 0) { + /* raw device */ + off_t mediasize; + if (ioctl(file_fd, DIOCGMEDIASIZE, &mediasize) < 0) + err(1, "DIOCGMEDIASIZE"); + + /* XXX get sector size by ioctl()?? */ + volume_size = mediasize / sector_size; + } else +#endif + volume_size = st.st_size / sector_size; } else { volume_size = user_size / sector_size; } @@ -582,6 +594,8 @@ c_descr->offset = a_descr->base_off + a_descr->targ_req; else if ((a_descr->flags & CAM_DIR_MASK) == CAM_DIR_OUT) c_descr->offset = a_descr->base_off + a_descr->init_req; + else + c_descr->offset = a_descr->base_off; /* * Return a check condition if there was an error while @@ -684,6 +698,14 @@ ctio = (struct ccb_scsiio *)ccb_h; c_descr = (struct ctio_descr *)ctio->ccb_h.targ_descr; + if (ctio->ccb_h.status == CAM_REQ_ABORTED) { + TAILQ_REMOVE(&a_descr->cmplt_io, ccb_h, + periph_links.tqe); + free_ccb((union ccb *)ctio); + send_ccb((union ccb *)atio, /*priority*/1); + continue; + } + /* If completed item is in range, call handler */ if ((c_descr->event == AIO_DONE && c_descr->offset == a_descr->base_off + a_descr->targ_ack) ==== //depot/projects/ia64/share/man/man4/acpi.4#13 (text+ko) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/acpi.4,v 1.14 2003/08/07 04:46:53 njl Exp $ +.\" $FreeBSD: src/share/man/man4/acpi.4,v 1.15 2003/09/26 04:32:40 njl Exp $ .\" .Dd July 2, 2001 .Dt ACPI 4 @@ -88,10 +88,14 @@ .It .Li ACPI_RESOURCES .It -.Li ACPI_DEBUGGER +.Li ACPI_CA_DEBUGGER .It .Li ACPI_OS_SERVICES .It +.Li ACPI_CA_DISASSEMBLER +.It +.Li ACPI_ALL_COMPONENTS +.It .Li ACPI_BUS .It .Li ACPI_SYSTEM @@ -112,35 +116,33 @@ .It .Li ACPI_FAN .It -.Li ACPI_ALL_COMPONENTS +.Li ACPI_ALL_DRIVERS .El .Pp The supported levels are: .Pp .Bl -item -offset indent -compact .It -.Li ACPI_LV_OK +.Li ACPI_LV_ERROR .It -.Li ACPI_LV_INFO -.It .Li ACPI_LV_WARN .It -.Li ACPI_LV_ERROR +.Li ACPI_LV_INIT .It -.Li ACPI_LV_FATAL +.Li ACPI_LV_DEBUG_OBJECT .It -.Li ACPI_LV_DEBUG_OBJECT +.Li ACPI_LV_INFO .It .Li ACPI_LV_ALL_EXCEPTIONS .It -.Li ACPI_LV_THREADS +.Li ACPI_LV_INIT_NAMES .It .Li ACPI_LV_PARSE .It +.Li ACPI_LV_LOAD +.It .Li ACPI_LV_DISPATCH .It -.Li ACPI_LV_LOAD -.It .Li ACPI_LV_EXEC .It .Li ACPI_LV_NAMES @@ -149,43 +151,49 @@ .It .Li ACPI_LV_BFIELD .It -.Li ACPI_LV_TRASH -.It .Li ACPI_LV_TABLES .It -.Li ACPI_LV_FUNCTIONS -.It .Li ACPI_LV_VALUES .It .Li ACPI_LV_OBJECTS .It +.Li ACPI_LV_RESOURCES +.It +.Li ACPI_LV_USER_REQUESTS +.It +.Li ACPI_LV_PACKAGE +.It +.Li ACPI_LV_VERBOSITY1 +.It .Li ACPI_LV_ALLOCATIONS .It -.Li ACPI_LV_RESOURCES +.Li ACPI_LV_FUNCTIONS +.It +.Li ACPI_LV_OPTIMIZATIONS .It -.Li ACPI_LV_IO +.Li ACPI_LV_VERBOSITY2 .It -.Li ACPI_LV_INTERRUPTS +.Li ACPI_LV_ALL .It -.Li ACPI_LV_USER_REQUESTS +.Li ACPI_LV_MUTEX .It -.Li ACPI_LV_PACKAGE +.Li ACPI_LV_THREADS .It -.Li ACPI_LV_MUTEX +.Li ACPI_LV_IO .It -.Li ACPI_LV_INIT +.Li ACPI_LV_INTERRUPTS .It -.Li ACPI_LV_ALL +.Li ACPI_LV_VERBOSITY3 .It -.Li ACPI_DB_AML_DISASSEMBLE +.Li ACPI_LV_AML_DISASSEMBLE .It -.Li ACPI_DB_VERBOSE_INFO +.Li ACPI_LV_VERBOSE_INFO .It -.Li ACPI_DB_FULL_TABLES +.Li ACPI_LV_FULL_TABLES .It -.Li ACPI_DB_EVENTS +.Li ACPI_LV_EVENTS .It -.Li ACPI_DB_VERBOSE +.Li ACPI_LV_VERBOSE .El .Pp Selection of the appropriate layer and level values is important @@ -290,9 +298,7 @@ .Xr acpidump 8 and .Xr iasl 1 -utilities from the -.Pa devel/acpicatools -port, and some ACPI knowledge. +utilities and some ACPI knowledge. .Sh TUNABLES .Bl -tag -width indent .It Va acpi_dsdt_load @@ -328,7 +334,8 @@ .Xr loader.conf 5 , .Xr acpiconf 8 , .Xr acpidump 8 , -.Xr config 8 +.Xr config 8 , +.Xr iasl 8 .Rs .%A "Compaq Computer Corporation" .%A "Intel Corporation" ==== //depot/projects/ia64/share/man/man4/wlan.4#3 (text+ko) ==== @@ -23,9 +23,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/wlan.4,v 1.2 2003/07/18 11:40:41 hmp Exp $ +.\" $FreeBSD: src/share/man/man4/wlan.4,v 1.3 2003/09/25 23:56:20 sam Exp $ .\" -.Dd March 25, 2003 +.Dd September 25, 2003 .Dt WLAN 4 .Os .Sh NAME @@ -44,6 +44,29 @@ and .Xr ath 4 drivers but will eventually be required by all 802.11 drivers. +.Pp +If the associated interface is marked for debugging with, for example, +.Bd -literal -offset indent +ifconfig wi0 debug +.Ed +.Pp +then messages describing the operation of the 802.11 protocol will +be sent to the console. +With the interface marked for debugging, doing: +.Bd -literal -offset indent +sysctl debug.ieee80211=1 +.Ed +.Pp +causes additional messages to be generated. +Many drivers will also display the contents of each 802.11 frame +sent and received when the interface is marked with +both debugging and ``link2''; e.g. +.Bd -literal -offset indent +ifconfig wi0 debug link2 +.Ed +.Pp +Beware however that some management frames may be processed entirely within +the device and not be received by the host. .Sh COMPATIBILITY The module name of .Nm @@ -63,10 +86,13 @@ driver first appeared in .Fx 5.0 . .Sh AUTHORS -Support for generic 802.11 devices was adapted from +Atsushi Onoe is the original author of this software. +The .Nx +support was adapted to +.Fx by .An -nosplit -.An Sam Leffler Aq sam@FreeBSD.org . +.An Sam Leffler . This manual page was written by .An Tom Rhodes Aq trhodes@FreeBSD.org . ==== //depot/projects/ia64/share/man/man9/Makefile#31 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/man/man9/Makefile,v 1.200 2003/09/24 05:18:41 marcel Exp $ +# $FreeBSD: src/share/man/man9/Makefile,v 1.202 2003/09/25 23:44:15 bms Exp $ MAN= BUF_LOCK.9 BUF_LOCKFREE.9 BUF_LOCKINIT.9 BUF_REFCNT.9 \ BUF_TIMELOCK.9 BUF_UNLOCK.9 BUS_CONFIG_INTR.9 BUS_PRINT_CHILD.9 \ @@ -59,6 +59,12 @@ namei.9 \ panic.9 pbuf.9 pci.9 pfil.9 pfind.9 pgfind.9 \ physio.9 printf.9 pseudofs.9 psignal.9 \ + pmap.9 pmap_activate.9 pmap_addr_hint.9 pmap_change_wiring.9 \ + pmap_clear_modify.9 pmap_copy.9 pmap_enter.9 pmap_extract.9 \ + pmap_growkernel.9 pmap_init.9 pmap_is_modified.9 pmap_map.9 \ + pmap_mincore.9 pmap_object_init_pt.9 pmap_page_exists_quick.9 \ + pmap_page_protect.9 pmap_pinit.9 pmap_prefault.9 pmap_qenter.9 \ + pmap_release.9 pmap_remove.9 pmap_zero_page.9 \ random.9 resettodr.9 resource_int_value.9 resource_query_string.9 \ rtalloc.9 rtentry.9 runqueue.9 random_harvest.9 rijndael.9 \ rman.9 \ @@ -203,6 +209,19 @@ MLINKS+=pci.9 pci_find_bsf.9 pci.9 pci_find_device.9 MLINKS+=pfil.9 pfil_hook_get.9 pfil.9 pfil_add_hook.9 pfil.9 pfil_remove_hook.9 MLINKS+=pfind.9 zpfind.9 +MLINKS+=pmap_clear_modify.9 pmap_clear_reference.9 +MLINKS+=pmap_copy.9 pmap_copy_page.9 +MLINKS+=pmap_extract.9 pmap_extract_and_hold.9 +MLINKS+=pmap_init.9 pmap_init2.9 +MLINKS+=pmap_is_modified.9 pmap_ts_modified.9 +MLINKS+=pmap_page_protect.9 pmap_protect.9 +MLINKS+=pmap_pinit.9 pmap_pinit0.9 +MLINKS+=pmap_pinit.9 pmap_pinit2.9 +MLINKS+=pmap_qenter.9 pmap_qremove.9 +MLINKS+=pmap_remove.9 pmap_remove_all.9 +MLINKS+=pmap_remove.9 pmap_remove_pages.9 +MLINKS+=pmap_zero_page.9 pmap_zero_idle.9 +MLINKS+=pmap_zero_page.9 pmap_zero_area.9 MLINKS+=psignal.9 gsignal.9 psignal.9 pgsignal.9 MLINKS+=random.9 srandom.9 random.9 arc4random.9 random.9 read_random.9 MLINKS+=random.9 arc4rand.9 ==== //depot/projects/ia64/share/man/man9/pfil.9#4 (text+ko) ==== @@ -1,3 +1,5 @@ +.\" $NetBSD: pfil.9,v 1.22 2003/07/01 13:04:06 wiz Exp $ +.\" .\" Copyright (c) 1996 Matthew R. Green .\" All rights reserved. .\" @@ -24,106 +26,110 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man9/pfil.9,v 1.11 2003/09/08 19:57:21 ru Exp $ -.Dd August 4, 1996 +.\" $FreeBSD: src/share/man/man9/pfil.9,v 1.12 2003/09/25 20:49:28 sam Exp $ +.Dd September 8, 2003 .Dt PFIL 9 .Os .Sh NAME .Nm pfil , +.Nm pfil_head_register , +.Nm pfil_head_unregister , +.Nm pfil_head_get , .Nm pfil_hook_get , .Nm pfil_add_hook , -.Nm pfil_remove_hook +.Nm pfil_remove_hook , +.Nm pfil_run_hooks .Nd packet filter interface .Sh SYNOPSIS .In sys/param.h .In sys/mbuf.h -.In sys/socket.h .In net/if.h .In net/pfil.h -.Ft "struct packet_filter_hook *" -.Fn pfil_hook_get "int flag" "struct pfil_head *ph" +.Ft int +.Fn pfil_head_register "struct pfil_head *head" +.Ft int +.Fn pfil_head_unregister "struct pfil_head *head" +.Ft struct pfil_head * +.Fn pfil_head_get "int af" "u_long dlt" +.Ft struct packet_filter_hook * +.Fn pfil_hook_get "int dir" "struct pfil_head *head" +.Ft void +.Fn pfil_add_hook "int (*func)()" "void *arg" "int flags" "struct pfil_head *" +.Ft void +.Fn pfil_remove_hook "int (*func)()" "void *arg" "int flags" "struct pfil_head *" .Ft int -.Fo pfil_add_hook -.Fa "int \*[lp]*func\*[rp]\*[lp]void *, int, struct ifnet *, int, struct mbuf **\*[rp]" -.Fa "int flags" -.Fa "struct pfil_head *ph" -.Fc +.Fn (*func) "void *arg" "struct mbuf **mp" "struct ifnet *" "int dir" .Ft int -.Fo pfil_remove_hook -.Fa "int \*[lp]*func\*[rp]\*[lp]void *, int, struct ifnet *, int, struct mbuf **\*[rp]" -.Fa "int flags" -.Fa "struct pfil_head *ph" -.Fc +.Fn pfil_run_hooks "struct pfil_head *head" "struct mbuf **mp" "struct ifnet *" "int dir" .Sh DESCRIPTION The .Nm -interface allows a function to be called on every incoming or outgoing -packets. -The hooks for these are embedded in the -.Fn ip_input -and -.Fn ip_output -routines. -The -.Fn pfil_hook_get -function returns the first member of a particular hook, either the in or out -list. -The +framework allows for a specified function to be invoked for every +incoming or outgoing packet for a particular network I/O stream. +These hooks may be used to implement a firewall or perform packet +transformations. +.Pp +Packet filtering points are registered with +.Fn pfil_head_register . +Filtering points are identified by a key (void *) and a data link type +(int) in the +.Em pfil_head +structure. +Packet filters use the key and data link type to look up the filtering +point with which they register themselves. +The key is unique to the filtering point. +The data link type is a +.Xr bpf 4 +DLT constant indicating what kind of header is present on the packet +at the filtering point. +Filtering points may be unregistered with the +.Fn pfil_head_unregister +function. +.Pp +Packet filters register/unregister themselves with a filtering point +with the .Fn pfil_add_hook -function takes a function of the form below as its first argument, and the -flags for which lists to add the function to. -The possible values for these -flags are some combination of -.Dv PFIL_IN and -.Dv PFIL_OUT . -The .Fn pfil_remove_hook -removes a hook from the specified lists. +functions, respectively. +The head is looked up using the +.Fn pfil_head_get +function, which takes the key and data link type that the packet filter +expects. +Filters may provide an argument to be passed to the filter when +invoked on a packet. .Pp -The -.Fa func -argument is a function with the following prototype. -.Pp -.Ft int -.Fn func "void *data" "int hlen" "struct ifnet *net" "int dir" "struct mbuf **m" -.Pp -The -.Fa data -describes the packet. -Currently, this may only be a pointer to an -.Vt ip -structure. -The -.Fa net -and -.Fa m -arguments describe the network interface and the mbuf holding data for this -packet. -The -.Fa dir -is the direction; 0 for incoming packets and 1 for outgoing packets. -If the function -returns non-zero, this signals an error and no further processing of this packet is -performed. -The function should set -.Va errno -to indicate the nature of the error. -It is the hook's responsibility to free the chain if the packet is being dropped. +When a filter is invoked, the packet appears just as if it +.Dq came off the wire . +That is, all protocol fields are in network byte order. +The filter is called with its specified argument, the pointer to the +pointer to the mbuf containing the packet, the pointer to the network +interface that the packet is traversing, and the direction (PFIL_IN +or PFIL_OUT) that the packet is traveling. +The filter may change which mbuf the mbuf ** argument references. +The filter returns an errno if the packet processing is to stop, or 0 +if the processing is to continue. +If the packet processing is to stop, it is the responsibility of the +filter to free the packet. .Pp The .Nm interface is enabled in the kernel via the -.Cd PFIL_HOOKS +.Sy PFIL_HOOKS option. .Sh RETURN VALUES If successful, -.Fn pfil_hook_get -returns the first member of the packet filter list, -.Fn pfil_add_hook +.Fn pfil_head_get +returns the pfil_head structure for the given key/dlt. +.Fn pfil_add_hook and .Fn pfil_remove_hook -are expected to always succeed. +return 0 if successful. If called with flag PFIL_WAITOK, +.Fn pfil_remove_hook +is expected to always succeed. +.Pp +.Fn pfil_head_unregister +might sleep! .Sh HISTORY The .Nm @@ -132,7 +138,7 @@ The .Nm input and output lists were originally implemented as -.In sys/queue.h +.Fd \*[Lt]sys/queue.h\*[Gt] .Dv LIST structures; however this was changed in @@ -140,9 +146,8 @@ to .Dv TAILQ structures. -This change was to allow the input and output filters to be -processed in reverse order, to allow the same path to be taken, in or out -of the kernel. +This change was to allow the input and output filters to be processed in +reverse order, to allow the same path to be taken, in or out of the kernel. .Pp The .Nm @@ -151,11 +156,31 @@ and .Fn pfil_remove_hook , introducing the capability of per-protocol filtering. -This was done -primarily in order to support filtering of IPv6. +This was done primarily in order to support filtering of IPv6. +.Pp +In 1.5K, the +.Nm +framework was changed to work with an arbitrary number of filtering points, +as well as be less IP-centric. +.Pp +Fine-grained locking was adding in FreeBSD 5.2. .Sh BUGS -The current -.Nm -implementation will need changes to suit a threaded kernel model. +.Fn pfil_hook_get +is only safe for internal use. +.Pp +FreeBSD implements only hooks for AF_INET and AF_INET6. +Packets diverted through these hooks have data in +host byte order contrary to the above statements. +.Pp +The +.Xr bridge 4 +diverts inbound AF_INET traffic, but contrary to the above +statements, the data is provided in host byte order. +.Pp +When a pfil_head is being modified no traffic is diverted +(to avoid deadlock). +This means that unwanted traffic may flow for a short period +of time. .Sh SEE ALSO -.Xr bpf 4 +.Xr bpf 4 , +.Xr bridge 4 ==== //depot/projects/ia64/sys/amd64/amd64/pmap.c#25 (text+ko) ==== @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.437 2003/09/13 21:57:38 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.439 2003/09/26 04:12:41 alc Exp $"); /* * Manages physical address maps. @@ -1012,6 +1012,7 @@ register struct pmap *pmap; { vm_page_t pml4pg; + static vm_pindex_t color; /* * allocate object for the ptes @@ -1022,14 +1023,13 @@ /* * allocate the page directory page */ - VM_OBJECT_LOCK(pmap->pm_pteobj); - pml4pg = vm_page_grab(pmap->pm_pteobj, NUPDE + NUPDPE + NUPML4E, - VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED | VM_ALLOC_ZERO); + while ((pml4pg = vm_page_alloc(NULL, color++, VM_ALLOC_NOOBJ | + VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) + VM_WAIT; vm_page_lock_queues(); vm_page_flag_clear(pml4pg, PG_BUSY); pml4pg->valid = VM_PAGE_BITS_ALL; vm_page_unlock_queues(); - VM_OBJECT_UNLOCK(pmap->pm_pteobj); pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pml4pg)); @@ -1241,14 +1241,8 @@ void pmap_release(pmap_t pmap) { - vm_object_t object; vm_page_t m; - object = pmap->pm_pteobj; - - KASSERT(object->ref_count == 1, - ("pmap_release: pteobj reference count %d != 1", - object->ref_count)); KASSERT(pmap->pm_stats.resident_count == 0, ("pmap_release: pmap resident count %ld != 0", pmap->pm_stats.resident_count)); @@ -1258,15 +1252,14 @@ mtx_unlock_spin(&allpmaps_lock); vm_page_lock_queues(); - while ((m = TAILQ_FIRST(&object->memq)) != NULL) { - m->wire_count--; - atomic_subtract_int(&cnt.v_wire_count, 1); - vm_page_busy(m); - vm_page_free(m); - } - KASSERT(TAILQ_EMPTY(&object->memq), + m = PHYS_TO_VM_PAGE(pmap->pm_pml4[PML4PML4I]); + m->wire_count--; + atomic_subtract_int(&cnt.v_wire_count, 1); + vm_page_busy(m); + vm_page_free(m); + vm_page_unlock_queues(); + KASSERT(TAILQ_EMPTY(&pmap->pm_pteobj->memq), ("pmap_release: leaking page table pages")); - vm_page_unlock_queues(); } static int ==== //depot/projects/ia64/sys/cam/scsi/scsi_targ_bh.c#7 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_targ_bh.c,v 1.18 2003/06/10 18:14:05 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_targ_bh.c,v 1.19 2003/09/25 05:02:19 simokawa Exp $"); #include <sys/param.h> #include <sys/queue.h> @@ -167,7 +167,7 @@ xpt_setup_ccb(&csa.ccb_h, path, /*priority*/5); csa.ccb_h.func_code = XPT_SASYNC_CB; - csa.event_enable = AC_PATH_REGISTERED; + csa.event_enable = AC_PATH_REGISTERED | AC_PATH_DEREGISTERED; csa.callback = targbhasync; csa.callback_arg = NULL; xpt_action((union ccb *)&csa); @@ -185,15 +185,26 @@ targbhasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg) { - struct cam_periph *periph; + struct cam_path *new_path; + cam_status status; + + /* + * Allocate a peripheral instance for + * this target instance. + */ + status = xpt_create_path(&new_path, NULL, + xpt_path_path_id(path), + CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); + if (status != CAM_REQ_CMP) { + printf("targbhasync: Unable to create path " + "due to status 0x%x\n", status); + return; + } - periph = (struct cam_periph *)callback_arg; switch (code) { case AC_PATH_REGISTERED: { struct ccb_pathinq *cpi; - struct cam_path *new_path; - cam_status status; cpi = (struct ccb_pathinq *)arg; @@ -201,35 +212,23 @@ if ((cpi->target_sprt & PIT_PROCESSOR) == 0) break; - /* - * Allocate a peripheral instance for - * this target instance. - */ - status = xpt_create_path(&new_path, NULL, - xpt_path_path_id(path), - CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); - if (status != CAM_REQ_CMP) { - printf("targbhasync: Unable to create path " - "due to status 0x%x\n", status); - break; - } status = cam_periph_alloc(targbhctor, NULL, targbhdtor, targbhstart, "targbh", CAM_PERIPH_BIO, new_path, targbhasync, AC_PATH_REGISTERED, >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309260530.h8Q5U5i9074098>