From owner-p4-projects@FreeBSD.ORG Sun Oct 2 04:34:33 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A4B2E16A422; Sun, 2 Oct 2005 04:34:32 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7453F16A420 for ; Sun, 2 Oct 2005 04:34:32 +0000 (GMT) (envelope-from alc@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F70543D45 for ; Sun, 2 Oct 2005 04:34:32 +0000 (GMT) (envelope-from alc@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j924YW2q021293 for ; Sun, 2 Oct 2005 04:34:32 GMT (envelope-from alc@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j924YVXA021290 for perforce@freebsd.org; Sun, 2 Oct 2005 04:34:31 GMT (envelope-from alc@freebsd.org) Date: Sun, 2 Oct 2005 04:34:31 GMT Message-Id: <200510020434.j924YVXA021290@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to alc@freebsd.org using -f From: Alan Cox To: Perforce Change Reviews Cc: Subject: PERFORCE change 84640 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2005 04:34:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=84640 Change 84640 by alc@alc_home on 2005/10/02 04:34:26 IFC @84637 Affected files ... .. //depot/projects/superpages/doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#2 integrate .. //depot/projects/superpages/doc/en_US.ISO8859-1/books/handbook/boot/chapter.sgml#2 integrate .. //depot/projects/superpages/doc/en_US.ISO8859-1/books/handbook/security/chapter.sgml#2 integrate .. //depot/projects/superpages/src/UPDATING#2 integrate .. //depot/projects/superpages/src/etc/rc.subr#2 integrate .. //depot/projects/superpages/src/sys/dev/wi/if_wi.c#2 integrate Differences ... ==== //depot/projects/superpages/doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#2 (text+ko) ==== @@ -1,4 +1,4 @@ - + @@ -71,32 +71,47 @@ load the operating system, which has become shortened to booting. + BIOS + + Basic Input/Output SystemBIOS + On x86 hardware the Basic Input/Output System (BIOS) is responsible for loading the operating system. To do this, the BIOS looks on the hard disk for the Master Boot Record (MBR), which must be located on a specific place on the disk. The BIOS has enough knowledge to load and run the MBR, and assumes that the MBR can then carry out the rest of the - tasks involved in loading the operating system. + tasks involved in loading the operating system, + possibly with the help of the BIOS. + + Master Boot Record (MBR) + + Boot Manager - - BIOS - + Boot Loader - - Basic Input/Output System - BIOS - + The code within the MBR is usually referred to as a boot + manager, especially when it interacts with the user. In this case + the boot manager usually has more code in the first + track of the disk or within some OS's file system. (A + boot manager is sometimes also called a boot loader, + but FreeBSD uses that term for a later stage of booting.) Popular boot + managers include boot0 (a.k.a. Boot + Easy, the standard &os; boot manager), + Grub, GAG, and + LILO. + (Only boot0 fits within the MBR.) - If you only have one operating system installed on your disks then - the standard MBR will suffice. This MBR searches for the first bootable - slice on the disk, and then runs the code on that slice to load the - remainder of the operating system. + If you have only one operating system installed on your disks then + a standard PC MBR will suffice. This MBR searches for the first bootable + (a.k.a. active) slice on the disk, and then runs the code on that slice to + load the remainder of the operating system. The MBR installed by + &man.fdisk.8;, by default, is such an MBR. It is based on + /boot/mbr. If you have installed multiple operating systems on your disks then - you can install a different MBR, one that can display a list of + you can install a different boot manager, one that can display a list of different operating systems, and allows you to choose the one to boot - from. FreeBSD comes with one such MBR which can be installed, and other - operating system vendors also provide alternative MBRs. + from. Two of these are discussed in the next subsection. The remainder of the FreeBSD bootstrap system is divided into three stages. The first stage is run by the MBR, which knows just enough to @@ -122,28 +137,28 @@ - The MBR, and Boot Stages One, Two, and Three + The Boot Manager and Boot Stages + + Boot Manager - MBR, <filename>/boot/boot0</filename> + The Boot Manager Master Boot Record (MBR) - The MBR installed by FreeBSD's installer and by boot0cfg(8) - are based on /boot/boot0. The MBR is the first - sector of a disk, outside slices. (The MBR installed by fdisk(8), - by default, is based on /boot/mbr; it is - similar to the PC-DOS MBR and it boots the slice marked - active without prompting the user as the - FreeBSD MBR does.) + The code in the MBR or boot manager is sometimes referred to as + stage zero of the boot process. This subsection + discusses two of the boot managers previously mentioned: + boot0 and LILO. - boot0 is very simple, since the - program in the MBR can only be 512 bytes in - size. - (Actually, it can only be 446 bytes because of the slice - table and the 0x55AA identifier at the end of the MBR). - If you have installed the FreeBSD MBR and have installed - multiple operating systems on your hard disks then you will see a - display similar to this one at boot time: + The <application>boot0</application> Boot Manager: + The MBR installed by FreeBSD's installer or &man.boot0cfg.8;, by + default, is based on /boot/boot0. + (The boot0 program is very simple, since the + program in the MBR can only be 446 bytes long because of the slice + table and 0x55AA identifier at the end of the MBR.) + If you have installed boot0 and + multiple operating systems on your hard disks, then you will see a + display similar to this one at boot time: <filename>boot0</filename> Screenshot @@ -164,38 +179,34 @@ &prompt.root; fdisk -B -b /boot/boot0 device - Where device is the device that you + where device is the device that you boot from, such as ad0 for the first IDE disk, ad2 for the first IDE disk on a second IDE controller, da0 for the first SCSI disk, - and so on. + and so on. Or, if you want a custom configuration of the MBR, + use &man.boot0cfg.8;. + + The LILO Boot Manager: - If you are a Linux user, however, and prefer that - LILO control the boot process, you can - edit the /etc/lilo.conf file for FreeBSD, or - select - during the FreeBSD installation process. If you have installed the - FreeBSD boot manager, you can boot back into Linux and modify the - LILO configuration file - /etc/lilo.conf and add the following - option: + To install this boot manager so it will also boot FreeBSD, first + start Linux and add the following to your existing + /etc/lilo.conf configuration file: other=/dev/hdXY -table=/dev/hdb +table=/dev/hdX loader=/boot/chain.b label=FreeBSD - which will permit the booting of FreeBSD and Linux via - LILO. In our example, we use - XY to determine drive number and - partition. If you are using a SCSI drive, you - will want to change /dev/hdXY to read - something similar to /dev/sdXY, which - again uses the XY syntax. The - can be omitted if you have - both operating systems on the same drive. You can now run - /sbin/lilo -v to commit your new changes to the - system, this should be verified with screen messages. + In the above, specify FreeBSD's primary partition and drive using + Linux specifiers, replacing X with the Linux + drive letter and Y with the Linux primary + partition number. If you are using a SCSI drive, you + will need to change /dev/hd to read something + similar to /dev/sd. The + line can be omitted if you have + both operating systems on the same drive. Now run + /sbin/lilo -v to commit your new changes to the + system; this should be verified by checking its screen messages. @@ -205,17 +216,18 @@ Conceptually the first and second stages are part of the same program, on the same area of the disk. Because of space constraints they have been split into two, but you would always install them - together. + together. They are copied from the combined file + /boot/boot by the installer or + disklabel (see below). - They are found on the boot sector of - the boot slice, which is where boot0, or any other program on the - MBR expects to find the program to run to - continue the boot process. The files in the - /boot directory are copies of the real files, - which are stored outside of the FreeBSD file system. + They are located outside file systems, in the first track of + the boot slice, starting with the first sector. This is where boot0, or any other boot manager, + expects to find a program to run which will + continue the boot process. The number of sectors used is easily + determined from the size of /boot/boot. - boot1 is very simple, since it too + boot1 is very simple, since it can only be 512 bytes in size, and knows just enough about the FreeBSD disklabel, which stores information ==== //depot/projects/superpages/doc/en_US.ISO8859-1/books/handbook/security/chapter.sgml#2 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -863,8 +863,6 @@ (except for certain specific Internet-accessible ports, of course). - ICMP_BANDLIM - Another common DoS attack is called a springboard attack — to attack a server in a manner that causes the server to generate responses which overloads the server, the local @@ -885,10 +883,13 @@ server to saturate its outgoing network with ICMP responses. This type of attack can also crash the server by running it out of mbuf's, especially if the server cannot drain the ICMP responses - it generates fast enough. The &os; kernel has a new kernel + it generates fast enough. &os; 4.X kernels have a kernel compile option called which limits the effectiveness - of these sorts of attacks. The last major class of springboard + of these sorts of attacks. + Later kernels use the sysctl + variable net.inet.icmp.icmplim. + The last major class of springboard attacks is related to certain internal inetd services such as the udp echo service. An attacker simply spoofs a UDP packet with the ==== //depot/projects/superpages/src/UPDATING#2 (text+ko) ==== @@ -21,6 +21,10 @@ developers choose to disable these features on build machines to maximize performance. +20051001: + kern.polling.enable sysctl MIB is now deprecated. Use ifconfig(8) + to turn polling(4) on your interfaces. + 20050927: The old bridge(4) implementation was retired. The new if_bridge(4) serves as a full functional replacement. @@ -415,4 +419,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.421 2005/09/27 18:10:29 mlaier Exp $ +$FreeBSD: src/UPDATING,v 1.422 2005/10/01 20:53:51 glebius Exp $ ==== //depot/projects/superpages/src/etc/rc.subr#2 (text+ko) ==== @@ -1,5 +1,5 @@ # $NetBSD: rc.subr,v 1.60 2003/07/26 05:13:47 lukem Exp $ -# $FreeBSD: src/etc/rc.subr,v 1.37 2005/08/24 16:25:47 yar Exp $ +# $FreeBSD: src/etc/rc.subr,v 1.38 2005/10/01 20:58:03 yar Exp $ # # Copyright (c) 1997-2002 The NetBSD Foundation, Inc. # All rights reserved. @@ -515,7 +515,7 @@ fi if [ -z "$rc_arg" ]; then - rc_usage "$_keywords" + rc_usage $_keywords fi if [ -n "$flags" ]; then # allow override from environment @@ -797,7 +797,7 @@ ;; *) - rc_usage "$_keywords" + rc_usage $_keywords ;; esac @@ -805,7 +805,7 @@ done echo 1>&2 "$0: unknown directive '$rc_arg'." - rc_usage "$_keywords" + rc_usage $_keywords exit 1 } ==== //depot/projects/superpages/src/sys/dev/wi/if_wi.c#2 (text+ko) ==== @@ -62,7 +62,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/wi/if_wi.c,v 1.191 2005/09/28 09:27:46 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/wi/if_wi.c,v 1.192 2005/10/02 03:55:07 avatar Exp $"); #define WI_HERMES_AUTOINC_WAR /* Work around data write autoinc bug. */ #define WI_HERMES_STATS_WAR /* Work around stats counter bug. */ @@ -742,7 +742,7 @@ wi_write_val(sc, WI_RID_OWN_BEACON_INT, ic->ic_bintval); wi_write_val(sc, WI_RID_BASIC_RATE, 0x03); /* 1, 2 */ wi_write_val(sc, WI_RID_SUPPORT_RATE, 0x0f); /* 1, 2, 5.5, 11 */ - wi_write_val(sc, WI_RID_DTIM_PERIOD, 1); + wi_write_val(sc, WI_RID_DTIM_PERIOD, ic->ic_dtim_period); } /* From owner-p4-projects@FreeBSD.ORG Sun Oct 2 04:54:58 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0154516A421; Sun, 2 Oct 2005 04:54:57 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B718716A41F for ; Sun, 2 Oct 2005 04:54:57 +0000 (GMT) (envelope-from alc@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 653E543D46 for ; Sun, 2 Oct 2005 04:54:57 +0000 (GMT) (envelope-from alc@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j924svi2029221 for ; Sun, 2 Oct 2005 04:54:57 GMT (envelope-from alc@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j924suAU029218 for perforce@freebsd.org; Sun, 2 Oct 2005 04:54:56 GMT (envelope-from alc@freebsd.org) Date: Sun, 2 Oct 2005 04:54:56 GMT Message-Id: <200510020454.j924suAU029218@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to alc@freebsd.org using -f From: Alan Cox To: Perforce Change Reviews Cc: Subject: PERFORCE change 84641 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2005 04:54:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=84641 Change 84641 by alc@alc_home on 2005/10/02 04:54:30 Integrate changes from my private branch. Affected files ... .. //depot/projects/superpages/src/sys/alpha/include/param.h#2 integrate .. //depot/projects/superpages/src/sys/amd64/amd64/pmap.c#2 integrate .. //depot/projects/superpages/src/sys/amd64/include/param.h#2 integrate .. //depot/projects/superpages/src/sys/arm/include/param.h#2 integrate .. //depot/projects/superpages/src/sys/conf/NOTES#2 integrate .. //depot/projects/superpages/src/sys/conf/files#2 integrate .. //depot/projects/superpages/src/sys/conf/options#2 integrate .. //depot/projects/superpages/src/sys/i386/i386/pmap.c#2 integrate .. //depot/projects/superpages/src/sys/i386/include/param.h#2 integrate .. //depot/projects/superpages/src/sys/ia64/include/param.h#2 integrate .. //depot/projects/superpages/src/sys/kern/vfs_bio.c#2 integrate .. //depot/projects/superpages/src/sys/modules/linux/Makefile#2 integrate .. //depot/projects/superpages/src/sys/modules/nwfs/Makefile#2 integrate .. //depot/projects/superpages/src/sys/modules/smbfs/Makefile#2 integrate .. //depot/projects/superpages/src/sys/modules/svr4/Makefile#2 integrate .. //depot/projects/superpages/src/sys/vm/vm.h#2 integrate .. //depot/projects/superpages/src/sys/vm/vm_buddy.c#1 branch .. //depot/projects/superpages/src/sys/vm/vm_buddy.h#1 branch .. //depot/projects/superpages/src/sys/vm/vm_contig.c#2 integrate .. //depot/projects/superpages/src/sys/vm/vm_fault.c#2 integrate .. //depot/projects/superpages/src/sys/vm/vm_map.c#2 integrate .. //depot/projects/superpages/src/sys/vm/vm_object.c#2 integrate .. //depot/projects/superpages/src/sys/vm/vm_object.h#2 integrate .. //depot/projects/superpages/src/sys/vm/vm_page.c#2 integrate .. //depot/projects/superpages/src/sys/vm/vm_page.h#2 integrate .. //depot/projects/superpages/src/sys/vm/vm_pageout.c#2 integrate .. //depot/projects/superpages/src/sys/vm/vm_pageq.c#2 integrate .. //depot/projects/superpages/src/sys/vm/vm_reserve.c#1 branch .. //depot/projects/superpages/src/sys/vm/vm_reserve.h#1 branch .. //depot/projects/superpages/src/sys/vm/vm_zeroidle.c#2 integrate .. //depot/projects/superpages/src/sys/vm/vnode_pager.c#2 integrate Differences ... ==== //depot/projects/superpages/src/sys/alpha/include/param.h#2 (text+ko) ==== @@ -103,6 +103,23 @@ #define PAGE_MASK (PAGE_SIZE-1) #define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t))) +#define BUDDY_QUEUES 10 /* Number of queues in the buddy allocator */ + +/* + * SP_LEVELS is the number of superpage sizes. + */ +#define SP_LEVELS 3 + +/* + * SP_SMALL_SHIFT is LOG2("The Smallest Superpage Size" / PAGE_SIZE). + */ +#define SP_SMALL_SHIFT 3 + +/* + * XXX + */ +#define SP_FACTOR_SHIFT 3 + #define KERNBASE 0xfffffc0000300000LL /* start of kernel virtual */ #define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT) ==== //depot/projects/superpages/src/sys/amd64/amd64/pmap.c#2 (text+ko) ==== @@ -133,6 +133,7 @@ #include #include #include +#include #include #include @@ -205,6 +206,8 @@ static pv_entry_t get_pv_entry(void); static void pmap_clear_ptes(vm_page_t m, long bit); +static boolean_t pmap_protect_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t sva); +static int pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offset_t sva); static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva, pd_entry_t ptepde); static void pmap_remove_page(pmap_t pmap, vm_offset_t va, pd_entry_t *pde); @@ -220,6 +223,9 @@ static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t); static vm_offset_t pmap_kmem_choose(vm_offset_t addr); +static void mach_promote(pmap_t pmap, pd_entry_t *pde, reservation_t reserv); +static boolean_t pmap_demote(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); + CTASSERT(1 << PDESHIFT == sizeof(pd_entry_t)); CTASSERT(1 << PTESHIFT == sizeof(pt_entry_t)); @@ -358,21 +364,6 @@ } -static __inline pt_entry_t * -pmap_pte_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *ptepde) -{ - pd_entry_t *pde; - - pde = pmap_pde(pmap, va); - if (pde == NULL || (*pde & PG_V) == 0) - return NULL; - *ptepde = *pde; - if ((*pde & PG_PS) != 0) /* compat with i386 pmap_pte() */ - return ((pt_entry_t *)pde); - return (pmap_pde_to_pte(pde, va)); -} - - PMAP_INLINE pt_entry_t * vtopte(vm_offset_t va) { @@ -1297,11 +1288,13 @@ * normal 4K page. */ if (pd != 0 && (*pd & (PG_PS | PG_V)) == (PG_PS | PG_V)) { - *pd = 0; - pd = 0; - pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE; - pmap_unuse_pt(pmap, va, *pmap_pdpe(pmap, va)); - pmap_invalidate_all(kernel_pmap); + if (!pmap_demote(pmap, pd, va)) { + /* + * Invalidation of the 2MB page mapping may have caused + * the deallocation of the underlying PD page. + */ + pd = NULL; + } } /* @@ -1519,6 +1512,53 @@ } /* + * pmap_remove_pde: do the things to unmap a superpage in a process + */ +static int +pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offset_t sva) +{ + pd_entry_t oldpde; + vm_offset_t eva, va; + vm_page_t m; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + KASSERT((sva & PDRMASK) == 0, + ("pmap_remove_pde: sva is not 2mpage aligned")); + oldpde = pte_load_clear(pdq); + if (oldpde & PG_W) + pmap->pm_stats.wired_count -= NBPDR / PAGE_SIZE; + + /* + * Machines that don't support invlpg, also don't support + * PG_G. + */ + if (oldpde & PG_G) + pmap_invalidate_page(kernel_pmap, sva); + pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE; + if (oldpde & PG_MANAGED) { + eva = sva + NBPDR; + for (va = sva, m = PHYS_TO_VM_PAGE(oldpde & PG_FRAME); + va < eva; va += PAGE_SIZE, m++) { + if (oldpde & PG_M) { +#if defined(PMAP_DIAGNOSTIC) + if (pmap_nw_modified((pt_entry_t) oldpde)) { + printf( + "pmap_remove_pde: modified 2mpage not writable: va: 0x%lx, pde: 0x%lx\n", + va, oldpde); + } +#endif + if (pmap_track_modified(va)) + vm_page_dirty(m); + } + if (oldpde & PG_A) + vm_page_flag_set(m, PG_REFERENCED); + pmap_remove_entry(pmap, m, va); + } + } + return (pmap_unuse_pt(pmap, sva, *pmap_pdpe(pmap, sva))); +} + +/* * pmap_remove_pte: do the things to unmap a page in a process */ static int @@ -1651,11 +1691,25 @@ * Check for large page. */ if ((ptpaddr & PG_PS) != 0) { - *pde = 0; - pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE; - pmap_unuse_pt(pmap, sva, *pdpe); - anyvalid = 1; - continue; + if (sva + NBPDR == va_next && eva >= va_next) { +#ifdef INVARIANTS + printf("pmap_remove: superpage at %lx to destroy.\n", + sva); +#endif + pmap_remove_pde(pmap, pde, sva); + anyvalid = 1; + continue; + } else { +#ifdef INVARIANTS + printf("pmap_remove: superpage at %lx to demote !!!\n", + sva); +#endif + if (!pmap_demote(pmap, pde, sva)) { + anyvalid = 1; /* XXX */ + continue; + } + ptpaddr = *pde; + } } /* @@ -1698,9 +1752,10 @@ void pmap_remove_all(vm_page_t m) { + pmap_t pmap; register pv_entry_t pv; pt_entry_t *pte, tpte; - pd_entry_t ptepde; + pd_entry_t *pde; #if defined(PMAP_DIAGNOSTIC) /* @@ -1713,12 +1768,25 @@ #endif mtx_assert(&vm_page_queue_mtx, MA_OWNED); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { - PMAP_LOCK(pv->pv_pmap); - pv->pv_pmap->pm_stats.resident_count--; - pte = pmap_pte_pde(pv->pv_pmap, pv->pv_va, &ptepde); + pmap = pv->pv_pmap; + PMAP_LOCK(pmap); + pmap->pm_stats.resident_count--; + pde = pmap_pde(pmap, pv->pv_va); + if (*pde & PG_PS) { + printf("pmap_remove_all: superpage to demote !!!\n"); + if (!pmap_demote(pmap, pde, pv->pv_va)) { + /* + * All mappings within the same 2mpage were + * destroyed and pv was freed. + */ + PMAP_UNLOCK(pmap); + continue; + } + } + pte = pmap_pde_to_pte(pde, pv->pv_va); tpte = pte_load_clear(pte); if (tpte & PG_W) - pv->pv_pmap->pm_stats.wired_count--; + pmap->pm_stats.wired_count--; if (tpte & PG_A) vm_page_flag_set(m, PG_REFERENCED); @@ -1736,18 +1804,60 @@ if (pmap_track_modified(pv->pv_va)) vm_page_dirty(m); } - pmap_invalidate_page(pv->pv_pmap, pv->pv_va); - TAILQ_REMOVE(&pv->pv_pmap->pm_pvlist, pv, pv_plist); + pmap_invalidate_page(pmap, pv->pv_va); + TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); m->md.pv_list_count--; - pmap_unuse_pt(pv->pv_pmap, pv->pv_va, ptepde); - PMAP_UNLOCK(pv->pv_pmap); + pmap_unuse_pt(pmap, pv->pv_va, *pde); + PMAP_UNLOCK(pmap); free_pv_entry(pv); } vm_page_flag_clear(m, PG_WRITEABLE); } /* + * pmap_protect_pde: do the things to protect a 2mpage in a process + */ +static boolean_t +pmap_protect_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t sva) +{ + pd_entry_t newpde, oldpde; + vm_offset_t eva, va; + vm_page_t m; + boolean_t anychanged; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + KASSERT((sva & PDRMASK) == 0, + ("pmap_protect_pde: sva is not 2mpage aligned")); + anychanged = FALSE; +retry: + oldpde = newpde = *pde; + if (oldpde & PG_MANAGED) { + eva = sva + NBPDR; + for (va = sva, m = PHYS_TO_VM_PAGE(oldpde & PG_FRAME); + va < eva; va += PAGE_SIZE, m++) { + if (oldpde & PG_A) { + vm_page_flag_set(m, PG_REFERENCED); + newpde &= ~PG_A; + } + if ((oldpde & PG_M) != 0 && + pmap_track_modified(va)) + vm_page_dirty(m); + } + } + newpde &= ~(PG_RW | PG_M); + if (newpde != oldpde) { + if (!atomic_cmpset_long(pde, oldpde, newpde)) + goto retry; + if (oldpde & PG_G) + pmap_invalidate_page(pmap, sva); + else + anychanged = TRUE; + } + return (anychanged); +} + +/* * Set the physical protection on the * specified range of this map as requested. */ @@ -1802,9 +1912,16 @@ * Check for large page. */ if ((ptpaddr & PG_PS) != 0) { - *pde &= ~(PG_M|PG_RW); - anychanged = 1; - continue; + if (sva + NBPDR == va_next && eva >= va_next) { + if (pmap_protect_pde(pmap, pde, sva)) + anychanged = 1; + continue; + } else { + if (!pmap_demote(pmap, pde, sva)) { + anychanged = 1; /* XXX */ + continue; + } + } } if (va_next > eva) @@ -2032,6 +2149,24 @@ } else pte_store(pte, newpte | PG_A); } + + /* + * Promotion condition: + * 1) Page has to be part of a fully populated reservation + * 2) Virtual adress corresponding to the reservation has to + * be superpage aligned + */ + if (((mpte != NULL && mpte->wire_count == NPTEPG) || + m->object == kernel_object || (m->object == kmem_object && FALSE)) && + m->reserv != NULL && + m->reserv->refcnt == NBPDR / PAGE_SIZE) { +#ifdef INVARIANTS + printf("%s: pmap %p va %lx XXX\n", __func__, pmap, va); +#endif + KASSERT(m->object->flags & OBJ_SUPERPAGES, ("pmap_enter: xxx")); + mach_promote(pmap, pmap_pde(pmap, va), m->reserv); + } + vm_page_unlock_queues(); PMAP_UNLOCK(pmap); } @@ -2146,6 +2281,23 @@ pte_store(pte, pa | PG_V | PG_U); else pte_store(pte, pa | PG_V | PG_U | PG_MANAGED); + + /* + * Promotion condition: + * 1) Page has to be part of a fully populated reservation + * 2) Virtual adress corresponding to the reservation has to + * be superpage aligned + */ + if (m->reserv != NULL && + m->reserv->refcnt == NBPDR / PAGE_SIZE && + mpte->wire_count == NPTEPG) { +#ifdef INVARIANTS + printf("%s: pmap %p va %lx XXX\n", __func__, pmap, va); +#endif + KASSERT(m->object->flags & OBJ_SUPERPAGES, + ("pmap_enter_quick: xxx")); + mach_promote(pmap, pmap_pde(pmap, va), m->reserv); + } out: PMAP_UNLOCK(pmap); return mpte; @@ -2372,6 +2524,13 @@ *pde = srcptepaddr; dst_pmap->pm_stats.resident_count += NBPDR / PAGE_SIZE; + if (srcptepaddr & PG_MANAGED) { + m = PHYS_TO_VM_PAGE(srcptepaddr & PG_FRAME); + for (; addr < va_next; addr += PAGE_SIZE) { + pmap_insert_entry(dst_pmap, addr, m); + m++; + } + } } else pmap_unwire_pte_hold(dst_pmap, addr, dstmpde); continue; @@ -2530,6 +2689,7 @@ pmap_t pmap; vm_offset_t sva, eva; { + pd_entry_t *pde; pt_entry_t *pte, tpte; vm_page_t m; pv_entry_t pv, npv; @@ -2550,9 +2710,43 @@ } #ifdef PMAP_REMOVE_PAGES_CURPROC_ONLY + pde = vtopde(pv->pv_va); +#else + pde = pmap_pde(pmap, pv->pv_va); +#endif + if (*pde & PG_PS) { + if (*pde & PG_W) { + npv = TAILQ_NEXT(pv, pv_plist); + continue; + } + if (sva <= trunc_2mpage(pv->pv_va) && + eva >= round_2mpage(pv->pv_va + 1)) { +#ifdef INVARIANTS + printf("pmap_remove_pages: superpage at %lx to destroy.\n", + trunc_2mpage(pv->pv_va)); +#endif + pmap_remove_pde(pmap, pde, trunc_2mpage(pv->pv_va)); + npv = TAILQ_FIRST(&pmap->pm_pvlist); + continue; + } +#ifdef INVARIANTS + printf("pmap_remove_pages: superpage at %lx to demote !!!\n", + pv->pv_va); +#endif + if (!pmap_demote(pmap, pde, pv->pv_va)) { + /* + * All mappings within the same 2mpage were + * destroyed and pv was freed. + */ + npv = TAILQ_FIRST(&pmap->pm_pvlist); + continue; + } + } + +#ifdef PMAP_REMOVE_PAGES_CURPROC_ONLY pte = vtopte(pv->pv_va); #else - pte = pmap_pte(pmap, pv->pv_va); + pte = pmap_pde_to_pte(pde, pv->pv_va); #endif tpte = *pte; @@ -2597,7 +2791,7 @@ if (TAILQ_EMPTY(&m->md.pv_list)) vm_page_flag_clear(m, PG_WRITEABLE); - pmap_unuse_pt(pmap, pv->pv_va, *vtopde(pv->pv_va)); + pmap_unuse_pt(pmap, pv->pv_va, *pde); free_pv_entry(pv); } pmap_invalidate_all(pmap); @@ -2657,7 +2851,7 @@ rv = FALSE; PMAP_LOCK(pmap); pde = pmap_pde(pmap, addr); - if (pde != NULL && (*pde & PG_V)) { + if (pde != NULL && (*pde & (PG_PS | PG_V)) == PG_V) { pte = vtopte(addr); rv = (*pte & PG_V) == 0; } @@ -2671,7 +2865,9 @@ static __inline void pmap_clear_ptes(vm_page_t m, long bit) { - register pv_entry_t pv; + pmap_t pmap; + pv_entry_t npv, pv; + pd_entry_t *pde; pt_entry_t pbits, *pte; if ((m->flags & PG_FICTITIOUS) || @@ -2683,7 +2879,7 @@ * Loop over all current mappings setting/clearing as appropos If * setting RO do we need to clear the VAC? */ - TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, npv) { /* * don't write protect pager mappings */ @@ -2692,8 +2888,22 @@ continue; } - PMAP_LOCK(pv->pv_pmap); - pte = pmap_pte(pv->pv_pmap, pv->pv_va); + pmap = pv->pv_pmap; + PMAP_LOCK(pmap); + pde = pmap_pde(pmap, pv->pv_va); + if (*pde & PG_PS) { + printf("pmap_clear_ptes: superpage to demote !!!\n"); + if ((*pde & bit) == 0 || + !pmap_demote(pmap, pde, pv->pv_va)) { + /* + * All mappings within the same 2mpage were + * destroyed and pv was freed. + */ + PMAP_UNLOCK(pmap); + continue; + } + } + pte = pmap_pde_to_pte(pde, pv->pv_va); retry: pbits = *pte; if (pbits & bit) { @@ -2707,9 +2917,9 @@ } else { atomic_clear_long(pte, bit); } - pmap_invalidate_page(pv->pv_pmap, pv->pv_va); + pmap_invalidate_page(pmap, pv->pv_va); } - PMAP_UNLOCK(pv->pv_pmap); + PMAP_UNLOCK(pmap); } if (bit == PG_RW) vm_page_flag_clear(m, PG_WRITEABLE); @@ -2747,6 +2957,7 @@ int pmap_ts_referenced(vm_page_t m) { + pmap_t pmap; register pv_entry_t pv, pvf, pvn; pt_entry_t *pte; pt_entry_t v; @@ -2770,20 +2981,21 @@ if (!pmap_track_modified(pv->pv_va)) continue; - PMAP_LOCK(pv->pv_pmap); - pte = pmap_pte(pv->pv_pmap, pv->pv_va); + pmap = pv->pv_pmap; + PMAP_LOCK(pmap); + pte = pmap_pte(pmap, pv->pv_va); if (pte && ((v = pte_load(pte)) & PG_A) != 0) { atomic_clear_long(pte, PG_A); - pmap_invalidate_page(pv->pv_pmap, pv->pv_va); + pmap_invalidate_page(pmap, pv->pv_va); rtval++; if (rtval > 4) { - PMAP_UNLOCK(pv->pv_pmap); + PMAP_UNLOCK(pmap); break; } } - PMAP_UNLOCK(pv->pv_pmap); + PMAP_UNLOCK(pmap); } while ((pv = pvn) != NULL && pv != pvf); } @@ -2873,24 +3085,35 @@ pmap_t pmap; vm_offset_t addr; { - pt_entry_t *ptep, pte; + pd_entry_t *pdep; + pt_entry_t pte; + vm_paddr_t pa; vm_page_t m; int val = 0; PMAP_LOCK(pmap); - ptep = pmap_pte(pmap, addr); - pte = (ptep != NULL) ? *ptep : 0; + pdep = pmap_pde(pmap, addr); + if (pdep != NULL && (*pdep & PG_V)) { + if (*pdep & PG_PS) { + KASSERT((*pdep & PG_FRAME & PDRMASK) == 0, + ("pmap_mincore: bad pde")); + pte = *pdep; + pa = (*pdep & PG_FRAME) | (addr & PDRMASK); + } else { + pte = *pmap_pde_to_pte(pdep, addr); + pa = pte & PG_FRAME; + } + } else { + pte = 0; + pa = 0; + } PMAP_UNLOCK(pmap); if (pte != 0) { - vm_paddr_t pa; - val = MINCORE_INCORE; if ((pte & PG_MANAGED) == 0) return val; - pa = pte & PG_FRAME; - m = PHYS_TO_VM_PAGE(pa); /* @@ -2975,3 +3198,131 @@ addr = (addr + (NBPDR - 1)) & ~(NBPDR - 1); return addr; } + +#define COMPATIBLE_PTE_MASK (PG_NX | PG_U | PG_RW) +#define COMPATIBLE_PTE(a,b) ((a & COMPATIBLE_PTE_MASK) == (b & COMPATIBLE_PTE_MASK)) + +static void +mach_promote(pmap_t pmap, pd_entry_t *pde, reservation_t reserv) +{ + vm_paddr_t pa; + pt_entry_t *pte, *first_pte, flags; + vm_page_t page_pa; + vm_page_t tofree = PHYS_TO_VM_PAGE(*pde & PG_FRAME); /*pte page to free after promotion*/ + + first_pte = (pt_entry_t *)PHYS_TO_DMAP(*pde & PG_FRAME); + flags = *first_pte; + pa = VM_PAGE_TO_PHYS(reserv->first_page); + + /* + * Check all the ptes before promotion + */ + for (pte = first_pte; pte < first_pte + NPTEPG; pte++) { + if (pa != (*pte & PG_FRAME)) + return; + pa += PAGE_SIZE; + + page_pa = PHYS_TO_VM_PAGE(*pte & PG_FRAME); + KASSERT(page_pa->reserv,("mach_promote: page has no reservation")); + KASSERT(page_pa->reserv == reserv,("mach_promote: reservation mismatch")); + + if ((*pte & PG_V) == 0 || !COMPATIBLE_PTE(*pte, flags)) + return; + + /* Add dirty bit and accsd bit to the flags, if necessary */ + flags |= *pte & (PG_A | PG_M); + } + + /* Create a superpage: add PG_PS bit to the pde */ + *pde = PG_PS | flags; + + if (pmap != kernel_pmap) + pmap->pm_stats.resident_count--; + + /* Invalidate old TLB entries */ + pmap_invalidate_all(pmap); + + /* + * XXX + * + * File system corruption occurs if pte pages belonging to the + * kernel pmap are freed. + */ + if (pmap != kernel_pmap) { + KASSERT(tofree->wire_count == NPTEPG, + ("pmap_promote: pte page wire count error")); + tofree->wire_count = 0; + vm_page_free(tofree); + atomic_subtract_int(&cnt.v_wire_count, 1); + } + +#ifdef INVARIANTS + printf("Promotion successful XXX\n"); +#endif +} + +static boolean_t +pmap_demote(pmap_t pmap, pd_entry_t *pde0, vm_offset_t va) +{ + pd_entry_t save_pde_value, new_pte_value ; + pt_entry_t *pte_page_va, *new_pte_va; + vm_paddr_t pte_page_pa; + vm_page_t pte_page; + + KASSERT((*pde0 & PG_PS) != 0, + ("pmap_demote: not a superpage, impossible to demote")); + + /* STEP 1 + * Allocate the PTE page + */ + if ((pte_page = vm_page_alloc(NULL, pmap_pde_pindex(va), + VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL | VM_ALLOC_WIRED)) == NULL) { + pmap_remove_pde(pmap, pde0, trunc_2mpage(va)); + pmap_invalidate_all(pmap); + return (FALSE); + } + pte_page->wire_count += NPTEPG - 1; + KASSERT(pte_page->wire_count == NPTEPG, + ("pmap_demote: page table page %p has wire count %d", + pte_page, pte_page->wire_count)); + if (pmap != kernel_pmap) + pmap->pm_stats.resident_count++; + + pte_page_pa = VM_PAGE_TO_PHYS(pte_page); + pte_page_va = (vm_offset_t *) PHYS_TO_DMAP(pte_page_pa); + pte_page_pa |= PG_U | PG_RW | PG_V | PG_A | PG_M; + +repeat: + + /* STEP 2 + * Save the value of the pde entry + * Define the value of the first pte entry + */ + save_pde_value = *pde0; + + /* STEP 3 + * Fill the PTE page with the physical address of the base pages + */ + for ( new_pte_va = pte_page_va, new_pte_value = save_pde_value & ~PG_PS; + new_pte_va < pte_page_va + NPTEPG; + new_pte_va++ , new_pte_value += PAGE_SIZE) { + + *new_pte_va = new_pte_value ; + + } + + /* STEP 4: + * Check if pde value has changed + * If not, assign the new pde value. + * If yes, repeat the pte assignment loop. + */ + if (!atomic_cmpset_long(pde0, save_pde_value, pte_page_pa)) + goto repeat; + + /* + * Some implementations of the amd64 architecture prefetch TLB + * entries. + */ + pmap_invalidate_page(pmap, (vm_offset_t)vtopte(va)); + return (TRUE); +} ==== //depot/projects/superpages/src/sys/amd64/include/param.h#2 (text+ko) ==== @@ -119,6 +119,23 @@ #define NBPML4 (1ul< MYKERNEL ==== //depot/projects/superpages/src/sys/conf/files#2 (text+ko) ==== @@ -1890,6 +1890,7 @@ vm/swap_pager.c standard vm/uma_core.c standard vm/uma_dbg.c standard +vm/vm_buddy.c standard vm/vm_contig.c standard vm/memguard.c optional DEBUG_MEMGUARD vm/vm_fault.c standard @@ -1904,6 +1905,7 @@ vm/vm_pageout.c standard vm/vm_pageq.c standard vm/vm_pager.c standard +vm/vm_reserve.c standard vm/vm_unix.c standard vm/vm_zeroidle.c standard vm/vnode_pager.c standard ==== //depot/projects/superpages/src/sys/conf/options#2 (text+ko) ==== @@ -515,12 +515,6 @@ NO_SWAPPING opt_vm.h MALLOC_MAKE_FAILURES opt_vm.h MALLOC_PROFILE opt_vm.h -PQ_NOOPT opt_vmpage.h -PQ_NORMALCACHE opt_vmpage.h -PQ_MEDIUMCACHE opt_vmpage.h -PQ_LARGECACHE opt_vmpage.h -PQ_HUGECACHE opt_vmpage.h -PQ_CACHESIZE opt_vmpage.h # The MemGuard replacement allocator used for tamper-after-free detection DEBUG_MEMGUARD opt_vm.h ==== //depot/projects/superpages/src/sys/i386/i386/pmap.c#2 (text+ko) ==== @@ -133,6 +133,7 @@ #include #include #include +#include #include #include @@ -255,6 +256,8 @@ static pv_entry_t get_pv_entry(void); static void pmap_clear_ptes(vm_page_t m, int bit); +static boolean_t pmap_protect_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t sva); +static void pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offset_t sva); static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva); static void pmap_remove_page(struct pmap *pmap, vm_offset_t va); static void pmap_remove_entry(struct pmap *pmap, vm_page_t m, @@ -273,6 +276,9 @@ static void *pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait); #endif +static void mach_promote(pmap_t pmap, vm_offset_t va, reservation_t reserv); +static boolean_t pmap_demote(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); + CTASSERT(1 << PDESHIFT == sizeof(pd_entry_t)); CTASSERT(1 << PTESHIFT == sizeof(pt_entry_t)); @@ -1199,10 +1205,8 @@ * normal 4K page. */ if (ptepa & PG_PS) { - pmap->pm_pdir[ptepindex] = 0; - ptepa = 0; - pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE; - pmap_invalidate_all(kernel_pmap); + pmap_demote(pmap, &pmap->pm_pdir[ptepindex], va); + ptepa = pmap->pm_pdir[ptepindex]; } /* @@ -1521,6 +1525,52 @@ } /* + * pmap_remove_pde: do the things to unmap a superpage in a process + */ +static void +pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offset_t sva) +{ + pd_entry_t oldpde; + vm_offset_t eva, va; + vm_page_t m; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + KASSERT((sva & PDRMASK) == 0, + ("pmap_remove_pde: sva is not 4mpage aligned")); + oldpde = pte_load_clear(pdq); + if (oldpde & PG_W) + pmap->pm_stats.wired_count -= NBPDR / PAGE_SIZE; + + /* + * Machines that don't support invlpg, also don't support + * PG_G. + */ + if (oldpde & PG_G) + pmap_invalidate_page(kernel_pmap, sva); + pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE; + if (oldpde & PG_MANAGED) { + eva = sva + NBPDR; + for (va = sva, m = PHYS_TO_VM_PAGE(oldpde & PG_FRAME); + va < eva; va += PAGE_SIZE, m++) { + if (oldpde & PG_M) { +#if defined(PMAP_DIAGNOSTIC) + if (pmap_nw_modified((pt_entry_t) oldpde)) { + printf( + "pmap_remove_pde: modified 4mpage not writable: va: 0x%x, pde: 0x%x\n", + va, oldpde); + } +#endif + if (pmap_track_modified(va)) + vm_page_dirty(m); + } + if (oldpde & PG_A) + vm_page_flag_set(m, PG_REFERENCED); + pmap_remove_entry(pmap, m, va); + } + } +} + +/* * pmap_remove_pte: do the things to unmap a page in a process */ static int @@ -1639,10 +1689,24 @@ * Check for large page. */ if ((ptpaddr & PG_PS) != 0) { - pmap->pm_pdir[pdirindex] = 0; - pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE; - anyvalid = 1; - continue; + if (sva + NBPDR == pdnxt && eva >= pdnxt) { +#ifdef INVARIANTS + printf("pmap_remove: superpage at %x to destroy.\n", + sva); +#endif + pmap_remove_pde(pmap, pmap_pde(pmap, sva), sva); + anyvalid = 1; + continue; + } else { +#ifdef INVARIANTS + printf("pmap_remove: superpage at %x to demote !!!\n", + sva); +#endif + if (!pmap_demote(pmap, pmap_pde(pmap, sva), sva)) { + anyvalid = 1; /* XXX */ + continue; + } + } } /* @@ -1686,8 +1750,10 @@ void pmap_remove_all(vm_page_t m) { + pmap_t pmap; register pv_entry_t pv; pt_entry_t *pte, tpte; + pd_entry_t *pde; #if defined(PMAP_DIAGNOSTIC) /* @@ -1701,12 +1767,25 @@ mtx_assert(&vm_page_queue_mtx, MA_OWNED); sched_pin(); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { - PMAP_LOCK(pv->pv_pmap); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Oct 3 07:34:02 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9FBCF16A421; Mon, 3 Oct 2005 07:34:01 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 731ED16A41F for ; Mon, 3 Oct 2005 07:34:01 +0000 (GMT) (envelope-from soc-emily@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44D2243D48 for ; Mon, 3 Oct 2005 07:34:01 +0000 (GMT) (envelope-from soc-emily@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j937Y1Ya046386 for ; Mon, 3 Oct 2005 07:34:01 GMT (envelope-from soc-emily@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j937Y0dw046381 for perforce@freebsd.org; Mon, 3 Oct 2005 07:34:00 GMT (envelope-from soc-emily@freebsd.org) Date: Mon, 3 Oct 2005 07:34:00 GMT Message-Id: <200510030734.j937Y0dw046381@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-emily@freebsd.org using -f From: soc-emily To: Perforce Change Reviews Cc: Subject: PERFORCE change 84702 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2005 07:34:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=84702 Change 84702 by soc-emily@soc-emily_beastie on 2005/10/03 07:33:00 Small SGML fix. Affected files ... .. //depot/projects/soc2005/www/freebsd/fr/platforms/sparc.sgml#4 edit Differences ... ==== //depot/projects/soc2005/www/freebsd/fr/platforms/sparc.sgml#4 (text+ko) ==== @@ -78,6 +78,8 @@ href="http://docs.FreeBSD.org/cgi/mid.cgi?200301190023.h0J0Nx0N068255"> maintenant supporté dans -CURRENT.

+
  • 10 Décembre 2002: Des instantanés + quotidiens de 5.0-CURRENT sont maintenant disponibles sur ftp2.FreeBSD.org.

  • From owner-p4-projects@FreeBSD.ORG Mon Oct 3 09:16:11 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CCFF116A421; Mon, 3 Oct 2005 09:16:10 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8338816A41F for ; Mon, 3 Oct 2005 09:16:10 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4182243D48 for ; Mon, 3 Oct 2005 09:16:10 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j939G9Uj057319 for ; Mon, 3 Oct 2005 09:16:10 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j939G8RF057316 for perforce@freebsd.org; Mon, 3 Oct 2005 09:16:09 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 3 Oct 2005 09:16:09 GMT Message-Id: <200510030916.j939G8RF057316@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 84703 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2005 09:16:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=84703 Change 84703 by rwatson@rwatson_zoo on 2005/10/03 09:15:46 Rearrange, clean up, add to, and remove from the BSM kernel audit events list based on inspection of Solaris, Darwin, and FreeBSD: - Add Solaris AUE_CREAT event, and assign AUE_O_CREAT to AUE_CREAT instead of AUE_OPEN_RWTC. - Add Solaris AUE_VTRACE. - Annotate presence and possible conflict of AUE_SYSINFO. - Add Solaris AUE_KILLPG and alias AUE_O_KILLPG to it rather than AUE_NULL. - Add Solaris AUE_SEMSYS and use that instead of AUE_NULL. - Add AUE_SOLARIS_REBOOT, AUE_SOLARIS_SETHOSTNAME, AUE_SOLARIS_SETPRIORITY, AUE_SOLARIS_SETTIMEOFDAY, AUE_SOLARIS_TRUNCATE, AUE_SOLARIS_FTRUNCATE, AUE_SOLARIS_FLOCK, AUE_SOLARIS_NFS_SVC, AUE_SOLARIS_UNMOUNT, AUE_SOLARIS_SETDOMAINNAME, AUE_SOLARIS_QUOTACTL, which are defines for events from Solaris which conflict with Darwin events of similar names. These conflicts will need to be resolved, almost certainly by changing Darwin. Annotate Darwin event entries as in conflict also. - Where events exist for AUE_O_whatever, move the definitions to beside whatever it is they alias. - Add misc other Solaris events: AUE_VTRACE, AUE_ASYNC_DAAEMON, NFS_EXPORTFS, AUE_SEMSYS, AUE_O_EXPORTFS, AUE_BSMSYS, AUE_RFSSYS, AUE_VPIXSYS, AUE_ASYNC_DAEMON_EXIT, AUE_NFSSVC_EXIT, AUE_WRITEL, AUE_WRITEVL. - Add new events AUE_EACCESS, AUE_KQUEUE, AUE_KEVENT. Affected files ... .. //depot/projects/trustedbsd/openbsm/bsm/audit_kevents.h#21 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/bsm/audit_kevents.h#21 (text+ko) ==== @@ -33,7 +33,8 @@ #define AUE_EXIT 1 #define AUE_FORK 2 #define AUE_OPEN 3 -#define AUE_O_CREAT AUE_OPEN_RWTC +#define AUE_CREAT 4 +#define AUE_O_CREAT AUE_CREAT #define AUE_LINK 5 #define AUE_UNLINK 6 #define AUE_DELETE AUE_UNLINK @@ -47,12 +48,12 @@ #define AUE_ACCESS 14 #define AUE_CHECKUSERACCESS AUE_ACCESS #define AUE_KILL 15 -#define AUE_O_KILLPG AUE_KILL #define AUE_STAT 16 #define AUE_O_STAT AUE_STAT #define AUE_LSTAT 17 #define AUE_O_LSTAT AUE_LSTAT #define AUE_ACCT 18 +#define AUE_SOLARIS_REBOOT 20 /* XXX: Darwin conflict. */ #define AUE_SYMLINK 21 #define AUE_READLINK 22 #define AUE_EXECVE 23 @@ -61,17 +62,27 @@ #define AUE_SETGROUPS 26 #define AUE_SETPGRP 27 #define AUE_SWAPON 28 +#define AUE_SOLARIS_SETHOSTNAME 29 /* XXX: Darwin conflict. */ #define AUE_FCNTL 30 +#define AUE_SOLARIS_SETPRIORITY 31 /* XXX: Darwin conflict. */ #define AUE_CONNECT 32 #define AUE_ACCEPT 33 #define AUE_O_ACCEPT AUE_ACCEPT #define AUE_BIND 34 #define AUE_SETSOCKOPT 35 +#define AUE_VTRACE 36 /* Solaris-specific. */ +#define AUE_SOLARIS_SETTIMEOFDAY 37 /* XXX: Darwin conflict. */ #define AUE_FCHOWN 38 #define AUE_FCHMOD 39 +/* XXX: #define AUE_SYSINFO 39 */ #define AUE_SETREUID 40 +#define AUE_O_SETREUID AUE_SETREUID #define AUE_SETREGID 41 +#define AUE_O_SETREGID AUE_SETREGID #define AUE_RENAME 42 +#define AUE_SOLARIS_TRUNCATE 43 /* XXX: Darwin conflict. */ +#define AUE_SOLARIS_FTRUNCATE 44 /* XXX: Darwin conflict. */ +#define AUE_SOLARIS_FLOCK 45 /* XXX: Darwin conflict. */ #define AUE_SHUTDOWN 46 #define AUE_MKDIR 47 #define AUE_RMDIR 48 @@ -79,14 +90,29 @@ #define AUE_ADJTIME 50 #define AUE_SETRLIMIT 51 #define AUE_O_SETRLIMIT AUE_SETRLIMIT +#define AUE_KILLPG 52 +#define AUE_O_KILLPG AUE_KILLPG +#define AUE_SOLARIS_NFS_SVC 53 /* XXX: Darwin conflict. */ #define AUE_STATFS 54 #define AUE_FSTATFS 55 +#define AUE_SOLARIS_UNMOUNT 56 /* XXX: Darwin conflict. */ +#define AUE_ASYNC_DAEMON 57 +#define AUE_NFS_GETFH 58 /* XXX: Darwin conflict. */ +#define AUE_SOLARIS_SETDOMAINNAME 59 /* XXX: Darwin conflict. */ +#define AUE_O_SETDOMAINNAME AUE_SYSCTL +#define AUE_SOLARIS_QUOTACTL 60 /* XXX: Darwin conflict. */ +#define AUE_EXPORTFS 61 +#define AUE_O_EXPORTFS AUE_EXPORTFS #define AUE_MOUNT 62 #define AUE_O_MOUNT AUE_MOUNT +#define AUE_SEMSYS 63 #define AUE_MSGSYS 64 #define AUE_SHMSYS 65 +#define AUE_BSMSYS 66 /* Solaris-specific. */ +#define AUE_RFSSYS 67 /* Solaris-specific. */ #define AUE_FCHDIR 68 #define AUE_FCHROOT 69 +#define AUE_VPIXSYS 70 /* Solaris-specific. */ #define AUE_PATHCONF 71 #define AUE_OPEN_R 72 #define AUE_OPEN_RC 73 @@ -130,6 +156,10 @@ #define AUE_CORE 111 #define AUE_CLOSE 112 #define AUE_SYSTEMBOOT 113 +#define AUE_ASYNC_DAEMON_EXIT 114 /* Solaris-only. */ +#define AUE_NFSSVC_EXIT 115 /* Solaris-only. */ +#define AUE_WRITEL 128 /* Solaris-only. */ +#define AUE_WRITEVL 129 /* Solaris-only. */ #define AUE_GETAUID 130 #define AUE_SETAUID 131 #define AUE_GETAUDIT 132 @@ -229,22 +259,22 @@ #define AUE_PROFILE 305 #define AUE_KTRACE 306 #define AUE_SETLOGIN 307 -#define AUE_REBOOT 308 +#define AUE_REBOOT 308 /* XXX: See AUE_SOLARIS_REBOOT. */ #define AUE_REVOKE 309 #define AUE_UMASK 310 #define AUE_MPROTECT 311 -#define AUE_SETPRIORITY 312 -#define AUE_SETTIMEOFDAY 313 -#define AUE_FLOCK 314 +#define AUE_SETPRIORITY 312 /* XXX: See AUE_SOLARIS_SETPRIORITY. */ +#define AUE_SETTIMEOFDAY 313 /* XXX: See AUE_SOLARIS_SETTIMEOFDAY. */ +#define AUE_FLOCK 314 /* XXX: See AUE_SOLARIS_FLOCK. */ #define AUE_MKFIFO 315 #define AUE_POLL 316 #define AUE_SOCKETPAIR 317 #define AUE_FUTIMES 318 #define AUE_SETSID 319 #define AUE_SETPRIVEXEC 320 -#define AUE_NFSSVC 321 -#define AUE_GETFH 322 -#define AUE_QUOTACTL 323 +#define AUE_NFSSVC 321 /* XXX: See AUE_SOLARIS_NFS_SVC. */ +#define AUE_GETFH 322 /* XXX: See AUE_SOLARIS_NFS_GETFH. */ +#define AUE_QUOTACTL 323 /* XXX: See AUE_SOLARIS_QUOTACTL. */ #define AUE_ADDPROFILE 324 #define AUE_KDBUGTRACE 325 #define AUE_FSTAT 326 @@ -252,13 +282,12 @@ #define AUE_FPATHCONF 327 #define AUE_GETDIRENTRIES 328 #define AUE_O_GETDIRENTRIES AUE_GETDIRENTRIES -#define AUE_TRUNCATE 329 +#define AUE_TRUNCATE 329 /* XXX: See AUE_SOLARIS_TRUNCATE. */ #define AUE_O_TRUNCATE AUE_TRUNCATE -#define AUE_FTRUNCATE 330 +#define AUE_FTRUNCATE 330 /* XXX: See AUE_SOLARIS_FTRUNCATE. */ #define AUE_O_FTRUNCATE AUE_FTRUNCATE #define AUE_SYSCTL 331 -#define AUE_O_SETDOMAINNAME AUE_SYSCTL -#define AUE_O_SETHOSTNAME AUE_SYSCTL +#define AUE_O_SETHOSTNAME AUE_SYSCTL /* XXX: See AUE_SOLARIS_SET.. */ #define AUE_MLOCK 332 #define AUE_MUNLOCK 333 #define AUE_UNDELETE 334 @@ -303,6 +332,9 @@ #define AUE_FHOPEN 373 /* FreeBSD */ #define AUE_FHSTAT 374 /* FreeBSD */ #define AUE_JAIL 375 /* FreeBSD */ +#define AUE_EACCESS 376 /* FreeBSD */ +#define AUE_KQUEUE 377 /* FreeBSD */ +#define AUE_KEVENT 378 /* FreeBSD */ /* * XXXRW: Values not yet assigned. @@ -349,7 +381,6 @@ #define AUE_MUNLOCKALL AUE_NULL #define AUE_O_ASYNCDAEMON AUE_NULL #define AUE_O_EXECV AUE_NULL -#define AUE_O_EXPORTFS AUE_NULL #define AUE_O_GETDENTS AUE_NULL #define AUE_O_GETDOMAINNAME AUE_NULL #define AUE_O_GETDOPT AUE_NULL @@ -364,8 +395,6 @@ #define AUE_O_SETDOPT AUE_NULL #define AUE_O_SETHOSTID AUE_NULL #define AUE_O_SETQUOTA AUE_NULL -#define AUE_O_SETREGID AUE_NULL -#define AUE_O_SETREUID AUE_NULL #define AUE_O_SIGBLOCK AUE_NULL #define AUE_O_SIGSETMASK AUE_NULL #define AUE_O_SIGSTACK AUE_NULL @@ -388,7 +417,6 @@ #define AUE_SEMGETVALUE AUE_NULL #define AUE_SEMINIT AUE_NULL #define AUE_SEMPOST AUE_NULL -#define AUE_SEMSYS AUE_NULL #define AUE_SEMTRYWAIT AUE_NULL #define AUE_SEMWAIT AUE_NULL #define AUE_SETITIMER AUE_NULL From owner-p4-projects@FreeBSD.ORG Mon Oct 3 09:18:14 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3A80F16A421; Mon, 3 Oct 2005 09:18:14 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E81CC16A41F for ; Mon, 3 Oct 2005 09:18:13 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A52FD43D48 for ; Mon, 3 Oct 2005 09:18:13 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j939IDkZ057428 for ; Mon, 3 Oct 2005 09:18:13 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j939IDNZ057425 for perforce@freebsd.org; Mon, 3 Oct 2005 09:18:13 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 3 Oct 2005 09:18:13 GMT Message-Id: <200510030918.j939IDNZ057425@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 84704 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2005 09:18:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=84704 Change 84704 by rwatson@rwatson_zoo on 2005/10/03 09:17:48 Integrate OpenBSM branch into TrustedBSD audit3 branch: - Style fixes. - New events, event cleanup. - More event descriptions. Affected files ... .. //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/audit.h#3 integrate .. //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/audit_kevents.h#8 integrate .. //depot/projects/trustedbsd/audit3/contrib/openbsm/etc/audit_event#2 integrate Differences ... ==== //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/audit.h#3 (text+ko) ==== @@ -289,16 +289,15 @@ typedef struct au_evclass_map au_evclass_map_t; #if !defined(_KERNEL) && !defined(KERNEL) - -int audit (const void *, int); -int auditon (int, void *, int); -int auditctl (const char *); -int getauid (au_id_t *); -int setauid (const au_id_t *); -int getaudit (struct auditinfo *); -int setaudit (const struct auditinfo *); -int getaudit_addr (struct auditinfo_addr *, int); -int setaudit_addr (const struct auditinfo_addr *, int); +int audit(const void *, int); +int auditon(int, void *, int); +int auditctl(const char *); +int getauid(au_id_t *); +int setauid(const au_id_t *); +int getaudit(struct auditinfo *); +int setaudit(const struct auditinfo *); +int getaudit_addr(struct auditinfo_addr *, int); +int setaudit_addr(const struct auditinfo_addr *, int); #endif /* defined(_KERNEL) || defined(KERNEL) */ __END_DECLS ==== //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/audit_kevents.h#8 (text+ko) ==== @@ -33,7 +33,8 @@ #define AUE_EXIT 1 #define AUE_FORK 2 #define AUE_OPEN 3 -#define AUE_O_CREAT AUE_OPEN_RWTC +#define AUE_CREAT 4 +#define AUE_O_CREAT AUE_CREAT #define AUE_LINK 5 #define AUE_UNLINK 6 #define AUE_DELETE AUE_UNLINK @@ -47,12 +48,12 @@ #define AUE_ACCESS 14 #define AUE_CHECKUSERACCESS AUE_ACCESS #define AUE_KILL 15 -#define AUE_O_KILLPG AUE_KILL #define AUE_STAT 16 #define AUE_O_STAT AUE_STAT #define AUE_LSTAT 17 #define AUE_O_LSTAT AUE_LSTAT #define AUE_ACCT 18 +#define AUE_SOLARIS_REBOOT 20 /* XXX: Darwin conflict. */ #define AUE_SYMLINK 21 #define AUE_READLINK 22 #define AUE_EXECVE 23 @@ -61,17 +62,27 @@ #define AUE_SETGROUPS 26 #define AUE_SETPGRP 27 #define AUE_SWAPON 28 +#define AUE_SOLARIS_SETHOSTNAME 29 /* XXX: Darwin conflict. */ #define AUE_FCNTL 30 +#define AUE_SOLARIS_SETPRIORITY 31 /* XXX: Darwin conflict. */ #define AUE_CONNECT 32 #define AUE_ACCEPT 33 #define AUE_O_ACCEPT AUE_ACCEPT #define AUE_BIND 34 #define AUE_SETSOCKOPT 35 +#define AUE_VTRACE 36 /* Solaris-specific. */ +#define AUE_SOLARIS_SETTIMEOFDAY 37 /* XXX: Darwin conflict. */ #define AUE_FCHOWN 38 #define AUE_FCHMOD 39 +/* XXX: #define AUE_SYSINFO 39 */ #define AUE_SETREUID 40 +#define AUE_O_SETREUID AUE_SETREUID #define AUE_SETREGID 41 +#define AUE_O_SETREGID AUE_SETREGID #define AUE_RENAME 42 +#define AUE_SOLARIS_TRUNCATE 43 /* XXX: Darwin conflict. */ +#define AUE_SOLARIS_FTRUNCATE 44 /* XXX: Darwin conflict. */ +#define AUE_SOLARIS_FLOCK 45 /* XXX: Darwin conflict. */ #define AUE_SHUTDOWN 46 #define AUE_MKDIR 47 #define AUE_RMDIR 48 @@ -79,14 +90,29 @@ #define AUE_ADJTIME 50 #define AUE_SETRLIMIT 51 #define AUE_O_SETRLIMIT AUE_SETRLIMIT +#define AUE_KILLPG 52 +#define AUE_O_KILLPG AUE_KILLPG +#define AUE_SOLARIS_NFS_SVC 53 /* XXX: Darwin conflict. */ #define AUE_STATFS 54 #define AUE_FSTATFS 55 +#define AUE_SOLARIS_UNMOUNT 56 /* XXX: Darwin conflict. */ +#define AUE_ASYNC_DAEMON 57 +#define AUE_NFS_GETFH 58 /* XXX: Darwin conflict. */ +#define AUE_SOLARIS_SETDOMAINNAME 59 /* XXX: Darwin conflict. */ +#define AUE_O_SETDOMAINNAME AUE_SYSCTL +#define AUE_SOLARIS_QUOTACTL 60 /* XXX: Darwin conflict. */ +#define AUE_EXPORTFS 61 +#define AUE_O_EXPORTFS AUE_EXPORTFS #define AUE_MOUNT 62 #define AUE_O_MOUNT AUE_MOUNT +#define AUE_SEMSYS 63 #define AUE_MSGSYS 64 #define AUE_SHMSYS 65 +#define AUE_BSMSYS 66 /* Solaris-specific. */ +#define AUE_RFSSYS 67 /* Solaris-specific. */ #define AUE_FCHDIR 68 #define AUE_FCHROOT 69 +#define AUE_VPIXSYS 70 /* Solaris-specific. */ #define AUE_PATHCONF 71 #define AUE_OPEN_R 72 #define AUE_OPEN_RC 73 @@ -130,6 +156,10 @@ #define AUE_CORE 111 #define AUE_CLOSE 112 #define AUE_SYSTEMBOOT 113 +#define AUE_ASYNC_DAEMON_EXIT 114 /* Solaris-only. */ +#define AUE_NFSSVC_EXIT 115 /* Solaris-only. */ +#define AUE_WRITEL 128 /* Solaris-only. */ +#define AUE_WRITEVL 129 /* Solaris-only. */ #define AUE_GETAUID 130 #define AUE_SETAUID 131 #define AUE_GETAUDIT 132 @@ -229,22 +259,22 @@ #define AUE_PROFILE 305 #define AUE_KTRACE 306 #define AUE_SETLOGIN 307 -#define AUE_REBOOT 308 +#define AUE_REBOOT 308 /* XXX: See AUE_SOLARIS_REBOOT. */ #define AUE_REVOKE 309 #define AUE_UMASK 310 #define AUE_MPROTECT 311 -#define AUE_SETPRIORITY 312 -#define AUE_SETTIMEOFDAY 313 -#define AUE_FLOCK 314 +#define AUE_SETPRIORITY 312 /* XXX: See AUE_SOLARIS_SETPRIORITY. */ +#define AUE_SETTIMEOFDAY 313 /* XXX: See AUE_SOLARIS_SETTIMEOFDAY. */ +#define AUE_FLOCK 314 /* XXX: See AUE_SOLARIS_FLOCK. */ #define AUE_MKFIFO 315 #define AUE_POLL 316 #define AUE_SOCKETPAIR 317 #define AUE_FUTIMES 318 #define AUE_SETSID 319 #define AUE_SETPRIVEXEC 320 -#define AUE_NFSSVC 321 -#define AUE_GETFH 322 -#define AUE_QUOTACTL 323 +#define AUE_NFSSVC 321 /* XXX: See AUE_SOLARIS_NFS_SVC. */ +#define AUE_GETFH 322 /* XXX: See AUE_SOLARIS_NFS_GETFH. */ +#define AUE_QUOTACTL 323 /* XXX: See AUE_SOLARIS_QUOTACTL. */ #define AUE_ADDPROFILE 324 #define AUE_KDBUGTRACE 325 #define AUE_FSTAT 326 @@ -252,13 +282,12 @@ #define AUE_FPATHCONF 327 #define AUE_GETDIRENTRIES 328 #define AUE_O_GETDIRENTRIES AUE_GETDIRENTRIES -#define AUE_TRUNCATE 329 +#define AUE_TRUNCATE 329 /* XXX: See AUE_SOLARIS_TRUNCATE. */ #define AUE_O_TRUNCATE AUE_TRUNCATE -#define AUE_FTRUNCATE 330 +#define AUE_FTRUNCATE 330 /* XXX: See AUE_SOLARIS_FTRUNCATE. */ #define AUE_O_FTRUNCATE AUE_FTRUNCATE #define AUE_SYSCTL 331 -#define AUE_O_SETDOMAINNAME AUE_SYSCTL -#define AUE_O_SETHOSTNAME AUE_SYSCTL +#define AUE_O_SETHOSTNAME AUE_SYSCTL /* XXX: See AUE_SOLARIS_SET.. */ #define AUE_MLOCK 332 #define AUE_MUNLOCK 333 #define AUE_UNDELETE 334 @@ -303,6 +332,9 @@ #define AUE_FHOPEN 373 /* FreeBSD */ #define AUE_FHSTAT 374 /* FreeBSD */ #define AUE_JAIL 375 /* FreeBSD */ +#define AUE_EACCESS 376 /* FreeBSD */ +#define AUE_KQUEUE 377 /* FreeBSD */ +#define AUE_KEVENT 378 /* FreeBSD */ /* * XXXRW: Values not yet assigned. @@ -349,7 +381,6 @@ #define AUE_MUNLOCKALL AUE_NULL #define AUE_O_ASYNCDAEMON AUE_NULL #define AUE_O_EXECV AUE_NULL -#define AUE_O_EXPORTFS AUE_NULL #define AUE_O_GETDENTS AUE_NULL #define AUE_O_GETDOMAINNAME AUE_NULL #define AUE_O_GETDOPT AUE_NULL @@ -364,8 +395,6 @@ #define AUE_O_SETDOPT AUE_NULL #define AUE_O_SETHOSTID AUE_NULL #define AUE_O_SETQUOTA AUE_NULL -#define AUE_O_SETREGID AUE_NULL -#define AUE_O_SETREUID AUE_NULL #define AUE_O_SIGBLOCK AUE_NULL #define AUE_O_SIGSETMASK AUE_NULL #define AUE_O_SIGSTACK AUE_NULL @@ -388,7 +417,6 @@ #define AUE_SEMGETVALUE AUE_NULL #define AUE_SEMINIT AUE_NULL #define AUE_SEMPOST AUE_NULL -#define AUE_SEMSYS AUE_NULL #define AUE_SEMTRYWAIT AUE_NULL #define AUE_SEMWAIT AUE_NULL #define AUE_SETITIMER AUE_NULL ==== //depot/projects/trustedbsd/audit3/contrib/openbsm/etc/audit_event#2 (text+ko) ==== @@ -169,7 +169,6 @@ 205:AUE_SETGID:old setgid(2):pc 206:AUE_READL:readl(2):no 207:AUE_READVL:readvl(2):no -208:AUE_FSTAT:fstat(2):fa 209:AUE_DUP2:dup2(2):no 210:AUE_MMAP:mmap(2):fa 211:AUE_AUDIT:audit(2):ot @@ -284,6 +283,20 @@ 359:AUE_PIDFORTASK:pid_for_task():pc 360:AUE_SYSCTL_NONADMIN:sysctl() - non-admin:ot 361:AUE_COPYFILE:copyfile():fr,fw +362:AUE_LUTIMES:lutimes(2):fm +363:AUE_LCHFLAGS:lchflags(2):fm +364:AUE_SENDFILE:sendfile(2):nt +365:AUE_USELIB:uselib(2):fa +366:AUE_GETRESUID:getresuid(2):pc +367:AUE_SETRESUID:setresuid(2):pc +368:AUE_GETRESGID:getresgid(2):pc +369:AUE_SETRESGID:setresgid(2):pc +370:AUE_WAIT4:wait4(2):pc +371:AUE_LGETFH:lgetfh(2):fa +372:AUE_FHSTATFS:fhstatfs(2):fa +373:AUE_FHOPEN:fhopen(2):fa +374:AUE_FHSTAT:fhstat(2):fa +375:AUE_JAIL:jail(2):pc 6152:AUE_login:login - local:lo 6153:AUE_logout:logout - local:lo 6159:AUE_su:su(1):lo From owner-p4-projects@FreeBSD.ORG Mon Oct 3 10:21:33 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8816F16A421; Mon, 3 Oct 2005 10:21:32 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 480A516A41F for ; Mon, 3 Oct 2005 10:21:32 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 032E343D45 for ; Mon, 3 Oct 2005 10:21:32 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j93ALVDt060426 for ; Mon, 3 Oct 2005 10:21:31 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j93ALV1f060423 for perforce@freebsd.org; Mon, 3 Oct 2005 10:21:31 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 3 Oct 2005 10:21:31 GMT Message-Id: <200510031021.j93ALV1f060423@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 84705 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2005 10:21:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=84705 Change 84705 by rwatson@rwatson_zoo on 2005/10/03 10:21:31 Move declarations of many audit internal data structures and defines from sys/security/audit/audit.h, which contains kernel-public definitions, to audit_private.h. This includes kernel BSM definitions, the internal structure of the kernel audit record, memory types, etc. Annotate that the ARG_* mask values remain exposed to the rest of the kernel audit the path1/path2 and vnode1/vnode2 mask entries which are arguments to audit_arg_*() calls, but largely could be private. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit.h#2 edit .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_private.h#4 edit .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_trigger.c#4 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit.h#2 (text+ko) ==== @@ -42,12 +42,13 @@ extern int audit_enabled; extern int audit_suspended; -#define BSM_SUCCESS 0 -#define BSM_FAILURE 1 -#define BSM_NOAUDIT 2 - /* * Define the masks for the audited arguments. + * + * XXXRW: These need to remain in audit.h for now because our vnode and name + * lookup audit calls rely on passing in flags to indicate which name or + * vnode is being logged. These should move to audit_private.h when that is + * fixed. */ #define ARG_EUID 0x0000000000000001ULL #define ARG_RUID 0x0000000000000002ULL @@ -99,177 +100,19 @@ #define ARG_NONE 0x0000000000000000ULL #define ARG_ALL 0xFFFFFFFFFFFFFFFFULL -#ifdef MALLOC_DECLARE -MALLOC_DECLARE(M_AUDIT); -#endif - -/* Defines for the kernel audit record k_ar_commit field */ -#define AR_COMMIT_KERNEL 0x00000001U -#define AR_COMMIT_USER 0x00000010U - -struct vnode_au_info { - mode_t vn_mode; - uid_t vn_uid; - gid_t vn_gid; - dev_t vn_dev; - long vn_fsid; - long vn_fileid; - long vn_gen; -}; - -struct groupset { - gid_t gidset[NGROUPS]; - u_int gidset_size; -}; - -struct socket_au_info { - int so_domain; - int so_type; - int so_protocol; - in_addr_t so_raddr; /* remote address if INET socket */ - in_addr_t so_laddr; /* local address if INET socket */ - u_short so_rport; /* remote port */ - u_short so_lport; /* local port */ -}; - -union auditon_udata { - char *au_path; - long au_cond; - long au_flags; - long au_policy; - int au_trigger; - au_evclass_map_t au_evclass; - au_mask_t au_mask; - auditinfo_t au_auinfo; - auditpinfo_t au_aupinfo; - auditpinfo_addr_t au_aupinfo_addr; - au_qctrl_t au_qctrl; - au_stat_t au_stat; - au_fstat_t au_fstat; -}; - -struct posix_ipc_perm { - uid_t pipc_uid; - gid_t pipc_gid; - mode_t pipc_mode; -}; - -struct audit_record { - /* Audit record header. */ - u_int32_t ar_magic; - int ar_event; - int ar_retval; /* value returned to the process */ - int ar_errno; /* return status of system call */ - struct timespec ar_starttime; - struct timespec ar_endtime; - u_int64_t ar_valid_arg; /* Bitmask of valid arguments */ - - /* Audit subject information. */ - struct xucred ar_subj_cred; - uid_t ar_subj_ruid; - gid_t ar_subj_rgid; - gid_t ar_subj_egid; - uid_t ar_subj_auid; /* Audit user ID */ - pid_t ar_subj_asid; /* Audit session ID */ - pid_t ar_subj_pid; - struct au_tid ar_subj_term; - char ar_subj_comm[MAXCOMLEN + 1]; - struct au_mask ar_subj_amask; - - /* Operation arguments. */ - uid_t ar_arg_euid; - uid_t ar_arg_ruid; - uid_t ar_arg_suid; - gid_t ar_arg_egid; - gid_t ar_arg_rgid; - gid_t ar_arg_sgid; - pid_t ar_arg_pid; - pid_t ar_arg_asid; - struct au_tid ar_arg_termid; - uid_t ar_arg_uid; - uid_t ar_arg_auid; - gid_t ar_arg_gid; - struct groupset ar_arg_groups; - int ar_arg_fd; - int ar_arg_fflags; - mode_t ar_arg_mode; - int ar_arg_dev; - long ar_arg_value; - void * ar_arg_addr; - int ar_arg_len; - int ar_arg_mask; - u_int ar_arg_signum; - char ar_arg_login[MAXLOGNAME]; - int ar_arg_ctlname[CTL_MAXNAME]; - struct sockaddr ar_arg_sockaddr; - struct socket_au_info ar_arg_sockinfo; - char *ar_arg_upath1; - char *ar_arg_upath2; - char *ar_arg_kpath1; - char *ar_arg_kpath2; - char *ar_arg_text; - struct au_mask ar_arg_amask; - struct vnode_au_info ar_arg_vnode1; - struct vnode_au_info ar_arg_vnode2; - int ar_arg_cmd; - int ar_arg_svipc_cmd; - struct ipc_perm ar_arg_svipc_perm; - int ar_arg_svipc_id; - void * ar_arg_svipc_addr; - struct posix_ipc_perm ar_arg_pipc_perm; - union auditon_udata ar_arg_auditon; - int ar_arg_exitstatus; - int ar_arg_exitretval; -}; - -/* - * In-kernel version of audit record; the basic record plus queue meta-data. - * This record can also have a pointer set to some opaque data that will - * be passed through to the audit writing mechanism. - */ -struct kaudit_record { - struct audit_record k_ar; - u_int32_t k_ar_commit; - void *k_udata; /* user data */ - u_int k_ulen; /* user data length */ - struct uthread *k_uthread; /* thread we are auditing */ - TAILQ_ENTRY(kaudit_record) k_q; -}; - -struct proc; -struct vnode; -struct componentname; - -void audit_abort(struct kaudit_record *ar); -void audit_commit(struct kaudit_record *ar, int error, - int retval); - -struct kaudit_record *audit_new(int event, struct thread *td); - void audit_syscall_enter(unsigned short code, struct thread *td); void audit_syscall_exit(int error, struct thread *td); -int kaudit_to_bsm(struct kaudit_record *kar, - struct au_record **pau); - -int bsm_rec_verify(void *rec); - /* - * Kernel versions of the BSM audit record functions. - */ -struct au_record *kau_open(void); -int kau_write(struct au_record *rec, token_t *m); -void kau_close(struct au_record *rec, - struct timespec *endtime, short event); -void kau_free(struct au_record *rec); -void kau_init(void); -/* * The remaining kernel functions are conditionally compiled in as they * are wrapped by a macro, and the macro should be the only place in * the source tree where these functions are referenced. */ #ifdef AUDIT +struct ipc_perm; +struct sockaddr; +union auditon_udata; void audit_arg_addr(void * addr); void audit_arg_exit(int status, int retval); void audit_arg_len(int len); ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_private.h#4 (text+ko) ==== @@ -24,9 +24,177 @@ #ifndef _BSM_AUDIT_PRIVATE_H #define _BSM_AUDIT_PRIVATE_H +#include +#include +#include + +#define BSM_SUCCESS 0 +#define BSM_FAILURE 1 +#define BSM_NOAUDIT 2 + +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_AUDIT); +#endif + +/* Defines for the kernel audit record k_ar_commit field */ +#define AR_COMMIT_KERNEL 0x00000001U +#define AR_COMMIT_USER 0x00000010U + +struct vnode_au_info { + mode_t vn_mode; + uid_t vn_uid; + gid_t vn_gid; + dev_t vn_dev; + long vn_fsid; + long vn_fileid; + long vn_gen; +}; + +struct groupset { + gid_t gidset[NGROUPS]; + u_int gidset_size; +}; + +struct socket_au_info { + int so_domain; + int so_type; + int so_protocol; + in_addr_t so_raddr; /* remote address if INET socket */ + in_addr_t so_laddr; /* local address if INET socket */ + u_short so_rport; /* remote port */ + u_short so_lport; /* local port */ +}; + +union auditon_udata { + char *au_path; + long au_cond; + long au_flags; + long au_policy; + int au_trigger; + au_evclass_map_t au_evclass; + au_mask_t au_mask; + auditinfo_t au_auinfo; + auditpinfo_t au_aupinfo; + auditpinfo_addr_t au_aupinfo_addr; + au_qctrl_t au_qctrl; + au_stat_t au_stat; + au_fstat_t au_fstat; +}; + +struct posix_ipc_perm { + uid_t pipc_uid; + gid_t pipc_gid; + mode_t pipc_mode; +}; + +struct audit_record { + /* Audit record header. */ + u_int32_t ar_magic; + int ar_event; + int ar_retval; /* value returned to the process */ + int ar_errno; /* return status of system call */ + struct timespec ar_starttime; + struct timespec ar_endtime; + u_int64_t ar_valid_arg; /* Bitmask of valid arguments */ + + /* Audit subject information. */ + struct xucred ar_subj_cred; + uid_t ar_subj_ruid; + gid_t ar_subj_rgid; + gid_t ar_subj_egid; + uid_t ar_subj_auid; /* Audit user ID */ + pid_t ar_subj_asid; /* Audit session ID */ + pid_t ar_subj_pid; + struct au_tid ar_subj_term; + char ar_subj_comm[MAXCOMLEN + 1]; + struct au_mask ar_subj_amask; + + /* Operation arguments. */ + uid_t ar_arg_euid; + uid_t ar_arg_ruid; + uid_t ar_arg_suid; + gid_t ar_arg_egid; + gid_t ar_arg_rgid; + gid_t ar_arg_sgid; + pid_t ar_arg_pid; + pid_t ar_arg_asid; + struct au_tid ar_arg_termid; + uid_t ar_arg_uid; + uid_t ar_arg_auid; + gid_t ar_arg_gid; + struct groupset ar_arg_groups; + int ar_arg_fd; + int ar_arg_fflags; + mode_t ar_arg_mode; + int ar_arg_dev; + long ar_arg_value; + void * ar_arg_addr; + int ar_arg_len; + int ar_arg_mask; + u_int ar_arg_signum; + char ar_arg_login[MAXLOGNAME]; + int ar_arg_ctlname[CTL_MAXNAME]; + struct sockaddr ar_arg_sockaddr; + struct socket_au_info ar_arg_sockinfo; + char *ar_arg_upath1; + char *ar_arg_upath2; + char *ar_arg_kpath1; + char *ar_arg_kpath2; + char *ar_arg_text; + struct au_mask ar_arg_amask; + struct vnode_au_info ar_arg_vnode1; + struct vnode_au_info ar_arg_vnode2; + int ar_arg_cmd; + int ar_arg_svipc_cmd; + struct ipc_perm ar_arg_svipc_perm; + int ar_arg_svipc_id; + void * ar_arg_svipc_addr; + struct posix_ipc_perm ar_arg_pipc_perm; + union auditon_udata ar_arg_auditon; + int ar_arg_exitstatus; + int ar_arg_exitretval; +}; + +/* + * In-kernel version of audit record; the basic record plus queue meta-data. + * This record can also have a pointer set to some opaque data that will + * be passed through to the audit writing mechanism. + */ +struct kaudit_record { + struct audit_record k_ar; + u_int32_t k_ar_commit; + void *k_udata; /* user data */ + u_int k_ulen; /* user data length */ + struct uthread *k_uthread; /* thread we are auditing */ + TAILQ_ENTRY(kaudit_record) k_q; +}; + +void audit_abort(struct kaudit_record *ar); +void audit_commit(struct kaudit_record *ar, int error, + int retval); + +struct kaudit_record *audit_new(int event, struct thread *td); + +int kaudit_to_bsm(struct kaudit_record *kar, + struct au_record **pau); + +int bsm_rec_verify(void *rec); + +/* + * Kernel versions of the BSM audit record functions. + */ +struct au_record *kau_open(void); +int kau_write(struct au_record *rec, token_t *m); +void kau_close(struct au_record *rec, + struct timespec *endtime, short event); +void kau_free(struct au_record *rec); +void kau_init(void); + + #define AU_PRS_SUCCESS 1 #define AU_PRS_FAILURE 2 #define AU_PRS_BOTH (AU_PRS_SUCCESS|AU_PRS_FAILURE) + /* * Flags to use on audit files when opening and closing. */ ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_trigger.c#4 (text+ko) ==== @@ -35,6 +35,7 @@ #include #include +#include #include /* From owner-p4-projects@FreeBSD.ORG Mon Oct 3 10:22:35 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C802B16A421; Mon, 3 Oct 2005 10:22:34 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9ECD316A41F for ; Mon, 3 Oct 2005 10:22:34 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E801F43D4C for ; Mon, 3 Oct 2005 10:22:33 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j93AMXrf060533 for ; Mon, 3 Oct 2005 10:22:33 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j93AMXp7060530 for perforce@freebsd.org; Mon, 3 Oct 2005 10:22:33 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 3 Oct 2005 10:22:33 GMT Message-Id: <200510031022.j93AMXp7060530@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 84706 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2005 10:22:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=84706 Change 84706 by rwatson@rwatson_zoo on 2005/10/03 10:22:32 Integrate contrib/openbsm include files into the kernel tree in the audit3 branch. - Style fixes. - New events, event cleanup. - More event descriptions. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/bsm/audit.h#16 integrate .. //depot/projects/trustedbsd/audit3/sys/bsm/audit_internal.h#2 integrate .. //depot/projects/trustedbsd/audit3/sys/bsm/audit_kevents.h#9 integrate .. //depot/projects/trustedbsd/audit3/sys/bsm/audit_record.h#5 integrate Differences ... ==== //depot/projects/trustedbsd/audit3/sys/bsm/audit.h#16 (text+ko) ==== @@ -25,11 +25,8 @@ #define _BSM_AUDIT_H #include +#include #include -#include -#include -#include -#include #define AUDIT_RECORD_MAGIC 0x828a0f1b #define MAX_AUDIT_RECORDS 20 @@ -63,6 +60,11 @@ #define AUDIT_TRIGGER_MAX 5 /* + * File that will be read for trigger events from the kernel + */ +#define AUDIT_TRIGGER_FILE "/dev/audit" + +/* * Pre-defined audit IDs */ #define AU_DEFAUDITID -1 @@ -307,15 +309,16 @@ #ifndef _KERNEL -int audit (const void *, int); -int auditon (int, void *, int); -int auditctl (const char *); -int getauid (au_id_t *); -int setauid (const au_id_t *); -int getaudit (struct auditinfo *); -int setaudit (const struct auditinfo *); -int getaudit_addr (struct auditinfo_addr *, int); -int setaudit_addr (const struct auditinfo_addr *, int); +int audit(const void *, int); +int auditon(int, void *, int); +int auditctl(const char *); +int getauid(au_id_t *); +int setauid(const au_id_t *); +int getaudit(struct auditinfo *); +int setaudit(const struct auditinfo *); +int getaudit_addr(struct auditinfo_addr *, int); +int setaudit_addr(const struct auditinfo_addr *, int); + #endif /* !_KERNEL */ __END_DECLS ==== //depot/projects/trustedbsd/audit3/sys/bsm/audit_internal.h#2 (text+ko) ==== @@ -2,9 +2,12 @@ * @APPLE_LICENSE_HEADER_START@ * * Copyright (c) 1999-2004 Apple Computer, Inc. - * Copyright (c) 2005 Robert N. M. Watson + * Copyright (c) 2005 SPARTA, Inc. * All Rights Reserved. * + * This code was developed in part by Robert N. M. Watson, Senior Principal + * Scientist, SPARTA, Inc. + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in ==== //depot/projects/trustedbsd/audit3/sys/bsm/audit_kevents.h#9 (text+ko) ==== @@ -33,7 +33,8 @@ #define AUE_EXIT 1 #define AUE_FORK 2 #define AUE_OPEN 3 -#define AUE_O_CREAT AUE_OPEN_RWTC +#define AUE_CREAT 4 +#define AUE_O_CREAT AUE_CREAT #define AUE_LINK 5 #define AUE_UNLINK 6 #define AUE_DELETE AUE_UNLINK @@ -47,12 +48,12 @@ #define AUE_ACCESS 14 #define AUE_CHECKUSERACCESS AUE_ACCESS #define AUE_KILL 15 -#define AUE_O_KILLPG AUE_KILL #define AUE_STAT 16 #define AUE_O_STAT AUE_STAT #define AUE_LSTAT 17 #define AUE_O_LSTAT AUE_LSTAT #define AUE_ACCT 18 +#define AUE_SOLARIS_REBOOT 20 /* XXX: Darwin conflict. */ #define AUE_SYMLINK 21 #define AUE_READLINK 22 #define AUE_EXECVE 23 @@ -61,17 +62,27 @@ #define AUE_SETGROUPS 26 #define AUE_SETPGRP 27 #define AUE_SWAPON 28 +#define AUE_SOLARIS_SETHOSTNAME 29 /* XXX: Darwin conflict. */ #define AUE_FCNTL 30 +#define AUE_SOLARIS_SETPRIORITY 31 /* XXX: Darwin conflict. */ #define AUE_CONNECT 32 #define AUE_ACCEPT 33 #define AUE_O_ACCEPT AUE_ACCEPT #define AUE_BIND 34 #define AUE_SETSOCKOPT 35 +#define AUE_VTRACE 36 /* Solaris-specific. */ +#define AUE_SOLARIS_SETTIMEOFDAY 37 /* XXX: Darwin conflict. */ #define AUE_FCHOWN 38 #define AUE_FCHMOD 39 +/* XXX: #define AUE_SYSINFO 39 */ #define AUE_SETREUID 40 +#define AUE_O_SETREUID AUE_SETREUID #define AUE_SETREGID 41 +#define AUE_O_SETREGID AUE_SETREGID #define AUE_RENAME 42 +#define AUE_SOLARIS_TRUNCATE 43 /* XXX: Darwin conflict. */ +#define AUE_SOLARIS_FTRUNCATE 44 /* XXX: Darwin conflict. */ +#define AUE_SOLARIS_FLOCK 45 /* XXX: Darwin conflict. */ #define AUE_SHUTDOWN 46 #define AUE_MKDIR 47 #define AUE_RMDIR 48 @@ -79,14 +90,29 @@ #define AUE_ADJTIME 50 #define AUE_SETRLIMIT 51 #define AUE_O_SETRLIMIT AUE_SETRLIMIT +#define AUE_KILLPG 52 +#define AUE_O_KILLPG AUE_KILLPG +#define AUE_SOLARIS_NFS_SVC 53 /* XXX: Darwin conflict. */ #define AUE_STATFS 54 #define AUE_FSTATFS 55 +#define AUE_SOLARIS_UNMOUNT 56 /* XXX: Darwin conflict. */ +#define AUE_ASYNC_DAEMON 57 +#define AUE_NFS_GETFH 58 /* XXX: Darwin conflict. */ +#define AUE_SOLARIS_SETDOMAINNAME 59 /* XXX: Darwin conflict. */ +#define AUE_O_SETDOMAINNAME AUE_SYSCTL +#define AUE_SOLARIS_QUOTACTL 60 /* XXX: Darwin conflict. */ +#define AUE_EXPORTFS 61 +#define AUE_O_EXPORTFS AUE_EXPORTFS #define AUE_MOUNT 62 #define AUE_O_MOUNT AUE_MOUNT +#define AUE_SEMSYS 63 #define AUE_MSGSYS 64 #define AUE_SHMSYS 65 +#define AUE_BSMSYS 66 /* Solaris-specific. */ +#define AUE_RFSSYS 67 /* Solaris-specific. */ #define AUE_FCHDIR 68 #define AUE_FCHROOT 69 +#define AUE_VPIXSYS 70 /* Solaris-specific. */ #define AUE_PATHCONF 71 #define AUE_OPEN_R 72 #define AUE_OPEN_RC 73 @@ -130,6 +156,10 @@ #define AUE_CORE 111 #define AUE_CLOSE 112 #define AUE_SYSTEMBOOT 113 +#define AUE_ASYNC_DAEMON_EXIT 114 /* Solaris-only. */ +#define AUE_NFSSVC_EXIT 115 /* Solaris-only. */ +#define AUE_WRITEL 128 /* Solaris-only. */ +#define AUE_WRITEVL 129 /* Solaris-only. */ #define AUE_GETAUID 130 #define AUE_SETAUID 131 #define AUE_GETAUDIT 132 @@ -229,22 +259,22 @@ #define AUE_PROFILE 305 #define AUE_KTRACE 306 #define AUE_SETLOGIN 307 -#define AUE_REBOOT 308 +#define AUE_REBOOT 308 /* XXX: See AUE_SOLARIS_REBOOT. */ #define AUE_REVOKE 309 #define AUE_UMASK 310 #define AUE_MPROTECT 311 -#define AUE_SETPRIORITY 312 -#define AUE_SETTIMEOFDAY 313 -#define AUE_FLOCK 314 +#define AUE_SETPRIORITY 312 /* XXX: See AUE_SOLARIS_SETPRIORITY. */ +#define AUE_SETTIMEOFDAY 313 /* XXX: See AUE_SOLARIS_SETTIMEOFDAY. */ +#define AUE_FLOCK 314 /* XXX: See AUE_SOLARIS_FLOCK. */ #define AUE_MKFIFO 315 #define AUE_POLL 316 #define AUE_SOCKETPAIR 317 #define AUE_FUTIMES 318 #define AUE_SETSID 319 #define AUE_SETPRIVEXEC 320 -#define AUE_NFSSVC 321 -#define AUE_GETFH 322 -#define AUE_QUOTACTL 323 +#define AUE_NFSSVC 321 /* XXX: See AUE_SOLARIS_NFS_SVC. */ +#define AUE_GETFH 322 /* XXX: See AUE_SOLARIS_NFS_GETFH. */ +#define AUE_QUOTACTL 323 /* XXX: See AUE_SOLARIS_QUOTACTL. */ #define AUE_ADDPROFILE 324 #define AUE_KDBUGTRACE 325 #define AUE_FSTAT 326 @@ -252,13 +282,12 @@ #define AUE_FPATHCONF 327 #define AUE_GETDIRENTRIES 328 #define AUE_O_GETDIRENTRIES AUE_GETDIRENTRIES -#define AUE_TRUNCATE 329 +#define AUE_TRUNCATE 329 /* XXX: See AUE_SOLARIS_TRUNCATE. */ #define AUE_O_TRUNCATE AUE_TRUNCATE -#define AUE_FTRUNCATE 330 +#define AUE_FTRUNCATE 330 /* XXX: See AUE_SOLARIS_FTRUNCATE. */ #define AUE_O_FTRUNCATE AUE_FTRUNCATE #define AUE_SYSCTL 331 -#define AUE_O_SETDOMAINNAME AUE_SYSCTL -#define AUE_O_SETHOSTNAME AUE_SYSCTL +#define AUE_O_SETHOSTNAME AUE_SYSCTL /* XXX: See AUE_SOLARIS_SET.. */ #define AUE_MLOCK 332 #define AUE_MUNLOCK 333 #define AUE_UNDELETE 334 @@ -303,6 +332,9 @@ #define AUE_FHOPEN 373 /* FreeBSD */ #define AUE_FHSTAT 374 /* FreeBSD */ #define AUE_JAIL 375 /* FreeBSD */ +#define AUE_EACCESS 376 /* FreeBSD */ +#define AUE_KQUEUE 377 /* FreeBSD */ +#define AUE_KEVENT 378 /* FreeBSD */ /* * XXXRW: Values not yet assigned. @@ -349,7 +381,6 @@ #define AUE_MUNLOCKALL AUE_NULL #define AUE_O_ASYNCDAEMON AUE_NULL #define AUE_O_EXECV AUE_NULL -#define AUE_O_EXPORTFS AUE_NULL #define AUE_O_GETDENTS AUE_NULL #define AUE_O_GETDOMAINNAME AUE_NULL #define AUE_O_GETDOPT AUE_NULL @@ -364,8 +395,6 @@ #define AUE_O_SETDOPT AUE_NULL #define AUE_O_SETHOSTID AUE_NULL #define AUE_O_SETQUOTA AUE_NULL -#define AUE_O_SETREGID AUE_NULL -#define AUE_O_SETREUID AUE_NULL #define AUE_O_SIGBLOCK AUE_NULL #define AUE_O_SIGSETMASK AUE_NULL #define AUE_O_SIGSTACK AUE_NULL @@ -388,7 +417,6 @@ #define AUE_SEMGETVALUE AUE_NULL #define AUE_SEMINIT AUE_NULL #define AUE_SEMPOST AUE_NULL -#define AUE_SEMSYS AUE_NULL #define AUE_SEMTRYWAIT AUE_NULL #define AUE_SEMWAIT AUE_NULL #define AUE_SETITIMER AUE_NULL ==== //depot/projects/trustedbsd/audit3/sys/bsm/audit_record.h#5 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Mon Oct 3 10:52:11 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2146316A422; Mon, 3 Oct 2005 10:52:11 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA6F616A41F for ; Mon, 3 Oct 2005 10:52:10 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 825E943D53 for ; Mon, 3 Oct 2005 10:52:10 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j93AqAHm061797 for ; Mon, 3 Oct 2005 10:52:10 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j93AqA1b061794 for perforce@freebsd.org; Mon, 3 Oct 2005 10:52:10 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 3 Oct 2005 10:52:10 GMT Message-Id: <200510031052.j93AqA1b061794@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 84708 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2005 10:52:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=84708 Change 84708 by rwatson@rwatson_zoo on 2005/10/03 10:51:26 Add AUE event numbers for additional system calls. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/kern/init_sysent.c#21 edit .. //depot/projects/trustedbsd/audit3/sys/kern/syscalls.c#12 edit .. //depot/projects/trustedbsd/audit3/sys/kern/syscalls.master#24 edit .. //depot/projects/trustedbsd/audit3/sys/sys/syscall.h#12 edit .. //depot/projects/trustedbsd/audit3/sys/sys/syscall.mk#13 edit .. //depot/projects/trustedbsd/audit3/sys/sys/sysproto.h#16 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/kern/init_sysent.c#21 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/init_sysent.c,v 1.196 2005/09/24 23:47:04 csjp Exp $ + * $FreeBSD$ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.198 2005/07/08 15:01:13 jhb Exp */ @@ -36,7 +36,7 @@ { SYF_MPSAFE | AS(write_args), (sy_call_t *)write, AUE_NULL }, /* 4 = write */ { SYF_MPSAFE | AS(open_args), (sy_call_t *)open, AUE_OPEN_RWTC }, /* 5 = open */ { SYF_MPSAFE | AS(close_args), (sy_call_t *)close, AUE_CLOSE }, /* 6 = close */ - { SYF_MPSAFE | AS(wait_args), (sy_call_t *)wait4, AUE_NULL }, /* 7 = wait4 */ + { SYF_MPSAFE | AS(wait_args), (sy_call_t *)wait4, AUE_WAIT4 }, /* 7 = wait4 */ { compat(SYF_MPSAFE | AS(ocreat_args),creat), AUE_O_CREAT }, /* 8 = old creat */ { SYF_MPSAFE | AS(link_args), (sy_call_t *)link, AUE_LINK }, /* 9 = link */ { SYF_MPSAFE | AS(unlink_args), (sy_call_t *)unlink, AUE_UNLINK }, /* 10 = unlink */ @@ -53,8 +53,8 @@ { AS(mount_args), (sy_call_t *)mount, AUE_MOUNT }, /* 21 = mount */ { AS(unmount_args), (sy_call_t *)unmount, AUE_UMOUNT }, /* 22 = unmount */ { SYF_MPSAFE | AS(setuid_args), (sy_call_t *)setuid, AUE_SETUID }, /* 23 = setuid */ - { SYF_MPSAFE | 0, (sy_call_t *)getuid, AUE_NULL }, /* 24 = getuid */ - { SYF_MPSAFE | 0, (sy_call_t *)geteuid, AUE_NULL }, /* 25 = geteuid */ + { SYF_MPSAFE | 0, (sy_call_t *)getuid, AUE_GETUID }, /* 24 = getuid */ + { SYF_MPSAFE | 0, (sy_call_t *)geteuid, AUE_GETEUID }, /* 25 = geteuid */ { SYF_MPSAFE | AS(ptrace_args), (sy_call_t *)ptrace, AUE_PTRACE }, /* 26 = ptrace */ { SYF_MPSAFE | AS(recvmsg_args), (sy_call_t *)recvmsg, AUE_RECVMSG }, /* 27 = recvmsg */ { SYF_MPSAFE | AS(sendmsg_args), (sy_call_t *)sendmsg, AUE_SENDMSG }, /* 28 = sendmsg */ @@ -155,8 +155,8 @@ { SYF_MPSAFE | AS(fchown_args), (sy_call_t *)fchown, AUE_FCHOWN }, /* 123 = fchown */ { SYF_MPSAFE | AS(fchmod_args), (sy_call_t *)fchmod, AUE_FCHMOD }, /* 124 = fchmod */ { compat(SYF_MPSAFE | AS(recvfrom_args),recvfrom), AUE_RECVFROM }, /* 125 = old recvfrom */ - { SYF_MPSAFE | AS(setreuid_args), (sy_call_t *)setreuid, AUE_O_SETREUID }, /* 126 = setreuid */ - { SYF_MPSAFE | AS(setregid_args), (sy_call_t *)setregid, AUE_O_SETREGID }, /* 127 = setregid */ + { SYF_MPSAFE | AS(setreuid_args), (sy_call_t *)setreuid, AUE_SETREUID }, /* 126 = setreuid */ + { SYF_MPSAFE | AS(setregid_args), (sy_call_t *)setregid, AUE_SETREGID }, /* 127 = setregid */ { SYF_MPSAFE | AS(rename_args), (sy_call_t *)rename, AUE_RENAME }, /* 128 = rename */ { compat(SYF_MPSAFE | AS(otruncate_args),truncate), AUE_O_TRUNCATE }, /* 129 = old truncate */ { compat(SYF_MPSAFE | AS(oftruncate_args),ftruncate), AUE_O_FTRUNCATE }, /* 130 = old ftruncate */ @@ -189,7 +189,7 @@ { compat4(SYF_MPSAFE | AS(freebsd4_statfs_args),statfs), AUE_STATFS }, /* 157 = old statfs */ { compat4(SYF_MPSAFE | AS(freebsd4_fstatfs_args),fstatfs), AUE_FSTATFS }, /* 158 = old fstatfs */ { 0, (sy_call_t *)nosys, AUE_NULL }, /* 159 = nosys */ - { SYF_MPSAFE | AS(lgetfh_args), (sy_call_t *)lgetfh, AUE_NULL }, /* 160 = lgetfh */ + { SYF_MPSAFE | AS(lgetfh_args), (sy_call_t *)lgetfh, AUE_LGETFH }, /* 160 = lgetfh */ { SYF_MPSAFE | AS(getfh_args), (sy_call_t *)getfh, AUE_GETFH }, /* 161 = getfh */ { SYF_MPSAFE | AS(getdomainname_args), (sy_call_t *)getdomainname, AUE_O_GETDOMAINNAME }, /* 162 = getdomainname */ { SYF_MPSAFE | AS(setdomainname_args), (sy_call_t *)setdomainname, AUE_O_SETDOMAINNAME }, /* 163 = setdomainname */ @@ -326,9 +326,9 @@ { 0, (sy_call_t *)nosys, AUE_NULL }, /* 294 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL }, /* 295 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL }, /* 296 = nosys */ - { compat4(SYF_MPSAFE | AS(freebsd4_fhstatfs_args),fhstatfs), AUE_NULL }, /* 297 = old fhstatfs */ - { SYF_MPSAFE | AS(fhopen_args), (sy_call_t *)fhopen, AUE_NULL }, /* 298 = fhopen */ - { SYF_MPSAFE | AS(fhstat_args), (sy_call_t *)fhstat, AUE_NULL }, /* 299 = fhstat */ + { compat4(SYF_MPSAFE | AS(freebsd4_fhstatfs_args),fhstatfs), AUE_FHSTATFS }, /* 297 = old fhstatfs */ + { SYF_MPSAFE | AS(fhopen_args), (sy_call_t *)fhopen, AUE_FHOPEN }, /* 298 = fhopen */ + { SYF_MPSAFE | AS(fhstat_args), (sy_call_t *)fhstat, AUE_FHSTAT }, /* 299 = fhstat */ { SYF_MPSAFE | AS(modnext_args), (sy_call_t *)modnext, AUE_NULL }, /* 300 = modnext */ { SYF_MPSAFE | AS(modstat_args), (sy_call_t *)modstat, AUE_NULL }, /* 301 = modstat */ { SYF_MPSAFE | AS(modfnext_args), (sy_call_t *)modfnext, AUE_NULL }, /* 302 = modfnext */ @@ -367,14 +367,14 @@ { SYF_MPSAFE | AS(utrace_args), (sy_call_t *)utrace, AUE_NULL }, /* 335 = utrace */ { compat4(SYF_MPSAFE | AS(freebsd4_sendfile_args),sendfile), AUE_SENDFILE }, /* 336 = old sendfile */ { SYF_MPSAFE | AS(kldsym_args), (sy_call_t *)kldsym, AUE_NULL }, /* 337 = kldsym */ - { SYF_MPSAFE | AS(jail_args), (sy_call_t *)jail, AUE_NULL }, /* 338 = jail */ + { SYF_MPSAFE | AS(jail_args), (sy_call_t *)jail, AUE_JAIL }, /* 338 = jail */ { 0, (sy_call_t *)nosys, AUE_NULL }, /* 339 = pioctl */ { SYF_MPSAFE | AS(sigprocmask_args), (sy_call_t *)sigprocmask, AUE_SIGPROCMASK }, /* 340 = sigprocmask */ { SYF_MPSAFE | AS(sigsuspend_args), (sy_call_t *)sigsuspend, AUE_SIGSUSPEND }, /* 341 = sigsuspend */ { compat4(SYF_MPSAFE | AS(freebsd4_sigaction_args),sigaction), AUE_SIGACTION }, /* 342 = old sigaction */ { SYF_MPSAFE | AS(sigpending_args), (sy_call_t *)sigpending, AUE_SIGPENDING }, /* 343 = sigpending */ { compat4(SYF_MPSAFE | AS(freebsd4_sigreturn_args),sigreturn), AUE_SIGRETURN }, /* 344 = old sigreturn */ - { SYF_MPSAFE | AS(sigtimedwait_args), (sy_call_t *)sigtimedwait, AUE_NULL }, /* 345 = sigtimedwait */ + { SYF_MPSAFE | AS(sigtimedwait_args), (sy_call_t *)sigtimedwait, AUE_SIGWAIT }, /* 345 = sigtimedwait */ { SYF_MPSAFE | AS(sigwaitinfo_args), (sy_call_t *)sigwaitinfo, AUE_NULL }, /* 346 = sigwaitinfo */ { SYF_MPSAFE | AS(__acl_get_file_args), (sy_call_t *)__acl_get_file, AUE_NULL }, /* 347 = __acl_get_file */ { SYF_MPSAFE | AS(__acl_set_file_args), (sy_call_t *)__acl_set_file, AUE_NULL }, /* 348 = __acl_set_file */ @@ -384,13 +384,13 @@ { SYF_MPSAFE | AS(__acl_delete_fd_args), (sy_call_t *)__acl_delete_fd, AUE_NULL }, /* 352 = __acl_delete_fd */ { SYF_MPSAFE | AS(__acl_aclcheck_file_args), (sy_call_t *)__acl_aclcheck_file, AUE_NULL }, /* 353 = __acl_aclcheck_file */ { SYF_MPSAFE | AS(__acl_aclcheck_fd_args), (sy_call_t *)__acl_aclcheck_fd, AUE_NULL }, /* 354 = __acl_aclcheck_fd */ - { SYF_MPSAFE | AS(extattrctl_args), (sy_call_t *)extattrctl, AUE_NULL }, /* 355 = extattrctl */ - { SYF_MPSAFE | AS(extattr_set_file_args), (sy_call_t *)extattr_set_file, AUE_NULL }, /* 356 = extattr_set_file */ - { SYF_MPSAFE | AS(extattr_get_file_args), (sy_call_t *)extattr_get_file, AUE_NULL }, /* 357 = extattr_get_file */ - { SYF_MPSAFE | AS(extattr_delete_file_args), (sy_call_t *)extattr_delete_file, AUE_NULL }, /* 358 = extattr_delete_file */ + { AS(extattrctl_args), (sy_call_t *)extattrctl, AUE_NULL }, /* 355 = extattrctl */ + { AS(extattr_set_file_args), (sy_call_t *)extattr_set_file, AUE_NULL }, /* 356 = extattr_set_file */ + { AS(extattr_get_file_args), (sy_call_t *)extattr_get_file, AUE_NULL }, /* 357 = extattr_get_file */ + { AS(extattr_delete_file_args), (sy_call_t *)extattr_delete_file, AUE_NULL }, /* 358 = extattr_delete_file */ { AS(aio_waitcomplete_args), (sy_call_t *)lkmressys, AUE_NULL }, /* 359 = aio_waitcomplete */ - { SYF_MPSAFE | AS(getresuid_args), (sy_call_t *)getresuid, AUE_NULL }, /* 360 = getresuid */ - { SYF_MPSAFE | AS(getresgid_args), (sy_call_t *)getresgid, AUE_NULL }, /* 361 = getresgid */ + { SYF_MPSAFE | AS(getresuid_args), (sy_call_t *)getresuid, AUE_GETRESUID }, /* 360 = getresuid */ + { SYF_MPSAFE | AS(getresgid_args), (sy_call_t *)getresgid, AUE_GETRESGID }, /* 361 = getresgid */ { SYF_MPSAFE | 0, (sy_call_t *)kqueue, AUE_NULL }, /* 362 = kqueue */ { SYF_MPSAFE | AS(kevent_args), (sy_call_t *)kevent, AUE_NULL }, /* 363 = kevent */ { 0, (sy_call_t *)nosys, AUE_NULL }, /* 364 = __cap_get_proc */ @@ -400,12 +400,12 @@ { 0, (sy_call_t *)nosys, AUE_NULL }, /* 368 = __cap_set_fd */ { 0, (sy_call_t *)nosys, AUE_NULL }, /* 369 = __cap_set_file */ { AS(nosys_args), (sy_call_t *)lkmressys, AUE_NULL }, /* 370 = lkmressys */ - { SYF_MPSAFE | AS(extattr_set_fd_args), (sy_call_t *)extattr_set_fd, AUE_NULL }, /* 371 = extattr_set_fd */ - { SYF_MPSAFE | AS(extattr_get_fd_args), (sy_call_t *)extattr_get_fd, AUE_NULL }, /* 372 = extattr_get_fd */ - { SYF_MPSAFE | AS(extattr_delete_fd_args), (sy_call_t *)extattr_delete_fd, AUE_NULL }, /* 373 = extattr_delete_fd */ + { AS(extattr_set_fd_args), (sy_call_t *)extattr_set_fd, AUE_NULL }, /* 371 = extattr_set_fd */ + { AS(extattr_get_fd_args), (sy_call_t *)extattr_get_fd, AUE_NULL }, /* 372 = extattr_get_fd */ + { AS(extattr_delete_fd_args), (sy_call_t *)extattr_delete_fd, AUE_NULL }, /* 373 = extattr_delete_fd */ { SYF_MPSAFE | AS(__setugid_args), (sy_call_t *)__setugid, AUE_NULL }, /* 374 = __setugid */ { AS(nfsclnt_args), (sy_call_t *)nosys, AUE_NULL }, /* 375 = nfsclnt */ - { SYF_MPSAFE | AS(eaccess_args), (sy_call_t *)eaccess, AUE_NULL }, /* 376 = eaccess */ + { SYF_MPSAFE | AS(eaccess_args), (sy_call_t *)eaccess, AUE_EACCESS }, /* 376 = eaccess */ { 0, (sy_call_t *)nosys, AUE_NULL }, /* 377 = afs_syscall */ { AS(nmount_args), (sy_call_t *)nmount, AUE_NULL }, /* 378 = nmount */ { SYF_MPSAFE | 0, (sy_call_t *)kse_exit, AUE_NULL }, /* 379 = kse_exit */ @@ -441,9 +441,9 @@ { SYF_MPSAFE | AS(__mac_get_pid_args), (sy_call_t *)__mac_get_pid, AUE_NULL }, /* 409 = __mac_get_pid */ { SYF_MPSAFE | AS(__mac_get_link_args), (sy_call_t *)__mac_get_link, AUE_NULL }, /* 410 = __mac_get_link */ { SYF_MPSAFE | AS(__mac_set_link_args), (sy_call_t *)__mac_set_link, AUE_NULL }, /* 411 = __mac_set_link */ - { SYF_MPSAFE | AS(extattr_set_link_args), (sy_call_t *)extattr_set_link, AUE_NULL }, /* 412 = extattr_set_link */ - { SYF_MPSAFE | AS(extattr_get_link_args), (sy_call_t *)extattr_get_link, AUE_NULL }, /* 413 = extattr_get_link */ - { SYF_MPSAFE | AS(extattr_delete_link_args), (sy_call_t *)extattr_delete_link, AUE_NULL }, /* 414 = extattr_delete_link */ + { AS(extattr_set_link_args), (sy_call_t *)extattr_set_link, AUE_NULL }, /* 412 = extattr_set_link */ + { AS(extattr_get_link_args), (sy_call_t *)extattr_get_link, AUE_NULL }, /* 413 = extattr_get_link */ + { AS(extattr_delete_link_args), (sy_call_t *)extattr_delete_link, AUE_NULL }, /* 414 = extattr_delete_link */ { SYF_MPSAFE | AS(__mac_execve_args), (sy_call_t *)__mac_execve, AUE_NULL }, /* 415 = __mac_execve */ { SYF_MPSAFE | AS(sigaction_args), (sy_call_t *)sigaction, AUE_SIGACTION }, /* 416 = sigaction */ { SYF_MPSAFE | AS(sigreturn_args), (sy_call_t *)sigreturn, AUE_SIGRETURN }, /* 417 = sigreturn */ @@ -466,9 +466,9 @@ { SYF_MPSAFE | AS(_umtx_lock_args), (sy_call_t *)_umtx_lock, AUE_NULL }, /* 434 = _umtx_lock */ { SYF_MPSAFE | AS(_umtx_unlock_args), (sy_call_t *)_umtx_unlock, AUE_NULL }, /* 435 = _umtx_unlock */ { SYF_MPSAFE | AS(jail_attach_args), (sy_call_t *)jail_attach, AUE_NULL }, /* 436 = jail_attach */ - { SYF_MPSAFE | AS(extattr_list_fd_args), (sy_call_t *)extattr_list_fd, AUE_NULL }, /* 437 = extattr_list_fd */ - { SYF_MPSAFE | AS(extattr_list_file_args), (sy_call_t *)extattr_list_file, AUE_NULL }, /* 438 = extattr_list_file */ - { SYF_MPSAFE | AS(extattr_list_link_args), (sy_call_t *)extattr_list_link, AUE_NULL }, /* 439 = extattr_list_link */ + { AS(extattr_list_fd_args), (sy_call_t *)extattr_list_fd, AUE_NULL }, /* 437 = extattr_list_fd */ + { AS(extattr_list_file_args), (sy_call_t *)extattr_list_file, AUE_NULL }, /* 438 = extattr_list_file */ + { AS(extattr_list_link_args), (sy_call_t *)extattr_list_link, AUE_NULL }, /* 439 = extattr_list_link */ { SYF_MPSAFE | AS(kse_switchin_args), (sy_call_t *)kse_switchin, AUE_NULL }, /* 440 = kse_switchin */ { SYF_MPSAFE | AS(ksem_timedwait_args), (sy_call_t *)lkmressys, AUE_NULL }, /* 441 = ksem_timedwait */ { SYF_MPSAFE | AS(thr_suspend_args), (sy_call_t *)thr_suspend, AUE_NULL }, /* 442 = thr_suspend */ ==== //depot/projects/trustedbsd/audit3/sys/kern/syscalls.c#12 (text+ko) ==== ==== //depot/projects/trustedbsd/audit3/sys/kern/syscalls.master#24 (text+ko) ==== @@ -63,7 +63,7 @@ ; but we're not ready for `const' or varargs. ; XXX man page says `mode_t mode'. 6 AUE_CLOSE MSTD { int close(int fd); } -7 AUE_NULL MSTD { int wait4(int pid, int *status, \ +7 AUE_WAIT4 MSTD { int wait4(int pid, int *status, \ int options, struct rusage *rusage); } \ wait4 wait_args int 8 AUE_O_CREAT MCOMPAT { int creat(char *path, int mode); } @@ -87,8 +87,8 @@ ; XXX `path' should have type `const char *' but we're not ready for that. 22 AUE_UMOUNT STD { int unmount(char *path, int flags); } 23 AUE_SETUID MSTD { int setuid(uid_t uid); } -24 AUE_NULL MSTD { uid_t getuid(void); } -25 AUE_NULL MSTD { uid_t geteuid(void); } +24 AUE_GETUID MSTD { uid_t getuid(void); } +25 AUE_GETEUID MSTD { uid_t geteuid(void); } 26 AUE_PTRACE MSTD { int ptrace(int req, pid_t pid, \ caddr_t addr, int data); } 27 AUE_RECVMSG MSTD { int recvmsg(int s, struct msghdr *msg, \ @@ -258,8 +258,8 @@ size_t len, int flags, caddr_t from, int \ *fromlenaddr); } recvfrom recvfrom_args \ int -126 AUE_O_SETREUID MSTD { int setreuid(int ruid, int euid); } -127 AUE_O_SETREGID MSTD { int setregid(int rgid, int egid); } +126 AUE_SETREUID MSTD { int setreuid(int ruid, int euid); } +127 AUE_SETREGID MSTD { int setregid(int rgid, int egid); } 128 AUE_RENAME MSTD { int rename(char *from, char *to); } 129 AUE_O_TRUNCATE MCOMPAT { int truncate(char *path, long length); } 130 AUE_O_FTRUNCATE MCOMPAT { int ftruncate(int fd, long length); } @@ -311,7 +311,7 @@ 158 AUE_FSTATFS MCOMPAT4 { int fstatfs(int fd, \ struct ostatfs *buf); } 159 AUE_NULL UNIMPL nosys -160 AUE_NULL MSTD { int lgetfh(char *fname, \ +160 AUE_LGETFH MSTD { int lgetfh(char *fname, \ struct fhandle *fhp); } 161 AUE_GETFH MSTD { int getfh(char *fname, \ struct fhandle *fhp); } @@ -513,12 +513,12 @@ 295 AUE_NULL UNIMPL nosys 296 AUE_NULL UNIMPL nosys ; XXX 297 is 300 in NetBSD -297 AUE_NULL MCOMPAT4 { int fhstatfs( \ +297 AUE_FHSTATFS MCOMPAT4 { int fhstatfs( \ const struct fhandle *u_fhp, \ struct ostatfs *buf); } -298 AUE_NULL MSTD { int fhopen(const struct fhandle *u_fhp, \ +298 AUE_FHOPEN MSTD { int fhopen(const struct fhandle *u_fhp, \ int flags); } -299 AUE_NULL MSTD { int fhstat(const struct fhandle *u_fhp, \ +299 AUE_FHSTAT MSTD { int fhstat(const struct fhandle *u_fhp, \ struct stat *sb); } ; syscall numbers for FreeBSD 300 AUE_NULL MSTD { int modnext(int modid); } @@ -580,7 +580,7 @@ int flags); } 337 AUE_NULL MSTD { int kldsym(int fileid, int cmd, \ void *data); } -338 AUE_NULL MSTD { int jail(struct jail *jail); } +338 AUE_JAIL MSTD { int jail(struct jail *jail); } 339 AUE_NULL UNIMPL pioctl 340 AUE_SIGPROCMASK MSTD { int sigprocmask(int how, \ const sigset_t *set, sigset_t *oset); } @@ -591,7 +591,7 @@ 343 AUE_SIGPENDING MSTD { int sigpending(sigset_t *set); } 344 AUE_SIGRETURN MCOMPAT4 { int sigreturn( \ const struct ucontext4 *sigcntxp); } -345 AUE_NULL MSTD { int sigtimedwait(const sigset_t *set, \ +345 AUE_SIGWAIT MSTD { int sigtimedwait(const sigset_t *set, \ siginfo_t *info, \ const struct timespec *timeout); } 346 AUE_NULL MSTD { int sigwaitinfo(const sigset_t *set, \ @@ -627,9 +627,9 @@ 359 AUE_NULL NOSTD { int aio_waitcomplete( \ struct aiocb **aiocbp, \ struct timespec *timeout); } -360 AUE_NULL MSTD { int getresuid(uid_t *ruid, uid_t *euid, \ +360 AUE_GETRESUID MSTD { int getresuid(uid_t *ruid, uid_t *euid, \ uid_t *suid); } -361 AUE_NULL MSTD { int getresgid(gid_t *rgid, gid_t *egid, \ +361 AUE_GETRESGID MSTD { int getresgid(gid_t *rgid, gid_t *egid, \ gid_t *sgid); } 362 AUE_NULL MSTD { int kqueue(void); } 363 AUE_NULL MSTD { int kevent(int fd, \ @@ -654,7 +654,7 @@ const char *attrname); } 374 AUE_NULL MSTD { int __setugid(int flag); } 375 AUE_NULL NOIMPL { int nfsclnt(int flag, caddr_t argp); } -376 AUE_NULL MSTD { int eaccess(char *path, int flags); } +376 AUE_EACCESS MSTD { int eaccess(char *path, int flags); } 377 AUE_NULL UNIMPL afs_syscall 378 AUE_NULL STD { int nmount(struct iovec *iovp, \ unsigned int iovcnt, int flags); } ==== //depot/projects/trustedbsd/audit3/sys/sys/syscall.h#12 (text+ko) ==== ==== //depot/projects/trustedbsd/audit3/sys/sys/syscall.mk#13 (text+ko) ==== ==== //depot/projects/trustedbsd/audit3/sys/sys/sysproto.h#16 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Mon Oct 3 17:14:09 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 32D2C16A462; Mon, 3 Oct 2005 17:14:08 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C528E16A45E for ; Mon, 3 Oct 2005 17:14:07 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5DD4043D49 for ; Mon, 3 Oct 2005 17:14:07 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j93HE72h002789 for ; Mon, 3 Oct 2005 17:14:07 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j93HE6nM002786 for perforce@freebsd.org; Mon, 3 Oct 2005 17:14:06 GMT (envelope-from jhb@freebsd.org) Date: Mon, 3 Oct 2005 17:14:06 GMT Message-Id: <200510031714.j93HE6nM002786@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 84730 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2005 17:14:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=84730 Change 84730 by jhb@jhb_slimer on 2005/10/03 17:13:14 IFC @84729. Affected files ... .. //depot/projects/smpng/sys/amd64/amd64/trap.c#34 integrate .. //depot/projects/smpng/sys/arm/arm/bcopyinout.S#7 integrate .. //depot/projects/smpng/sys/arm/arm/bcopyinout_xscale.S#5 integrate .. //depot/projects/smpng/sys/arm/arm/busdma_machdep.c#14 integrate .. //depot/projects/smpng/sys/arm/arm/dump_machdep.c#2 integrate .. //depot/projects/smpng/sys/arm/arm/elf_trampoline.c#1 branch .. //depot/projects/smpng/sys/arm/arm/in_cksum.c#5 integrate .. //depot/projects/smpng/sys/arm/arm/in_cksum_arm.S#6 integrate .. //depot/projects/smpng/sys/arm/arm/inckern.S#1 branch .. //depot/projects/smpng/sys/arm/arm/intr.c#10 integrate .. //depot/projects/smpng/sys/arm/arm/locore.S#10 integrate .. //depot/projects/smpng/sys/arm/arm/machdep.c#13 integrate .. //depot/projects/smpng/sys/arm/arm/mem.c#2 integrate .. //depot/projects/smpng/sys/arm/arm/pmap.c#20 integrate .. //depot/projects/smpng/sys/arm/arm/support.S#9 integrate .. //depot/projects/smpng/sys/arm/arm/swtch.S#12 integrate .. //depot/projects/smpng/sys/arm/arm/vm_machdep.c#15 integrate .. //depot/projects/smpng/sys/arm/conf/IQ31244#8 integrate .. //depot/projects/smpng/sys/arm/include/in_cksum.h#3 integrate .. //depot/projects/smpng/sys/arm/include/md_var.h#3 integrate .. //depot/projects/smpng/sys/arm/include/pmap.h#11 integrate .. //depot/projects/smpng/sys/arm/sa11x0/assabet_machdep.c#9 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/files.i80321#3 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/i80321_aau.c#1 branch .. //depot/projects/smpng/sys/arm/xscale/i80321/i80321_dma.c#1 branch .. //depot/projects/smpng/sys/arm/xscale/i80321/i80321_timer.c#5 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/iq31244_machdep.c#13 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/iq80321.c#8 integrate .. //depot/projects/smpng/sys/conf/Makefile.arm#10 integrate .. //depot/projects/smpng/sys/conf/NOTES#106 integrate .. //depot/projects/smpng/sys/conf/files#151 integrate .. //depot/projects/smpng/sys/ddb/db_command.c#24 integrate .. //depot/projects/smpng/sys/ddb/db_output.c#16 integrate .. //depot/projects/smpng/sys/dev/em/if_em.c#53 integrate .. //depot/projects/smpng/sys/dev/firewire/00README#2 integrate .. //depot/projects/smpng/sys/dev/firewire/if_fwe.c#28 integrate .. //depot/projects/smpng/sys/dev/firewire/if_fwip.c#7 integrate .. //depot/projects/smpng/sys/dev/fxp/if_fxp.c#67 integrate .. //depot/projects/smpng/sys/dev/ixgb/README#2 integrate .. //depot/projects/smpng/sys/dev/ixgb/if_ixgb.c#12 integrate .. //depot/projects/smpng/sys/dev/lge/if_lge.c#30 integrate .. //depot/projects/smpng/sys/dev/lge/if_lgereg.h#5 integrate .. //depot/projects/smpng/sys/dev/lmc/if_lmc.h#1 branch .. //depot/projects/smpng/sys/dev/mii/acphy.c#13 integrate .. //depot/projects/smpng/sys/dev/mii/amphy.c#12 integrate .. //depot/projects/smpng/sys/dev/mii/brgphy.c#25 integrate .. //depot/projects/smpng/sys/dev/mii/ciphy.c#3 integrate .. //depot/projects/smpng/sys/dev/mii/dcphy.c#15 integrate .. //depot/projects/smpng/sys/dev/mii/exphy.c#12 integrate .. //depot/projects/smpng/sys/dev/mii/lxtphy.c#13 integrate .. //depot/projects/smpng/sys/dev/mii/nsphy.c#12 integrate .. //depot/projects/smpng/sys/dev/mii/pnaphy.c#13 integrate .. //depot/projects/smpng/sys/dev/mii/pnphy.c#12 integrate .. //depot/projects/smpng/sys/dev/mii/qsphy.c#13 integrate .. //depot/projects/smpng/sys/dev/mii/rgephy.c#5 integrate .. //depot/projects/smpng/sys/dev/mii/rlphy.c#16 integrate .. //depot/projects/smpng/sys/dev/mii/tdkphy.c#14 integrate .. //depot/projects/smpng/sys/dev/mii/tlphy.c#14 integrate .. //depot/projects/smpng/sys/dev/mii/ukphy.c#11 integrate .. //depot/projects/smpng/sys/dev/mii/xmphy.c#14 integrate .. //depot/projects/smpng/sys/dev/nge/if_nge.c#43 integrate .. //depot/projects/smpng/sys/dev/re/if_re.c#29 integrate .. //depot/projects/smpng/sys/dev/sound/pci/es137x.c#18 integrate .. //depot/projects/smpng/sys/dev/sound/pcm/ac97.c#28 integrate .. //depot/projects/smpng/sys/dev/sound/pcm/ac97.h#10 integrate .. //depot/projects/smpng/sys/dev/sound/pcm/ac97_patch.c#4 integrate .. //depot/projects/smpng/sys/dev/sound/pcm/ac97_patch.h#4 integrate .. //depot/projects/smpng/sys/dev/sound/pcm/channel.c#32 integrate .. //depot/projects/smpng/sys/dev/sound/pcm/dsp.c#28 integrate .. //depot/projects/smpng/sys/dev/sound/pcm/feeder_volume.c#1 branch .. //depot/projects/smpng/sys/dev/sound/pcm/mixer.c#21 integrate .. //depot/projects/smpng/sys/dev/sound/pcm/sndstat.c#18 integrate .. //depot/projects/smpng/sys/dev/sound/pcm/sound.c#28 integrate .. //depot/projects/smpng/sys/dev/sound/pcm/sound.h#23 integrate .. //depot/projects/smpng/sys/dev/sound/usb/uaudio_pcm.c#12 integrate .. //depot/projects/smpng/sys/dev/txp/if_txpreg.h#4 integrate .. //depot/projects/smpng/sys/dev/vge/if_vge.c#10 integrate .. //depot/projects/smpng/sys/dev/wi/if_wi.c#78 integrate .. //depot/projects/smpng/sys/dev/wi/if_wivar.h#23 integrate .. //depot/projects/smpng/sys/fs/fifofs/fifo_vnops.c#38 integrate .. //depot/projects/smpng/sys/fs/nwfs/nwfs_vfsops.c#21 integrate .. //depot/projects/smpng/sys/i386/i386/trap.c#84 integrate .. //depot/projects/smpng/sys/kern/kern_conf.c#44 integrate .. //depot/projects/smpng/sys/kern/kern_cpu.c#7 integrate .. //depot/projects/smpng/sys/kern/kern_exec.c#88 integrate .. //depot/projects/smpng/sys/kern/kern_lock.c#45 integrate .. //depot/projects/smpng/sys/kern/kern_poll.c#18 integrate .. //depot/projects/smpng/sys/kern/kern_proc.c#77 integrate .. //depot/projects/smpng/sys/kern/vfs_bio.c#83 integrate .. //depot/projects/smpng/sys/modules/Makefile#107 integrate .. //depot/projects/smpng/sys/modules/lmc/Makefile#1 branch .. //depot/projects/smpng/sys/modules/sound/sound/Makefile#3 integrate .. //depot/projects/smpng/sys/net/if.c#75 integrate .. //depot/projects/smpng/sys/net/if.h#27 integrate .. //depot/projects/smpng/sys/net/if_bridge.c#11 integrate .. //depot/projects/smpng/sys/net/if_var.h#41 integrate .. //depot/projects/smpng/sys/net/if_vlan.c#40 integrate .. //depot/projects/smpng/sys/netinet/in.c#29 integrate .. //depot/projects/smpng/sys/netinet/tcp_subr.c#73 integrate .. //depot/projects/smpng/sys/netsmb/netbios.h#6 integrate .. //depot/projects/smpng/sys/pci/if_dc.c#71 integrate .. //depot/projects/smpng/sys/pci/if_rl.c#60 integrate .. //depot/projects/smpng/sys/pci/if_sf.c#39 integrate .. //depot/projects/smpng/sys/pci/if_sis.c#55 integrate .. //depot/projects/smpng/sys/pci/if_ste.c#40 integrate .. //depot/projects/smpng/sys/pci/if_vr.c#38 integrate .. //depot/projects/smpng/sys/pci/if_xl.c#63 integrate .. //depot/projects/smpng/sys/security/mac_seeotheruids/mac_seeotheruids.c#7 integrate .. //depot/projects/smpng/sys/sys/buf.h#41 integrate .. //depot/projects/smpng/sys/sys/kerneldump.h#7 integrate .. //depot/projects/smpng/sys/sys/mac.h#34 integrate .. //depot/projects/smpng/sys/sys/mac_policy.h#34 integrate .. //depot/projects/smpng/sys/ufs/ffs/ffs_snapshot.c#51 integrate Differences ... ==== //depot/projects/smpng/sys/amd64/amd64/trap.c#34 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.293 2005/09/28 07:03:02 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.294 2005/10/01 18:56:16 glebius Exp $"); /* * AMD64 Trap and System call handling @@ -146,11 +146,6 @@ extern char *syscallnames[]; #endif -#ifdef DEVICE_POLLING -extern u_int32_t poll_in_trap; -extern int ether_poll(int count); -#endif /* DEVICE_POLLING */ - /* * Exception, fault, and trap interface to the FreeBSD kernel. * This common code is called from assembly language IDT gate entry @@ -241,11 +236,6 @@ trap_fatal(&frame, frame.tf_addr); } -#ifdef DEVICE_POLLING - if (poll_in_trap) - ether_poll(poll_in_trap); -#endif /* DEVICE_POLLING */ - if (ISPL(frame.tf_cs) == SEL_UPL) { /* user trap */ ==== //depot/projects/smpng/sys/arm/arm/bcopyinout.S#7 (text+ko) ==== @@ -40,7 +40,12 @@ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/bcopyinout.S,v 1.6 2005/05/24 23:55:09 cognet Exp $"); +.L_arm_memcpy: + .word _C_LABEL(_arm_memcpy) +.L_min_memcpy_size: + .word _C_LABEL(_min_memcpy_size) + +__FBSDID("$FreeBSD: src/sys/arm/arm/bcopyinout.S,v 1.7 2005/10/03 14:12:10 cognet Exp $"); #ifdef __XSCALE__ #include #else @@ -82,6 +87,27 @@ moveq r0, #0 RETeq + ldr r3, .L_arm_memcpy + ldr r3, [r3] + cmp r3, #0 + beq .Lnormal + ldr r3, .L_min_memcpy_size + ldr r3, [r3] + cmp r2, r3 + blt .Lnormal + stmfd sp!, {r0-r2, r4, lr} + mov r3, r0 + mov r0, r1 + mov r1, r3 + mov r3, #2 /* SRC_IS_USER */ + ldr r4, .L_arm_memcpy + mov lr, pc + ldr pc, [r4] + cmp r0, #0 + ldmfd sp!, {r0-r2, r4, lr} + moveq r0, #0 + RETeq + SAVE_REGS #ifdef MULTIPROCESSOR /* XXX Probably not appropriate for non-Hydra SMPs */ @@ -306,6 +332,27 @@ moveq r0, #0 RETeq + ldr r3, .L_arm_memcpy + ldr r3, [r3] + cmp r3, #0 + beq .Lnormale + ldr r3, .L_min_memcpy_size + ldr r3, [r3] + cmp r2, r3 + blt .Lnormale + stmfd sp!, {r0-r2, r4, lr} + mov r3, r0 + mov r0, r1 + mov r1, r3 + mov r3, #1 /* DST_IS_USER */ + ldr r4, .L_arm_memcpy + mov lr, pc + ldr pc, [r4] + cmp r0, #0 + ldmfd sp!, {r0-r2, r4, lr} + moveq r0, #0 + RETeq + SAVE_REGS #ifdef MULTIPROCESSOR /* XXX Probably not appropriate for non-Hydra SMPs */ ==== //depot/projects/smpng/sys/arm/arm/bcopyinout_xscale.S#5 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/bcopyinout_xscale.S,v 1.4 2005/05/24 23:55:09 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/bcopyinout_xscale.S,v 1.5 2005/10/03 14:12:10 cognet Exp $"); .text .align 0 @@ -61,6 +61,28 @@ movle r0, #0x00 movle pc, lr /* Bail early if length is <= 0 */ + ldr r3, .L_arm_memcpy + ldr r3, [r3] + cmp r3, #0 + beq .Lnormal + ldr r3, .L_min_memcpy_size + ldr r3, [r3] + cmp r2, r3 + blt .Lnormal + stmfd sp!, {r0-r2, r4, lr} + mov r3, r0 + mov r0, r1 + mov r1, r3 + mov r3, #2 /* SRC_IS_USER */ + ldr r4, .L_arm_memcpy + mov lr, pc + ldr pc, [r4] + cmp r0, #0 + ldmfd sp!, {r0-r2, r4, lr} + moveq r0, #0 + RETeq + +.Lnormal: stmfd sp!, {r10-r11, lr} #ifdef MULTIPROCESSOR @@ -491,6 +513,28 @@ movle r0, #0x00 movle pc, lr /* Bail early if length is <= 0 */ + ldr r3, .L_arm_memcpy + ldr r3, [r3] + cmp r3, #0 + beq .Lnormale + ldr r3, .L_min_memcpy_size + ldr r3, [r3] + cmp r2, r3 + blt .Lnormale + stmfd sp!, {r0-r2, r4, lr} + mov r3, r0 + mov r0, r1 + mov r1, r3 + mov r3, #1 /* DST_IS_USER */ + ldr r4, .L_arm_memcpy + mov lr, pc + ldr pc, [r4] + cmp r0, #0 + ldmfd sp!, {r0-r2, r4, lr} + moveq r0, #0 + RETeq + +.Lnormale: stmfd sp!, {r10-r11, lr} #ifdef MULTIPROCESSOR ==== //depot/projects/smpng/sys/arm/arm/busdma_machdep.c#14 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.22 2005/06/24 23:57:27 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.23 2005/10/03 14:07:57 cognet Exp $"); /* * MacPPC bus dma support routines @@ -189,7 +189,8 @@ mtx_lock(&busdma_mtx); map = TAILQ_FIRST(&dmamap_freelist); - TAILQ_REMOVE(&dmamap_freelist, map, freelist); + if (map) + TAILQ_REMOVE(&dmamap_freelist, map, freelist); mtx_unlock(&busdma_mtx); if (!map) { map = malloc(sizeof(*map), M_DEVBUF, M_NOWAIT); @@ -493,10 +494,14 @@ } else { curaddr = (pte & L2_S_FRAME) | (vaddr & L2_S_OFFSET); + pmap_uncache(ptep); + map->flags |= DMAMAP_UNCACHED; +#if 0 if (pte & L2_S_CACHE_MASK) { map->flags &= ~DMAMAP_COHERENT; } +#endif } } } else { @@ -769,7 +774,43 @@ */ void _bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) -{ +{ + struct mbuf *m; + struct uio *uio; + int resid; + struct iovec *iov; + + if (map->flags & DMAMAP_UNCACHED) { + switch(map->flags & DMAMAP_TYPE_MASK) { + case DMAMAP_LINEAR: + pmap_recache(map->buffer, len); + break; + case DMAMAP_MBUF: + m = map->buffer; + while (m) { + if (m->m_len > 0) + pmap_recache(m->m_data, len); + m = m->m_next; + } + break; + case DMAMAP_UIO: + uio = map->buffer; + iov = uio->uio_iov; + resid = uio->uio_resid; + for (int i = 0; i < uio->uio_iovcnt && resid != 0; i++) { + bus_size_t minlen = resid < iov[i].iov_len ? resid : + iov[i].iov_len; + if (minlen > 0) { + pmap_recache(iov[i].iov_base, minlen); + resid -= minlen; + } + } + break; + default: + break; + } + + } map->flags &= ~DMAMAP_TYPE_MASK; return; } @@ -799,9 +840,11 @@ if (!(op & (BUS_DMASYNC_PREWRITE | BUS_DMASYNC_POSTREAD))) return; - if (map->flags & DMAMAP_COHERENT) + if (map->flags & DMAMAP_COHERENT) { + printf("COHERENT\n"); return; - if ((op && BUS_DMASYNC_POSTREAD) && (map->len > PAGE_SIZE)) { + } + if ((op && BUS_DMASYNC_POSTREAD) && (map->len >= 2 * PAGE_SIZE)) { cpu_dcache_wbinv_all(); return; } ==== //depot/projects/smpng/sys/arm/arm/dump_machdep.c#2 (text+ko) ==== @@ -1,45 +1,383 @@ /*- - * Copyright (c) 2004 Olivier Houchard + * Copyright (c) 2002 Marcel Moolenaar * All rights reserved. * + * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The names of the authors may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/dump_machdep.c,v 1.1 2004/05/14 11:46:42 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/dump_machdep.c,v 1.2 2005/10/03 14:05:03 cognet Exp $"); #include #include #include #include #include +#include #include #include #include +#include #include +#include +#include + +CTASSERT(sizeof(struct kerneldumpheader) == 512); + +/* + * Don't touch the first SIZEOF_METADATA bytes on the dump device. This + * is to protect us from metadata and to protect metadata from us. + */ +#define SIZEOF_METADATA (64*1024) + +#define MD_ALIGN(x) (((off_t)(x) + PAGE_MASK) & ~PAGE_MASK) +#define DEV_ALIGN(x) (((off_t)(x) + (DEV_BSIZE-1)) & ~(DEV_BSIZE-1)) +extern struct pcb dumppcb; + +struct md_pa { + vm_paddr_t md_start; + vm_paddr_t md_size; +}; + +typedef int callback_t(struct md_pa *, int, void *); + +static struct kerneldumpheader kdh; +static off_t dumplo, fileofs; + +/* Handle buffered writes. */ +static char buffer[DEV_BSIZE]; +static size_t fragsz; + +/* XXX: I suppose 20 should be enough. */ +static struct md_pa dump_map[20]; + +static void +md_pa_init(void) +{ + int n, idx; + + bzero(dump_map, sizeof(dump_map)); + for (n = 0; n < sizeof(dump_map) / sizeof(dump_map[0]); n++) { + idx = n * 2; + if (dump_avail[idx] == 0 && dump_avail[idx + 1] == 0) + break; + dump_map[n].md_start = dump_avail[idx]; + dump_map[n].md_size = dump_avail[idx + 1] - dump_avail[idx]; + } +} + +static struct md_pa * +md_pa_first(void) +{ + + return (&dump_map[0]); +} + +static struct md_pa * +md_pa_next(struct md_pa *mdp) +{ + + mdp++; + if (mdp->md_size == 0) + mdp = NULL; + return (mdp); +} + +/* XXX should be MI */ +static void +mkdumpheader(struct kerneldumpheader *kdh, uint32_t archver, uint64_t dumplen, + uint32_t blksz) +{ + + bzero(kdh, sizeof(*kdh)); + strncpy(kdh->magic, KERNELDUMPMAGIC, sizeof(kdh->magic)); + strncpy(kdh->architecture, MACHINE_ARCH, sizeof(kdh->architecture)); + kdh->version = htod32(KERNELDUMPVERSION); + kdh->architectureversion = htod32(archver); + kdh->dumplength = htod64(dumplen); + kdh->dumptime = htod64(time_second); + kdh->blocksize = htod32(blksz); + strncpy(kdh->hostname, hostname, sizeof(kdh->hostname)); + strncpy(kdh->versionstring, version, sizeof(kdh->versionstring)); + if (panicstr != NULL) + strncpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring)); + kdh->parity = kerneldump_parity(kdh); +} + +static int +buf_write(struct dumperinfo *di, char *ptr, size_t sz) +{ + size_t len; + int error; + + while (sz) { + len = DEV_BSIZE - fragsz; + if (len > sz) + len = sz; + bcopy(ptr, buffer + fragsz, len); + fragsz += len; + ptr += len; + sz -= len; + if (fragsz == DEV_BSIZE) { + error = di->dumper(di->priv, buffer, 0, dumplo, + DEV_BSIZE); + if (error) + return error; + dumplo += DEV_BSIZE; + fragsz = 0; + } + } + + return (0); +} + +static int +buf_flush(struct dumperinfo *di) +{ + int error; + + if (fragsz == 0) + return (0); + + error = di->dumper(di->priv, buffer, 0, dumplo, DEV_BSIZE); + dumplo += DEV_BSIZE; + fragsz = 0; + return (error); +} + +extern vm_offset_t kernel_l1kva; +extern char *pouet2; + +static int +cb_dumpdata(struct md_pa *mdp, int seqnr, void *arg) +{ + struct dumperinfo *di = (struct dumperinfo*)arg; + vm_paddr_t pa; + vm_offset_t va; + uint32_t pgs; + size_t counter, sz, chunk; + int c, error, twiddle; + + error = 0; /* catch case in which chunk size is 0 */ + counter = 0; /* Update twiddle every 16MB */ + twiddle = 0; + va = 0; + pgs = mdp->md_size / PAGE_SIZE; + pa = mdp->md_start; + + printf(" chunk %d: %dMB (%d pages)", seqnr, pgs * PAGE_SIZE / ( + 1024*1024), pgs); + + /* Make sure we write coherent datas. */ + cpu_idcache_wbinv_all(); +#ifdef __XSCALE__ + xscale_cache_clean_minidata(); +#endif + while (pgs) { + chunk = pgs; + if (chunk > MAXDUMPPGS) + chunk = MAXDUMPPGS; + sz = chunk << PAGE_SHIFT; + counter += sz; + if (counter >> 24) { + printf(" %d", pgs * PAGE_SIZE); + counter &= (1<<24) - 1; + } + if (pa == (pa & L1_ADDR_BITS)) { + pmap_kenter_section(0, pa & L1_ADDR_BITS, 0); + cpu_tlb_flushID_SE(0); + cpu_cpwait(); + } + error = di->dumper(di->priv, + (void *)(pa - (pa & L1_ADDR_BITS)),0, dumplo, sz); + if (error) + break; + dumplo += sz; + pgs -= chunk; + pa += sz; + /* Check for user abort. */ + c = cncheckc(); + if (c == 0x03) + return (ECANCELED); + if (c != -1) + printf(" (CTRL-C to abort) "); + } + printf(" ... %s\n", (error) ? "fail" : "ok"); + return (error); +} + +static int +cb_dumphdr(struct md_pa *mdp, int seqnr, void *arg) +{ + struct dumperinfo *di = (struct dumperinfo*)arg; + Elf_Phdr phdr; + uint64_t size; + int error; + + size = mdp->md_size; + bzero(&phdr, sizeof(phdr)); + phdr.p_type = PT_LOAD; + phdr.p_flags = PF_R; /* XXX */ + phdr.p_offset = fileofs; + phdr.p_vaddr = mdp->md_start; + phdr.p_paddr = mdp->md_start; + phdr.p_filesz = size; + phdr.p_memsz = size; + phdr.p_align = PAGE_SIZE; + + error = buf_write(di, (char*)&phdr, sizeof(phdr)); + fileofs += phdr.p_filesz; + return (error); +} + +static int +cb_size(struct md_pa *mdp, int seqnr, void *arg) +{ + uint32_t *sz = (uint32_t*)arg; + + *sz += (uint32_t)mdp->md_size; + return (0); +} + +static int +foreach_chunk(callback_t cb, void *arg) +{ + struct md_pa *mdp; + int error, seqnr; + + seqnr = 0; + mdp = md_pa_first(); + while (mdp != NULL) { + error = (*cb)(mdp, seqnr++, arg); + if (error) + return (-error); + mdp = md_pa_next(mdp); + } + return (seqnr); +} + void dumpsys(struct dumperinfo *di) { + Elf_Ehdr ehdr; + uint32_t dumpsize; + off_t hdrgap; + size_t hdrsz; + int error; + + bzero(&ehdr, sizeof(ehdr)); + ehdr.e_ident[EI_MAG0] = ELFMAG0; + ehdr.e_ident[EI_MAG1] = ELFMAG1; + ehdr.e_ident[EI_MAG2] = ELFMAG2; + ehdr.e_ident[EI_MAG3] = ELFMAG3; + ehdr.e_ident[EI_CLASS] = ELF_CLASS; +#if BYTE_ORDER == LITTLE_ENDIAN + ehdr.e_ident[EI_DATA] = ELFDATA2LSB; +#else + ehdr.e_ident[EI_DATA] = ELFDATA2MSB; +#endif + ehdr.e_ident[EI_VERSION] = EV_CURRENT; + ehdr.e_ident[EI_OSABI] = ELFOSABI_STANDALONE; /* XXX big picture? */ + ehdr.e_type = ET_CORE; + ehdr.e_machine = EM_ARM; + ehdr.e_phoff = sizeof(ehdr); + ehdr.e_flags = 0; + ehdr.e_ehsize = sizeof(ehdr); + ehdr.e_phentsize = sizeof(Elf_Phdr); + ehdr.e_shentsize = sizeof(Elf_Shdr); + + md_pa_init(); + + /* Calculate dump size. */ + dumpsize = 0L; + ehdr.e_phnum = foreach_chunk(cb_size, &dumpsize); + hdrsz = ehdr.e_phoff + ehdr.e_phnum * ehdr.e_phentsize; + fileofs = MD_ALIGN(hdrsz); + dumpsize += fileofs; + hdrgap = fileofs - DEV_ALIGN(hdrsz); + + /* Determine dump offset on device. */ + if (di->mediasize < SIZEOF_METADATA + dumpsize + sizeof(kdh) * 2) { + error = ENOSPC; + goto fail; + } + dumplo = di->mediaoffset + di->mediasize - dumpsize; + dumplo -= sizeof(kdh) * 2; + + mkdumpheader(&kdh, KERNELDUMP_ARM_VERSION, dumpsize, di->blocksize); + + printf("Dumping %llu MB (%d chunks)\n", (long long)dumpsize >> 20, + ehdr.e_phnum); + + /* Dump leader */ + error = di->dumper(di->priv, &kdh, 0, dumplo, sizeof(kdh)); + if (error) + goto fail; + dumplo += sizeof(kdh); + + /* Dump ELF header */ + error = buf_write(di, (char*)&ehdr, sizeof(ehdr)); + if (error) + goto fail; + + /* Dump program headers */ + error = foreach_chunk(cb_dumphdr, di); + if (error < 0) + goto fail; + buf_flush(di); + + /* + * All headers are written using blocked I/O, so we know the + * current offset is (still) block aligned. Skip the alignement + * in the file to have the segment contents aligned at page + * boundary. We cannot use MD_ALIGN on dumplo, because we don't + * care and may very well be unaligned within the dump device. + */ + dumplo += hdrgap; + + /* Dump memory chunks (updates dumplo) */ + error = foreach_chunk(cb_dumpdata, di); + if (error < 0) + goto fail; + + /* Dump trailer */ + error = di->dumper(di->priv, &kdh, 0, dumplo, sizeof(kdh)); + if (error) + goto fail; + + /* Signal completion, signoff and exit stage left. */ + di->dumper(di->priv, NULL, 0, 0, 0); + printf("\nDump complete\n"); + return; + + fail: + if (error < 0) + error = -error; + + if (error == ECANCELED) + printf("\nDump aborted\n"); + else if (error == ENOSPC) + printf("\nDump failed. Partition too small.\n"); + else + printf("\n** DUMP FAILED (ERROR %d) **\n", error); } ==== //depot/projects/smpng/sys/arm/arm/in_cksum.c#5 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__FBSDID("$FreeBSD: src/sys/arm/arm/in_cksum.c,v 1.4 2005/05/24 21:44:34 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/in_cksum.c,v 1.5 2005/10/03 14:06:44 cognet Exp $"); #include #include @@ -90,18 +90,6 @@ } u_short -in_pseudo(u_int32_t a, u_int32_t b, u_int32_t c) -{ - u_int64_t sum; - union q_util q_util; - union l_util l_util; - - sum = (u_int64_t) a + b + c; - REDUCE16; - return (sum); -} - -u_short in_cksum_skip(struct mbuf *m, int len, int skip) { u_int64_t sum = 0; ==== //depot/projects/smpng/sys/arm/arm/in_cksum_arm.S#6 (text+ko) ==== @@ -44,7 +44,7 @@ #include #include "assym.s" -__FBSDID("$FreeBSD: src/sys/arm/arm/in_cksum_arm.S,v 1.5 2005/05/24 21:44:34 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/in_cksum_arm.S,v 1.6 2005/10/03 14:07:09 cognet Exp $"); /* * int in_cksum(struct mbuf *m, int len) @@ -93,10 +93,10 @@ ENTRY(do_cksum) - stmfd sp!, {r4-r11, lr} + stmfd sp!, {r4-r7, lr} bl L_cksumdata mov r0, r2 - ldmfd sp!, {r4-r11, pc} + ldmfd sp!, {r4-r7, pc} /* * The main in*_cksum() workhorse... * ==== //depot/projects/smpng/sys/arm/arm/intr.c#10 (text+ko) ==== @@ -37,7 +37,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/intr.c,v 1.9 2005/06/09 12:26:19 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/intr.c,v 1.10 2005/10/03 14:17:16 cognet Exp $"); #include #include #include @@ -108,6 +108,7 @@ td->td_intr_nesting_level++; while ((i = arm_get_next_irq()) != -1) { + arm_mask_irq(i); intrcnt[intrcnt_tab[i]]++; ithd = ithreads[i]; if (!ithd) @@ -119,10 +120,9 @@ ih->ih_handler(ih->ih_argument ? ih->ih_argument : frame); } - } else if (ih) { - arm_mask_irq(i); + arm_unmask_irq(i); + } else if (ih) ithread_schedule(ithd); - } } td->td_intr_nesting_level--; } ==== //depot/projects/smpng/sys/arm/arm/locore.S#10 (text+ko) ==== @@ -37,7 +37,7 @@ #include #include #include -__FBSDID("$FreeBSD: src/sys/arm/arm/locore.S,v 1.10 2005/03/16 07:53:02 jmg Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/locore.S,v 1.11 2005/10/03 14:10:55 cognet Exp $"); /* What size should this really be ? It is only used by init_arm() */ #define INIT_ARM_STACK_SIZE 2048 @@ -60,6 +60,8 @@ .align 0 .globl kernbase .set kernbase,KERNBASE +.globl physaddr +.set physaddr,PHYSADDR ENTRY_NP(btext) @@ -157,7 +159,7 @@ mov r3, #0 .L1: - str r3, [r1], #0x0004 /* Zero the bss */ + str r3, [r1], #0x0004 /* get zero init data */ subs r2, r2, #4 bgt .L1 @@ -177,7 +179,8 @@ sub pc, pc, r4 #endif virt_done: - ldr fp, =KERNVIRTADDR /* trace back starts here */ + nop + mov fp, #0 /* trace back starts here */ bl _C_LABEL(initarm) /* Off we go */ /* init arm will return the new stack pointer. */ @@ -194,6 +197,10 @@ .word 4*((va)>>L1_S_SHIFT) ; \ .word (pa)|(attr) ; +Lvirtaddr: + .word KERNVIRTADDR +Lphysaddr: + .word KERNPHYSADDR Lstartup_pagetable: .word STARTUP_PAGETABLE_ADDR mmu_init_table: ==== //depot/projects/smpng/sys/arm/arm/machdep.c#13 (text+ko) ==== @@ -44,7 +44,7 @@ #include "opt_compat.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/machdep.c,v 1.16 2005/04/04 21:53:52 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/machdep.c,v 1.17 2005/10/03 14:17:45 cognet Exp $"); #include #include @@ -95,6 +95,11 @@ long realmem = 0; +int (*_arm_memcpy)(void *, void *, int, int) = NULL; +int (*_arm_bzero)(void *, int, int) = NULL; +int _min_memcpy_size = 0; +int _min_bzero_size = 0; + void sendsig(catcher, sig, mask, code) sig_t catcher; ==== //depot/projects/smpng/sys/arm/arm/mem.c#2 (text+ko) ==== @@ -37,7 +37,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/mem.c,v 1.1 2004/11/07 23:01:36 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/mem.c,v 1.2 2005/10/03 14:18:21 cognet Exp $"); /* * Memory special file @@ -64,6 +64,13 @@ #include +#include "opt_global.h" + +#ifdef ARM_USE_SMALL_ALLOC +extern vm_offset_t alloc_curaddr; +extern vm_offset_t alloc_firstaddr; +#endif + /* * Used in /dev/mem drivers and elsewhere */ @@ -116,11 +123,14 @@ for (; addr < eaddr; addr += PAGE_SIZE) if (pmap_extract(kernel_pmap, addr) == 0) return (EFAULT); - if (!kernacc((caddr_t)(int)uio->uio_offset, c, uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE)) - return (EFAULT); +#ifdef ARM_USE_SMALL_ALLOC + if (addr < alloc_firstaddr || addr > >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Oct 3 18:22:35 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1B23816A421; Mon, 3 Oct 2005 18:22:35 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E52F816A41F for ; Mon, 3 Oct 2005 18:22:34 +0000 (GMT) (envelope-from soc-saturnero@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B09A143D46 for ; Mon, 3 Oct 2005 18:22:34 +0000 (GMT) (envelope-from soc-saturnero@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j93IMYUx006116 for ; Mon, 3 Oct 2005 18:22:34 GMT (envelope-from soc-saturnero@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j93IMY1T006113 for perforce@freebsd.org; Mon, 3 Oct 2005 18:22:34 GMT (envelope-from soc-saturnero@freebsd.org) Date: Mon, 3 Oct 2005 18:22:34 GMT Message-Id: <200510031822.j93IMY1T006113@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-saturnero@freebsd.org using -f From: soc-saturnero To: Perforce Change Reviews Cc: Subject: PERFORCE change 84736 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2005 18:22:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=84736 Change 84736 by soc-saturnero@soc-saturnero_sberta on 2005/10/03 18:22:08 Added rootmfs plugin. It is almost identical to etcmfs. Requested by: Scott Ullrich freesbie.org> Affected files ... .. //depot/projects/soc2005/freesbie/conf/freesbie.defaults.conf#13 edit .. //depot/projects/soc2005/freesbie/extra/rootmfs.sh#1 add .. //depot/projects/soc2005/freesbie/extra/rootmfs/rootmfs.rc#1 add Differences ... ==== //depot/projects/soc2005/freesbie/conf/freesbie.defaults.conf#13 (text+ko) ==== @@ -69,9 +69,10 @@ #PKGFILE=/my/own/pkg_info_output.txt # Set EXTRA variable to the additional plugins you want to run in your -# system +# system. Please note that plugins are executed in the same order as +# listed in this variable # -#EXTRA="customroot etcmfs" +#EXTRA="customroot rootmfs etcmfs" # Knobs From owner-p4-projects@FreeBSD.ORG Mon Oct 3 18:33:49 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0C06316A421; Mon, 3 Oct 2005 18:33:49 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D69D316A41F for ; Mon, 3 Oct 2005 18:33:48 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A423843D45 for ; Mon, 3 Oct 2005 18:33:48 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j93IXmcM006758 for ; Mon, 3 Oct 2005 18:33:48 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j93IXmOj006755 for perforce@freebsd.org; Mon, 3 Oct 2005 18:33:48 GMT (envelope-from jhb@freebsd.org) Date: Mon, 3 Oct 2005 18:33:48 GMT Message-Id: <200510031833.j93IXmOj006755@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 84737 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2005 18:33:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=84737 Change 84737 by jhb@jhb_slimer on 2005/10/03 18:33:14 Pullup the refcount test from jhb_proc. Affected files ... .. //depot/projects/smpng/sys/modules/crash/crash.c#20 integrate Differences ... ==== //depot/projects/smpng/sys/modules/crash/crash.c#20 (text+ko) ==== @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -82,6 +83,28 @@ /* Events. */ +static void +refcount_test(void) +{ + int count; + + printf("Creating and bumping refcount\n"); + refcount_init(&count, 1); + refcount_acquire(&count); + printf("Dropping refcount first time: "); + if (refcount_release(&count)) + printf("true, (uh oh!)\n"); + else + printf("false\n"); + printf("Dropping refcount second time: "); + if (refcount_release(&count)) + printf("true\n"); + else + printf("false, (uh oh!)\n"); + printf("Ending count: %d\n", count); +} +CRASH_EVENT("refcount", refcount_test); + #ifdef WITNESS static void foo_then_bar(void) From owner-p4-projects@FreeBSD.ORG Mon Oct 3 21:19:14 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5855616A421; Mon, 3 Oct 2005 21:19:14 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2C9DF16A41F for ; Mon, 3 Oct 2005 21:19:14 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7F6643D46 for ; Mon, 3 Oct 2005 21:19:12 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j93LJCK0020729 for ; Mon, 3 Oct 2005 21:19:12 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j93LJCch020726 for perforce@freebsd.org; Mon, 3 Oct 2005 21:19:12 GMT (envelope-from soc-andrew@freebsd.org) Date: Mon, 3 Oct 2005 21:19:12 GMT Message-Id: <200510032119.j93LJCch020726@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 84746 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2005 21:19:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=84746 Change 84746 by soc-andrew@soc-andrew_serv on 2005/10/03 21:18:56 IFC Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#6 integrate .. //depot/projects/soc2005/bsdinstaller/src/usr.sbin/Makefile#8 integrate Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#6 (text+ko) ==== @@ -3,7 +3,7 @@ The &os; Project - $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.890 2005/09/14 05:50:09 brueffer Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.893 2005/10/03 17:24:20 hrs Exp $ 2000 @@ -130,7 +130,20 @@ Boot Loader Changes - + A new option , + which allows setting the boot2 + serial console speed in the /boot.config + file or on the boot: prompt line, + has been added. + + A new loader tunable + comconsole_speed to change + the serial console speed has been added. + If the previous stage boot loader requested a serial console + then the default speed is determined from the current serial port + speed, and otherwise it is set to 9600 or the value of + the kernel option BOOT_COMCONSOLE_SPEED + at compile time. @@ -139,14 +152,46 @@ Hardware Support + The &man.acpi.thermal.4; driver now supports + passive cooling. + Support for the PadLock Security Co-processor in VIA C3 processors has been added to the &man.crypto.9; subsystem. &merged; + A bug which prevents the &man.ichsmb.4; kernel module + from unloading has been fixed. + + The loader tunable debug.mpsafevfs + is set to 1 by default. + + The smbios(4) driver support for amd64 has been + added. + + A new loader tunable + hw.apic.enable_extint has been added. + This tunable can be used not to mask the ExtINT pin on the first + I/O APIC. At least one chipset for Intel Pentium III seems + to need this even though all of the pins in the 8259A's are masked. + The default is still to mask the ExtINT pin. + Multimedia Support - + The &man.sound.4; driver now supports + wider range sampling rate, multiple precisions choice, + and 24/32 bit PCM format conversion. + + The &man.snd.als4000.4; driver is now MPSAFE. + + The &man.snd.cmi.4; driver is now MPSAFE. + + The &man.snd.via8233.4; driver is now MPSAFE. + + The &man.snd.via8233.4; driver is now supported + on &os;/amd64. + + The &man.snd.via82c686.4; driver is now MPSAFE. @@ -174,12 +219,79 @@ Network Protocols - + The &man.gre.4; driver, which is for GRE encapsulation + found in RFC 1701 and RFC 1702 now supports IPv6 over GRE. + + The path MTU discovery for multicast packets in the &os; + &man.ip6.4; stack has been disabled by default because + notifying path MTU by a lot of routers in multicast + can be a kind of distributed Denial-of-Service attack to a router. + This feature can be enabled by using a new sysctl variable + net.inet6.ip6.mcast_pmtu. + + The &man.ipfw.4;, IP packet filter now supports IPv6. + The &man.ip6fw.8; is deprecated and will be removed + in the future releases. + + The &man.natm.4;, Native Mode ATM protocol layer is now MPSAFE. + + A new sysctl variable net.inet.icmp.reply_from_interface + has been added. This allows the &man.icmp.4; + reply to non-local packets generated with + the IP address the packet came through in. + This is useful for routers to show in &man.traceroute.8; + the actual path a packet has taken instead of + the possibly different return path. + + A new sysctl variable net.inet.icmp.quotelen + has been added. This allows to change length of + the quotation of the original packet in an ICMP reply. + The minimum of 8 bytes is internally enforced. + The maximum quotation is the remaining space in the + reply mbuf. This option is added in response to the + issues raised in I-D + draft-gont-icmp-payload-00.txt. + + The &man.icmp.4; now always quotes the entire TCP header + when responding and allocate an mbuf cluster if needed. + This change fixes the TCP issues raised in I-D + draft-gont-icmp-payload-00.txt. + + A new socket option IP_MINTTL has been added. + This may be used to set the minimum acceptable + TTL a packet must have when received on a socket. + All packets with a lower TTL are silently dropped, + and this works on already connected/connecting and + listening sockets for RAW, UDP, and TCP. This option + is only really useful when set to 255 preventing packets + from outside the directly connected networks reaching + local listeners on sockets. Also, this option allows + userland implementation of The Generalized TTL + Security Mechanism (GTSM) found in RFC 3682. + + The stealth forwarding now supports IPv6 as well as IPv4. + This behavior can be controlled by using a new sysctl variable + net.inet6.ip6.stealth. Disks and Storage + The &man.ata.4; driver now supports a workaround + for some controllers whose DMA does not work properly + in 48bit mode. For the suspicious controllers + the PIO mode will be used for access to over 137GB areas. + + A new GEOM class GEOM_ZERO has been added. + It creates very huge provider (41PB) /dev/gzero + and mainly for performance testing. + On BIO_READ request it zero-fills + bio_data and on BIO_WRITE + it does nothing. + + The GEOM_LABEL class now supports + Ext2FS and ReiserFS. + The &man.mpt.4; driver has been updated to support various new features such as RAID volume and RAID member state/settings reporting, periodic volume re-synchronization @@ -191,12 +303,21 @@ added. It uses the &man.crypto.9; framework for hardware acceleration and supports different cryptographic algorithms. See &man.geli.8; for more information. &merged; + + The &man.umass.4; driver now supports + PLAY_MSF, + PLAY_TRACK, + PLAY_TRACK_REL, + PAUSE, + PLAY_12 commands so that + the &man.cdcontrol.1; utility can handle USB CD drive. File Systems - + A part of the FreeBSD NFS subsystem (the interface with + the protocol stack and callouts) is now MPSAFE. @@ -209,6 +330,21 @@ Userland Changes + Padding of ai_addrlen + in struct addrinfo has been removed, + which was originally for the ABI compatibility. + For example, this change break the ABI compatibility of + &man.getaddrinfo.3; function on 64-bit architecture including + &os;/alpha, &os;/amd64, &os;/ia64, and &os;/sparc64. + + The &man.bsdiff.1; and &man.bspatch.1; utilities + have been added. These are tools for constructing and + applying binary patches. + + The &man.cmp.1; utility now supports an + flag to compare the symbolic link itself rather than the + file that the link points to. + The &man.ifconfig.8; utility now supports a flag to allow printing potentially sensitive keying material to standard output. @@ -221,10 +357,74 @@ statistics, wrapped around the binary stream sysctl variables for the allocators. &merged; + A new function &man.memmem.3; has been implemented in + libc. This is the binary equivalent to + &man.strstr.3; and found in glibc. + + The &man.moused.8; now supports an flag + to enable horizontal virtual scrolling similar to a + flag for vertical virtual scrolling. + + The &man.netstat.1; utility now supports an + flag for interface stats mode, + which prints all interface statistics in human readable form. + + A new functions, &man.pidfile.3;, which allow reliable + pidfiles handling have been implemented in + libutil. + + The &man.ping.8; utility now supports a sweeping + ping in which &man.icmp.4; payload of + packets being sent is increased with given step. + This is useful for testing problematic channels, MTU issues + or traffic policing functions in networks. + + The &man.pkill.1; utility now supports a + option which allows to + restrict matches to a process whose PID is stored in the + pidfile file. When another new option + is also specified, the pidfile file must be locked with the + &man.flock.2; syscall or created with &man.pidfile.3;. + + The &man.powerd.8; program now supports a + option which allows to specify pidfile. + + The shared library version number of all libraries have + been updated due to some possible ABI changes. The libraries + include: snmp_*, libdialog, libg2c, libobjc, + libreadline, libregex, libstdc++, libkrb5, libalias, libarchive, + libbegemot, libbluetooth, libbsnmp, libbz2, libc_r, libcrypt, + libdevstat, libedit, libexpat, libfetch, libftpio, libgpib, + libipsec, libkiconv, libmagic, libmp, libncp, libncurses, + libnetgraph, libngatm, libopie, libpam, libpthread, libradius, + libsdp, libsmb, libtacplus, libthr, libthread_db, libugidfw, + libusbhid, libutil, libvgl, libwrap, libypclnt, libm, libcrypto, + libssh, and libssl. + + The wcsdup() function has been + implemented. This function is popular in Microsoft and GNU + systems. + <filename>/etc/rc.d</filename> Scripts - + The gbde_swap script has + been removed in favor a new encswap + script which also supports &man.geli.8; for swap + encryption. + + The geli and geli2 + scripts has been added for &man.geli.8; device + configuration on boot. + + The removable_interfaces variable + has been removed. + + A new variable ifconfig_ifn + has been added. This allows + /etc/rc.d/netif + to be used to start and stop an interface + on a purely manual basis. @@ -244,13 +444,83 @@ Ports/Packages Collection Infrastructure - + The &man.pkg.version.1; now supports an + flag to show the origin recorded on package generation + instead of the package name, and an flag + to list packages whose registered origin is origin only. + + The &man.portsnap.8; utility (sysutils/portsnap) + has been added into the &os; base system. This is a secure, + easy to use, fast, lightweight, and generally good way for + users to keep their ports trees up to date. Release Engineering and Integration - + The default partition sizing algorithm of the + &man.sysinstall.8; utility has been changed. + + + + On systems where the disk capacity is larger than (3 * RAMsize + 10GB), + the default sizes will now be as follows: + + + + + + + + Partition + Size + + + + + swapRAMsize * 2 + /512 MB + /tmp512 MB + /var1024 MB + RAMsize + /usrthe rest (8GB or more) + + + + + + + On systems where the disk capacity is larger than + (RAMsize / 8 + 2 GB), the default sizes will be + in the following ranges, with space allocated + proportionally: + + + + + + + + Partition + Size + + + + + swapfrom RAMsize / 8 to RAMsize * 2 + /from 256MB to 512MB + /tmpfrom 128MB to 512MB + /varfrom 128MB to 1024MB + /usrfrom 1536MB to 8192MB + + + + + + + On systems with even less disk space, the existing behavior is not + changed. + + ==== //depot/projects/soc2005/bsdinstaller/src/usr.sbin/Makefile#8 (text+ko) ==== @@ -1,5 +1,5 @@ # From: @(#)Makefile 5.20 (Berkeley) 6/12/93 -# $FreeBSD: src/usr.sbin/Makefile,v 1.337 2005/09/28 07:20:46 ru Exp $ +# $FreeBSD: src/usr.sbin/Makefile,v 1.338 2005/10/03 07:09:41 scottl Exp $ # XXX MISSING: mkproto SUBDIR= ac \ @@ -73,6 +73,7 @@ lastlogin \ ${_lpr} \ ${_lptcontrol} \ + lmcconfig \ ${_mailstats} \ mailwrapper \ ${_makemap} \ From owner-p4-projects@FreeBSD.ORG Tue Oct 4 00:15:51 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BC84F16A421; Tue, 4 Oct 2005 00:15:50 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90AB616A41F for ; Tue, 4 Oct 2005 00:15:50 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23C3343D46 for ; Tue, 4 Oct 2005 00:15:50 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j940Fog2028519 for ; Tue, 4 Oct 2005 00:15:50 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j940Fme6028516 for perforce@freebsd.org; Tue, 4 Oct 2005 00:15:48 GMT (envelope-from peter@freebsd.org) Date: Tue, 4 Oct 2005 00:15:48 GMT Message-Id: <200510040015.j940Fme6028516@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 84755 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2005 00:15:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=84755 Change 84755 by peter@peter_daintree on 2005/10/04 00:14:51 IFC @84753 Affected files ... .. //depot/projects/hammer/ObsoleteFiles.inc#7 integrate .. //depot/projects/hammer/UPDATING#84 integrate .. //depot/projects/hammer/bin/rm/rm.1#12 integrate .. //depot/projects/hammer/bin/rm/rm.c#11 integrate .. //depot/projects/hammer/contrib/bc/bc/main.c#3 integrate .. //depot/projects/hammer/contrib/cpio/ABOUT-NLS#1 branch .. //depot/projects/hammer/contrib/cpio/AUTHORS#1 branch .. //depot/projects/hammer/contrib/cpio/COPYING#2 integrate .. //depot/projects/hammer/contrib/cpio/COPYING.LIB#2 delete .. //depot/projects/hammer/contrib/cpio/ChangeLog#2 integrate .. //depot/projects/hammer/contrib/cpio/FREEBSD-upgrade#3 integrate .. //depot/projects/hammer/contrib/cpio/INSTALL#1 branch .. //depot/projects/hammer/contrib/cpio/NEWS#2 integrate .. //depot/projects/hammer/contrib/cpio/README#2 integrate .. //depot/projects/hammer/contrib/cpio/THANKS#1 branch .. //depot/projects/hammer/contrib/cpio/TODO#1 branch .. //depot/projects/hammer/contrib/cpio/alloca.c#2 delete .. //depot/projects/hammer/contrib/cpio/copyin.c#2 delete .. //depot/projects/hammer/contrib/cpio/copyout.c#2 delete .. //depot/projects/hammer/contrib/cpio/copypass.c#3 delete .. //depot/projects/hammer/contrib/cpio/cpio.1#2 delete .. //depot/projects/hammer/contrib/cpio/cpio.h#2 delete .. //depot/projects/hammer/contrib/cpio/cpio.texi#2 delete .. //depot/projects/hammer/contrib/cpio/cpiohdr.h#2 delete .. //depot/projects/hammer/contrib/cpio/defer.c#2 delete .. //depot/projects/hammer/contrib/cpio/defer.h#2 delete .. //depot/projects/hammer/contrib/cpio/dirname.c#2 delete .. //depot/projects/hammer/contrib/cpio/doc/cpio.1#1 branch .. //depot/projects/hammer/contrib/cpio/doc/cpio.texi#1 branch .. //depot/projects/hammer/contrib/cpio/dstring.c#2 delete .. //depot/projects/hammer/contrib/cpio/dstring.h#2 delete .. //depot/projects/hammer/contrib/cpio/error.c#2 delete .. //depot/projects/hammer/contrib/cpio/extern.h#2 delete .. //depot/projects/hammer/contrib/cpio/filemode.c#2 delete .. //depot/projects/hammer/contrib/cpio/filetypes.h#2 delete .. //depot/projects/hammer/contrib/cpio/global.c#2 delete .. //depot/projects/hammer/contrib/cpio/idcache.c#2 delete .. //depot/projects/hammer/contrib/cpio/lib/alloca_.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/argp-ba.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/argp-eexst.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/argp-fmtstream.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/argp-fmtstream.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/argp-fs-xinl.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/argp-help.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/argp-namefrob.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/argp-parse.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/argp-pv.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/argp-pvh.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/argp-xinl.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/argp.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/basename.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/dirname.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/dirname.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/error.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/error.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/exit.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/exitfail.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/exitfail.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/full-write.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/full-write.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/getopt.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/getopt1.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/getopt_.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/getopt_int.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/gettext.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/localedir.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/mempcpy.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/mempcpy.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/rmt.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/rtapelib.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/safe-read.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/safe-read.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/safe-write.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/safe-write.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/savedir.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/savedir.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/strcase.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/strchrnul.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/strchrnul.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/stripslash.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/strndup.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/strndup.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/strnlen.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/system.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/unlocked-io.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/xalloc-die.c#1 branch .. //depot/projects/hammer/contrib/cpio/lib/xalloc.h#1 branch .. //depot/projects/hammer/contrib/cpio/lib/xmalloc.c#1 branch .. //depot/projects/hammer/contrib/cpio/main.c#2 delete .. //depot/projects/hammer/contrib/cpio/makepath.c#2 delete .. //depot/projects/hammer/contrib/cpio/rmt.h#2 delete .. //depot/projects/hammer/contrib/cpio/rtapelib.c#2 delete .. //depot/projects/hammer/contrib/cpio/safe-stat.h#2 delete .. //depot/projects/hammer/contrib/cpio/src/copyin.c#1 branch .. //depot/projects/hammer/contrib/cpio/src/copyout.c#1 branch .. //depot/projects/hammer/contrib/cpio/src/copypass.c#1 branch .. //depot/projects/hammer/contrib/cpio/src/cpio.h#1 branch .. //depot/projects/hammer/contrib/cpio/src/cpiohdr.h#1 branch .. //depot/projects/hammer/contrib/cpio/src/defer.c#1 branch .. //depot/projects/hammer/contrib/cpio/src/defer.h#1 branch .. //depot/projects/hammer/contrib/cpio/src/dstring.c#1 branch .. //depot/projects/hammer/contrib/cpio/src/dstring.h#1 branch .. //depot/projects/hammer/contrib/cpio/src/extern.h#1 branch .. //depot/projects/hammer/contrib/cpio/src/filemode.c#1 branch .. //depot/projects/hammer/contrib/cpio/src/filetypes.h#1 branch .. //depot/projects/hammer/contrib/cpio/src/global.c#1 branch .. //depot/projects/hammer/contrib/cpio/src/idcache.c#1 branch .. //depot/projects/hammer/contrib/cpio/src/main.c#1 branch .. //depot/projects/hammer/contrib/cpio/src/makepath.c#1 branch .. //depot/projects/hammer/contrib/cpio/src/safe-stat.h#1 branch .. //depot/projects/hammer/contrib/cpio/src/tar.c#1 branch .. //depot/projects/hammer/contrib/cpio/src/tar.h#1 branch .. //depot/projects/hammer/contrib/cpio/src/tarhdr.h#1 branch .. //depot/projects/hammer/contrib/cpio/src/userspec.c#1 branch .. //depot/projects/hammer/contrib/cpio/src/util.c#1 branch .. //depot/projects/hammer/contrib/cpio/stripslash.c#2 delete .. //depot/projects/hammer/contrib/cpio/system.h#2 delete .. //depot/projects/hammer/contrib/cpio/tar.c#3 delete .. //depot/projects/hammer/contrib/cpio/tar.h#2 delete .. //depot/projects/hammer/contrib/cpio/tarhdr.h#2 delete .. //depot/projects/hammer/contrib/cpio/userspec.c#2 delete .. //depot/projects/hammer/contrib/cpio/util.c#2 delete .. //depot/projects/hammer/contrib/cpio/version.c#2 delete .. //depot/projects/hammer/contrib/cpio/xmalloc.c#2 delete .. //depot/projects/hammer/contrib/cpio/xstrdup.c#2 delete .. //depot/projects/hammer/contrib/pf/man/pf.4#7 integrate .. //depot/projects/hammer/contrib/pf/man/pf.conf.5#9 integrate .. //depot/projects/hammer/contrib/pf/man/pfsync.4#8 integrate .. //depot/projects/hammer/contrib/smbfs/include/netsmb/nb_lib.h#2 integrate .. //depot/projects/hammer/contrib/smbfs/include/netsmb/smb_lib.h#3 integrate .. //depot/projects/hammer/contrib/smbfs/lib/smb/ctx.c#7 integrate .. //depot/projects/hammer/contrib/smbfs/lib/smb/nb.c#2 integrate .. //depot/projects/hammer/contrib/smbfs/lib/smb/nb_net.c#4 integrate .. //depot/projects/hammer/contrib/smbfs/lib/smb/nbns_rq.c#2 integrate .. //depot/projects/hammer/contrib/smbfs/mount_smbfs/mount_smbfs.8#3 integrate .. //depot/projects/hammer/etc/defaults/rc.conf#61 integrate .. //depot/projects/hammer/etc/mtree/BSD.include.dist#35 integrate .. //depot/projects/hammer/etc/pccard_ether#16 integrate .. //depot/projects/hammer/etc/rc.d/Makefile#39 integrate .. //depot/projects/hammer/etc/rc.d/archdep#8 integrate .. //depot/projects/hammer/etc/rc.d/pf#9 integrate .. //depot/projects/hammer/etc/rc.d/pflog#7 integrate .. //depot/projects/hammer/etc/rc.d/pfsync#1 branch .. //depot/projects/hammer/etc/rc.d/ugidfw#4 integrate .. //depot/projects/hammer/etc/rc.subr#25 integrate .. //depot/projects/hammer/games/fortune/datfiles/limerick#5 integrate .. //depot/projects/hammer/gnu/usr.bin/cpio/Makefile#3 integrate .. //depot/projects/hammer/gnu/usr.bin/cpio/config.h#1 branch .. //depot/projects/hammer/gnu/usr.bin/cpio/doc/Makefile#2 integrate .. //depot/projects/hammer/gnu/usr.bin/gdb/kgdb/trgt_amd64.c#4 integrate .. //depot/projects/hammer/include/Makefile#48 integrate .. //depot/projects/hammer/lib/libc/arm/string/Makefile.inc#2 integrate .. //depot/projects/hammer/lib/libc/arm/string/strlen.S#1 branch .. //depot/projects/hammer/lib/libkvm/kvm_arm.c#5 integrate .. //depot/projects/hammer/lib/libpam/modules/pam_ssh/Makefile#7 integrate .. //depot/projects/hammer/release/Makefile#76 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#108 integrate .. //depot/projects/hammer/release/picobsd/bridge/PICOBSD#4 integrate .. //depot/projects/hammer/release/picobsd/tinyware/ns/ns.c#2 integrate .. //depot/projects/hammer/sbin/Makefile#38 integrate .. //depot/projects/hammer/sbin/geom/class/mirror/gmirror.8#11 integrate .. //depot/projects/hammer/sbin/ifconfig/ifconfig.8#30 integrate .. //depot/projects/hammer/sbin/ifconfig/ifconfig.c#27 integrate .. //depot/projects/hammer/sbin/ifconfig/ifieee80211.c#17 integrate .. //depot/projects/hammer/sbin/ifconfig/ifvlan.c#4 integrate .. //depot/projects/hammer/sbin/ipfw/ipfw.8#46 integrate .. //depot/projects/hammer/sbin/mount_cd9660/mount_cd9660.8#10 integrate .. //depot/projects/hammer/sbin/reboot/boot_i386.8#13 integrate .. //depot/projects/hammer/sbin/route/keywords#2 integrate .. //depot/projects/hammer/sbin/route/route.8#11 integrate .. //depot/projects/hammer/sbin/route/route.c#12 integrate .. //depot/projects/hammer/sbin/savecore/savecore.c#13 integrate .. //depot/projects/hammer/share/man/man4/Makefile#76 integrate .. //depot/projects/hammer/share/man/man4/ath.4#27 integrate .. //depot/projects/hammer/share/man/man4/bridge.4#5 delete .. //depot/projects/hammer/share/man/man4/cardbus.4#3 integrate .. //depot/projects/hammer/share/man/man4/dummynet.4#5 integrate .. //depot/projects/hammer/share/man/man4/hwpmc.4#9 integrate .. //depot/projects/hammer/share/man/man4/ng_bridge.4#4 integrate .. //depot/projects/hammer/share/man/man4/pccard.4#4 integrate .. //depot/projects/hammer/share/man/man4/pccbb.4#7 integrate .. //depot/projects/hammer/share/man/man4/polling.4#16 integrate .. //depot/projects/hammer/share/man/man4/txp.4#8 integrate .. //depot/projects/hammer/share/man/man4/wi.4#23 integrate .. //depot/projects/hammer/share/man/man5/Makefile#13 integrate .. //depot/projects/hammer/share/man/man5/rc.conf.5#63 integrate .. //depot/projects/hammer/share/man/man9/Makefile#57 integrate .. //depot/projects/hammer/share/man/man9/atomic.9#3 integrate .. //depot/projects/hammer/share/man/man9/pfil.9#12 integrate .. //depot/projects/hammer/share/mk/sys.mk#20 integrate .. //depot/projects/hammer/share/msgdef/Makefile#18 integrate .. //depot/projects/hammer/sys/alpha/alpha/interrupt.c#20 integrate .. //depot/projects/hammer/sys/alpha/alpha/trap.c#18 integrate .. //depot/projects/hammer/sys/alpha/osf1/osf1_ioctl.c#7 integrate .. //depot/projects/hammer/sys/alpha/osf1/osf1_misc.c#19 integrate .. //depot/projects/hammer/sys/alpha/osf1/osf1_signal.c#17 integrate .. //depot/projects/hammer/sys/amd64/amd64/cpu_switch.S#34 integrate .. //depot/projects/hammer/sys/amd64/amd64/elf_machdep.c#32 integrate .. //depot/projects/hammer/sys/amd64/amd64/gdb_machdep.c#12 integrate .. //depot/projects/hammer/sys/amd64/amd64/genassym.c#41 integrate .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#141 integrate .. //depot/projects/hammer/sys/amd64/amd64/support.S#33 integrate .. //depot/projects/hammer/sys/amd64/amd64/trap.c#75 integrate .. //depot/projects/hammer/sys/amd64/amd64/vm_machdep.c#81 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_signal.c#15 integrate .. //depot/projects/hammer/sys/amd64/include/pcb.h#24 integrate .. //depot/projects/hammer/sys/arm/arm/bcopyinout.S#7 integrate .. //depot/projects/hammer/sys/arm/arm/bcopyinout_xscale.S#5 integrate .. //depot/projects/hammer/sys/arm/arm/busdma_machdep.c#16 integrate .. //depot/projects/hammer/sys/arm/arm/dump_machdep.c#2 integrate .. //depot/projects/hammer/sys/arm/arm/elf_trampoline.c#1 branch .. //depot/projects/hammer/sys/arm/arm/in_cksum.c#5 integrate .. //depot/projects/hammer/sys/arm/arm/in_cksum_arm.S#6 integrate .. //depot/projects/hammer/sys/arm/arm/inckern.S#1 branch .. //depot/projects/hammer/sys/arm/arm/intr.c#10 integrate .. //depot/projects/hammer/sys/arm/arm/locore.S#11 integrate .. //depot/projects/hammer/sys/arm/arm/machdep.c#13 integrate .. //depot/projects/hammer/sys/arm/arm/mem.c#2 integrate .. //depot/projects/hammer/sys/arm/arm/pmap.c#25 integrate .. //depot/projects/hammer/sys/arm/arm/support.S#8 integrate .. //depot/projects/hammer/sys/arm/arm/swtch.S#15 integrate .. //depot/projects/hammer/sys/arm/arm/vm_machdep.c#17 integrate .. //depot/projects/hammer/sys/arm/conf/IQ31244#9 integrate .. //depot/projects/hammer/sys/arm/include/in_cksum.h#3 integrate .. //depot/projects/hammer/sys/arm/include/md_var.h#3 integrate .. //depot/projects/hammer/sys/arm/include/pmap.h#11 integrate .. //depot/projects/hammer/sys/arm/sa11x0/assabet_machdep.c#9 integrate .. //depot/projects/hammer/sys/arm/xscale/i80321/files.i80321#3 integrate .. //depot/projects/hammer/sys/arm/xscale/i80321/i80321_aau.c#1 branch .. //depot/projects/hammer/sys/arm/xscale/i80321/i80321_dma.c#1 branch .. //depot/projects/hammer/sys/arm/xscale/i80321/i80321_timer.c#5 integrate .. //depot/projects/hammer/sys/arm/xscale/i80321/iq31244_machdep.c#13 integrate .. //depot/projects/hammer/sys/arm/xscale/i80321/iq80321.c#8 integrate .. //depot/projects/hammer/sys/boot/pc98/loader/main.c#7 integrate .. //depot/projects/hammer/sys/compat/freebsd32/freebsd32_misc.c#32 integrate .. //depot/projects/hammer/sys/compat/freebsd32/freebsd32_proto.h#32 integrate .. //depot/projects/hammer/sys/compat/freebsd32/freebsd32_syscall.h#30 integrate .. //depot/projects/hammer/sys/compat/freebsd32/freebsd32_syscalls.c#30 integrate .. //depot/projects/hammer/sys/compat/freebsd32/freebsd32_sysent.c#30 integrate .. //depot/projects/hammer/sys/compat/freebsd32/syscalls.master#34 integrate .. //depot/projects/hammer/sys/compat/linux/linux_socket.c#21 integrate .. //depot/projects/hammer/sys/compat/svr4/svr4_fcntl.c#9 integrate .. //depot/projects/hammer/sys/compat/svr4/svr4_ioctl.c#7 integrate .. //depot/projects/hammer/sys/compat/svr4/svr4_ipc.c#9 integrate .. //depot/projects/hammer/sys/compat/svr4/svr4_misc.c#22 integrate .. //depot/projects/hammer/sys/compat/svr4/svr4_signal.c#12 integrate .. //depot/projects/hammer/sys/compat/svr4/svr4_stat.c#9 integrate .. //depot/projects/hammer/sys/compat/svr4/svr4_stream.c#18 integrate .. //depot/projects/hammer/sys/compat/svr4/svr4_termios.c#6 integrate .. //depot/projects/hammer/sys/compat/svr4/svr4_ttold.c#7 integrate .. //depot/projects/hammer/sys/compat/svr4/svr4_util.h#6 integrate .. //depot/projects/hammer/sys/conf/Makefile.arm#10 integrate .. //depot/projects/hammer/sys/conf/NOTES#99 integrate .. //depot/projects/hammer/sys/conf/files#125 integrate .. //depot/projects/hammer/sys/conf/options#85 integrate .. //depot/projects/hammer/sys/ddb/db_command.c#15 integrate .. //depot/projects/hammer/sys/ddb/db_output.c#8 integrate .. //depot/projects/hammer/sys/dev/bge/if_bge.c#53 integrate .. //depot/projects/hammer/sys/dev/em/if_em.c#46 integrate .. //depot/projects/hammer/sys/dev/em/if_em.h#23 integrate .. //depot/projects/hammer/sys/dev/en/if_en_pci.c#11 integrate .. //depot/projects/hammer/sys/dev/fb/creator.c#9 integrate .. //depot/projects/hammer/sys/dev/fb/fbreg.h#12 integrate .. //depot/projects/hammer/sys/dev/fb/gfb.c#6 integrate .. //depot/projects/hammer/sys/dev/fb/machfb.c#4 integrate .. //depot/projects/hammer/sys/dev/fb/s3_pci.c#7 integrate .. //depot/projects/hammer/sys/dev/fb/tga.c#6 integrate .. //depot/projects/hammer/sys/dev/fb/vga.c#21 integrate .. //depot/projects/hammer/sys/dev/firewire/00README#2 integrate .. //depot/projects/hammer/sys/dev/firewire/if_fwe.c#24 integrate .. //depot/projects/hammer/sys/dev/firewire/if_fwip.c#8 integrate .. //depot/projects/hammer/sys/dev/fxp/if_fxp.c#52 integrate .. //depot/projects/hammer/sys/dev/if_ndis/if_ndis.c#40 integrate .. //depot/projects/hammer/sys/dev/ixgb/README#2 integrate .. //depot/projects/hammer/sys/dev/ixgb/if_ixgb.c#13 integrate .. //depot/projects/hammer/sys/dev/ixgb/if_ixgb.h#8 integrate .. //depot/projects/hammer/sys/dev/lge/if_lge.c#27 integrate .. //depot/projects/hammer/sys/dev/lge/if_lgereg.h#5 integrate .. //depot/projects/hammer/sys/dev/lmc/if_lmc.h#1 branch .. //depot/projects/hammer/sys/dev/mii/acphy.c#8 integrate .. //depot/projects/hammer/sys/dev/mii/amphy.c#8 integrate .. //depot/projects/hammer/sys/dev/mii/brgphy.c#18 integrate .. //depot/projects/hammer/sys/dev/mii/ciphy.c#3 integrate .. //depot/projects/hammer/sys/dev/mii/dcphy.c#11 integrate .. //depot/projects/hammer/sys/dev/mii/exphy.c#8 integrate .. //depot/projects/hammer/sys/dev/mii/lxtphy.c#9 integrate .. //depot/projects/hammer/sys/dev/mii/mii_physubr.c#8 integrate .. //depot/projects/hammer/sys/dev/mii/miivar.h#2 integrate .. //depot/projects/hammer/sys/dev/mii/nsgphy.c#10 integrate .. //depot/projects/hammer/sys/dev/mii/nsphy.c#8 integrate .. //depot/projects/hammer/sys/dev/mii/pnaphy.c#10 integrate .. //depot/projects/hammer/sys/dev/mii/pnphy.c#9 integrate .. //depot/projects/hammer/sys/dev/mii/qsphy.c#8 integrate .. //depot/projects/hammer/sys/dev/mii/rgephy.c#5 integrate .. //depot/projects/hammer/sys/dev/mii/rlphy.c#9 integrate .. //depot/projects/hammer/sys/dev/mii/tdkphy.c#9 integrate .. //depot/projects/hammer/sys/dev/mii/tlphy.c#9 integrate .. //depot/projects/hammer/sys/dev/mii/ukphy.c#8 integrate .. //depot/projects/hammer/sys/dev/mii/xmphy.c#10 integrate .. //depot/projects/hammer/sys/dev/nge/if_nge.c#32 integrate .. //depot/projects/hammer/sys/dev/pccbb/pccbb_pci.c#11 integrate .. //depot/projects/hammer/sys/dev/pccbb/pccbbdevid.h#11 integrate .. //depot/projects/hammer/sys/dev/pci/isa_pci.c#7 integrate .. //depot/projects/hammer/sys/dev/pci/pci.c#47 integrate .. //depot/projects/hammer/sys/dev/puc/puc.c#17 integrate .. //depot/projects/hammer/sys/dev/re/if_re.c#32 integrate .. //depot/projects/hammer/sys/dev/sound/pci/es137x.c#13 integrate .. //depot/projects/hammer/sys/dev/sound/pcm/ac97.c#16 integrate .. //depot/projects/hammer/sys/dev/sound/pcm/ac97.h#7 integrate .. //depot/projects/hammer/sys/dev/sound/pcm/ac97_patch.c#4 integrate .. //depot/projects/hammer/sys/dev/sound/pcm/ac97_patch.h#4 integrate .. //depot/projects/hammer/sys/dev/sound/pcm/channel.c#14 integrate .. //depot/projects/hammer/sys/dev/sound/pcm/dsp.c#21 integrate .. //depot/projects/hammer/sys/dev/sound/pcm/feeder_volume.c#1 branch .. //depot/projects/hammer/sys/dev/sound/pcm/mixer.c#17 integrate .. //depot/projects/hammer/sys/dev/sound/pcm/sndstat.c#11 integrate .. //depot/projects/hammer/sys/dev/sound/pcm/sound.c#15 integrate .. //depot/projects/hammer/sys/dev/sound/pcm/sound.h#17 integrate .. //depot/projects/hammer/sys/dev/sound/usb/uaudio_pcm.c#13 integrate .. //depot/projects/hammer/sys/dev/syscons/scgfbrndr.c#8 integrate .. //depot/projects/hammer/sys/dev/syscons/scmouse.c#10 integrate .. //depot/projects/hammer/sys/dev/syscons/scvgarndr.c#8 integrate .. //depot/projects/hammer/sys/dev/syscons/scvidctl.c#8 integrate .. //depot/projects/hammer/sys/dev/syscons/syscons.c#34 integrate .. //depot/projects/hammer/sys/dev/syscons/syscons.h#10 integrate .. //depot/projects/hammer/sys/dev/txp/if_txpreg.h#4 integrate .. //depot/projects/hammer/sys/dev/usb/if_cdce.c#6 integrate .. //depot/projects/hammer/sys/dev/usb/usbdevs#63 integrate .. //depot/projects/hammer/sys/dev/vge/if_vge.c#11 integrate .. //depot/projects/hammer/sys/dev/watchdog/watchdog.c#3 integrate .. //depot/projects/hammer/sys/dev/wi/if_wi.c#44 integrate .. //depot/projects/hammer/sys/dev/wi/if_wivar.h#15 integrate .. //depot/projects/hammer/sys/fs/fifofs/fifo_vnops.c#33 integrate .. //depot/projects/hammer/sys/fs/msdosfs/bootsect.h#5 integrate .. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_vfsops.c#35 integrate .. //depot/projects/hammer/sys/fs/nwfs/nwfs_vfsops.c#15 integrate .. //depot/projects/hammer/sys/geom/geom_disk.c#33 integrate .. //depot/projects/hammer/sys/geom/uzip/g_uzip.c#5 integrate .. //depot/projects/hammer/sys/gnu/fs/ext2fs/ext2_alloc.c#4 integrate .. //depot/projects/hammer/sys/i386/i386/apic_vector.s#13 integrate .. //depot/projects/hammer/sys/i386/i386/local_apic.c#19 integrate .. //depot/projects/hammer/sys/i386/i386/mp_machdep.c#49 integrate .. //depot/projects/hammer/sys/i386/i386/trap.c#40 integrate .. //depot/projects/hammer/sys/i386/i386/vm86.c#9 integrate .. //depot/projects/hammer/sys/i386/include/smptests.h#6 integrate .. //depot/projects/hammer/sys/i386/isa/vesa.c#12 integrate .. //depot/projects/hammer/sys/ia64/ia32/ia32_signal.c#4 integrate .. //depot/projects/hammer/sys/ia64/ia64/unaligned.c#11 integrate .. //depot/projects/hammer/sys/isa/pnp.c#7 integrate .. //depot/projects/hammer/sys/kern/imgact_elf.c#33 integrate .. //depot/projects/hammer/sys/kern/kern_conf.c#36 integrate .. //depot/projects/hammer/sys/kern/kern_cpu.c#11 integrate .. //depot/projects/hammer/sys/kern/kern_exec.c#53 integrate .. //depot/projects/hammer/sys/kern/kern_jail.c#19 integrate .. //depot/projects/hammer/sys/kern/kern_kse.c#26 integrate .. //depot/projects/hammer/sys/kern/kern_lock.c#23 integrate .. //depot/projects/hammer/sys/kern/kern_mbuf.c#9 integrate .. //depot/projects/hammer/sys/kern/kern_poll.c#13 integrate .. //depot/projects/hammer/sys/kern/kern_proc.c#47 integrate .. //depot/projects/hammer/sys/kern/kern_prot.c#25 integrate .. //depot/projects/hammer/sys/kern/kern_resource.c#25 integrate .. //depot/projects/hammer/sys/kern/kern_thread.c#79 integrate .. //depot/projects/hammer/sys/kern/subr_kdb.c#13 integrate .. //depot/projects/hammer/sys/kern/subr_rman.c#17 integrate .. //depot/projects/hammer/sys/kern/subr_turnstile.c#17 integrate .. //depot/projects/hammer/sys/kern/vfs_bio.c#59 integrate .. //depot/projects/hammer/sys/kern/vfs_export.c#13 integrate .. //depot/projects/hammer/sys/kern/vfs_subr.c#93 integrate .. //depot/projects/hammer/sys/modules/Makefile#87 integrate .. //depot/projects/hammer/sys/modules/agp/Makefile#9 integrate .. //depot/projects/hammer/sys/modules/ath/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/ath_rate_amrr/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/ath_rate_onoe/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/ath_rate_sample/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/aue/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/axe/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/bfe/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/bge/Makefile#4 integrate .. //depot/projects/hammer/sys/modules/bridge/Makefile#4 delete .. //depot/projects/hammer/sys/modules/cdce/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/cue/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/dc/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/de/Makefile#5 integrate .. //depot/projects/hammer/sys/modules/dummynet/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/em/Makefile#4 integrate .. //depot/projects/hammer/sys/modules/fxp/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/geom/geom_uzip/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/hifn/Makefile#4 integrate .. //depot/projects/hammer/sys/modules/if_ndis/Makefile#5 integrate .. //depot/projects/hammer/sys/modules/ipw/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/iwi/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/ixgb/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/kue/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/lge/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/lmc/Makefile#1 branch .. //depot/projects/hammer/sys/modules/mii/Makefile#6 integrate .. //depot/projects/hammer/sys/modules/ncv/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/ndis/Makefile#9 integrate .. //depot/projects/hammer/sys/modules/nge/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/nsp/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/pcn/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/ral/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/re/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/rl/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/rue/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/safe/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/sf/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/sis/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/sk/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/snc/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/sound/sound/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/ste/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/stg/Makefile#4 integrate .. //depot/projects/hammer/sys/modules/ti/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/tl/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/tx/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/txp/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/ubsec/Makefile#4 integrate .. //depot/projects/hammer/sys/modules/udav/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/ural/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/vge/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/vr/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/vx/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/wb/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/xl/Makefile#2 integrate .. //depot/projects/hammer/sys/net/bridge.c#28 delete .. //depot/projects/hammer/sys/net/bridge.h#6 delete .. //depot/projects/hammer/sys/net/if.c#57 integrate .. //depot/projects/hammer/sys/net/if.h#21 integrate .. //depot/projects/hammer/sys/net/if_bridge.c#13 integrate .. //depot/projects/hammer/sys/net/if_ethersubr.c#47 integrate .. //depot/projects/hammer/sys/net/if_var.h#35 integrate .. //depot/projects/hammer/sys/net/if_vlan.c#30 integrate .. //depot/projects/hammer/sys/netgraph/ng_ether.c#21 integrate .. //depot/projects/hammer/sys/netinet/if_ether.c#26 integrate .. //depot/projects/hammer/sys/netinet/in.c#19 integrate .. //depot/projects/hammer/sys/netinet/ip_dummynet.c#34 integrate .. //depot/projects/hammer/sys/netinet/ip_dummynet.h#13 integrate .. //depot/projects/hammer/sys/netinet/ip_fw2.c#65 integrate .. //depot/projects/hammer/sys/netinet/tcp_subr.c#51 integrate .. //depot/projects/hammer/sys/netsmb/netbios.h#4 integrate .. //depot/projects/hammer/sys/nfsserver/nfs_srvsock.c#14 integrate .. //depot/projects/hammer/sys/nfsserver/nfs_srvsubs.c#19 integrate .. //depot/projects/hammer/sys/pc98/cbus/sio.c#3 integrate .. //depot/projects/hammer/sys/pci/agp_amd64.c#8 integrate .. //depot/projects/hammer/sys/pci/agpreg.h#11 integrate .. //depot/projects/hammer/sys/pci/if_dc.c#50 integrate .. //depot/projects/hammer/sys/pci/if_rl.c#48 integrate .. //depot/projects/hammer/sys/pci/if_rlreg.h#19 integrate .. //depot/projects/hammer/sys/pci/if_sf.c#35 integrate .. //depot/projects/hammer/sys/pci/if_sis.c#41 integrate .. //depot/projects/hammer/sys/pci/if_ste.c#39 integrate .. //depot/projects/hammer/sys/pci/if_ti.c#35 integrate .. //depot/projects/hammer/sys/pci/if_tireg.h#8 integrate .. //depot/projects/hammer/sys/pci/if_vr.c#35 integrate .. //depot/projects/hammer/sys/pci/if_wb.c#30 integrate .. //depot/projects/hammer/sys/pci/if_xl.c#58 integrate .. //depot/projects/hammer/sys/powerpc/ofw/ofw_syscons.c#9 integrate .. //depot/projects/hammer/sys/security/mac_seeotheruids/mac_seeotheruids.c#7 integrate .. //depot/projects/hammer/sys/sys/buf.h#26 integrate .. //depot/projects/hammer/sys/sys/kerneldump.h#6 integrate .. //depot/projects/hammer/sys/sys/mac.h#28 integrate .. //depot/projects/hammer/sys/sys/mac_policy.h#31 integrate .. //depot/projects/hammer/sys/sys/proc.h#86 integrate .. //depot/projects/hammer/sys/sys/refcount.h#1 branch .. //depot/projects/hammer/sys/sys/resourcevar.h#15 integrate .. //depot/projects/hammer/sys/sys/rman.h#11 integrate .. //depot/projects/hammer/sys/sys/ucred.h#9 integrate .. //depot/projects/hammer/sys/ufs/ffs/ffs_alloc.c#23 integrate .. //depot/projects/hammer/sys/ufs/ffs/ffs_snapshot.c#37 integrate .. //depot/projects/hammer/sys/ufs/ffs/ffs_softdep.c#32 integrate .. //depot/projects/hammer/sys/ufs/ufs/ufs_vnops.c#39 integrate .. //depot/projects/hammer/sys/vm/vm_zeroidle.c#20 integrate .. //depot/projects/hammer/tools/regression/geom_uzip/Makefile#2 integrate .. //depot/projects/hammer/tools/regression/geom_uzip/test-1.img.gz.uue#2 delete .. //depot/projects/hammer/tools/regression/geom_uzip/test-1.img.uzip.uue#1 branch .. //depot/projects/hammer/tools/regression/geom_uzip/test-1.sh#2 integrate .. //depot/projects/hammer/tools/regression/geom_uzip/test-2.sh#2 integrate .. //depot/projects/hammer/tools/tools/nanobsd/nanobsd.sh#7 integrate .. //depot/projects/hammer/usr.bin/lorder/Makefile#2 integrate .. //depot/projects/hammer/usr.bin/mt/mt.1#9 integrate .. //depot/projects/hammer/usr.bin/netstat/if.c#11 integrate .. //depot/projects/hammer/usr.bin/netstat/main.c#17 integrate .. //depot/projects/hammer/usr.bin/netstat/netstat.1#12 integrate .. //depot/projects/hammer/usr.bin/netstat/netstat.h#12 integrate .. //depot/projects/hammer/usr.sbin/Makefile#69 integrate .. //depot/projects/hammer/usr.sbin/lmcconfig/Makefile#1 branch .. //depot/projects/hammer/usr.sbin/lmcconfig/lmcconfig.8#1 branch .. //depot/projects/hammer/usr.sbin/lmcconfig/lmcconfig.c#1 branch .. //depot/projects/hammer/usr.sbin/ntp/ntptrace/Makefile#5 integrate .. //depot/projects/hammer/usr.sbin/pccard/Makefile#2 integrate .. //depot/projects/hammer/usr.sbin/pmccontrol/pmccontrol.c#5 integrate .. //depot/projects/hammer/usr.sbin/syslogd/syslogd.c#24 integrate .. //depot/projects/hammer/usr.sbin/watchdogd/watchdogd.c#9 integrate Differences ... ==== //depot/projects/hammer/ObsoleteFiles.inc#7 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.15 2005/09/11 18:19:42 netchild Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.17 2005/09/28 09:19:17 mlaier Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -14,6 +14,9 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20050927: bridge(4) replaced by if_bridge(4) +OLD_FILES+=usr/include/net/bridge.h +OLD_FILES+=usr/share/man/man4/bridge.4.gz # 20050831: not implemented OLD_FILES+=usr/share/man/man3/getino.3.gz OLD_FILES+=usr/share/man/man3/putino.3.gz ==== //depot/projects/hammer/UPDATING#84 (text+ko) ==== @@ -21,6 +21,14 @@ developers choose to disable these features on build machines to maximize performance. +20051001: + kern.polling.enable sysctl MIB is now deprecated. Use ifconfig(8) + to turn polling(4) on your interfaces. + +20050927: + The old bridge(4) implementation was retired. The new + if_bridge(4) serves as a full functional replacement. + 20050722: The ai_addrlen of a struct addrinfo was changed to a socklen_t to conform to POSIX-2001. This change broke an ABI @@ -411,4 +419,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.420 2005/09/09 15:59:17 obrien Exp $ +$FreeBSD: src/UPDATING,v 1.422 2005/10/01 20:53:51 glebius Exp $ ==== //depot/projects/hammer/bin/rm/rm.1#12 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)rm.1 8.5 (Berkeley) 12/5/94 -.\" $FreeBSD: src/bin/rm/rm.1,v 1.36 2005/02/09 17:37:39 ru Exp $ +.\" $FreeBSD: src/bin/rm/rm.1,v 1.38 2005/09/30 02:12:15 dougb Exp $ .\" -.Dd October 28, 2004 +.Dd September 29, 2005 .Dt RM 1 .Os .Sh NAME @@ -88,6 +88,10 @@ Overwrite regular files before deleting them. Files are overwritten three times, first with the byte pattern 0xff, then 0x00, and then 0xff again, before they are deleted. +Specifying this flag for a read only file will cause +.Nm +to generate an error message and exit. +The file wil not be removed or overwritten. .It Fl R Attempt to remove the file hierarchy rooted in each file argument. The ==== //depot/projects/hammer/bin/rm/rm.c#11 (text+ko) ==== @@ -39,7 +39,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/bin/rm/rm.c,v 1.52 2004/11/13 04:07:01 jkh Exp $"); +__FBSDID("$FreeBSD: src/bin/rm/rm.c,v 1.53 2005/09/29 20:40:29 dougb Exp $"); #include #include @@ -452,11 +452,8 @@ * talking to a terminal, ask. Symbolic links are excluded * because their permissions are meaningless. Check stdin_ok * first because we may not have stat'ed the file. - * Also skip this check if the -P option was specified because - * we will not be able to overwrite file contents and will - * barf later. */ - if (!stdin_ok || S_ISLNK(sp->st_mode) || Pflag || + if (!stdin_ok || S_ISLNK(sp->st_mode) || (!access(name, W_OK) && !(sp->st_flags & (SF_APPEND|SF_IMMUTABLE)) && (!(sp->st_flags & (UF_APPEND|UF_IMMUTABLE)) || !uid))) @@ -464,6 +461,10 @@ strmode(sp->st_mode, modep); if ((flagsp = fflagstostr(sp->st_flags)) == NULL) err(1, "fflagstostr"); + if (Pflag) + errx(1, + "%s: -P was specified, but file is not writable", + path); (void)fprintf(stderr, "override %s%s%s/%s %s%sfor %s? ", modep + 1, modep[9] == ' ' ? "" : " ", user_from_uid(sp->st_uid, 0), ==== //depot/projects/hammer/contrib/bc/bc/main.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ Western Washington University Bellingham, WA 98226-9062 -$FreeBSD: src/contrib/bc/bc/main.c,v 1.6 2004/02/17 00:53:50 ache Exp $ +$FreeBSD: src/contrib/bc/bc/main.c,v 1.7 2005/09/27 18:52:17 brooks Exp $ *************************************************************************/ @@ -65,7 +65,7 @@ printf ("usage: %s [options] [file ...]\n%s%s%s%s%s%s%s", progname, " -h --help print this usage and exit\n", " -i --interactive force interactive mode\n", - " -l --mathlib use the predefine math routnes\n", + " -l --mathlib use the predefine math routines\n", " -q --quiet don't print initial banner\n", " -s --standard non-standard bc constructs are errors\n", " -w --warn warn about non-standard bc constructs\n", ==== //depot/projects/hammer/contrib/cpio/COPYING#2 (text+ko) ==== @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -279,7 +279,7 @@ END OF TERMS AND CONDITIONS - Appendix: How to Apply These Terms to Your New Programs + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -291,7 +291,7 @@ the "copyright" line and a pointer to where the full notice is found. - Copyright (C) 19yy + Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -305,14 +305,15 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. ==== //depot/projects/hammer/contrib/cpio/ChangeLog#2 (text+ko) ==== @@ -1,3 +1,433 @@ +2004-12-20 Sergey Poznyakoff + + Released version 2.6. Sources up to this point are tagged + release_2_6. + + * configure.ac: Raised version number to 2.6 + * NEWS: Likewise + * bootstrap (update_po): Give -r to wget. Always remove index.html + Ignore alloca-opt module (it duplicates alloca) + +2004-11-23 Sergey Poznyakoff + + * src/main.c (enum cpio_options): Bugfix: Initialize first enum + value to 256. + * bootstrap: Add unlocked-io + * headers/argp.h: Removed + * headers/getopt.h: Removed + * headers/Makefile.am: Updated + +2004-10-14 Sergey Poznyakoff + + * src/copyout.c: Add trailing slash to directory names in + ustar format. + * src/makepath.c: Removed redeclaration of error(). + * src/tar.c: Fixed deviations from POSIX.1-1988: + Properly split long file names. Fill in octal fields with zeros, + not spaces. Save only protection modes, not the whole mode. + + * NEWS: Updated + +2004-09-08 Sergey Poznyakoff + + * NEWS: Updated + * TODO: Updated + * bootstrap: Install po files by default + * po/LINGUAS: Removed. File is generated automatically + * po/.cvsignore: Updated + * src/copyin.c: Implemented --to-stdout option + * src/copyout.c: Display the annoying 'truncating inode number' + message only if the user wishes it. + * src/extern.h: Added new globals. + * src/global.c: Likewise. + + * src/main.c: Added support for --to-stdout and --warning options + * src/tar.c (read_in_tar_header): Use warn_junk_bytes() + * src/util.c (create_all_directories): Use dir_name. + + * configure.ac: Added support for the test suite + * Makefile.am: Likewise + + * tests: New directory + * tests/.cvsignore: New file + * tests/Makefile.am: New file + * tests/testsuite.at: New file + * tests/inout.at: New file + * tests/version.at: New file + * tests/atlocal.in: New file + +2004-09-07 Sergey Poznyakoff + + * src/main.c (process_args): Bugfix. Allow extra arguments + in copy_in mode. + * src/util.c (write_nuls_to_file): Use buffered I/O. All + callers changed. Thanks Matthew Braithwaite + for noticing. + Bugfix: extra_bytes was mistakenly used instead of blocks. + * THANKS: Added Matthew Braithwaite. + +2004-09-06 Sergey Poznyakoff + + Started merging with tar into paxutils. Sources before + this point are tagged alpha-2_50_90. + + * bootstrap: New file + * autogen.sh: Removed + * Makefile.am: Updated + * NEWS: Updated + * README-alpha: Updated + * configure.ac: Updated + * doc/cpio.1: Updated + * po/POTFILES.in: Updated + + * src/Makefile.am: Updated + * src/error.c: Removed + * src/dirname.c: Likewise + * src/xmalloc.c: Likewise + * src/stripslash.c: Likewise + * src/xstrdup.c + * src/gettext.h: Likewise + * src/system.h: Likewise + * src/rmt.h: Likewise + * src/getopt.c: Likewise + * src/getopt1.c: Likewise + * src/bcopy.c: Likewise + * src/fnmatch.c: Likewise + * src/mkdir.c: Likewise + * src/strdup.c: Likewise + * src/argp-ba.c: Likewise + * src/argp-eexst.c: Likewise + * src/argp-fmtstream.c: Likewise + * src/argp-fs-xinl.c: Likewise + * src/argp-help.c: Likewise + * src/argp-parse.c: Likewise + * src/argp-pv.c: Likewise + * src/argp-pvh.c: Likewise + * src/argp-xinl.c: Likewise + * src/pin.c: Likewise + * src/alloca.c: Likewise + * src/argmatch.c: Likewise + * src/rmt.c: Likewise + * src/rtapelib.c: Likewise + * src/strerror.c: Likewise + + * src/copyin.c: Switched to ANSI C (sigh) + * src/copyout.c: Likewise + * src/copypass.c: Likewise + * src/defer.c: Likewise + * src/defer.h: Likewise + * src/dstring.c: Likewise + * src/dstring.h: Likewise + * src/extern.h: Likewise + * src/filemode.c: Likewise + * src/global.c: Likewise + * src/idcache.c: Likewise + * src/main.c: Likewise + * src/makepath.c: Likewise + * src/mt.c: Likewise + * src/tar.c: Likewise + * src/userspec.c: Likewise + * src/util.c: Likewise + + * lib: New directory + * lib/Makefile.tmpl: New file + * lib/bcopy.c: Moved from ../src + * lib/mkdir.c: Likewise. + * lib/strdup.c: Likewise. + * lib/strerror.c: Likewise. + +2004-08-30 Sergey Poznyakoff + + * Makefile.am: Added headers to SUBDIRS. + * configure.ac: Check for AC_SYS_LARGEFILE. + Use AC_CONFIG_LINKS to provide for fnmatch.h and getopt.h on + the systems where these are missing + Check for argp and replace it if necessary. + * src/Makefile.am: Updated + * src/fnmatch.h: Moved to headers/ + * src/getopt.h: Likewise. + * src/main.c: Option parsing rewritten using argp. Improved + option consistency checking. + * src/rmt.c: Include getopt.h + + * src/argp-ba.c: New file + * src/argp-eexst.c: New file + * src/argp-fmtstream.c: New file + * src/argp-fs-xinl.c: New file + * src/argp-help.c: New file + * src/argp-parse.c: New file + * src/argp-pv.c: New file + * src/argp-pvh.c: New file + * src/argp-xinl.c: New file + * src/pin.c: New file + + * headers: New directory + * headers/Makefile.am: New file + * headers/getopt.h: New file + * headers/argp.h: New file + * headers/fnmatch.h: New file + * headers/.cvsignore: New file + +2004-03-02 Sergey Poznyakoff + + * src/util.c (copy_files_disk_to_disk): Bugfix. If a file + grew n bytes in copy-pass mode, these n bytes got prepended + to the contents of all subsequent files. Fix provided by + Holger Fleischmann + * THANKS: Added Holger Fleischmann. + +2004-02-27 Sergey Poznyakoff + + * src/makepath.c: Remove unneded typedefs + + * src/copyin.c: Remove __MSDOS__ conditionals + * src/copyout.c: Likewise + * src/copypass.c: Likewise + * src/main.c: Likewise + * src/tar.c: Likewise + * src/util.c: Likewise + +2004-02-27 Sergey Poznyakoff + + Changed from flat to deep package layout. Added the framework + for NLS support. + + * .cvsignore: Updated + * Makefile.am: Updated + * configure.ac: Updated + * NEWS: Updated + * README-alpha: Updated + * THANKS: Updated + + * autogen.sh: New file + + * alloca.c: Moved to src + * argmatch.c: Likewise + * bcopy.c: Likewise + * dstring.h: Likewise + * copyin.c: Likewise + * copyout.c: Likewise + * copypass.c: Likewise + * cpio.h: Likewise + * cpiohdr.h: Likewise + * defer.c: Likewise + * defer.h: Likewise + * dirname.c: Likewise + * dstring.c: Likewise + * dstring.h: Likewise + * error.c: Likewise + * extern.h: Likewise + * filemode.c: Likewise + * filetypes.h: Likewise + * fnmatch.c: Likewise + * fnmatch.h: Likewise + * getopt.c: Likewise + * getopt.h: Likewise + * getopt1.c: Likewise + * global.c: Likewise + * idcache.c: Likewise + * main.c: Likewise + * makepath.c: Likewise + * mkdir.c: Likewise + * mt.c: Likewise + * rmt.c: Likewise + * rmt.h: Likewise + * rtapelib.c: Likewise + * safe-stat.h: Likewise + * strdup.c: Likewise + * strerror.c: Likewise + * stripslash.c: Likewise + * system.h: Likewise + * tar.c: Likewise + * tar.h: Likewise + * tarhdr.h: Likewise + * userspec.c: Likewise + * util.c: Likewise + * xmalloc.c: Likewise + * xstrdup.c: Likewise + + * cpio.1: Moved to doc + * cpio.texi: Likewise + * mt.1: Likewise + + * src: New directory + * src/.cvsignore: New file + * src/Makefile.am: Likewise + * src/alloca.c: Likewise + * src/argmatch.c: Likewise + * src/bcopy.c: Likewise + * src/copyin.c: Likewise + * src/copyout.c: Likewise + * src/copypass.c: Likewise + * src/cpio.h: Likewise + * src/cpiohdr.h: Likewise + * src/defer.c: Likewise + * src/defer.h: Likewise + * src/dirname.c: Likewise + * src/dstring.c: Likewise + * src/dstring.h: Likewise + * src/error.c: Likewise + * src/extern.h: Likewise + * src/filemode.c: Likewise + * src/filetypes.h: Likewise + * src/fnmatch.c: Likewise + * src/fnmatch.h: Likewise + * src/getopt.c: Likewise + * src/getopt.h: Likewise + * src/getopt1.c: Likewise + * src/gettext.h: Likewise + * src/global.c: Likewise + * src/idcache.c: Likewise + * src/main.c: Likewise + * src/makepath.c: Likewise + * src/mkdir.c: Likewise + * src/mt.c: Likewise + * src/rmt.c: Likewise + * src/rmt.h: Likewise + * src/rtapelib.c: Likewise + * src/safe-stat.h: Likewise + * src/strdup.c: Likewise + * src/strerror.c: Likewise + * src/stripslash.c: Likewise + * src/system.h: Likewise + * src/tar.c: Likewise + * src/tar.h: Likewise + * src/tarhdr.h: Likewise + * src/userspec.c: Likewise + * src/util.c: Likewise + * src/xmalloc.c: Likewise + * src/xstrdup.c: Likewise + + * doc: New directory + * doc/.cvsignore: New file + * doc/Makefile.am: New file + * doc/cpio.1: New file + * doc/cpio.info: New file + * doc/cpio.texi: New file + * doc/mt.1: New file + + * po: New directory + * po/.cvsignore: New file + * po/LINGUAS: New file + * po/Makevars: New file + * po/POTFILES.in: New file + +2003-11-28 Sergey Poznyakoff + + * configure.ac: Added various checks + * Makefile.am (rmt_LDADD): Added. + * error.c: Updated >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Oct 4 11:51:54 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B49A316A421; Tue, 4 Oct 2005 11:51:53 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8781F16A41F for ; Tue, 4 Oct 2005 11:51:53 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6407F43D75 for ; Tue, 4 Oct 2005 11:51:47 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j94BplQ2090183 for ; Tue, 4 Oct 2005 11:51:47 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j94BplJt090180 for perforce@freebsd.org; Tue, 4 Oct 2005 11:51:47 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 4 Oct 2005 11:51:47 GMT Message-Id: <200510041151.j94BplJt090180@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 84779 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2005 11:51:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=84779 Change 84779 by rwatson@rwatson_peppercorn on 2005/10/04 11:51:17 A number of changes to audit.h and audit_private.h: - Annotate each to indicate what goes in them and why. - #error out if they are included in non-kernel code, and remove #ifdef _KERNEL sections. - Additional comments relating to types, defines, data structures, functions, etc, in audit_private.h. - Minor style tweaks. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit.h#3 edit .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_private.h#5 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit.h#3 (text+ko) ==== @@ -21,10 +21,17 @@ * @APPLE_LICENSE_HEADER_END@ */ +/* + * This header includes function prototypes and type definitions that are + * necessary for the kernel as a whole to interact with the audit subsystem. + */ + #ifndef _BSM_AUDIT_KERNEL_H #define _BSM_AUDIT_KERNEL_H -#ifdef _KERNEL +#ifndef _KERNEL +#error "no user-serviceable parts inside" +#endif #include @@ -183,9 +190,8 @@ * possible that an audit record was begun before auditing was turned off. */ #define AUDIT_SYSCALL_EXIT(error, td) do { \ - if (audit_enabled | (td->td_ar != NULL)) { \ + if (audit_enabled | (td->td_ar != NULL)) \ audit_syscall_exit(error, td); \ - } \ } while (0) /* @@ -217,6 +223,4 @@ #endif /* AUDIT */ -#endif /* _KERNEL */ - #endif /* !_BSM_AUDIT_KERNEL_H */ ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_private.h#5 (text+ko) ==== @@ -21,25 +21,47 @@ * @APPLE_LICENSE_HEADER_END@ */ +/* + * This include file contains function prototypes and type definitions used + * within the audit implementation. + */ + #ifndef _BSM_AUDIT_PRIVATE_H #define _BSM_AUDIT_PRIVATE_H +#ifndef _KERNEL +#error "no user-serviceable parts inside" +#endif + #include #include #include +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_AUDIT); +#endif + +/* + * Success/failure conditions for the conversion of a kernel audit record to + * BSM format. + */ #define BSM_SUCCESS 0 #define BSM_FAILURE 1 #define BSM_NOAUDIT 2 -#ifdef MALLOC_DECLARE -MALLOC_DECLARE(M_AUDIT); -#endif - -/* Defines for the kernel audit record k_ar_commit field */ +/* + * Defines for the kernel audit record k_ar_commit field. + */ #define AR_COMMIT_KERNEL 0x00000001U #define AR_COMMIT_USER 0x00000010U +/* + * Audit data is generated as a stream of struct audit_record structures, + * linked by struct kaudit_record, and contain storage for possible audit so + * that it will not need to be allocated during the processing of a system + * call, both improving efficiency and avoiding sleeping at untimely moments. + * This structure is converted to BSM format before being written to disk. + */ struct vnode_au_info { mode_t vn_mode; uid_t vn_uid; @@ -169,19 +191,25 @@ TAILQ_ENTRY(kaudit_record) k_q; }; +/* + * Functions to manage the allocation, release, and commit of kernel audit + * records. + */ void audit_abort(struct kaudit_record *ar); void audit_commit(struct kaudit_record *ar, int error, int retval); - struct kaudit_record *audit_new(int event, struct thread *td); +/* + * Functions relating to the conversion of internal kernel audit records to + * the BSM file format. + */ int kaudit_to_bsm(struct kaudit_record *kar, - struct au_record **pau); - + struct au_record **pau); int bsm_rec_verify(void *rec); /* - * Kernel versions of the BSM audit record functions. + * Kernel versions of the libbsm audit record functions. */ struct au_record *kau_open(void); int kau_write(struct au_record *rec, token_t *m); @@ -190,7 +218,9 @@ void kau_free(struct au_record *rec); void kau_init(void); - +/* + * Return values for pre-selection and post-selection decisions. + */ #define AU_PRS_SUCCESS 1 #define AU_PRS_FAILURE 2 #define AU_PRS_BOTH (AU_PRS_SUCCESS|AU_PRS_FAILURE) @@ -201,7 +231,6 @@ #define AUDIT_OPEN_FLAGS FWRITE | O_APPEND #define AUDIT_CLOSE_FLAGS FWRITE | O_APPEND -#ifdef _KERNEL #include #include #include @@ -242,6 +271,4 @@ void audit_shutdown(void *arg, int howto); void audit_rotate_vnode(struct ucred *cred, struct vnode *vp); -#endif /* _KERNEL */ - #endif /* ! _BSM_AUDIT_PRIVATE_H */ From owner-p4-projects@FreeBSD.ORG Tue Oct 4 12:03:13 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2FE8D16A421; Tue, 4 Oct 2005 12:03:12 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD6BB16A41F for ; Tue, 4 Oct 2005 12:03:11 +0000 (GMT) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42C7643D55 for ; Tue, 4 Oct 2005 12:03:02 +0000 (GMT) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j94C32Gk090642 for ; Tue, 4 Oct 2005 12:03:02 GMT (envelope-from soc-bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j94C31fm090639 for perforce@freebsd.org; Tue, 4 Oct 2005 12:03:01 GMT (envelope-from soc-bushman@freebsd.org) Date: Tue, 4 Oct 2005 12:03:01 GMT Message-Id: <200510041203.j94C31fm090639@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-bushman@freebsd.org using -f From: soc-bushman To: Perforce Change Reviews Cc: Subject: PERFORCE change 84780 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2005 12:03:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=84780 Change 84780 by soc-bushman@soc-bushman_stinger on 2005/10/04 12:02:28 SIGPIPE is now ignored multipart snapshots are made when lookups are performed by ourselves some bugs fixed in the marshalling code Affected files ... .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/Makefile#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/Makefile.inc#3 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/hosts.c#3 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/hosts.h#3 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/passwd.c#3 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/passwd.h#3 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/services.c#3 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/services.h#3 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cached.8#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cached.c#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cached.conf#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cached.conf.5#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cachelib.c#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cachelib.h#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cacheplcs.c#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cacheplcs.h#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/config.c#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/config.h#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/debug.c#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/debug.h#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/hashtable.h#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/log.c#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/log.h#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/mp_rs_query.c#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/mp_rs_query.h#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/mp_ws_query.c#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/mp_ws_query.h#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/parser.c#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/parser.h#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/protocol.c#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/protocol.h#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/query.c#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/query.h#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/singletons.c#7 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/singletons.h#7 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/gethostnamadr.c#6 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/name6.c#6 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/nscache.c#6 edit .. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/nscachedcli.c#6 edit .. //depot/projects/soc2005/nsswitch_cached/tests/nsdispatch_test/nscache.c#10 edit .. //depot/projects/soc2005/nsswitch_cached/tests/nsdispatch_test/nscachedcli.c#5 edit .. //depot/projects/soc2005/nsswitch_cached/tests/nsdispatch_test/nsdispatch.c#11 edit .. //depot/projects/soc2005/nsswitch_cached/tests/nsdispatch_test/nsdispatch_test.c#10 edit Differences ... ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/Makefile#7 (text+ko) ==== @@ -10,6 +10,7 @@ CFLAGS+= -DCONFIG_PATH="\"${PREFIX}/etc/cached.conf\"" DPADD+=${LIBM} ${LIBPTHREAD} LDADD+=${LIBM} ${LIBPTHREAD} +LDFLAGS+= -Xlinker --export-dynamic FILESGROUPS=STARTUP CONF ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/Makefile.inc#3 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/hosts.c#3 (text+ko) ==== @@ -40,6 +40,10 @@ #define GETHOSTBYXXX_LOOKUP 1 #define GETIPNODEBYXXX_LOOKUP 2 +static int hostent_marshal_func(struct hostent *, char *, size_t *); +static int addrinfo_marshal_func(struct addrinfo *, char *, size_t *); +static int hosts_lookup_func(const char *, size_t, char **, size_t *); + static int hostent_marshal_func(struct hostent *ht, char *buffer, size_t *buffer_size) { @@ -50,7 +54,7 @@ TRACE_IN(hostent_marshal_func); desired_size = ALIGNBYTES + sizeof(struct hostent) + sizeof(char *); if (ht->h_name != NULL) - strlen(ht->h_name) + 1; + desired_size += strlen(ht->h_name) + 1; if (ht->h_aliases != NULL) { aliases_size = 0; @@ -68,13 +72,13 @@ for (iter = ht->h_addr_list; *iter; ++iter) ++addr_size; - desired_size += addr_size * _ALIGN(ht->h_length); + desired_size += addr_size * ALIGN(ht->h_length); desired_size += ALIGNBYTES + (addr_size + 1) * sizeof(char *); } - if (desired_size > *buffer_size) { - /* this assignment is here for future use */ + if (desired_size > *buffer_size) { *buffer_size = desired_size; + TRACE_OUT(hostent_marshal_func); return (NS_RETURN); } @@ -147,6 +151,7 @@ if (desired_size > *buffer_size) { /* this assignment is here for future use */ *buffer_size = desired_size; + TRACE_OUT(addrinfo_marshal_func); return (NS_RETURN); } @@ -342,8 +347,13 @@ case GETIPNODEBYXXX_LOOKUP: switch (lookup_type) { case nss_lt_name: + TRACE_STR(hostname); + TRACE_INT(type); ht_result = getipnodebyname(hostname, type, - AI_DEFAULT, &res); + AI_ADDRCONFIG | AI_V4MAPPED, &res); + TRACE_INT(res); + TRACE_STR(hstrerror(res)); + TRACE_PTR(ht_result); break; case nss_lt_id: ht_result = getipnodebyaddr(addr, len, type, &res); ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/hosts.h#3 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/passwd.c#3 (text+ko) ==== @@ -34,6 +34,12 @@ #include "../debug.h" #include "passwd.h" +static int passwd_marshal_func(struct passwd *, char *, size_t *); +static int passwd_lookup_func(const char *, size_t, char **, size_t *); +static void *passwd_mp_init_func(); +static int passwd_mp_lookup_func(char **, size_t *, void *); +static void passwd_mp_destroy_func(void *mdata); + static int passwd_marshal_func(struct passwd *pwd, char *buffer, size_t *buffer_size) { ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/passwd.h#3 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/services.c#3 (text+ko) ==== @@ -35,6 +35,12 @@ #include "../debug.h" #include "services.h" +static int services_marshal_func(struct servent *, char *, size_t *); +static int services_lookup_func(const char *, size_t, char **, size_t *); +static void *services_mp_init_func(); +static int services_mp_lookup_func(char **, size_t *, void *); +static void services_mp_destroy_func(void *); + static int services_marshal_func(struct servent *serv, char *buffer, size_t *buffer_size) { @@ -63,9 +69,9 @@ (aliases_size + 1); } - if (*buffer_size < desired_size) { - /* this assignment is here for future use */ + if (*buffer_size < desired_size) { *buffer_size = desired_size; + TRACE_OUT(services_marshal_func); return (NS_RETURN); } ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/services.h#3 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cached.8#7 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cached.c#7 (text+ko) ==== @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -135,7 +136,7 @@ asprintf(&pid_string,"%u",getpid()); assert(pid_string != NULL); - fwrite(pid_string,strlen(pid_string),1,pidfile); + fwrite(pid_string,strlen(pid_string), 1, pidfile); free(pid_string); fclose(pidfile); @@ -146,7 +147,7 @@ print_version_info(void) { TRACE_IN(print_version_info); - printf("cached v0.1 (19 Aug 2005)\nwas developed during SoC 2005\n"); + printf("cached v0.2 (19 Aug 2005)\nwas developed during SoC 2005\n"); TRACE_OUT(print_version_info); } @@ -276,9 +277,9 @@ struct query_state *qstate; struct sockaddr addr; - socklen_t addr_len; - int fd; - int res; + socklen_t addr_len; + int fd; + int res; uid_t euid; gid_t egid; @@ -324,10 +325,10 @@ struct kevent eventlist[2]; struct timeval query_timeout; struct timespec kevent_timeout; - int nevents; - int eof_res, res; - ssize_t io_res; - struct query_state *qstate; + int nevents; + int eof_res, res; + ssize_t io_res; + struct query_state *qstate; TRACE_IN(process_socket_event); eof_res = event_data->flags & EV_EOF ? 1 : 0; @@ -564,9 +565,17 @@ processing_thread(void *data) { struct processing_thread_args *args; + sigset_t new; - TRACE_MSG("=> processing_thread"); + TRACE_MSG("=> processing_thread"); args = (struct processing_thread_args *)data; + + sigemptyset(&new); + sigaddset(&new, SIGPIPE); + if (pthread_sigmask(SIG_BLOCK, &new, NULL) != 0) + LOG_ERR_1("processing thread", + "thread can't block the SIGPIPE signal"); + processing_loop(args->the_cache, args->the_runtime_env, args->the_configuration); free(args); @@ -633,7 +642,10 @@ if (trace_mode_enabled == 1) TRACE_ON(); - + + /* blocking the main thread from receiving SIGPIPE signal */ + sigblock(sigmask(SIGPIPE)); + /* daemonization */ if (do_not_daemonize == 0) { res = daemon(0, trace_mode_enabled == 0 ? 0 : 1); @@ -659,7 +671,14 @@ register_agent(s_agent_table, init_group_mp_agent()); register_agent(s_agent_table, init_services_agent()); register_agent(s_agent_table, init_services_mp_agent()); - register_agent(s_agent_table, init_hosts_agent()); + + /* + * Hosts agent can't work properly until we have access to the + * appropriate dtab structures, which are used in nsdispatch + * calls + * + register_agent(s_agent_table, init_hosts_agent()); + */ /* configuration initialization */ s_configuration = init_configuration(); ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cached.conf#7 (text+ko) ==== @@ -1,168 +1,10 @@ -socket_path = "/var/run/cached" -pidfile_path = "/var/run/cached.pid" -threads = 8 +# +# Default caching daemon configuration file +# -entry "passwd" { - type = common - policy = lru - max_lifetime = 43200 - max_elemsize = 10000 -} - -entry "passwd" { - type = common - policy = lru - max_lifetime = 43200 - max_elemsize = 10000 - euid = 0 -} - -entry "passwd_mp" { - type = multipart - max_lifetime = 43200 - max_elemsize = 5000 - timeout = 60 -} - -entry "passwd_mp" { - type = multipart - max_lifetime = 43200 - max_elemsize = 5000 - timeout = 60 - euid = 0 -} - -entry "group" { - type = common - policy = lru - max_lifetime = 43200 - max_elemsize = 10000 -} - -entry "group" { - type = common - policy = lru - max_lifetime = 43200 - max_elemsize = 10000 - euid = 0 -} - -entry "group_mp" { - type = multipart - max_lifetime = 43200 - max_elemsize = 5000 - timeout = 60 -} - -entry "group_mp" { - type = multipart - max_lifetime = 43200 - max_elemsize = 5000 - timeout = 60 - euid = 0 -} - -entry "services" { - type = common - policy = lru - max_lifetime = 43200 - max_elemsize = 10000 -} - -entry "services" { - type = common - policy = lru - max_lifetime = 43200 - max_elemsize = 10000 - euid = 0 -} - -entry "services_mp" { - type = multipart - max_lifetime = 43200 - max_elemsize = 5000 - timeout = 60 -} - -entry "services_mp" { - type = multipart - max_lifetime = 43200 - max_elemsize = 5000 - timeout = 60 - euid = 0 -} - -entry "protocols" { - type = common - policy = lru - max_lifetime = 43200 - max_elemsize = 10000 -} - -entry "protocols" { - type = common - policy = lru - max_lifetime = 43200 - max_elemsize = 10000 - euid = 0 -} - -entry "protocols_mp" { - type = multipart - max_lifetime = 43200 - max_elemsize = 5000 - timeout = 60 -} - -entry "protocols_mp" { - type = multipart - max_lifetime = 43200 - max_elemsize = 5000 - timeout = 60 - euid = 0 -} - -entry "rpc" { - type = common - policy = lru - max_lifetime = 43200 - max_elemsize = 10000 -} - -entry "rpc" { - type = common - policy = lru - max_lifetime = 43200 - max_elemsize = 10000 - euid = 0 -} - -entry "rpc_mp" { - type = multipart - max_lifetime = 43200 - max_elemsize = 5000 - timeout = 60 -} - -entry "rpc_mp" { - type = multipart - max_lifetime = 43200 - max_elemsize = 5000 - timeout = 60 - euid = 0 -} - -entry "hosts" { - type = common - policy = lru - max_lifetime = 43200 - max_elemsize = 10000 -} - -entry "hosts" { - type = common - policy = lru - max_lifetime = 43200 - max_elemsize = 10000 - euid = 0 -} +enable-cache passwd yes +enable-cache group yes +enable-cache hosts yes +enable-cache services yes +enable-cache protocols yes +enable-cache rpc yes ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cached.conf.5#7 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cachelib.c#7 (text+ko) ==== @@ -500,7 +500,7 @@ memcpy(&new_common_entry->common_params, params, sizeof(struct common_cache_entry_params)); new_common_entry->params = - (struct cache_entry_params *)&new_common_entry->common_params; + (struct cache_entry_params *)&new_common_entry->common_params; new_common_entry->common_params.entry_name = (char *)malloc( entry_name_size+1); @@ -509,7 +509,8 @@ entry_name_size + 1); strncpy(new_common_entry->common_params.entry_name, params->entry_name, entry_name_size); - new_common_entry->name = new_common_entry->common_params.entry_name; + new_common_entry->name = + new_common_entry->common_params.entry_name; TRACE_STR(new_common_entry->name); TRACE_POINT(); @@ -547,7 +548,8 @@ } } - new_common_entry->get_time_func = the_cache->params.get_time_func; + new_common_entry->get_time_func = + the_cache->params.get_time_func; the_cache->entries[the_cache->entries_size++] = (struct cache_entry_ *)new_common_entry; break; @@ -785,7 +787,8 @@ if (common_entry->policies_size > 1) { TRACE_POINT(); - connected_policy_item = common_entry->policies[1]->create_item_func(); + connected_policy_item = + common_entry->policies[1]->create_item_func(); memcpy(&connected_policy_item->creation_time, &policy_item->creation_time, sizeof(struct timeval)); ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cachelib.h#7 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cacheplcs.c#7 (text+ko) ==== @@ -192,10 +192,14 @@ retval->parent_data.add_item_func = cache_queue_policy_add_item; retval->parent_data.remove_item_func = cache_queue_policy_remove_item; - retval->parent_data.get_first_item_func = cache_queue_policy_get_first_item; - retval->parent_data.get_last_item_func = cache_queue_policy_get_last_item; - retval->parent_data.get_next_item_func = cache_queue_policy_get_next_item; - retval->parent_data.get_prev_item_func = cache_queue_policy_get_prev_item; + retval->parent_data.get_first_item_func = + cache_queue_policy_get_first_item; + retval->parent_data.get_last_item_func = + cache_queue_policy_get_last_item; + retval->parent_data.get_next_item_func = + cache_queue_policy_get_next_item; + retval->parent_data.get_prev_item_func = + cache_queue_policy_get_prev_item; TAILQ_INIT(&retval->head); TRACE_OUT(init_cache_queue_policy); @@ -361,7 +365,8 @@ TRACE_INT(lfu_item->frequency); TRACE_INT(index); - TAILQ_REMOVE(&(lfu_policy->groups[lfu_item->frequency]), lfu_item, entries); + TAILQ_REMOVE(&(lfu_policy->groups[lfu_item->frequency]), lfu_item, + entries); lfu_item->frequency = index; TAILQ_INSERT_HEAD(&(lfu_policy->groups[index]), lfu_item, entries); @@ -379,7 +384,8 @@ lfu_policy = (struct cache_lfu_policy_ *)policy; lfu_item = (struct cache_lfu_policy_item_ *)item; - TAILQ_REMOVE(&(lfu_policy->groups[lfu_item->frequency]), lfu_item, entries); + TAILQ_REMOVE(&(lfu_policy->groups[lfu_item->frequency]), lfu_item, + entries); TRACE_OUT(cache_lfu_policy_remove_item); } @@ -442,22 +448,9 @@ TRACE_INT(((struct cache_lfu_policy_item_ *)item)->frequency); for (i = ((struct cache_lfu_policy_item_ *)item)->frequency + 1; i < CACHELIB_MAX_FREQUENCY; ++i) { - TRACE_PTR(&(lfu_policy->groups[i])); if (!TAILQ_EMPTY(&(lfu_policy->groups[i]))) { - TRACE_POINT(); - lfu_item = TAILQ_FIRST(&(lfu_policy->groups[i])); - for (; lfu_item != NULL; lfu_item=TAILQ_NEXT(lfu_item,entries)) { - TRACE_INT(lfu_item->frequency); - TRACE_POINT(); - } - - TRACE_POINT(); - lfu_item = TAILQ_FIRST(&(lfu_policy->groups[i])); - TRACE_INT(i); - lfu_item = TAILQ_FIRST(&(lfu_policy->groups[i])); - TRACE_INT(lfu_item->frequency); - TRACE_PTR(lfu_item); - break; + lfu_item = TAILQ_FIRST(&(lfu_policy->groups[i])); + break; } } } @@ -512,10 +505,14 @@ retval->parent_data.update_item_func = cache_lfu_policy_update_item; retval->parent_data.remove_item_func = cache_lfu_policy_remove_item; - retval->parent_data.get_first_item_func = cache_lfu_policy_get_first_item; - retval->parent_data.get_last_item_func = cache_lfu_policy_get_last_item; - retval->parent_data.get_next_item_func = cache_lfu_policy_get_next_item; - retval->parent_data.get_prev_item_func = cache_lfu_policy_get_prev_item; + retval->parent_data.get_first_item_func = + cache_lfu_policy_get_first_item; + retval->parent_data.get_last_item_func = + cache_lfu_policy_get_last_item; + retval->parent_data.get_next_item_func = + cache_lfu_policy_get_next_item; + retval->parent_data.get_prev_item_func = + cache_lfu_policy_get_prev_item; for (i = 0; i < CACHELIB_MAX_FREQUENCY; ++i) TAILQ_INIT(&(retval->groups[i])); @@ -536,7 +533,8 @@ for (i = 0; i < CACHELIB_MAX_FREQUENCY; ++i) { while (!TAILQ_EMPTY(&(lfu_policy->groups[i]))) { lfu_item = TAILQ_FIRST(&(lfu_policy->groups[i])); - TAILQ_REMOVE(&(lfu_policy->groups[i]), lfu_item, entries); + TAILQ_REMOVE(&(lfu_policy->groups[i]), lfu_item, + entries); cache_lfu_policy_destroy_item( (struct cache_policy_item_ *)lfu_item); } ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cacheplcs.h#7 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/config.c#7 (text+ko) ==== @@ -65,29 +65,6 @@ static int configuration_entry_cmp(const void *e1, const void *e2) { -/* struct configuration_entry *entry1; - struct configuration_entry *entry2; - int res; - - entry1 = *((struct configuration_entry **)e1); - entry2 = *((struct configuration_entry **)e2); - - res = strcmp(entry1->name, entry2->name); - if (res == 0) { - if ((entry1->use_desired_euid == 0) && - (entry2->use_desired_euid != 0)) - res = -1; - else if ((entry1->use_desired_euid != 0) && - (entry2->use_desired_euid == 0)) - res = 1; - else if ((entry1->use_desired_euid != 0) && - (entry2->use_desired_euid != 0)) - res = entry1->desired_euid - entry2->desired_euid; - else - res = 0; - } - - return (res);*/ return (strcmp((const char *)e1, (*((struct configuration_entry **)e2))->name )); @@ -184,67 +161,6 @@ TRACE_OUT(create_configuration_entry); return (retval); -/* switch (params->entry_type) { - case CET_COMMON: - size = sizeof(struct common_cache_entry_params); - break; - case CET_MULTIPART: - size = sizeof(struct mp_cache_entry_params); - break; - default: - assert(0); - TRACE_OUT(create_configuration_entry); - return (NULL); - } - - res = pthread_mutexattr_init(&attr); - if (res != 0) { - TRACE_INT(res); - TRACE_OUT(create_configuration_entry); - return (NULL); - } - pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL); - - retval = (struct configuration_entry *)malloc( - sizeof(struct configuration_entry)); - assert(retval != NULL); - memset(retval, 0, sizeof(struct configuration_entry)); - - res = pthread_mutex_init(&retval->lock, &attr); - if (res != 0) { - free(retval); - pthread_mutexattr_destroy(&attr); - TRACE_OUT(create_configuration_entry); - return (NULL); - } - pthread_mutexattr_destroy(&attr); - - retval->c_params = (struct cache_entry_params *)malloc(size); - assert(retval->c_params != NULL); - memcpy(retval->c_params, params, size); - - size = strlen(name); - retval->name = (char *)malloc(size + 1); - assert(retval->name != NULL); - memset(retval->name, 0, size + 1); - strncpy(retval->name, name, size); - - if (use_desired_euid == 0) - retval->c_params->entry_name = retval->name; - else { - asprintf(&retval->c_params->entry_name, "%s_%d", - name, desired_euid); - assert(retval->c_params->entry_name != NULL); - TRACE_STR(name); - TRACE_STR(retval->c_params->entry_name); - } - - retval->desired_euid = desired_euid; - retval->use_desired_euid = use_desired_euid; - memcpy(&retval->query_timeout, timeout, sizeof(struct timeval)); - - TRACE_OUT(create_configuration_entry); - return (retval);*/ } struct configuration_entry * @@ -350,287 +266,6 @@ return (0); } -/*static int -process_root_parser_pair(struct configuration *config, - struct parser_pair_ *pair, char const **error_str, int *error_line) -{ - char *endp; - long l; - size_t size; - int res; - - TRACE_IN(process_root_parser_pair); - assert(config != NULL); - assert(pair != NULL); - - res = 0; - if (strcmp(pair->key, "socket_path") == 0) { - free(config->socket_path); - - size = strlen(pair->value); - config->socket_path = (char *)malloc(size + 1); - memset(config->socket_path, 0, size + 1); - strncpy(config->socket_path, pair->value, size); - } else if (strcmp(pair->key, "pidfile_path") == 0) { - free(config->pidfile_path); - - size = strlen(pair->value); - config->pidfile_path = (char *)malloc(size + 1); - memset(config->pidfile_path, 0, size + 1); - strncpy(config->pidfile_path, pair->value, size); - } else if (strcmp(pair->key, "query_timeout") == 0) { - l = strtol(pair->value, &endp, 10); - if ((*endp == '\0') && (l >= 0)) - config->query_timeout = l; - else { - *error_str = "query timeout must be a positive integer"; - *error_line = pair->fline; - res = -1; - } - } else if (strcmp(pair->key, "threads") == 0) { - l = strtol(pair->value, &endp, 10); - if ((*endp == '\0') && (l >= 1) && (l <= 32)) - config->threads_num = l; - else { - *error_str = "threads number must be a " - "positive integer between 1 and 32 (inclusive)"; - *error_line = pair->fline; - res = -1; - } - } else { - *error_str = "unknown parameter"; - *error_line = pair->fline; - res = -1; - } - - TRACE_OUT(process_root_parser_pair); - return (res); -} - -static int -process_parser_common_group_pair(struct common_cache_entry_params *params, - struct parser_pair_ *pair, char const **error_str, int *error_line) -{ - char *endp; - long l; - int res; - - TRACE_IN(process_parser_common_group_pair); - res = 0; - if (strcmp(pair->key, "policy") == 0) { - if (strcmp(pair->value, "fifo") == 0) { - params->policy = CPT_FIFO; - } else if (strcmp(pair->value, "lru") == 0) { - params->policy = CPT_LRU; - } else if (strcmp(pair->value, "lfu") == 0) { - params->policy = CPT_LFU; - } else { - *error_str = "policy must be one of " - "'fifo', 'lru' or 'lfu' values"; - *error_line = pair->fline; - res = -1; - } - } else if (strcmp(pair->key, "max_lifetime") == 0) { - l = strtol(pair->value, &endp, 10); - if ((*endp == '\0') && (l >= 0)) { - params->max_lifetime.tv_sec = l; - } else { - *error_str = "max_lifetime must be a positive integer"; - *error_line = pair->fline; - res = -1; - } - } else if (strcmp(pair->key, "max_elemsize") == 0) { - l = strtol(pair->value, &endp, 10); - if ((*endp == '\0') && (l >= 0)) { - params->max_elemsize = l; - } else { - *error_str = "max_elemsize must be a positive integer"; - *error_line = pair->fline; - res = -1; - } - } else { - *error_str = "unexpected parameter"; - *error_line = pair->fline; - res = -1; - } - - TRACE_OUT(process_parser_common_group_pair); - return (res); -} - -static int -process_parser_mp_group_pair(struct mp_cache_entry_params *params, - struct parser_pair_ *pair, char const **error_str, int *error_line) -{ - char *endp; - long l; - int res; - - TRACE_IN(process_parser_mp_group_pair); - res = 0; - if (strcmp(pair->key, "max_sessions") == 0) { - l = strtol(pair->value, &endp, 10); - if ((*endp == '\0') && (l >= 0)) { - params->max_sessions = l; - } else { - *error_str = "max_sessions must be a positive integer"; - *error_line = pair->fline; - res = -1; - } - } else if (strcmp(pair->key, "max_lifetime") == 0) { - l = strtol(pair->value, &endp, 10); - if ((*endp == '\0') && (l >= 0)) { - params->max_lifetime.tv_sec = l; - } else { - *error_str = "max_lifetime must be a positive integer"; - *error_line = pair->fline; - res = -1; - } - } else if (strcmp(pair->key, "max_elemsize") == 0) { - l = strtol(pair->value, &endp, 10); - if ((*endp == '\0') && (l >= 0)) { - params->max_elemsize = l; - } else { - *error_str = "max_elemsize must be a positive integer"; - *error_line = pair->fline; - res = -1; - } - } else { - *error_str = "unexpected parameter"; - *error_line = pair->fline; - res = -1; - } - - TRACE_OUT(process_parser_mp_group_pair); - return (res); -} - -static int -process_parser_group(struct configuration *config, struct parser_group_ *group, - char const **error_str, int *error_line) -{ - char *endp; - long l; - - struct configuration_entry *config_entry; - struct cache_entry_params *params; - uid_t desired_euid; - int use_desired_euid; - struct timeval timeout; - - struct parser_pair_ *pair; - size_t size, i; - int res; - - TRACE_IN(process_parser_group); - assert(config != NULL); - assert(group != NULL); - - res = 0; - params = NULL; - desired_euid = -1; - use_desired_euid = 0; - memset(&timeout, 0, sizeof(struct timeval)); - size = parser_group_get_pairs_size(group); - if (size >= 1) { - pair = parser_group_get_pair(group, 0); - if (strcmp(pair->key, "type") == 0) { - TRACE_STR(pair->value); - if (strcmp(pair->value, "common") == 0) { - params = (struct cache_entry_params *)malloc( - sizeof(struct common_cache_entry_params)); - assert(params != NULL); - memset(params, 0, - sizeof(struct common_cache_entry_params)); - - params->entry_type = CET_COMMON; - } else if (strcmp(pair->value, "multipart") == 0) { - params = (struct cache_entry_params *)malloc( - sizeof(struct mp_cache_entry_params)); - assert(params != NULL); - memset(params, 0, - sizeof(struct mp_cache_entry_params)); - - params->entry_type = CET_MULTIPART; - } else { - *error_str = "entry type must be one of 'common'" - "and 'multipart' values"; - *error_line = pair->fline; - res = -1; - goto fin; - } - } else { - *error_str = "'type' parameter expected"; - *error_line = pair->fline; - res = -1; - goto fin; - } - - for (i = 1; i < size; ++i) { - pair = parser_group_get_pair(group, i); - if (params->entry_type == CET_COMMON) { - res = process_parser_common_group_pair( - (struct common_cache_entry_params *)params, - pair, error_str, error_line); - } else { - res = process_parser_mp_group_pair( - (struct mp_cache_entry_params *)params, - pair, error_str, - error_line); - } - - if (res != 0) { - if (strcmp(pair->key, "euid") == 0) { - l = strtol(pair->value, &endp, 10); - if ((*endp == '\0') && (l >= 0)) { - desired_euid = l; - use_desired_euid = 1; - } else { - TRACE_STR(pair->value); - *error_str = "euid parameter " - "must be a positive integer"; - *error_line = pair->fline; - res = -1; - goto fin; - } - } else if (strcmp(pair->key, "timeout") == 0) { - l = strtol(pair->value, &endp, 10); - if ((*endp == '\0') && (l >= 0)) { - timeout.tv_sec = l; - timeout.tv_usec = 0; - } else { - *error_str = "timeout must be a" - " positive integer"; - *error_line = pair->fline; - res = -1; - goto fin; - } - } else - goto fin; - } - } - - config_entry = create_configuration_entry(group->name, - desired_euid, use_desired_euid, &timeout, params); - res = add_configuration_entry(config, config_entry); - if (res != 0) { - destroy_configuration_entry(config_entry); - *error_str = "duplicate entry"; - *error_line = group->fline; - } - } else { - *error_str = "at least entry type ('common' or 'multipart')" - "must be specified"; - *error_line = group->fline; - res = -1; - } - -fin: - free(params); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Oct 4 12:14:17 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E9D2216A421; Tue, 4 Oct 2005 12:14:16 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BED1916A41F for ; Tue, 4 Oct 2005 12:14:16 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8641043D48 for ; Tue, 4 Oct 2005 12:14:16 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j94CEG02091192 for ; Tue, 4 Oct 2005 12:14:16 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j94CEG3G091189 for perforce@freebsd.org; Tue, 4 Oct 2005 12:14:16 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 4 Oct 2005 12:14:16 GMT Message-Id: <200510041214.j94CEG3G091189@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 84781 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2005 12:14:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=84781 Change 84781 by rwatson@rwatson_peppercorn on 2005/10/04 12:13:31 Staticize kau_{open,write,close}() since they are only used in kern_bsm_audit.c. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_private.h#6 edit .. //depot/projects/trustedbsd/audit3/sys/security/audit/kern_bsm_audit.c#16 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_private.h#6 (text+ko) ==== @@ -211,10 +211,6 @@ /* * Kernel versions of the libbsm audit record functions. */ -struct au_record *kau_open(void); -int kau_write(struct au_record *rec, token_t *m); -void kau_close(struct au_record *rec, - struct timespec *endtime, short event); void kau_free(struct au_record *rec); void kau_init(void); ==== //depot/projects/trustedbsd/audit3/sys/security/audit/kern_bsm_audit.c#16 (text+ko) ==== @@ -84,7 +84,7 @@ * memory allocated above and also the list of tokens associated * with this record */ -struct au_record * +static struct au_record * kau_open(void) { struct au_record *rec = NULL; @@ -131,7 +131,8 @@ * Store the token with the record descriptor * */ -int kau_write(struct au_record *rec, struct au_token *tok) +static int +kau_write(struct au_record *rec, struct au_token *tok) { if(tok == NULL) { return -1; /* Invalid Token */ @@ -153,7 +154,7 @@ * Close out the audit record by adding the header token, identifying * any missing tokens. Write out the tokens to the record memory. */ -void +static void kau_close(struct au_record *rec, struct timespec *ctime, short event) { u_char *dptr; From owner-p4-projects@FreeBSD.ORG Tue Oct 4 13:09:34 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 02D0316A422; Tue, 4 Oct 2005 13:09:33 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 862F616A426 for ; Tue, 4 Oct 2005 13:09:32 +0000 (GMT) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B21B43D66 for ; Tue, 4 Oct 2005 13:09:25 +0000 (GMT) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j94D9PSB000807 for ; Tue, 4 Oct 2005 13:09:25 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j94D9OdM000804 for perforce@freebsd.org; Tue, 4 Oct 2005 13:09:24 GMT (envelope-from cognet@freebsd.org) Date: Tue, 4 Oct 2005 13:09:24 GMT Message-Id: <200510041309.j94D9OdM000804@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 84784 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2005 13:09:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=84784 Change 84784 by cognet@cognet on 2005/10/04 13:09:14 IFC Affected files ... .. //depot/projects/superpages/doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#3 integrate .. //depot/projects/superpages/doc/en_US.ISO8859-1/articles/contributors/contrib.committers.sgml#2 integrate .. //depot/projects/superpages/doc/en_US.ISO8859-1/books/handbook/pgpkeys/chapter.sgml#2 integrate .. //depot/projects/superpages/doc/en_US.ISO8859-1/books/handbook/ports/chapter.sgml#2 integrate .. //depot/projects/superpages/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml#2 integrate .. //depot/projects/superpages/doc/en_US.ISO8859-1/share/sgml/authors.ent#2 integrate .. //depot/projects/superpages/doc/fr_FR.ISO8859-1/books/handbook/ports/chapter.sgml#2 integrate .. //depot/projects/superpages/doc/ru_RU.KOI8-R/articles/problem-reports/article.sgml#2 integrate .. //depot/projects/superpages/doc/share/pgpkeys/bvs.key#1 branch .. //depot/projects/superpages/doc/share/pgpkeys/ehaupt.key#1 branch .. //depot/projects/superpages/doc/share/pgpkeys/pgpkeys.ent#2 integrate .. //depot/projects/superpages/doc/share/sgml/man-refs.ent#2 integrate .. //depot/projects/superpages/src/contrib/pf/man/pfsync.4#2 integrate .. //depot/projects/superpages/src/contrib/smbfs/include/netsmb/nb_lib.h#2 integrate .. //depot/projects/superpages/src/contrib/smbfs/include/netsmb/smb_lib.h#2 integrate .. //depot/projects/superpages/src/contrib/smbfs/lib/smb/ctx.c#2 integrate .. //depot/projects/superpages/src/contrib/smbfs/lib/smb/nb.c#2 integrate .. //depot/projects/superpages/src/contrib/smbfs/lib/smb/nb_net.c#2 integrate .. //depot/projects/superpages/src/contrib/smbfs/lib/smb/nbns_rq.c#2 integrate .. //depot/projects/superpages/src/contrib/smbfs/mount_smbfs/mount_smbfs.8#2 integrate .. //depot/projects/superpages/src/etc/defaults/rc.conf#2 integrate .. //depot/projects/superpages/src/etc/mtree/BSD.include.dist#2 integrate .. //depot/projects/superpages/src/etc/pccard_ether#2 integrate .. //depot/projects/superpages/src/etc/rc.d/Makefile#2 integrate .. //depot/projects/superpages/src/etc/rc.d/pf#2 integrate .. //depot/projects/superpages/src/etc/rc.d/pflog#2 integrate .. //depot/projects/superpages/src/etc/rc.d/pfsync#1 branch .. //depot/projects/superpages/src/etc/rc.d/ugidfw#2 integrate .. //depot/projects/superpages/src/include/Makefile#2 integrate .. //depot/projects/superpages/src/include/pthread_np.h#2 integrate .. //depot/projects/superpages/src/lib/libc/arm/string/Makefile.inc#2 integrate .. //depot/projects/superpages/src/lib/libc/arm/string/strlen.S#1 branch .. //depot/projects/superpages/src/lib/libkvm/kvm_arm.c#2 integrate .. //depot/projects/superpages/src/lib/libthr/pthread.map#2 integrate .. //depot/projects/superpages/src/lib/libthr/thread/thr_join.c#2 integrate .. //depot/projects/superpages/src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#2 integrate .. //depot/projects/superpages/src/sbin/Makefile#2 integrate .. //depot/projects/superpages/src/sbin/ifconfig/ifvlan.c#2 integrate .. //depot/projects/superpages/src/sbin/mount_cd9660/mount_cd9660.8#2 integrate .. //depot/projects/superpages/src/sbin/route/route.8#2 integrate .. //depot/projects/superpages/src/sbin/savecore/savecore.c#2 integrate .. //depot/projects/superpages/src/share/man/man4/Makefile#2 integrate .. //depot/projects/superpages/src/share/man/man4/lmc.4#1 branch .. //depot/projects/superpages/src/share/man/man4/polling.4#2 integrate .. //depot/projects/superpages/src/share/man/man5/rc.conf.5#2 integrate .. //depot/projects/superpages/src/sys/arm/arm/bcopyinout.S#2 integrate .. //depot/projects/superpages/src/sys/arm/arm/bcopyinout_xscale.S#2 integrate .. //depot/projects/superpages/src/sys/arm/arm/busdma_machdep.c#2 integrate .. //depot/projects/superpages/src/sys/arm/arm/dump_machdep.c#2 integrate .. //depot/projects/superpages/src/sys/arm/arm/elf_trampoline.c#1 branch .. //depot/projects/superpages/src/sys/arm/arm/in_cksum.c#2 integrate .. //depot/projects/superpages/src/sys/arm/arm/in_cksum_arm.S#2 integrate .. //depot/projects/superpages/src/sys/arm/arm/inckern.S#1 branch .. //depot/projects/superpages/src/sys/arm/arm/intr.c#2 integrate .. //depot/projects/superpages/src/sys/arm/arm/locore.S#2 integrate .. //depot/projects/superpages/src/sys/arm/arm/machdep.c#2 integrate .. //depot/projects/superpages/src/sys/arm/arm/mem.c#2 integrate .. //depot/projects/superpages/src/sys/arm/arm/pmap.c#2 integrate .. //depot/projects/superpages/src/sys/arm/arm/support.S#2 integrate .. //depot/projects/superpages/src/sys/arm/arm/swtch.S#2 integrate .. //depot/projects/superpages/src/sys/arm/arm/vm_machdep.c#2 integrate .. //depot/projects/superpages/src/sys/arm/conf/IQ31244#2 integrate .. //depot/projects/superpages/src/sys/arm/include/in_cksum.h#2 integrate .. //depot/projects/superpages/src/sys/arm/include/md_var.h#2 integrate .. //depot/projects/superpages/src/sys/arm/include/pmap.h#2 integrate .. //depot/projects/superpages/src/sys/arm/sa11x0/assabet_machdep.c#2 integrate .. //depot/projects/superpages/src/sys/arm/xscale/i80321/files.i80321#2 integrate .. //depot/projects/superpages/src/sys/arm/xscale/i80321/i80321_aau.c#1 branch .. //depot/projects/superpages/src/sys/arm/xscale/i80321/i80321_dma.c#1 branch .. //depot/projects/superpages/src/sys/arm/xscale/i80321/i80321_timer.c#2 integrate .. //depot/projects/superpages/src/sys/arm/xscale/i80321/iq31244_machdep.c#2 integrate .. //depot/projects/superpages/src/sys/arm/xscale/i80321/iq80321.c#2 integrate .. //depot/projects/superpages/src/sys/compat/freebsd32/freebsd32_misc.c#2 integrate .. //depot/projects/superpages/src/sys/conf/Makefile.arm#2 integrate .. //depot/projects/superpages/src/sys/conf/NOTES#3 integrate .. //depot/projects/superpages/src/sys/conf/files#3 integrate .. //depot/projects/superpages/src/sys/ddb/db_command.c#2 integrate .. //depot/projects/superpages/src/sys/ddb/db_output.c#2 integrate .. //depot/projects/superpages/src/sys/dev/lge/if_lge.c#2 integrate .. //depot/projects/superpages/src/sys/dev/lge/if_lgereg.h#2 integrate .. //depot/projects/superpages/src/sys/dev/lmc/if_lmc.c#1 branch .. //depot/projects/superpages/src/sys/dev/lmc/if_lmc.h#1 branch .. //depot/projects/superpages/src/sys/dev/sound/pci/es137x.c#2 integrate .. //depot/projects/superpages/src/sys/dev/sound/pcm/ac97.c#2 integrate .. //depot/projects/superpages/src/sys/dev/sound/pcm/ac97.h#2 integrate .. //depot/projects/superpages/src/sys/dev/sound/pcm/ac97_patch.c#2 integrate .. //depot/projects/superpages/src/sys/dev/sound/pcm/ac97_patch.h#2 integrate .. //depot/projects/superpages/src/sys/dev/sound/pcm/channel.c#2 integrate .. //depot/projects/superpages/src/sys/dev/sound/pcm/dsp.c#2 integrate .. //depot/projects/superpages/src/sys/dev/sound/pcm/feeder_volume.c#1 branch .. //depot/projects/superpages/src/sys/dev/sound/pcm/mixer.c#2 integrate .. //depot/projects/superpages/src/sys/dev/sound/pcm/sndstat.c#2 integrate .. //depot/projects/superpages/src/sys/dev/sound/pcm/sound.c#2 integrate .. //depot/projects/superpages/src/sys/dev/sound/pcm/sound.h#2 integrate .. //depot/projects/superpages/src/sys/dev/sound/usb/uaudio_pcm.c#2 integrate .. //depot/projects/superpages/src/sys/dev/txp/if_txpreg.h#2 integrate .. //depot/projects/superpages/src/sys/dev/wi/if_wi.c#3 integrate .. //depot/projects/superpages/src/sys/dev/wi/if_wivar.h#2 integrate .. //depot/projects/superpages/src/sys/kern/kern_cpu.c#2 integrate .. //depot/projects/superpages/src/sys/kern/kern_exec.c#2 integrate .. //depot/projects/superpages/src/sys/kern/kern_lock.c#2 integrate .. //depot/projects/superpages/src/sys/kern/kern_poll.c#2 integrate .. //depot/projects/superpages/src/sys/kern/kern_proc.c#2 integrate .. //depot/projects/superpages/src/sys/modules/Makefile#2 integrate .. //depot/projects/superpages/src/sys/modules/lmc/Makefile#1 branch .. //depot/projects/superpages/src/sys/modules/sound/sound/Makefile#2 integrate .. //depot/projects/superpages/src/sys/net/if.c#2 integrate .. //depot/projects/superpages/src/sys/net/if_bridge.c#2 integrate .. //depot/projects/superpages/src/sys/net/if_vlan.c#2 integrate .. //depot/projects/superpages/src/sys/net/netisr.c#2 integrate .. //depot/projects/superpages/src/sys/netinet/in.c#2 integrate .. //depot/projects/superpages/src/sys/netinet/tcp_subr.c#2 integrate .. //depot/projects/superpages/src/sys/netsmb/netbios.h#2 integrate .. //depot/projects/superpages/src/sys/sys/kerneldump.h#2 integrate .. //depot/projects/superpages/src/sys/sys/mac.h#2 integrate .. //depot/projects/superpages/src/sys/sys/mac_policy.h#2 integrate .. //depot/projects/superpages/src/sys/ufs/ffs/ffs_alloc.c#2 integrate .. //depot/projects/superpages/src/usr.sbin/Makefile#2 integrate .. //depot/projects/superpages/src/usr.sbin/lmcconfig/Makefile#1 branch .. //depot/projects/superpages/src/usr.sbin/lmcconfig/lmcconfig.8#1 branch .. //depot/projects/superpages/src/usr.sbin/lmcconfig/lmcconfig.c#1 branch .. //depot/projects/superpages/www/de/Makefile#2 integrate .. //depot/projects/superpages/www/de/about.sgml#1 branch .. //depot/projects/superpages/www/de/applications.sgml#2 integrate .. //depot/projects/superpages/www/de/availability.sgml#2 integrate .. //depot/projects/superpages/www/de/docs.sgml#2 integrate .. //depot/projects/superpages/www/de/features.sgml#2 integrate .. //depot/projects/superpages/www/de/includes.navabout.sgml#1 branch .. //depot/projects/superpages/www/de/includes.navcommunity.sgml#1 branch .. //depot/projects/superpages/www/de/includes.navdevelopers.sgml#1 branch .. //depot/projects/superpages/www/de/includes.navdocs.sgml#1 branch .. //depot/projects/superpages/www/de/includes.navdownload.sgml#1 branch .. //depot/projects/superpages/www/de/includes.navsupport.sgml#1 branch .. //depot/projects/superpages/www/de/includes.sgml#2 integrate .. //depot/projects/superpages/www/de/includes.xsl#2 integrate .. //depot/projects/superpages/www/de/index.xsl#2 integrate .. //depot/projects/superpages/www/de/internet.sgml#2 integrate .. //depot/projects/superpages/www/de/mailto.sgml#2 integrate .. //depot/projects/superpages/www/de/news/news.sgml#2 integrate .. //depot/projects/superpages/www/de/news/newsflash.xsl#2 integrate .. //depot/projects/superpages/www/de/news/press.xsl#2 integrate .. //depot/projects/superpages/www/de/platforms/alpha.sgml#2 integrate .. //depot/projects/superpages/www/de/platforms/amd64.sgml#2 integrate .. //depot/projects/superpages/www/de/platforms/arm.sgml#2 integrate .. //depot/projects/superpages/www/de/platforms/i386.sgml#2 integrate .. //depot/projects/superpages/www/de/platforms/ia64.sgml#2 integrate .. //depot/projects/superpages/www/de/platforms/ia64/machines.sgml#2 integrate .. //depot/projects/superpages/www/de/platforms/ia64/refs.sgml#2 integrate .. //depot/projects/superpages/www/de/platforms/ia64/todo.xsl#2 integrate .. //depot/projects/superpages/www/de/platforms/index.sgml#2 integrate .. //depot/projects/superpages/www/de/platforms/mips.sgml#2 integrate .. //depot/projects/superpages/www/de/platforms/pc98.sgml#2 integrate .. //depot/projects/superpages/www/de/platforms/ppc.sgml#2 integrate .. //depot/projects/superpages/www/de/platforms/sparc.sgml#2 integrate .. //depot/projects/superpages/www/de/platforms/x86-64.sgml#2 integrate .. //depot/projects/superpages/www/de/projects/newbies.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/4.11R/announce.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/4.11R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/4.11R/installation.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/4.6.2R/announce.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/4.6.2R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/4.7R/announce.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/4.7R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/4.7R/installation.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/4.8R/announce.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/4.8R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/4.8R/installation.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/4.9R/announce.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/4.9R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/4.9R/installation.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/5.0R/announce.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/5.0R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/5.0R/installation.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/5.1R/announce.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/5.1R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/5.1R/installation.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/5.2R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/5.2R/installation.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/5.3R/announce.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/5.3R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/5.3R/installation.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/index.sgml#2 integrate .. //depot/projects/superpages/www/de/releases/snapshots.sgml#2 integrate .. //depot/projects/superpages/www/de/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/de/security/charter.sgml#2 integrate .. //depot/projects/superpages/www/de/security/security.sgml#2 integrate .. //depot/projects/superpages/www/de/support.sgml#2 integrate .. //depot/projects/superpages/www/de/where.sgml#2 integrate .. //depot/projects/superpages/www/en/advocacy/index.sgml#2 integrate .. //depot/projects/superpages/www/en/advocacy/letter.sgml#2 integrate .. //depot/projects/superpages/www/en/advocacy/myths.sgml#2 integrate .. //depot/projects/superpages/www/en/applications.sgml#2 integrate .. //depot/projects/superpages/www/en/availability.sgml#2 integrate .. //depot/projects/superpages/www/en/commercial/consult.xml#2 integrate .. //depot/projects/superpages/www/en/commercial/isp.xml#2 integrate .. //depot/projects/superpages/www/en/community/Makefile#1 branch .. //depot/projects/superpages/www/en/community/irc.sgml#1 branch .. //depot/projects/superpages/www/en/community/mailinglists.sgml#1 branch .. //depot/projects/superpages/www/en/community/newsgroups.sgml#1 branch .. //depot/projects/superpages/www/en/community/webresources.sgml#1 branch .. //depot/projects/superpages/www/en/developers/Makefile#1 branch .. //depot/projects/superpages/www/en/developers/cvs.sgml#1 branch .. //depot/projects/superpages/www/en/docproj/handbook.sgml#2 integrate .. //depot/projects/superpages/www/en/docproj/handbook3.sgml#2 integrate .. //depot/projects/superpages/www/en/docs/Makefile#1 branch .. //depot/projects/superpages/www/en/docs/books.sgml#1 branch .. //depot/projects/superpages/www/en/docs/man.sgml#1 branch .. //depot/projects/superpages/www/en/docs/webresources.sgml#1 branch .. //depot/projects/superpages/www/en/donations/wantlist.sgml#2 integrate .. //depot/projects/superpages/www/en/includes.navabout.sgml#1 branch .. //depot/projects/superpages/www/en/includes.navcommunity.sgml#1 branch .. //depot/projects/superpages/www/en/includes.navdevelopers.sgml#1 branch .. //depot/projects/superpages/www/en/includes.navdocs.sgml#1 branch .. //depot/projects/superpages/www/en/includes.navdownload.sgml#1 branch .. //depot/projects/superpages/www/en/includes.navsupport.sgml#1 branch .. //depot/projects/superpages/www/en/index.xsl#2 integrate .. //depot/projects/superpages/www/en/layout/Makefile#1 branch .. //depot/projects/superpages/www/en/layout/Makefile.inc#1 branch .. //depot/projects/superpages/www/en/layout/css/Makefile#1 branch .. //depot/projects/superpages/www/en/layout/css/fixed.css#1 branch .. //depot/projects/superpages/www/en/layout/css/fixed_large.css#1 branch .. //depot/projects/superpages/www/en/layout/css/global.css#1 branch .. //depot/projects/superpages/www/en/layout/css/iefixes.css#1 branch .. //depot/projects/superpages/www/en/layout/css/layout.css#1 branch .. //depot/projects/superpages/www/en/layout/css/navigation.css#1 branch .. //depot/projects/superpages/www/en/layout/css/table.css#1 branch .. //depot/projects/superpages/www/en/layout/css/text.css#1 branch .. //depot/projects/superpages/www/en/layout/images/Makefile#1 branch .. //depot/projects/superpages/www/en/layout/images/beastie.png#1 branch .. //depot/projects/superpages/www/en/layout/images/blt_gry_arrow.png#1 branch .. //depot/projects/superpages/www/en/layout/images/blt_red_arrow.png#1 branch .. //depot/projects/superpages/www/en/layout/images/front_get_back.png#1 branch .. //depot/projects/superpages/www/en/layout/images/front_get_bl.png#1 branch .. //depot/projects/superpages/www/en/layout/images/front_get_br.png#1 branch .. //depot/projects/superpages/www/en/layout/images/front_get_tl.png#1 branch .. //depot/projects/superpages/www/en/layout/images/front_get_tr.png#1 branch .. //depot/projects/superpages/www/en/layout/images/front_new_back.png#1 branch .. //depot/projects/superpages/www/en/layout/images/front_new_bl.png#1 branch .. //depot/projects/superpages/www/en/layout/images/front_new_br.png#1 branch .. //depot/projects/superpages/www/en/layout/images/front_new_tl.png#1 branch .. //depot/projects/superpages/www/en/layout/images/front_new_tr.png#1 branch .. //depot/projects/superpages/www/en/layout/images/hdr_fill.png#1 branch .. //depot/projects/superpages/www/en/layout/images/ico_rss.png#1 branch .. //depot/projects/superpages/www/en/layout/images/logo.png#1 branch .. //depot/projects/superpages/www/en/layout/images/nav_rgt.png#1 branch .. //depot/projects/superpages/www/en/layout/images/nav_tbl_btm.png#1 branch .. //depot/projects/superpages/www/en/layout/images/nav_tbl_top.png#1 branch .. //depot/projects/superpages/www/en/layout/js/Makefile#1 branch .. //depot/projects/superpages/www/en/layout/js/styleswitcher.js#1 branch .. //depot/projects/superpages/www/en/news/1993/freebsd-coined.sgml#2 integrate .. //depot/projects/superpages/www/en/news/news.xml#2 integrate .. //depot/projects/superpages/www/en/news/newsflash.xsl#2 integrate .. //depot/projects/superpages/www/en/news/press.xsl#2 integrate .. //depot/projects/superpages/www/en/projects/c99/index.sgml#2 integrate .. //depot/projects/superpages/www/en/projects/gnats4/index.sgml#2 integrate .. //depot/projects/superpages/www/en/projects/mips/index.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.1.1R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.10R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.10R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.10R/installation.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.10R/qa.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.10R/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.10R/schedule.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.10R/todo.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.11R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.11R/errata_policy.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.11R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.11R/installation.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.11R/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.11R/schedule.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.11R/todo.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.1R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.2R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.3R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.4R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.4R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.4R/notes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.5R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.5R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.5R/notes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.6.2R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.6.2R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.6.2R/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.6R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.6R/contents.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.6R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.6R/installation.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.6R/qa.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.6R/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.6R/schedule.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.7R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.7R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.7R/installation.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.7R/qa.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.7R/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.7R/schedule.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.8R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.8R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.8R/installation.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.8R/qa.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.8R/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.8R/schedule.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.9R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.9R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.9R/installation.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.9R/qa.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.9R/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.9R/schedule.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/4.9R/todo.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.0R/DP1/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.0R/DP1/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.0R/DP1/installation.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.0R/DP1/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.0R/DP2/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.0R/DP2/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.0R/DP2/installation.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.0R/DP2/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.0R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.0R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.0R/installation.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.0R/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.0R/schedule.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.0R/todo.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.1R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.1R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.1R/installation.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.1R/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.1R/schedule.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.1R/todo.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.2.1R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.2.1R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.2.1R/installation.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.2.1R/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.2R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.2R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.2R/installation.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.2R/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.2R/schedule.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.2R/todo.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.3R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.3R/errata_policy.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.3R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.3R/installation.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.3R/policy.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.3R/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.3R/schedule.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.3R/todo.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.4R/announce.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.4R/errata_policy.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.4R/hardware.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.4R/installation.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.4R/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.4R/schedule.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/5.4R/todo.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/6.0R/schedule.sgml#2 integrate .. //depot/projects/superpages/www/en/releases/6.0R/todo.sgml#2 integrate .. //depot/projects/superpages/www/en/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/en/send-pr.sgml#2 integrate .. //depot/projects/superpages/www/en/support/Makefile#1 branch .. //depot/projects/superpages/www/en/support/bugreports.sgml#1 branch .. //depot/projects/superpages/www/en/support/webresources.sgml#1 branch .. //depot/projects/superpages/www/es/Makefile#2 integrate .. //depot/projects/superpages/www/es/alpha/alpha.sgml#2 integrate .. //depot/projects/superpages/www/es/applications.sgml#2 integrate .. //depot/projects/superpages/www/es/auditors.sgml#2 integrate .. //depot/projects/superpages/www/es/availability.sgml#2 integrate .. //depot/projects/superpages/www/es/copyright/copyright.sgml#2 integrate .. //depot/projects/superpages/www/es/copyright/daemon.sgml#2 integrate .. //depot/projects/superpages/www/es/copyright/freebsd-license.sgml#2 integrate .. //depot/projects/superpages/www/es/copyright/license.sgml#2 integrate .. //depot/projects/superpages/www/es/docproj/current.sgml#2 integrate .. //depot/projects/superpages/www/es/docproj/doc-set.sgml#2 integrate .. //depot/projects/superpages/www/es/docproj/docproj.sgml#2 integrate .. //depot/projects/superpages/www/es/docproj/sgml.sgml#2 integrate .. //depot/projects/superpages/www/es/docproj/submitting.sgml#2 integrate .. //depot/projects/superpages/www/es/docproj/translations.sgml#2 integrate .. //depot/projects/superpages/www/es/docproj/who.sgml#2 integrate .. //depot/projects/superpages/www/es/docs.sgml#2 integrate .. //depot/projects/superpages/www/es/features.sgml#2 integrate .. //depot/projects/superpages/www/es/gnome/contact.sgml#2 integrate .. //depot/projects/superpages/www/es/gnome/docs/bugging.sgml#2 integrate .. //depot/projects/superpages/www/es/gnome/docs/develfaq.sgml#2 integrate .. //depot/projects/superpages/www/es/gnome/docs/faq.sgml#2 integrate .. //depot/projects/superpages/www/es/gnome/docs/faq2.sgml#2 integrate .. //depot/projects/superpages/www/es/gnome/docs/gnome2_porting.sgml#2 integrate .. //depot/projects/superpages/www/es/gnome/docs/gnome_porting.sgml#2 integrate .. //depot/projects/superpages/www/es/gnome/docs/knownissues.sgml#2 integrate .. //depot/projects/superpages/www/es/gnome/docs/porting.sgml#2 integrate .. //depot/projects/superpages/www/es/gnome/docs/volunteer.sgml#2 integrate .. //depot/projects/superpages/www/es/gnome/newsflash.xsl#2 integrate .. //depot/projects/superpages/www/es/gnome/screenshots.sgml#2 integrate .. //depot/projects/superpages/www/es/includes.navabout.sgml#1 branch .. //depot/projects/superpages/www/es/includes.navcommunity.sgml#1 branch .. //depot/projects/superpages/www/es/includes.navdevelopers.sgml#1 branch .. //depot/projects/superpages/www/es/includes.navdocs.sgml#1 branch .. //depot/projects/superpages/www/es/includes.navdownload.sgml#1 branch .. //depot/projects/superpages/www/es/includes.navsupport.sgml#1 branch .. //depot/projects/superpages/www/es/includes.sgml#2 integrate .. //depot/projects/superpages/www/es/includes.xsl#2 integrate .. //depot/projects/superpages/www/es/index.sgml#2 integrate .. //depot/projects/superpages/www/es/index.xsl#2 integrate .. //depot/projects/superpages/www/es/internal/about.sgml#2 integrate .. //depot/projects/superpages/www/es/internal/developer.sgml#2 integrate .. //depot/projects/superpages/www/es/internal/homepage.sgml#2 integrate .. //depot/projects/superpages/www/es/internal/internal.sgml#2 integrate .. //depot/projects/superpages/www/es/internal/machines.sgml#2 integrate .. //depot/projects/superpages/www/es/internal/mirror.sgml#2 integrate .. //depot/projects/superpages/www/es/internal/photos.sgml#2 integrate .. //depot/projects/superpages/www/es/internal/statistic.sgml#2 integrate .. //depot/projects/superpages/www/es/internet.sgml#2 integrate .. //depot/projects/superpages/www/es/mailto.sgml#2 integrate .. //depot/projects/superpages/www/es/news/news.sgml#2 integrate .. //depot/projects/superpages/www/es/news/newsflash.sgml#2 integrate .. //depot/projects/superpages/www/es/news/press-rel-1.sgml#2 integrate .. //depot/projects/superpages/www/es/news/press-rel-2.sgml#2 integrate .. //depot/projects/superpages/www/es/news/press-rel-3.sgml#2 integrate .. //depot/projects/superpages/www/es/news/press.sgml#2 integrate .. //depot/projects/superpages/www/es/news/pressreleases.sgml#2 integrate .. //depot/projects/superpages/www/es/news/qnewsletter-1-1.sgml#2 integrate .. //depot/projects/superpages/www/es/news/qnewsletter-1-2.sgml#2 integrate .. //depot/projects/superpages/www/es/news/qnewsletter-1-3.sgml#2 integrate .. //depot/projects/superpages/www/es/news/qnewsletter-1-4.sgml#2 integrate .. //depot/projects/superpages/www/es/news/qnewsletter-1-5.sgml#2 integrate .. //depot/projects/superpages/www/es/news/qnewsletter-1-6.sgml#2 integrate .. //depot/projects/superpages/www/es/news/qnewsletter-1-7.sgml#2 integrate .. //depot/projects/superpages/www/es/news/qnewsletter-2-1.sgml#2 integrate .. //depot/projects/superpages/www/es/news/qnewsletter-2-2.sgml#2 integrate .. //depot/projects/superpages/www/es/news/qnewsletter.sgml#2 integrate .. //depot/projects/superpages/www/es/news/webchanges.sgml#2 integrate .. //depot/projects/superpages/www/es/platforms/alpha.sgml#2 integrate .. //depot/projects/superpages/www/es/platforms/i386.sgml#2 integrate .. //depot/projects/superpages/www/es/platforms/pc98.sgml#2 integrate .. //depot/projects/superpages/www/es/platforms/x86-64.sgml#2 integrate .. //depot/projects/superpages/www/es/ports/portindex#2 integrate .. //depot/projects/superpages/www/es/projects/newbies.sgml#2 integrate .. //depot/projects/superpages/www/es/projects/projects.sgml#2 integrate .. //depot/projects/superpages/www/es/publish.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.0.5R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.0.5R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.0/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.0/credits.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.0/install.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.0/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.1.5R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.1.5R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.1.6R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.1.6R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.1.6R/security.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.1.7R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.1.7R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.1R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.1R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2.1R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2.2R/errata.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2.2R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2.5R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2.5R/errata.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2.5R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2.6R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2.6R/errata.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2.6R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2.7R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2.7R/errata.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2.7R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2.8R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2.8R/errata.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2.8R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2R/install-media.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/2.2R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.0R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.0R/errata.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.0R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.1R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.1R/errata.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.1R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.2R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.2R/errata.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.2R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.3R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.3R/errata.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.3R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.4R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.4R/errata.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.4R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.5R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.5R/errata.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/3.5R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/4.0R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/4.0R/errata.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/4.0R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/4.1.1R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/4.1.1R/errata.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/4.1.1R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/4.1R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/4.1R/errata.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/4.1R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/4.2R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/4.2R/errata.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/4.2R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/4.3R/announce.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/4.3R/errata.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/4.3R/notes.sgml#2 integrate .. //depot/projects/superpages/www/es/releases/snapshots.sgml#2 integrate .. //depot/projects/superpages/www/es/search/index-site.sgml#2 integrate .. //depot/projects/superpages/www/es/search/search-mid.sgml#2 integrate .. //depot/projects/superpages/www/es/search/search.sgml#2 integrate .. //depot/projects/superpages/www/es/search/searchhints.sgml#2 integrate .. //depot/projects/superpages/www/es/security/programmers.sgml#2 integrate .. //depot/projects/superpages/www/es/security/secure.sgml#2 integrate .. //depot/projects/superpages/www/es/security/security.sgml#2 integrate .. //depot/projects/superpages/www/es/send-pr.sgml#2 integrate .. //depot/projects/superpages/www/es/support.sgml#2 integrate .. //depot/projects/superpages/www/es/where.sgml#2 integrate .. //depot/projects/superpages/www/es/y2kbug.sgml#2 integrate .. //depot/projects/superpages/www/fr/relnotes.sgml#2 integrate .. //depot/projects/superpages/www/share/sgml/includes.header.sgml#2 integrate .. //depot/projects/superpages/www/share/sgml/includes.header.xsl#2 integrate .. //depot/projects/superpages/www/share/sgml/includes.misc.xsl#2 integrate .. //depot/projects/superpages/www/share/sgml/includes.navabout.sgml#1 branch .. //depot/projects/superpages/www/share/sgml/includes.navcommunity.sgml#1 branch .. //depot/projects/superpages/www/share/sgml/includes.navdevelopers.sgml#1 branch .. //depot/projects/superpages/www/share/sgml/includes.navdocs.sgml#1 branch .. //depot/projects/superpages/www/share/sgml/includes.navdownload.sgml#1 branch .. //depot/projects/superpages/www/share/sgml/includes.navsupport.sgml#1 branch .. //depot/projects/superpages/www/share/sgml/usergroups.xml#2 integrate Differences ... ==== //depot/projects/superpages/doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#3 (text+ko) ==== @@ -1,4 +1,4 @@ - + + @@ -1336,11 +1336,11 @@ instead by a mailing list. Many, but not all, of these addresses look like - freebsd-listname@FreeBSD.org. Please + freebsd-listname@FreeBSD.org. Please take this into account when phrasing your questions.
    In particular, ports shown as maintained by - freebsd-ports@FreeBSD.org are + freebsd-ports@FreeBSD.org are actually not maintained by anyone. Fixes and support, if any, come from the general community who subscribe to that mailing list. More volunteers are always needed! ==== //depot/projects/superpages/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml#2 (text+ko) ==== @@ -1,7 +1,7 @@ 504102 + 5.4-STABLE after the MFC of if_bridge + 504103 + + 6.0-CURRENT 600000 ==== //depot/projects/superpages/doc/en_US.ISO8859-1/share/sgml/authors.ent#2 (text+ko) ==== @@ -13,7 +13,7 @@ builds for the other languages, and we will poke fun of you in public. - $FreeBSD: doc/en_US.ISO8859-1/share/sgml/authors.ent,v 1.359 2005/09/18 05:37:48 tmclaugh Exp $ + $FreeBSD: doc/en_US.ISO8859-1/share/sgml/authors.ent,v 1.362 2005/10/04 10:06:49 bvs Exp $ --> abial@FreeBSD.org"> @@ -76,6 +76,8 @@ awebster@pubnix.net"> +az@FreeBSD.org"> + babkin@FreeBSD.org"> barner@FreeBSD.org"> @@ -118,6 +120,8 @@ bsd@FreeBSD.org"> +bvs@FreeBSD.org"> + bz@FreeBSD.org"> cawimm@FreeBSD.org"> @@ -250,6 +254,8 @@ edwin@FreeBSD.org"> +ehaupt@FreeBSD.org"> + eik@FreeBSD.org"> eivind@FreeBSD.org"> ==== //depot/projects/superpages/doc/fr_FR.ISO8859-1/books/handbook/ports/chapter.sgml#2 (text+ko) ==== @@ -2,8 +2,8 @@ The FreeBSD Documentation Project The FreeBSD French Documentation Project - $FreeBSD: doc/fr_FR.ISO8859-1/books/handbook/ports/chapter.sgml,v 1.11 2005/08/30 08:53:16 blackend Exp $ - Original revision: 1.243 + $FreeBSD: doc/fr_FR.ISO8859-1/books/handbook/ports/chapter.sgml,v 1.12 2005/10/03 19:28:21 blackend Exp $ + Original revision: 1.247 --> @@ -22,9 +22,9 @@ l'installation d'une application tiers pour effectuer un travail précis. FreeBSD fournit deux technologies complémentaires pour installer des logiciels tiers sur votre système: - le Catalogue des logiciels portés de FreeBSD, et les logiciels - pré-compilés. L'un ou l'autre des systèmes peut - être utilisé pour installer les nouvelles versions de vos + le Catalogue des logiciels portés de FreeBSD (pour une installation à partir des sources), et les logiciels + pré-compilés ou paquetages (pour installer des binaires pré-compilés). N'importe quelle de ce deux méthodes peut + être utilisée pour installer les nouvelles versions de vos applications favorites à partir d'un support local ou directement depuis le réseau.
    @@ -36,7 +36,7 @@ pré-compilés. - Comment compiler des logiciels tiers à partir du catalogue + Comment compiler des logiciels tiers à partir des sources en utilisant le catalogue de logiciels portés. @@ -52,8 +52,7 @@ Comment trouver l'application recherchée. - Comment mettre à jour vos logiciels - portés. + Comment mettre à jour vos applications. @@ -1543,21 +1542,17 @@ certaines choses que vous pouvez faire: - - Corrigez le problème! Le Manuel du développeur - de logiciels portés inclut des informations - détaillées sur l'infrastructure des logiciels - portés vous permettant de corriger le portage - éventuellement défectueux - ou même soumettre le votre! + + Vérifiez s'il n'y a pas de correctif en attente + pour le logiciel porté dans la base des rapports de + bogue. Si c'est le cas, il se peut que vous + puissiez utiliser le correctif proposé. - Rouspétez—par courrier - électronique - uniquement! Envoyez un courrier électronique au - responsable du logiciel porté tout d'abord. Tapez la + Demandez l'aide du responsable du logiciel porté. + Tapez la commande make maintainer ou lisez le fichier Makefile pour trouver l'adresse électronique du responsable. Pensez à @@ -1565,10 +1560,43 @@ version du logiciel porté (envoyer la ligne $FreeBSD: du fichier Makefile) et les messages d'erreurs - quand vous écrivez au responsable. Si vous n'obtenez pas de - réponse du responsable vous pouvez utiliser - &man.send-pr.1; pour soumettre un rapport de - bogue. + quand vous écrivez au responsable. + + + Certains logiciels portés ne sont pas + maintenus par une personne mais par une liste + de diffusion. Plusieurs, si ce n'est toutes, les + adresses de ces listes ressemblent à freebsd-listname@FreeBSD.org. + Veuillez prendre cela en compte en rédigeant vos + questions. + + En particulier, les logiciels portés + apparaissant comme maintenus par freebsd-ports@FreeBSD.org ne sont + en fait maintenus par personne. Correctifs et aide, + s'ils y en a, provient de la communauté qui est + abonnée à cette liste de diffusion. Des + volontaires supplémentaires sont toujours les + bienvenus! + + + Si vous n'obtenez pas de réponse, vous pouvez + utiliser &man.send-pr.1; pour soumettre un rapport de + bogue (consultez Ecrire + des rapports de bogue pour &os;). + + + + Corrigez le problème! Le Manuel du développeur + de logiciels portés inclut des informations + détaillées sur l'infrastructure des logiciels + portés vous permettant de corriger le portage + éventuellement défectueux + ou même soumettre le votre! @@ -1580,8 +1608,8 @@ répertoire packages, - mais vérifiez d'abord votre miroir - local! Il y a globalement plus de chances que cela marche, + mais vérifiez d'abord votre miroir + local! Il y a globalement plus de chances que cela marche, que d'essayez de compiler à partir des sources, et cela va également beaucoup plus vite. Utilisez le programme &man.pkg.add.1; pour installer le logiciel ==== //depot/projects/superpages/doc/ru_RU.KOI8-R/articles/problem-reports/article.sgml#2 (text+ko) ==== @@ -1,25 +1,21 @@ -%man; - -%mailing-lists; - -%trademarks; + +%articles.ent; ]>
    - óÏÓÔÁ×ÌÅÎÉÅ ÓÏÏÂÝÅÎÉÊ Ï ÐÒÏÂÌÅÍÅ ×Ï FreeBSD + óÏÓÔÁ×ÌÅÎÉÅ ÓÏÏÂÝÅÎÉÊ Ï ÐÒÏÂÌÅÍÅ ×Ï &os; - $FreeBSD: doc/ru_RU.KOI8-R/articles/problem-reports/article.sgml,v 1.4 2004/07/16 12:58:39 den Exp $ + $FreeBSD: doc/ru_RU.KOI8-R/articles/problem-reports/article.sgml,v 1.5 2005/10/04 10:09:33 bvs Exp $ &tm-attrib.freebsd; @@ -33,7 +29,7 @@ üÔÁ ÓÔÁÔØÑ ÏÐÉÓÙ×ÁÅÔ, ËÁË ÎÁÉÌÕÞÛÉÍ ÏÂÒÁÚÏÍ ÓÆÏÒÍÕÌÉÒÏ×ÁÔØ É - ÏÔÐÒÁ×ÉÔØ ÓÏÏÂÝÅÎÉÅ Ï ÐÒÏÂÌÅÍÅ × ðÒÏÅËÔ FreeBSD. + ÏÔÐÒÁ×ÉÔØ ÓÏÏÂÝÅÎÉÅ Ï ÐÒÏÂÌÅÍÅ × ðÒÏÅËÔ &os;. @@ -69,7 +65,7 @@ ÒÁÚÒÁÂÏÔÞÉËÁ. èÏÔÑ × ÏÓÎÏ×ÎÏÍ ÓÔÁÔØÑ ÆÏËÕÓÉÒÕÅÔÓÑ ÎÁ ÓÏÏÂÝÅÎÉÑÈ Ï ÐÒÏÂÌÅÍÁÈ ×Ï - FreeBSD, ÂÏÌØÛÅÊ ÞÁÓÔØÀ ÏÎÁ ÄÏÌÖÎÁ ÈÏÒÏÛÏ ÐÏÄÈÏÄÉÔØ É ÄÒÕÇÉÍ ÐÒÏÇÒÁÍÍÎÙÍ + &os;, ÂÏÌØÛÅÊ ÞÁÓÔØÀ ÏÎÁ ÄÏÌÖÎÁ ÈÏÒÏÛÏ ÐÏÄÈÏÄÉÔØ É ÄÒÕÇÉÍ ÐÒÏÇÒÁÍÍÎÙÍ ÐÒÏÅËÔÁÍ. úÁÍÅÔØÔÅ, ÞÔÏ ÜÔÁ ÓÔÁÔØÑ ÏÒÇÁÎÉÚÏ×ÁÎÁ ÐÏ ÔÅÍÁÔÉÞÅÓËÏÍÕ ÐÒÉÎÃÉÐÕ, Á @@ -132,7 +128,10 @@ ÛÁÎÓÏ×, ÞÔÏ ÒÁÚÒÁÂÏÔÞÉËÉ ÓÍÏÇÕÔ ÅÅ ×ÏÓÐÒÏÉÚ×ÅÓÔÉ ÉÌÉ ÐÏÎÑÔØ, ÞÔÏ ÄÅÌÁÅÔÓÑ ÎÅÐÒÁ×ÉÌØÎÏ. üÔÏ ÎÅ ÚÎÁÞÉÔ, ÞÔÏ ÔÁËÏÇÏ ÎÅ ÓÌÕÞÁÅÔÓÑ, ÎÏ ÜÔÏ ÚÎÁÞÉÔ, ÞÔÏ ÛÁÎÓÏ× Õ ×ÁÛÅÇÏ ÓÏÏÂÝÅÎÉÑ ÄÏÊÔÉ ËÏÇÄÁ-ÌÉÂÏ ÄÏ ÓÔÁÄÉÉ ÉÓÐÒÁ×ÌÅÎÉÑ ÏÛÉÂËÉ - ÏÞÅÎØ ÍÁÌÙ, É ×ÁÍ ÌÕÞÛÅ ÅÇÏ ÎÅ ÐÏÓÙÌÁÔØ. + ÏÞÅÎØ ÍÁÌÙ. þÁÓÔÏ ÜÔÉ ×ÉÄÙ ÏÛÉÂÏË ×ÏÚÎÉËÁÀÔ ÉÚ-ÚÁ ÎÅÕÄÏ×ÌÅÔ×ÏÒÉÔÅÌØÎÏÊ + ÒÁÂÏÔÙ Ö£ÓÔËÉÈ ÄÉÓËÏ×, ÐÅÒÅÇÒÅ×ÛÉÈÓÑ ÐÒÏÃÅÓÓÏÒÏ×. ÷ÓÅÇÄÁ, ËÏÇÄÁ ÜÔÏ + ×ÏÚÍÏÖÎÏ ×Ù ÄÏÌÖÎÙ ÏÔÓÌÅÖÉ×ÁÔØ ÔÁËÉÅ ÓÌÕÞÁÉ ÐÅÒÅÄ ÐÏÓÙÌËÏÊ ÓÏÏÂÝÅÎÉÑ Ï + ÏÛÉÂËÅ.
    @@ -144,30 +143,30 @@ ÏÂÓÕÖÄÁÌÁÓØ ÉÌÉ ÏÂÓÕÖÄÁÅÔÓÑ × ÓÐÉÓËÁÈ ÒÁÓÓÙÌËÉ; ÏÎÁ ÍÏÖÅÔ ÂÙÔØ ÕÖÅ ÉÓÐÒÁ×ÌÅÎÁ × ÂÏÌÅÅ ÎÏ×ÏÊ ×ÅÒÓÉÉ, ÞÅÍ ÔÁ, ÞÔÏ ×Ù ÉÓÐÏÌØÚÕÅÔÅ. ðÏÜÔÏÍÕ ×Ù ÄÏÌÖÎÙ ÐÒÏ×ÅÒÉÔØ ×ÓÅ ÏÂÙÞÎÙÅ ÍÅÓÔÁ ÄÏ ÔÏÇÏ, ËÁË ÐÏÓÌÁÔØ ×ÁÛÅ ÓÏÏÂÝÅÎÉÅ Ï - ÐÒÏÂÌÅÍÅ. äÌÑ FreeBSD ÜÔÏ ÚÎÁÞÉÔ: + ÐÒÏÂÌÅÍÅ. äÌÑ &os; ÜÔÏ ÚÎÁÞÉÔ: - FreeBSD - FAQ + &os; + FAQ (ïÔ×ÅÔÙ ÎÁ ÞÁÓÔÏ ÚÁÄÁ×ÁÅÍÙÅ ×ÏÐÒÏÓÙ). FAQ ÓÏÄÅÒÖÉÔ ÏÔ×ÅÔÙ ÎÁ ×ÏÐÒÏÓÙ ÉÚ ÓÁÍÙÈ ÒÁÚÎÙÈ ËÁÔÅÇÏÒÉÊ, × ÞÁÓÔÎÏÓÔÉ, - ÁÐÐÁÒÁÔÎÏÊ + ÁÐÐÁÒÁÔÎÏÊ ÓÏ×ÍÅÓÔÉÍÏÓÔÉ, - ÐÏÌØÚÏ×ÁÔÅÌØÓËÉÈ + ÐÏÌØÚÏ×ÁÔÅÌØÓËÉÈ ÐÒÏÇÒÁÍÍ - É ËÏÎÆÉÇÕÒÁÃÉÉ + É ËÏÎÆÉÇÕÒÁÃÉÉ ÑÄÒÁ. óÐÉÓËÉ + url="&url.books.handbook;/handbook/eresources.html#ERESOURCES-MAIL">óÐÉÓËÉ ÒÁÓÓÙÌËÉ—ÅÓÌÉ ÷Ù ÎÅ ÐÏÄÐÉÓÁÎÙ ÎÁ ÎÉÈ, ×ÏÓÐÏÌØÚÕÊÔÅÓØ ÐÏÉÓËÏÍ - × ÁÒÈÉ×ÁÈ ÎÁ ÓÁÊÔÅ FreeBSD. åÓÌÉ ×ÁÛÁ ÐÒÏÂÌÅÍÁ ÎÅ + url="http://www.FreeBSD.org/search/search.html#mailinglists">ÐÏÉÓËÏÍ + × ÁÒÈÉ×ÁÈ ÎÁ ÓÁÊÔÅ &os;. åÓÌÉ ×ÁÛÁ ÐÒÏÂÌÅÍÁ ÎÅ ÏÂÓÕÖÄÁÌÁÓØ × ÓÐÉÓËÁÈ ÒÁÓÓÙÌËÉ, ×Ù ÍÏÖÅÔÅ ÐÏÐÙÔÁÔØÓÑ ÏÐÕÂÌÉËÏ×ÁÔØ ÓÏÏÂÝÅÎÉÅ Ï ÎÅÊ É ÐÏÄÏÖÄÁÔØ ÎÅÓËÏÌØËÏ ÄÎÅÊ, ÐÏËÁ ËÔÏ-ÎÉÂÕÄØ ÎÅ ÓÍÏÖÅÔ Õ×ÉÄÅÔØ ÔÏ, ÞÔÏ ×Ù ÎÅ ÚÁÍÅÔÉÌÉ. @@ -182,18 +181,32 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Oct 4 13:13:09 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7637B16A421; Tue, 4 Oct 2005 13:13:09 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4010A16A41F for ; Tue, 4 Oct 2005 13:13:09 +0000 (GMT) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7BC143D45 for ; Tue, 4 Oct 2005 13:13:08 +0000 (GMT) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j94DD8pM001121 for ; Tue, 4 Oct 2005 13:13:08 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j94DD8MP001118 for perforce@freebsd.org; Tue, 4 Oct 2005 13:13:08 GMT (envelope-from cognet@freebsd.org) Date: Tue, 4 Oct 2005 13:13:08 GMT Message-Id: <200510041313.j94DD8MP001118@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 84785 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2005 13:13:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=84785 Change 84785 by cognet@cognet on 2005/10/04 13:13:08 Superpages bits for arm. Affected files ... .. //depot/projects/superpages/src/sys/arm/arm/pmap.c#3 edit .. //depot/projects/superpages/src/sys/arm/include/pmap.h#3 edit Differences ... ==== //depot/projects/superpages/src/sys/arm/arm/pmap.c#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* From: $NetBSD: pmap.c,v 1.148 2004/04/03 04:35:48 bsh Exp $ */ +//* From: $NetBSD: pmap.c,v 1.148 2004/04/03 04:35:48 bsh Exp $ */ /*- * Copyright 2004 Olivier Houchard. * Copyright 2003 Wasabi Systems, Inc. @@ -168,6 +168,7 @@ #include #include #include +#include #include #include #include @@ -210,10 +211,16 @@ static int pmap_clearbit(struct vm_page *, u_int); static struct l2_bucket *pmap_get_l2_bucket(pmap_t, vm_offset_t); -static struct l2_bucket *pmap_alloc_l2_bucket(pmap_t, vm_offset_t); +static struct l2_bucket *pmap_alloc_l2_bucket(pmap_t, vm_offset_t, int flags); static void pmap_free_l2_bucket(pmap_t, struct l2_bucket *, u_int); static vm_offset_t kernel_pt_lookup(vm_paddr_t); +static void pmap_promote_small(pmap_t, struct l2_bucket *, + vm_offset_t, reservation_t, int); +static void pmap_promote_large(pmap_t, vm_offset_t va, + reservation_t); +static void pmap_demote(pmap_t, vm_offset_t); + static MALLOC_DEFINE(M_VMPMAP, "pmap", "PMAP L1"); vm_offset_t avail_end; /* PA of last available physical page */ @@ -910,7 +917,7 @@ * the bucket/page in the meantime. */ static struct l2_bucket * -pmap_alloc_l2_bucket(pmap_t pm, vm_offset_t va) +pmap_alloc_l2_bucket(pmap_t pm, vm_offset_t va, int flags) { struct l2_dtable *l2; struct l2_bucket *l2b; @@ -946,7 +953,7 @@ * No L2 page table has been allocated. Chances are, this * is because we just allocated the l2_dtable, above. */ - ptep = (void*)uma_zalloc(l2zone, M_NOWAIT); + ptep = (void*)uma_zalloc(l2zone, flags); l2b->l2b_phys = vtophys(ptep); if (ptep == NULL) { /* @@ -1105,10 +1112,14 @@ */ #ifdef ARM_USE_SMALL_ALLOC pde = &kernel_pmap->pm_l1->l1_kva[L1_IDX(va)]; + if (l1pte_section_p(*pde) && va < 0xd0000000 && va > virtual_avail) + panic("ouin"); if (!l1pte_section_p(*pde)) { #endif l2b = pmap_get_l2_bucket(pmap_kernel(), va); ptep = &l2b->l2b_kva[l2pte_index(va)]; + if ((*ptep & L2_TYPE_MASK) == L2_TYPE_L) + panic("fuxor"); pte = *ptep; if ((pte & L2_S_CACHE_MASK) != pte_l2_s_cache_mode_pt) { @@ -1454,8 +1465,18 @@ pv->pv_flags |= PVF_NC; + if (l1pte_section_p( + pm->pm_l1->l1_kva[L1_IDX(pv->pv_va)])) { + pmap_demote(pv->pv_pmap, pv->pv_va); + pv->pv_flags |= PVF_DEMOTED; + } l2b = pmap_get_l2_bucket(pv->pv_pmap, pv->pv_va); + ptep = &l2b->l2b_kva[l2pte_index(pv->pv_va)]; + if ((*ptep & L2_TYPE_MASK) == L2_TYPE_L) { + pmap_demote(pv->pv_pmap, pv->pv_va); + pv->pv_flags |= PVF_DEMOTED; + } pte = *ptep & ~L2_S_CACHE_MASK; if ((va != pv->pv_va || pm != pv->pv_pmap) && @@ -1509,10 +1530,177 @@ *ptep = pte; PTE_SYNC_CURRENT(pv->pv_pmap, ptep); + if (pv->pv_flags & PVF_DEMOTED) { + pmap_promote_small(pv->pv_pmap, l2b, pv->pv_va, + NULL, 0); + pmap_promote_large(pv->pv_pmap, pv->pv_va, + NULL); + pv->pv_flags &= ~PVF_DEMOTED; + } } } } +/* XXX: misleading, promote_small actually promotes to large pages. */ +static void +pmap_promote_small(pmap_t pmap, struct l2_bucket *l2b, vm_offset_t va, + reservation_t reserv, int off) +{ + int i; + pt_entry_t *ptep; + vm_paddr_t pa0; + + if (!reserv) + return; + ptep = &l2b->l2b_kva[l2pte_index(va & L2_L_FRAME)]; + pa0 = *ptep & L2_L_FRAME; + if ((*ptep & L2_S_FRAME) != pa0) + return; + if (reserv != NULL && ((pa0 - off * PAGE_SIZE) + != VM_PAGE_TO_PHYS(reserv->first_page))) + return; + /* First check it is eligible for promotion. */ + for (i = 1; i < 0x10; i++) { + if (ptep[i] != (ptep[i - 1] + PAGE_SIZE)) { + /* There's no way we can do it. */ + return; + } + if ((ptep[i] & pte_l2_s_cache_mask) == + pte_l2_s_cache_mode_pt || + (ptep[i - 1] & pte_l2_s_cache_mask) == + pte_l2_s_cache_mode_pt) + panic("fuck"); + } +#ifdef SP_DEBUG + printf("promoting small %x\n", va); +#endif + if (*ptep & L2_S_PROT_U) + pa0 |= L2_L_PROT_U; + if (*ptep & L2_S_PROT_W) + pa0 |= L2_L_PROT_W; + /* Let's do it. */ + for (i = 0; i < 0x10; i++) + ptep[i] = pa0 | L2_L_PROTO | + pte_l2_l_cache_mode; + pmap_tlb_flushID(pmap); +} + +static void +pmap_promote_large(pmap_t pmap, vm_offset_t va, reservation_t reserv) +{ + pd_entry_t *pd; + pt_entry_t *pt; + vm_offset_t va0; + vm_paddr_t pa; + struct l2_dtable *l2; + uint16_t l1idx; + int i; + + if (!reserv) + return; + va0 = va & L1_S_ADDR_MASK; + l1idx = L1_IDX(va0); + pd = &pmap->pm_l1->l1_kva[l1idx]; + KASSERT(pd != NULL, ("NO pd_entry in pmap_promote_large")); + l2 = pmap->pm_l2[L2_IDX(l1idx)]; + KASSERT(l2 != NULL, ("No l2 bucket in pmap_promote_large")); + pt = l2->l2_bucket[L2_BUCKET(l1idx)].l2b_kva; + if (l2pte_index(va0) != 0) + panic("rate"); + KASSERT(pt != NULL, ("No pt in pmap_promote_large")); + if ((*pt & L2_TYPE_MASK) == L2_TYPE_L) + pa = *pt & L2_L_FRAME; + else + pa = *pt & L2_S_FRAME; + if (pa != (*pt & L1_S_FRAME)) + return; + if (reserv != NULL && pa != VM_PAGE_TO_PHYS(reserv->first_page)) + return; + for (i = 1; i < 0x100; i++) { + vm_paddr_t pa, pa2; + + if ((pt[i] & L2_TYPE_MASK) == L2_TYPE_L) + pa = (pt[i] & L2_L_FRAME) + (i & 0xf) * PAGE_SIZE; + else + pa = pt[i] & L2_S_FRAME; + if ((pt[i - 1] & pte_l2_s_cache_mask) == pte_l2_s_cache_mode_pt + || (pt[i] & pte_l2_s_cache_mask) == pte_l2_s_cache_mode_pt) + panic("fuck2"); + if ((pt[i - 1] & L2_TYPE_MASK) == L2_TYPE_L) + pa2 = (pt[i - 1] & L2_L_FRAME) + + ((i - 1) & 0xf) * PAGE_SIZE; + else + pa2 = pt[i - 1] & L2_S_FRAME; + if (pa != pa2 + PAGE_SIZE) + /* Nothing much we can do. */ + return; + } +#ifdef SP_DEBUG + printf("promoting large %x\n", va); +#endif + /* Now free the unused pts. */ + if (*pt & L2_S_PROT_U) + pa |= L1_S_PROT_U; + if (*pt & L2_S_PROT_W) + pa |= L1_S_PROT_W; + *pd = L1_S_PROTO | pa | pte_l1_s_cache_mode | L1_S_DOM(pmap->pm_domain); + bzero(pt, 0x100 * sizeof(*pt)); + pmap_free_l2_bucket(pmap, &l2->l2_bucket[L2_BUCKET(l1idx)], 0x100); + pmap_tlb_flushID(pmap); +} + +static void +pmap_demote(pmap_t pmap, vm_offset_t va) +{ + pd_entry_t *pd; + pt_entry_t *pt; + struct l2_bucket *l2b; + vm_offset_t va0; + uint16_t l1idx; + uint16_t demote_size; + vm_paddr_t pa; + int i; + +#ifdef SP_DEBUG + printf("demoting %x\n", va); +#endif + l1idx = L1_IDX(va); + pd = &pmap->pm_l1->l1_kva[l1idx]; + if (l1pte_section_p(*pd)) { + va0 = va & L1_S_ADDR_MASK; + if (pmap == pmap_kernel()) + l2b = pmap_get_l2_bucket(pmap, va0); + else + l2b = pmap_alloc_l2_bucket(pmap, va0, M_NOWAIT); + demote_size = 0x100; + pa = *pd & L1_S_ADDR_MASK; + if (*pd & L1_S_PROT_U) + pa |= L2_S_PROT_U; + if (*pd & L1_S_PROT_W) + pa |= L2_S_PROT_W; + pt = &l2b->l2b_kva[l2pte_index(va0)]; + *pd = l2b->l2b_phys | L1_C_DOM(pmap->pm_domain) | L1_C_PROTO; + l2b->l2b_occupancy += 0x100; + } else { + va0 = va & L2_L_FRAME; + l2b = pmap_get_l2_bucket(pmap, va0); + demote_size = 0x10; + pt = &l2b->l2b_kva[l2pte_index(va0)]; + if ((*pt & L2_TYPE_MASK) != L2_TYPE_L) + return; + pa = *pt & L2_L_FRAME; + if (*pt & L2_L_PROT_U) + pa |= L2_S_PROT_U; + if (*pt & L2_L_PROT_W) + pa |= L2_S_PROT_W; + } + pa |= L2_S_PROTO; + for (i = 0; i < demote_size; i++, pa += PAGE_SIZE) + pt[i] = (pa) | pte_l2_s_cache_mode; + pmap_tlb_flushID(pmap); +} + + /* * Modify pte bits for all ptes corresponding to the given physical address. * We use `maskbits' rather than `clearbits' because we're always passing @@ -1559,9 +1747,17 @@ pmap_acquire_pmap_lock(pm); #endif + + if (l1pte_section_p(pm->pm_l1->l1_kva[L1_IDX(va)])) { + pmap_demote(pm, va); + pv->pv_flags |= PVF_DEMOTED; + } l2b = pmap_get_l2_bucket(pm, va); - ptep = &l2b->l2b_kva[l2pte_index(va)]; + if ((*ptep & L2_TYPE_MASK) == L2_TYPE_L) { + pmap_demote(pm, va); + pv->pv_flags |= PVF_DEMOTED; + } npte = opte = *ptep; if (maskbits & (PVF_WRITE|PVF_MOD) && @@ -1675,6 +1871,11 @@ if (PV_BEEN_REFD(oflags)) pmap_tlb_flushD_SE(pm, pv->pv_va); } + if (pv->pv_flags & PVF_DEMOTED) { + pmap_promote_small(pm, l2b, va, NULL, 0); + pmap_promote_large(pm, va, NULL); + pv->pv_flags &= ~PVF_DEMOTED; + } #if 0 pmap_release_pmap_lock(pm); @@ -1713,8 +1914,6 @@ pmap_enter_pv(struct vm_page *pg, struct pv_entry *pve, pmap_t pm, vm_offset_t va, u_int flags) { - - pve->pv_pmap = pm; pve->pv_va = va; pve->pv_flags = flags; @@ -1981,6 +2180,19 @@ pmap_acquire_pmap_lock(pm); #endif l1idx = L1_IDX(va); + pl1pd = &pm->pm_l1->l1_kva[l1idx]; + if (l1pte_section_p(*pl1pd)) { + if (user && !(*pl1pd & L1_S_PROT_U)) + goto out; + if (ftype == VM_PROT_WRITE && !(*pl1pd & L1_S_PROT_W)) + goto out; + if ((*pl1pd & L1_S_DOM_MASK) != L1_S_DOM(pm->pm_domain)) { + *pl1pd &= ~L1_S_DOM_MASK; + *pl1pd |= L1_S_DOM(pm->pm_domain); + rv = 1; + goto out; + } + } /* * If there is no l2_dtable for this address, then the process @@ -2011,12 +2223,15 @@ /* * Catch a userland access to the vector page mapped at 0x0 */ - if (user && (pte & L2_S_PROT_U) == 0) + if (user && (((pte & L2_TYPE_MASK) == L2_TYPE_L && + (pte & L2_L_PROT_U) == 0) || (pte & L2_S_PROT_U) == 0)) goto out; - pa = l2pte_pa(pte); + pa = (pte & L2_TYPE_MASK) == L2_TYPE_L ? + ((pte & L2_L_FRAME) | (va & L2_L_OFFSET)) : l2pte_pa(pte); - if ((ftype & VM_PROT_WRITE) && (pte & L2_S_PROT_W) == 0) { + if ((ftype & VM_PROT_WRITE) && (((pte & L2_TYPE_MASK) == L2_TYPE_L && + (pte & L2_L_PROT_W) == 0) || (pte & L2_S_PROT_W) == 0)) { /* * This looks like a good candidate for "page modified" * emulation... @@ -2025,15 +2240,13 @@ struct vm_page *pg; /* Extract the physical address of the page */ - if ((pg = PHYS_TO_VM_PAGE(pa)) == NULL) { + if ((pg = PHYS_TO_VM_PAGE(pa)) == NULL) goto out; - } /* Get the current flags for this page. */ pv = pmap_find_pv(pg, pm, va); - if (pv == NULL) { + if (pv == NULL) goto out; - } /* * Do the flags say this page is writable? If not then it @@ -2042,9 +2255,8 @@ * PTE. Now we know a write has occurred we can correct this * and also set the modified bit */ - if ((pv->pv_flags & PVF_WRITE) == 0) { + if ((pv->pv_flags & PVF_WRITE) == 0) goto out; - } if (pmap_track_modified(pv->pv_va)) { pg->md.pvh_attrs |= PVF_REF | PVF_MOD; @@ -2059,7 +2271,12 @@ * changing. We've already set the cacheable bits based on * the assumption that we can write to this page. */ - *ptep = (pte & ~L2_TYPE_MASK) | L2_S_PROTO | L2_S_PROT_W; + if ((pte & L2_TYPE_MASK) == L2_TYPE_L) + *ptep = (pte & ~L2_TYPE_MASK) | L2_L_PROTO | + L2_L_PROT_W; + else + *ptep = (pte & ~L2_TYPE_MASK) | L2_S_PROTO | + L2_S_PROT_W; PTE_SYNC(ptep); rv = 1; } else @@ -2088,7 +2305,6 @@ pg->md.pvh_attrs |= PVF_REF; pv->pv_flags |= PVF_REF; - *ptep = (pte & ~L2_TYPE_MASK) | L2_S_PROTO; PTE_SYNC(ptep); rv = 1; @@ -2212,7 +2428,7 @@ pv_entry_high_water = 9 * (pv_entry_max / 10); l2zone = uma_zcreate("L2 Table", L2_TABLE_SIZE_REAL, pmap_l2ptp_ctor, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); - uma_prealloc(l2zone, 4096); + /*uma_prealloc(l2zone, 4096);*/ l2table_zone = uma_zcreate("L2 Table", sizeof(struct l2_dtable), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); @@ -2823,8 +3039,10 @@ { struct pv_entry *pv, *npv; struct l2_bucket *l2b = NULL; + pt_entry_t *pt; + pd_entry_t *pd; + vm_paddr_t pa; vm_page_t m; - pt_entry_t *pt; vm_page_lock_queues(); for (pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; pv = npv) { @@ -2832,6 +3050,9 @@ npv = TAILQ_NEXT(pv, pv_plist); continue; } + pd = &pmap->pm_l1->l1_kva[L1_IDX(pv->pv_va)]; + if (l1pte_section_p(*pd)) + pmap_demote(pmap, pv->pv_va); if (pv->pv_flags & PVF_WIRED) { /* The page is wired, cannot remove it now. */ npv = TAILQ_NEXT(pv, pv_plist); @@ -2841,7 +3062,10 @@ l2b = pmap_get_l2_bucket(pmap, pv->pv_va); KASSERT(l2b != NULL, ("No L2 bucket in pmap_remove_pages")); pt = &l2b->l2b_kva[l2pte_index(pv->pv_va)]; - m = PHYS_TO_VM_PAGE(*pt & L2_ADDR_MASK); + if ((*pt & L2_TYPE_MASK) == L2_TYPE_L) + pmap_demote(pmap, pv->pv_va); + pa = *pt & L2_S_FRAME; + m = PHYS_TO_VM_PAGE(pa); *pt = 0; PTE_SYNC(pt); npv = TAILQ_NEXT(pv, pv_plist); @@ -3014,6 +3238,7 @@ TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) pmap_dcache_wb_range(pv->pv_pmap, pv->pv_va, PAGE_SIZE, TRUE, TRUE); } + /* * Add a list of wired pages to the kva * this routine is only used for temporary @@ -3084,6 +3309,8 @@ if (!pmap_get_pde_pte(pmap, addr, &pde, &pte)) return (FALSE); + if (!pte) + return (FALSE); if (*pte == 0) return (TRUE); return (FALSE); @@ -3154,6 +3381,7 @@ pmap_remove_all(vm_page_t m) { pv_entry_t pv; + pd_entry_t *pd; pt_entry_t *ptep, pte; struct l2_bucket *l2b; boolean_t flush = FALSE; @@ -3177,9 +3405,15 @@ if (flush == FALSE && (pv->pv_pmap == curpm || pv->pv_pmap == pmap_kernel())) flush = TRUE; + pd = &pv->pv_pmap->pm_l1->l1_kva[L1_IDX(pv->pv_va)]; + if (l1pte_section_p(*pd)) + pmap_demote(pv->pv_pmap, pv->pv_va); l2b = pmap_get_l2_bucket(pv->pv_pmap, pv->pv_va); + KASSERT(l2b != NULL, ("No l2 bucket")); ptep = &l2b->l2b_kva[l2pte_index(pv->pv_va)]; + if ((*ptep & L2_TYPE_MASK) == L2_TYPE_L) + pmap_demote(pv->pv_pmap, pv->pv_va); pte = *ptep; *ptep = 0; PTE_SYNC_CURRENT(pv->pv_pmap, ptep); @@ -3214,6 +3448,7 @@ vm_offset_t next_bucket; u_int flags; int flush; + int demoted = 0; if ((prot & VM_PROT_READ) == 0) { mtx_lock(&Giant); @@ -3243,10 +3478,25 @@ vm_page_lock_queues(); while (sva < eva) { + demoted = 0; next_bucket = L2_NEXT_BUCKET(sva); if (next_bucket > eva) next_bucket = eva; + if (l1pte_section_p(pm->pm_l1->l1_kva[L1_IDX(sva)])) { + if ((sva & L1_S_OFFSET) == 0 && + sva + L1_S_SIZE < eva) { + /* Change the whole 1MB superpage. */ + pm->pm_l1->l1_kva[L1_IDX(sva)] &= ~ + L1_S_PROT_W; + flush++; + sva += L1_S_SIZE; + continue; + } + pmap_demote(pm, sva); + l2b = pmap_get_l2_bucket(pm, sva); + demoted = 1; + } l2b = pmap_get_l2_bucket(pm, sva); if (l2b == NULL) { sva = next_bucket; @@ -3256,6 +3506,11 @@ ptep = &l2b->l2b_kva[l2pte_index(sva)]; while (sva < next_bucket) { + demoted = 0; + if ((*ptep & L2_TYPE_MASK) == L2_TYPE_L) { + pmap_demote(pm, sva); + demoted = 1; + } if ((pte = *ptep) != 0 && (pte & L2_S_PROT_W) != 0) { struct vm_page *pg; u_int f; @@ -3285,6 +3540,10 @@ pmap_tlb_flushD_SE(pm, sva); } + if (demoted) { + pmap_promote_small(pm, l2b, sva, NULL, 0); + pmap_promote_large(pm, sva, NULL); + } sva += PAGE_SIZE; ptep++; } @@ -3322,13 +3581,40 @@ boolean_t wired) { struct l2_bucket *l2b = NULL; - struct vm_page *opg; + struct vm_page *opg = NULL; struct pv_entry *pve = NULL; pt_entry_t *ptep, npte, opte; + pd_entry_t l1pd; u_int nflags; u_int oflags; vm_paddr_t pa; + l1pd = pmap->pm_l1->l1_kva[L1_IDX(va)]; + if (l1pte_section_p(l1pd) && + ((l1pd & L1_S_FRAME) != (VM_PAGE_TO_PHYS(m) & L1_S_FRAME) || + (((VM_PAGE_TO_PHYS(m) & L2_S_FRAME) & L2_S_OFFSET) != + (va & L2_S_OFFSET)) || + ((l1pd & L1_S_PROT_U) != 0) != (pmap != pmap_kernel() && va != + vector_page) || ((l1pd & L1_S_PROT_W) != 0) != + ((prot & VM_PROT_WRITE) != 0))) { + /* There's already a superpage at this address, demote. */ + pmap_demote(pmap, va); + } else if (l1pte_section_p(l1pd)) { + pmap_free_l2_bucket(pmap, l2b, 0); + opg = m; + l2b = NULL; + } + + if (opg == NULL) { + if (pmap == pmap_kernel()) { + l2b = pmap_get_l2_bucket(pmap, va); + if (!l2b) + l2b = pmap_grow_l2_bucket(pmap, va); + } else + l2b = pmap_alloc_l2_bucket(pmap, va, M_NOWAIT); + KASSERT(l2b != NULL, + ("pmap_enter: failed to allocate l2 bucket")); + } vm_page_lock_queues(); if (va == vector_page) { pa = systempage.pv_pa; @@ -3345,31 +3631,40 @@ PDEBUG(1, printf("pmap_enter: pmap = %08x, va = %08x, m = %08x, prot = %x, " "wired = %x\n", (uint32_t) pmap, va, (uint32_t) m, prot, wired)); - if (pmap == pmap_kernel()) { - l2b = pmap_get_l2_bucket(pmap, va); - if (l2b == NULL) - l2b = pmap_grow_l2_bucket(pmap, va); - } else - l2b = pmap_alloc_l2_bucket(pmap, va); - KASSERT(l2b != NULL, - ("pmap_enter: failed to allocate l2 bucket")); - ptep = &l2b->l2b_kva[l2pte_index(va)]; + if (l2b) { + ptep = &l2b->l2b_kva[l2pte_index(va)]; - opte = *ptep; - npte = pa; - oflags = 0; + opte = *ptep; + npte = pa; + oflags = 0; + } else { + npte = oflags = opte = 0; + ptep = NULL; + } if (opte) { + if ((opte & L2_TYPE_MASK) == L2_TYPE_L) { + if (((opte & L2_L_FRAME) | (va & L2_L_OFFSET)) == + VM_PAGE_TO_PHYS(m) && + (((opte & L2_L_PROT_W) != 0) == + (prot & VM_PROT_WRITE) != 0) && + (((opte & L2_L_PROT_U) == 0) == + (pmap == pmap_kernel() || va == vector_page))) + opg = m; + else { + pmap_demote(pmap, va); + opte = *ptep; + } + } /* * There is already a mapping at this address. * If the physical address is different, lookup the * vm_page. */ - if (l2pte_pa(opte) != pa) + if (!opg && l2pte_pa(opte) != pa) opg = PHYS_TO_VM_PAGE(l2pte_pa(opte)); - else + else if (!opg) opg = m; - } else - opg = NULL; + } if ((prot & (VM_PROT_ALL)) || (!m || m->md.pvh_attrs & PVF_REF)) { @@ -3492,7 +3787,7 @@ /* * Keep the stats up to date */ - if (opte == 0) { + if (opte == 0 && l2b) { l2b->l2b_occupancy++; pmap->pm_stats.resident_count++; } @@ -3502,7 +3797,7 @@ * If this is just a wiring change, the two PTEs will be * identical, so there's no need to update the page table. */ - if (npte != opte) { + if (l2b && npte != opte && ((opte & L2_TYPE_MASK) != L2_TYPE_L)) { boolean_t is_cached = pmap_is_current(pmap); *ptep = npte; @@ -3539,6 +3834,17 @@ pmap_vac_me_harder(m, pmap, va); + if ((va < VM_MAXUSER_ADDRESS || + m->object == kernel_object || + (m->object == kmem_object && FALSE)) && m->reserv) { + if (m->reserv->refcnt > 0 && + m->reserv->refcnt != SP_LARGE && + (m->reserv->refcnt % SMALL) == 0) + pmap_promote_small(pmap, l2b, va, m->reserv, + m->reserv->refcnt - SMALL); + else if (m->reserv->refcnt == SP_LARGE) + pmap_promote_large(pmap, va, m->reserv); + } } vm_page_unlock_queues(); } @@ -3579,15 +3885,19 @@ void pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) { +#if 0 struct l2_bucket *l2b; pt_entry_t *ptep, pte; +#endif vm_page_t pg; +#if 0 l2b = pmap_get_l2_bucket(pmap, va); KASSERT(l2b, ("No l2b bucket in pmap_change_wiring")); ptep = &l2b->l2b_kva[l2pte_index(va)]; pte = *ptep; - pg = PHYS_TO_VM_PAGE(l2pte_pa(pte)); +#endif + pg = PHYS_TO_VM_PAGE(pmap_extract(pmap, va)); if (pg) pmap_modify_pv(pg, pmap, va, PVF_WIRED, wired); } @@ -3626,10 +3936,6 @@ l1pd = *pl1pd; if (l1pte_section_p(l1pd)) { - /* - * These should only happen for pmap_kernel() - */ - KASSERT(pm == pmap_kernel(), ("huh")); pa = (l1pd & L1_S_FRAME) | (va & L1_S_OFFSET); } else { /* @@ -3685,10 +3991,6 @@ vm_page_lock_queues(); if (l1pte_section_p(l1pd)) { - /* - * These should only happen for pmap_kernel() - */ - KASSERT(pmap == pmap_kernel(), ("huh")); pa = (l1pd & L1_S_FRAME) | (va & L1_S_OFFSET); if (l1pd & L1_S_PROT_W || (prot & VM_PROT_WRITE) == 0) { m = PHYS_TO_VM_PAGE(pa); @@ -3845,8 +4147,22 @@ l2b = pmap_get_l2_bucket(pm, sva); if (l2b == NULL) { - sva = next_bucket; - continue; + pd_entry_t *pd = &pm->pm_l1->l1_kva[L1_IDX(sva)]; + if (l1pte_section_p(*pd)) { + /* We can just remove the superpage. */ + if (0 && (sva == (sva & L1_S_ADDR_MASK)) && + (sva + 0x100000 < eva)) { + *pd = 0; + sva = sva + 0x100000; + continue; + } else { + pmap_demote(pm, sva); + l2b = pmap_get_l2_bucket(pm, sva); + } + } else { + sva = next_bucket; + continue; + } } ptep = &l2b->l2b_kva[l2pte_index(sva)]; @@ -3857,6 +4173,10 @@ pt_entry_t pte; vm_paddr_t pa; + if ((*ptep & L2_TYPE_MASK) == L2_TYPE_L) + /* 64KB superpage. */ + pmap_demote(pm, sva); + pte = *ptep; if (pte == 0) { @@ -4017,7 +4337,6 @@ _arm_bzero((void *)(phys + off), size, IS_PHYSICAL) == 0) return; - /* * Hook in the page, zero it, and purge the cache for that * zeroed page. Invalidate the TLB as needed. @@ -4085,7 +4404,11 @@ l2b = pmap_get_l2_bucket(pmap_kernel(), va); + if (!l2b) + panic("fuck2"); sptep = ptep = &l2b->l2b_kva[l2pte_index(va)]; + if ((*ptep & L2_TYPE_MASK) == L2_TYPE_L) + panic("bordel"); while (va < next_bucket) { pte = *ptep; @@ -4826,4 +5149,3 @@ return (NULL); } - ==== //depot/projects/superpages/src/sys/arm/include/pmap.h#3 (text+ko) ==== @@ -479,6 +479,7 @@ #define PVF_EXEC 0x10 /* mapping is executable */ #define PVF_UNC 0x20 /* mapping is 'user' non-cacheable */ #define PVF_KNC 0x40 /* mapping is 'kernel' non-cacheable */ +#define PVF_DEMOTED 0x80 /* Page was demoted. */ #define PVF_NC (PVF_UNC|PVF_KNC) void vector_page_setprot(int); From owner-p4-projects@FreeBSD.ORG Tue Oct 4 21:32:10 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 20A9416A422; Tue, 4 Oct 2005 21:32:10 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF9BE16A41F for ; Tue, 4 Oct 2005 21:32:09 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CE5D43D49 for ; Tue, 4 Oct 2005 21:32:09 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j94LW9Uq067336 for ; Tue, 4 Oct 2005 21:32:09 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j94LW9VA067333 for perforce@freebsd.org; Tue, 4 Oct 2005 21:32:09 GMT (envelope-from peter@freebsd.org) Date: Tue, 4 Oct 2005 21:32:09 GMT Message-Id: <200510042132.j94LW9VA067333@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 84815 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2005 21:32:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=84815 Change 84815 by peter@peter_daintree on 2005/10/04 21:31:23 IFC @84813 Affected files ... .. //depot/projects/hammer/contrib/bsnmp/FREEBSD-Xlist#4 integrate .. //depot/projects/hammer/contrib/bsnmp/NEWS#8 integrate .. //depot/projects/hammer/contrib/bsnmp/VERSION#8 integrate .. //depot/projects/hammer/contrib/bsnmp/gensnmpdef/gensnmpdef.1#4 integrate .. //depot/projects/hammer/contrib/bsnmp/gensnmptree/gensnmptree.1#5 integrate .. //depot/projects/hammer/contrib/bsnmp/gensnmptree/gensnmptree.c#7 integrate .. //depot/projects/hammer/contrib/bsnmp/lib/asn1.3#6 integrate .. //depot/projects/hammer/contrib/bsnmp/lib/asn1.c#4 integrate .. //depot/projects/hammer/contrib/bsnmp/lib/asn1.h#4 integrate .. //depot/projects/hammer/contrib/bsnmp/lib/bsnmpagent.3#6 integrate .. //depot/projects/hammer/contrib/bsnmp/lib/bsnmpclient.3#7 integrate .. //depot/projects/hammer/contrib/bsnmp/lib/bsnmplib.3#6 integrate .. //depot/projects/hammer/contrib/bsnmp/lib/snmp.c#4 integrate .. //depot/projects/hammer/contrib/bsnmp/lib/snmpagent.c#6 integrate .. //depot/projects/hammer/contrib/bsnmp/lib/snmpclient.c#5 integrate .. //depot/projects/hammer/contrib/bsnmp/snmp_mibII/mibII.c#8 integrate .. //depot/projects/hammer/contrib/bsnmp/snmp_mibII/mibII.h#5 integrate .. //depot/projects/hammer/contrib/bsnmp/snmp_mibII/mibII_ipaddr.c#5 integrate .. //depot/projects/hammer/contrib/bsnmp/snmp_mibII/mibII_route.c#5 integrate .. //depot/projects/hammer/contrib/bsnmp/snmp_mibII/snmp_mibII.3#7 integrate .. //depot/projects/hammer/contrib/bsnmp/snmp_ntp/BEGEMOT-NTP-MIB.txt#2 integrate .. //depot/projects/hammer/contrib/bsnmp/snmp_ntp/snmp_ntp.c#3 integrate .. //depot/projects/hammer/contrib/bsnmp/snmpd/.gdbinit#2 delete .. //depot/projects/hammer/contrib/bsnmp/snmpd/bsnmpd.1#6 integrate .. //depot/projects/hammer/contrib/bsnmp/snmpd/config.c#5 integrate .. //depot/projects/hammer/contrib/bsnmp/snmpd/main.c#8 integrate .. //depot/projects/hammer/contrib/bsnmp/snmpd/snmpmod.3#7 integrate .. //depot/projects/hammer/contrib/bsnmp/snmpd/snmpmod.h#5 integrate .. //depot/projects/hammer/contrib/bsnmp/snmpd/trans_udp.c#3 integrate .. //depot/projects/hammer/contrib/bsnmp/snmpd/trap.c#5 integrate .. //depot/projects/hammer/include/pthread_np.h#4 integrate .. //depot/projects/hammer/lib/libbsnmp/libbsnmp/Makefile#4 integrate .. //depot/projects/hammer/lib/libthr/pthread.map#4 integrate .. //depot/projects/hammer/lib/libthr/thread/thr_join.c#11 integrate .. //depot/projects/hammer/sbin/ifconfig/ifvlan.c#5 integrate .. //depot/projects/hammer/sys/arm/arm/swtch.S#16 integrate .. //depot/projects/hammer/sys/arm/conf/IQ31244#10 integrate .. //depot/projects/hammer/sys/arm/conf/SIMICS#7 integrate .. //depot/projects/hammer/sys/arm/include/pmap.h#12 integrate .. //depot/projects/hammer/sys/arm/xscale/i80321/iq31244_machdep.c#14 integrate .. //depot/projects/hammer/sys/conf/Makefile.arm#11 integrate .. //depot/projects/hammer/sys/conf/files.arm#6 integrate .. //depot/projects/hammer/sys/kern/kern_descrip.c#50 integrate .. //depot/projects/hammer/sys/kern/kern_exec.c#54 integrate .. //depot/projects/hammer/sys/kern/kern_mac.c#34 integrate .. //depot/projects/hammer/sys/kern/sysv_shm.c#23 integrate .. //depot/projects/hammer/sys/modules/lmc/Makefile#2 integrate .. //depot/projects/hammer/sys/net/bpf.c#41 integrate .. //depot/projects/hammer/sys/net/netisr.c#11 integrate .. //depot/projects/hammer/sys/netinet/if_ether.c#27 integrate .. //depot/projects/hammer/sys/netinet/raw_ip.c#37 integrate .. //depot/projects/hammer/sys/security/mac/mac_process.c#7 integrate .. //depot/projects/hammer/sys/vm/vm_mmap.c#34 integrate .. //depot/projects/hammer/usr.sbin/bsnmpd/bsnmpd/Makefile#8 integrate .. //depot/projects/hammer/usr.sbin/bsnmpd/gensnmptree/Makefile#3 integrate .. //depot/projects/hammer/usr.sbin/bsnmpd/modules/Makefile.inc#5 integrate Differences ... ==== //depot/projects/hammer/contrib/bsnmp/FREEBSD-Xlist#4 (text+ko) ==== @@ -1,4 +1,4 @@ -#$FreeBSD: src/contrib/bsnmp/FREEBSD-Xlist,v 1.3 2005/02/28 17:29:10 harti Exp $ +#$FreeBSD: src/contrib/bsnmp/FREEBSD-Xlist,v 1.4 2005/10/04 14:53:06 harti Exp $ */Makefile.in */acinclude.m4 */aclocal.m4 @@ -10,5 +10,6 @@ */gensnmptree/Makefile.in */lib/Makefile.in */snmp_mibII/Makefile.in +*/snmp_ntp/Makefile.in */snmpd/Makefile.in */snmpd/.gdbinit ==== //depot/projects/hammer/contrib/bsnmp/NEWS#8 (text+ko) ==== @@ -1,3 +1,25 @@ +1.11 Make the Mib2 routing table use red-black tree. This vastly + reduces loading and access time. Load the table only every 10 + minutes. In the meantime process message from the routing socket + to update the table. + + Lot of man-page fixes from ru@freebsd.org. + + Fixes to command line macros and macro redefinition. + + Trap variables for ntp (still need trap definition and code). + + Periodic timers from Victor Cruceru. + + Man-page fixes from Christian Brueffer. + + Lots of spelling fixes from Giorgios Keramidas. + + A number of changes to facilitate building on FreeBSD-4 from + Andrey Elsukov. + + Add repeatable timers. + 1.10 Change all the tick handling in the daemon from 32-bit to 64-bit. Bump the modules' major version number to 3. @@ -34,7 +56,7 @@ Maxim Konovalov) 1.7 - snmpd: Move event library initialisation before reading of + snmpd: Move event library initialization before reading of config file (thanks to phk). gensnmptree: can now read more than one tree and merge them. ==== //depot/projects/hammer/contrib/bsnmp/VERSION#8 (text+ko) ==== @@ -1,1 +1,1 @@ -1.10 +1.11 ==== //depot/projects/hammer/contrib/bsnmp/gensnmpdef/gensnmpdef.1#4 (text+ko) ==== @@ -1,5 +1,5 @@ .\" -.\" Copyright (C) 2004 +.\" Copyright (C) 2004-2005 .\" Hartmut Brandt. .\" All rights reserved. .\" @@ -26,9 +26,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Begemot: bsnmp/gensnmpdef/gensnmpdef.1,v 1.3 2005/02/25 11:55:54 brandt_h Exp $ +.\" $Begemot: bsnmp/gensnmpdef/gensnmpdef.1,v 1.5 2005/10/04 08:46:46 brandt_h Exp $ .\" -.Dd April 14, 2004 +.Dd June 14, 2005 .Dt GENSNMPDEF 1 .Os .Sh NAME @@ -43,7 +43,8 @@ The .Nm utility is used to create an initial MIB description file from -one or more MIBs. The description file must be edited to be actually useful +one or more MIBs. +The description file must be edited to be actually useful for feeding it into .Xr gensnmptree 1 . .Pp @@ -57,13 +58,13 @@ .Pp .Nm does no attempt on sorting the OID tree so in case of complex and -non-standard MIBs it is necessay to sort the tree in the resulting definition +non-standard MIBs it is necessary to sort the tree in the resulting definition file by hand. .Sh SEE ALSO .Xr snmpd 1 +.Sh AUTHORS +.An Hartmut Brandt Aq harti@freebsd.org .Sh BUGS The utility is by no means bullet-proof and may fail for complex or non-standard MIBs. Its output is expected to be edited by hand. -.Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org ==== //depot/projects/hammer/contrib/bsnmp/gensnmptree/gensnmptree.1#5 (text+ko) ==== @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2001-2003 +.\" Copyright (c) 2001-2005 .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. .\" @@ -26,9 +26,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Begemot: bsnmp/gensnmptree/gensnmptree.1,v 1.4 2005/02/25 11:55:56 brandt_h Exp $ +.\" $Begemot: bsnmp/gensnmptree/gensnmptree.1,v 1.5 2005/06/15 11:31:25 brandt_h Exp $ .\" -.Dd October 7, 2003 +.Dd June 14, 2005 .Dt GENSNMPTREE 1 .Os .Sh NAME @@ -43,8 +43,8 @@ The .Nm utility is used to either generate C language tables and header files from -a MIB description or to numeric OIDs from MIB descriptions. The first form -is used only for maintaining the +a MIB description or to numeric OIDs from MIB descriptions. +The first form is used only for maintaining the .Xr snmpd 1 daemon or for module writers. The second form may be used by SNMP client program writers. @@ -70,7 +70,8 @@ .Nm expects MIB variable names (only the last component) on its command line. It reads a MIB specification from standard input and for each MIB variable -name emits two C preprocessor defines on its standard output. One define +name emits two C preprocessor defines on its standard output. +One define .Va OID_ Ns Ar name can be used as an array initialized to initialize a .Va struct asn_oid . @@ -85,7 +86,8 @@ .It Fl e Enter extract mode. .It Fl l -Generate local preprocessor includes. This is used for bootstrapping +Generate local preprocessor includes. +This is used for bootstrapping .Xr snmpd 1 . .It Fl t Instead of normal output print the resulting tree. ==== //depot/projects/hammer/contrib/bsnmp/gensnmptree/gensnmptree.c#7 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Begemot: bsnmp/gensnmptree/gensnmptree.c,v 1.42 2005/04/26 16:26:19 brandt_h Exp $ + * $Begemot: bsnmp/gensnmptree/gensnmptree.c,v 1.43 2005/10/04 11:21:29 brandt_h Exp $ * * Generate OID table from table description. * @@ -595,7 +595,9 @@ fprintf(fp, "#include \n"); fprintf(fp, "#include \n"); +#ifdef HAVE_STDINT_H fprintf(fp, "#include \n"); +#endif if (localincs) { fprintf(fp, "#include \"asn1.h\"\n"); fprintf(fp, "#include \"snmp.h\"\n"); ==== //depot/projects/hammer/contrib/bsnmp/lib/asn1.3#6 (text+ko) ==== @@ -1,4 +1,7 @@ .\" +.\" Copyright (c) 2004-2005 +.\" Hartmut Brandt. +.\" All rights reserved. .\" Copyright (c) 2001-2003 .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. @@ -26,9 +29,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Begemot: bsnmp/lib/asn1.3,v 1.6 2005/02/25 11:55:57 brandt_h Exp $ +.\" $Begemot: bsnmp/lib/asn1.3,v 1.9 2005/10/04 08:46:49 brandt_h Exp $ .\" -.Dd August 15, 2002 +.Dd October 4, 2005 .Dt ASN1 3 .Os .Sh NAME @@ -142,8 +145,8 @@ .Fn asn_oid2str "const struct asn_oid *oid" .Sh DESCRIPTION The ASN.1 library contains routines to handle ASN.1 encoding for SNMP. -It supports only the restricted form of ASN.1 as required by SNMP. There -are two basic structures used throughout the library: +It supports only the restricted form of ASN.1 as required by SNMP. +There are two basic structures used throughout the library: .Bd -literal -offset indent /* these restrictions are in the SMI */ #define ASN_MAXID 0xffffffff @@ -176,17 +179,18 @@ #define asn_ptr asn_u.ptr .Ed .Pp -This structure is used to encode and decode ASN.1. It describes the output +This structure is used to encode and decode ASN.1. +It describes the output buffer for encoding routines and the input buffer for decoding routines. For encoding .Fa asn_len -holds the number of remaining free octets in the buffer. The first free byte -is pointed to by +holds the number of remaining free octets in the buffer. +The first free byte is pointed to by .Fa asn_ptr . For decoding .Fa asn_len -holds the number of remaining bytes to decode. The next byte to decode is pointed -to by +holds the number of remaining bytes to decode. +The next byte to decode is pointed to by .Fa asn_cptr . .Pp Most of the functions return an error code @@ -216,20 +220,20 @@ .Pp The function .Fn asn_get_header -reads the next header from the input octet stream. It returns the tag -in the variable pointed to by +reads the next header from the input octet stream. +It returns the tag in the variable pointed to by .Fa type (note that only single byte tags are supported) and the decoded length field in the value pointed to by .Fa lenp -(this is restricted to a unsigned 32-bit value). All errors in this function -are fatal and stop processing. +(this is restricted to a unsigned 32-bit value). +All errors in this function are fatal and stop processing. .Pp The function .Fn asn_put_header writes an ASN.1 header. .Fa type -is the tag to write and is restricted to one byte tags (i.e. tags +is the tag to write and is restricted to one byte tags (i.e., tags lesser or equal than 0x30). .Fa len is the length of the value and is restricted to 16-bit. @@ -246,15 +250,18 @@ and space for the maximum supported length field and sets the pointer pointed to by .Fa ptr -to the begin of this length field. This pointer must then be fed into +to the begin of this length field. +This pointer must then be fed into .Fn asn_commit_header -directly after writing the value to the buffer. The function will compute the +directly after writing the value to the buffer. +The function will compute the length, insert it into the right place and shift the value if the resulting length field is shorter than the estimated one. .Pp The function .Fn asn_get_integer_raw -is used to decode a signed integer value (32-bit). It assumes, that the +is used to decode a signed integer value (32-bit). +It assumes, that the header of the integer has been decoded already. .Fa len is the length obtained from the ASN.1 header and the integer will be returned @@ -263,8 +270,8 @@ .Pp The function .Fn asn_get_integer -decodes a complete 32-bit signed integer including the header. If the -tag is wrong +decodes a complete 32-bit signed integer including the header. +If the tag is wrong .Li ASN_ERR_TAG is returned. The function @@ -273,14 +280,16 @@ .Pp The function .Fn asn_get_octetstring_raw -decodes the value field of an ASN.1 octet string. The length obtained from the -header must be fed into the +decodes the value field of an ASN.1 octet string. +The length obtained from the header must be fed into the .Fa len argument and .Fa out -must point to a buffer to receive the octet string. On entry to the function +must point to a buffer to receive the octet string. +On entry to the function .Fa outsize -must point to the size of the buffer. On exit +must point to the size of the buffer. +On exit .Fa outsize will point to the number of octets decoded (if no error occurs this will be equal to @@ -291,7 +300,8 @@ .Fa out must point to a buffer to receive the string, .Fa outsize -must point to the size of the buffer. On exit of the function +must point to the size of the buffer. +On exit of the function .Fa outsize will point to the number of octets decoded. The function @@ -316,7 +326,8 @@ .Pp The function .Fn asn_put_exception -is used to encode an SNMPv2 exception. The exception type is +is used to encode an SNMPv2 exception. +The exception type is .Fa type . .Pp The function @@ -369,8 +380,8 @@ .Fn asn_get_counter64_raw decodes an unsigned 64-bit integer value. .Fa len -must be the value length from the header. The resulting value is -stored into the variable pointed to by +must be the value length from the header. +The resulting value is stored into the variable pointed to by .Fa res . The function .Fn asn_put_counter64 @@ -392,12 +403,12 @@ .Pp The function .Fn asn_slice_oid -splits a part out from an OID. It takes all the subids from the OID -pointed to by +splits a part out from an OID. +It takes all the subids from the OID pointed to by .Fa src starting with the subid at position .Fa from -(the first subid beeing subid 0) up to, but not including, subid +(the first subid being subid 0) up to, but not including, subid .Fa to and generates a new OID in .Fa dest . @@ -413,8 +424,8 @@ .Fa from to the OID .Fa to -given that the resulting OID is not too long. If the maximum length is exceeded -the result is undefined. +given that the resulting OID is not too long. +If the maximum length is exceeded the result is undefined. .Pp The function .Fn asn_compare_oid @@ -442,7 +453,8 @@ .Fa oid . The buffer pointed to by .Fa str -must be large enough to hold the result. The constant +must be large enough to hold the result. +The constant .Li ASN_OIDSTRLEN is defined to be the length of the maximum string generated by this function (including the trailing NUL). @@ -452,7 +464,7 @@ .Fa oid into a private buffer that is overwritten by each call. .Sh DIAGNOSTICS -When an error occures in any of the function the function pointed to +When an error occurs in any of the function the function pointed to by the global pointer .Bd -literal -offset indent extern void (*asn_error)(const struct asn_buf *, const char *, ...); @@ -469,7 +481,7 @@ followed by the error message and an optional dump of the buffer. .Sh SEE ALSO .Xr gensnmptree 1 , -.Xr snmpd 1 , +.Xr bsnmpd 1 , .Xr bsnmpagent 3 , .Xr bsnmpclient 3 , .Xr bsnmplib 3 ==== //depot/projects/hammer/contrib/bsnmp/lib/asn1.c#4 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Begemot: bsnmp/lib/asn1.c,v 1.28 2004/08/06 08:46:49 brandt Exp $ + * $Begemot: bsnmp/lib/asn1.c,v 1.29 2005/10/04 11:21:31 brandt_h Exp $ * * ASN.1 for SNMP. */ @@ -35,7 +35,11 @@ #include #include #include +#ifdef HAVE_STDINT_H #include +#elif defined(HAVE_INTTYPES_H) +#include +#endif #include #include "asn1.h" ==== //depot/projects/hammer/contrib/bsnmp/lib/asn1.h#4 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Begemot: bsnmp/lib/asn1.h,v 1.18 2004/08/06 08:46:50 brandt Exp $ + * $Begemot: bsnmp/lib/asn1.h,v 1.19 2005/10/04 11:21:31 brandt_h Exp $ * * ASN.1 for SNMP */ @@ -179,4 +179,14 @@ ASN_EXCEPT_ENDOFMIBVIEW = 0x02, }; +#if !defined(INT32_MIN) +#define INT32_MIN (-0x7fffffff-1) +#endif +#if !defined(INT32_MAX) +#define INT32_MAX (0x7fffffff) +#endif +#if !defined(UINT32_MAX) +#define UINT32_MAX (0xffffffff) +#endif + #endif ==== //depot/projects/hammer/contrib/bsnmp/lib/bsnmpagent.3#6 (text+ko) ==== @@ -1,4 +1,7 @@ .\" +.\" Copyright (c) 2004-2005 +.\" Hartmut Brandt. +.\" All rights reserved. .\" Copyright (c) 2001-2003 .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. @@ -26,9 +29,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Begemot: bsnmp/lib/bsnmpagent.3,v 1.7 2005/02/25 11:55:58 brandt_h Exp $ +.\" $Begemot: bsnmp/lib/bsnmpagent.3,v 1.10 2005/10/04 08:46:49 brandt_h Exp $ .\" -.Dd August 16, 2002 +.Dd October 4, 2005 .Dt BSNMPAGENT 3 .Os .Sh NAME @@ -87,14 +90,15 @@ .Fn snmp_dep_finish "struct snmp_context *ctx" .Sh DESCRIPTION The SNMP library contains routines to easily build SNMP agent applications -that use SNMP versions 1 or 2. Note, however, that it may be even easier to -build an -.Xr snmpd 1 +that use SNMP versions 1 or 2. +Note, however, that it may be even easier to build an +.Xr bsnmpd 1 loadable module, that handles the new MIB (see -.Xr snmpmod 3 ). +.Xr snmpmod 3 ) . .Pp Most of the agent routines operate on a global array that the describes the -complete MIB served by the agent. This array is held in the two variables: +complete MIB served by the agent. +This array is held in the two variables: .Bd -literal -offset indent extern struct snmp_node *tree; extern u_int tree_size; @@ -126,7 +130,8 @@ .It Va name Name of this variable. .It Va type -Type of this variable. One of: +Type of this variable. +One of: .Bd -literal -offset indent enum snmp_node_type { SNMP_NODE_LEAF = 1, @@ -136,17 +141,20 @@ .It Va syntax The SNMP syntax of this variable. .It Va op -The user supplied handler for this variable. The handler is called with -the following arguments: +The user supplied handler for this variable. +The handler is called with the following arguments: .Bl -tag -width "ctx" .It Fa ctx A pointer to the context (see below). .Li NULL . .It Fa val -The value to be set or retrieved. For GETNEXT and GETBULK operations the oid in -this value is the current OID. The function (called in this case only for +The value to be set or retrieved. +For GETNEXT and GETBULK operations the oid in +this value is the current OID. +The function (called in this case only for table rows) must find the lexically next existing OID within the same column and -set the oid and value subfields accordingly. If the table column is exhausted the +set the oid and value subfields accordingly. +If the table column is exhausted the function must return .Li SNMP_ERR_NOSUCHNAME . For all other operations the oid in @@ -169,18 +177,20 @@ .Ed .El .Pp -The user handler must return an appropiate SNMP v2 error code. If the original +The user handler must return an appropriate SNMP v2 error code. +If the original PDU was a version 1 PDU, the error code is mapped automatically. .It Va flags Currently only the flag .Li SNMP_NODE_CANSET is defined and set for nodes, that can be written or created. .It Va index -This word describes the index for table columns. Each part of the index -takes 4 bits starting at bit 4. Bits 0 to 3 hold the number of index parts. -This arrangment allows for tables with up to seven indexes. Each bit group -contains the syntax for the index part. There are a number of macros to -help in parsing this field: +This word describes the index for table columns. +Each part of the index takes 4 bits starting at bit 4. +Bits 0 to 3 hold the number of index parts. +This arrangement allows for tables with up to seven indexes. +Each bit group contains the syntax for the index part. +There are a number of macros to help in parsing this field: .Bd -literal -offset indent #define SNMP_INDEXES_MAX 7 #define SNMP_INDEX_SHIFT 4 @@ -197,8 +207,9 @@ The easiest way to construct the node table is .Xr gensnmptree 1 . Note, that one must be careful when changing the tree while executing a SET -operation. Consult the sources for -.Xr snmpd 1 . +operation. +Consult the sources for +.Xr bsnmpd 1 . .Pp The global variable .Va snmp_trace @@ -218,7 +229,8 @@ .Pp Setting a bit to true causes the library to call .Fn snmp_debug -in strategic places with a debug string. The library contains a default +in strategic places with a debug string. +The library contains a default implementation for the debug function that prints a message to standard error. .Pp Many of the functions use a so called context: @@ -234,8 +246,8 @@ struct snmp_scratch { void *ptr1; void *ptr2; - u_int32_t int1; - u_int32_t int2; + uint32_t int1; + uint32_t int2; }; .Ed .Pp @@ -243,15 +255,17 @@ .Bl -tag -width ".It Va var_index" .It Va va_index For the node operation callback this is the -index of the variable binding that should be returned if an error occures. -Set by the library. In all other functions this is undefined. +index of the variable binding that should be returned if an error occurs. +Set by the library. +In all other functions this is undefined. .It Va scratch For the node operation callback this is a pointer to a per variable binding -scratch area that can be used to implement the commit and rollback. Set -by the library. +scratch area that can be used to implement the commit and rollback. +Set by the library. .It Va dep In the dependency callback function (see below) this is a pointer to the -current dependency. Set by the library. +current dependency. +Set by the library. .It Va data This is the .Fa data @@ -267,21 +281,24 @@ .Fn snmp_getbulk executes an SNMP GETBULK operation. For all three functions the response PDU is constructed and encoded -on the fly. If everything is ok, the response PDU is returned in +on the fly. +If everything is ok, the response PDU is returned in .Fa resp and .Fa resp_b . The caller must call .Fn snmp_pdu_free -to free the response PDU in this case. One of the following values may be -returned: +to free the response PDU in this case. +One of the following values may be returned: .Bl -tag -width ".It Li SNMP_RET_ERR" .It Li SNMP_RET_OK Operation successful, response PDU may be sent. .It Li SNMP_RET_IGN -Operation failed, no response PDU constructed. Request is ignored. +Operation failed, no response PDU constructed. +Request is ignored. .It Li SNMP_RET_ERR -Error in operation. The error code and index have been set in +Error in operation. +The error code and index have been set in .Fa pdu . No response PDU has been constructed. The caller may construct an error response PDU via @@ -290,47 +307,56 @@ .Pp The function .Fn snmp_set -executes an SNMP SET operation. The arguments are the same as for the previous -three functions. The operation of this functions is, however, much more complex. +executes an SNMP SET operation. +The arguments are the same as for the previous +three functions. +The operation of this functions is, however, much more complex. .Pp -The SET operation occures in several stages: +The SET operation occurs in several stages: .Bl -enum -offset indent .It For each binding search the corresponding nodes, check that the -variable is writeable and the syntax is ok. The writeable check can be done -only for scalars. For columns it must be done in the node's operation callback -function. +variable is writeable and the syntax is ok. +The writeable check can be done only for scalars. +For columns it must be done in the node's operation callback function. .It For each binding call the node's operation callback with function SNMP_OP_SET. -The callback may create dependencies or finalizers (see below). For simple +The callback may create dependencies or finalizers (see below). +For simple scalars the scratch area may be enough to handle commit and rollback, for -interdependend table columns dependencies may be necessary. +interdependent table columns dependencies may be necessary. .It If the previous step fails at any point, the node's operation callback functions are called for all bindings for which SNMP_OP_SET was executed -with SNMP_OP_ROLLBACK, in the opposite order. This allows all variables to -undo the effect of the SET operation. After this all the dependencies -are freed -and the finalizers are executed with a fail flag of 1. Then the function +with SNMP_OP_ROLLBACK, in the opposite order. +This allows all variables to undo the effect of the SET operation. +After this all the dependencies are freed +and the finalizers are executed with a fail flag of 1. +Then the function returns to the caller with an appropriate error indication. .It If the SET step was successful for all bindings, the dependency callbacks are executed in the order in which the dependencies were created with an -operation of SNMP_DEPOP_COMMIT. If any of the dependencies fails, all the +operation of SNMP_DEPOP_COMMIT. +If any of the dependencies fails, all the committed dependencies are called again in the opposite order -with SNMP_DEPOP_ROLLBACK. Than for all bindings from the last to the first +with SNMP_DEPOP_ROLLBACK. +Than for all bindings from the last to the first the node's operation callback is called with SNMP_OP_ROLLBACK to undo -the effect of SNMP_OP_SET. At the end the dependencies are freed -and the finalizers are called with a fail flag -of 1 and the function returns to the caller with an appropriate error indication. +the effect of SNMP_OP_SET. +At the end the dependencies are freed and the finalizers are called with +a fail flag of 1 and the function returns to the caller with an appropriate +error indication. .It If the dependency commits were successful, for each binding the node's -operation callback is called with SNMP_OP_COMMIT. Any error returned from +operation callback is called with SNMP_OP_COMMIT. +Any error returned from the callbacks is ignored (an error message is generated via .Fn snmp_error ). .It Now the dependencies are freed and the finalizers are called -with a fail flag of 0. For each dependency just before freeing it +with a fail flag of 0. +For each dependency just before freeing it its callback is called with .Li SNMP_DEPOP_FINISH. Then the function returns @@ -338,20 +364,26 @@ .El .Pp There are to mechanisms to help in complex SET operations: dependencies and -finalizers. A dependency is used if several bindings depend on each other. +finalizers. +A dependency is used if several bindings depend on each other. A typical example is the creation of a conceptual row, which requires -the setting of several columns to succeed. A dependency is identified by -two OIDs. In the table case, the first oid is typically the table's base OID -and the second one the index. Both of these can easily be generated from the +the setting of several columns to succeed. +A dependency is identified by +two OIDs. +In the table case, the first oid is typically the table's base OID +and the second one the index. +Both of these can easily be generated from the variables OID with .Fn asn_slice_oid . The function .Fn snmp_dep_lookup tries to find a dependency based on these two OIDs and, if it cannot find one -creates a new one. This means for the table example, that the function +creates a new one. +This means for the table example, that the function returns the same dependency for each of the columns of the same table row. This allows during the SNMP_OP_SET processing to collect all information -about the row into the dependency. The arguments to +about the row into the dependency. +The arguments to .Fn snmp_dep_lookup are: the two OIDs to identify the dependency (they are copied into newly created dependencies), the size of the structure to allocate and @@ -369,16 +401,17 @@ .Pp The function .Fn snmp_make_errresp -makes an error response if an operation has failed. It takes the original -request PDU (it will look only on the error code and index fields), the -buffer containing the original PDU and a buffer for the error PDU. It copies -the bindings field from the original PDUs buffer directly to the response -PDU and thus does not depend on the decodability of this field. It may return -the same values as the operation functions. +makes an error response if an operation has failed. +It takes the original request PDU (it will look only on the error code and +index fields), the buffer containing the original PDU and a buffer for the +error PDU. +It copies the bindings field from the original PDUs buffer directly to +the response PDU and thus does not depend on the decodability of this field. +It may return the same values as the operation functions. .Pp The next four functions allow some parts of the SET operation to be executed. This is only used in -.Xr snmpd 1 +.Xr bsnmpd 1 to implement the configuration as a single transaction. The function .Fn snmp_init_context @@ -395,12 +428,12 @@ .Fn snmp_dep_finish executes SNMP_DEPOP_FINISH for all dependencies. .Sh DIAGNOSTICS -If an error occures in any of the function an error indication as described -above is returned. Additionally the functions may call snmp_error on unexected -errors. +If an error occurs in any of the function an error indication as described +above is returned. +Additionally the functions may call snmp_error on unexpected errors. .Sh SEE ALSO .Xr gensnmptree 1 , -.Xr snmpd 1 , +.Xr bsnmpd 1 , .Xr bsnmpclient 3 , .Xr bsnmplib 3 , .Xr snmpmod 3 ==== //depot/projects/hammer/contrib/bsnmp/lib/bsnmpclient.3#7 (text+ko) ==== @@ -29,9 +29,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Begemot: bsnmp/lib/bsnmpclient.3,v 1.9 2005/05/23 11:10:12 brandt_h Exp $ +.\" $Begemot: bsnmp/lib/bsnmpclient.3,v 1.12 2005/10/04 08:46:50 brandt_h Exp $ .\" -.Dd May 23, 2005 +.Dd October 4, 2005 .Dt BSNMPCLIENT 3 .Os .Sh NAME @@ -104,7 +104,8 @@ .Fn snmp_dialog "struct snmp_pdu *req" "struct snmp_pdu *resp" .Sh DESCRIPTION The SNMP library contains routines to easily build SNMP client applications -that use SNMP versions 1 or 2. Most of the routines use a +that use SNMP versions 1 or 2. +Most of the routines use a .Vt struct snmp_client : .Bd -literal -offset indent struct snmp_client { @@ -145,9 +146,11 @@ The fields of this structure are described below. .Bl -tag -width "timeout_start" .It Va version -This is the version of SNMP to use. See +This is the version of SNMP to use. +See .Xr bsnmplib 3 -for applicable values. The default version is +for applicable values. +The default version is .Li SNMP_V2c . .It Va trans If this is @@ -163,12 +166,14 @@ .Va chost field as the path to the server's socket for local sockets. .It Va cport -The SNMP agent's UDP port number. This may be a symbolic port number (from -.Pa /etc/services -or a numeric port number. If this field is +The SNMP agent's UDP port number. +This may be a symbolic port number (from +.Pa /etc/services ) +or a numeric port number. +If this field is .Li NULL -(the default) the standard SNMP port is used. This field should not be changed -directly but rather by calling +(the default) the standard SNMP port is used. +This field should not be changed directly but rather by calling .Fn snmp_client_set_port . .It Va chost The SNMP agent's host name, IP address or @@ -178,46 +183,52 @@ .Li NULL (the default) .Li localhost -is assumed. This field should not be changed directly but rather through -calling +is assumed. +This field should not be changed directly but rather through calling .Fn snmp_client_set_host . .It Va read_community This is the community name to be used for all requests except SET requests. The default is .Sq public . .It Va write_community -The community name to be used for SET requests. The default is +The community name to be used for SET requests. +The default is .Sq private . .It Va timeout -The maximum time to wait for responses to requests. If the time elapses, the -request is resent up to +The maximum time to wait for responses to requests. +If the time elapses, the request is resent up to .Va retries -times. The default is 3 seconds. +times. +The default is 3 seconds. .It Va retries -Number of times a request PDU is to be resent. If set to 0, the request is -sent only once. The default is 3 retransmissions. +Number of times a request PDU is to be resent. +If set to 0, the request is sent only once. +The default is 3 retransmissions. .It Va dump_pdus If set to a non-zero value all received and sent PDUs are dumped via .Xr snmp_pdu_dump 3 . The default is not to dump PDUs. .It Va txbuflen -The encoding buffer size to be allocated for transmitted PDUs. The default is -10000 octets. +The encoding buffer size to be allocated for transmitted PDUs. +The default is 10000 octets. .It Va rxbuflen -The decoding buffer size to be allocated for received PDUs. This is the size -of the maximum PDU that can be received. The default is 10000 octets. +The decoding buffer size to be allocated for received PDUs. +This is the size of the maximum PDU that can be received. +The default is 10000 octets. .It Va fd After calling .Fn snmp_open this is the file socket file descriptor used for sending and receiving PDUs. .It Va next_reqid -The request id of the next PDU to send. Used internal by the library. +The request id of the next PDU to send. +Used internal by the library. .It Va max_reqid -The maximum request id to use for outging PDUs. The default is +The maximum request id to use for outgoing PDUs. +The default is .Li INT32_MAX . .It Va min_reqid -The minimum request id to use for outgoing PDUs. Request ids are allocated -linerily starting at +The minimum request id to use for outgoing PDUs. +Request ids are allocated linearily starting at .Va min_reqid up to .Va max_reqid . @@ -225,29 +236,30 @@ If an error happens, this field is set to a printable string describing the error. .It Va timeout_start -This field must point to a function setting up a one shot timeout. After the >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Oct 4 21:44:25 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 219A616A423; Tue, 4 Oct 2005 21:44:25 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4AC716A41F for ; Tue, 4 Oct 2005 21:44:24 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9486A43D49 for ; Tue, 4 Oct 2005 21:44:24 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j94LiO78067882 for ; Tue, 4 Oct 2005 21:44:24 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j94LiO8e067879 for perforce@freebsd.org; Tue, 4 Oct 2005 21:44:24 GMT (envelope-from peter@freebsd.org) Date: Tue, 4 Oct 2005 21:44:24 GMT Message-Id: <200510042144.j94LiO8e067879@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 84816 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2005 21:44:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=84816 Change 84816 by peter@peter_daintree on 2005/10/04 21:43:32 Integ -b i386_hammer Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/apic_vector.S#29 integrate .. //depot/projects/hammer/sys/amd64/amd64/local_apic.c#57 integrate .. //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#107 integrate .. //depot/projects/hammer/sys/amd64/amd64/trap.c#76 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/apic_vector.S#29 (text+ko) ==== ==== //depot/projects/hammer/sys/amd64/amd64/local_apic.c#57 (text+ko) ==== @@ -312,7 +312,7 @@ /* Program timer LVT and setup handler. */ lapic->lvt_timer = lvt_mode(la, LVT_TIMER, lapic->lvt_timer); - snprintf(buf, sizeof(buf), "lapic%d: timer", lapic_id()); + snprintf(buf, sizeof(buf), "cpu%d: timer", PCPU_GET(cpuid)); intrcnt_add(buf, &la->la_timer_count); if (PCPU_GET(cpuid) != 0) { KASSERT(lapic_timer_period != 0, ("lapic%u: zero divisor", ==== //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#107 (text+ko) ==== ==== //depot/projects/hammer/sys/amd64/amd64/trap.c#76 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Tue Oct 4 22:11:00 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C4D0D16A421; Tue, 4 Oct 2005 22:10:59 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 98DA316A41F for ; Tue, 4 Oct 2005 22:10:59 +0000 (GMT) (envelope-from soc-chenk@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5941F43D45 for ; Tue, 4 Oct 2005 22:10:59 +0000 (GMT) (envelope-from soc-chenk@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j94MAx1A069881 for ; Tue, 4 Oct 2005 22:10:59 GMT (envelope-from soc-chenk@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j94MAwmr069878 for perforce@freebsd.org; Tue, 4 Oct 2005 22:10:58 GMT (envelope-from soc-chenk@freebsd.org) Date: Tue, 4 Oct 2005 22:10:58 GMT Message-Id: <200510042210.j94MAwmr069878@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-chenk@freebsd.org using -f From: soc-chenk To: Perforce Change Reviews Cc: Subject: PERFORCE change 84822 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2005 22:11:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=84822 Change 84822 by soc-chenk@soc-chenk_leavemealone on 2005/10/04 22:10:14 Fixes in library patch Submitted by: soc-chenk Affected files ... .. //depot/projects/soc2005/fuse4bsd2/Changelog#14 edit .. //depot/projects/soc2005/fuse4bsd2/fuselib/fuselib-2.4.0-rc1.diff#2 edit Differences ... ==== //depot/projects/soc2005/fuse4bsd2/Changelog#14 (text+ko) ==== @@ -1,3 +1,8 @@ +Tue Oct 4 23:16:26 CEST 2005 at node: creo.hu, nick: csaba + * Fixes in library patch + - trying again to get mknod right + - let "use_ino" option take effect + Fri Sep 30 16:18:46 CEST 2005 at node: creo.hu, nick: csaba * removed superfluous unlock in fuse_root ==== //depot/projects/soc2005/fuse4bsd2/fuselib/fuselib-2.4.0-rc1.diff#2 (text+ko) ==== @@ -1,6 +1,6 @@ diff -Naur linuxfuse/example/fusexmp.c bsdfuse/example/fusexmp.c --- linuxfuse/example/fusexmp.c Tue Sep 13 21:26:12 2005 -+++ bsdfuse/example/fusexmp.c Fri Sep 30 11:34:16 2005 ++++ bsdfuse/example/fusexmp.c Tue Oct 4 23:02:55 2005 @@ -20,7 +20,12 @@ #include #include @@ -14,7 +14,7 @@ #ifdef HAVE_SETXATTR #include #endif -@@ -79,7 +84,17 @@ +@@ -79,7 +84,20 @@ { int res; @@ -25,8 +25,11 @@ + res = mknod(path, mode, rdev); + else if (mode & S_IFIFO) + res = mkfifo(path, mode); -+ else ++ else { + res = open(path, O_CREAT | O_TRUNC | O_WRONLY, mode); ++ if (res >= 0) ++ res = close(res); ++ } +#endif + if(res == -1) @@ -34,7 +37,7 @@ diff -Naur linuxfuse/example/fusexmp_fh.c bsdfuse/example/fusexmp_fh.c --- linuxfuse/example/fusexmp_fh.c Tue Sep 13 21:26:12 2005 -+++ bsdfuse/example/fusexmp_fh.c Fri Sep 30 11:34:00 2005 ++++ bsdfuse/example/fusexmp_fh.c Tue Oct 4 23:04:44 2005 @@ -17,7 +17,12 @@ #include #include @@ -60,7 +63,7 @@ break; } -@@ -87,7 +96,17 @@ +@@ -87,7 +96,20 @@ { int res; @@ -71,18 +74,23 @@ + res = mknod(path, mode, rdev); + else if (mode & S_IFIFO) + res = mkfifo(path, mode); -+ else ++ else { + res = open(path, O_CREAT | O_TRUNC | O_WRONLY, mode); ++ if (res >= 0) ++ res = close(res); ++ } +#endif + if(res == -1) return -errno; -@@ -268,9 +287,11 @@ +@@ -268,9 +290,13 @@ int res; (void) path; -+#ifndef __FreeBSD__ ++#ifdef __FreeBSD__ ++ (void) isdatasync; ++#else if (isdatasync) res = fdatasync(fi->fh); else @@ -124,7 +132,7 @@ #ifdef __cplusplus diff -Naur linuxfuse/lib/fuse.c bsdfuse/lib/fuse.c --- linuxfuse/lib/fuse.c Thu Sep 8 17:16:49 2005 -+++ bsdfuse/lib/fuse.c Fri Sep 30 11:29:31 2005 ++++ bsdfuse/lib/fuse.c Fri Sep 30 17:59:29 2005 @@ -1414,7 +1414,12 @@ static int default_statfs(struct statfs *buf) @@ -150,20 +158,18 @@ } static void fuse_statfs(fuse_req_t req) -@@ -1759,10 +1768,12 @@ - *d++ = ','; - } else if (strcmp(opt, "hard_remove") == 0) +@@ -1761,8 +1770,10 @@ f->flags |= FUSE_HARD_REMOVE; -+#ifndef FreeBSD else if (strcmp(opt, "use_ino") == 0) f->flags |= FUSE_USE_INO; ++#ifndef FreeBSD else if (strcmp(opt, "readdir_ino") == 0) f->flags |= FUSE_READDIR_INO; +#endif else if (strcmp(opt, "direct_io") == 0) f->flags |= FUSE_DIRECT_IO; else if (strcmp(opt, "kernel_cache") == 0) -@@ -1787,6 +1798,14 @@ +@@ -1787,6 +1798,13 @@ else free(xopts); } @@ -172,7 +178,6 @@ + * In FreeBSD, we always use these settings as inode numbers are needed to + * make getcwd(3) work. + */ -+ f->flags &= ~FUSE_USE_INO; + f->flags |= FUSE_READDIR_INO; +#endif return 0; @@ -207,7 +212,7 @@ in->opcode != FUSE_WRITE && in->opcode != FUSE_FSYNC && diff -Naur linuxfuse/lib/helper.c bsdfuse/lib/helper.c --- linuxfuse/lib/helper.c Mon Aug 15 16:03:59 2005 -+++ bsdfuse/lib/helper.c Fri Sep 30 11:29:31 2005 ++++ bsdfuse/lib/helper.c Fri Sep 30 17:57:56 2005 @@ -22,7 +22,11 @@ { if (progname) @@ -220,12 +225,11 @@ fprintf(stderr, "FUSE options:\n" -@@ -44,12 +48,20 @@ - " hard_remove immediate removal (don't hide files)\n" +@@ -45,11 +49,19 @@ " debug enable debug output\n" " fsname=NAME set filesystem name in mtab\n" + " use_ino let filesystem set inode numbers\n" +#ifndef __FreeBSD__ - " use_ino let filesystem set inode numbers\n" " readdir_ino try to fill in d_ino in readdir\n" +#endif " nonempty allow mounts over non-empty file/dir\n" From owner-p4-projects@FreeBSD.ORG Tue Oct 4 22:40:45 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EE2C116A421; Tue, 4 Oct 2005 22:40:44 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9079216A426 for ; Tue, 4 Oct 2005 22:40:44 +0000 (GMT) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5007943D55 for ; Tue, 4 Oct 2005 22:40:37 +0000 (GMT) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j94MebKV072256 for ; Tue, 4 Oct 2005 22:40:37 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j94MeaFa072253 for perforce@freebsd.org; Tue, 4 Oct 2005 22:40:36 GMT (envelope-from cognet@freebsd.org) Date: Tue, 4 Oct 2005 22:40:36 GMT Message-Id: <200510042240.j94MeaFa072253@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 84827 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2005 22:40:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=84827 Change 84827 by cognet@cognet on 2005/10/04 22:39:38 Grr apparently I managed to mess up with my local CVS repo and cvs wasn't diffing a lot of new files, so here are they again. Frame unwinding across traps now works. Affected files ... .. //depot/projects/arm/gnu-arm.diff#8 edit Differences ... ==== //depot/projects/arm/gnu-arm.diff#8 (text+ko) ==== @@ -62,6 +62,58 @@ NO_GDB= # not yet .endif +Index: gnu/usr.bin/binutils/as/arm-freebsd/targ-cpu.h +=================================================================== +RCS file: gnu/usr.bin/binutils/as/arm-freebsd/targ-cpu.h +diff -N gnu/usr.bin/binutils/as/arm-freebsd/targ-cpu.h +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ gnu/usr.bin/binutils/as/arm-freebsd/targ-cpu.h 29 Aug 2005 12:39:27 -0000 +@@ -0,0 +1,3 @@ ++/* $FreeBSD$ */ ++ ++#include "tc-arm.h" +Index: gnu/usr.bin/binutils/libbfd/Makefile.arm +=================================================================== +RCS file: gnu/usr.bin/binutils/libbfd/Makefile.arm +diff -N gnu/usr.bin/binutils/libbfd/Makefile.arm +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ gnu/usr.bin/binutils/libbfd/Makefile.arm 29 Aug 2005 12:39:27 -0000 +@@ -0,0 +1,24 @@ ++# $FreeBSD$ ++ ++DEFAULT_VECTOR= bfd_elf32_littlearm_vec ++ ++SRCS+= \ ++ cpu-arm.c \ ++ elf32.c \ ++ elf32-gen.c \ ++ elflink.c \ ++ elfarm-nabi.c \ ++ elfarm-oabi.c \ ++ elf32-arm-fbsd.c \ ++ elf32-target.h ++VECS+= ${DEFAULT_VECTOR} \ ++ bfd_elf32_bigarm_vec ++ ++.if ${TARGET_ARCH} == "arm" ++CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR} ++.endif ++ ++CLEANFILES+= elf32-arm-fbsd.c ++ ++elf32-arm-fbsd.c: elfarm-nabi.c ++ cat ${.ALLSRC} | sed s/ELFOSABI_ARM/ELFOSABI_FREEBSD/g >${.TARGET} +Index: gnu/usr.bin/binutils/libopcodes/Makefile.arm +=================================================================== +RCS file: gnu/usr.bin/binutils/libopcodes/Makefile.arm +diff -N gnu/usr.bin/binutils/libopcodes/Makefile.arm +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ gnu/usr.bin/binutils/libopcodes/Makefile.arm 29 Aug 2005 12:39:27 -0000 +@@ -0,0 +1,4 @@ ++# $FreeBSD$ ++ ++SRCS+= arm-dis.c ++CFLAGS+= -DARCH_arm Index: gnu/usr.bin/cc/cc_tools/Makefile =================================================================== RCS file: /cognet/ncvs/src/gnu/usr.bin/cc/cc_tools/Makefile,v @@ -107,3 +159,1025 @@ /* The number of bytes in type long */ # define SIZEOF_LONG SIZEOF_INT #elif defined(__alpha__) || defined(__sparc64__) || defined(__ia64__) || defined(__amd64__) +Index: gnu/usr.bin/gdb/arch/arm/Makefile +=================================================================== +RCS file: gnu/usr.bin/gdb/arch/arm/Makefile +diff -N gnu/usr.bin/gdb/arch/arm/Makefile +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ gnu/usr.bin/gdb/arch/arm/Makefile 29 Aug 2005 12:39:27 -0000 +@@ -0,0 +1,16 @@ ++# $FreeBSD$ ++ ++GENSRCS+= xm.h ++.if !defined(GDB_CROSS_DEBUGGER) ++LIBSRCS+= armfbsd-nat.c ++.endif ++LIBSRCS+= arm-tdep.c armfbsd-tdep.c solib.c solib-svr4.c ++ ++nm.h: ++ echo '#include "arm/nm-fbsd.h"' > ${.TARGET} ++ ++tm.h: ++ echo '#include "arm/tm-fbsd.h"' > ${.TARGET} ++ ++xm.h: ++ echo '#include "arm/xm-fbsd.h"' > ${.TARGET} +Index: gnu/usr.bin/gdb/arch/arm/config.h +=================================================================== +RCS file: gnu/usr.bin/gdb/arch/arm/config.h +diff -N gnu/usr.bin/gdb/arch/arm/config.h +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ gnu/usr.bin/gdb/arch/arm/config.h 29 Aug 2005 12:39:27 -0000 +@@ -0,0 +1,553 @@ ++/* $FreeBSD$ */ ++ ++/* config.h. Generated automatically by configure. */ ++/* config.in. Generated automatically from configure.in by autoheader. */ ++ ++/* Define if on AIX 3. ++ System headers sometimes define this. ++ We just want to avoid a redefinition error message. */ ++#ifndef _ALL_SOURCE ++/* #undef _ALL_SOURCE */ ++#endif ++ ++/* Define if using alloca.c. */ ++/* #undef C_ALLOCA */ ++ ++/* Define to empty if the keyword does not work. */ ++/* #undef const */ ++ ++/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. ++ This function is required for alloca.c support on those systems. */ ++/* #undef CRAY_STACKSEG_END */ ++ ++/* Define if you have alloca, as a function or macro. */ ++#define HAVE_ALLOCA 1 ++ ++/* Define if you have and it should be used (not on Ultrix). */ ++/* #undef HAVE_ALLOCA_H */ ++ ++/* Define if the `long double' type works. */ ++#define HAVE_LONG_DOUBLE 1 ++ ++/* Define if you have a working `mmap' system call. */ ++#define HAVE_MMAP 1 ++ ++/* Define if you have . */ ++/* #undef HAVE_VFORK_H */ ++ ++/* Define as __inline if that's what the C compiler calls it. */ ++/* #undef inline */ ++ ++/* Define to `long' if doesn't define. */ ++/* #undef off_t */ ++ ++/* Define to `int' if doesn't define. */ ++/* #undef pid_t */ ++ ++/* Define if you need to in order for stat and other things to work. */ ++/* #undef _POSIX_SOURCE */ ++ ++/* Define as the return type of signal handlers (int or void). */ ++#define RETSIGTYPE void ++ ++/* Define if the `setpgrp' function takes no argument. */ ++/* #undef SETPGRP_VOID */ ++ ++/* Define to `unsigned' if doesn't define. */ ++/* #undef size_t */ ++ ++/* If using the C implementation of alloca, define if you know the ++ direction of stack growth for your system; otherwise it will be ++ automatically deduced at run-time. ++ STACK_DIRECTION > 0 => grows toward higher addresses ++ STACK_DIRECTION < 0 => grows toward lower addresses ++ STACK_DIRECTION = 0 => direction of growth unknown ++ */ ++/* #undef STACK_DIRECTION */ ++ ++/* Define if the `S_IS*' macros in do not work properly. */ ++/* #undef STAT_MACROS_BROKEN */ ++ ++/* Define if you have the ANSI C header files. */ ++#define STDC_HEADERS 1 ++ ++/* Define vfork as fork if vfork does not work. */ ++/* #undef vfork */ ++ ++/* Enable GNU extensions on systems that have them. */ ++#ifndef _GNU_SOURCE ++# define _GNU_SOURCE 1 ++#endif ++ ++/* Define if your struct reg has r_fs. */ ++/* #define HAVE_STRUCT_REG_R_FS 1 */ ++ ++/* Define if your struct stat has st_blocks. */ ++#define HAVE_STRUCT_STAT_ST_BLOCKS 1 ++ ++/* Define if your struct reg has r_gs. */ ++/* #define HAVE_STRUCT_REG_R_GS 1 */ ++ ++/* Define if exists and defines struct link_map which has ++ members with an ``l_'' prefix. (For Solaris, SVR4, and ++ SVR4-like systems.) */ ++#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 ++ ++/* Define if exists and defines struct link_map which has ++ members with an ``lm_'' prefix. (For SunOS.) */ ++/* #undef HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS */ ++ ++/* Define if exists and defines a struct so_map which has ++ members with an ``som_'' prefix. (Found on older *BSD systems.) */ ++/* #undef HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS */ ++ ++/* Define if has struct link_map32 */ ++/* #undef HAVE_STRUCT_LINK_MAP32 */ ++ ++/* Define if has link_map32 (solaris sparc-64 target) */ ++/* #undef _SYSCALL32 */ ++ ++/* Define if the prfpregset_t type is broken. */ ++/* #undef PRFPREGSET_T_BROKEN */ ++ ++/* Define if you want to use new multi-fd /proc interface ++ (replaces HAVE_MULTIPLE_PROC_FDS as well as other macros). */ ++/* #undef NEW_PROC_API */ ++ ++/* Define if ioctl argument PIOCSET is available. */ ++/* #undef HAVE_PROCFS_PIOCSET */ ++ ++/* Define if the `long long' type works. */ ++#define CC_HAS_LONG_LONG 1 ++ ++/* Define if the "ll" format works to print long long ints. */ ++#define PRINTF_HAS_LONG_LONG 1 ++ ++/* Define if the "%Lg" format works to print long doubles. */ ++#define PRINTF_HAS_LONG_DOUBLE 1 ++ ++/* Define if the "%Lg" format works to scan long doubles. */ ++#define SCANF_HAS_LONG_DOUBLE 1 ++ ++/* Define if using Solaris thread debugging. */ ++/* #undef HAVE_THREAD_DB_LIB */ ++ ++/* Define on a GNU/Linux system to work around problems in sys/procfs.h. */ ++/* #undef START_INFERIOR_TRAPS_EXPECTED */ ++/* #undef sys_quotactl */ ++ ++/* Define if you have HPUX threads */ ++/* #undef HAVE_HPUX_THREAD_SUPPORT */ ++ ++/* Define if on solaris uses int instead of ++ size_t, and assorted other type changes. */ ++/* #undef PROC_SERVICE_IS_OLD */ ++ ++/* Define if the simulator is being linked in. */ ++#define WITH_SIM 1 ++ ++/* Set to true if the save_state_t structure is present */ ++/* #undef HAVE_STRUCT_SAVE_STATE_T */ ++ ++/* Set to true if the save_state_t structure has the ss_wide member */ ++/* #undef HAVE_STRUCT_MEMBER_SS_WIDE */ ++ ++/* Define if defines the PTRACE_GETREGS request. */ ++/* #undef HAVE_PTRACE_GETREGS */ ++ ++/* Define if defines the PTRACE_GETFPXREGS request. */ ++/* #undef HAVE_PTRACE_GETFPXREGS */ ++ ++/* Define if defines the PT_GETDBREGS request. */ ++#define HAVE_PT_GETDBREGS 1 ++ ++/* Define if defines the PT_GETXMMREGS request. */ ++/* #undef HAVE_PT_GETXMMREGS */ ++ ++/* Define if libunwind library is being used. */ ++/* #undef HAVE_LIBUNWIND */ ++ ++/* hostfile */ ++#define GDB_XM_FILE config/arm/xm-nbsd.h ++ ++/* targetfile */ ++#define GDB_TM_FILE config/arm/tm-fbsd.h ++ ++/* nativefile */ ++#ifndef CROSS_DEBUGGER ++#define GDB_NM_FILE config/arm/nm-fbsd.h ++#endif ++ ++/* Define to 1 so gets a definition of anon_hdl. Works ++ around a problem on IRIX 5. */ ++#ifndef _KMEMUSER ++/* #undef _KMEMUSER */ ++#endif ++ ++/* Define if you have the __argz_count function. */ ++/* #undef HAVE___ARGZ_COUNT */ ++ ++/* Define if you have the __argz_next function. */ ++/* #undef HAVE___ARGZ_NEXT */ ++ ++/* Define if you have the __argz_stringify function. */ ++/* #undef HAVE___ARGZ_STRINGIFY */ ++ ++/* Define if you have the _mcleanup function. */ ++#define HAVE__MCLEANUP 1 ++ ++/* Define if you have the canonicalize_file_name function. */ ++/* #undef HAVE_CANONICALIZE_FILE_NAME */ ++ ++/* Define if you have the dcgettext function. */ ++/* #undef HAVE_DCGETTEXT */ ++ ++/* Define if you have the getcwd function. */ ++#define HAVE_GETCWD 1 ++ ++/* Define if you have the getpagesize function. */ ++#define HAVE_GETPAGESIZE 1 ++ ++/* Define if you have the monstartup function. */ ++#define HAVE_MONSTARTUP 1 ++ ++/* Define if you have the munmap function. */ ++#define HAVE_MUNMAP 1 ++ ++/* Define if you have the poll function. */ ++#define HAVE_POLL 1 ++ ++/* Define if you have the pread64 function. */ ++/* #undef HAVE_PREAD64 */ ++ ++/* Define if you have the putenv function. */ ++#define HAVE_PUTENV 1 ++ ++/* Define if you have the realpath function. */ ++#define HAVE_REALPATH 1 ++ ++/* Define if you have the sbrk function. */ ++#define HAVE_SBRK 1 ++ ++/* Define if you have the setenv function. */ ++#define HAVE_SETENV 1 ++ ++/* Define if you have the setlocale function. */ ++#define HAVE_SETLOCALE 1 ++ ++/* Define if you have the setpgid function. */ ++#define HAVE_SETPGID 1 ++ ++/* Define if you have the setpgrp function. */ ++#define HAVE_SETPGRP 1 ++ ++/* Define if you have the sigaction function. */ ++#define HAVE_SIGACTION 1 ++ ++/* Define if you have the sigprocmask function. */ ++#define HAVE_SIGPROCMASK 1 ++ ++/* Define if you have the sigsetmask function. */ ++#define HAVE_SIGSETMASK 1 ++ ++/* Define if you have the socketpair function. */ ++#define HAVE_SOCKETPAIR 1 ++ ++/* Define if you have the stpcpy function. */ ++#define HAVE_STPCPY 1 ++ ++/* Define if you have the strcasecmp function. */ ++#define HAVE_STRCASECMP 1 ++ ++/* Define if you have the strchr function. */ ++#define HAVE_STRCHR 1 ++ ++/* Define if you have the syscall function. */ ++#define HAVE_SYSCALL 1 ++ ++/* Define if you have the header file. */ ++/* #undef HAVE_ARGZ_H */ ++ ++/* Define if you have the header file. */ ++#define HAVE_CTYPE_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_CURSES_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_DIRENT_H 1 ++ ++/* Define if you have the header file. */ ++/* #undef HAVE_LIBUNWIND_IA64_H */ ++ ++/* Define if you have the header file. */ ++/* #undef HAVE_LIBUNWIND_H */ ++ ++/* Define if you have the header file. */ ++#define HAVE_LIMITS_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_LINK_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_LOCALE_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_MACHINE_REG_H 1 ++ ++/* Define if you have the header file. */ ++/* #undef HAVE_MALLOC_H */ ++ ++/* Define if you have the header file. */ ++#define HAVE_MEMORY_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_NCURSES_H 1 ++ ++/* Define if you have the header file. */ ++/* #undef HAVE_NDIR_H */ ++ ++/* Define if you have the header file. */ ++#define HAVE_NL_TYPES_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_NLIST_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_POLL_H 1 ++ ++/* Define if you have the header file. */ ++/* #undef HAVE_PROC_SERVICE_H */ ++ ++/* Define if you have the header file. */ ++/* #undef HAVE_PTRACE_H */ ++ ++/* Define if you have the header file. */ ++#define HAVE_SGTTY_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_STDDEF_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_STDINT_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_STDLIB_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_STRING_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_STRINGS_H 1 ++ ++/* Define if you have the header file. */ ++/* #undef HAVE_SYS_DEBUGREG_H */ ++ ++/* Define if you have the header file. */ ++/* #undef HAVE_SYS_DIR_H */ ++ ++/* Define if you have the header file. */ ++/* #undef HAVE_SYS_FAULT_H */ ++ ++/* Define if you have the header file. */ ++#define HAVE_SYS_FILE_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_SYS_FILIO_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_SYS_IOCTL_H 1 ++ ++/* Define if you have the header file. */ ++/* #undef HAVE_SYS_NDIR_H */ ++ ++/* Define if you have the header file. */ ++#define HAVE_SYS_PARAM_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_SYS_POLL_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_SYS_PROC_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_SYS_PROCFS_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_SYS_PTRACE_H 1 ++ ++/* Define if you have the header file. */ ++/* #undef HAVE_SYS_REG_H */ ++ ++/* Define if you have the header file. */ ++#define HAVE_SYS_SELECT_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_SYS_SYSCALL_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_SYS_USER_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_SYS_WAIT_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_TERM_H 1 ++ ++/* Define if you have the header file. */ ++/* #undef HAVE_TERMIO_H */ ++ ++/* Define if you have the header file. */ ++#define HAVE_TERMIOS_H 1 ++ ++/* Define if you have the header file. */ ++/* #undef HAVE_THREAD_DB_H */ ++ ++/* Define if you have the header file. */ ++#define HAVE_TIME_H 1 ++ ++/* Define if you have the header file. */ ++#define HAVE_UNISTD_H 1 ++ ++/* Define if you have the header file. */ ++/* #undef HAVE_VALUES_H */ ++ ++/* Define if you have the header file. */ ++/* #undef HAVE_WAIT_H */ ++ ++/* Define if you have the dl library (-ldl). */ ++/* #undef HAVE_LIBDL */ ++ ++/* Define if you have the m library (-lm). */ ++#define HAVE_LIBM 1 ++ ++/* Define if you have the w library (-lw). */ ++/* #undef HAVE_LIBW */ ++ ++/* Define if you have the stpcpy function */ ++#define HAVE_STPCPY 1 ++ ++/* Define if your locale.h file contains LC_MESSAGES. */ ++#define HAVE_LC_MESSAGES 1 ++ ++/* Define to 1 if NLS is requested */ ++/* #undef ENABLE_NLS */ ++ ++/* Define as 1 if you have gettext and don't want to use GNU gettext. */ ++/* #undef HAVE_GETTEXT */ ++ ++/* Name of this package. */ ++#define PACKAGE "gdb" ++ ++/* Global directory for separate debug files. */ ++#define DEBUGDIR "/usr/local/lib/debug" ++ ++/* Define to BFD's default architecture. */ ++#define DEFAULT_BFD_ARCH bfd_arm_arch ++ ++/* Define to BFD's default target vector. */ ++#define DEFAULT_BFD_VEC bfd_elf32_littlearm_vec ++ ++/* Define to 1 if your system has the _etext variable. */ ++#define HAVE__ETEXT 1 ++ ++/* Define to 1 to avoid a clash between and on ++ Solaris 2.[78] when using GCC. */ ++/* #undef _MSE_INT_H */ ++ ++/* Define to 1 if we found this declaration otherwise define to 0. */ ++#define HAVE_DECL_GETOPT 0 ++ ++/* Define if sigsetjmp is available. */ ++#define HAVE_SIGSETJMP 1 ++ ++/* Define to 1 if the regex included in libiberty should be used. */ ++#define USE_INCLUDED_REGEX 1 ++ ++/* Define to 1 if your system has struct reg in . */ ++#define HAVE_STRUCT_REG 1 ++ ++/* Define if provides the uintptr_t type. */ ++#define HAVE_UINTPTR_T 1 ++ ++/* Define if malloc is not declared in system header files. */ ++/* #undef NEED_DECLARATION_MALLOC */ ++ ++/* Define if realloc is not declared in system header files. */ ++/* #undef NEED_DECLARATION_REALLOC */ ++ ++/* Define if free is not declared in system header files. */ ++/* #undef NEED_DECLARATION_FREE */ ++ ++/* Define if strerror is not declared in system header files. */ ++/* #undef NEED_DECLARATION_STRERROR */ ++ ++/* Define if strdup is not declared in system header files. */ ++/* #undef NEED_DECLARATION_STRDUP */ ++ ++/* Define if strstr is not declared in system header files. */ ++/* #undef NEED_DECLARATION_STRSTR */ ++ ++/* Define if canonicalize_file_name is not declared in system header files. */ ++#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 ++ ++/* Define if has pstatus_t. */ ++/* #undef HAVE_PSTATUS_T */ ++ ++/* Define if has prrun_t. */ ++/* #undef HAVE_PRRUN_T */ ++ ++/* Define if has gregset_t. */ ++#define HAVE_GREGSET_T 1 ++ ++/* Define if has fpregset_t. */ ++#define HAVE_FPREGSET_T 1 ++ ++/* Define if has prgregset_t. */ ++#define HAVE_PRGREGSET_T 1 ++ ++/* Define if has prfpregset_t. */ ++#define HAVE_PRFPREGSET_T 1 ++ ++/* Define if has prgregset32_t. */ ++/* #undef HAVE_PRGREGSET32_T */ ++ ++/* Define if has prfpregset32_t. */ ++/* #undef HAVE_PRFPREGSET32_T */ ++ ++/* Define if has lwpid_t. */ ++#define HAVE_LWPID_T 1 ++ ++/* Define if has psaddr_t. */ ++#define HAVE_PSADDR_T 1 ++ ++/* Define if has prsysent_t. */ ++/* #undef HAVE_PRSYSENT_T */ ++ ++/* Define if has pr_sigset_t. */ ++/* #undef HAVE_PR_SIGSET_T */ ++ ++/* Define if has pr_sigaction64_t. */ ++/* #undef HAVE_PR_SIGACTION64_T */ ++ ++/* Define if has pr_siginfo64_t. */ ++/* #undef HAVE_PR_SIGINFO64_T */ ++ ++/* Define if has the TD_NOTALLOC error code. */ ++/* #undef THREAD_DB_HAS_TD_NOTALLOC */ ++ ++/* Define if we can use the tkill syscall. */ ++/* #undef HAVE_TKILL_SYSCALL */ ++ ++/* Define to the default OS ABI for this configuration. */ ++/* #undef GDB_OSABI_DEFAULT */ ++ ++/* Define to be a string naming the default host character set. */ ++#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" ++ ++/* Define if you have the iconv() function. */ ++/* #undef HAVE_ICONV */ ++ ++/* Define as const if the declaration of iconv() needs const. */ ++/* #undef ICONV_CONST */ ++ +Index: gnu/usr.bin/gdb/arch/arm/init.c +=================================================================== +RCS file: gnu/usr.bin/gdb/arch/arm/init.c +diff -N gnu/usr.bin/gdb/arch/arm/init.c +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ gnu/usr.bin/gdb/arch/arm/init.c 29 Aug 2005 12:39:27 -0000 +@@ -0,0 +1,226 @@ ++/* $FreeBSD$ */ ++ ++/* Do not modify this file. */ ++/* It is created automatically by the Makefile. */ ++#include "defs.h" /* For initialize_file_ftype. */ ++#include "call-cmds.h" /* For initialize_all_files. */ ++extern initialize_file_ftype _initialize_gdbtypes; ++extern initialize_file_ftype _initialize_arm_tdep; ++extern initialize_file_ftype _initialize_armfbsd_tdep; ++extern initialize_file_ftype _initialize_corelow; ++extern initialize_file_ftype _initialize_solib; ++extern initialize_file_ftype _initialize_svr4_solib; ++extern initialize_file_ftype _initialize_ser_hardwire; ++extern initialize_file_ftype _initialize_ser_pipe; ++extern initialize_file_ftype _initialize_ser_tcp; ++#ifndef CROSS_DEBUGGER ++extern initialize_file_ftype _initialize_kernel_u_addr; ++extern initialize_file_ftype _initialize_infptrace; ++extern initialize_file_ftype _initialize_inftarg; ++extern initialize_file_ftype _initialize_arm_fbsdnat; ++#endif ++extern initialize_file_ftype _initialize_remote; ++extern initialize_file_ftype _initialize_dcache; ++extern initialize_file_ftype _initialize_sr_support; ++extern initialize_file_ftype _initialize_tracepoint; ++extern initialize_file_ftype _initialize_ax_gdb; ++extern initialize_file_ftype _initialize_annotate; ++extern initialize_file_ftype _initialize_auxv; ++extern initialize_file_ftype _initialize_breakpoint; ++extern initialize_file_ftype _initialize_regcache; ++extern initialize_file_ftype _initialize_charset; ++extern initialize_file_ftype _initialize_dummy_frame; ++extern initialize_file_ftype _initialize_source; ++extern initialize_file_ftype _initialize_values; ++extern initialize_file_ftype _initialize_valops; ++extern initialize_file_ftype _initialize_valarith; ++extern initialize_file_ftype _initialize_valprint; ++extern initialize_file_ftype _initialize_printcmd; ++extern initialize_file_ftype _initialize_symtab; ++extern initialize_file_ftype _initialize_symfile; ++extern initialize_file_ftype _initialize_symmisc; ++extern initialize_file_ftype _initialize_infcall; ++extern initialize_file_ftype _initialize_infcmd; ++extern initialize_file_ftype _initialize_infrun; ++extern initialize_file_ftype _initialize_stack; ++extern initialize_file_ftype _initialize_thread; ++extern initialize_file_ftype _initialize_interpreter; ++extern initialize_file_ftype _initialize_macrocmd; ++extern initialize_file_ftype _initialize_gdbarch; ++extern initialize_file_ftype _initialize_gdbarch_utils; ++extern initialize_file_ftype _initialize_gdb_osabi; ++extern initialize_file_ftype _initialize_copying; ++extern initialize_file_ftype _initialize_mem; ++extern initialize_file_ftype _initialize_parse; ++extern initialize_file_ftype _initialize_language; ++extern initialize_file_ftype _initialize_frame_reg; ++extern initialize_file_ftype _initialize_signals; ++extern initialize_file_ftype _initialize_kod; ++extern initialize_file_ftype _initialize_gdb_events; ++extern initialize_file_ftype _initialize_exec; ++extern initialize_file_ftype _initialize_maint_cmds; ++extern initialize_file_ftype _initialize_demangler; ++extern initialize_file_ftype _initialize_dbxread; ++extern initialize_file_ftype _initialize_coffread; ++extern initialize_file_ftype _initialize_elfread; ++extern initialize_file_ftype _initialize_mipsread; ++extern initialize_file_ftype _initialize_stabsread; ++extern initialize_file_ftype _initialize_core; ++extern initialize_file_ftype _initialize_dwarf2_frame; ++extern initialize_file_ftype _initialize_c_language; ++extern initialize_file_ftype _initialize_f_language; ++extern initialize_file_ftype _initialize_objc_language; ++extern initialize_file_ftype _initialize_ui_out; ++extern initialize_file_ftype _initialize_cli_out; ++extern initialize_file_ftype _initialize_varobj; ++extern initialize_file_ftype _initialize_java_language; ++extern initialize_file_ftype _initialize_m2_language; ++extern initialize_file_ftype _initialize_pascal_language; ++extern initialize_file_ftype _initialize_pascal_valprint; ++extern initialize_file_ftype _initialize_scheme_language; ++extern initialize_file_ftype _initialize_complaints; ++extern initialize_file_ftype _initialize_typeprint; ++extern initialize_file_ftype _initialize_cp_valprint; ++extern initialize_file_ftype _initialize_f_valprint; ++extern initialize_file_ftype _initialize_nlmread; ++extern initialize_file_ftype _initialize_serial; ++extern initialize_file_ftype _initialize_mdebugread; ++extern initialize_file_ftype _initialize_user_regs; ++extern initialize_file_ftype _initialize_frame; ++extern initialize_file_ftype _initialize_frame_unwind; ++extern initialize_file_ftype _initialize_frame_base; ++extern initialize_file_ftype _initialize_gnu_v2_abi; ++extern initialize_file_ftype _initialize_gnu_v3_abi; ++extern initialize_file_ftype _initialize_hpacc_abi; ++extern initialize_file_ftype _initialize_cp_abi; ++extern initialize_file_ftype _initialize_cp_support; ++extern initialize_file_ftype _initialize_cp_namespace; ++extern initialize_file_ftype _initialize_reggroup; ++extern initialize_file_ftype _initialize_inflow; ++extern initialize_file_ftype _initialize_cli_dump; ++extern initialize_file_ftype _initialize_cli_logging; ++extern initialize_file_ftype _initialize_cli_interp; ++extern initialize_file_ftype _initialize_mi_out; ++extern initialize_file_ftype _initialize_mi_cmds; ++extern initialize_file_ftype _initialize_mi_cmd_env; ++extern initialize_file_ftype _initialize_mi_interp; ++extern initialize_file_ftype _initialize_mi_main; ++extern initialize_file_ftype _initialize_tui_hooks; ++extern initialize_file_ftype _initialize_tui_interp; ++extern initialize_file_ftype _initialize_tui_layout; ++extern initialize_file_ftype _initialize_tui_out; ++extern initialize_file_ftype _initialize_tui_regs; ++extern initialize_file_ftype _initialize_tui_stack; ++extern initialize_file_ftype _initialize_tui_win; ++void ++initialize_all_files (void) ++{ ++ _initialize_gdbtypes (); ++ _initialize_arm_tdep (); ++ _initialize_armfbsd_tdep (); ++ _initialize_corelow (); ++ _initialize_solib (); ++ _initialize_svr4_solib (); ++ _initialize_ser_hardwire (); ++ _initialize_ser_pipe (); ++ _initialize_ser_tcp (); ++#ifndef CROSS_DEBUGGER ++ _initialize_kernel_u_addr (); ++ _initialize_infptrace (); ++ _initialize_inftarg (); ++ _initialize_arm_fbsdnat (); ++#endif ++ _initialize_remote (); ++ _initialize_dcache (); ++ _initialize_sr_support (); ++ _initialize_tracepoint (); ++ _initialize_ax_gdb (); ++ _initialize_annotate (); ++ _initialize_auxv (); ++ _initialize_breakpoint (); ++ _initialize_regcache (); ++ _initialize_charset (); ++ _initialize_dummy_frame (); ++ _initialize_source (); ++ _initialize_values (); ++ _initialize_valops (); ++ _initialize_valarith (); ++ _initialize_valprint (); ++ _initialize_printcmd (); ++ _initialize_symtab (); ++ _initialize_symfile (); ++ _initialize_symmisc (); ++ _initialize_infcall (); ++ _initialize_infcmd (); ++ _initialize_infrun (); ++ _initialize_stack (); ++ _initialize_thread (); ++ _initialize_interpreter (); ++ _initialize_macrocmd (); ++ _initialize_gdbarch (); ++ _initialize_gdbarch_utils (); ++ _initialize_gdb_osabi (); ++ _initialize_copying (); ++ _initialize_mem (); ++ _initialize_parse (); ++ _initialize_language (); ++ _initialize_frame_reg (); ++ _initialize_signals (); ++ _initialize_kod (); ++ _initialize_gdb_events (); ++ _initialize_exec (); ++ _initialize_maint_cmds (); ++ _initialize_demangler (); ++ _initialize_dbxread (); ++ _initialize_coffread (); ++ _initialize_elfread (); ++ _initialize_mipsread (); ++ _initialize_stabsread (); ++ _initialize_core (); ++ _initialize_dwarf2_frame (); ++ _initialize_c_language (); ++ _initialize_f_language (); ++ _initialize_objc_language (); ++ _initialize_ui_out (); ++ _initialize_cli_out (); ++ _initialize_varobj (); ++ _initialize_java_language (); ++ _initialize_m2_language (); ++ _initialize_pascal_language (); ++ _initialize_pascal_valprint (); ++ _initialize_scheme_language (); ++ _initialize_complaints (); ++ _initialize_typeprint (); ++ _initialize_cp_valprint (); ++ _initialize_f_valprint (); ++ _initialize_nlmread (); ++ _initialize_serial (); ++ _initialize_mdebugread (); ++ _initialize_user_regs (); ++ _initialize_frame (); ++ _initialize_frame_unwind (); ++ _initialize_frame_base (); ++ _initialize_gnu_v2_abi (); ++ _initialize_gnu_v3_abi (); ++ _initialize_hpacc_abi (); ++ _initialize_cp_abi (); ++ _initialize_cp_support (); ++ _initialize_cp_namespace (); ++ _initialize_reggroup (); ++ _initialize_inflow (); ++ _initialize_cli_dump (); ++ _initialize_cli_logging (); ++ _initialize_cli_interp (); ++ _initialize_mi_out (); ++ _initialize_mi_cmds (); ++ _initialize_mi_cmd_env (); ++ _initialize_mi_interp (); ++ _initialize_mi_main (); ++ _initialize_tui_hooks (); ++ _initialize_tui_interp (); ++ _initialize_tui_layout (); ++ _initialize_tui_out (); ++ _initialize_tui_regs (); ++ _initialize_tui_stack (); ++ _initialize_tui_win (); ++} +Index: gnu/usr.bin/gdb/kgdb/trgt_arm.c +=================================================================== +RCS file: gnu/usr.bin/gdb/kgdb/trgt_arm.c +diff -N gnu/usr.bin/gdb/kgdb/trgt_arm.c +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ gnu/usr.bin/gdb/kgdb/trgt_arm.c 4 Oct 2005 22:28:59 -0000 +@@ -0,0 +1,199 @@ ++/* ++ * Copyright (c) 2004 Marcel Moolenaar ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#include ++__FBSDID("$FreeBSD$"); ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "kgdb.h" ++ ++void ++kgdb_trgt_fetch_registers(int regno __unused) ++{ ++ struct kthr *kt; ++ struct pcb pcb; ++ int i, reg; ++ ++ kt = kgdb_thr_lookup_tid(ptid_get_tid(inferior_ptid)); ++ if (kt == NULL) ++ return; ++ if (kvm_read(kvm, kt->pcb, &pcb, sizeof(pcb)) != sizeof(pcb)) { ++ warnx("kvm_read: %s", kvm_geterr(kvm)); ++ memset(&pcb, 0, sizeof(pcb)); ++ } ++ for (i = ARM_A1_REGNUM + 8; i <= ARM_SP_REGNUM; i++) { ++ supply_register(i, (char *)&pcb.un_32.pcb32_r8 + ++ (i - (ARM_A1_REGNUM + 8 )) * 4); ++ } ++ if (pcb.un_32.pcb32_sp != 0) { ++ for (i = 0; i < 4; i++) { ++ if (kvm_read(kvm, pcb.un_32.pcb32_sp + (i) * 4, ++ ®, 4) != 4) { ++ warnx("kvm_read: %s", kvm_geterr(kvm)); ++ break; ++ } ++ supply_register(ARM_A1_REGNUM + 4 + i, (char *)®); ++ } ++ if (kvm_read(kvm, pcb.un_32.pcb32_sp + 4 * 4, ®, 4) != 4) ++ warnx("kvm_read :%s", kvm_geterr(kvm)); ++ else ++ supply_register(ARM_PC_REGNUM, (char *)®); ++ } ++} ++ ++void ++kgdb_trgt_store_registers(int regno __unused) ++{ ++ fprintf_unfiltered(gdb_stderr, "XXX: %s\n", __func__); ++} ++ ++struct kgdb_frame_cache { ++ CORE_ADDR fp; ++ CORE_ADDR sp; ++}; ++ ++static int kgdb_trgt_frame_offset[26] = { ++ offsetof(struct trapframe, tf_r0), ++ offsetof(struct trapframe, tf_r1), ++ offsetof(struct trapframe, tf_r2), ++ offsetof(struct trapframe, tf_r3), ++ offsetof(struct trapframe, tf_r4), ++ offsetof(struct trapframe, tf_r5), ++ offsetof(struct trapframe, tf_r6), ++ offsetof(struct trapframe, tf_r7), >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Oct 4 22:57:59 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E9DC116A421; Tue, 4 Oct 2005 22:57:58 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BEFBF16A41F for ; Tue, 4 Oct 2005 22:57:58 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 906B943D48 for ; Tue, 4 Oct 2005 22:57:58 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j94MvwLM073378 for ; Tue, 4 Oct 2005 22:57:58 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j94MvwHN073375 for perforce@freebsd.org; Tue, 4 Oct 2005 22:57:58 GMT (envelope-from peter@freebsd.org) Date: Tue, 4 Oct 2005 22:57:58 GMT Message-Id: <200510042257.j94MvwHN073375@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 84828 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2005 22:57:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=84828 Change 84828 by peter@peter_melody on 2005/10/04 22:57:44 Disable unsafe code Affected files ... .. //depot/projects/hammer/sys/amd64/ia32/ia32_reg.c#8 edit Differences ... ==== //depot/projects/hammer/sys/amd64/ia32/ia32_reg.c#8 (text+ko) ==== @@ -112,12 +112,14 @@ if (!EFL_SECURE(regs->r_eflags, tp->tf_rflags) || !CS_SECURE(regs->r_cs)) return (EINVAL); pcb = td->td_pcb; +#if 0 load_fs(regs->r_fs); pcb->pcb_fs = regs->r_fs; load_es(regs->r_es); pcb->pcb_es = regs->r_es; load_ds(regs->r_ds); pcb->pcb_ds = regs->r_ds; +#endif tp->tf_rdi = regs->r_edi; tp->tf_rsi = regs->r_esi; tp->tf_rbp = regs->r_ebp; @@ -130,8 +132,10 @@ tp->tf_rflags = regs->r_eflags; tp->tf_rsp = regs->r_esp; tp->tf_ss = regs->r_ss; +#if 0 load_gs(regs->r_gs); pcb->pcb_gs = regs->r_gs; +#endif return (0); } From owner-p4-projects@FreeBSD.ORG Wed Oct 5 13:48:31 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 75CA716A421; Wed, 5 Oct 2005 13:48:30 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C04216A41F for ; Wed, 5 Oct 2005 13:48:30 +0000 (GMT) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90CD043D4C for ; Wed, 5 Oct 2005 13:48:29 +0000 (GMT) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j95DmTPY040880 for ; Wed, 5 Oct 2005 13:48:29 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j95DmTCg040877 for perforce@freebsd.org; Wed, 5 Oct 2005 13:48:29 GMT (envelope-from cognet@freebsd.org) Date: Wed, 5 Oct 2005 13:48:29 GMT Message-Id: <200510051348.j95DmTCg040877@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 84850 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2005 13:48:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=84850 Change 84850 by cognet@cognet on 2005/10/05 13:47:44 In pmap_remove(), pmap_remove_pages() and pmap_protect(), be smarter when dealing with a superpage than blindly demoting it. Affected files ... .. //depot/projects/superpages/src/sys/arm/arm/pmap.c#4 edit Differences ... ==== //depot/projects/superpages/src/sys/arm/arm/pmap.c#4 (text+ko) ==== @@ -189,7 +189,7 @@ #else /* PMAP_DEBUG */ #define PDEBUG(_lev_,_stat_) /* Nothing */ #define dprintf(x, arg...) -#define PMAP_INLINE __inline +#define PMAP_INLINE __inline #endif /* PMAP_DEBUG */ extern struct pv_addr systempage; @@ -1550,8 +1550,6 @@ pt_entry_t *ptep; vm_paddr_t pa0; - if (!reserv) - return; ptep = &l2b->l2b_kva[l2pte_index(va & L2_L_FRAME)]; pa0 = *ptep & L2_L_FRAME; if ((*ptep & L2_S_FRAME) != pa0) @@ -1596,8 +1594,6 @@ uint16_t l1idx; int i; - if (!reserv) - return; va0 = va & L1_S_ADDR_MASK; l1idx = L1_IDX(va0); pd = &pmap->pm_l1->l1_kva[l1idx]; @@ -1644,8 +1640,12 @@ if (*pt & L2_S_PROT_W) pa |= L1_S_PROT_W; *pd = L1_S_PROTO | pa | pte_l1_s_cache_mode | L1_S_DOM(pmap->pm_domain); +#if 0 bzero(pt, 0x100 * sizeof(*pt)); +#endif pmap_free_l2_bucket(pmap, &l2->l2_bucket[L2_BUCKET(l1idx)], 0x100); + if (pmap != pmap_kernel() && l2->l2_bucket[L2_BUCKET(l1idx)].l2b_kva != NULL) + panic("missed"); pmap_tlb_flushID(pmap); } @@ -2043,6 +2043,42 @@ return(pve); /* return removed pve */ } + +static void +pmap_destroy_pv_range(pmap_t pm, vm_paddr_t pa, vm_offset_t sva, + vm_offset_t eva) +{ + struct pv_entry *pve, *pvetmp; + int i = 0; + pve = TAILQ_FIRST(&pm->pm_pvlist); + + while (pve) { + pvetmp = TAILQ_NEXT(pve, pv_plist); + if (pve->pv_va >= sva && pve->pv_va < eva) { + pmap_nuke_pv(PHYS_TO_VM_PAGE(pa + (pve->pv_va - sva)), + pm, pve); + pmap_free_pv_entry(pve); + i++; + } + pve = pvetmp; + } +} + +static int +pmap_clearbit_pv_range(pmap_t pm, vm_offset_t sva, vm_offset_t eva, int bits) +{ + struct pv_entry *pve; + int ret = 0; + + TAILQ_FOREACH(pve, &pm->pm_pvlist, pv_plist) { + if (pve->pv_va >= sva && pve->pv_va < eva) { + ret |= pve->pv_flags; + pve->pv_flags &= ~bits; + } + } + return (ret); +} + /* * * pmap_modify_pv: Update pv flags @@ -2173,6 +2209,8 @@ pt_entry_t *ptep, pte; vm_paddr_t pa; u_int l1idx; + struct pv_entry *pv; + struct vm_page *pg; int rv = 0; #if 0 @@ -2184,7 +2222,11 @@ if (l1pte_section_p(*pl1pd)) { if (user && !(*pl1pd & L1_S_PROT_U)) goto out; - if (ftype == VM_PROT_WRITE && !(*pl1pd & L1_S_PROT_W)) + pg = PHYS_TO_VM_PAGE((*pl1pd & L1_S_FRAME) + + (va & L1_S_OFFSET)); + pv = pmap_find_pv(pg, pm, va); + if (!pv || + (ftype == VM_PROT_WRITE && !(pv->pv_flags & PVF_WRITE))) goto out; if ((*pl1pd & L1_S_DOM_MASK) != L1_S_DOM(pm->pm_domain)) { *pl1pd &= ~L1_S_DOM_MASK; @@ -2236,8 +2278,6 @@ * This looks like a good candidate for "page modified" * emulation... */ - struct pv_entry *pv; - struct vm_page *pg; /* Extract the physical address of the page */ if ((pg = PHYS_TO_VM_PAGE(pa)) == NULL) @@ -2802,9 +2842,6 @@ { struct pcb *pcb; - pmap_idcache_wbinv_all(pmap); - pmap_tlb_flushID(pmap); - cpu_cpwait(); LIST_REMOVE(pmap, pm_list); if (vector_page < KERNBASE) { struct pcb *curpcb = PCPU_GET(curpcb); @@ -3043,27 +3080,70 @@ pd_entry_t *pd; vm_paddr_t pa; vm_page_t m; - + int i; + vm_page_lock_queues(); for (pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; pv = npv) { if (pv->pv_va >= eva || pv->pv_va < sva) { npv = TAILQ_NEXT(pv, pv_plist); continue; } - pd = &pmap->pm_l1->l1_kva[L1_IDX(pv->pv_va)]; - if (l1pte_section_p(*pd)) - pmap_demote(pmap, pv->pv_va); - if (pv->pv_flags & PVF_WIRED) { + if (pv->pv_flags & PVF_WIRED) { /* The page is wired, cannot remove it now. */ npv = TAILQ_NEXT(pv, pv_plist); continue; } + + pd = &pmap->pm_l1->l1_kva[L1_IDX(pv->pv_va)]; + if (l1pte_section_p(*pd)) { + if ((pv->pv_va & L1_S_ADDR_MASK) >= sva && + ((pv->pv_va & L1_S_ADDR_MASK) + L1_S_SIZE) < + eva) { + pmap_destroy_pv_range(pmap, + *pd & L1_S_ADDR_MASK, + pv->pv_va & L1_S_ADDR_MASK, + (pv->pv_va & L1_S_ADDR_MASK) + + L1_S_SIZE); + for (i = 0; i < 0x100; i++) { + m = PHYS_TO_VM_PAGE( + (*pd & L1_S_ADDR_MASK) + + i * PAGE_SIZE); + if (TAILQ_EMPTY(&m->md.pv_list)) + vm_page_flag_clear(m, + PG_WRITEABLE); + } + *pd = 0; + npv = TAILQ_FIRST(&pmap->pm_pvlist); + continue; + } else + pmap_demote(pmap, pv->pv_va); + } pmap->pm_stats.resident_count--; l2b = pmap_get_l2_bucket(pmap, pv->pv_va); KASSERT(l2b != NULL, ("No L2 bucket in pmap_remove_pages")); pt = &l2b->l2b_kva[l2pte_index(pv->pv_va)]; - if ((*pt & L2_TYPE_MASK) == L2_TYPE_L) - pmap_demote(pmap, pv->pv_va); + if ((*pt & L2_TYPE_MASK) == L2_TYPE_L) { + if ((pv->pv_va & L2_L_FRAME) >= sva && + (pv->pv_va & L2_L_FRAME) + L2_L_SIZE < eva) { + pmap_destroy_pv_range(pmap, *pt & L2_L_FRAME, + pv->pv_va & L2_L_FRAME, + (pv->pv_va & L2_L_FRAME) + L2_L_SIZE); + pt = &l2b->l2b_kva[l2pte_index(pv->pv_va & + L2_L_FRAME)]; + for (int i = 0; i < 0x10; i++) { + m = PHYS_TO_VM_PAGE((pt[i] & + L2_L_FRAME) + i * PAGE_SIZE); + if (TAILQ_EMPTY(&m->md.pv_list)) + vm_page_flag_clear(m, + PG_WRITEABLE); + pt[i] = 0; + } + pmap_free_l2_bucket(pmap, l2b, 0x10); + npv = TAILQ_FIRST(&pmap->pm_pvlist); + continue; + } else + pmap_demote(pmap, pv->pv_va); + } pa = *pt & L2_S_FRAME; m = PHYS_TO_VM_PAGE(pa); *pt = 0; @@ -3073,6 +3153,7 @@ if (TAILQ_EMPTY(&m->md.pv_list)) vm_page_flag_clear(m, PG_WRITEABLE); pmap_free_pv_entry(pv); + pmap_free_l2_bucket(pmap, l2b, 1); } vm_page_unlock_queues(); cpu_idcache_wbinv_all(); @@ -3449,6 +3530,8 @@ u_int flags; int flush; int demoted = 0; + int i; + pd_entry_t *pd; if ((prot & VM_PROT_READ) == 0) { mtx_lock(&Giant); @@ -3487,9 +3570,25 @@ if ((sva & L1_S_OFFSET) == 0 && sva + L1_S_SIZE < eva) { /* Change the whole 1MB superpage. */ - pm->pm_l1->l1_kva[L1_IDX(sva)] &= ~ - L1_S_PROT_W; - flush++; + pd = &pm->pm_l1->l1_kva[L1_IDX(sva)]; + if (*pd & L1_S_PROT_W) { + *pd &= ~L1_S_PROT_W; + PTE_SYNC(*pd); + flush++; + flags |= pmap_clearbit_pv_range(pm, sva, + sva + L1_S_SIZE, PVF_WRITE); + for (i = 0; i < 0x100; i++) { + vm_page_t m = + PHYS_TO_VM_PAGE( + (*pd & L1_S_FRAME) + + i * PAGE_SIZE); + pmap_vac_me_harder(m, pm, + sva + i * PAGE_SIZE); + if (pmap_track_modified(sva + + i * PAGE_SIZE)) + vm_page_dirty(m); + } + } sva += L1_S_SIZE; continue; } @@ -3508,8 +3607,36 @@ while (sva < next_bucket) { demoted = 0; if ((*ptep & L2_TYPE_MASK) == L2_TYPE_L) { - pmap_demote(pm, sva); - demoted = 1; + if ((sva & L2_L_OFFSET) == 0 && + sva + L2_L_SIZE < eva) { + if (*ptep & L2_L_PROT_W) { + flags |= pmap_clearbit_pv_range( + pm, sva, + sva + L2_L_SIZE, PVF_WRITE); + for (i = 0; i < 0x10; i++) { + vm_page_t m; + + m = PHYS_TO_VM_PAGE( + (ptep[i] & + L2_L_FRAME) + + i * PAGE_SIZE); + ptep[i] &= ~L2_L_PROT_W; + PTE_SYNC(&ptep[i]); + pmap_vac_me_harder(m, + pm, sva + + i * PAGE_SIZE); + if (pmap_track_modified( + sva + i * PAGE_SIZE)) + vm_page_dirty(m); + } + flush++; + } + sva += L2_L_SIZE; + continue; + } else { + pmap_demote(pm, sva); + demoted = 1; + } } if ((pte = *ptep) != 0 && (pte & L2_S_PROT_W) != 0) { struct vm_page *pg; @@ -3600,7 +3727,6 @@ /* There's already a superpage at this address, demote. */ pmap_demote(pmap, va); } else if (l1pte_section_p(l1pd)) { - pmap_free_l2_bucket(pmap, l2b, 0); opg = m; l2b = NULL; } @@ -4150,10 +4276,14 @@ pd_entry_t *pd = &pm->pm_l1->l1_kva[L1_IDX(sva)]; if (l1pte_section_p(*pd)) { /* We can just remove the superpage. */ - if (0 && (sva == (sva & L1_S_ADDR_MASK)) && - (sva + 0x100000 < eva)) { + if ((sva == (sva & L1_S_ADDR_MASK)) && + (sva + L1_S_SIZE < eva)) { + pmap_destroy_pv_range(pm, + *pd & L1_S_FRAME, sva, + sva + L1_S_SIZE); *pd = 0; - sva = sva + 0x100000; + flushall = 1; + sva += L1_S_SIZE; continue; } else { pmap_demote(pm, sva); @@ -4173,10 +4303,23 @@ pt_entry_t pte; vm_paddr_t pa; - if ((*ptep & L2_TYPE_MASK) == L2_TYPE_L) + if ((*ptep & L2_TYPE_MASK) == L2_TYPE_L) { /* 64KB superpage. */ + if ((sva & L2_L_FRAME) == sva && + sva + L2_L_SIZE < eva) { + pmap_destroy_pv_range(pm, + *ptep & L2_L_FRAME, + sva, sva + L2_L_SIZE); + for (int i = 0; i < 0x10; i++) + ptep[i] = 0; + sva += L2_L_SIZE; + ptep += 0x10; + flushall = 1; + mappings += 0x10; + continue; + } pmap_demote(pm, sva); - + } pte = *ptep; if (pte == 0) { @@ -4206,12 +4349,12 @@ pve = pmap_remove_pv(pg, pm, sva); if (pve) { #if 0 - simple_unlock(&pg->mdpage.pvh_slock); + simple_unlock(&pg->mdpage.pvh_slock); #endif - is_exec = - PV_BEEN_EXECD(pve->pv_flags); - is_refd = - PV_BEEN_REFD(pve->pv_flags); + is_exec = + PV_BEEN_EXECD(pve->pv_flags); + is_refd = + PV_BEEN_REFD(pve->pv_flags); pmap_free_pv_entry(pve); } } @@ -4234,8 +4377,7 @@ } else if (cleanlist_idx == PMAP_REMOVE_CLEAN_LIST_SIZE) { /* Nuke everything if needed. */ - pmap_idcache_wbinv_all(pm); - pmap_tlb_flushID(pm); + flushall = 1; /* * Roll back the previous PTE list, @@ -4248,14 +4390,13 @@ *ptep = 0; PTE_SYNC(ptep); cleanlist_idx++; - flushall = 1; } else { *ptep = 0; PTE_SYNC(ptep); - if (is_exec) - pmap_tlb_flushID_SE(pm, sva); - else - if (is_refd) + if (!flushall && is_exec) + pmap_tlb_flushID_SE(pm, sva); + else + if (!flushall && is_refd) pmap_tlb_flushD_SE(pm, sva); } @@ -4272,15 +4413,17 @@ for (cnt = 0; cnt < cleanlist_idx; cnt++) { vm_offset_t clva = cleanlist[cnt].va & ~1; - if (cleanlist[cnt].va & 1) { - pmap_idcache_wbinv_range(pm, - clva, PAGE_SIZE); - pmap_tlb_flushID_SE(pm, clva); - } else { - pmap_dcache_wb_range(pm, - clva, PAGE_SIZE, TRUE, - FALSE); - pmap_tlb_flushD_SE(pm, clva); + if (!flushall) { + if (cleanlist[cnt].va & 1) { + pmap_idcache_wbinv_range(pm, + clva, PAGE_SIZE); + pmap_tlb_flushID_SE(pm, clva); + } else { + pmap_dcache_wb_range(pm, + clva, PAGE_SIZE, TRUE, + FALSE); + pmap_tlb_flushD_SE(pm, clva); + } } *cleanlist[cnt].pte = 0; PTE_SYNC_CURRENT(pm, cleanlist[cnt].pte); @@ -4294,7 +4437,6 @@ * easier to flush the whole cache. */ cleanlist_idx = PMAP_REMOVE_CLEAN_LIST_SIZE + 1; - pmap_idcache_wbinv_all(pm); flushall = 1; } } @@ -4302,9 +4444,11 @@ pmap_free_l2_bucket(pm, l2b, mappings); } + if (flushall) { + pmap_idcache_wbinv_all(pm); + pmap_tlb_flushID(pm); + } vm_page_unlock_queues(); - if (flushall) - cpu_tlb_flushID(); #if 0 pmap_release_pmap_lock(pm); PMAP_MAP_TO_HEAD_UNLOCK(); From owner-p4-projects@FreeBSD.ORG Wed Oct 5 23:22:09 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A0F3716A421; Wed, 5 Oct 2005 23:22:08 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79BF916A41F for ; Wed, 5 Oct 2005 23:22:08 +0000 (GMT) (envelope-from wsalamon@computer.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AB3C43D46 for ; Wed, 5 Oct 2005 23:22:08 +0000 (GMT) (envelope-from wsalamon@computer.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j95NM80e083495 for ; Wed, 5 Oct 2005 23:22:08 GMT (envelope-from wsalamon@computer.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j95NM7DF083492 for perforce@freebsd.org; Wed, 5 Oct 2005 23:22:07 GMT (envelope-from wsalamon@computer.org) Date: Wed, 5 Oct 2005 23:22:07 GMT Message-Id: <200510052322.j95NM7DF083492@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to wsalamon@computer.org using -f From: Wayne Salamon To: Perforce Change Reviews Cc: Subject: PERFORCE change 84872 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2005 23:22:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=84872 Change 84872 by wsalamon@gretsch on 2005/10/05 23:21:29 Move the extern declares of the audit control variables to the private header file. Clean up kern_audit.c by removing dead code, renaming the record free function to be more descriptive, some better comments. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_private.h#7 edit .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_syscalls.c#3 edit .. //depot/projects/trustedbsd/audit3/sys/security/audit/kern_audit.c#44 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_private.h#7 (text+ko) ==== @@ -42,6 +42,16 @@ #endif /* + * Audit control variables that are usually set/read via system calls + * and used to control various aspects of auditing. + */ +extern struct au_qctrl audit_qctrl; +extern struct audit_fstat audit_fstat; +extern struct au_mask audit_nae_mask; +extern int audit_panic_on_write_fail; +extern int audit_fail_stop; + +/* * Success/failure conditions for the conversion of a kernel audit record to * BSM format. */ ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_syscalls.c#3 (text+ko) ==== @@ -34,13 +34,6 @@ #ifdef AUDIT -/* XXX replace these externs with accessor functions? */ -extern struct au_qctrl audit_qctrl; -extern struct audit_fstat audit_fstat; -extern struct au_mask audit_nae_mask; -extern int audit_panic_on_write_fail; -extern int audit_fail_stop; - /* * MPSAFE * ==== //depot/projects/trustedbsd/audit3/sys/security/audit/kern_audit.c#44 (text+ko) ==== @@ -83,11 +83,38 @@ MALLOC_DEFINE(M_AUDIT, "audit", "Audit event records"); +/* + * Audit control settings that are set/read by system calls and are + * hence non-static. + */ /* * Define the audit control flags. */ -int audit_enabled; -int audit_suspended; +int audit_enabled; +int audit_suspended; + +/* + * Flags controlling behavior in low storage situations. + * Should we panic if a write fails? Should we fail stop + * if we're out of disk space? + */ +int audit_panic_on_write_fail; +int audit_fail_stop; + +/* + * Audit queue control settings (minimum free, low/high water marks, etc.) + */ +struct au_qctrl audit_qctrl; + +/* + * Global audit statistiscs. + */ +struct audit_fstat audit_fstat; + +/* + * Preselection mask for non-attributable events. + */ +struct au_mask audit_nae_mask; /* * Mutex to protect global variables shared between various threads and @@ -155,42 +182,21 @@ */ static struct cv audit_fail_cv; -/* XXX make a function to access this variable, then make it static */ -struct au_qctrl audit_qctrl; - -/* - * Global audit statistiscs. - */ -/* XXX make a function to access this variable, then make it static */ -struct audit_fstat audit_fstat; - -/* - Preselection mask for non-attributable events. - */ -/* XXX make a function to access this variable, then make it static */ -struct au_mask audit_nae_mask; - /* * Flags related to Kernel->user-space communication. */ static int audit_file_rotate_wait; /* - * Flags controlling behavior in low storage situations. - * Should we panic if a write fails? Should we fail stop - * if we're out of disk space? Are we currently "failing - * stop" due to out of disk space? + * Are we currently "failing stop" due to out of disk space? */ -/* XXX make a function to access these variables, then make them static */ -int audit_panic_on_write_fail; -int audit_fail_stop; static int audit_in_failure; /* - * XXXAUDIT: For consistency, perhaps audit_record_free()? + * Perform a deep free of an audit record (core record and referenced objects) */ static void -audit_free(struct kaudit_record *ar) +audit_record_free(struct kaudit_record *ar) { if (ar->k_ar.ar_arg_upath1 != NULL) { @@ -510,7 +516,8 @@ * conditional allocation and queueing. Go back to * waiting when we're done. * - * XXX: We go out of our way to avoid calling audit_free() + * XXX: We go out of our way to avoid calling + * audit_record_free(). * with the audit_mtx held, to avoid a lock order reversal * as free() may grab Giant. This should be fixed at * some point. @@ -527,7 +534,7 @@ mtx_unlock(&audit_mtx); while ((ar = TAILQ_FIRST(&ar_worklist))) { TAILQ_REMOVE(&ar_worklist, ar, k_q); - audit_free(ar); + audit_record_free(ar); } mtx_lock(&audit_mtx); continue; @@ -540,7 +547,8 @@ * records and perform our own clustering, if the lower * layers aren't doing it automatically enough. * - * XXX: We go out of our way to avoid calling audit_free() + * XXX: We go out of our way to avoid calling + * audit_record_free() * with the audit_mtx held, to avoid a lock order reversal * as free() may grab Giant. This should be fixed at * some point. @@ -569,7 +577,7 @@ printf("audit_worker: write error %d\n", error); } - audit_free(ar); + audit_record_free(ar); } mtx_lock(&audit_mtx); } @@ -683,11 +691,6 @@ "audit_worker (flag " "now %d)\n", audit_replacement_flag)); mtx_unlock(&audit_mtx); - /* XXX Need to figure out how the kernel->userspace file full - * signalling will take place. - * - * XXXAUDIT: This comment may now be obsolete. - */ audit_file_rotate_wait = 0; /* We can now request another rotation */ } @@ -793,20 +796,6 @@ /* * MPSAFE - * XXXAUDIT: So far, this is unused, and should probably be GC'd. - */ -void -audit_abort(struct kaudit_record *ar) -{ - - mtx_lock(&audit_mtx); - audit_pre_q_len--; - mtx_unlock(&audit_mtx); - audit_free(ar); -} - -/* - * MPSAFE */ void audit_commit(struct kaudit_record *ar, int error, int retval) @@ -863,7 +852,7 @@ mtx_lock(&audit_mtx); audit_pre_q_len--; mtx_unlock(&audit_mtx); - audit_free(ar); + audit_record_free(ar); return; } @@ -889,7 +878,7 @@ if (audit_suspended || !audit_enabled) { audit_pre_q_len--; mtx_unlock(&audit_mtx); - audit_free(ar); + audit_record_free(ar); return; } From owner-p4-projects@FreeBSD.ORG Wed Oct 5 23:24:12 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 99C7B16A421; Wed, 5 Oct 2005 23:24:11 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7459816A41F for ; Wed, 5 Oct 2005 23:24:11 +0000 (GMT) (envelope-from wsalamon@computer.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E62443D45 for ; Wed, 5 Oct 2005 23:24:11 +0000 (GMT) (envelope-from wsalamon@computer.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j95NOBY1083571 for ; Wed, 5 Oct 2005 23:24:11 GMT (envelope-from wsalamon@computer.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j95NOAOj083568 for perforce@freebsd.org; Wed, 5 Oct 2005 23:24:10 GMT (envelope-from wsalamon@computer.org) Date: Wed, 5 Oct 2005 23:24:10 GMT Message-Id: <200510052324.j95NOAOj083568@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to wsalamon@computer.org using -f From: Wayne Salamon To: Perforce Change Reviews Cc: Subject: PERFORCE change 84873 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2005 23:24:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=84873 Change 84873 by wsalamon@gretsch on 2005/10/05 23:23:29 Create the new source file that will contain the audit_arg_xxx() functions, branched from kern_audit.c, where those functions now live. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_arg.c#1 branch Differences ... From owner-p4-projects@FreeBSD.ORG Thu Oct 6 01:10:20 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D735216A421; Thu, 6 Oct 2005 01:10:19 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A84C16A41F for ; Thu, 6 Oct 2005 01:10:19 +0000 (GMT) (envelope-from wsalamon@computer.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44E0D43D45 for ; Thu, 6 Oct 2005 01:10:19 +0000 (GMT) (envelope-from wsalamon@computer.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j961AJfm094343 for ; Thu, 6 Oct 2005 01:10:19 GMT (envelope-from wsalamon@computer.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j961AIo8094337 for perforce@freebsd.org; Thu, 6 Oct 2005 01:10:18 GMT (envelope-from wsalamon@computer.org) Date: Thu, 6 Oct 2005 01:10:18 GMT Message-Id: <200510060110.j961AIo8094337@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to wsalamon@computer.org using -f From: Wayne Salamon To: Perforce Change Reviews Cc: Subject: PERFORCE change 84875 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2005 01:10:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=84875 Change 84875 by wsalamon@gretsch on 2005/10/06 01:09:55 Move the audit_arg_xxx() functions into the new source file and add the new file to the config. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/conf/files#9 edit .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_arg.c#2 edit .. //depot/projects/trustedbsd/audit3/sys/security/audit/kern_audit.c#45 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/conf/files#9 (text+ko) ==== @@ -1843,8 +1843,9 @@ posix4/p1003_1b.c standard posix4/posix4_mib.c standard rpc/rpcclnt.c optional nfsclient +security/audit/audit_arg.c optional audit +security/audit/audit_syscalls.c standard security/audit/audit_trigger.c optional audit -security/audit/audit_syscalls.c standard security/audit/kern_audit.c optional audit security/audit/kern_bsm_audit.c optional audit security/audit/kern_bsm_klib.c optional audit ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_arg.c#2 (text+ko) ==== @@ -21,985 +21,25 @@ */ #include -#include -#include -#include #include -#include #include -#include -#include -#include #include -#include #include -#include #include #include #include #include -#include -#include #include -#include -#include #include -#include #include #include #include -#include -#include #include #include /* - * The AUDIT_EXCESSIVELY_VERBOSE define enables a number of - * gratuitously noisy printf's to the console. Due to the - * volume, it should be left off unless you want your system - * to churn a lot whenever the audit record flow gets high. - */ -//#define AUDIT_EXCESSIVELY_VERBOSE -#ifdef AUDIT_EXCESSIVELY_VERBOSE -#define AUDIT_PRINTF(x) printf x -#else -#define AUDIT_PRINTF(X) -#endif - -#if 0 -#if DIAGNOSTIC -#if defined(assert) -#undef assert() -#endif -#define assert(cond) \ - ((void) ((cond) ? 0 : panic("%s:%d (%s)", __FILE__, __LINE__, # cond))) -#else -#include -#endif /* DIAGNOSTIC */ -#endif -#define assert(x) KASSERT(x, x) - -MALLOC_DEFINE(M_AUDIT, "audit", "Audit event records"); - -/* - * Audit control settings that are set/read by system calls and are - * hence non-static. - */ -/* - * Define the audit control flags. - */ -int audit_enabled; -int audit_suspended; - -/* - * Flags controlling behavior in low storage situations. - * Should we panic if a write fails? Should we fail stop - * if we're out of disk space? - */ -int audit_panic_on_write_fail; -int audit_fail_stop; - -/* - * Audit queue control settings (minimum free, low/high water marks, etc.) - */ -struct au_qctrl audit_qctrl; - -/* - * Global audit statistiscs. - */ -struct audit_fstat audit_fstat; - -/* - * Preselection mask for non-attributable events. - */ -struct au_mask audit_nae_mask; - -/* - * Mutex to protect global variables shared between various threads and - * processes. - */ -static struct mtx audit_mtx; - -/* - * Queue of audit records ready for delivery to disk. We insert new - * records at the tail, and remove records from the head. Also, - * a count of the number of records used for checking queue depth. - * In addition, a counter of records that we have allocated but are - * not yet in the queue, which is needed to estimate the total - * size of the combined set of records outstanding in the system. - */ -static TAILQ_HEAD(, kaudit_record) audit_q; -static int audit_q_len; -static int audit_pre_q_len; - -/* - * Condition variable to signal to the worker that it has work to do: - * either new records are in the queue, or a log replacement is taking - * place. - */ -static struct cv audit_cv; - -/* - * Worker thread that will schedule disk I/O, etc. - */ -static struct proc *audit_thread; - -/* - * When an audit log is rotated, the actual rotation must be performed - * by the audit worker thread, as it may have outstanding writes on the - * current audit log. audit_replacement_vp holds the vnode replacing - * the current vnode. We can't let more than one replacement occur - * at a time, so if more than one thread requests a replacement, only - * one can have the replacement "in progress" at any given moment. If - * a thread tries to replace the audit vnode and discovers a replacement - * is already in progress (i.e., audit_replacement_flag != 0), then it - * will sleep on audit_replacement_cv waiting its turn to perform a - * replacement. When a replacement is completed, this cv is signalled - * by the worker thread so a waiting thread can start another replacement. - * We also store a credential to perform audit log write operations with. - * - * The current credential and vnode are thread-local to audit_worker. - */ -static struct cv audit_replacement_cv; - -static int audit_replacement_flag; -static struct vnode *audit_replacement_vp; -static struct ucred *audit_replacement_cred; - -/* - * Condition variable to signal to the worker that it has work to do: - * either new records are in the queue, or a log replacement is taking - * place. - */ -static struct cv audit_commit_cv; - -/* - * Condition variable for auditing threads wait on when in fail-stop mode. - * Threads wait on this CV forever (and ever), never seeing the light of - * day again. - */ -static struct cv audit_fail_cv; - -/* - * Flags related to Kernel->user-space communication. - */ -static int audit_file_rotate_wait; - -/* - * Are we currently "failing stop" due to out of disk space? - */ -static int audit_in_failure; - -/* - * Perform a deep free of an audit record (core record and referenced objects) - */ -static void -audit_record_free(struct kaudit_record *ar) -{ - - if (ar->k_ar.ar_arg_upath1 != NULL) { - free(ar->k_ar.ar_arg_upath1, M_AUDIT); - } - if (ar->k_ar.ar_arg_upath2 != NULL) { - free(ar->k_ar.ar_arg_upath2, M_AUDIT); - } - if (ar->k_ar.ar_arg_kpath1 != NULL) { - free(ar->k_ar.ar_arg_kpath1, M_AUDIT); - } - if (ar->k_ar.ar_arg_kpath2 != NULL) { - free(ar->k_ar.ar_arg_kpath2, M_AUDIT); - } - if (ar->k_ar.ar_arg_text != NULL) { - free(ar->k_ar.ar_arg_text, M_AUDIT); - } - if (ar->k_udata != NULL) { - free(ar->k_udata, M_AUDIT); - } - free(ar, M_AUDIT); -} - -/* - * XXXAUDIT: Should adjust comments below to make it clear that we get to - * this point only if we believe we have storage, so not having space here - * is a violation of invariants derived from administrative procedures. - * I.e., someone else has written to the audit partition, leaving less space - * than we accounted for. - */ -static int -audit_record_write(struct vnode *vp, struct kaudit_record *ar, - struct ucred *cred, struct thread *td) -{ - int ret; - long temp; - struct au_record *bsm; - struct vattr vattr; - struct statfs *mnt_stat = &vp->v_mount->mnt_stat; - int vfslocked; - - vfslocked = VFS_LOCK_GIANT(vp->v_mount); - - /* - * First, gather statistics on the audit log file and file system - * so that we know how we're doing on space. In both cases, - * if we're unable to perform the operation, we drop the record - * and return. However, this is arguably an assertion failure. - * XXX Need a FreeBSD equivalent. - */ - ret = VFS_STATFS(vp->v_mount, mnt_stat, td); - if (ret) - goto out; - - ret = VOP_GETATTR(vp, &vattr, cred, td); - if (ret) - goto out; - - /* update the global stats struct */ - audit_fstat.af_currsz = vattr.va_size; - - /* - * XXX Need to decide what to do if the trigger to the audit daemon - * fails. - */ - - /* - * If we fall below minimum free blocks (hard limit), tell the audit - * daemon to force a rotation off of the file system. We also stop - * writing, which means this audit record is probably lost. - * If we fall below the minimum percent free blocks (soft limit), - * then kindly suggest to the audit daemon to do something. - */ - if (mnt_stat->f_bfree < AUDIT_HARD_LIMIT_FREE_BLOCKS) { - send_trigger(AUDIT_TRIGGER_NO_SPACE); - /* Hopefully userspace did something about all the previous - * triggers that were sent prior to this critical condition. - * If fail-stop is set, then we're done; goodnight Gracie. - */ - if (audit_fail_stop) - panic("Audit log space exhausted and fail-stop set."); - else { - audit_suspended = 1; - ret = ENOSPC; - goto out; - } - } else - /* - * Send a message to the audit daemon that disk space - * is getting low. - * - * XXXAUDIT: Check math and block size calculation here. - */ - if (audit_qctrl.aq_minfree != 0) { - temp = mnt_stat->f_blocks / (100 / - audit_qctrl.aq_minfree); - if (mnt_stat->f_bfree < temp) - send_trigger(AUDIT_TRIGGER_LOW_SPACE); - } - - /* Check if the current log file is full; if so, call for - * a log rotate. This is not an exact comparison; we may - * write some records over the limit. If that's not - * acceptable, then add a fudge factor here. - */ - if ((audit_fstat.af_filesz != 0) && - (audit_file_rotate_wait == 0) && - (vattr.va_size >= audit_fstat.af_filesz)) { - audit_file_rotate_wait = 1; - send_trigger(AUDIT_TRIGGER_OPEN_NEW); - } - - /* - * If the estimated amount of audit data in the audit event queue - * (plus records allocated but not yet queued) has reached the - * amount of free space on the disk, then we need to go into an - * audit fail stop state, in which we do not permit the - * allocation/committing of any new audit records. We continue to - * process packets but don't allow any activities that might - * generate new records. In the future, we might want to detect - * when space is available again and allow operation to continue, - * but this behavior is sufficient to meet fail stop requirements - * in CAPP. - */ - if (audit_fail_stop && - (unsigned long) - ((audit_q_len + audit_pre_q_len + 1) * MAX_AUDIT_RECORD_SIZE) / - mnt_stat->f_bsize >= (unsigned long)(mnt_stat->f_bfree)) { - printf( - "audit_worker: free space below size of audit queue, failing stop\n"); - audit_in_failure = 1; - } - - /* - * If there is a user audit record attached to the kernel record, - * then write the user record. - */ - /* XXX Need to decide a few things here: IF the user audit - * record is written, but the write of the kernel record fails, - * what to do? Should the kernel record come before or after the - * user record? For now, we write the user record first, and - * we ignore errors. - */ - if (ar->k_ar_commit & AR_COMMIT_USER) { - ret = vn_rdwr(UIO_WRITE, vp, (void *)ar->k_udata, ar->k_ulen, - (off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, cred, NULL, - NULL, td); - if (ret) - goto out; - } - - /* - * Convert the internal kernel record to BSM format and write it - * out if everything's OK. - */ - if (!(ar->k_ar_commit & AR_COMMIT_KERNEL)) { - ret = 0; - goto out; - } - - /* - * XXXAUDIT: Should we actually allow this conversion to fail? With - * sleeping memory allocation and invariants checks, perhaps not. - */ - ret = kaudit_to_bsm(ar, &bsm); - if (ret == BSM_NOAUDIT) { - ret = 0; - goto out; - } - - /* - * XXX: We drop the record on BSM conversion failure, but really - * this is an assertion failure. - */ - if (ret == BSM_FAILURE) { - AUDIT_PRINTF(("BSM conversion failure\n")); - ret = EINVAL; - goto out; - } - - /* - * XXX - * We should break the write functionality away from the BSM record - * generation and have the BSM generation done before this function - * is called. This function will then take the BSM record as a - * parameter. - */ - ret = (vn_rdwr(UIO_WRITE, vp, (void *)bsm->data, bsm->len, - (off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, cred, NULL, NULL, td)); - - kau_free(bsm); - -out: - /* - * When we're done processing the current record, we have to - * check to see if we're in a failure mode, and if so, whether - * this was the last record left to be drained. If we're done - * draining, then we fsync the vnode and panic. - */ - if (audit_in_failure && - audit_q_len == 0 && audit_pre_q_len == 0) { - VOP_LOCK(vp, LK_DRAIN | LK_INTERLOCK, td); - (void)VOP_FSYNC(vp, MNT_WAIT, td); - VOP_UNLOCK(vp, 0, td); - panic("Audit store overflow; record queue drained."); - } - - VFS_UNLOCK_GIANT(vfslocked); - - return (ret); -} - -/* - * The audit_worker thread is responsible for watching the event queue, - * dequeueing records, converting them to BSM format, and committing them to - * disk. In order to minimize lock thrashing, records are dequeued in sets - * to a thread-local work queue. In addition, the audit_work performs the - * actual exchange of audit log vnode pointer, as audit_vp is a thread-local - * variable. - */ -static void -audit_worker(void *arg) -{ - int do_replacement_signal, error; - TAILQ_HEAD(, kaudit_record) ar_worklist; - struct kaudit_record *ar; - struct vnode *audit_vp, *old_vp; - int vfslocked; - - struct ucred *audit_cred, *old_cred; - struct thread *audit_td; - - AUDIT_PRINTF(("audit_worker starting\n")); - - /* - * These are thread-local variables requiring no synchronization. - */ - TAILQ_INIT(&ar_worklist); - audit_cred = NULL; - audit_td = curthread; - audit_vp = NULL; - - mtx_lock(&audit_mtx); - while (1) { - /* - * First priority: replace the audit log target if requested. - * Accessing the vnode here requires dropping the audit_mtx; - * in case another replacement was scheduled while the mutex - * was released, we loop. - * - * XXX It could well be we should drain existing records - * first to ensure that the timestamps and ordering - * are right. - */ - do_replacement_signal = 0; - while (audit_replacement_flag != 0) { - old_cred = audit_cred; - old_vp = audit_vp; - audit_cred = audit_replacement_cred; - audit_vp = audit_replacement_vp; - audit_replacement_cred = NULL; - audit_replacement_vp = NULL; - audit_replacement_flag = 0; - - audit_enabled = (audit_vp != NULL); - - /* - * XXX: What to do about write failures here? - */ - if (old_vp != NULL) { - AUDIT_PRINTF(("Closing old audit file\n")); - mtx_unlock(&audit_mtx); - vfslocked = VFS_LOCK_GIANT(old_vp->v_mount); - vn_close(old_vp, AUDIT_CLOSE_FLAGS, old_cred, - audit_td); - VFS_UNLOCK_GIANT(vfslocked); - crfree(old_cred); - mtx_lock(&audit_mtx); - old_cred = NULL; - old_vp = NULL; - AUDIT_PRINTF(("Audit file closed\n")); - } - if (audit_vp != NULL) { - AUDIT_PRINTF(("Opening new audit file\n")); - } - do_replacement_signal = 1; - } - /* - * Signal that replacement have occurred to wake up and - * start any other replacements started in parallel. We can - * continue about our business in the mean time. We - * broadcast so that both new replacements can be inserted, - * but also so that the source(s) of replacement can return - * successfully. - */ - if (do_replacement_signal) - cv_broadcast(&audit_replacement_cv); - - /* - * Next, check to see if we have any records to drain into - * the vnode. If not, go back to waiting for an event. - */ - if (TAILQ_EMPTY(&audit_q)) { - AUDIT_PRINTF(("audit_worker waiting\n")); - cv_wait(&audit_cv, &audit_mtx); - AUDIT_PRINTF(("audit_worker woken up\n")); - AUDIT_PRINTF(("audit_worker: new vp = %p; value of flag %d\n", - audit_replacement_vp, audit_replacement_flag)); - continue; - } - - /* - * If we have records, but there's no active vnode to - * write to, drain the record queue. Generally, we - * prevent the unnecessary allocation of records - * elsewhere, but we need to allow for races between - * conditional allocation and queueing. Go back to - * waiting when we're done. - * - * XXX: We go out of our way to avoid calling - * audit_record_free(). - * with the audit_mtx held, to avoid a lock order reversal - * as free() may grab Giant. This should be fixed at - * some point. - */ - if (audit_vp == NULL) { - while ((ar = TAILQ_FIRST(&audit_q))) { - TAILQ_REMOVE(&audit_q, ar, k_q); - audit_q_len--; - if (audit_q_len <= audit_qctrl.aq_lowater) - cv_broadcast(&audit_commit_cv); - - TAILQ_INSERT_TAIL(&ar_worklist, ar, k_q); - } - mtx_unlock(&audit_mtx); - while ((ar = TAILQ_FIRST(&ar_worklist))) { - TAILQ_REMOVE(&ar_worklist, ar, k_q); - audit_record_free(ar); - } - mtx_lock(&audit_mtx); - continue; - } - - /* - * We have both records to write and an active vnode - * to write to. Dequeue a record, and start the write. - * Eventually, it might make sense to dequeue several - * records and perform our own clustering, if the lower - * layers aren't doing it automatically enough. - * - * XXX: We go out of our way to avoid calling - * audit_record_free() - * with the audit_mtx held, to avoid a lock order reversal - * as free() may grab Giant. This should be fixed at - * some point. - * - * XXXAUDIT: free() no longer grabs Giant. - */ - while ((ar = TAILQ_FIRST(&audit_q))) { - TAILQ_REMOVE(&audit_q, ar, k_q); - audit_q_len--; - if (audit_q_len <= audit_qctrl.aq_lowater) - cv_broadcast(&audit_commit_cv); - - TAILQ_INSERT_TAIL(&ar_worklist, ar, k_q); - } - - mtx_unlock(&audit_mtx); - while ((ar = TAILQ_FIRST(&ar_worklist))) { - TAILQ_REMOVE(&ar_worklist, ar, k_q); - if (audit_vp != NULL) { - error = audit_record_write(audit_vp, ar, - audit_cred, audit_td); - if (error && audit_panic_on_write_fail) - panic("audit_worker: write error %d\n", - error); - else if (error) - printf("audit_worker: write error %d\n", - error); - } - audit_record_free(ar); - } - mtx_lock(&audit_mtx); - } -} - -/* - * Initialize the Audit subsystem: configuration state, work queue, - * synchronization primitives, worker thread, and trigger device node. Also - * call into the BSM assembly code to initialize it. - */ -static void -audit_init(void) -{ - int error; - - printf("Security auditing service present\n"); - TAILQ_INIT(&audit_q); - audit_q_len = 0; - audit_pre_q_len = 0; - audit_enabled = 0; - audit_suspended = 0; - audit_replacement_cred = NULL; - audit_replacement_flag = 0; - audit_file_rotate_wait = 0; - audit_replacement_vp = NULL; - audit_fstat.af_filesz = 0; /* '0' means unset, unbounded */ - audit_fstat.af_currsz = 0; - audit_qctrl.aq_hiwater = AQ_HIWATER; - audit_qctrl.aq_lowater = AQ_LOWATER; - audit_qctrl.aq_bufsz = AQ_BUFSZ; - audit_qctrl.aq_minfree = AU_FS_MINFREE; - - mtx_init(&audit_mtx, "audit_mtx", NULL, MTX_DEF); - cv_init(&audit_cv, "audit_cv"); - cv_init(&audit_replacement_cv, "audit_replacement_cv"); - cv_init(&audit_commit_cv, "audit_commit_cv"); - cv_init(&audit_fail_cv, "audit_fail_cv"); - - /* Initialize the BSM audit subsystem. */ - kau_init(); - - audit_trigger_init(); - - /* Register shutdown handler. */ - EVENTHANDLER_REGISTER(shutdown_pre_sync, audit_shutdown, NULL, - SHUTDOWN_PRI_FIRST); - - error = kthread_create(audit_worker, NULL, &audit_thread, RFHIGHPID, - 0, "audit_worker"); - if (error != 0) - panic("audit_init: kthread_create returned %d", error); -} - -SYSINIT(audit_init, SI_SUB_AUDIT, SI_ORDER_FIRST, audit_init, NULL) - -/* - * audit_rotate_vnode() is called by a user or kernel thread to configure or - * de-configure auditing on a vnode. The arguments are the replacement - * credential and vnode to substitute for the current credential and vnode, - * if any. If either is set to NULL, both should be NULL, and this is used - * to indicate that audit is being disabled. The real work is done in the - * audit_worker thread, but audit_rotate_vnode() waits synchronously for that - * to complete. - * - * The vnode should be referenced and opened by the caller. The credential - * should be referenced. audit_rotate_vnode() will own both references as of - * this call, so the caller should not release either. - * - * XXXAUDIT: Review synchronize communication logic. Really, this is a - * message queue of depth 1. - * - * XXXAUDIT: Enhance the comments below to indicate that we are basically - * acquiring ownership of the communications queue, inserting our message, - * and waiting for an acknowledgement. - */ -void -audit_rotate_vnode(struct ucred *cred, struct vnode *vp) -{ - - /* - * If other parallel log replacements have been requested, we wait - * until they've finished before continuing. - */ - mtx_lock(&audit_mtx); - while (audit_replacement_flag != 0) { - AUDIT_PRINTF(("audit_rotate_vnode: sleeping to wait for " - "flag\n")); - cv_wait(&audit_replacement_cv, &audit_mtx); - AUDIT_PRINTF(("audit_rotate_vnode: woken up (flag %d)\n", - audit_replacement_flag)); - } - audit_replacement_cred = cred; - audit_replacement_flag = 1; - audit_replacement_vp = vp; - - /* - * Wake up the audit worker to perform the exchange once we - * release the mutex. - */ - cv_signal(&audit_cv); - - /* - * Wait for the audit_worker to broadcast that a replacement has - * taken place; we know that once this has happened, our vnode - * has been replaced in, so we can return successfully. - */ - AUDIT_PRINTF(("audit_rotate_vnode: waiting for news of " - "replacement\n")); - cv_wait(&audit_replacement_cv, &audit_mtx); - AUDIT_PRINTF(("audit_rotate_vnode: change acknowledged by " - "audit_worker (flag " "now %d)\n", audit_replacement_flag)); - mtx_unlock(&audit_mtx); - - audit_file_rotate_wait = 0; /* We can now request another rotation */ -} - -/* - * Drain the audit queue and close the log at shutdown. Note that this can - * be called both from the system shutdown path and also from audit - * configuration syscalls, so 'arg' and 'howto' are ignored. - */ -void -audit_shutdown(void *arg, int howto) -{ - - audit_rotate_vnode(NULL, NULL); -} - -/* - * Return the current thread's audit record, if any. - */ -__inline__ struct kaudit_record * -currecord(void) -{ - - return (curthread->td_ar); -} - -/* - * MPSAFE - * - * XXXAUDIT: There are a number of races present in the code below due to - * release and re-grab of the mutex. The code should be revised to become - * slightly less racy. - * - * XXXAUDIT: Shouldn't there be logic here to sleep waiting on available - * pre_q space, suspending the system call until there is room? - */ -struct kaudit_record * -audit_new(int event, struct thread *td) -{ - struct kaudit_record *ar; - int no_record; - - /* - * Eventually, there may be certain classes of events that - * we will audit regardless of the audit state at the time - * the record is created. These events will generally - * correspond to changes in the audit state. The dummy - * code below is from our first prototype, but may also - * be used in the final version (with modified event numbers). - */ -#if 0 - if (event != AUDIT_EVENT_FILESTOP && event != AUDIT_EVENT_FILESTART) { -#endif - mtx_lock(&audit_mtx); - no_record = (audit_suspended || !audit_enabled); - mtx_unlock(&audit_mtx); - if (no_record) - return (NULL); -#if 0 - } -#endif - - /* - * Initialize the audit record header. - * XXX: We may want to fail-stop if allocation fails. - * XXX: The number of outstanding uncommitted audit records is - * limited by the number of concurrent threads servicing system - * calls in the kernel. - */ - - ar = malloc(sizeof(*ar), M_AUDIT, M_WAITOK); - if (ar == NULL) - return NULL; - - mtx_lock(&audit_mtx); - audit_pre_q_len++; - mtx_unlock(&audit_mtx); - - bzero(ar, sizeof(*ar)); - ar->k_ar.ar_magic = AUDIT_RECORD_MAGIC; - ar->k_ar.ar_event = event; - nanotime(&ar->k_ar.ar_starttime); - - /* - * Export the subject credential. - * - * XXXAUDIT: td_ucred access is OK without proc lock, but some other - * fields here may require the proc lock. - */ - cru2x(td->td_ucred, &ar->k_ar.ar_subj_cred); - ar->k_ar.ar_subj_ruid = td->td_ucred->cr_ruid; - ar->k_ar.ar_subj_rgid = td->td_ucred->cr_rgid; - ar->k_ar.ar_subj_egid = td->td_ucred->cr_groups[0]; - ar->k_ar.ar_subj_auid = td->td_proc->p_au->ai_auid; - ar->k_ar.ar_subj_asid = td->td_proc->p_au->ai_asid; - ar->k_ar.ar_subj_pid = td->td_proc->p_pid; - ar->k_ar.ar_subj_amask = td->td_proc->p_au->ai_mask; - ar->k_ar.ar_subj_term = td->td_proc->p_au->ai_termid; - - bcopy(td->td_proc->p_comm, ar->k_ar.ar_subj_comm, MAXCOMLEN); - - return (ar); -} - -/* - * MPSAFE - */ -void -audit_commit(struct kaudit_record *ar, int error, int retval) -{ - int sorf; - struct au_mask *aumask; - - if (ar == NULL) - return; - - /* - * Decide whether to commit the audit record by checking the - * error value from the system call and using the appropriate - * audit mask. - * - * XXXAUDIT: Synchronize access to audit_nae_mask? - */ - if (ar->k_ar.ar_subj_auid == AU_DEFAUDITID) - aumask = &audit_nae_mask; - else - aumask = &ar->k_ar.ar_subj_amask; - - if (error) - sorf = AU_PRS_FAILURE; - else - sorf = AU_PRS_SUCCESS; - - switch(ar->k_ar.ar_event) { - - case AUE_OPEN_RWTC: - /* The open syscall always writes a AUE_OPEN_RWTC event; change - * it to the proper type of event based on the flags and the - * error value. - */ - ar->k_ar.ar_event = flags_and_error_to_openevent( - ar->k_ar.ar_arg_fflags, error); - break; - - case AUE_SYSCTL: - ar->k_ar.ar_event = ctlname_to_sysctlevent( - ar->k_ar.ar_arg_ctlname, ar->k_ar.ar_valid_arg); - break; - - case AUE_AUDITON: - /* Convert the auditon() command to an event */ - ar->k_ar.ar_event = auditon_command_event(ar->k_ar.ar_arg_cmd); - break; - } - - if (au_preselect(ar->k_ar.ar_event, aumask, sorf) != 0) - ar->k_ar_commit |= AR_COMMIT_KERNEL; - - if ((ar->k_ar_commit & (AR_COMMIT_USER | AR_COMMIT_KERNEL)) == 0) { - mtx_lock(&audit_mtx); - audit_pre_q_len--; - mtx_unlock(&audit_mtx); - audit_record_free(ar); - return; - } - - ar->k_ar.ar_errno = error; - ar->k_ar.ar_retval = retval; - - /* - * We might want to do some system-wide post-filtering - * here at some point. - */ - - /* - * Timestamp system call end. - */ - nanotime(&ar->k_ar.ar_endtime); - - mtx_lock(&audit_mtx); - - /* - * Note: it could be that some records initiated while audit was - * enabled should still be committed? - */ - if (audit_suspended || !audit_enabled) { - audit_pre_q_len--; - mtx_unlock(&audit_mtx); - audit_record_free(ar); - return; - } - - /* - * Constrain the number of committed audit records based on - * the configurable parameter. - */ - while (audit_q_len >= audit_qctrl.aq_hiwater) { - AUDIT_PRINTF(("audit_commit: sleeping to wait for " - "audit queue to drain below high water mark\n")); - cv_wait(&audit_commit_cv, &audit_mtx); - AUDIT_PRINTF(("audit_commit: woke up waiting for " - "audit queue draining\n")); - } - - TAILQ_INSERT_TAIL(&audit_q, ar, k_q); - audit_q_len++; - audit_pre_q_len--; - cv_signal(&audit_cv); - mtx_unlock(&audit_mtx); -} - -/* - * audit_syscall_enter() is called on entry to eatch system call. It is - * responsible for deciding whether or not to audit the call (preselection), - * and if so, allocating a per-thread audit record. audit_new() will fill in - * basic thread/credential properties. - */ -void -audit_syscall_enter(unsigned short code, struct thread *td) -{ - int audit_event; - struct au_mask *aumask; - - KASSERT(td->td_ar == NULL, ("audit_syscall_enter: td->td_ar != NULL")); - - /* - * In FreeBSD, each ABI has its own system call table, and hence - * mapping of system call codes to audit events. Convert the code to - * an audit event identifier using the process system call table - * reference. In Darwin, there's only one, so we use the global - * symbol for the system call table. - * - * XXXAUDIT: Should we audit that a bad system call was made, and if - * so, how? - */ - if (code >= td->td_proc->p_sysent->sv_size) - return; - - audit_event = td->td_proc->p_sysent->sv_table[code].sy_auevent; - if (audit_event == AUE_NULL) - return; - - /* - * Check which audit mask to use; either the kernel non-attributable - * event mask or the process audit mask. - */ - if (td->td_proc->p_au->ai_auid == AU_DEFAUDITID) - aumask = &audit_nae_mask; - else - aumask = &td->td_proc->p_au->ai_mask; - - /* - * Allocate an audit record, if preselection allows it, and store - * in the thread for later use. - */ - if (au_preselect(audit_event, aumask, - AU_PRS_FAILURE | AU_PRS_SUCCESS)) { - /* - * If we're out of space and need to suspend unprivileged - * processes, do that here rather than trying to allocate - * another audit record. - * - * XXXRW: We might wish to be able to continue here in the - * future, if the system recovers. That should be possible - * by means of checking the condition in a loop around - * cv_wait(). It might be desirable to reevaluate whether an - * audit record is still required for this event by - * re-calling au_preselect(). - */ - if (audit_in_failure && suser(td) != 0) { - cv_wait(&audit_fail_cv, &audit_mtx); - panic("audit_failing_stop: thread continued"); - } - td->td_ar = audit_new(audit_event, td); - } else - td->td_ar = NULL; -} - -/* - * audit_syscall_exit() is called from the return of every system call, or in - * the event of exit1(), during the execution of exit1(). It is responsible - * for committing the audit record, if any, along with return condition. - */ -void -audit_syscall_exit(int error, struct thread *td) -{ - int retval; - - /* - * Commit the audit record as desired; once we pass the record - * into audit_commit(), the memory is owned by the audit - * subsystem. - * The return value from the system call is stored on the user - * thread. If there was an error, the return value is set to -1, - * imitating the behavior of the cerror routine. - */ - if (error) - retval = -1; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Oct 6 01:12:30 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E12E916A421; Thu, 6 Oct 2005 01:12:29 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A355916A41F for ; Thu, 6 Oct 2005 01:12:29 +0000 (GMT) (envelope-from soc-chenk@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E25743D5E for ; Thu, 6 Oct 2005 01:12:22 +0000 (GMT) (envelope-from soc-chenk@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j961CMou094503 for ; Thu, 6 Oct 2005 01:12:22 GMT (envelope-from soc-chenk@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j961CLbV094500 for perforce@freebsd.org; Thu, 6 Oct 2005 01:12:21 GMT (envelope-from soc-chenk@freebsd.org) Date: Thu, 6 Oct 2005 01:12:21 GMT Message-Id: <200510060112.j961CLbV094500@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-chenk@freebsd.org using -f From: soc-chenk To: Perforce Change Reviews Cc: Subject: PERFORCE change 84876 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2005 01:12:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=84876 Change 84876 by soc-chenk@soc-chenk_leavemealone on 2005/10/06 01:12:09 Upgrade userspace to 2.4.0 Submitted by: soc-chenk Affected files ... .. //depot/projects/soc2005/fuse4bsd2/Changelog#15 edit .. //depot/projects/soc2005/fuse4bsd2/README.html#8 edit .. //depot/projects/soc2005/fuse4bsd2/fuselib/fuselib-2.4.0-rc1.diff#3 delete .. //depot/projects/soc2005/fuse4bsd2/fuselib/fuselib-2.4.0.diff#1 add Differences ... ==== //depot/projects/soc2005/fuse4bsd2/Changelog#15 (text+ko) ==== @@ -1,3 +1,6 @@ +Thu Oct 6 03:01:20 CEST 2005 at node: creo.hu, nick: csaba + * Upgrade userspace to 2.4.0 + Tue Oct 4 23:16:26 CEST 2005 at node: creo.hu, nick: csaba * Fixes in library patch - trying again to get mknod right ==== //depot/projects/soc2005/fuse4bsd2/README.html#8 (text+ko) ==== @@ -32,7 +32,7 @@ The main part of Fuse for FreeBSD is a kernel module which provides a kernel messaging interface to the Fuse library in userspace which is compatible with that of the Linux module. The userspace part is pretty portable. A lightweight patch is enough to get that compile and work.

    -The module was written for and tested with CURRENT, aka FreeBSD-7.0. I'd guess it will work fine with RELENG 6 too, but currently it's not usable with 5.x (or lower) versions. The module will work with 7.0-CURRENT snapshots from not earlier than 8th of August and RELENG_6 snapshots from not earlier than 13th of August (desperate types can try with older CURRENT/RELENG_6 snapshots if they set the -DUSE_OLD_CLONEHANDLER_API flag for cc). +The module can be expected work with RELENG_6 snapshots of version number at least 600034, or with HEAD snapshots of version number at least 700002. (Hint: you can get the version number of your currently running kernel by sysctl -n kern.osreldate; or you can extract the version number directly from the source code by awk '/#define/{if ($2 == "__FreeBSD_version") { print $3; exit }}' /sys/sys/param.h.) (Desperate types can try with older HEAD/RELENG_6 snapshots if they set the -DUSE_OLD_CLONEHANDLER_API flag for cc.)

    What can be considered as a public homepage for the project is [WWW]http://wikitest.freebsd.org/moin.cgi/FuseFilesystem; for updates, further info go there. Get in contact with me via the soc-chenk email addrees of the FreeBSD organization (freebsd.org). @@ -50,7 +50,7 @@

  • - Fuse itself. Get Fuse 2.4.0-rc1 from their [WWW]Sourceforge project page. If this is not availabe there (because a newer (pre)release has taken its place), you can either try to adopt these instructions to the newer (pre)release, or fetch it from my download directory, [WWW]http://creo.hu/~csaba/projects/fuse4bsd/downloads/. + Fuse itself. Get Fuse 2.4.0 from their [WWW]Sourceforge project page. If this is not availabe there (because a newer (pre)release has taken its place), you can either try to adopt these instructions to the newer (pre)release, or fetch it from my download directory, [WWW]http://creo.hu/~csaba/projects/fuse4bsd/downloads/.

  • @@ -58,6 +58,12 @@ The FreeBSD module. Source tarballs are provided at [WWW]http://creo.hu/~csaba/projects/fuse4bsd/downloads/ under the name fuse4bsd-<version>.tar.* (latest release is 0.2.11, date of release: 21th Sep 2005). The current code is available via [WWW]Darcs, you can fetch it by
     darcs get http://creo.hu/~csaba/darcs-repos/fuse4bsd
    command, or via [WWW]Perforce (you can use this latter link for online source code browsing).

    +

    + Release tarballs and SCM snapshots include a version of this wiki page as README.html. Always act according to the included version. +

    +

    + <!> Warning: on rare occasions the wiki version may refer to a not yet committed state of the module code. +

  • @@ -98,30 +104,27 @@

  • Apply the patch with -

     patch -Np1 < ../fuse4bsd/fuselib/fuselib-2.4.0-rc1.diff
    +
     patch -Np1 < ../fuse4bsd/fuselib/fuselib-2.4.0.diff

  • Do

     cp ../fuse4bsd/fuse_module/fuse_kernel.h include/ &&
    - cp ../fuse4bsd/fuse_module/linux_compat.h include/
    (these commands dynamically customize the header file defining the kernel-userland interface; as these are needed in the module as well, they are handled separately from the userspace patch). + cp ../fuse4bsd/fuse_module/linux_compat.h include/ (as fuse_kernel.h is used by both of kernel and userspace, the necessary patch is separated from the all-over userspace patch, and is kept by the module code).

  • - We will do a non-privileged install (I'd say that's easier than set up a jail), I'll use ~/meta/fuse-2.4.0-rc1 as the prefix. Type the following commands: + We will do a non-privileged install (I'd say that's easier than set up a jail), I'll use ~/meta/fuse-2.4.0 as the prefix. Type the following commands:

     mkdir junk &&
      ln -s /usr/bin/true junk/chown &&
      ln -s /usr/bin/true junk/mknod &&
    - echo '#!/bin/sh
    - echo "$1" | grep -q /etc/udev || /bin/mkdir "$@"' > junk/mkdir &&
    - chmod a+x junk/mkdir &&
    - echo '#!/bin/sh
    - echo "$@" | grep -q udev || /usr/bin/install "$@"' > junk/install &&
    - chmod a+x junk/install &&
    + echo 'echo "$1" | grep -q /etc/udev || /bin/mkdir "$@"' > junk/mkdir &&
    + echo 'echo "$@" | grep -q udev || /usr/bin/install "$@"' > junk/install &&
    + chmod a+x junk/mkdir junk/install &&
      (export PATH=`pwd`/junk:$PATH &&
    - ./configure --prefix=$HOME/meta/fuse-2.4.0-rc1 --bindir=`pwd`/junk --disable-kernel-module MOUNT_FUSE_PATH=`pwd`/junk &&
    + ./configure --prefix=$HOME/meta/fuse-2.4.0 --bindir=`pwd`/junk --disable-kernel-module MOUNT_FUSE_PATH=`pwd`/junk &&
      make &&
      make install)

    @@ -144,7 +147,7 @@
  • Type -

     env PKG_CONFIG_PATH=~/meta/fuse-2.4.0-rc1/lib/pkgconfig/ ./configure && make
    +
     env PKG_CONFIG_PATH=~/meta/fuse-2.4.0/lib/pkgconfig/ ./configure && make

  • @@ -160,15 +163,14 @@

    As the superuser, do -

    kldload use_module/fuse.ko
    +
    kldload fuse_module/fuse.ko
     sysctl vfs.usermount=1

    -Now you'll have to act as a user belonging to the operator group or you can as well delete all barriers by -

    devfs rule add path 'fuse*' mode 666
    (opening and doing I/O on fuse devices will have no effect until they get mounted). +Now you'll have to act as a user belonging to the operator group. (A different access policy could be set by [WWW]devfs(8); eg., deleting all barriers would look like devfs rule add path 'fuse*' mode 666. Think of permissions of fuse devices directly as mount permissions of Fuse filesystems.)

    -Proceed on with the user you chose (we will assume you use the same user as the one who did the installation). +Proceed on with the user you chose (nevertheless, we will assume you use the same user as the one who did the installation).

    Pick your favourite ssh accessible account (though maybe you'd better stick to servers running OpenSSH -- I've seen commits in sshfs' CVS for better interoperability with other servers, which show there might occur problems with them), say, it's foo@bar.baz. @@ -176,7 +178,7 @@

    Go to sshfs' directory. First prepare the mount:

    mkdir -p ~/fuse &&
    -export LD_LIBRARY_PATH=~/meta/fuse-2.4.0-rc1/lib/
    and also make sure that mount_fusefs (of FreeBSD Fuse) is in your path. Then do: +export LD_LIBRARY_PATH=~/meta/fuse-2.4.0/lib/
    and also make sure that mount_fusefs (of FreeBSD Fuse) is in your path. Then do:
    mount_fusefs auto ~/fuse ./sshfs foo@bar.baz:

    @@ -204,6 +206,14 @@

  • + Make autotools play nice with Fuse (generating configure files doesn't work with CVS snapshots) +

    +

    + /!\ Autotools gurus, help please! It might be just a five minutes work for you to fix it. +

    +
  • +
  • +

    Implement attr/name caching (with timeouts)

  • From owner-p4-projects@FreeBSD.ORG Thu Oct 6 01:17:30 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 976C416A421; Thu, 6 Oct 2005 01:17:29 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A69116A41F for ; Thu, 6 Oct 2005 01:17:29 +0000 (GMT) (envelope-from soc-chenk@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B80D43D46 for ; Thu, 6 Oct 2005 01:17:29 +0000 (GMT) (envelope-from soc-chenk@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j961HSkR094918 for ; Thu, 6 Oct 2005 01:17:28 GMT (envelope-from soc-chenk@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j961HSqI094915 for perforce@freebsd.org; Thu, 6 Oct 2005 01:17:28 GMT (envelope-from soc-chenk@freebsd.org) Date: Thu, 6 Oct 2005 01:17:28 GMT Message-Id: <200510060117.j961HSqI094915@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-chenk@freebsd.org using -f From: soc-chenk To: Perforce Change Reviews Cc: Subject: PERFORCE change 84877 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2005 01:17:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=84877 Change 84877 by soc-chenk@soc-chenk_leavemealone on 2005/10/06 01:16:41 Upgrade userspace to 2.4.0 (completed) Submitted by: soc-chenk Affected files ... .. //depot/projects/soc2005/fuse4bsd2/fuselib/fuselib-2.4.0.diff#2 edit Differences ... ==== //depot/projects/soc2005/fuse4bsd2/fuselib/fuselib-2.4.0.diff#2 (text+ko) ==== @@ -1,6 +1,6 @@ diff -Naur linuxfuse/example/fusexmp.c bsdfuse/example/fusexmp.c --- linuxfuse/example/fusexmp.c Tue Sep 13 21:26:12 2005 -+++ bsdfuse/example/fusexmp.c Tue Oct 4 23:02:55 2005 ++++ bsdfuse/example/fusexmp.c Thu Oct 6 02:38:03 2005 @@ -20,7 +20,12 @@ #include #include @@ -37,7 +37,7 @@ diff -Naur linuxfuse/example/fusexmp_fh.c bsdfuse/example/fusexmp_fh.c --- linuxfuse/example/fusexmp_fh.c Tue Sep 13 21:26:12 2005 -+++ bsdfuse/example/fusexmp_fh.c Tue Oct 4 23:04:44 2005 ++++ bsdfuse/example/fusexmp_fh.c Thu Oct 6 02:38:03 2005 @@ -17,7 +17,12 @@ #include #include @@ -99,8 +99,8 @@ if(res == -1) return -errno; diff -Naur linuxfuse/include/fuse.h bsdfuse/include/fuse.h ---- linuxfuse/include/fuse.h Thu Sep 8 17:16:48 2005 -+++ bsdfuse/include/fuse.h Fri Sep 30 11:29:31 2005 +--- linuxfuse/include/fuse.h Mon Oct 3 16:12:50 2005 ++++ bsdfuse/include/fuse.h Thu Oct 6 02:38:03 2005 @@ -20,7 +20,12 @@ #include @@ -115,8 +115,8 @@ #ifdef __cplusplus diff -Naur linuxfuse/include/fuse_lowlevel.h bsdfuse/include/fuse_lowlevel.h ---- linuxfuse/include/fuse_lowlevel.h Thu Sep 15 13:26:16 2005 -+++ bsdfuse/include/fuse_lowlevel.h Fri Sep 30 11:29:31 2005 +--- linuxfuse/include/fuse_lowlevel.h Mon Oct 3 16:12:50 2005 ++++ bsdfuse/include/fuse_lowlevel.h Thu Oct 6 02:38:03 2005 @@ -18,7 +18,12 @@ #include #include @@ -131,8 +131,8 @@ #ifdef __cplusplus diff -Naur linuxfuse/lib/fuse.c bsdfuse/lib/fuse.c ---- linuxfuse/lib/fuse.c Thu Sep 8 17:16:49 2005 -+++ bsdfuse/lib/fuse.c Fri Sep 30 17:59:29 2005 +--- linuxfuse/lib/fuse.c Mon Oct 3 17:02:37 2005 ++++ bsdfuse/lib/fuse.c Thu Oct 6 02:38:03 2005 @@ -1414,7 +1414,12 @@ static int default_statfs(struct statfs *buf) @@ -184,8 +184,8 @@ } diff -Naur linuxfuse/lib/fuse_lowlevel.c bsdfuse/lib/fuse_lowlevel.c ---- linuxfuse/lib/fuse_lowlevel.c Thu Sep 8 17:16:49 2005 -+++ bsdfuse/lib/fuse_lowlevel.c Fri Sep 30 11:29:31 2005 +--- linuxfuse/lib/fuse_lowlevel.c Mon Oct 3 17:15:05 2005 ++++ bsdfuse/lib/fuse_lowlevel.c Thu Oct 6 02:38:03 2005 @@ -194,7 +194,11 @@ kstatfs->bavail = stbuf->f_bavail; kstatfs->files = stbuf->f_files; @@ -198,7 +198,7 @@ } static int send_reply_ok(fuse_req_t req, const void *arg, size_t argsize) -@@ -705,7 +709,11 @@ +@@ -690,7 +694,11 @@ req->ch = ch; if (!f->got_init && in->opcode != FUSE_INIT) @@ -212,7 +212,7 @@ in->opcode != FUSE_WRITE && in->opcode != FUSE_FSYNC && diff -Naur linuxfuse/lib/helper.c bsdfuse/lib/helper.c --- linuxfuse/lib/helper.c Mon Aug 15 16:03:59 2005 -+++ bsdfuse/lib/helper.c Fri Sep 30 17:57:56 2005 ++++ bsdfuse/lib/helper.c Thu Oct 6 02:38:03 2005 @@ -22,7 +22,11 @@ { if (progname) @@ -274,8 +274,8 @@ } diff -Naur linuxfuse/lib/mount.c bsdfuse/lib/mount.c ---- linuxfuse/lib/mount.c Wed Aug 3 12:22:32 2005 -+++ bsdfuse/lib/mount.c Fri Sep 30 11:29:31 2005 +--- linuxfuse/lib/mount.c Sun Oct 2 11:16:12 2005 ++++ bsdfuse/lib/mount.c Thu Oct 6 02:38:03 2005 @@ -21,7 +21,7 @@ #define FUSERMOUNT_PROG "fusermount" #define FUSE_COMMFD_ENV "_FUSE_COMMFD" @@ -393,14 +393,14 @@ int fuse_mount_compat1(const char *mountpoint, const char *args[]) diff -Naur linuxfuse/util/fusermount.c bsdfuse/util/fusermount.c ---- linuxfuse/util/fusermount.c Mon Sep 26 13:18:07 2005 -+++ bsdfuse/util/fusermount.c Fri Sep 30 11:29:31 2005 +--- linuxfuse/util/fusermount.c Mon Oct 3 17:02:37 2005 ++++ bsdfuse/util/fusermount.c Thu Oct 6 02:38:03 2005 @@ -1,3 +1,4 @@ +#ifndef __FreeBSD__ /* FUSE: Filesystem in Userspace Copyright (C) 2001-2005 Miklos Szeredi -@@ -1108,3 +1109,12 @@ +@@ -1113,3 +1114,12 @@ return 0; } From owner-p4-projects@FreeBSD.ORG Thu Oct 6 02:29:59 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BC8F116A422; Thu, 6 Oct 2005 02:29:58 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FEFB16A420 for ; Thu, 6 Oct 2005 02:29:58 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1834443D49 for ; Thu, 6 Oct 2005 02:29:58 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j962TvLF097516 for ; Thu, 6 Oct 2005 02:29:57 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j962TvnU097513 for perforce@freebsd.org; Thu, 6 Oct 2005 02:29:57 GMT (envelope-from soc-andrew@freebsd.org) Date: Thu, 6 Oct 2005 02:29:57 GMT Message-Id: <200510060229.j962TvnU097513@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 84881 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2005 02:29:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=84881 Change 84881 by soc-andrew@soc-andrew_serv on 2005/10/06 02:29:32 Add a basic Lua package to use libarchive to extract tarballs with Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/lib/lua/Makefile#3 edit .. //depot/projects/soc2005/bsdinstaller/src/lib/lua/archive/Makefile#1 add .. //depot/projects/soc2005/bsdinstaller/src/lib/lua/archive/archive.c#1 add .. //depot/projects/soc2005/bsdinstaller/src/lib/lua/archive/archive.lua#1 add Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/lib/lua/Makefile#3 (text+ko) ==== @@ -1,3 +1,4 @@ -SUBDIR=lua lualib compat51 posix socket mime +SUBDIR= lua lualib +SUBDIR+= archive compat51 mime posix socket .include From owner-p4-projects@FreeBSD.ORG Thu Oct 6 04:35:20 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E436716A421; Thu, 6 Oct 2005 04:35:19 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5F6416A41F for ; Thu, 6 Oct 2005 04:35:19 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7097D43D46 for ; Thu, 6 Oct 2005 04:35:19 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j964ZJct002216 for ; Thu, 6 Oct 2005 04:35:19 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j964ZJwk002213 for perforce@freebsd.org; Thu, 6 Oct 2005 04:35:19 GMT (envelope-from soc-andrew@freebsd.org) Date: Thu, 6 Oct 2005 04:35:19 GMT Message-Id: <200510060435.j964ZJwk002213@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 84884 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2005 04:35:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=84884 Change 84884 by soc-andrew@soc-andrew_serv on 2005/10/06 04:34:59 Don't split the distfiles when BSDINSTALLER is defined to simplify the extraction process with libarchive Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/release/Makefile#16 edit Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/release/Makefile#16 (text+ko) ==== @@ -1137,6 +1137,7 @@ .endif @rm -rf ${RD}/dists/${TD}/${TN}* @mkdir -p ${RD}/dists/${TD} +.if !defined(BSDINSTALLER) @( cd ${SD} && \ tn=`echo ${TN} | tr 'A-Z' 'a-z' | cut -c1-8` && \ echo rolling ${TD}/$$tn tarball &&\ @@ -1154,12 +1155,28 @@ > ${RD}/dists/${TD}/$$tn.mtree ; \ else \ true; \ + fi; \ + ) +.else + @( cd ${SD} && \ + tn=`echo ${TN} | tr 'A-Z' 'a-z' | cut -c1-8` && \ + echo rolling ${TD}/$$tn tarball &&\ + tar --exclude CVS --exclude obj --exclude BOOTMFS -cf - ${ARG} | \ + gzip --no-name -9 -c > ${RD}/dists/${TD}/$$tn.gz && \ + if [ "${SD}" != "/usr/src" ]; then \ + mtree -c -i -p ${SD}/${ARG} \ + -k gname,md5digest,mode,nlink,uname,size,link,type \ + > ${RD}/dists/${TD}/$$tn.mtree ; \ + else \ + true; \ fi; \ - ( cd ${RD}/dists/${TD}; \ + ) +.endif + @( cd ${RD}/dists/${TD}; \ rm -f .CHECKSUM.MD5 CHECKSUM.SHA256; \ md5 * > .CHECKSUM.MD5; \ sha256 * > CHECKSUM.SHA256; \ - mv .CHECKSUM.MD5 CHECKSUM.MD5) \ + mv .CHECKSUM.MD5 CHECKSUM.MD5 \ ) doRELEASE: release.1 release.2 ${DOCREL} release.3 release.4 \ From owner-p4-projects@FreeBSD.ORG Thu Oct 6 04:40:27 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B039416A425; Thu, 6 Oct 2005 04:40:26 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 704EA16A423 for ; Thu, 6 Oct 2005 04:40:26 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 311EC43D46 for ; Thu, 6 Oct 2005 04:40:26 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j964eQP1002395 for ; Thu, 6 Oct 2005 04:40:26 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j964ePEE002392 for perforce@freebsd.org; Thu, 6 Oct 2005 04:40:25 GMT (envelope-from soc-andrew@freebsd.org) Date: Thu, 6 Oct 2005 04:40:25 GMT Message-Id: <200510060440.j964ePEE002392@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 84885 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2005 04:40:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=84885 Change 84885 by soc-andrew@soc-andrew_serv on 2005/10/06 04:40:05 Add a license to the libarchive lua package Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/lib/lua/archive/archive.c#2 edit .. //depot/projects/soc2005/bsdinstaller/src/lib/lua/archive/archive.lua#2 edit Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/lib/lua/archive/archive.c#2 (text+ko) ==== @@ -1,3 +1,32 @@ +/* + * Copyright (C) 2005, Andrew Turner, All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name(s) of the author(s) may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #include #include ==== //depot/projects/soc2005/bsdinstaller/src/lib/lua/archive/archive.lua#2 (text+ko) ==== @@ -1,3 +1,29 @@ +-- Copyright (C) 2005, Andrew Turner, All rights reserved. +-- +-- Redistribution and use in source and binary forms, with or without +-- modification, are permitted provided that the following conditions +-- are met: +-- 1. Redistributions of source code must retain the above copyright +-- notice, this list of conditions and the following disclaimer +-- in this position and unchanged. +-- 2. Redistributions in binary form must reproduce the above copyright +-- notice, this list of conditions and the following disclaimer in the +-- documentation and/or other materials provided with the distribution. +-- 3. The name(s) of the author(s) may not be used to endorse or promote +-- products derived from this software without specific prior written +-- permission. +-- +-- THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR +-- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +-- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +-- IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, +-- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +-- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +-- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + module("archive") require("posix") From owner-p4-projects@FreeBSD.ORG Thu Oct 6 05:52:55 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 243FE16A421; Thu, 6 Oct 2005 05:52:55 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D798316A41F for ; Thu, 6 Oct 2005 05:52:54 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EC8E43D49 for ; Thu, 6 Oct 2005 05:52:54 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j965qs0J012038 for ; Thu, 6 Oct 2005 05:52:54 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j965qs67012035 for perforce@freebsd.org; Thu, 6 Oct 2005 05:52:54 GMT (envelope-from soc-andrew@freebsd.org) Date: Thu, 6 Oct 2005 05:52:54 GMT Message-Id: <200510060552.j965qs67012035@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 84887 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2005 05:52:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=84887 Change 84887 by soc-andrew@soc-andrew_serv on 2005/10/06 05:52:34 Fix spelling of extract Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/lib/lua/archive/archive.lua#3 edit Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/lib/lua/archive/archive.lua#3 (text+ko) ==== @@ -32,7 +32,7 @@ archive.archive_ok = 0 -- A function to extract a file file to the location -function archive.extrace_to(file, location) +function archive.extract_to(file, location) local a = archive.read_new() local cwd = posix.getcwd() archive.read_support_compression_all(a) From owner-p4-projects@FreeBSD.ORG Sat Oct 8 05:33:57 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DFBF916A421; Sat, 8 Oct 2005 05:33:56 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9E4316A41F for ; Sat, 8 Oct 2005 05:33:56 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AD2043D48 for ; Sat, 8 Oct 2005 05:33:56 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j985XuPp036086 for ; Sat, 8 Oct 2005 05:33:56 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j985XuFM036083 for perforce@freebsd.org; Sat, 8 Oct 2005 05:33:56 GMT (envelope-from soc-andrew@freebsd.org) Date: Sat, 8 Oct 2005 05:33:56 GMT Message-Id: <200510080533.j985XuFM036083@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 84980 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2005 05:33:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=84980 Change 84980 by soc-andrew@soc-andrew_serv on 2005/10/08 05:33:42 Name the distfiles dist.tgz not dist.gz Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/release/Makefile#17 edit Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/release/Makefile#17 (text+ko) ==== @@ -1162,7 +1162,7 @@ tn=`echo ${TN} | tr 'A-Z' 'a-z' | cut -c1-8` && \ echo rolling ${TD}/$$tn tarball &&\ tar --exclude CVS --exclude obj --exclude BOOTMFS -cf - ${ARG} | \ - gzip --no-name -9 -c > ${RD}/dists/${TD}/$$tn.gz && \ + gzip --no-name -9 -c > ${RD}/dists/${TD}/$$tn.tgz && \ if [ "${SD}" != "/usr/src" ]; then \ mtree -c -i -p ${SD}/${ARG} \ -k gname,md5digest,mode,nlink,uname,size,link,type \ From owner-p4-projects@FreeBSD.ORG Sat Oct 8 22:42:27 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D2C6116A44B; Sat, 8 Oct 2005 22:42:26 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A9A3F16A42C for ; Sat, 8 Oct 2005 22:42:26 +0000 (GMT) (envelope-from soc-chenk@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C38543D45 for ; Sat, 8 Oct 2005 22:42:26 +0000 (GMT) (envelope-from soc-chenk@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j98MgQvE011201 for ; Sat, 8 Oct 2005 22:42:26 GMT (envelope-from soc-chenk@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j98MgQYk011198 for perforce@freebsd.org; Sat, 8 Oct 2005 22:42:26 GMT (envelope-from soc-chenk@freebsd.org) Date: Sat, 8 Oct 2005 22:42:26 GMT Message-Id: <200510082242.j98MgQYk011198@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-chenk@freebsd.org using -f From: soc-chenk To: Perforce Change Reviews Cc: Subject: PERFORCE change 85017 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2005 22:42:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=85017 Change 85017 by soc-chenk@soc-chenk_leavemealone on 2005/10/08 22:41:37 conceptionally bad code eliminated from readdir handler Submitted by: soc-chenk Affected files ... .. //depot/projects/soc2005/fuse4bsd2/fuse_module/fuse.c#12 edit .. //depot/projects/soc2005/fuse4bsd2/fuselib/fuselib-2.4.0.diff#3 edit Differences ... ==== //depot/projects/soc2005/fuse4bsd2/fuse_module/fuse.c#12 (text+ko) ==== @@ -3569,7 +3569,6 @@ } #define DIRCOOKEDSIZE FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + MAXNAMLEN + 1) -#define DIRENTSIZE(n) (sizeof(struct dirent) - MAXNAMLEN + (n)) static int fuse_readdir(struct vop_readdir_args *ap) @@ -3646,13 +3645,25 @@ err = fuse_read_directbackend(vp, fufh, uio, cred, td, FUSE_READDIR, fuse_dir_buffeater, &cookediov); #else - err = fuse_read_biobackend(vp, NULL, uio, cred, td, FUSE_READDIR, - fuse_dir_buffeater, &cookediov); + /* + * We tried hard to use bio, but offsety readdir can't be handled + * properly that way -- the offset field of fuse_dirents can't be + * mapped to an offset of a bio buffer + */ + err = fuse_read_directbackend(vp, get_filehandle(vp, td, cred, FREAD), + uio, cred, td, FUSE_READDIR, + fuse_dir_buffeater, &cookediov); #endif fuse_iov_teardown(&cookediov); return (err); } +/* A hack for being able to please the GENERIC_DIRSIZ macro */ + +struct pseudo_dirent { + uint32_t d_namlen; +}; + static int fuse_dir_buffeater(struct uio *uio, size_t reqsize, void *buf, size_t bufsize, void *param) { @@ -3700,7 +3711,7 @@ cookediov = param; - DEBUG2G("entering loop\n"); + DEBUG2G("entering loop with bufsize %d\n", bufsize); /* * Can we avoid infite loops? An infinite loop could occur only if we @@ -3714,15 +3725,23 @@ * was completed, otherwise we hed exited above with -1. */ - while (bufsize >= FUSE_NAME_OFFSET) { + for (;;) { #if ZERO_PAD_INCOMPLETE_BUFS int i; char *c; #endif + + if (bufsize < FUSE_NAME_OFFSET) { + err = -1; + break; + } + cou++; fudge = (struct fuse_dirent *)buf; freclen = FUSE_DIRENT_SIZE(fudge); + DEBUG("bufsize %d, freclen %d\n", bufsize, freclen); + /* * Here is an exit condition: we terminate the whole reading * process if a fresh chunk of buffer is already too short to @@ -3747,42 +3766,17 @@ break; } #endif - + /* Sanity checks */ - if (fudge->off < uio->uio_offset) { - DEBUG2G("offsets out of sync at %d: fudge->off %d, uio->uio_offset %d\n", - cou, (int)fudge->off, (int)uio->uio_offset); - err = EIO; - break; - } - /* - * The "imaginary" amount of incoming data, - * we fake towards userspace that we got this much, - * to maintain offset consistency. - * (The whole story starts with the "off" field of - * fuse_dirent being imaginary -- it need not to be - * the same as the amount of data got from the daemon. - * It should be at least as much as the incoming data though, - * hence the above sanity check.) - */ - bytesavail = fudge->off - uio->uio_offset; - if (!fudge->namelen || fudge->namelen > MAXNAMLEN) { - DEBUG2G("bogus namelen at %d\n", cou); - err = EIO; - break; - } - if (freclen > bytesavail) { - DEBUG2G("inconsistent fuse dirent at %d\n", cou); - err = EIO; - break; - } - if (DIRENTSIZE(fudge->namelen) > bytesavail) { - DEBUG2G("fuse dirent is mystically too tight for our purposes at %d\n", cou); + if (!fudge->namelen || fudge->namelen > MAXNAMLEN) { + DEBUG2G("bogus namelen %d at turn %d\n", + fudge->namelen, cou); err = EIO; break; } + bytesavail = GENERIC_DIRSIZ((struct pseudo_dirent *)&fudge->namelen); /* * Exit condition 2: if the pretended amount of input is more @@ -3796,9 +3790,6 @@ break; } - DEBUG("bytesavail %d, fudge->off %llu, fudge->namelen %d, uio->uio_offset %d\n", - bytesavail, fudge->off, fudge->namelen, (int)uio->uio_offset); - fuse_iov_audit(cookediov); fuse_iov_adjust(cookediov, bytesavail); de = (struct dirent *) cookediov->base; @@ -3806,17 +3797,22 @@ de->d_reclen = bytesavail; de->d_type = fudge->type; de->d_namlen = fudge->namelen; - memcpy((char *)cookediov->base + DIRENTSIZE(-1), + memcpy((char *)cookediov->base + sizeof(struct dirent) - MAXNAMLEN - 1, (char *)buf + FUSE_NAME_OFFSET, fudge->namelen); + ((char *)cookediov->base)[bytesavail] = '\0'; + DEBUG("bytesavail %d, fudge->off %llu, fudge->namelen %d, uio->uio_offset %d, name %s\n", + bytesavail, fudge->off, fudge->namelen, (int)uio->uio_offset, + (char *)cookediov->base + sizeof(struct dirent) - MAXNAMLEN - 1); + err = uiomove(cookediov->base, cookediov->len, uio); if (err) break; - buf = (char*)buf + bytesavail; - reqsize -= bytesavail; - bufsize -= bytesavail; + buf = (char*)buf + freclen; + bufsize -= freclen; + uio->uio_offset = fudge->off; } return (err); ==== //depot/projects/soc2005/fuse4bsd2/fuselib/fuselib-2.4.0.diff#3 (text+ko) ==== @@ -56,7 +56,7 @@ st.st_ino = de->d_ino; st.st_mode = de->d_type << 12; +#ifdef __FreeBSD__ -+ if (filler(buf, de->d_name, &st, 0)) ++ if (filler(buf, de->d_name, &st, telldir(dp))) +#else if (filler(buf, de->d_name, &st, de->d_off)) +#endif