From owner-p4-projects@FreeBSD.ORG Sun Sep 21 05:00:37 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4068216A4D7; Sun, 21 Sep 2003 05:00:37 -0700 (PDT) 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 11AC616A4B3 for ; Sun, 21 Sep 2003 05:00:37 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id ECC4343FFB for ; Sun, 21 Sep 2003 05:00:31 -0700 (PDT) (envelope-from tzukanov@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8LC0VXJ022538 for ; Sun, 21 Sep 2003 05:00:31 -0700 (PDT) (envelope-from tzukanov@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8LC0Vct022534 for perforce@freebsd.org; Sun, 21 Sep 2003 05:00:31 -0700 (PDT) (envelope-from tzukanov@freebsd.org) Date: Sun, 21 Sep 2003 05:00:31 -0700 (PDT) Message-Id: <200309211200.h8LC0Vct022534@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to tzukanov@freebsd.org using -f From: Serguei Tzukanov To: Perforce Change Reviews Subject: PERFORCE change 38371 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Sep 2003 12:00:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=38371 Change 38371 by tzukanov@tzukanov_antares on 2003/09/21 05:00:29 Update s390 specific code to -current. Use -fPIC instead -fpic for libraries (gcc silently generates incorrect code with -fpic). rtld works. Affected files ... .. //depot/projects/s390/Makefile.inc1#18 edit .. //depot/projects/s390/contrib/binutils/gas/config/tc-s390.c#5 edit .. //depot/projects/s390/lib/libdisk/disk.c#9 edit .. //depot/projects/s390/libexec/rtld-elf/s390/reloc.c#5 edit .. //depot/projects/s390/libexec/rtld-elf/s390/rtld_machdep.h#3 edit .. //depot/projects/s390/share/mk/bsd.lib.mk#6 edit .. //depot/projects/s390/sys/s390/conf/GENERIC#10 edit .. //depot/projects/s390/sys/s390/s390/autoconf.c#4 edit .. //depot/projects/s390/sys/s390/s390/clock.c#5 edit .. //depot/projects/s390/sys/s390/s390/db_disasm.c#3 edit .. //depot/projects/s390/sys/s390/s390/db_hwatch.c#3 edit .. //depot/projects/s390/sys/s390/s390/db_interface.c#3 edit .. //depot/projects/s390/sys/s390/s390/db_trace.c#3 edit .. //depot/projects/s390/sys/s390/s390/dump_machdep.c#3 edit .. //depot/projects/s390/sys/s390/s390/ebcdic.c#3 edit .. //depot/projects/s390/sys/s390/s390/external.c#4 edit .. //depot/projects/s390/sys/s390/s390/genassym.c#5 edit .. //depot/projects/s390/sys/s390/s390/machdep.c#10 edit .. //depot/projects/s390/sys/s390/s390/pmap.c#15 edit .. //depot/projects/s390/sys/s390/s390/skey.h#3 edit .. //depot/projects/s390/sys/s390/s390/swtch.S#5 edit .. //depot/projects/s390/sys/s390/s390/trap.c#10 edit .. //depot/projects/s390/sys/s390/s390/vm_machdep.c#9 edit .. //depot/projects/s390/usr.sbin/crunch/crunchide/exec_elf32.c#8 edit Differences ... ==== //depot/projects/s390/Makefile.inc1#18 (text+ko) ==== @@ -733,8 +733,8 @@ .for _tool in \ bin/csh \ bin/sh \ + ${_libopcodes} \ ${_rescue} \ - ${_libopcodes} \ gnu/usr.bin/cc/cc_tools \ ${_fortran} \ ${_libkrb5} \ ==== //depot/projects/s390/contrib/binutils/gas/config/tc-s390.c#5 (text+ko) ==== @@ -1375,9 +1375,9 @@ expression (&exp); if (exp.X_op == O_constant) { - if ( ((opformat->oplen == 6) && (exp.X_op > 0) && (exp.X_op < (1ULL << 48))) - || ((opformat->oplen == 4) && (exp.X_op > 0) && (exp.X_op < (1ULL << 32))) - || ((opformat->oplen == 2) && (exp.X_op > 0) && (exp.X_op < (1ULL << 16)))) + if ( ((opformat->oplen == 6) && (exp.X_op > 0)) + || ((opformat->oplen == 4) && (exp.X_op > 0)) + || ((opformat->oplen == 2) && (exp.X_op > 0))) md_number_to_chars (insn, exp.X_add_number, opformat->oplen); else as_bad (_("Invalid .insn format\n")); ==== //depot/projects/s390/lib/libdisk/disk.c#9 (text+ko) ==== @@ -58,6 +58,10 @@ p_ppc #elif defined(__amd64__) p_amd64 +#elif defined(__s390x__) + p_s390x +#elif defined(__s390__) + p_s390 #else IHAVENOIDEA #endif ==== //depot/projects/s390/libexec/rtld-elf/s390/reloc.c#5 (text+ko) ==== @@ -190,13 +190,12 @@ if (desc.action & _B) value += (Elf_Addr)obj->relocbase; - if (desc.action & _S) { + if (desc.action & (_S|_L)) { defobj = NULL; def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, false, cache); if (def == NULL) return -1; - value += (Elf_Addr)(defobj->relocbase + def->st_value); } ==== //depot/projects/s390/libexec/rtld-elf/s390/rtld_machdep.h#3 (text+ko) ==== @@ -31,6 +31,16 @@ #ifndef _RTLD_MACHDEP_H_ #define _RTLD_MACHDEP_H_ +#include +#include + +/* What's the actual value of this G5/G6/z800/z900/z990? */ +#ifdef __s390x__ +#define CACHE_LINE_SIZE 128 +#else +#define CACHE_LINE_SIZE 32 +#endif + struct Struct_Obj_Entry; /* Return the address of the .dynamic section in the dynamic linker. */ @@ -44,11 +54,9 @@ const struct Struct_Obj_Entry *obj, const Elf_Rel *rel) { - dbg("reloc_jmpslot: *%p = %p", (void *)(where), - (void *)(target)); - *where = target; + *where = target + ((const Elf_Rela *)rel)->r_addend; - return target; + return (*where); } #define make_function_pointer(def, defobj) \ @@ -57,43 +65,4 @@ #define call_initfini_pointer(obj, target) \ (((InitFunc)(target))()) - -#define ATOMIC_CHANGE_32(V,OP) \ - int nv, pv; \ - \ - __asm volatile ( \ - " bcr 15, 0\n" \ - " l %[pv], 0(%[p])\n" \ - "1: lr %[nv], %[pv]\n" \ - " "OP" %[nv], %[v]\n" \ - " cs %[pv], %[nv], 0(%[p])\n" \ - " jnz 1b" \ - : [nv]"=&r"(nv), [pv]"=&r"(pv) \ - : [v]"r"(V), [p]"a"(p) \ - : "memory", "cc"); - -static inline void -atomic_decr_int(volatile int *p) -{ - int one = 1; - - ATOMIC_CHANGE_32(one, "sr"); -} - -static inline void -atomic_incr_int(volatile int *p) -{ - int one = 1; - - ATOMIC_CHANGE_32(one, "ar"); -} - -static inline void -atomic_add_int(volatile int *p, int v) -{ - ATOMIC_CHANGE_32(v, "ar"); -} - -#undef ATOMIC_CHANGE_32 - #endif /* !_RTLD_MACHDEP_H_ */ ==== //depot/projects/s390/share/mk/bsd.lib.mk#6 (text+ko) ==== @@ -41,7 +41,8 @@ .SUFFIXES: .out .o .po .So .S .asm .s .c .cc .cpp .cxx .m .C .f .y .l .ln .if !defined(PICFLAG) -.if ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "s390" || \ + ${MACHINE_ARCH} == "s390x" PICFLAG=-fPIC .else PICFLAG=-fpic ==== //depot/projects/s390/sys/s390/conf/GENERIC#10 (text+ko) ==== @@ -37,14 +37,12 @@ options DIAGNOSTIC options DEBUG_LOCKS -options KTR -options KTR_ENTRIES=8192 -options KTR_COMPILE=KTR_ALL -#options KTR_MASK="(KTR_PMAP|KTR_TRAP|KTR_PROC|KTR_SIG|KTR_VM|KTR_SYSC|KTR_VOP|KTR_SMP)" -#options KTR_MASK="(KTR_PMAP|KTR_SIG|KTR_PROC)" -options KTR_MASK=0 -options KTR_CPUMASK=0x3 -options KTR_VERBOSE +#options KTR +#options KTR_ENTRIES=8192 +#options KTR_COMPILE=KTR_ALL +#options KTR_MASK=0 +#options KTR_CPUMASK=0x3 +#options KTR_VERBOSE #options SMP ==== //depot/projects/s390/sys/s390/s390/autoconf.c#4 (text+ko) ==== @@ -2,11 +2,10 @@ * S/390 and zSeries version. * * Copyright (c) 2002 Serguei Tzukanov. - * */ #include -__FREEBSD("$FreeBSD: src/sys/s390/s390/autoconf.c,v 1.0 2002/08/01 23:51:16 tzukanov Exp $"); +__FBSDID("$FreeBSD: src/sys/s390/s390/autoconf.c,v 1.0 2002/08/01 23:51:16 tzukanov Exp $"); #include #include ==== //depot/projects/s390/sys/s390/s390/clock.c#5 (text+ko) ==== ==== //depot/projects/s390/sys/s390/s390/db_disasm.c#3 (text+ko) ==== @@ -1,14 +1,12 @@ /*- * DDB Disassembler both for S/390 and zSeries. * - * Copyright (c) 2002 Serguei Tzukanov. - * - * All rights reserved. Terms for use and redistribution - * are covered by the BSD copyright as found in /usr/src/COPYRIGHT. - * - * $FreeBSD: src/sys/s390/s390/db_disasm.c,v 1.0 2002/07/01 23:51:16 tzukanov Exp $ + * Copyright (c) 2002 Serguei Tzukanov. All rights reserved. */ +#include +__FBSDID("$FreeBSD: src/sys/s390/s390/db_disasm.c,v 1.0 2002/07/01 23:51:16 tzukanov Exp $"); + #include #include #include ==== //depot/projects/s390/sys/s390/s390/db_hwatch.c#3 (text+ko) ==== @@ -2,13 +2,11 @@ * Support for hardware watchpoint via PER 2. * * Copyright (c) 2002 Serguei Tzukanov. - * - * All rights reserved. Terms for use and redistribution - * are covered by the BSD copyright as found in /usr/src/COPYRIGHT. - * - * $FreeBSD: src/sys/s390/s390/db_hwatch.c,v 1.0 2002/04/01 23:51:16 tzukanov Exp $ */ +#include +__FBSDID("$FreeBSD: src/sys/s390/s390/db_hwatch.c,v 1.0 2002/04/01 23:51:16 tzukanov Exp $"); + #include #include #include ==== //depot/projects/s390/sys/s390/s390/db_interface.c#3 (text+ko) ==== @@ -4,9 +4,11 @@ * All rights reserved. Terms for use and redistribution * are covered by the BSD copyright as found in /usr/src/COPYRIGHT. * - * $FreeBSD: src/sys/s390/s390/db_interface.c,v 1.0 2002/04/01 23:51:16 tzukanov Exp $ */ +#include +__FBSDID("$FreeBSD: src/sys/s390/s390/db_interface.c,v 1.0 2002/04/01 23:51:16 tzukanov Exp $"); + #include #include #include ==== //depot/projects/s390/sys/s390/s390/db_trace.c#3 (text+ko) ==== @@ -2,13 +2,11 @@ * Support for stack tracing in DDB. * * Copyright (c) 2002 Serguei Tzukanov. - * - * All rights reserved. Terms for use and redistribution - * are covered by the BSD copyright as found in /usr/src/COPYRIGHT. - * - * $FreeBSD: src/sys/s390/s390/db_trace.c,v 1.0 2002/04/01 23:51:16 tzukanov Exp $ */ +#include +__FBSDID("$FreeBSD: src/sys/s390/s390/db_trace.c,v 1.0 2002/04/01 23:51:16 tzukanov Exp $"); + #include #include #include ==== //depot/projects/s390/sys/s390/s390/dump_machdep.c#3 (text+ko) ==== @@ -31,10 +31,11 @@ * 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. - * - * $FreeBSD: src/sys/s390/s390/dump_machdep.c,v 1.0 2002/05/04 17:45:48 tzukanov Exp $ */ +#include +__FBSDID("$FreeBSD: src/sys/s390/s390/dump_machdep.c,v 1.0 2002/05/04 17:45:48 tzukanov Exp $"); + #include #include #include ==== //depot/projects/s390/sys/s390/s390/ebcdic.c#3 (text+ko) ==== @@ -1,15 +1,12 @@ /*- * EBCDIC to ASCII and back. Shared between S/390 and z/Series ports. - * Should I move this to libkern? * * Copyright (c) 2002 Serguei Tzukanov. - * - * All rights reserved. Terms for use and redistribution - * are covered by the BSD copyright as found in /usr/src/COPYRIGHT. - * - * $FreeBSD: src/sys/s390/s390/ebcdic.c,v 1.0 2002/04/01 23:51:16 tzukanov Exp $ */ +#include +__FBSDID("$FreeBSD: src/sys/s390/s390/ebcdic.c,v 1.0 2002/04/01 23:51:16 tzukanov Exp $"); + #include #include #include ==== //depot/projects/s390/sys/s390/s390/external.c#4 (text+ko) ==== @@ -2,13 +2,11 @@ * S/390 and zSeries external interruption handling. * * Copyright (c) 2002 Serguei Tzukanov. - * - * All rights reserved. Terms for use and redistribution - * are covered by the BSD copyright as found in /usr/src/COPYRIGHT. - * - * $FreeBSD: src/sys/s390/s390/external.c,v 1.0 2002/04/01 23:51:16 tzukanov Exp $ */ +#include +__FBSDID("$FreeBSD: src/sys/s390/s390/external.c,v 1.0 2002/04/01 23:51:16 tzukanov Exp $"); + #include #include #include ==== //depot/projects/s390/sys/s390/s390/genassym.c#5 (text+ko) ==== @@ -1,14 +1,12 @@ /*- * Symbols for assembler code. * - * Copyright (c) 2002 Serguei Tzukanov. - * - * All rights reserved. Terms for use and redistribution - * are covered by the BSD copyright as found in /usr/src/COPYRIGHT. - * - * $FreeBSD: src/sys/s390/s390/genassym.c,v 1.0 2002/04/01 23:51:16 tzukanov Exp $ + * Copyright (c) 2002 Serguei Tzukanov. All rights reserved. */ +#include +__FBSDID("$FreeBSD: src/sys/s390/s390/genassym.c,v 1.0 2002/04/01 23:51:16 tzukanov Exp $"); + #include #include #include ==== //depot/projects/s390/sys/s390/s390/machdep.c#10 (text+ko) ==== @@ -85,6 +85,7 @@ #include #include #include +#include #include #include #include @@ -200,7 +201,9 @@ /* Enable DAT. */ dat_init(); + #ifndef __s390x__ + /* Reserve space for machine check exception. */ sysarea.pcpu += EXTENDED_SAVE_AREA_SIZE; #endif @@ -308,7 +311,7 @@ /* Old FreeBSD-style arguments. */ tf->tf_gpr[3] = code; } - mtx_unlock(&psp->ms_mtx); + mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); /* Copy the sigframe out to the user's stack. */ @@ -329,7 +332,7 @@ * Build siginfo_t for SA thread */ void -cpu_thread_siginfo(int sig, u_long code, siginfo_t si) +cpu_thread_siginfo(int sig, u_long code, siginfo_t *si) { /* No SA on S/390 yet. */ } ==== //depot/projects/s390/sys/s390/s390/pmap.c#15 (text+ko) ==== @@ -175,7 +175,7 @@ virtual_avail += n * PAGE_SIZE; - return pa; + return (pa); } void @@ -190,10 +190,10 @@ /* Find out the size of physical memory. */ psw_define(&sysarea.program_new_psw, PSW_0, (u_long)&&last_page); - skey_set(0, SKEY_READWRITE); + sk_set(0, SK_RW); avail_end = PAGE_SIZE; while(tprot(avail_end)) { - skey_set(avail_end, SKEY_READWRITE); + sk_set(avail_end, SK_RW); avail_end += PAGE_SIZE; } @@ -299,7 +299,7 @@ CTR3(KTR_PMAP, "pmap_ptepa: pmap = %p, va = %x, pte = %x", pmap, va, pte); - return pte; + return (pte); } static void @@ -392,9 +392,9 @@ vm_page_free(mpte); cnt.v_wire_count--; } - return 1; + return (1); } - return 0; + return (0); } static int @@ -403,9 +403,11 @@ CTR3(KTR_PMAP, "pmap_unuse_ptp: pmap = %p, va = %x, mpte = %x", pmap, va, mpte); if (pmap == kernel_pmap) - return 0; + return (0); if (mpte == NULL) { + vm_offset_t ptepa; + ptepa = pmap->pm_sto[VA_SX(va)]; mpte = PHYS_TO_VM_PAGE(ptepa); KASSERT(mpte != NULL, ("pmap_unuse_ptp: mpte == NULL")); @@ -445,7 +447,7 @@ TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); pv_free(pv); } - return rv; + return (rv); } static void @@ -539,7 +541,7 @@ vm_page_unlock_queues(); VM_OBJECT_UNLOCK(pmap->pm_pteobj); - return mpte; + return (mpte); } static vm_page_t @@ -593,7 +595,7 @@ return pmap_unuse_ptp(pmap, va, NULL); } - return 0; + return (0); } static void * @@ -626,7 +628,7 @@ { CTR3(KTR_PMAP, "pmap_addr_hint: object = %p, va = %x, size = %u", object, va, size); - return va; + return (va); } void @@ -658,7 +660,7 @@ CTR1(KTR_PMAP, "pmap_clear_modify: pa = %x", pa); - skey_set(pa, skey_get(pa) & ~SKEY_CHANGE); + sk_set(pa, sk_get(pa) & ~SK_C); } void @@ -747,9 +749,6 @@ /* If we are setting page read-write. */ if (prot & VM_PROT_WRITE) { - skey_set(opa, SKEY_READWRITE | - (skey_get(opa) & SKEY_REFERENCE)); - if (pte_readonly(opte)) { opte &= ~PTE_PROTECTION; ipte(ptepa); @@ -810,13 +809,62 @@ vm_page_t pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t mpte) { + vm_paddr_t ptepa; + pte_t opte, pte; + + KASSERT(va < VM_MAX_ADDRESS, + ("%s: va is too big", __func__)); + + /* Get a pte page or allocate it. */ + if (pmap != kernel_pmap) { + unsigned int ptpindex; + + ptpindex = VA_SX(va) >> 2; + if ((mpte != NULL) && (mpte->pindex == ptpindex)) { + mpte->hold_count++; + } else { + mpte = pmap_get_pte(pmap, va); + } + } else { + mpte = NULL; + } + + ptepa = pmap_ptepa(pmap, va); + opte = lura(ptepa); + if ((opte & PTE_INVALID) == 0) { + if (mpte != NULL) { + vm_page_lock_queues(); + pmap_unwire_pte_hold(pmap, mpte); + vm_page_unlock_queues(); + } + return (NULL); + } + + pte = VM_PAGE_TO_PHYS(m); + + /* Enter on the pv list if part of our managed memory. */ + if (pmap_initialized && + ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0)) { + pmap_insert_entry(pmap, va, mpte, m); + pte |= PTE_MANAGED; + } + + /* Increment counters. */ + pmap->pm_stats.resident_count++; + + stura(ptepa, pte | PTE_PROTECTION); + + return (mpte); } vm_paddr_t pmap_extract(pmap_t pmap, vm_offset_t va) { - vm_paddr_t ptepa = pmap_ptepa(pmap, va); - pte_t pte = lura(ptepa); + vm_paddr_t ptepa; + pte_t pte; + + ptepa = pmap_ptepa(pmap, va); + pte = lura(ptepa); if (pte_valid(pte)) return (PTE_PFRA(pte) + VA_BX(va)); @@ -824,6 +872,26 @@ return (0); } +vm_page_t +pmap_extract_and_hold(pmap_t pmap, vm_offset_t va) +{ + vm_paddr_t pa; + vm_page_t m; + + m = NULL; + mtx_lock(&Giant); + pa = pmap_extract(pmap, va); + if (pa != 0) { + m = PHYS_TO_VM_PAGE(pa); + vm_page_lock_queues(); + vm_page_hold(m); + vm_page_unlock_queues(); + } + mtx_unlock(&Giant); + + return (m); +} + void pmap_growkernel(vm_offset_t va) { @@ -881,7 +949,7 @@ if (!pmap_initialized || (m->flags & PG_FICTITIOUS)) return FALSE; - return (skey_get(pa) & SKEY_CHANGE) ? TRUE : FALSE; + return (sk_get(pa) & SK_C) ? TRUE : FALSE; } void @@ -927,7 +995,7 @@ pmap_kenter(va, spa); *vap = va; - return sva; + return (sva); } int @@ -941,11 +1009,11 @@ pte = lura(pmap_ptepa(pmap, va)); if (!pte_valid(pte)) - return 0; + return (0); rv = MINCORE_INCORE; if (!pte_managed(pte)); - return rv; + return (rv); m = PHYS_TO_VM_PAGE(pte); @@ -958,13 +1026,12 @@ vm_page_flag_set(m, PG_REFERENCED); } - return rv; + return (rv); } void -pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, - vm_object_t object, vm_pindex_t pindex, vm_offset_t size, - int pagelimit) +pmap_object_init_pt(pmap_t pmap, vm_offset_t va, + vm_object_t object, vm_pindex_t pindex, vm_offset_t size) { /* optional */ } @@ -987,7 +1054,7 @@ if (++loops >= 16) break; } - return FALSE; + return (FALSE); } void @@ -995,16 +1062,16 @@ { vm_offset_t pa = VM_PAGE_TO_PHYS(m); +panic("GGGG: %s", __func__); CTR2(KTR_PMAP, "pmap_page_protect: pa = %x, prot = %d", pa, prot); KASSERT((prot == VM_PROT_READ) || (prot == VM_PROT_NONE), ("pmap_page_protect: unexpected prot")); if (prot & VM_PROT_READ) { - int skey = skey_get(pa); - if (skey & SKEY_CHANGE) + int sk = sk_get(pa); + if (sk & SK_C) vm_page_dirty(m); - skey_set(pa, SKEY_READONLY | (skey & SKEY_REFERENCE)); } else if (prot == VM_PROT_NONE) { pmap_remove_all(m); } @@ -1025,6 +1092,7 @@ if (pmap->pm_pteobj == NULL) pmap->pm_pteobj = vm_object_allocate(OBJT_DEFAULT, NPTP + 1); + VM_OBJECT_LOCK(pmap->pm_pteobj); stpg = vm_page_grab(pmap->pm_pteobj, NPTP, VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED); @@ -1032,6 +1100,7 @@ vm_page_flag_clear(stpg, PG_BUSY); stpg->valid = VM_PAGE_BITS_ALL; vm_page_unlock_queues(); + VM_OBJECT_UNLOCK(pmap->pm_pteobj); pmap_kenter((vm_offset_t)pmap->pm_sto, VM_PAGE_TO_PHYS(stpg)); for (i = 0; i < 4*NPTP; i++) @@ -1268,7 +1337,7 @@ "1:" : [rv]"+r"(rv) : [pa]"r"(pa) : "r0", "cc"); - return rv; + return (rv); } void ==== //depot/projects/s390/sys/s390/s390/skey.h#3 (text+ko) ==== @@ -13,30 +13,30 @@ #define _ESA_SKEY_H_ /* Keep this in sync with PSW_KEY (src/sys/{s390|s390x}/include/psw.h). */ -#define SKEY_READONLY 0xe0 -#define SKEY_READWRITE 0xf0 +#define SK_RO 0xe0 +#define SK_RW 0xf0 -#define SKEY_CHANGE 0x04 -#define SKEY_REFERENCE 0x02 +#define SK_C 0x04 +#define SK_R 0x02 static __inline int -skey_get(vm_offset_t pa) +sk_get(vm_offset_t pa) { - int skey = 0; + int sk = 0; __asm volatile ( - " iske %[skey],%[pa]" - : [skey]"+r"(skey) : [pa]"r"(pa)); + " iske %[sk],%[pa]" + : [sk]"+r"(sk) : [pa]"r"(pa)); - return skey; + return sk; } static __inline void -skey_set(vm_offset_t pa, int skey) +sk_set(vm_offset_t pa, int sk) { __asm volatile ( - " sske %[skey],%[pa]" - :: [skey]"r"(skey), [pa]"r"(pa) : "memory"); + " sske %[sk],%[pa]" + :: [sk]"r"(sk), [pa]"r"(pa) : "memory"); } #endif /* !_ESA_SKEY_H_ */ ==== //depot/projects/s390/sys/s390/s390/swtch.S#5 (text+ko) ==== @@ -13,28 +13,20 @@ #include "assym.s" -/* void cpu_throw(void) */ +/* void cpu_throw(struct thread *old, struct thread *new) */ ENTRY(cpu_throw) xr %r2, %r2 - j .Lchoose + j .Lrestore -/* void cpu_switch(void) */ +/* void cpu_switch(struct thread *old, struct thread *new) */ ENTRY(cpu_switch) l %r5, PSA_PCPU - l %r2, PC_CURTHREAD(%r5) ltr %r2, %r2 - jz .Lchoose + jz .Lrestore /* Mark current pmap inactive. */ l %r1, TD_PROC(%r2) l %r1, P_VMSPACE(%r1) -#if 0 - l %r3, PC_CPUMASK(%r5) - lnr %r3, %r3 - l %r4, VM_PMAP + PM_ACTIVE(%r1) - nr %r4, %r3 - st %r4, VM_PMAP + PM_ACTIVE(%r1) -#endif xc VM_PMAP + PM_ACTIVE(4, %r1), PC_CPUMASK(%r5) /* Save current context. */ @@ -67,21 +59,14 @@ std %f15, 132 + PCB_FPR(%r1) #endif - /* Get new thread. */ -.Lchoose: - lr %r6, %r2 - SETUP_BASE(%r13) - CALL(choosethread) - l %r1, TD_PCB(%r2) +.Lrestore: + /* Set up new kernel stack pointer. */ + l %r1, TD_PCB(%r3) st %r1, PSA_KSP -#if 0 - cr %r6, %r2 - je .Ldontload -#endif /* Store new curthread. */ l %r5, PSA_PCPU - st %r2, PC_CURTHREAD(%r5) + st %r3, PC_CURTHREAD(%r5) /* Setup secondary STD. */ lctl %c7, %c7, PCB_CR7(%r1) @@ -92,8 +77,8 @@ spm %r0 /* Mark new pmap active. */ - l %r3, TD_PROC(%r2) - l %r4, P_VMSPACE(%r3) + l %r2, TD_PROC(%r3) + l %r4, P_VMSPACE(%r2) oc VM_PMAP + PM_ACTIVE(4, %r4), PC_CPUMASK(%r5) /* Argument 0 for func in cpu_set_fork_handler. */ @@ -101,7 +86,6 @@ br %r14 -.Ldontload: lm %r13, %r14, 4*(13-6) + PCB_GPR6(%r1) br %r14 ==== //depot/projects/s390/sys/s390/s390/trap.c#10 (text+ko) ==== ==== //depot/projects/s390/sys/s390/s390/vm_machdep.c#9 (text+ko) ==== @@ -57,8 +57,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -74,6 +76,9 @@ #include #include +static void sf_buf_init(void *arg); +SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); + void cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) { @@ -152,7 +157,6 @@ { td->td_pcb = (struct pcb *)(td->td_kstack + KSTACK_BYTES) - 1; td->td_frame = (struct trapframe *)td->td_pcb - 1; - td->td_pcb->pcb_ext = 0; } void @@ -161,10 +165,10 @@ struct trapframe *tf; struct pcb *pcb; - CTR2(KTR_PROC, "cpu_set_upcall: td = %p, pcb0 = %p", td, pcb0); + CTR2(KTR_PROC, "cpu_set_upcall: td = %p, pcb0 = %p", td, td0->td_pcb); pcb = td->td_pcb; - bcopy(td0->pcb, pcb, sizeof(*pcb)); + bcopy(td0->td_pcb, pcb, sizeof(*pcb)); td->td_frame = tf = (struct trapframe *)pcb - 1; @@ -202,6 +206,7 @@ struct sf_buf * sf_buf_alloc(struct vm_page *m) { + return NULL; } void ==== //depot/projects/s390/usr.sbin/crunch/crunchide/exec_elf32.c#8 (text+ko) ==== @@ -172,6 +172,10 @@ #define EM_X86_64 62 #endif case EM_X86_64: break; +#ifndef EM_S390 +#define EM_S390 22 +#endif + case EM_S390: break; /* ELFDEFNNAME(MACHDEP_ID_CASES) */ default: From owner-p4-projects@FreeBSD.ORG Sun Sep 21 10:39:36 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C798516A4C0; Sun, 21 Sep 2003 10:39:35 -0700 (PDT) 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 9FB9516A4B3 for ; Sun, 21 Sep 2003 10:39:35 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7ED7043FE9 for ; Sun, 21 Sep 2003 10:39:32 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8LHdVXJ058114 for ; Sun, 21 Sep 2003 10:39:31 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8LHdVHG058111 for perforce@freebsd.org; Sun, 21 Sep 2003 10:39:31 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Sun, 21 Sep 2003 10:39:31 -0700 (PDT) Message-Id: <200309211739.h8LHdVHG058111@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 38384 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Sep 2003 17:39:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=38384 Change 38384 by marcel@marcel_nfs on 2003/09/21 10:38:32 IFC @38378 Affected files ... .. //depot/projects/ia64/contrib/gcc/config/freebsd-spec.h#12 integrate .. //depot/projects/ia64/contrib/groff/tmac/doc-common#12 integrate .. //depot/projects/ia64/contrib/groff/tmac/doc-syms#5 integrate .. //depot/projects/ia64/contrib/groff/tmac/doc.tmac#8 integrate .. //depot/projects/ia64/contrib/groff/tmac/groff_mdoc.man#9 integrate .. //depot/projects/ia64/gnu/usr.bin/groff/tmac/fr.ISO8859-1#4 integrate .. //depot/projects/ia64/gnu/usr.bin/groff/tmac/mdoc.local#17 integrate .. //depot/projects/ia64/gnu/usr.bin/groff/tmac/ru.KOI8-R#4 integrate .. //depot/projects/ia64/release/Makefile#71 integrate .. //depot/projects/ia64/sbin/dump/optr.c#11 integrate .. //depot/projects/ia64/share/man/man4/re.4#2 integrate .. //depot/projects/ia64/share/man/man7/release.7#25 integrate .. //depot/projects/ia64/sys/cam/cam_periph.c#14 integrate .. //depot/projects/ia64/sys/cam/scsi/scsi_all.c#15 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi_button.c#9 integrate .. //depot/projects/ia64/sys/dev/ata/atapi-cam.c#18 integrate .. //depot/projects/ia64/sys/dev/re/if_re.c#6 integrate .. //depot/projects/ia64/sys/i386/i386/pmap.c#64 integrate .. //depot/projects/ia64/sys/vm/uma_core.c#54 integrate .. //depot/projects/ia64/usr.sbin/acpi/acpidump/acpi.c#24 integrate Differences ... ==== //depot/projects/ia64/contrib/gcc/config/freebsd-spec.h#12 (text+ko) ==== @@ -18,7 +18,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $FreeBSD: src/contrib/gcc/config/freebsd-spec.h,v 1.13 2003/09/12 19:19:10 obrien Exp $ */ +/* $FreeBSD: src/contrib/gcc/config/freebsd-spec.h,v 1.14 2003/09/21 07:59:16 deischen Exp $ */ /* Common FreeBSD configuration. All FreeBSD architectures should include this file, which will specify @@ -159,10 +159,9 @@ #include #if __FreeBSD_version >= 500016 #define FBSD_LIB_SPEC " \ - %{pthread: %eThe -pthread option is deprecated.} \ %{!shared: \ - %{!pg: -lc} \ - %{pg: -lc_p} \ + %{!pg: %{pthread:-lc_r} -lc} \ + %{pg: %{pthread:-lc_r_p} -lc_p} \ }" #else #define FBSD_LIB_SPEC " \ ==== //depot/projects/ia64/contrib/groff/tmac/doc-common#12 (text+ko) ==== @@ -339,12 +339,18 @@ .. . . +.\" NS doc-default-operating-system global string +.\" NS the exact (default) version of the operating system +.\" NS +.\" NS override this in `mdoc.local', if necessary +. +.ds doc-default-operating-system BSD +. +. .\" NS doc-operating-system global string .\" NS the exact version of the operating system -.\" NS -.\" NS override this in `mdoc.local', if necessary . -.ds doc-operating-system BSD +.ds doc-operating-system . . .\" NS Os user macro (not parsed, not callable) @@ -434,10 +440,9 @@ .ds doc-operating-system-FreeBSD-5.0 5.0 . .de Os -. if "\$1"" \ -. return -. -. ie "\$1"ATT" \{\ +. ie "\$1"" \ +. ds doc-operating-system "\*[doc-default-operating-system] +. el \{ .ie "\$1"ATT" \{\ . ds doc-operating-system AT&T . if \A\$2 \{\ . ie d doc-operating-system-ATT-\$2 \ @@ -472,7 +477,7 @@ . ds doc-operating-system \$1 . if !"\$2"" \ . as doc-operating-system " \$2 -. \}\}\}\} +. \}\}\}\}\} .. . . @@ -696,6 +701,12 @@ .nr doc-in-synopsis-section 0 . . +.\" NS doc-in-library-section global register (bool) +.\" NS whether we are in the `library' section +. +.nr doc-in-library-section 0 +. +. .\" NS doc-in-see-also-section global register (bool) .\" NS whether we are in the `see also' section . @@ -733,6 +744,7 @@ .\" NS doc-func-count .\" NS doc-in-authors-section .\" NS doc-in-files-section +.\" NS doc-in-library-section .\" NS doc-in-see-also-section .\" NS doc-in-synopsis-section .\" NS doc-indent-synopsis @@ -749,6 +761,7 @@ . .ds doc-section-name NAME .ds doc-section-synopsis SYNOPSIS +.ds doc-section-library LIBRARY .ds doc-section-description DESCRIPTION .ds doc-section-see-also SEE .ds doc-section-files FILES @@ -795,6 +808,7 @@ . \} . el \{\ . nr doc-in-synopsis-section 0 +. nr doc-in-library-section 0 . nr doc-in-see-also-section 0 . nr doc-in-files-section 0 . nr doc-in-authors-section 0 @@ -806,6 +820,9 @@ . nr doc-indent-synopsis 0 . nr doc-indent-synopsis-active 0 . \} +. el \{ .ie "\*[doc-str-dfp]"\*[doc-section-library]" \{\ +. nr doc-in-library-section 1 +. \} . el \{ .ie "\*[doc-str-dfp]"\*[doc-section-description]" \{\ . nr doc-is-func 0 . nr doc-func-count 0 @@ -821,7 +838,7 @@ . nr doc-in-files-section 1 . el .if "\*[doc-str-dfp]"\*[doc-section-authors]" \ . nr doc-in-authors-section 1 -. \}\}\} +. \}\}\}\} . . in 0 . nr doc-have-author 0 @@ -1058,6 +1075,7 @@ . tm doc-display-vertical == \n[doc-display-vertical] . tm doc-header-string == `\*[doc-header-string]' . tm doc-in-synopsis-section == \n[doc-in-synopsis-section] +. tm doc-in-library-section == \n[doc-in-library-section] . tm doc-in-see-also-section == \n[doc-in-see-also-section] . tm doc-in-files-section == \n[doc-in-files-section] . tm doc-in-authors-section == \n[doc-in-authors-section] ==== //depot/projects/ia64/contrib/groff/tmac/doc-syms#5 (text+ko) ==== @@ -716,7 +716,11 @@ . \" replacing argument with result . ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Lb] . +. if \n[doc-in-library-section] \ +. br . doc-print-recursive +. if \n[doc-in-library-section] \ +. br . \} . el \{\ . tm Usage: .Lb library_name ... (#\n[.c]) ==== //depot/projects/ia64/contrib/groff/tmac/doc.tmac#8 (text+ko) ==== @@ -3321,6 +3321,7 @@ . nr doc-curr-font-saved \n[doc-curr-font] . nr doc-curr-size-saved \n[doc-curr-size] . nr doc-in-synopsis-section-saved \n[doc-in-synopsis-section] +. nr doc-in-library-section-saved \n[doc-in-library-section] . nr doc-indent-synopsis-saved \n[doc-indent-synopsis] . nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active] . nr doc-have-decl-saved \n[doc-have-decl] @@ -3460,6 +3461,7 @@ . nr doc-curr-font \n[doc-curr-font-saved] . nr doc-curr-size \n[doc-curr-size-saved] . nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved] +. nr doc-in-library-section \n[doc-in-library-section-saved] . nr doc-indent-synopsis \n[doc-indent-synopsis-saved] . nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved] . nr doc-have-decl \n[doc-have-decl-saved] @@ -5164,11 +5166,14 @@ .\" NS doc-issue-count .\" NS doc-issue-name .\" NS doc-journal-count -.\" NS doc-journam-name +.\" NS doc-journal-name .\" NS doc-optional-count .\" NS doc-optional-string .\" NS doc-page-number-count .\" NS doc-page-number-string +.\" NS doc-publisher-count +.\" NS doc-publisher-name +.\" NS doc-reference-count .\" NS doc-reference-title-count .\" NS doc-reference-title-name .\" NS doc-reference-title-name-for-book @@ -5192,6 +5197,8 @@ . nr doc-date-count 0 . nr doc-page-number-count 0 . nr doc-book-count 0 +. nr doc-publisher-count 0 +. nr doc-reference-count 0 . . ds doc-journal-name . ds doc-issue-name @@ -5204,6 +5211,7 @@ . ds doc-date . ds doc-page-number-string . ds doc-book-name +. ds doc-publisher-name .. . . ==== //depot/projects/ia64/contrib/groff/tmac/groff_mdoc.man#9 (text+ko) ==== @@ -786,7 +786,7 @@ the middle part of the manual page header strings are shown. Note how .Ql \e& -prevents the digit\~1 from being a valid numeric expression. +prevents the digit\~7 from being a valid numeric expression. . .Bd -ragged .Bl -tag -width ".Li .Dt\ FOO\ 2\ i386" -compact -offset indent @@ -1108,6 +1108,15 @@ To remove the special meaning from a punctuation character escape it with .Ql \e& . .Pp +The following punctuation characters are recognized by +.Nm \-mdoc : +. +.Bl -column -offset indent-two XXXXXX XXXXXX XXXXXX XXXXXX +.It Li .\& Ta Li ,\& Ta Li :\& Ta Li ;\& Ta Li (\& +.It Li )\& Ta Li [\& Ta Li ]\& Ta Li ?\& Ta Li !\& +.El +.Pp +. .Xr Troff is limited as a macro language, and has difficulty when presented with a string containing a member of the mathematical, logical or quotation set: @@ -1693,6 +1702,13 @@ then denotes the keyword to be used with the .Ql .Lb macro. +.Pp +In the +.Sx LIBRARY +section an +.Ql .Lb +command causes a line break before and after its arguments are printed. +.Pp . .Ss Literals . ==== //depot/projects/ia64/gnu/usr.bin/groff/tmac/fr.ISO8859-1#4 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/fr.ISO8859-1,v 1.3 2003/09/09 23:27:03 ru Exp $ +.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/fr.ISO8859-1,v 1.4 2003/09/20 21:23:53 ru Exp $ .\" .\" %beginstrip% . @@ -62,6 +62,7 @@ .\" .Sh localization .ds doc-section-name NOM .ds doc-section-synopsis SYNOPSIS +.ds doc-section-library BIBLIOTHхQUE .ds doc-section-description DESCRIPTION .ds doc-section-see-also VOIR .ds doc-section-files FICHIERS ==== //depot/projects/ia64/gnu/usr.bin/groff/tmac/mdoc.local#17 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" Copyright (c) 2001 Ruslan Ermilov . +.\" Copyright (c) 2001-2003 Ruslan Ermilov . .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.28 2003/08/05 10:29:50 ru Exp $ +.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.30 2003/09/20 21:32:26 ru Exp $ .\" .\" %beginstrip% . @@ -53,7 +53,7 @@ .ds doc-str-Lb-libvgl Video Graphics Library (libvgl, \-lvgl) . .\" Default .Os value -.ds doc-operating-system FreeBSD\~5.1 +.ds doc-default-operating-system FreeBSD\~5.1 . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-4.9 4.9 ==== //depot/projects/ia64/gnu/usr.bin/groff/tmac/ru.KOI8-R#4 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" Copyright (c) 2001 Ruslan Ermilov . +.\" Copyright (c) 2001-2003 Ruslan Ermilov . .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/ru.KOI8-R,v 1.11 2003/09/09 23:19:03 ru Exp $ +.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/ru.KOI8-R,v 1.14 2003/09/20 21:30:33 ru Exp $ .\" .\" %beginstrip% . @@ -62,6 +62,7 @@ .\" локализация .Sh .ds doc-section-name НАЗВАНИЕ .ds doc-section-synopsis СИНТАКСИС +.ds doc-section-library БИБЛИОТЕКА .ds doc-section-description ОПИСАНИЕ .ds doc-section-see-also СМОТРИ .ds doc-section-files ФАЙЛЫ @@ -76,10 +77,10 @@ .ds doc-str-Lb-libcipher Библиотека криптографии FreeSec (libcipher, \-lcipher) .ds doc-str-Lb-libcompat Библиотека совместимости (libcompat, \-lcompat) .ds doc-str-Lb-libcrypt Библиотека криптографии (libcrypt, \-lcrypt) -.ds doc-str-Lb-libcurses Curses Library (libcurses, \-lcurses) -.ds doc-str-Lb-libdevinfo Device and Resource Information Utility Library (libdevinfo, \-ldevinfo) +.\" XXX ds doc-str-Lb-libcurses Curses Library (libcurses, \-lcurses) +.\" XXX ds doc-str-Lb-libdevinfo Device and Resource Information Utility Library (libdevinfo, \-ldevinfo) .ds doc-str-Lb-libdevstat Библиотека статистики устройств (libdevstat, \-ldevstat) -.ds doc-str-Lb-libdisk Interface to Slice and Partition Labels Library (libdisk, \-ldisk) +.\" XXX ds doc-str-Lb-libdisk Interface to Slice and Partition Labels Library (libdisk, \-ldisk) .ds doc-str-Lb-libedit Библиотека редактора командной строки (libedit, \-ledit) .ds doc-str-Lb-libfetch Библиотека файловой передачи (libfetch, \-lfetch) .ds doc-str-Lb-libgeom Пользовательская API библиотека подсистемы ядра GEOM (libgeom, \-lgeom) @@ -88,17 +89,17 @@ .ds doc-str-Lb-libipx Библиотека поддержки конверсии адресов IPX (libipx, \-lipx) .ds doc-str-Lb-libkvm Библиотека доступа к данным ядра (libkvm, \-lkvm) .ds doc-str-Lb-libm Библиотека математических функций (libm, \-lm) -.ds doc-str-Lb-libmd Message Digest (MD4, MD5, и т.д.) Support Library (libmd, \-lmd) -.ds doc-str-Lb-libmenu Curses Menu Library (libmenu, \-lmenu) +.\" XXX ds doc-str-Lb-libmd Message Digest (MD4, MD5, и т.д.) Support Library (libmd, \-lmd) +.\" XXX ds doc-str-Lb-libmenu Curses Menu Library (libmenu, \-lmenu) .ds doc-str-Lb-libnetgraph Пользовательская библиотека Netgraph (libnetgraph, \-lnetgraph) .ds doc-str-Lb-libossaudio Библиотека эмуляции OSS Audio (libossaudio, \-lossaudio) .ds doc-str-Lb-libpam Библиотека PAM (libpam, \-lpam) .ds doc-str-Lb-libposix Библиотека \*[Px]\-совместимости (libposix, \-lposix) -.ds doc-str-Lb-libresolv DNS Resolver Library (libresolv, \-lresolv) +.\" XXX ds doc-str-Lb-libresolv DNS Resolver Library (libresolv, \-lresolv) .ds doc-str-Lb-librpcsvc Библиотека служб RPC (librpcsvc, \-lrpcsvc) .ds doc-str-Lb-libtermcap Библиотека доступа к termcap (libtermcap, \-ltermcap) .ds doc-str-Lb-libufs Библиотека доступа к файловой системе UFS (libufs, \-lufs) -.ds doc-str-Lb-libugidfw File System Firewall Interface Library (libugidfw, \-lugidfw) +.\" XXX ds doc-str-Lb-libugidfw File System Firewall Interface Library (libugidfw, \-lugidfw) .ds doc-str-Lb-libusbhid Библиотека функций доступа к USB HID (libusbhid, \-lusbhid) .ds doc-str-Lb-libutil Библиотека системных утилит (libutil, \-lutil) .ds doc-str-Lb-libvgl Библиотека видео-графики (libvgl, \-lvgl) ==== //depot/projects/ia64/release/Makefile#71 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/release/Makefile,v 1.819 2003/09/19 09:06:15 ru Exp $ +# $FreeBSD: src/release/Makefile,v 1.820 2003/09/21 06:33:14 ru Exp $ # # make release [BUILDNAME=somename] CHROOTDIR=/some/dir CVSROOT=/cvs/dir \ # [RELEASETAG=tag] @@ -345,8 +345,13 @@ cd ${CHROOTDIR}/usr && \ ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} co ${CVSCMDARGS} ${CVS_SRCARGS} ${RELEASESRCMODULE} .endif -.if defined(LOCAL_PATCHES) && exists(${LOCAL_PATCHES}) - cd ${CHROOTDIR}/usr/src && patch ${PATCH_FLAGS} < ${LOCAL_PATCHES} +.if defined(LOCAL_PATCHES) && !empty(LOCAL_PATCHES) + cd ${CHROOTDIR}/usr/${RELEASESRCMODULE} +.for p in ${LOCAL_PATCHES} +.if exists(${p}) + patch ${PATCH_FLAGS} < ${p} +.endif +.endfor .endif .if defined(LOCAL_SCRIPT) && exists(${LOCAL_SCRIPT}) cd ${CHROOTDIR} && env CHROOTDIR=${CHROOTDIR} BUILDNAME=${BUILDNAME} RELEASETAG=${RELEASETAG} ${LOCAL_SCRIPT} ==== //depot/projects/ia64/sbin/dump/optr.c#11 (text+ko) ==== @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)optr.c 8.2 (Berkeley) 1/6/94"; #endif static const char rcsid[] = - "$FreeBSD: src/sbin/dump/optr.c,v 1.25 2003/04/07 11:34:12 mdodd Exp $"; + "$FreeBSD: src/sbin/dump/optr.c,v 1.26 2003/09/20 23:35:37 ps Exp $"; #endif /* not lint */ #include @@ -233,10 +233,10 @@ (void) fprintf(stderr, "pid=%d ", getpid()); #endif va_start(ap, fmt); - (void) vfprintf(stderr, fmt, ap); + (void) vsnprintf(lastmsg, sizeof(lastmsg), fmt, ap); + (void) fprintf(stderr, lastmsg); (void) fflush(stdout); (void) fflush(stderr); - (void) vsnprintf(lastmsg, sizeof(lastmsg), fmt, ap); va_end(ap); } ==== //depot/projects/ia64/share/man/man4/re.4#2 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003 Wind River Systems +.\" Copyright (c) 2003 .\" Bill Paul . All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/re.4,v 1.1 2003/09/09 02:45:53 wpaul Exp $ +.\" $FreeBSD: src/share/man/man4/re.4,v 1.2 2003/09/20 21:42:56 wpaul Exp $ .\" .Dd September 4, 2003 .Dt RE 4 @@ -52,7 +52,9 @@ .It Compaq Evo N1015v Integrated Ethernet (8139C+) .It -Xterasys XN-152 10/100/1000 (8169) +Gigabyte 7N400 Pro2 Integrated Gigabit Ethernet (8110S) +.It +Xterasys XN-152 10/100/1000 NIC (8169) .El .Pp NICs based on the 8139C+ are capable of 10 and 100Mbps speeds over CAT5 ==== //depot/projects/ia64/share/man/man7/release.7#25 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man7/release.7,v 1.31 2003/08/04 21:00:35 ru Exp $ +.\" $FreeBSD: src/share/man/man7/release.7,v 1.32 2003/09/21 06:33:14 ru Exp $ .\" .Dd March 12, 2002 .Dt RELEASE 7 @@ -260,7 +260,7 @@ so that it can be booted from the loader via .Dq Li "boot " . .It Va LOCAL_PATCHES -A patch file against +Patch files against .Pa /usr/src that will be applied in the .Xr chroot 8 ==== //depot/projects/ia64/sys/cam/cam_periph.c#14 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.52 2003/09/10 18:23:43 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.53 2003/09/21 08:42:32 thomas Exp $"); #include #include @@ -975,7 +975,7 @@ sense_key = saved_ccb->csio.sense_data.flags; sense_key &= SSD_KEY; if (sense_key != SSD_KEY_NO_SENSE) { - saved_ccb->ccb_h.flags |= + saved_ccb->ccb_h.status |= CAM_AUTOSNS_VALID; xpt_print_path(saved_ccb->ccb_h.path); printf("Recovered Sense\n"); ==== //depot/projects/ia64/sys/cam/scsi/scsi_all.c#15 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.42 2003/06/10 18:14:04 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.43 2003/09/21 08:45:36 thomas Exp $"); #include @@ -2408,6 +2408,7 @@ scsi_cmd = (struct scsi_request_sense *)&csio->cdb_io.cdb_bytes; bzero(scsi_cmd, sizeof(*scsi_cmd)); scsi_cmd->opcode = REQUEST_SENSE; + scsi_cmd->length = dxfer_len; } void ==== //depot/projects/ia64/sys/dev/acpica/acpi_button.c#9 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi_button.c,v 1.13 2003/08/11 15:34:43 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi_button.c,v 1.14 2003/09/21 02:49:59 njl Exp $ */ #include "opt_acpi.h" @@ -43,9 +43,10 @@ struct acpi_button_softc { device_t button_dev; ACPI_HANDLE button_handle; - boolean_t button_type; /* Power or Sleep Button */ + boolean_t button_type; #define ACPI_POWER_BUTTON 0 #define ACPI_SLEEP_BUTTON 1 + boolean_t fixed; }; #define ACPI_NOTIFY_BUTTON_PRESSED_FOR_SLEEP 0x80 @@ -57,6 +58,8 @@ static int acpi_button_resume(device_t dev); static void acpi_button_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context); +static ACPI_STATUS + acpi_button_fixed_handler(void *context); static void acpi_button_notify_pressed_for_sleep(void *arg); static void acpi_button_notify_pressed_for_wakeup(void *arg); @@ -85,23 +88,31 @@ acpi_button_probe(device_t dev) { struct acpi_button_softc *sc; + int ret = ENXIO; sc = device_get_softc(dev); - if (acpi_get_type(dev) == ACPI_TYPE_DEVICE) { - if (!acpi_disabled("button")) { - if (acpi_MatchHid(dev, "PNP0C0C")) { - device_set_desc(dev, "Power Button"); - sc->button_type = ACPI_POWER_BUTTON; - return (0); - } - if (acpi_MatchHid(dev, "PNP0C0E")) { - device_set_desc(dev, "Sleep Button"); - sc->button_type = ACPI_SLEEP_BUTTON; - return (0); - } + if (acpi_get_type(dev) == ACPI_TYPE_DEVICE && !acpi_disabled("button")) { + if (acpi_MatchHid(dev, "PNP0C0C")) { + device_set_desc(dev, "Power Button"); + sc->button_type = ACPI_POWER_BUTTON; + ret = 0; + } else if (acpi_MatchHid(dev, "ACPI_FPB")) { + device_set_desc(dev, "Power Button (fixed)"); + sc->button_type = ACPI_POWER_BUTTON; + sc->fixed = 1; + ret = 0; + } else if (acpi_MatchHid(dev, "PNP0C0E")) { + device_set_desc(dev, "Sleep Button"); + sc->button_type = ACPI_SLEEP_BUTTON; + ret = 0; + } else if (acpi_MatchHid(dev, "ACPI_FSB")) { + device_set_desc(dev, "Sleep Button (fixed)"); + sc->button_type = ACPI_SLEEP_BUTTON; + sc->fixed = 1; + ret = 0; } } - return (ENXIO); + return (ret); } static int @@ -109,6 +120,7 @@ { struct acpi_button_softc *sc; ACPI_STATUS status; + int event; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -116,10 +128,17 @@ sc->button_dev = dev; sc->button_handle = acpi_get_handle(dev); - status = AcpiInstallNotifyHandler(sc->button_handle, ACPI_DEVICE_NOTIFY, - acpi_button_notify_handler, sc); + if (sc->fixed) { + event = (sc->button_type == ACPI_SLEEP_BUTTON) ? + ACPI_EVENT_SLEEP_BUTTON : ACPI_EVENT_POWER_BUTTON; + status = AcpiInstallFixedEventHandler(event, + acpi_button_fixed_handler, sc); + } else { + status = AcpiInstallNotifyHandler(sc->button_handle, + ACPI_DEVICE_NOTIFY, acpi_button_notify_handler, sc); + } if (ACPI_FAILURE(status)) { - device_printf(sc->button_dev, "couldn't install Notify handler - %s\n", + device_printf(sc->button_dev, "couldn't install notify handler - %s\n", AcpiFormatException(status)); return_VALUE (ENXIO); } @@ -217,3 +236,16 @@ break; /* unknown notification value */ } } + +static ACPI_STATUS +acpi_button_fixed_handler(void *context) +{ + struct acpi_button_softc *sc = (struct acpi_button_softc *)context; + + if (context == NULL) + return_ACPI_STATUS (AE_BAD_PARAMETER); + + acpi_button_notify_handler(sc->button_handle, + ACPI_NOTIFY_BUTTON_PRESSED_FOR_SLEEP, sc); + return_VALUE (AE_OK); +} ==== //depot/projects/ia64/sys/dev/ata/atapi-cam.c#18 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cam.c,v 1.23 2003/09/19 16:25:44 thomas Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cam.c,v 1.25 2003/09/21 16:49:53 thomas Exp $"); #include #include @@ -346,8 +346,8 @@ struct ccb_trans_settings *cts = &ccb->cts; /* - * XXX The default CAM transport code is very scsi specific and - * doesn't understand IDE speeds very well. Be silent about it + * XXX The default CAM transport code is very SCSI-specific and + * doesn't understand IDE speeds very well. Be silent about it * here and let it default to what is set in XPT_PATH_INQ */ CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_SUBTRACE, ("GET_TRAN_SETTINGS\n")); @@ -544,23 +544,31 @@ { struct atapi_hcb *hcb = (struct atapi_hcb *) request->driver; struct ccb_scsiio *csio = &hcb->ccb->csio; - int hcb_status = request->result; + u_int32_t rc; mtx_lock(&Giant); - #ifdef CAMDEBUG - if (CAM_DEBUGGED(csio->ccb_h.path, CAM_DEBUG_CDB)) { - printf("atapi_cb: hcb@%p status = %02x: (sk = %02x%s%s%s)\n", - hcb, hcb_status, hcb_status >> 4, - (hcb_status & 4) ? " ABRT" : "", - (hcb_status & 2) ? " EOM" : "", - (hcb_status & 1) ? " ILI" : ""); - printf(" %s: cmd %02x\n", - request->device->name, request->u.atapi.ccb[0]); - } +# define err (request->error) + if (CAM_DEBUGGED(csio->ccb_h.path, CAM_DEBUG_CDB)) { + printf("atapi_cb: hcb@%p error = %02x: (sk = %02x%s%s%s)\n", + hcb, err, err >> 4, + (err & 4) ? " ABRT" : "", + (err & 2) ? " EOM" : "", + (err & 1) ? " ILI" : ""); + printf("dev %s: cmd %02x status %02x result %02x\n", + request->device->name, request->u.atapi.ccb[0], + request->status, request->result); + } #endif - if (hcb_status != 0) { + + if (request->result != 0) { + rc = CAM_SCSI_STATUS_ERROR; csio->scsi_status = SCSI_STATUS_CHECK_COND; +#if 0 + /* + * XXX Temporarily disable autosense, as this seems to cause + * a missed ATA interrupt. + */ if ((csio->ccb_h.flags & CAM_DIS_AUTOSENSE) == 0) { int8_t ccb[16] = { ATAPI_REQUEST_SENSE, 0, 0, 0, sizeof(struct atapi_sense), 0, 0, 0, 0, 0, 0, @@ -572,17 +580,17 @@ csio->ccb_h.status |= CAM_AUTOSNS_VALID; } } - free_hcb_and_ccb_done(hcb, CAM_SCSI_STATUS_ERROR); - } - else { +#endif + } else { + rc = CAM_REQ_CMP; + csio->scsi_status = SCSI_STATUS_OK; if (((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) && hcb->dxfer_alloc != NULL) { bcopy(hcb->dxfer_alloc, csio->data_ptr, csio->dxfer_len); } - csio->scsi_status = SCSI_STATUS_OK; - free_hcb_and_ccb_done(hcb, CAM_REQ_CMP); } + free_hcb_and_ccb_done(hcb, rc); mtx_unlock(&Giant); } ==== //depot/projects/ia64/sys/dev/re/if_re.c#6 (text+ko) ==== @@ -106,7 +106,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.9 2003/09/19 02:35:03 wpaul Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.10 2003/09/20 21:18:27 wpaul Exp $"); #include #include @@ -2081,14 +2081,12 @@ /* * Enable C+ RX and TX mode, as well as VLAN stripping and - * RX checksum offload. Only enable dual-address cycle if - * we're on a 64-bit bus. We must configure the C+ register + * RX checksum offload. We must configure the C+ register * before all others. */ CSR_WRITE_2(sc, RL_CPLUS_CMD, RL_CPLUSCMD_RXENB| RL_CPLUSCMD_TXENB|RL_CPLUSCMD_PCI_MRW| - (CSR_READ_1(sc, RL_CFG2) & RL_BUSWIDTH_64BITS ? - RL_CPLUSCMD_PCI_DAC : 0)|RL_CPLUSCMD_VLANSTRIP| + RL_CPLUSCMD_VLANSTRIP| (ifp->if_capenable & IFCAP_RXCSUM ? RL_CPLUSCMD_RXCSUM_ENB : 0)); ==== //depot/projects/ia64/sys/i386/i386/pmap.c#64 (text+ko) ==== @@ -73,7 +73,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.433 2003/09/13 21:57:37 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.434 2003/09/20 23:54:36 alc Exp $"); /* * Manages physical address maps. @@ -1363,15 +1363,9 @@ void pmap_release(pmap_t pmap) { - vm_object_t object; - vm_page_t m; + vm_page_t m, ptdpg[NPGPTD]; int i; - object = pmap->pm_pteobj; - - KASSERT(object->ref_count == 1, - ("pmap_release: pteobj reference count %d != 1", - object->ref_count)); KASSERT(pmap->pm_stats.resident_count == 0, ("pmap_release: pmap resident count %ld != 0", pmap->pm_stats.resident_count)); @@ -1381,6 +1375,9 @@ LIST_REMOVE(pmap, pm_list); mtx_unlock_spin(&allpmaps_lock); + for (i = 0; i < NPGPTD; i++) + ptdpg[i] = PHYS_TO_VM_PAGE(pmap->pm_pdir[PTDPTDI + i]); + bzero(pmap->pm_pdir + PTDPTDI, (nkpt + NPGPTD) * sizeof(*pmap->pm_pdir)); #ifdef SMP @@ -1391,7 +1388,7 @@ vm_page_lock_queues(); for (i = 0; i < NPGPTD; i++) { - m = TAILQ_FIRST(&object->memq); + m = ptdpg[i]; #ifdef PAE KASSERT(VM_PAGE_TO_PHYS(m) == (pmap->pm_pdpt[i] & PG_FRAME), ("pmap_release: got wrong ptd page")); @@ -1401,8 +1398,6 @@ vm_page_busy(m); vm_page_free_zero(m); } - KASSERT(TAILQ_EMPTY(&object->memq), - ("pmap_release: leaking page table pages")); vm_page_unlock_queues(); } ==== //depot/projects/ia64/sys/vm/uma_core.c#54 (text+ko) ==== @@ -46,7 +46,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/vm/uma_core.c,v 1.83 2003/09/19 23:27:46 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/uma_core.c,v 1.85 2003/09/21 07:39:16 jeff Exp $"); /* I should really use ktr.. */ /* @@ -176,6 +176,7 @@ static void *obj_alloc(uma_zone_t, int, u_int8_t *, int); static void *page_alloc(uma_zone_t, int, u_int8_t *, int); +static void *startup_alloc(uma_zone_t, int, u_int8_t *, int); static void page_free(void *, int, u_int8_t); static uma_slab_t slab_zalloc(uma_zone_t, int); static void cache_drain(uma_zone_t); @@ -788,6 +789,42 @@ } /* + * This function is intended to be used early on in place of page_alloc() so + * that we may use the boot time page cache to satisfy allocations before + * the VM is ready. + */ +static void * +startup_alloc(uma_zone_t zone, int bytes, u_int8_t *pflag, int wait) +{ + /* + * Check our small startup cache to see if it has pages remaining. + */ + mtx_lock(&uma_mtx); + if (uma_boot_free != 0) { + uma_slab_t tmps; + + tmps = LIST_FIRST(&uma_boot_pages); + LIST_REMOVE(tmps, us_link); + uma_boot_free--; + mtx_unlock(&uma_mtx); + *pflag = tmps->us_flags; + return (tmps->us_data); + } + mtx_unlock(&uma_mtx); + if (booted == 0) + panic("UMA: Increase UMA_BOOT_PAGES"); + /* + * Now that we've booted reset these users to their real allocator. + */ +#ifdef UMA_MD_SMALL_ALLOC + zone->uz_allocf = uma_small_alloc; +#else + zone->uz_allocf = page_alloc; +#endif + return zone->uz_allocf(zone, bytes, pflag, wait); +} + +/* * Allocates a number of pages from the system * * Arguments: @@ -804,23 +841,6 @@ { void *p; /* Returned page */ - /* - * Check our small startup cache to see if it has pages remaining. - */ - if (uma_boot_free != 0 && bytes <= PAGE_SIZE) { - uma_slab_t tmps; - - tmps = LIST_FIRST(&uma_boot_pages); - LIST_REMOVE(tmps, us_link); - uma_boot_free--; - *pflag = tmps->us_flags; - return (tmps->us_data); - } else if (booted == 0) { - if (bytes > PAGE_SIZE) - panic("UMA: Can't allocate multiple pages before vm " - "has started.\n"); - panic("UMA: Increase UMA_BOOT_PAGES"); - } *pflag = UMA_SLAB_KMEM; p = (void *) kmem_malloc(kmem_map, bytes, wait); @@ -1059,13 +1079,18 @@ zone_large_init(zone); else zone_small_init(zone); + /* + * If we haven't booted yet we need allocations to go through the + * startup cache until the vm is ready. + */ + if (zone->uz_ppera == 1) { #ifdef UMA_MD_SMALL_ALLOC - if (zone->uz_ppera == 1) { zone->uz_allocf = uma_small_alloc; zone->uz_freef = uma_small_free; +#endif + if (booted == 0) + zone->uz_allocf = startup_alloc; } -#endif /* UMA_MD_SMALL_ALLOC */ - if (arg->flags & UMA_ZONE_MTXCLASS) privlc = 1; else ==== //depot/projects/ia64/usr.sbin/acpi/acpidump/acpi.c#24 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/usr.sbin/acpi/acpidump/acpi.c,v 1.19 2003/09/14 00:40:24 njl Exp $ + * $FreeBSD: src/usr.sbin/acpi/acpidump/acpi.c,v 1.20 2003/09/21 03:51:48 njl Exp $ */ #include @@ -479,7 +479,8 @@ sep = '{'; PRINTFLAG(fadt->iapc_boot_arch, LEGACY_DEV); PRINTFLAG(fadt->iapc_boot_arch, 8042); - printf("}\n"); + if (fadt->iapc_boot_arch != 0) + printf("}\n"); printf("\tFlags="); sep = '{'; @@ -497,7 +498,8 @@ PRINTFLAG(fadt->flags, SEALED_CASE); PRINTFLAG(fadt->flags, HEADLESS); PRINTFLAG(fadt->flags, CPU_SW_SLP); - printf("}\n"); + if (fadt->flags != 0) + printf("}\n"); #undef PRINTFLAG From owner-p4-projects@FreeBSD.ORG Mon Sep 22 03:28:11 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9681516A4B3; Mon, 22 Sep 2003 03:28:11 -0700 (PDT) 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 6577C16A4B3 for ; Mon, 22 Sep 2003 03:28:11 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03BEB43FDD for ; Mon, 22 Sep 2003 03:28:09 -0700 (PDT) (envelope-from tzukanov@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8MAS8XJ070058 for ; Mon, 22 Sep 2003 03:28:08 -0700 (PDT) (envelope-from tzukanov@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8MAS5FB070054 for perforce@freebsd.org; Mon, 22 Sep 2003 03:28:05 -0700 (PDT) (envelope-from tzukanov@freebsd.org) Date: Mon, 22 Sep 2003 03:28:05 -0700 (PDT) Message-Id: <200309221028.h8MAS5FB070054@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to tzukanov@freebsd.org using -f From: Serguei Tzukanov To: Perforce Change Reviews Subject: PERFORCE change 38411 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2003 10:28:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=38411 Change 38411 by tzukanov@tzukanov_antares on 2003/09/22 03:27:58 IFC. Affected files ... .. //depot/projects/s390/Makefile.inc1#19 integrate .. //depot/projects/s390/UPDATING#12 integrate .. //depot/projects/s390/bin/df/df.c#7 integrate .. //depot/projects/s390/bin/ls/Makefile#3 integrate .. //depot/projects/s390/bin/ls/cmp.c#2 integrate .. //depot/projects/s390/bin/ls/extern.h#3 integrate .. //depot/projects/s390/bin/ls/ls.1#5 integrate .. //depot/projects/s390/bin/ls/ls.c#6 integrate .. //depot/projects/s390/bin/ls/ls.h#3 integrate .. //depot/projects/s390/bin/ls/print.c#6 integrate .. //depot/projects/s390/bin/ls/util.c#2 integrate .. //depot/projects/s390/bin/sh/mkbuiltins#3 integrate .. //depot/projects/s390/contrib/amd/doc/version.texi#2 integrate .. //depot/projects/s390/contrib/gcc/config/freebsd-spec.h#6 integrate .. //depot/projects/s390/contrib/gcc/config/s390/fixdfdi.h#3 integrate .. //depot/projects/s390/contrib/gcc/config/s390/libgcc-glibc.ver#3 integrate .. //depot/projects/s390/contrib/gcc/config/s390/linux.h#3 integrate .. //depot/projects/s390/contrib/gcc/config/s390/s390-protos.h#3 integrate .. //depot/projects/s390/contrib/gcc/config/s390/s390.c#3 integrate .. //depot/projects/s390/contrib/gcc/config/s390/s390.h#3 integrate .. //depot/projects/s390/contrib/gcc/config/s390/s390.md#4 integrate .. //depot/projects/s390/contrib/gcc/config/s390/s390x.h#2 integrate .. //depot/projects/s390/contrib/gcc/config/s390/t-linux#2 integrate .. //depot/projects/s390/contrib/gcc/config/s390/t-linux64#3 integrate .. //depot/projects/s390/contrib/groff/tmac/doc-common#7 integrate .. //depot/projects/s390/contrib/groff/tmac/doc-syms#4 integrate .. //depot/projects/s390/contrib/groff/tmac/doc.tmac#5 integrate .. //depot/projects/s390/contrib/groff/tmac/groff_mdoc.man#6 integrate .. //depot/projects/s390/contrib/isc-dhcp/client/scripts/freebsd#5 integrate .. //depot/projects/s390/contrib/nvi/clib/getopt.c#2 integrate .. //depot/projects/s390/contrib/nvi/clib/memchr.c#2 integrate .. //depot/projects/s390/contrib/nvi/clib/memmove.c#2 integrate .. //depot/projects/s390/contrib/nvi/clib/memset.c#2 integrate .. //depot/projects/s390/contrib/nvi/clib/mkstemp.c#2 integrate .. //depot/projects/s390/contrib/nvi/clib/mmap.c#2 integrate .. //depot/projects/s390/contrib/nvi/clib/snprintf.c#2 integrate .. //depot/projects/s390/contrib/nvi/clib/strdup.c#2 integrate .. //depot/projects/s390/contrib/nvi/clib/strerror.c#2 integrate .. //depot/projects/s390/contrib/nvi/clib/strpbrk.c#2 integrate .. //depot/projects/s390/contrib/nvi/clib/strsep.c#2 integrate .. //depot/projects/s390/contrib/nvi/clib/strtol.c#2 integrate .. //depot/projects/s390/contrib/nvi/clib/strtoul.c#2 integrate .. //depot/projects/s390/contrib/nvi/clib/vsnprintf.c#2 integrate .. //depot/projects/s390/contrib/sendmail/FREEBSD-upgrade#6 integrate .. //depot/projects/s390/contrib/sendmail/LICENSE#2 integrate .. //depot/projects/s390/contrib/sendmail/RELEASE_NOTES#6 integrate .. //depot/projects/s390/contrib/sendmail/cf/README#6 integrate .. //depot/projects/s390/contrib/sendmail/cf/cf/submit.cf#6 integrate .. //depot/projects/s390/contrib/sendmail/cf/cf/submit.mc#3 integrate .. //depot/projects/s390/contrib/sendmail/cf/m4/cfhead.m4#4 integrate .. //depot/projects/s390/contrib/sendmail/cf/m4/proto.m4#5 integrate .. //depot/projects/s390/contrib/sendmail/cf/m4/version.m4#6 integrate .. //depot/projects/s390/contrib/sendmail/contrib/domainmap.m4#2 integrate .. //depot/projects/s390/contrib/sendmail/contrib/doublebounce.pl#3 integrate .. //depot/projects/s390/contrib/sendmail/contrib/expn.pl#3 integrate .. //depot/projects/s390/contrib/sendmail/doc/op/op.me#6 integrate .. //depot/projects/s390/contrib/sendmail/include/sm/conf.h#5 integrate .. //depot/projects/s390/contrib/sendmail/include/sm/errstring.h#2 integrate .. //depot/projects/s390/contrib/sendmail/include/sm/io.h#2 integrate .. //depot/projects/s390/contrib/sendmail/include/sm/os/sm_os_aix.h#2 integrate .. //depot/projects/s390/contrib/sendmail/include/sm/shm.h#2 integrate .. //depot/projects/s390/contrib/sendmail/libmilter/README#3 integrate .. //depot/projects/s390/contrib/sendmail/libmilter/docs/sample.html#3 integrate .. //depot/projects/s390/contrib/sendmail/libmilter/docs/smfi_chgheader.html#3 integrate .. //depot/projects/s390/contrib/sendmail/libmilter/docs/smfi_register.html#3 integrate .. //depot/projects/s390/contrib/sendmail/libmilter/docs/smfi_setconn.html#3 integrate .. //depot/projects/s390/contrib/sendmail/libmilter/docs/smfi_setreply.html#4 integrate .. //depot/projects/s390/contrib/sendmail/libmilter/engine.c#4 integrate .. //depot/projects/s390/contrib/sendmail/libmilter/libmilter.h#4 integrate .. //depot/projects/s390/contrib/sendmail/libmilter/listener.c#5 integrate .. //depot/projects/s390/contrib/sendmail/libmilter/signal.c#3 integrate .. //depot/projects/s390/contrib/sendmail/libsm/clock.c#4 integrate .. //depot/projects/s390/contrib/sendmail/libsm/errstring.c#2 integrate .. //depot/projects/s390/contrib/sendmail/libsm/flags.c#2 integrate .. //depot/projects/s390/contrib/sendmail/libsm/ldap.c#3 integrate .. //depot/projects/s390/contrib/sendmail/libsm/shm.c#2 integrate .. //depot/projects/s390/contrib/sendmail/libsm/smstdio.c#2 integrate .. //depot/projects/s390/contrib/sendmail/libsm/stdio.c#4 integrate .. //depot/projects/s390/contrib/sendmail/libsm/vasprintf.c#2 integrate .. //depot/projects/s390/contrib/sendmail/libsmdb/smdb2.c#4 integrate .. //depot/projects/s390/contrib/sendmail/mail.local/mail.local.c#6 integrate .. //depot/projects/s390/contrib/sendmail/smrsh/README#2 integrate .. //depot/projects/s390/contrib/sendmail/smrsh/smrsh.8#3 integrate .. //depot/projects/s390/contrib/sendmail/src/README#5 integrate .. //depot/projects/s390/contrib/sendmail/src/TRACEFLAGS#4 integrate .. //depot/projects/s390/contrib/sendmail/src/alias.c#2 integrate .. //depot/projects/s390/contrib/sendmail/src/bf.c#2 integrate .. //depot/projects/s390/contrib/sendmail/src/collect.c#5 integrate .. //depot/projects/s390/contrib/sendmail/src/conf.c#8 integrate .. //depot/projects/s390/contrib/sendmail/src/control.c#3 integrate .. //depot/projects/s390/contrib/sendmail/src/daemon.c#4 integrate .. //depot/projects/s390/contrib/sendmail/src/deliver.c#6 integrate .. //depot/projects/s390/contrib/sendmail/src/domain.c#4 integrate .. //depot/projects/s390/contrib/sendmail/src/headers.c#8 integrate .. //depot/projects/s390/contrib/sendmail/src/main.c#6 integrate .. //depot/projects/s390/contrib/sendmail/src/map.c#4 integrate .. //depot/projects/s390/contrib/sendmail/src/mci.c#6 integrate .. //depot/projects/s390/contrib/sendmail/src/milter.c#6 integrate .. //depot/projects/s390/contrib/sendmail/src/mime.c#2 integrate .. //depot/projects/s390/contrib/sendmail/src/parseaddr.c#6 integrate .. //depot/projects/s390/contrib/sendmail/src/queue.c#6 integrate .. //depot/projects/s390/contrib/sendmail/src/readcf.c#5 integrate .. //depot/projects/s390/contrib/sendmail/src/recipient.c#3 integrate .. //depot/projects/s390/contrib/sendmail/src/sendmail.8#3 integrate .. //depot/projects/s390/contrib/sendmail/src/sendmail.h#6 integrate .. //depot/projects/s390/contrib/sendmail/src/sfsasl.c#4 integrate .. //depot/projects/s390/contrib/sendmail/src/srvrsmtp.c#6 integrate .. //depot/projects/s390/contrib/sendmail/src/stab.c#2 integrate .. //depot/projects/s390/contrib/sendmail/src/udb.c#3 integrate .. //depot/projects/s390/contrib/sendmail/src/usersmtp.c#5 integrate .. //depot/projects/s390/contrib/sendmail/src/util.c#3 integrate .. //depot/projects/s390/contrib/sendmail/src/version.c#6 integrate .. //depot/projects/s390/crypto/openssh/FREEBSD-tricks#3 integrate .. //depot/projects/s390/crypto/openssh/buffer.c#2 integrate .. //depot/projects/s390/crypto/openssh/channels.c#5 integrate .. //depot/projects/s390/crypto/openssh/deattack.c#2 integrate .. //depot/projects/s390/crypto/openssh/misc.c#3 integrate .. //depot/projects/s390/crypto/openssh/session.c#6 integrate .. //depot/projects/s390/crypto/openssh/ssh-agent.c#5 integrate .. //depot/projects/s390/crypto/openssh/version.h#5 integrate .. //depot/projects/s390/etc/Makefile#12 integrate .. //depot/projects/s390/etc/defaults/pccard.conf#10 integrate .. //depot/projects/s390/etc/defaults/rc.conf#11 integrate .. //depot/projects/s390/etc/pccard_ether#5 integrate .. //depot/projects/s390/etc/rc.d/dhclient#4 integrate .. //depot/projects/s390/etc/rc.sendmail#2 integrate .. //depot/projects/s390/etc/services#6 integrate .. //depot/projects/s390/games/fortune/datfiles/fortunes-o.real#3 integrate .. //depot/projects/s390/gnu/usr.bin/groff/tmac/fr.ISO8859-1#3 integrate .. //depot/projects/s390/gnu/usr.bin/groff/tmac/mdoc.local#6 integrate .. //depot/projects/s390/gnu/usr.bin/groff/tmac/ru.KOI8-R#4 integrate .. //depot/projects/s390/gnu/usr.bin/man/manpath/manpath.config#4 integrate .. //depot/projects/s390/lib/libc/gen/devname.3#5 integrate .. //depot/projects/s390/lib/libc/net/getaddrinfo.3#4 integrate .. //depot/projects/s390/lib/libc/net/getnameinfo.3#4 integrate .. //depot/projects/s390/lib/libc/net/inet_net_pton.c#2 integrate .. //depot/projects/s390/lib/libc/posix1e/mac_get.3#6 integrate .. //depot/projects/s390/lib/libc/rpc/rpc_clnt_create.3#4 integrate .. //depot/projects/s390/lib/libc/stdlib/exit.3#4 integrate .. //depot/projects/s390/lib/libc/stdlib/grantpt.3#3 integrate .. //depot/projects/s390/lib/libc/sys/ntp_gettime.2#3 integrate .. //depot/projects/s390/lib/libc_r/man/pthread_condattr.3#3 integrate .. //depot/projects/s390/lib/libpam/modules/pam_ssh/pam_ssh.c#4 integrate .. //depot/projects/s390/lib/libpthread/arch/alpha/include/pthread_md.h#2 integrate .. //depot/projects/s390/lib/libpthread/arch/amd64/amd64/context.S#2 integrate .. //depot/projects/s390/lib/libpthread/arch/amd64/include/pthread_md.h#2 integrate .. //depot/projects/s390/lib/libpthread/arch/i386/include/pthread_md.h#4 integrate .. //depot/projects/s390/lib/libpthread/arch/ia64/ia64/context.S#2 integrate .. //depot/projects/s390/lib/libpthread/arch/ia64/include/pthread_md.h#2 integrate .. //depot/projects/s390/lib/libpthread/man/pthread_condattr.3#3 integrate .. //depot/projects/s390/lib/libpthread/thread/thr_attr_setguardsize.c#3 integrate .. //depot/projects/s390/lib/libpthread/thread/thr_attr_setinheritsched.c#2 integrate .. //depot/projects/s390/lib/libpthread/thread/thr_attr_setscope.c#3 integrate .. //depot/projects/s390/lib/libpthread/thread/thr_cond.c#6 integrate .. //depot/projects/s390/lib/libpthread/thread/thr_create.c#6 integrate .. //depot/projects/s390/lib/libpthread/thread/thr_exit.c#5 integrate .. //depot/projects/s390/lib/libpthread/thread/thr_info.c#4 integrate .. //depot/projects/s390/lib/libpthread/thread/thr_kern.c#9 integrate .. //depot/projects/s390/lib/libpthread/thread/thr_private.h#8 integrate .. //depot/projects/s390/lib/libpthread/thread/thr_sig.c#7 integrate .. //depot/projects/s390/lib/libpthread/thread/thr_sigmask.c#5 integrate .. //depot/projects/s390/lib/libpthread/thread/thr_stack.c#4 integrate .. //depot/projects/s390/libexec/ftpd/ftpd.8#10 integrate .. //depot/projects/s390/libexec/ftpd/ftpd.c#8 integrate .. //depot/projects/s390/libexec/rtld-elf/Makefile#6 integrate .. //depot/projects/s390/libexec/rtld-elf/libmap.c#4 integrate .. //depot/projects/s390/libexec/rtld-elf/libmap.h#2 integrate .. //depot/projects/s390/libexec/rtld-elf/rtld.c#9 integrate .. //depot/projects/s390/release/Makefile#16 integrate .. //depot/projects/s390/release/doc/en_US.ISO8859-1/errata/article.sgml#11 integrate .. //depot/projects/s390/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#12 integrate .. //depot/projects/s390/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#18 integrate .. //depot/projects/s390/release/i386/drivers.conf#13 integrate .. //depot/projects/s390/release/scripts/doFS.sh#8 integrate .. //depot/projects/s390/release/scripts/print-cdrom-packages.sh#10 integrate .. //depot/projects/s390/sbin/devfs/devfs.8#4 integrate .. //depot/projects/s390/sbin/dump/optr.c#4 integrate .. //depot/projects/s390/sbin/ifconfig/ifieee80211.c#3 integrate .. //depot/projects/s390/sbin/mdconfig/mdconfig.8#6 integrate .. //depot/projects/s390/sbin/newfs/newfs.8#8 integrate .. //depot/projects/s390/sbin/raidctl/raidctl.8#5 integrate .. //depot/projects/s390/share/examples/cvsup/cvs-supfile#5 integrate .. //depot/projects/s390/share/examples/cvsup/doc-supfile#3 integrate .. //depot/projects/s390/share/examples/cvsup/gnats-supfile#3 integrate .. //depot/projects/s390/share/examples/cvsup/ports-supfile#4 integrate .. //depot/projects/s390/share/examples/cvsup/refuse#5 integrate .. //depot/projects/s390/share/examples/cvsup/refuse.README#5 integrate .. //depot/projects/s390/share/examples/cvsup/stable-supfile#3 integrate .. //depot/projects/s390/share/examples/cvsup/standard-supfile#3 integrate .. //depot/projects/s390/share/examples/cvsup/www-supfile#3 integrate .. //depot/projects/s390/share/examples/etc/README.examples#3 integrate .. //depot/projects/s390/share/examples/ses/getencstat/getencstat.0#2 integrate .. //depot/projects/s390/share/examples/ses/sesd/sesd.0#2 integrate .. //depot/projects/s390/share/man/man4/ath.4#2 integrate .. //depot/projects/s390/share/man/man4/ath_hal.4#2 integrate .. //depot/projects/s390/share/man/man4/bge.4#6 integrate .. //depot/projects/s390/share/man/man4/bridge.4#2 integrate .. //depot/projects/s390/share/man/man4/mac_mls.4#9 integrate .. //depot/projects/s390/share/man/man4/natm.4#3 integrate .. //depot/projects/s390/share/man/man4/ng_atm.4#2 integrate .. //depot/projects/s390/share/man/man4/ng_bt3c.4#4 integrate .. //depot/projects/s390/share/man/man4/puc.4#3 integrate .. //depot/projects/s390/share/man/man4/re.4#2 integrate .. //depot/projects/s390/share/man/man4/rl.4#6 integrate .. //depot/projects/s390/share/man/man4/sk.4#2 integrate .. //depot/projects/s390/share/man/man4/uart.4#2 integrate .. //depot/projects/s390/share/man/man4/ulpt.4#2 integrate .. //depot/projects/s390/share/man/man4/usb.4#7 integrate .. //depot/projects/s390/share/man/man4/wi.4#14 integrate .. //depot/projects/s390/share/man/man5/device.hints.5#6 integrate .. //depot/projects/s390/share/man/man5/libmap.conf.5#3 integrate .. //depot/projects/s390/share/man/man5/make.conf.5#12 integrate .. //depot/projects/s390/share/man/man5/rc.conf.5#14 integrate .. //depot/projects/s390/share/man/man7/hier.7#9 integrate .. //depot/projects/s390/share/man/man7/ports.7#7 integrate .. //depot/projects/s390/share/man/man7/release.7#9 integrate .. //depot/projects/s390/share/man/man7/tuning.7#8 integrate .. //depot/projects/s390/share/man/man9/VOP_GETEXTATTR.9#5 integrate .. //depot/projects/s390/share/man/man9/VOP_SETEXTATTR.9#5 integrate .. //depot/projects/s390/share/man/man9/mtx_pool.9#3 integrate .. //depot/projects/s390/share/man/man9/physio.9#2 integrate .. //depot/projects/s390/share/man/man9/signal.9#4 integrate .. //depot/projects/s390/share/man/man9/sx.9#3 integrate .. //depot/projects/s390/sys/alpha/alpha/pmap.c#12 integrate .. //depot/projects/s390/sys/alpha/conf/GENERIC#10 integrate .. //depot/projects/s390/sys/amd64/amd64/pmap.c#4 integrate .. //depot/projects/s390/sys/amd64/conf/GENERIC#4 integrate .. //depot/projects/s390/sys/boot/forth/beastie.4th#3 integrate .. //depot/projects/s390/sys/boot/i386/libi386/comconsole.c#3 integrate .. //depot/projects/s390/sys/boot/pc98/libpc98/comconsole.c#3 integrate .. //depot/projects/s390/sys/cam/cam_periph.c#9 integrate .. //depot/projects/s390/sys/cam/scsi/scsi_all.c#6 integrate .. //depot/projects/s390/sys/cam/scsi/scsi_cd.c#13 integrate .. //depot/projects/s390/sys/cam/scsi/scsi_sa.c#12 integrate .. //depot/projects/s390/sys/coda/coda_vfsops.c#6 integrate .. //depot/projects/s390/sys/conf/NOTES#16 integrate .. //depot/projects/s390/sys/conf/files#18 integrate .. //depot/projects/s390/sys/conf/files.ia64#11 integrate .. //depot/projects/s390/sys/conf/options#13 integrate .. //depot/projects/s390/sys/contrib/dev/acpica/rsaddr.c#4 integrate .. //depot/projects/s390/sys/contrib/dev/acpica/rsirq.c#5 integrate .. //depot/projects/s390/sys/crypto/rijndael/rijndael-api-fst.c#4 integrate .. //depot/projects/s390/sys/dev/aac/aac.c#14 integrate .. //depot/projects/s390/sys/dev/acpica/acpi.c#13 integrate .. //depot/projects/s390/sys/dev/acpica/acpi_acad.c#5 integrate .. //depot/projects/s390/sys/dev/acpica/acpi_button.c#4 integrate .. //depot/projects/s390/sys/dev/acpica/acpi_cmbat.c#7 integrate .. //depot/projects/s390/sys/dev/acpica/acpi_ec.c#5 integrate .. //depot/projects/s390/sys/dev/acpica/acpi_pci.c#4 integrate .. //depot/projects/s390/sys/dev/acpica/acpiio.h#4 integrate .. //depot/projects/s390/sys/dev/ata/ata-lowlevel.c#3 integrate .. //depot/projects/s390/sys/dev/ata/ata-queue.c#2 integrate .. //depot/projects/s390/sys/dev/ata/atapi-cam.c#9 integrate .. //depot/projects/s390/sys/dev/ata/atapi-cd.c#11 integrate .. //depot/projects/s390/sys/dev/ata/atapi-cd.h#7 integrate .. //depot/projects/s390/sys/dev/ath/if_ath.c#3 integrate .. //depot/projects/s390/sys/dev/ath/if_athvar.h#3 integrate .. //depot/projects/s390/sys/dev/ed/if_ed_pccard.c#8 integrate .. //depot/projects/s390/sys/dev/ic/ns16550.h#3 integrate .. //depot/projects/s390/sys/dev/ips/ips.h#3 integrate .. //depot/projects/s390/sys/dev/ips/ips_disk.c#3 integrate .. //depot/projects/s390/sys/dev/ips/ips_pci.c#3 integrate .. //depot/projects/s390/sys/dev/isp/isp.c#7 integrate .. //depot/projects/s390/sys/dev/isp/isp_freebsd.c#5 integrate .. //depot/projects/s390/sys/dev/isp/isp_freebsd.h#3 integrate .. //depot/projects/s390/sys/dev/isp/isp_inline.h#3 integrate .. //depot/projects/s390/sys/dev/isp/isp_target.c#6 integrate .. //depot/projects/s390/sys/dev/isp/isp_target.h#2 integrate .. //depot/projects/s390/sys/dev/isp/isp_tpublic.h#3 integrate .. //depot/projects/s390/sys/dev/isp/ispvar.h#4 integrate .. //depot/projects/s390/sys/dev/mii/e1000phy.c#5 integrate .. //depot/projects/s390/sys/dev/mii/e1000phyreg.h#2 integrate .. //depot/projects/s390/sys/dev/mii/miidevs#7 integrate .. //depot/projects/s390/sys/dev/pccard/pccarddevs#10 integrate .. //depot/projects/s390/sys/dev/pccard/pccarddevs.h#10 integrate .. //depot/projects/s390/sys/dev/pccard/pccardvar.h#6 integrate .. //depot/projects/s390/sys/dev/pci/pci.c#10 integrate .. //depot/projects/s390/sys/dev/pci/pci_private.h#6 integrate .. //depot/projects/s390/sys/dev/pci/pcireg.h#5 integrate .. //depot/projects/s390/sys/dev/pci/pcivar.h#6 integrate .. //depot/projects/s390/sys/dev/puc/pucdata.c#9 integrate .. //depot/projects/s390/sys/dev/re/if_re.c#2 integrate .. //depot/projects/s390/sys/dev/sio/sio.c#11 integrate .. //depot/projects/s390/sys/dev/sio/sioreg.h#4 integrate .. //depot/projects/s390/sys/dev/sound/isa/mpu.c#2 integrate .. //depot/projects/s390/sys/dev/sound/isa/uartsio.c#3 integrate .. //depot/projects/s390/sys/dev/sound/pci/ich.c#7 integrate .. //depot/projects/s390/sys/dev/uart/uart_bus.h#2 integrate .. //depot/projects/s390/sys/dev/uart/uart_bus_pccard.c#1 branch .. //depot/projects/s390/sys/dev/uart/uart_core.c#2 integrate .. //depot/projects/s390/sys/dev/uart/uart_cpu_sparc64.c#2 integrate .. //depot/projects/s390/sys/dev/uart/uart_dev_i8251.c#2 integrate .. //depot/projects/s390/sys/dev/uart/uart_dev_ns8250.c#2 integrate .. //depot/projects/s390/sys/dev/uart/uart_dev_sab82532.c#2 integrate .. //depot/projects/s390/sys/dev/uart/uart_dev_z8530.c#2 integrate .. //depot/projects/s390/sys/dev/uart/uart_if.m#2 integrate .. //depot/projects/s390/sys/dev/uart/uart_tty.c#2 integrate .. //depot/projects/s390/sys/dev/usb/if_aue.c#9 integrate .. //depot/projects/s390/sys/dev/usb/umass.c#13 integrate .. //depot/projects/s390/sys/dev/usb/usbdevs#11 integrate .. //depot/projects/s390/sys/dev/usb/usbdevs.h#11 integrate .. //depot/projects/s390/sys/dev/usb/usbdevs_data.h#11 integrate .. //depot/projects/s390/sys/dev/wi/if_wi_pccard.c#11 integrate .. //depot/projects/s390/sys/fs/nwfs/nwfs_io.c#6 integrate .. //depot/projects/s390/sys/fs/smbfs/smbfs_io.c#8 integrate .. //depot/projects/s390/sys/i386/acpica/acpi_machdep.c#10 integrate .. //depot/projects/s390/sys/i386/conf/GENERIC#14 integrate .. //depot/projects/s390/sys/i386/conf/NOTES#13 integrate .. //depot/projects/s390/sys/i386/i386/pmap.c#16 integrate .. //depot/projects/s390/sys/i386/i386/trap.c#11 integrate .. //depot/projects/s390/sys/i386/include/pci_cfgreg.h#4 integrate .. //depot/projects/s390/sys/ia64/ia64/genassym.c#9 integrate .. //depot/projects/s390/sys/ia64/ia64/machdep.c#10 integrate .. //depot/projects/s390/sys/ia64/ia64/pmap.c#15 integrate .. //depot/projects/s390/sys/ia64/ia64/trap.c#11 integrate .. //depot/projects/s390/sys/ia64/ia64/uma_machdep.c#1 branch .. //depot/projects/s390/sys/ia64/include/cpu.h#6 integrate .. //depot/projects/s390/sys/isa/fd.c#10 integrate .. //depot/projects/s390/sys/kern/kern_malloc.c#10 integrate .. //depot/projects/s390/sys/kern/kern_proc.c#13 integrate .. //depot/projects/s390/sys/kern/kern_prot.c#8 integrate .. //depot/projects/s390/sys/kern/kern_xxx.c#3 integrate .. //depot/projects/s390/sys/kern/linker_if.m#2 integrate .. //depot/projects/s390/sys/kern/sched_ule.c#10 integrate .. //depot/projects/s390/sys/kern/sys_pipe.c#12 integrate .. //depot/projects/s390/sys/kern/vfs_bio.c#15 integrate .. //depot/projects/s390/sys/kern/vfs_subr.c#14 integrate .. //depot/projects/s390/sys/modules/uart/Makefile#2 integrate .. //depot/projects/s390/sys/net/bridge.c#10 integrate .. //depot/projects/s390/sys/net/if_iso88025subr.c#9 integrate .. //depot/projects/s390/sys/net/raw_usrreq.c#4 integrate .. //depot/projects/s390/sys/net80211/ieee80211.c#2 integrate .. //depot/projects/s390/sys/net80211/ieee80211.h#2 integrate .. //depot/projects/s390/sys/net80211/ieee80211_input.c#2 integrate .. //depot/projects/s390/sys/net80211/ieee80211_ioctl.c#2 integrate .. //depot/projects/s390/sys/net80211/ieee80211_node.c#2 integrate .. //depot/projects/s390/sys/net80211/ieee80211_output.c#2 integrate .. //depot/projects/s390/sys/net80211/ieee80211_var.h#2 integrate .. //depot/projects/s390/sys/netinet/ip_dummynet.c#11 integrate .. //depot/projects/s390/sys/netinet/ip_fw2.c#11 integrate .. //depot/projects/s390/sys/netinet/raw_ip.c#9 integrate .. //depot/projects/s390/sys/netinet/tcp_subr.c#15 integrate .. //depot/projects/s390/sys/netinet6/in6_ifattach.c#5 integrate .. //depot/projects/s390/sys/netinet6/in6_pcb.c#7 integrate .. //depot/projects/s390/sys/netinet6/nd6.c#8 integrate .. //depot/projects/s390/sys/netinet6/nd6_nbr.c#6 integrate .. //depot/projects/s390/sys/netipx/ipx_input.c#6 integrate .. //depot/projects/s390/sys/netipx/spx_usrreq.c#5 integrate .. //depot/projects/s390/sys/nfsclient/nfs_bio.c#7 integrate .. //depot/projects/s390/sys/nfsclient/nfs_node.c#7 integrate .. //depot/projects/s390/sys/nfsclient/nfs_subs.c#6 integrate .. //depot/projects/s390/sys/nfsclient/nfs_vnops.c#13 integrate .. //depot/projects/s390/sys/nfsclient/nfsnode.h#2 integrate .. //depot/projects/s390/sys/pc98/conf/NOTES#6 integrate .. //depot/projects/s390/sys/pc98/i386/machdep.c#11 integrate .. //depot/projects/s390/sys/pc98/pc98/clock.c#10 integrate .. //depot/projects/s390/sys/pc98/pc98/fd.c#9 integrate .. //depot/projects/s390/sys/pci/agp_intel.c#8 integrate .. //depot/projects/s390/sys/pci/if_dc.c#13 integrate .. //depot/projects/s390/sys/pci/if_rlreg.h#8 integrate .. //depot/projects/s390/sys/pci/if_sk.c#8 integrate .. //depot/projects/s390/sys/pci/if_skreg.h#2 integrate .. //depot/projects/s390/sys/pci/if_xl.c#13 integrate .. //depot/projects/s390/sys/pci/if_xlreg.h#10 integrate .. //depot/projects/s390/sys/pci/yukonreg.h#1 branch .. //depot/projects/s390/sys/posix4/ksched.c#8 integrate .. //depot/projects/s390/sys/sparc64/sparc64/ofw_machdep.c#3 integrate .. //depot/projects/s390/sys/sparc64/sparc64/pmap.c#11 integrate .. //depot/projects/s390/sys/sys/lock.h#5 integrate .. //depot/projects/s390/sys/sys/mutex.h#8 integrate .. //depot/projects/s390/sys/sys/param.h#15 integrate .. //depot/projects/s390/sys/vm/pmap.h#9 integrate .. //depot/projects/s390/sys/vm/uma.h#6 integrate .. //depot/projects/s390/sys/vm/uma_core.c#12 integrate .. //depot/projects/s390/sys/vm/uma_dbg.c#5 integrate .. //depot/projects/s390/sys/vm/uma_int.h#5 integrate .. //depot/projects/s390/sys/vm/vm_fault.c#10 integrate .. //depot/projects/s390/sys/vm/vm_kern.c#7 integrate .. //depot/projects/s390/sys/vm/vm_object.c#13 integrate .. //depot/projects/s390/sys/vm/vm_page.c#11 integrate .. //depot/projects/s390/sys/vm/vm_pageout.c#14 integrate .. //depot/projects/s390/sys/vm/vnode_pager.c#11 integrate .. //depot/projects/s390/tools/tools/ath/athstats.c#2 integrate .. //depot/projects/s390/tools/tools/mtxstat/mtxstat.pl#2 integrate .. //depot/projects/s390/tools/tools/tinderbox/tbmaster.pl#7 integrate .. //depot/projects/s390/tools/tools/tinderbox/tinderbox.pl#6 integrate .. //depot/projects/s390/usr.bin/colldef/colldef.1#6 integrate .. //depot/projects/s390/usr.bin/doscmd/doscmd.1#3 integrate .. //depot/projects/s390/usr.bin/make/dir.c#3 integrate .. //depot/projects/s390/usr.bin/make/dir.h#2 integrate .. //depot/projects/s390/usr.bin/make/main.c#6 integrate .. //depot/projects/s390/usr.bin/make/make.1#5 integrate .. //depot/projects/s390/usr.bin/make/var.c#5 integrate .. //depot/projects/s390/usr.bin/tftp/tftp.1#3 integrate .. //depot/projects/s390/usr.bin/window/main.c#2 integrate .. //depot/projects/s390/usr.sbin/Makefile#13 integrate .. //depot/projects/s390/usr.sbin/acpi/acpiconf/acpiconf.8#5 integrate .. //depot/projects/s390/usr.sbin/acpi/acpiconf/acpiconf.c#4 integrate .. //depot/projects/s390/usr.sbin/acpi/acpidump/acpi.c#7 integrate .. //depot/projects/s390/usr.sbin/boot0cfg/boot0cfg.8#4 integrate .. //depot/projects/s390/usr.sbin/i4b/isdnd/isdnd.rc.5#5 integrate .. //depot/projects/s390/usr.sbin/i4b/isdndebug/isdndebug.8#3 integrate .. //depot/projects/s390/usr.sbin/mrouted/mrouted.8#4 integrate .. //depot/projects/s390/usr.sbin/mtree/mtree.8#4 integrate .. //depot/projects/s390/usr.sbin/newsyslog/Makefile#3 integrate .. //depot/projects/s390/usr.sbin/newsyslog/extern.h#1 branch .. //depot/projects/s390/usr.sbin/newsyslog/newsyslog.c#11 integrate .. //depot/projects/s390/usr.sbin/newsyslog/ptimes.c#1 branch .. //depot/projects/s390/usr.sbin/rtadvd/if.c#3 integrate .. //depot/projects/s390/usr.sbin/rtadvd/rtadvd.conf.5#4 integrate .. //depot/projects/s390/usr.sbin/sysinstall/config.c#8 integrate .. //depot/projects/s390/usr.sbin/sysinstall/dmenu.c#2 integrate .. //depot/projects/s390/usr.sbin/sysinstall/menus.c#12 integrate .. //depot/projects/s390/usr.sbin/vidcontrol/vidcontrol.c#3 integrate .. //depot/projects/s390/usr.sbin/wicontrol/wicontrol.8#8 integrate Differences ... ==== //depot/projects/s390/Makefile.inc1#19 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.390 2003/09/07 14:15:40 ru Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.392 2003/09/16 12:53:18 ru Exp $ # # Make command line options: # -DNO_KERBEROS Do not build Heimdal (Kerberos 5) @@ -51,6 +51,17 @@ SUBDIR+= lib .endif +# When upgrading to a dynamically linked root, install the runtime +# linker early into its new location before make(1) has a chance +# to run the dynamically linked /bin/sh. +.if defined(WITH_DYNAMICROOT) && !defined(NOPIC) && \ + (!defined(TARGET_ARCH) || ${TARGET_ARCH} == ${MACHINE_ARCH}) && \ + !defined(DISTDIR) && \ + (!defined(DESTDIR) || empty(DESTDIR) || ${DESTDIR} == "/") && \ + !exists(/libexec/ld-elf.so.1) +SUBDIR+= libexec/rtld-elf +.endif + .if exists(${.CURDIR}/bin) SUBDIR+= bin .endif @@ -819,8 +830,6 @@ # gnu/lib/csu, gnu/lib/libgcc and lib/csu must be built before all # shared libraries for ELF. # -# lib/libc (libc_pic.a) must be built before lib/libpthread. -# _startup_libs= gnu/lib/csu gnu/lib/libgcc .if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf) _startup_libs+= lib/csu/${MACHINE_ARCH}-elf @@ -829,6 +838,7 @@ .endif _prebuild_libs= + _generic_libs= gnu/lib .if exists(${.CURDIR}/kerberos5) && exists(${.CURDIR}/crypto) && \ @@ -840,9 +850,6 @@ _generic_libs+= kerberos5/lib .endif -.if !defined(NOLIBPTHREAD) -_prebuild_libs+= lib/libc -.endif _prebuild_libs+= lib/libcom_err lib/libcrypt lib/libexpat \ lib/libkvm lib/libmd \ lib/libncurses lib/libopie lib/libpam lib/libradius \ ==== //depot/projects/s390/UPDATING#12 (text+ko) ==== @@ -17,6 +17,12 @@ developers choose to disable these features on build machines to maximize performance. +20030915: + A change to /etc/defaults/rc.conf now causes inetd to be started + with `-C 60' if it is not overridden in /etc/rc.conf. This + causes inetd to stop accepting connections from an IP address + that exceeds the rate of 60 connections per minute. + 20030829: The following rc.d scripts have been removed and should be deleted from your installation: atm2.sh atm3.sh devdb @@ -1356,4 +1362,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.265 2003/08/29 13:25:08 mtm Exp $ +$FreeBSD: src/UPDATING,v 1.266 2003/09/15 17:20:05 nectar Exp $ ==== //depot/projects/s390/bin/df/df.c#7 (text+ko) ==== @@ -48,7 +48,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/bin/df/df.c,v 1.50 2003/06/03 11:54:42 bde Exp $"); +__FBSDID("$FreeBSD: src/bin/df/df.c,v 1.51 2003/09/13 20:46:58 obrien Exp $"); #include #include @@ -122,10 +122,10 @@ static char *getmntpt(const char *); static size_t longwidth(long); static char *makenetvfslist(void); -static void prthuman(const struct statfs *, long); +static void prthuman(const struct statfs *, size_t); static void prthumanval(double); static void prtstat(struct statfs *, struct maxwidths *); -static long regetmntinfo(struct statfs **, long, const char **); +static size_t regetmntinfo(struct statfs **, long, const char **); static unit_t unit_adjust(double *); static void update_maxwidths(struct maxwidths *, const struct statfs *); static void usage(void); @@ -148,8 +148,8 @@ const char *fstype; char *mntpath, *mntpt; const char **vfslist; - long mntsize; - int ch, i, rv; + size_t i, mntsize; + int ch, rv; fstype = "ufs"; @@ -305,7 +305,7 @@ static char * getmntpt(const char *name) { - long mntsize, i; + size_t mntsize, i; struct statfs *mntbuf; mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); @@ -321,7 +321,7 @@ * file system types not in vfslist and possibly re-stating to get * current (not cached) info. Returns the new count of valid statfs bufs. */ -static long +static size_t regetmntinfo(struct statfs **mntbufp, long mntsize, const char **vfslist) { int i, j; @@ -371,7 +371,7 @@ } static void -prthuman(const struct statfs *sfsp, long used) +prthuman(const struct statfs *sfsp, size_t used) { prthumanval((double)sfsp->f_blocks * (double)sfsp->f_bsize); @@ -411,7 +411,7 @@ static long blocksize; static int headerlen, timesthrough = 0; static const char *header; - long used, availblks, inodes; + size_t used, availblks, inodes; if (++timesthrough == 1) { mwp->mntfrom = max(mwp->mntfrom, strlen("Filesystem")); @@ -456,8 +456,8 @@ if (iflag) { inodes = sfsp->f_files; used = inodes - sfsp->f_ffree; - (void)printf(" %*ld %*ld %4.0f%% ", - (u_int)mwp->iused, used, + (void)printf(" %*lu %*lu %4.0f%% ", + (u_int)mwp->iused, (u_long)used, (u_int)mwp->ifree, sfsp->f_ffree, inodes == 0 ? 100.0 : (double)used / (double)inodes * 100.0); } else ==== //depot/projects/s390/bin/ls/Makefile#3 (text+ko) ==== @@ -1,10 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 6/2/93 -# $FreeBSD: src/bin/ls/Makefile,v 1.24 2002/10/24 00:07:30 rwatson Exp $ +# $FreeBSD: src/bin/ls/Makefile,v 1.25 2003/06/13 07:04:02 markm Exp $ PROG= ls SRCS= cmp.c ls.c print.c util.c -NO_WERROR=1 -WFORMAT=0 DPADD= ${LIBM} LDADD= -lm ==== //depot/projects/s390/bin/ls/cmp.c#2 (text+ko) ==== ==== //depot/projects/s390/bin/ls/extern.h#3 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)extern.h 8.1 (Berkeley) 5/31/93 - * $FreeBSD: src/bin/ls/extern.h,v 1.20 2002/10/18 10:59:45 tjr Exp $ + * $FreeBSD: src/bin/ls/extern.h,v 1.21 2003/05/03 16:39:33 markm Exp $ */ int acccmp(const FTSENT *, const FTSENT *); @@ -43,11 +43,11 @@ int statcmp(const FTSENT *, const FTSENT *); int revstatcmp(const FTSENT *, const FTSENT *); -void printcol(DISPLAY *); -void printlong(DISPLAY *); +void printcol(const DISPLAY *); +void printlong(const DISPLAY *); int printname(const char *); -void printscol(DISPLAY *); -void printstream(DISPLAY *); +void printscol(const DISPLAY *); +void printstream(const DISPLAY *); void usage(void); size_t len_octal(const char *, int); int prn_octal(const char *); @@ -62,3 +62,4 @@ extern char *attrs_off; extern char *enter_bold; #endif +extern int termwidth; ==== //depot/projects/s390/bin/ls/ls.1#5 (text+ko) ==== @@ -33,7 +33,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 -.\" $FreeBSD: src/bin/ls/ls.1,v 1.73 2003/01/20 21:25:00 chris Exp $ +.\" $FreeBSD: src/bin/ls/ls.1,v 1.76 2003/08/08 17:04:17 schweikh Exp $ .\" .Dd May 19, 2002 .Dt LS 1 @@ -175,7 +175,7 @@ When used with the .Fl l option, use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte -and Petabyte in order to reduce the number of digits to three or less +and Petabyte in order to reduce the number of digits to four or fewer using base 2 for sizes. .It Fl i For each file, print the file's file serial number (inode number). @@ -334,7 +334,7 @@ The file mode printed under the .Fl l option consists of the -entry type, owner permissions, and group permissions. +entry type and the permissions. The entry type character describes the type of file, as follows: .Pp @@ -645,7 +645,12 @@ .Xr getfmac 8 , .Xr sticky 8 .Sh STANDARDS -The +With the exception of options +.Fl g , +.Fl n +and +.Fl o , +the .Nm utility conforms to .St -p1003.1-2001 . ==== //depot/projects/s390/bin/ls/ls.c#6 (text+ko) ==== @@ -46,7 +46,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/bin/ls/ls.c,v 1.72 2002/12/18 21:05:15 rwatson Exp $"); +__FBSDID("$FreeBSD: src/bin/ls/ls.c,v 1.74 2003/05/03 16:39:33 markm Exp $"); #include #include @@ -58,6 +58,7 @@ #include #include #include +#include #include #include #include @@ -80,12 +81,26 @@ */ #define STRBUF_SIZEOF(t) (1 + CHAR_BIT * sizeof(t) / 3 + 1) -static void display(FTSENT *, FTSENT *, int); -static u_quad_t makenines(u_long); +/* + * MAKENINES(n) turns n into (10**n)-1. This is useful for converting a width + * into a number that wide in decimal. + * XXX: Overflows are not considered. + */ +#define MAKENINES(n) \ + do { \ + intmax_t i; \ + \ + /* Use a loop as all values of n are small. */ \ + for (i = 1; n > 0; i *= 10) \ + n--; \ + n = i - 1; \ + } while(0) + +static void display(const FTSENT *, FTSENT *, int); static int mastercmp(const FTSENT * const *, const FTSENT * const *); static void traverse(int, char **, int); -static void (*printfcn)(DISPLAY *); +static void (*printfcn)(const DISPLAY *); static int (*sortfcn)(const FTSENT *, const FTSENT *); long blocksize; /* block size units */ @@ -114,7 +129,7 @@ int f_slash; /* similar to f_type, but only for dirs */ int f_sortacross; /* sort across rows, not down columns */ int f_statustime; /* use time of last mode change */ - int f_stream; /* stream the output, separate with commas */ +static int f_stream; /* stream the output, separate with commas */ static int f_timesort; /* sort by time vice name */ int f_type; /* add type character for non-regular files */ static int f_whiteout; /* show whiteout entries */ @@ -473,10 +488,10 @@ */ if (output) { putchar('\n'); - printname(p->fts_path); + (void)printname(p->fts_path); puts(":"); } else if (argc > 1) { - printname(p->fts_path); + (void)printname(p->fts_path); puts(":"); output = 1; } @@ -499,14 +514,15 @@ * points to the parent directory of the display list. */ static void -display(FTSENT *p, FTSENT *list, int options) +display(const FTSENT *p, FTSENT *list, int options) { struct stat *sp; DISPLAY d; FTSENT *cur; NAMES *np; off_t maxsize; - u_long btotal, labelstrlen, maxblock, maxinode, maxlen, maxnlink; + long maxblock; + u_long btotal, labelstrlen, maxinode, maxlen, maxnlink; u_long maxlabelstr; int bcfile, maxflags; gid_t maxgroup; @@ -542,9 +558,10 @@ int ninitmax; /* Fill-in "::" as "0:0:0" for the sake of scanf. */ - jinitmax = initmax2 = malloc(strlen(initmax) * 2 + 2); + jinitmax = malloc(strlen(initmax) * 2 + 2); if (jinitmax == NULL) err(1, "malloc"); + initmax2 = jinitmax; if (*initmax == ':') strcpy(initmax2, "0:"), initmax2 += 2; else @@ -563,7 +580,7 @@ strcpy(initmax2, "0"); ninitmax = sscanf(jinitmax, - " %lu : %lu : %lu : %i : %i : %i : %llu : %lu : %lu ", + " %lu : %ld : %lu : %u : %u : %i : %jd : %lu : %lu ", &maxinode, &maxblock, &maxnlink, &maxuser, &maxgroup, &maxflags, &maxsize, &maxlen, &maxlabelstr); f_notabs = 1; @@ -603,10 +620,10 @@ default: break; } - maxinode = makenines(maxinode); - maxblock = makenines(maxblock); - maxnlink = makenines(maxnlink); - maxsize = makenines(maxsize); + MAKENINES(maxinode); + MAKENINES(maxblock); + MAKENINES(maxnlink); + MAKENINES(maxsize); } bcfile = 0; flags = NULL; @@ -732,7 +749,7 @@ mac_free(label); label_out: if (labelstr == NULL) - labelstr = strdup(""); + labelstr = strdup("-"); labelstrlen = strlen(labelstr); if (labelstrlen > maxlabelstr) maxlabelstr = labelstrlen; @@ -787,7 +804,7 @@ d.s_inode = strlen(buf); (void)snprintf(buf, sizeof(buf), "%lu", maxnlink); d.s_nlink = strlen(buf); - (void)snprintf(buf, sizeof(buf), "%qu", maxsize); + (void)snprintf(buf, sizeof(buf), "%ju", maxsize); d.s_size = strlen(buf); d.s_user = maxuser; } @@ -829,22 +846,3 @@ } return (sortfcn(*a, *b)); } - -/* - * Makenines() returns (10**n)-1. This is useful for converting a width - * into a number that wide in decimal. - */ -static u_quad_t -makenines(u_long n) -{ - u_long i; - u_quad_t reg; - - reg = 1; - /* Use a loop instead of pow(), since all values of n are small. */ - for (i = 0; i < n; i++) - reg *= 10; - reg--; - - return reg; -} ==== //depot/projects/s390/bin/ls/ls.h#3 (text+ko) ==== ==== //depot/projects/s390/bin/ls/print.c#6 (text+ko) ==== @@ -40,7 +40,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/bin/ls/print.c,v 1.64 2002/12/19 01:13:23 tjr Exp $"); +__FBSDID("$FreeBSD: src/bin/ls/print.c,v 1.65 2003/05/03 16:39:33 markm Exp $"); #include #include @@ -65,7 +65,7 @@ #include "ls.h" #include "extern.h" -static int printaname(FTSENT *, u_long, u_long); +static int printaname(const FTSENT *, u_long, u_long); static void printlink(const FTSENT *); static void printtime(time_t); static int printtype(u_int); @@ -74,7 +74,7 @@ static void endcolor(int); static int colortype(mode_t); #endif -static void aclmode(char *, FTSENT *, int *); +static void aclmode(char *, const FTSENT *, int *); #define IS_NOPRINT(p) ((p)->fts_number == NO_PRINT) @@ -128,7 +128,7 @@ #endif void -printscol(DISPLAY *dp) +printscol(const DISPLAY *dp) { FTSENT *p; @@ -155,7 +155,7 @@ } void -printlong(DISPLAY *dp) +printlong(const DISPLAY *dp) { struct stat *sp; FTSENT *p; @@ -179,7 +179,7 @@ if (f_inode) (void)printf("%*lu ", dp->s_inode, (u_long)sp->st_ino); if (f_size) - (void)printf("%*lld ", + (void)printf("%*jd ", dp->s_block, howmany(sp->st_blocks, blocksize)); strmode(sp->st_mode, buf); /* @@ -207,7 +207,7 @@ (void)printf("%3d, %3d ", major(sp->st_rdev), minor(sp->st_rdev)); else if (dp->bcfile) - (void)printf("%*s%*lld ", + (void)printf("%*s%*jd ", 8 - dp->s_size, "", dp->s_size, sp->st_size); else printsize(dp->s_size, sp->st_size); @@ -235,10 +235,9 @@ } void -printstream(DISPLAY *dp) +printstream(const DISPLAY *dp) { FTSENT *p; - extern int termwidth; int chcnt; for (p = dp->list, chcnt = 0; p; p = p->fts_link) { @@ -260,9 +259,8 @@ } void -printcol(DISPLAY *dp) +printcol(const DISPLAY *dp) { - extern int termwidth; static FTSENT **array; static int lastentries = -1; FTSENT *p; @@ -352,7 +350,7 @@ * return # of characters printed, no trailing characters. */ static int -printaname(FTSENT *p, u_long inodefield, u_long sizefield) +printaname(const FTSENT *p, u_long inodefield, u_long sizefield) { struct stat *sp; int chcnt; @@ -365,7 +363,7 @@ if (f_inode) chcnt += printf("%*lu ", (int)inodefield, (u_long)sp->st_ino); if (f_size) - chcnt += printf("%*lld ", + chcnt += printf("%*jd ", (int)sizefield, howmany(sp->st_blocks, blocksize)); #ifdef COLORLS if (f_color) @@ -385,7 +383,7 @@ printtime(time_t ftime) { char longstring[80]; - static time_t now; + static time_t now = 0; const char *format; static int d_first = -1; @@ -457,7 +455,7 @@ static int writech(int c) { - char tmp = c; + char tmp = (char)c; (void)write(STDOUT_FILENO, &tmp, 1); return 0; @@ -518,6 +516,7 @@ case S_IFCHR: printcolor(C_CHR); return (1); + default:; } if (mode & (S_IXUSR | S_IXGRP | S_IXOTH)) { if (mode & S_ISUID) @@ -543,10 +542,10 @@ if (cs == NULL) cs = ""; /* LSCOLORS not set */ len = strlen(cs); - for (i = 0; i < C_NUMCOLORS; i++) { + for (i = 0; i < (int)C_NUMCOLORS; i++) { colors[i].bold = 0; - if (len <= 2 * i) { + if (len <= 2 * (size_t)i) { c[0] = defcolors[2 * i]; c[1] = defcolors[2 * i + 1]; } else { @@ -568,7 +567,7 @@ else if (c[j] >= 'A' && c[j] <= 'H') { colors[i].num[j] = c[j] - 'A'; colors[i].bold = 1; - } else if (tolower((unsigned char)c[j] == 'x')) + } else if (tolower((unsigned char)c[j]) == 'x') >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Sep 22 08:20:06 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 391D916A4C0; Mon, 22 Sep 2003 08:20:06 -0700 (PDT) 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 14BFE16A4B3 for ; Mon, 22 Sep 2003 08:20:06 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B62A343FBD for ; Mon, 22 Sep 2003 08:20:04 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8MFK4XJ000987 for ; Mon, 22 Sep 2003 08:20:04 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8MFK4FA000984 for perforce@freebsd.org; Mon, 22 Sep 2003 08:20:04 -0700 (PDT) (envelope-from areisse@nailabs.com) Date: Mon, 22 Sep 2003 08:20:04 -0700 (PDT) Message-Id: <200309221520.h8MFK4FA000984@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 38418 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2003 15:20:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=38418 Change 38418 by areisse@areisse_tislabs on 2003/09/22 08:19:32 remove avc_enforcing and avc_toggle syscalls also, it should build again... Affected files ... .. //depot/projects/trustedbsd/sebsd/lib/libsebsd/sebsd_ss.h#2 edit .. //depot/projects/trustedbsd/sebsd/lib/libsebsd/system.c#2 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/lib/libsebsd/sebsd_ss.h#2 (text+ko) ==== @@ -36,13 +36,6 @@ #ifndef _SELINUX_SS_H_ #define _SELINUX_SS_H_ - -/* Individual AVC calls. */ - -extern int avc_toggle(void); - -extern int avc_enforcing(void); - /* Individual security server calls. */ extern int security_compute_av(struct security_query *query, @@ -70,16 +63,16 @@ extern int security_sid_to_context(security_id_t sid, security_context_t scontext, - __u32 *scontext_len); + u32 *scontext_len); extern int security_context_to_sid(const security_context_t scontext, - __u32 scontext_len, + u32 scontext_len, security_id_t *out_sid); extern int security_load_policy(const char *path); extern int security_get_sids(security_id_t *sids, - __u32 *nel); + u32 *nel); extern int security_mls(void); ==== //depot/projects/trustedbsd/sebsd/lib/libsebsd/system.c#2 (text+ko) ==== @@ -40,21 +40,21 @@ int sebsd_enabled() { - int error; - error = mac_syscall(SEBSD_ID_STRING, SEBSDCALL_AVC_ENFORCING , NULL); - return (error != ENOSYS); + int error, i; + error = sysctlbyname ("security.mac.sebsd.enforcing", + &i, sizeof(int), NULL, 0); + return (error != ENOENT); } int sebsd_enforcing() { - return mac_syscall(SEBSD_ID_STRING, SEBSDCALL_AVC_ENFORCING , NULL); -} - -int -sebsd_avc_toggle() -{ - return mac_syscall(SEBSD_ID_STRING, SEBSDCALL_AVC_TOGGLE , NULL); + int i, error; + error = sysctlbyname ("security.mac.sebsd.enforcing", + &i, sizeof (int), NULL, 0); + if (error) + return 0; + return i; } int From owner-p4-projects@FreeBSD.ORG Mon Sep 22 08:51:45 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5EE5B16A4C3; Mon, 22 Sep 2003 08:51:45 -0700 (PDT) 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 3347F16A4C2 for ; Mon, 22 Sep 2003 08:51:45 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78DC643FD7 for ; Mon, 22 Sep 2003 08:51:44 -0700 (PDT) (envelope-from tzukanov@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8MFpiXJ009189 for ; Mon, 22 Sep 2003 08:51:44 -0700 (PDT) (envelope-from tzukanov@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8MFph5v009186 for perforce@freebsd.org; Mon, 22 Sep 2003 08:51:43 -0700 (PDT) (envelope-from tzukanov@freebsd.org) Date: Mon, 22 Sep 2003 08:51:43 -0700 (PDT) Message-Id: <200309221551.h8MFph5v009186@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to tzukanov@freebsd.org using -f From: Serguei Tzukanov To: Perforce Change Reviews Subject: PERFORCE change 38420 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2003 15:51:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=38420 Change 38420 by tzukanov@tzukanov_antares on 2003/09/22 08:50:56 No need in this file anymore. Affected files ... .. //depot/projects/s390/contrib/gcc/config/s390/t-linux#3 delete Differences ... From owner-p4-projects@FreeBSD.ORG Mon Sep 22 09:01:59 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8AC6116A4C0; Mon, 22 Sep 2003 09:01:59 -0700 (PDT) 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 646B116A4B3 for ; Mon, 22 Sep 2003 09:01:59 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5427043FD7 for ; Mon, 22 Sep 2003 09:01:58 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8MG1wXJ009995 for ; Mon, 22 Sep 2003 09:01:58 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8MG1vRe009992 for perforce@freebsd.org; Mon, 22 Sep 2003 09:01:57 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Mon, 22 Sep 2003 09:01:57 -0700 (PDT) Message-Id: <200309221601.h8MG1vRe009992@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38422 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2003 16:02:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=38422 Change 38422 by sam@sam_ebb on 2003/09/22 09:01:36 o allocate node table entries with a specific malloc type o add various statistics (still need per-node stats) o add SIOCG80211STATS ioctl to retrieve statistics o correct spelling of IEEE80211_IOCT_RTSTHRESHOLD Affected files ... .. //depot/projects/netperf/sys/net80211/ieee80211_crypto.c#2 edit .. //depot/projects/netperf/sys/net80211/ieee80211_input.c#7 edit .. //depot/projects/netperf/sys/net80211/ieee80211_ioctl.c#3 edit .. //depot/projects/netperf/sys/net80211/ieee80211_ioctl.h#2 edit .. //depot/projects/netperf/sys/net80211/ieee80211_node.c#8 edit .. //depot/projects/netperf/sys/net80211/ieee80211_output.c#6 edit .. //depot/projects/netperf/sys/net80211/ieee80211_var.h#5 edit Differences ... ==== //depot/projects/netperf/sys/net80211/ieee80211_crypto.c#2 (text+ko) ==== @@ -113,16 +113,23 @@ n0 = NULL; if ((ctx = ic->ic_wep_ctx) == NULL) { ctx = malloc(arc4_ctxlen(), M_DEVBUF, M_NOWAIT); - if (ctx == NULL) + if (ctx == NULL) { + /* XXX statistic */ goto fail; + } ic->ic_wep_ctx = ctx; } m = m0; left = m->m_pkthdr.len; MGET(n, M_DONTWAIT, m->m_type); n0 = n; - if (n == NULL) + if (n == NULL) { + if (txflag) + ic->ic_stats.is_tx_nombuf++; + else + ic->ic_stats.is_rx_nombuf++; goto fail; + } M_MOVE_PKTHDR(n, m); len = IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN + IEEE80211_WEP_CRCLEN; if (txflag) { @@ -188,8 +195,13 @@ len = n->m_len - noff; if (len == 0) { MGET(n->m_next, M_DONTWAIT, n->m_type); - if (n->m_next == NULL) + if (n->m_next == NULL) { + if (txflag) + ic->ic_stats.is_tx_nombuf++; + else + ic->ic_stats.is_rx_nombuf++; goto fail; + } n = n->m_next; n->m_len = MLEN; if (left >= MINCLSIZE) { @@ -223,8 +235,10 @@ else { n->m_len = noff; MGET(n->m_next, M_DONTWAIT, n->m_type); - if (n->m_next == NULL) + if (n->m_next == NULL) { + ic->ic_stats.is_tx_nombuf++; goto fail; + } n = n->m_next; n->m_len = sizeof(crcbuf); noff = 0; @@ -252,6 +266,7 @@ n0->m_len, -1, -1); } #endif + ic->ic_stats.is_rx_decryptcrc++; goto fail; } } ==== //depot/projects/netperf/sys/net80211/ieee80211_input.c#7 (text+ko) ==== @@ -113,6 +113,7 @@ if_printf(ifp, "receive packet with wrong version: %x\n", wh->i_fc[0]); ieee80211_unref_node(&ni); + ic->ic_stats.is_rx_badversion++; goto err; } @@ -125,6 +126,7 @@ */ if (m->m_pkthdr.len < sizeof(struct ieee80211_frame)) { /* XXX statistic */ + ic->ic_stats.is_rx_tooshort++; goto out; /* XXX */ } if (ic->ic_state != IEEE80211_S_SCAN) { @@ -135,6 +137,7 @@ "bss %s\n", __func__, ether_sprintf(wh->i_addr2))); /* not interested in */ + ic->ic_stats.is_rx_wrongbss++; goto out; } break; @@ -150,6 +153,7 @@ /* not interested in */ IEEE80211_DPRINTF2(("%s: other bss %s\n", __func__, ether_sprintf(wh->i_addr3))); + ic->ic_stats.is_rx_wrongbss++; goto out; } break; @@ -168,6 +172,7 @@ if ((wh->i_fc[1] & IEEE80211_FC1_RETRY) && rxseq == ni->ni_rxseq) { /* duplicate, silently discarded */ + ic->ic_stats.is_rx_dup++; /* XXX per-station stat */ goto out; } ni->ni_inact = 0; @@ -177,8 +182,10 @@ case IEEE80211_FC0_TYPE_DATA: switch (ic->ic_opmode) { case IEEE80211_M_STA: - if (dir != IEEE80211_FC1_DIR_FROMDS) + if (dir != IEEE80211_FC1_DIR_FROMDS) { + ic->ic_stats.is_rx_wrongdir++; goto out; + } if ((ifp->if_flags & IFF_SIMPLEX) && IEEE80211_IS_MULTICAST(wh->i_addr1) && IEEE80211_ADDR_EQ(wh->i_addr3, ic->ic_myaddr)) { @@ -188,17 +195,22 @@ * It should be silently discarded for * SIMPLEX interface. */ + ic->ic_stats.is_rx_mcastecho++; goto out; } break; case IEEE80211_M_IBSS: case IEEE80211_M_AHDEMO: - if (dir != IEEE80211_FC1_DIR_NODS) + if (dir != IEEE80211_FC1_DIR_NODS) { + ic->ic_stats.is_rx_wrongdir++; goto out; + } break; case IEEE80211_M_HOSTAP: - if (dir != IEEE80211_FC1_DIR_TODS) + if (dir != IEEE80211_FC1_DIR_TODS) { + ic->ic_stats.is_rx_wrongdir++; goto out; + } /* check if source STA is associated */ if (ni == ic->ic_bss) { IEEE80211_DPRINTF(("%s: data from unknown src " @@ -212,6 +224,7 @@ IEEE80211_REASON_NOT_AUTHED); ieee80211_free_node(ic, ni); } + ic->ic_stats.is_rx_notassoc++; goto err; } if (ni->ni_associd == 0) { @@ -222,6 +235,7 @@ IEEE80211_FC0_SUBTYPE_DISASSOC, IEEE80211_REASON_NOT_ASSOCED); ieee80211_unref_node(&ni); + ic->ic_stats.is_rx_notassoc++; goto err; } break; @@ -231,18 +245,24 @@ if (wh->i_fc[1] & IEEE80211_FC1_WEP) { if (ic->ic_flags & IEEE80211_F_WEPON) { m = ieee80211_wep_crypt(ifp, m, 0); - if (m == NULL) + if (m == NULL) { + ic->ic_stats.is_rx_wepfail++; goto err; + } wh = mtod(m, struct ieee80211_frame *); - } else + } else { + ic->ic_stats.is_rx_nowep++; goto out; + } } /* copy to listener after decrypt */ if (ic->ic_rawbpf) bpf_mtap(ic->ic_rawbpf, m); m = ieee80211_decap(ifp, m); - if (m == NULL) + if (m == NULL) { + ic->ic_stats.is_rx_decap++; goto err; + } ifp->if_ipackets++; /* perform as a bridge within the AP */ @@ -283,21 +303,29 @@ return; case IEEE80211_FC0_TYPE_MGT: - if (dir != IEEE80211_FC1_DIR_NODS) + if (dir != IEEE80211_FC1_DIR_NODS) { + ic->ic_stats.is_rx_wrongdir++; goto err; - if (ic->ic_opmode == IEEE80211_M_AHDEMO) + } + if (ic->ic_opmode == IEEE80211_M_AHDEMO) { + /* XXX statistic */ goto out; + } subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; /* drop frames without interest */ if (ic->ic_state == IEEE80211_S_SCAN) { if (subtype != IEEE80211_FC0_SUBTYPE_BEACON && - subtype != IEEE80211_FC0_SUBTYPE_PROBE_RESP) + subtype != IEEE80211_FC0_SUBTYPE_PROBE_RESP) { + ic->ic_stats.is_rx_mgtdiscard++; goto out; + } } else { if (ic->ic_opmode != IEEE80211_M_IBSS && - subtype == IEEE80211_FC0_SUBTYPE_BEACON) + subtype == IEEE80211_FC0_SUBTYPE_BEACON) { + ic->ic_stats.is_rx_mgtdiscard++; goto out; + } } if (ifp->if_flags & IFF_DEBUG) { @@ -333,6 +361,7 @@ return; case IEEE80211_FC0_TYPE_CTL: + ic->ic_stats.is_rx_ctl++; goto out; default: IEEE80211_DPRINTF(("%s: bad type %x\n", __func__, type)); @@ -472,6 +501,7 @@ IEEE80211_DPRINTF(("%s: extended rate set too large;" " only using %u of %u rates\n", __func__, nxrates, xrates[1])); + ic->ic_stats.is_rx_rstoobig++; } memcpy(rs->rs_rates + rs->rs_nrates, xrates+2, nxrates); rs->rs_nrates += nxrates; @@ -479,13 +509,13 @@ return ieee80211_fix_rate(ic, ni, flags); } -/* XXX statistics */ /* Verify the existence and length of __elem or get out. */ #define IEEE80211_VERIFY_ELEMENT(__elem, __maxlen) do { \ if ((__elem) == NULL) { \ IEEE80211_DPRINTF(("%s: no " #__elem "in %s frame\n", \ __func__, ieee80211_mgt_subtype_name[subtype >> \ IEEE80211_FC0_SUBTYPE_SHIFT])); \ + ic->ic_stats.is_rx_elem_missing++; \ return; \ } \ if ((__elem)[1] > (__maxlen)) { \ @@ -494,6 +524,7 @@ ieee80211_mgt_subtype_name[subtype >> \ IEEE80211_FC0_SUBTYPE_SHIFT], \ ether_sprintf(wh->i_addr2))); \ + ic->ic_stats.is_rx_elem_toobig++; \ return; \ } \ } while (0) @@ -505,6 +536,7 @@ ieee80211_mgt_subtype_name[subtype >> \ IEEE80211_FC0_SUBTYPE_SHIFT], \ ether_sprintf(wh->i_addr2))); \ + ic->ic_stats.is_rx_elem_toosmall++; \ return; \ } \ } while (0) @@ -595,6 +627,7 @@ IEEE80211_DPRINTF(("%s: invalid ERP " "element; length %u, expecting " "1\n", __func__, frm[1])); + ic->ic_stats.is_rx_elem_toobig++; break; } erp = frm[2]; @@ -602,6 +635,7 @@ default: IEEE80211_DPRINTF(("%s: element id %u/len %u " "ignored\n", __func__, *frm, frm[1])); + ic->ic_stats.is_rx_elem_unknown++; break; } frm += frm[1] + 2; @@ -617,6 +651,7 @@ "%u\n", __func__, ISPROBE(subtype) ? "probe response" : "beacon", chan)); + ic->ic_stats.is_rx_badchan++; return; } if (chan != bchan) { @@ -631,7 +666,7 @@ "for channel %u\n", __func__, ISPROBE(subtype) ? "probe response" : "beacon", bchan, chan)); - /* XXX statistic */ + ic->ic_stats.is_rx_chanmismatch++; return; } @@ -666,8 +701,10 @@ #endif if (ni == NULL) { ni = ieee80211_alloc_node(ic, wh->i_addr2); - if (ni == NULL) + if (ni == NULL) { + ic->ic_stats.is_rx_nodealloc++; return; + } ni->ni_esslen = ssid[1]; memset(ni->ni_essid, 0, sizeof(ni->ni_essid)); memcpy(ni->ni_essid, ssid + 2, ssid[1]); @@ -738,13 +775,16 @@ printf(" from %s\n", ether_sprintf(wh->i_addr2)); } #endif + ic->ic_stats.is_rx_ssidmismatch++; return; } if (ni == ic->ic_bss) { ni = ieee80211_dup_bss(ic, wh->i_addr2); - if (ni == NULL) + if (ni == NULL) { + ic->ic_stats.is_rx_nodealloc++; return; + } IEEE80211_DPRINTF(("%s: new req from %s\n", __func__, ether_sprintf(wh->i_addr2))); allocbs = 1; @@ -789,12 +829,15 @@ /* TODO: shared key auth */ IEEE80211_DPRINTF(("%s: unsupported auth %d from %s\n", __func__, algo, ether_sprintf(wh->i_addr2))); + ic->ic_stats.is_rx_auth_unsupported++; return; } switch (ic->ic_opmode) { case IEEE80211_M_IBSS: - if (ic->ic_state != IEEE80211_S_RUN || seq != 1) + if (ic->ic_state != IEEE80211_S_RUN || seq != 1) { + /* XXX statistic */ return; + } ieee80211_new_state(ic, IEEE80211_S_AUTH, wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK); break; @@ -808,8 +851,10 @@ return; if (ni == ic->ic_bss) { ni = ieee80211_alloc_node(ic, wh->i_addr2); - if (ni == NULL) + if (ni == NULL) { + ic->ic_stats.is_rx_nodealloc++; return; + } IEEE80211_ADDR_COPY(ni->ni_bssid, ic->ic_bss->ni_bssid); ni->ni_rssi = rssi; ni->ni_rstamp = rstamp; @@ -826,8 +871,10 @@ break; case IEEE80211_M_STA: - if (ic->ic_state != IEEE80211_S_AUTH || seq != 2) + if (ic->ic_state != IEEE80211_S_AUTH || seq != 2) { + /* XXX statistic */ return; + } if (status != 0) { if_printf(&ic->ic_if, "authentication failed (reason %d) for %s\n", @@ -835,6 +882,7 @@ ether_sprintf(wh->i_addr3)); if (ni != ic->ic_bss) ni->ni_fails++; + ic->ic_stats.is_rx_auth_fail++; return; } ieee80211_new_state(ic, IEEE80211_S_ASSOC, @@ -874,6 +922,7 @@ if (!IEEE80211_ADDR_EQ(wh->i_addr3, ic->ic_bss->ni_bssid)) { IEEE80211_DPRINTF(("%s: ignore other bss from %s\n", __func__, ether_sprintf(wh->i_addr2))); + ic->ic_stats.is_rx_assoc_bss++; return; } capinfo = le16toh(*(u_int16_t *)frm); frm += 2; @@ -906,6 +955,7 @@ printf(" from %s\n", ether_sprintf(wh->i_addr2)); } #endif + ic->ic_stats.is_rx_ssidmismatch++; return; } if (ni == ic->ic_bss) { @@ -918,6 +968,7 @@ IEEE80211_REASON_ASSOC_NOT_AUTHED); ieee80211_free_node(ic, ni); } + ic->ic_stats.is_rx_assoc_notauth++; return; } /* XXX per-node cipher suite */ @@ -932,6 +983,7 @@ ni->ni_associd = 0; IEEE80211_SEND_MGMT(ic, ni, resp, IEEE80211_STATUS_CAPINFO); + ic->ic_stats.is_rx_assoc_capmismatch++; return; } ieee80211_setup_rates(ic, ni, rates, xrates, @@ -943,6 +995,7 @@ ni->ni_associd = 0; IEEE80211_SEND_MGMT(ic, ni, resp, IEEE80211_STATUS_BASIC_RATE); + ic->ic_stats.is_rx_assoc_norate++; return; } ni->ni_rssi = rssi; @@ -1000,6 +1053,7 @@ status, ether_sprintf(wh->i_addr3)); if (ni != ic->ic_bss) ni->ni_fails++; + ic->ic_stats.is_rx_auth_fail++; return; } ni->ni_associd = le16toh(*(u_int16_t *)frm); @@ -1036,6 +1090,7 @@ */ IEEE80211_VERIFY_LENGTH(efrm - frm, 2); reason = le16toh(*(u_int16_t *)frm); + ic->ic_stats.is_rx_deauth++; switch (ic->ic_opmode) { case IEEE80211_M_STA: ieee80211_new_state(ic, IEEE80211_S_AUTH, @@ -1065,6 +1120,7 @@ */ IEEE80211_VERIFY_LENGTH(efrm - frm, 2); reason = le16toh(*(u_int16_t *)frm); + ic->ic_stats.is_rx_disassoc++; switch (ic->ic_opmode) { case IEEE80211_M_STA: ieee80211_new_state(ic, IEEE80211_S_ASSOC, @@ -1088,6 +1144,7 @@ default: IEEE80211_DPRINTF(("%s: mgmt frame with subtype 0x%x not " "handled\n", __func__, subtype)); + ic->ic_stats.is_rx_badsubtype++; break; } #undef ISPROBE ==== //depot/projects/netperf/sys/net80211/ieee80211_ioctl.c#3 (text+ko) ==== @@ -720,6 +720,7 @@ int error = 0; u_int kid, len; struct ieee80211req *ireq; + struct ifreq *ifr; u_int8_t tmpkey[IEEE80211_KEYBUF_SIZE]; char tmpssid[IEEE80211_NWID_LEN]; struct ieee80211_channel *chan; @@ -823,7 +824,7 @@ case IEEE80211_IOC_POWERSAVESLEEP: ireq->i_val = ic->ic_lintval; break; - case IEEE80211_IOCT_RTSTHRESHOLD: + case IEEE80211_IOC_RTSTHRESHOLD: ireq->i_val = ic->ic_rtsthreshold; break; default: @@ -958,7 +959,7 @@ ic->ic_lintval = ireq->i_val; error = ENETRESET; break; - case IEEE80211_IOCT_RTSTHRESHOLD: + case IEEE80211_IOC_RTSTHRESHOLD: if (!(IEEE80211_RTS_MIN < ireq->i_val && ireq->i_val < IEEE80211_RTS_MAX)) { error = EINVAL; @@ -981,6 +982,10 @@ break; error = ieee80211_cfgset(ifp, cmd, data); break; + case SIOCG80211STATS: + ifr = (struct ifreq *)data; + copyout(&ic->ic_stats, ifr->ifr_data, sizeof (ic->ic_stats)); + break; default: error = ether_ioctl(ifp, cmd, data); break; ==== //depot/projects/netperf/sys/net80211/ieee80211_ioctl.h#2 (text+ko) ==== @@ -74,11 +74,54 @@ #define IEEE80211_POWERSAVE_PSP_CAM 3 #define IEEE80211_POWERSAVE_ON IEEE80211_POWERSAVE_CAM #define IEEE80211_IOC_POWERSAVESLEEP 11 -#define IEEE80211_IOCT_RTSTHRESHOLD 12 +#define IEEE80211_IOC_RTSTHRESHOLD 12 #ifndef IEEE80211_CHAN_ANY #define IEEE80211_CHAN_ANY 0xffff /* token for ``any channel'' */ #endif + +struct ieee80211_stats { + u_int32_t is_rx_badversion; /* rx frame with bad version */ + u_int32_t is_rx_tooshort; /* rx frame too short */ + u_int32_t is_rx_wrongbss; /* rx from wrong bssid */ + u_int32_t is_rx_dup; /* rx discard 'cuz dup */ + u_int32_t is_rx_wrongdir; /* rx w/ wrong direction */ + u_int32_t is_rx_mcastecho; /* rx discard 'cuz mcast echo */ + u_int32_t is_rx_notassoc; /* rx discard 'cuz sta !assoc */ + u_int32_t is_rx_nowep; /* rx w/ wep but wep !config */ + u_int32_t is_rx_wepfail; /* rx wep processing failed */ + u_int32_t is_rx_decap; /* rx decapsulation failed */ + u_int32_t is_rx_mgtdiscard; /* rx discard mgt frames */ + u_int32_t is_rx_ctl; /* rx discard ctrl frames */ + u_int32_t is_rx_rstoobig; /* rx rate set truncated */ + u_int32_t is_rx_elem_missing; /* rx required element missing*/ + u_int32_t is_rx_elem_toobig; /* rx element too big */ + u_int32_t is_rx_elem_toosmall; /* rx element too small */ + u_int32_t is_rx_elem_unknown; /* rx element unknown */ + u_int32_t is_rx_badchan; /* rx frame w/ invalid chan */ + u_int32_t is_rx_chanmismatch; /* rx frame chan mismatch */ + u_int32_t is_rx_nodealloc; /* rx frame dropped */ + u_int32_t is_rx_ssidmismatch; /* rx frame ssid mismatch */ + u_int32_t is_rx_auth_unsupported; /* rx w/ unsupported auth alg */ + u_int32_t is_rx_auth_fail; /* rx sta auth failure */ + u_int32_t is_rx_assoc_bss; /* rx assoc from wrong bssid */ + u_int32_t is_rx_assoc_notauth; /* rx assoc w/o auth */ + u_int32_t is_rx_assoc_capmismatch;/* rx assoc w/ cap mismatch */ + u_int32_t is_rx_assoc_norate; /* rx assoc w/ no rate match */ + u_int32_t is_rx_deauth; /* rx deauthentication */ + u_int32_t is_rx_disassoc; /* rx disassociation */ + u_int32_t is_rx_badsubtype; /* rx frame w/ unknown subtype*/ + u_int32_t is_rx_nombuf; /* rx failed for lack of mbuf */ + u_int32_t is_rx_decryptcrc; /* rx decrypt failed on crc */ + u_int32_t is_tx_nombuf; /* tx failed for lack of mbuf */ + u_int32_t is_tx_nonode; /* tx failed for no node */ + u_int32_t is_tx_unknownmgt; /* tx of unknown mgt frame */ + u_int32_t is_scan_active; /* active scans started */ + u_int32_t is_scan_passive; /* passive scans started */ + u_int32_t is_node_timeout; /* nodes timed out inactivity */ +}; + +#define SIOCG80211STATS _IOWR('i', 236, struct ifreq) #endif /* __FreeBSD__ */ #endif /* _NET80211_IEEE80211_IOCTL_H_ */ ==== //depot/projects/netperf/sys/net80211/ieee80211_node.c#8 (text+ko) ==== @@ -78,6 +78,8 @@ static void _ieee80211_free_node(struct ieee80211com *, struct ieee80211_node *); +MALLOC_DEFINE(M_80211_NODE, "node", "802.11 node state"); + void ieee80211_node_attach(struct ifnet *ifp) { @@ -145,8 +147,11 @@ * In all but hostap mode scanning starts off in * an active mode before switching to passive. */ - if (ic->ic_opmode != IEEE80211_M_HOSTAP) + if (ic->ic_opmode != IEEE80211_M_HOSTAP) { ic->ic_flags |= IEEE80211_F_ASCAN; + ic->ic_stats.is_scan_active++; + } else + ic->ic_stats.is_scan_passive++; if (ifp->if_flags & IFF_DEBUG) if_printf(ifp, "begin %s scan\n", (ic->ic_flags & IEEE80211_F_ASCAN) ? @@ -393,14 +398,14 @@ static struct ieee80211_node * ieee80211_node_alloc(struct ieee80211com *ic) { - return malloc(sizeof(struct ieee80211_node), M_DEVBUF, + return malloc(sizeof(struct ieee80211_node), M_80211_NODE, M_NOWAIT | M_ZERO); } static void ieee80211_node_free(struct ieee80211com *ic, struct ieee80211_node *ni) { - free(ni, M_DEVBUF); + free(ni, M_80211_NODE); } static void @@ -559,6 +564,7 @@ IEEE80211_FC0_SUBTYPE_DEAUTH, IEEE80211_REASON_AUTH_EXPIRE); ieee80211_free_node(ic, ni); + ic->ic_stats.is_node_timeout++; ni = nextbs; } else ni = TAILQ_NEXT(ni, ni_list); ==== //depot/projects/netperf/sys/net80211/ieee80211_output.c#6 (text+ko) ==== @@ -155,7 +155,7 @@ if (m->m_len < sizeof(struct ether_header)) { m = m_pullup(m, sizeof(struct ether_header)); if (m == NULL) { - /* XXX statistic */ + ic->ic_stats.is_tx_nombuf++; goto bad; } } @@ -171,7 +171,7 @@ * multicast/broadcast frame. */ if (!IEEE80211_IS_MULTICAST(eh.ether_dhost)) { - /* ic->ic_stats.st_tx_nonode++; XXX statistic */ + ic->ic_stats.is_tx_nonode++; goto bad; } ni = ic->ic_bss; @@ -189,8 +189,10 @@ llc->llc_snap.org_code[2] = 0; llc->llc_snap.ether_type = eh.ether_type; M_PREPEND(m, sizeof(struct ieee80211_frame), M_DONTWAIT); - if (m == NULL) + if (m == NULL) { + ic->ic_stats.is_tx_nombuf++; goto bad; + } wh = mtod(m, struct ieee80211_frame *); wh->i_fc[0] = IEEE80211_FC0_VERSION_0 | IEEE80211_FC0_TYPE_DATA; *(u_int16_t *)wh->i_dur = 0; @@ -301,7 +303,7 @@ ieee80211_send_mgmt(struct ieee80211com *ic, struct ieee80211_node *ni, int type, int arg) { -#define senderr(_x) do { ret = _x; goto bad; } while (0) +#define senderr(_x, _v) do { ic->ic_stats._v++; ret = _x; goto bad; } while (0) struct ifnet *ifp = &ic->ic_if; struct mbuf *m; u_int8_t *frm; @@ -332,7 +334,7 @@ + 2 + IEEE80211_RATE_SIZE + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)); if (m == NULL) - senderr(ENOMEM); + senderr(ENOMEM, is_tx_nombuf); m->m_data += sizeof(struct ieee80211_frame); frm = mtod(m, u_int8_t *); frm = ieee80211_add_ssid(frm, ic->ic_des_essid, ic->ic_des_esslen); @@ -362,7 +364,7 @@ + 6 + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)); if (m == NULL) - senderr(ENOMEM); + senderr(ENOMEM, is_tx_nombuf); m->m_data += sizeof(struct ieee80211_frame); frm = mtod(m, u_int8_t *); @@ -406,7 +408,7 @@ case IEEE80211_FC0_SUBTYPE_AUTH: MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) - senderr(ENOMEM); + senderr(ENOMEM, is_tx_nombuf); MH_ALIGN(m, 2 * 3); m->m_pkthdr.len = m->m_len = 6; frm = mtod(m, u_int8_t *); @@ -424,7 +426,7 @@ ether_sprintf(ni->ni_macaddr), arg); MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) - senderr(ENOMEM); + senderr(ENOMEM, is_tx_nombuf); MH_ALIGN(m, 2); m->m_pkthdr.len = m->m_len = 2; *mtod(m, u_int16_t *) = htole16(arg); /* reason */ @@ -449,7 +451,7 @@ + 2 + IEEE80211_RATE_SIZE + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)); if (m == NULL) - senderr(ENOMEM); + senderr(ENOMEM, is_tx_nombuf); m->m_data += sizeof(struct ieee80211_frame); frm = mtod(m, u_int8_t *); @@ -505,7 +507,7 @@ + 2 + IEEE80211_RATE_SIZE + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)); if (m == NULL) - senderr(ENOMEM); + senderr(ENOMEM, is_tx_nombuf); m->m_data += sizeof(struct ieee80211_frame); frm = mtod(m, u_int8_t *); @@ -536,7 +538,7 @@ ether_sprintf(ni->ni_macaddr), arg); MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) - senderr(ENOMEM); + senderr(ENOMEM, is_tx_nombuf); MH_ALIGN(m, 2); m->m_pkthdr.len = m->m_len = 2; *mtod(m, u_int16_t *) = htole16(arg); /* reason */ @@ -545,7 +547,7 @@ default: IEEE80211_DPRINTF(("%s: invalid mgmt frame type %u\n", __func__, type)); - senderr(EINVAL); + senderr(EINVAL, is_tx_unknownmgt); /* NOTREACHED */ } ==== //depot/projects/netperf/sys/net80211/ieee80211_var.h#5 (text+ko) ==== @@ -40,6 +40,7 @@ #include #include +#include /* for ieee80211_stats */ #include #include @@ -192,6 +193,7 @@ int ic_wep_txkey; /* default tx key index */ void *ic_wep_ctx; /* wep crypt context */ u_int32_t ic_iv; /* initial vector for wep */ + struct ieee80211_stats ic_stats; /* statistics */ }; #define ic_if ic_ac.ac_if #define ic_softc ic_if.if_softc From owner-p4-projects@FreeBSD.ORG Mon Sep 22 09:20:33 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5013616A4C0; Mon, 22 Sep 2003 09:20:33 -0700 (PDT) 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 0E3C016A4B3 for ; Mon, 22 Sep 2003 09:20:33 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A43F43F85 for ; Mon, 22 Sep 2003 09:20:22 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8MGKMXJ011989 for ; Mon, 22 Sep 2003 09:20:22 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8MGKL4c011980 for perforce@freebsd.org; Mon, 22 Sep 2003 09:20:21 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Mon, 22 Sep 2003 09:20:21 -0700 (PDT) Message-Id: <200309221620.h8MGKL4c011980@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38424 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2003 16:20:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=38424 Change 38424 by sam@sam_ebb on 2003/09/22 09:19:38 IFC @ 38423 Affected files ... .. //depot/projects/netperf/sys/alpha/conf/GENERIC#2 integrate .. //depot/projects/netperf/sys/amd64/conf/GENERIC#4 integrate .. //depot/projects/netperf/sys/cam/cam_periph.c#3 integrate .. //depot/projects/netperf/sys/cam/scsi/scsi_all.c#2 integrate .. //depot/projects/netperf/sys/compat/linprocfs/linprocfs.c#5 integrate .. //depot/projects/netperf/sys/conf/NOTES#9 integrate .. //depot/projects/netperf/sys/conf/files.ia64#6 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/rsaddr.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/rsirq.c#2 integrate .. //depot/projects/netperf/sys/crypto/rijndael/rijndael-api-fst.c#3 integrate .. //depot/projects/netperf/sys/dev/acpica/acpi.c#7 integrate .. //depot/projects/netperf/sys/dev/acpica/acpi_button.c#4 integrate .. //depot/projects/netperf/sys/dev/ata/ata-lowlevel.c#4 integrate .. //depot/projects/netperf/sys/dev/ata/ata-queue.c#3 integrate .. //depot/projects/netperf/sys/dev/ata/atapi-cam.c#6 integrate .. //depot/projects/netperf/sys/dev/ata/atapi-cd.c#6 integrate .. //depot/projects/netperf/sys/dev/ata/atapi-cd.h#5 integrate .. //depot/projects/netperf/sys/dev/ed/if_ed_pccard.c#4 integrate .. //depot/projects/netperf/sys/dev/ips/ips_disk.c#3 integrate .. //depot/projects/netperf/sys/dev/mii/e1000phy.c#3 integrate .. //depot/projects/netperf/sys/dev/mii/e1000phyreg.h#2 integrate .. //depot/projects/netperf/sys/dev/mii/miidevs#3 integrate .. //depot/projects/netperf/sys/dev/pccard/pccarddevs#6 integrate .. //depot/projects/netperf/sys/dev/pccard/pccarddevs.h#6 integrate .. //depot/projects/netperf/sys/dev/pccard/pccardvar.h#3 integrate .. //depot/projects/netperf/sys/dev/puc/pucdata.c#6 integrate .. //depot/projects/netperf/sys/dev/re/if_re.c#2 integrate .. //depot/projects/netperf/sys/dev/sio/sio.c#6 integrate .. //depot/projects/netperf/sys/dev/usb/if_aue.c#3 integrate .. //depot/projects/netperf/sys/dev/usb/umass.c#5 integrate .. //depot/projects/netperf/sys/dev/usb/usbdevs#3 integrate .. //depot/projects/netperf/sys/dev/usb/usbdevs.h#3 integrate .. //depot/projects/netperf/sys/dev/usb/usbdevs_data.h#3 integrate .. //depot/projects/netperf/sys/dev/wi/if_wi_pccard.c#7 integrate .. //depot/projects/netperf/sys/fs/nwfs/nwfs_io.c#3 integrate .. //depot/projects/netperf/sys/fs/smbfs/smbfs_io.c#3 integrate .. //depot/projects/netperf/sys/i386/conf/GENERIC#4 integrate .. //depot/projects/netperf/sys/i386/conf/NOTES#4 integrate .. //depot/projects/netperf/sys/i386/i386/pmap.c#9 integrate .. //depot/projects/netperf/sys/i386/i386/trap.c#3 integrate .. //depot/projects/netperf/sys/i386/include/pci_cfgreg.h#2 integrate .. //depot/projects/netperf/sys/ia64/ia64/genassym.c#4 integrate .. //depot/projects/netperf/sys/ia64/ia64/machdep.c#9 integrate .. //depot/projects/netperf/sys/ia64/ia64/pmap.c#6 integrate .. //depot/projects/netperf/sys/ia64/ia64/trap.c#5 integrate .. //depot/projects/netperf/sys/ia64/ia64/uma_machdep.c#1 branch .. //depot/projects/netperf/sys/ia64/include/cpu.h#7 integrate .. //depot/projects/netperf/sys/kern/kern_malloc.c#2 integrate .. //depot/projects/netperf/sys/kern/kern_proc.c#3 integrate .. //depot/projects/netperf/sys/kern/linker_if.m#2 integrate .. //depot/projects/netperf/sys/kern/sched_ule.c#5 integrate .. //depot/projects/netperf/sys/kern/vfs_bio.c#6 integrate .. //depot/projects/netperf/sys/kern/vfs_subr.c#3 integrate .. //depot/projects/netperf/sys/netinet/ip_fw2.c#9 integrate .. //depot/projects/netperf/sys/nfsclient/nfs_bio.c#2 integrate .. //depot/projects/netperf/sys/pc98/pc98/fd.c#3 integrate .. //depot/projects/netperf/sys/pci/if_rlreg.h#6 integrate .. //depot/projects/netperf/sys/pci/if_sk.c#3 integrate .. //depot/projects/netperf/sys/pci/if_skreg.h#2 integrate .. //depot/projects/netperf/sys/pci/yukonreg.h#1 branch .. //depot/projects/netperf/sys/powerpc/powermac/ata_macio.c#2 integrate .. //depot/projects/netperf/sys/powerpc/powerpc/pmap.c#4 integrate .. //depot/projects/netperf/sys/powerpc/psim/ata_iobus.c#2 integrate .. //depot/projects/netperf/sys/sparc64/sparc64/pmap.c#6 integrate .. //depot/projects/netperf/sys/sys/lock.h#3 integrate .. //depot/projects/netperf/sys/sys/mutex.h#2 integrate .. //depot/projects/netperf/sys/vm/uma.h#2 integrate .. //depot/projects/netperf/sys/vm/uma_core.c#7 integrate .. //depot/projects/netperf/sys/vm/uma_dbg.c#2 integrate .. //depot/projects/netperf/sys/vm/uma_int.h#4 integrate .. //depot/projects/netperf/sys/vm/vm_fault.c#3 integrate .. //depot/projects/netperf/sys/vm/vm_page.c#5 integrate .. //depot/projects/netperf/sys/vm/vm_pageout.c#6 integrate .. //depot/projects/netperf/sys/vm/vnode_pager.c#7 integrate Differences ... ==== //depot/projects/netperf/sys/alpha/conf/GENERIC#2 (text+ko) ==== @@ -18,7 +18,7 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.162 2003/07/21 19:15:25 ticso Exp $ +# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.163 2003/09/19 20:04:55 joerg Exp $ machine alpha cpu EV4 @@ -139,6 +139,11 @@ device ppi # Parallel port interface device #device vpo # Requires scbus and da +# If you've got a "dumb" serial or parallel PCI card that is +# supported by the puc(4) glue driver, uncomment the following +# line to enable it (connects to the sio and/or ppc drivers): +#device puc + # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') device txp # 3Com 3cR990 (``Typhoon'') ==== //depot/projects/netperf/sys/amd64/conf/GENERIC#4 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.395 2003/09/15 22:40:00 obrien Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.396 2003/09/19 20:04:55 joerg Exp $ machine amd64 cpu HAMMER @@ -158,6 +158,10 @@ device ppi # Parallel port interface device #device vpo # Requires scbus and da +# If you've got a "dumb" serial or parallel PCI card that is +# supported by the puc(4) glue driver, uncomment the following +# line to enable it (connects to the sio and/or ppc drivers): +#device puc # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') ==== //depot/projects/netperf/sys/cam/cam_periph.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.52 2003/09/10 18:23:43 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.53 2003/09/21 08:42:32 thomas Exp $"); #include #include @@ -975,7 +975,7 @@ sense_key = saved_ccb->csio.sense_data.flags; sense_key &= SSD_KEY; if (sense_key != SSD_KEY_NO_SENSE) { - saved_ccb->ccb_h.flags |= + saved_ccb->ccb_h.status |= CAM_AUTOSNS_VALID; xpt_print_path(saved_ccb->ccb_h.path); printf("Recovered Sense\n"); ==== //depot/projects/netperf/sys/cam/scsi/scsi_all.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.42 2003/06/10 18:14:04 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.43 2003/09/21 08:45:36 thomas Exp $"); #include @@ -2408,6 +2408,7 @@ scsi_cmd = (struct scsi_request_sense *)&csio->cdb_io.cdb_bytes; bzero(scsi_cmd, sizeof(*scsi_cmd)); scsi_cmd->opcode = REQUEST_SENSE; + scsi_cmd->length = dxfer_len; } void ==== //depot/projects/netperf/sys/compat/linprocfs/linprocfs.c#5 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.72 2003/09/09 19:22:55 des Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.73 2003/09/22 15:52:32 des Exp $"); #include #include @@ -413,18 +413,31 @@ static int linprocfs_dostat(PFS_FILL_ARGS) { + int name[2], olen, plen; + int i, ncpu; + + name[0] = CTL_HW; + name[1] = HW_NCPU; + if (kernel_sysctl(td, name, 2, &ncpu, &olen, NULL, 0, &plen) != 0) + ncpu = 0; + sbuf_printf(sb, "cpu %ld %ld %ld %ld\n", + T2J(cp_time[CP_USER]), + T2J(cp_time[CP_NICE]), + T2J(cp_time[CP_SYS] /*+ cp_time[CP_INTR]*/), + T2J(cp_time[CP_IDLE])); + for (i = 0; i < ncpu; ++i) + sbuf_printf(sb, "cpu%d %ld %ld %ld %ld\n", i, + T2J(cp_time[CP_USER]) / ncpu, + T2J(cp_time[CP_NICE]) / ncpu, + T2J(cp_time[CP_SYS]) / ncpu, + T2J(cp_time[CP_IDLE]) / ncpu); sbuf_printf(sb, - "cpu %ld %ld %ld %ld\n" "disk 0 0 0 0\n" "page %u %u\n" "swap %u %u\n" "intr %u\n" "ctxt %u\n" "btime %lld\n", - T2J(cp_time[CP_USER]), - T2J(cp_time[CP_NICE]), - T2J(cp_time[CP_SYS] /*+ cp_time[CP_INTR]*/), - T2J(cp_time[CP_IDLE]), cnt.v_vnodepgsin, cnt.v_vnodepgsout, cnt.v_swappgsin, ==== //depot/projects/netperf/sys/conf/NOTES#9 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1175 2003/09/11 23:06:41 marcel Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1176 2003/09/19 19:04:30 jhb Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -167,6 +167,13 @@ # CPU. options ADAPTIVE_MUTEXES +# MUTEX_NOINLINE forces mutex operations to call functions to perform each +# operation rather than inlining the simple cases. This can be used to +# shrink the size of the kernel text segment. Note that this behavior is +# already implied by the INVARIANT_SUPPORT, INVARIANTS, MUTEX_PROFILING, +# and WITNESS options. +options MUTEX_NOINLINE + # SMP Debugging Options: # # MUTEX_DEBUG enables various extra assertions in the mutex code. ==== //depot/projects/netperf/sys/conf/files.ia64#6 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.ia64,v 1.58 2003/09/06 23:23:25 marcel Exp $ +# $FreeBSD: src/sys/conf/files.ia64,v 1.59 2003/09/20 19:27:48 marcel Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -118,6 +118,7 @@ ia64/ia64/sys_machdep.c standard ia64/ia64/syscall.S standard ia64/ia64/trap.c standard +ia64/ia64/uma_machdep.c standard ia64/ia64/unaligned.c standard ia64/ia64/unwind.c standard ia64/ia64/vm_machdep.c standard ==== //depot/projects/netperf/sys/contrib/dev/acpica/rsaddr.c#2 (text+ko) ==== @@ -168,6 +168,10 @@ Buffer += 1; ACPI_MOVE_16_TO_16 (&Temp16, Buffer); + /* Check for the minimum length. */ + if (Temp16 < 13) + return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE); + *BytesConsumed = Temp16 + 3; OutputStruct->Id = ACPI_RSTYPE_ADDRESS16; @@ -275,11 +279,13 @@ /* * This will leave us pointing to the Resource Source Index * If it is present, then save it off and calculate the - * pointer to where the null terminated string goes: - * Each Interrupt takes 32-bits + the 5 bytes of the - * stream that are default. + * pointer to where the null terminated string goes. + * + * Note that some buggy resources have a length that indicates the + * Index byte is present even though it isn't (since there is no + * following Resource String.) We add one to catch these. */ - if (*BytesConsumed > 16) + if (*BytesConsumed > 16 + 1) { /* Dereference the Index */ @@ -555,6 +561,10 @@ */ Buffer += 1; ACPI_MOVE_16_TO_16 (&Temp16, Buffer); + + /* Check for the minimum length. */ + if (Temp16 < 23) + return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE); *BytesConsumed = Temp16 + 3; OutputStruct->Id = ACPI_RSTYPE_ADDRESS32; @@ -667,9 +677,13 @@ /* * This will leave us pointing to the Resource Source Index * If it is present, then save it off and calculate the - * pointer to where the null terminated string goes: + * pointer to where the null terminated string goes. + * + * Note that some buggy resources have a length that indicates the + * Index byte is present even though it isn't (since there is no + * following Resource String.) We add one to catch these. */ - if (*BytesConsumed > 26) + if (*BytesConsumed > 26 + 1) { /* Dereference the Index */ @@ -944,7 +958,11 @@ Buffer += 1; ACPI_MOVE_16_TO_16 (&Temp16, Buffer); + /* Check for the minimum length. */ + if (Temp16 < 43) + return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE); *BytesConsumed = Temp16 + 3; + OutputStruct->Id = ACPI_RSTYPE_ADDRESS64; /* @@ -1056,11 +1074,13 @@ /* * This will leave us pointing to the Resource Source Index * If it is present, then save it off and calculate the - * pointer to where the null terminated string goes: - * Each Interrupt takes 32-bits + the 5 bytes of the - * stream that are default. + * pointer to where the null terminated string goes. + * + * Note that some buggy resources have a length that indicates the + * Index byte is present even though it isn't (since there is no + * following Resource String.) We add one to catch these. */ - if (*BytesConsumed > 46) + if (*BytesConsumed > 46 + 1) { /* Dereference the Index */ ==== //depot/projects/netperf/sys/contrib/dev/acpica/rsirq.c#2 (text+ko) ==== @@ -408,7 +408,11 @@ Buffer += 1; ACPI_MOVE_16_TO_16 (&Temp16, Buffer); + /* Check for the minimum length. */ + if (Temp16 < 6) + return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE); *BytesConsumed = Temp16 + 3; + OutputStruct->Id = ACPI_RSTYPE_EXT_IRQ; /* @@ -446,6 +450,12 @@ Buffer += 1; Temp8 = *Buffer; + /* Minimum number of IRQs is one. */ + if (Temp8 < 1) { + *BytesConsumed = 0; + return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE); + } + OutputStruct->Data.ExtendedIrq.NumberOfInterrupts = Temp8; /* @@ -480,7 +490,8 @@ * stream that are default. */ if (*BytesConsumed > - ((ACPI_SIZE) OutputStruct->Data.ExtendedIrq.NumberOfInterrupts * 4) + 5) + ((ACPI_SIZE) OutputStruct->Data.ExtendedIrq.NumberOfInterrupts * 4) + + 5 + 1) { /* Dereference the Index */ ==== //depot/projects/netperf/sys/crypto/rijndael/rijndael-api-fst.c#3 (text+ko) ==== @@ -16,7 +16,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/crypto/rijndael/rijndael-api-fst.c,v 1.6 2003/09/17 08:51:43 ume Exp $"); +__FBSDID("$FreeBSD: src/sys/crypto/rijndael/rijndael-api-fst.c,v 1.7 2003/09/18 17:26:56 ume Exp $"); #include #include @@ -246,7 +246,7 @@ outBuffer += 16; } padLen = 16 - (inputOctets - 16*numBlocks); - if (padLen > 0 && padLen <= 16) + if (padLen <= 0 || padLen > 16) return BAD_CIPHER_STATE; for (i = 0; i < 16 - padLen; i++) { block[i] = input[i] ^ iv[i]; ==== //depot/projects/netperf/sys/dev/acpica/acpi.c#7 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.100 2003/09/15 06:29:31 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.102 2003/09/18 05:12:45 njl Exp $ */ #include "opt_acpi.h" @@ -1027,7 +1027,6 @@ acpi_enable_fixed_events(struct acpi_softc *sc) { static int first_time = 1; -#define MSGFORMAT "%s button is handled as a fixed feature programming model.\n" ACPI_ASSERTLOCK; @@ -1039,7 +1038,7 @@ acpi_eventhandler_power_button_for_sleep, sc); if (first_time) - device_printf(sc->acpi_dev, MSGFORMAT, "power"); + device_printf(sc->acpi_dev, "Power Button (fixed)\n"); } if (AcpiGbl_FADT != NULL && AcpiGbl_FADT->SleepButton == 0) { AcpiEnableEvent(ACPI_EVENT_SLEEP_BUTTON, 0); @@ -1048,7 +1047,7 @@ acpi_eventhandler_sleep_button_for_sleep, sc); if (first_time) - device_printf(sc->acpi_dev, MSGFORMAT, "sleep"); + device_printf(sc->acpi_dev, "Sleep Button (fixed)\n"); } first_time = 0; ==== //depot/projects/netperf/sys/dev/acpica/acpi_button.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi_button.c,v 1.13 2003/08/11 15:34:43 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi_button.c,v 1.16 2003/09/22 04:50:29 njl Exp $ */ #include "opt_acpi.h" @@ -43,9 +43,10 @@ struct acpi_button_softc { device_t button_dev; ACPI_HANDLE button_handle; - boolean_t button_type; /* Power or Sleep Button */ + boolean_t button_type; #define ACPI_POWER_BUTTON 0 #define ACPI_SLEEP_BUTTON 1 + boolean_t fixed; }; #define ACPI_NOTIFY_BUTTON_PRESSED_FOR_SLEEP 0x80 @@ -57,6 +58,8 @@ static int acpi_button_resume(device_t dev); static void acpi_button_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context); +static ACPI_STATUS + acpi_button_fixed_handler(void *context); static void acpi_button_notify_pressed_for_sleep(void *arg); static void acpi_button_notify_pressed_for_wakeup(void *arg); @@ -85,23 +88,31 @@ acpi_button_probe(device_t dev) { struct acpi_button_softc *sc; + int ret = ENXIO; sc = device_get_softc(dev); - if (acpi_get_type(dev) == ACPI_TYPE_DEVICE) { - if (!acpi_disabled("button")) { - if (acpi_MatchHid(dev, "PNP0C0C")) { - device_set_desc(dev, "Power Button"); - sc->button_type = ACPI_POWER_BUTTON; - return (0); - } - if (acpi_MatchHid(dev, "PNP0C0E")) { - device_set_desc(dev, "Sleep Button"); - sc->button_type = ACPI_SLEEP_BUTTON; - return (0); - } + if (acpi_get_type(dev) == ACPI_TYPE_DEVICE && !acpi_disabled("button")) { + if (acpi_MatchHid(dev, "PNP0C0C")) { + device_set_desc(dev, "Power Button"); + sc->button_type = ACPI_POWER_BUTTON; + ret = 0; + } else if (acpi_MatchHid(dev, "ACPI_FPB")) { + device_set_desc(dev, "Power Button (fixed)"); + sc->button_type = ACPI_POWER_BUTTON; + sc->fixed = 1; + ret = 0; + } else if (acpi_MatchHid(dev, "PNP0C0E")) { + device_set_desc(dev, "Sleep Button"); + sc->button_type = ACPI_SLEEP_BUTTON; + ret = 0; + } else if (acpi_MatchHid(dev, "ACPI_FSB")) { + device_set_desc(dev, "Sleep Button (fixed)"); + sc->button_type = ACPI_SLEEP_BUTTON; + sc->fixed = 1; + ret = 0; } } - return (ENXIO); + return (ret); } static int @@ -109,6 +120,7 @@ { struct acpi_button_softc *sc; ACPI_STATUS status; + int event; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -116,10 +128,17 @@ sc->button_dev = dev; sc->button_handle = acpi_get_handle(dev); - status = AcpiInstallNotifyHandler(sc->button_handle, ACPI_DEVICE_NOTIFY, - acpi_button_notify_handler, sc); + if (sc->fixed) { + event = (sc->button_type == ACPI_SLEEP_BUTTON) ? + ACPI_EVENT_SLEEP_BUTTON : ACPI_EVENT_POWER_BUTTON; + status = AcpiInstallFixedEventHandler(event, + acpi_button_fixed_handler, sc); + } else { + status = AcpiInstallNotifyHandler(sc->button_handle, + ACPI_DEVICE_NOTIFY, acpi_button_notify_handler, sc); + } if (ACPI_FAILURE(status)) { - device_printf(sc->button_dev, "couldn't install Notify handler - %s\n", + device_printf(sc->button_dev, "couldn't install notify handler - %s\n", AcpiFormatException(status)); return_VALUE (ENXIO); } @@ -217,3 +236,18 @@ break; /* unknown notification value */ } } + +static ACPI_STATUS +acpi_button_fixed_handler(void *context) +{ + struct acpi_button_softc *sc = (struct acpi_button_softc *)context; + + ACPI_FUNCTION_TRACE_PTR((char *)(uintptr_t)__func__, context); + + if (context == NULL) + return_ACPI_STATUS (AE_BAD_PARAMETER); + + acpi_button_notify_handler(sc->button_handle, + ACPI_NOTIFY_BUTTON_PRESSED_FOR_SLEEP, sc); + return_ACPI_STATUS (AE_OK); +} ==== //depot/projects/netperf/sys/dev/ata/ata-lowlevel.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.13 2003/09/16 15:21:37 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.16 2003/09/20 08:38:33 sos Exp $"); #include "opt_ata.h" #include @@ -329,6 +329,7 @@ /* if data write command, output the data */ if (request->flags & ATA_R_WRITE) { + /* if we get an error here we are done with the HW */ if (ata_wait(request->device, (ATA_S_READY | ATA_S_DSC | ATA_S_DRQ)) < 0) { @@ -336,11 +337,10 @@ request->status = ATA_IDX_INB(ch, ATA_STATUS); break; } - else { - /* output data and return waiting for new interrupt */ - ata_pio_write(request, request->transfersize); - return; - } + + /* output data and return waiting for new interrupt */ + ata_pio_write(request, request->transfersize); + return; } /* if data read command, return & wait for interrupt */ @@ -543,7 +543,7 @@ "stat=0x%02x err=0x%02x lsb=0x%02x msb=0x%02x\n", stat0, err, lsb, msb); if (!(stat0 & ATA_S_BUSY)) { - if (err == ATA_E_ILI) { + if ((err & 0x7f) == ATA_E_ILI) { if (lsb == ATAPI_MAGIC_LSB && msb == ATAPI_MAGIC_MSB) { ch->devices |= ATA_ATAPI_MASTER; } @@ -551,11 +551,8 @@ ch->devices |= ATA_ATA_MASTER; } } - else if (err == lsb && err == msb) { - ATA_IDX_OUTB(ch, ATA_ERROR, 0xff); - DELAY(10); - if (stat0 == ATA_IDX_INB(ch, ATA_STATUS)) - stat0 |= ATA_S_BUSY; + else if ((stat0 & 0x4f) && err == lsb && err == msb) { + stat0 |= ATA_S_BUSY; } } } @@ -571,7 +568,7 @@ " stat=0x%02x err=0x%02x lsb=0x%02x msb=0x%02x\n", stat1, err, lsb, msb); if (!(stat1 & ATA_S_BUSY)) { - if (err == ATA_E_ILI) { + if ((err & 0x7f) == ATA_E_ILI) { if (lsb == ATAPI_MAGIC_LSB && msb == ATAPI_MAGIC_MSB) { ch->devices |= ATA_ATAPI_SLAVE; } @@ -579,11 +576,8 @@ ch->devices |= ATA_ATA_SLAVE; } } - else if (err == lsb && err == msb) { - ATA_IDX_OUTB(ch, ATA_ERROR, 0xff); - DELAY(10); - if (stat1 == ATA_IDX_INB(ch, ATA_STATUS)) - stat1 |= ATA_S_BUSY; + else if ((stat1 & 0x4f) && err == lsb && err == msb) { + stat1 |= ATA_S_BUSY; } } } ==== //depot/projects/netperf/sys/dev/ata/ata-queue.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.4 2003/08/28 08:22:53 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.6 2003/09/19 12:46:12 sos Exp $"); #include "opt_ata.h" #include @@ -47,7 +47,7 @@ /* prototypes */ static void ata_completed(void *, int); static void ata_timeout(struct ata_request *); -static char *ata_sensekey2str(u_int8_t); +static char *ata_skey2str(u_int8_t); /* local vars */ static MALLOC_DEFINE(M_ATA_REQ, "ATA request", "ATA request"); @@ -260,12 +260,12 @@ /* ATAPI errors */ case ATA_R_ATAPI: - /* is result already set return */ + /* skip if result already set */ if (request->result) break; - if (request->error & ATA_E_MASK) { - switch ((request->result & ATA_SK_MASK)) { + if (request->error) { + switch ((request->error & ATA_SK_MASK)) { case ATA_SK_RECOVERED_ERROR: ata_prtdev(request->device, "WARNING - %s recovered error\n", ata_cmd2str(request)); @@ -285,18 +285,20 @@ break; default: + if (!(request->flags & ATA_R_QUIET)) + ata_prtdev(request->device, + "FAILURE - %s status=%b sensekey=%s error=%b\n", + ata_cmd2str(request), + request->status, "\20\10BUSY\7READY\6DMA" + "\5DSC\4DRQ\3CORRECTABLE\2INDEX\1ERROR", + ata_skey2str((request->error & ATA_SK_MASK)>>4), + (request->error & ATA_E_MASK), + "\20\4MEDIA_CHANGE_REQUEST\3ABORTED" + "\2NO_MEDIA\1ILLEGAL_LENGTH"); request->result = EIO; } - if (request->result && !(request->flags & ATA_R_QUIET)) - ata_prtdev(request->device, - "FAILURE - %s status=%b sensekey=%s error=%b\n", - ata_cmd2str(request), - request->status, "\20\10BUSY\7READY\6DMA" - "\5DSC\4DRQ\3CORRECTABLE\2INDEX\1ERROR", - ata_sensekey2str((request->error & ATA_SK_MASK)>>4), - (request->error & ATA_E_MASK), - "\20\4MEDIA_CHANGE_REQUEST\3ABORTED" - "\2NO_MEDIA\1ILLEGAL_LENGTH"); + if (request->error & ATA_E_MASK) + request->result = EIO; } break; } @@ -369,6 +371,7 @@ case 0x0a: return ("WRITE"); case 0x10: return ("WEOF"); case 0x11: return ("SPACE"); + case 0x12: return ("INQUIRY"); case 0x15: return ("MODE_SELECT"); case 0x19: return ("ERASE"); case 0x1a: return ("MODE_SENSE"); @@ -449,7 +452,7 @@ } static char * -ata_sensekey2str(u_int8_t skey) +ata_skey2str(u_int8_t skey) { switch (skey) { case 0x00: return ("NO SENSE"); ==== //depot/projects/netperf/sys/dev/ata/atapi-cam.c#6 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cam.c,v 1.22 2003/09/11 17:34:47 thomas Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cam.c,v 1.25 2003/09/21 16:49:53 thomas Exp $"); #include #include @@ -59,7 +59,7 @@ int lun; union ccb *ccb; int flags; -#define DOING_AUTOSENSE 1 +#define QUEUED 0x0001 char *dxfer_alloc; TAILQ_ENTRY(atapi_hcb) chain; @@ -346,8 +346,8 @@ struct ccb_trans_settings *cts = &ccb->cts; /* - * XXX The default CAM transport code is very scsi specific and - * doesn't understand IDE speeds very well. Be silent about it + * XXX The default CAM transport code is very SCSI-specific and + * doesn't understand IDE speeds very well. Be silent about it * here and let it default to what is set in XPT_PATH_INQ */ CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_SUBTRACE, ("GET_TRAN_SETTINGS\n")); @@ -369,6 +369,7 @@ struct ccb_scsiio *csio = &ccb->csio; int tid = ccb_h->target_id, lid = ccb_h->target_lun; struct ata_device *dev = get_ata_device(softc, tid); + int request_flags = ATA_R_QUIET | ATA_R_ATAPI; CAM_DEBUG(ccb_h->path, CAM_DEBUG_SUBTRACE, ("XPT_SCSI_IO\n")); @@ -397,9 +398,24 @@ /* scatter-gather not supported */ xpt_print_path(ccb_h->path); printf("ATAPI/CAM does not support scatter-gather yet!\n"); - break; + goto action_invalid; } + switch (ccb_h->flags & CAM_DIR_MASK) { + case CAM_DIR_IN: + request_flags |= ATA_R_READ; + break; + case CAM_DIR_OUT: + request_flags |= ATA_R_WRITE; + break; + case CAM_DIR_NONE: + request_flags |= ATA_R_CONTROL; + break; + default: + ata_prtdev(dev, "unknown IO operation\n"); + goto action_invalid; + } + if ((hcb = allocate_hcb(softc, unit, bus, ccb)) == NULL) { printf("cannot allocate ATAPI/CAM hcb\n"); goto action_oom; @@ -409,8 +425,6 @@ goto action_oom; } - ccb_h->status |= CAM_SIM_QUEUED; - bcopy((ccb_h->flags & CAM_CDB_POINTER) ? csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes, request->u.atapi.ccb, csio->cdb_len); @@ -467,8 +481,8 @@ if ((ccb_h->flags & CAM_DIR_MASK) == CAM_DIR_IN && (len & 1)) { /* ATA always transfers an even number of bytes */ - if (!(buf = hcb->dxfer_alloc = malloc(++len, M_ATACAM, - M_NOWAIT | M_ZERO))) { + if ((buf = hcb->dxfer_alloc + = malloc(++len, M_ATACAM, M_NOWAIT | M_ZERO)) == NULL) { printf("cannot allocate ATAPI/CAM buffer\n"); goto action_oom; } @@ -481,23 +495,11 @@ request->timeout = ccb_h->timeout; request->retries = 2; request->callback = &atapi_cb; - request->flags = (ATA_R_QUIET | ATA_R_ATAPI); - switch (ccb_h->flags & CAM_DIR_MASK) { - case CAM_DIR_IN: - request->flags |= ATA_R_READ; - break; - case CAM_DIR_OUT: - request->flags |= ATA_R_WRITE; - break; - case CAM_DIR_NONE: - request->flags |= ATA_R_CONTROL; - break; - default: - ata_prtdev(dev, "unknown IO operation\n"); - goto action_invalid; - } + request->flags = request_flags; TAILQ_INSERT_TAIL(&softc->pending_hcbs, hcb, chain); + hcb->flags |= QUEUED; + ccb_h->status |= CAM_SIM_QUEUED; ata_queue_request(request); return; @@ -509,6 +511,8 @@ goto action_invalid; } + /* NOTREACHED */ + action_oom: if (request != NULL) ata_free_request(request); @@ -523,9 +527,9 @@ return; action_invalid: - ccb_h->status = CAM_REQ_INVALID; - xpt_done(ccb); - return; + ccb_h->status = CAM_REQ_INVALID; + xpt_done(ccb); + return; } static void @@ -540,23 +544,31 @@ { struct atapi_hcb *hcb = (struct atapi_hcb *) request->driver; struct ccb_scsiio *csio = &hcb->ccb->csio; - int hcb_status = request->result; + u_int32_t rc; mtx_lock(&Giant); - #ifdef CAMDEBUG - if (CAM_DEBUGGED(csio->ccb_h.path, CAM_DEBUG_CDB)) { - printf("atapi_cb: hcb@%p status = %02x: (sk = %02x%s%s%s)\n", - hcb, hcb_status, hcb_status >> 4, - (hcb_status & 4) ? " ABRT" : "", - (hcb_status & 2) ? " EOM" : "", - (hcb_status & 1) ? " ILI" : ""); - printf(" %s: cmd %02x\n", - request->device->name, request->u.atapi.ccb[0]); - } +# define err (request->error) + if (CAM_DEBUGGED(csio->ccb_h.path, CAM_DEBUG_CDB)) { + printf("atapi_cb: hcb@%p error = %02x: (sk = %02x%s%s%s)\n", + hcb, err, err >> 4, + (err & 4) ? " ABRT" : "", + (err & 2) ? " EOM" : "", + (err & 1) ? " ILI" : ""); + printf("dev %s: cmd %02x status %02x result %02x\n", + request->device->name, request->u.atapi.ccb[0], + request->status, request->result); + } #endif - if (hcb_status != 0) { + + if (request->result != 0) { + rc = CAM_SCSI_STATUS_ERROR; csio->scsi_status = SCSI_STATUS_CHECK_COND; +#if 0 + /* + * XXX Temporarily disable autosense, as this seems to cause + * a missed ATA interrupt. + */ if ((csio->ccb_h.flags & CAM_DIS_AUTOSENSE) == 0) { int8_t ccb[16] = { ATAPI_REQUEST_SENSE, 0, 0, 0, sizeof(struct atapi_sense), 0, 0, 0, 0, 0, 0, @@ -568,17 +580,17 @@ csio->ccb_h.status |= CAM_AUTOSNS_VALID; } } - free_hcb_and_ccb_done(hcb, CAM_SCSI_STATUS_ERROR); - } - else { +#endif + } else { + rc = CAM_REQ_CMP; + csio->scsi_status = SCSI_STATUS_OK; if (((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) && hcb->dxfer_alloc != NULL) { bcopy(hcb->dxfer_alloc, csio->data_ptr, csio->dxfer_len); } - csio->scsi_status = SCSI_STATUS_OK; - free_hcb_and_ccb_done(hcb, CAM_REQ_CMP); } + free_hcb_and_ccb_done(hcb, rc); mtx_unlock(&Giant); } @@ -690,7 +702,8 @@ static void free_hcb(struct atapi_hcb *hcb) { - TAILQ_REMOVE(&hcb->softc->pending_hcbs, hcb, chain); + if ((hcb->flags & QUEUED) != 0) + TAILQ_REMOVE(&hcb->softc->pending_hcbs, hcb, chain); if (hcb->dxfer_alloc != NULL) free(hcb->dxfer_alloc, M_ATACAM); free(hcb, M_ATACAM); ==== //depot/projects/netperf/sys/dev/ata/atapi-cd.c#6 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.145 2003/09/16 14:41:44 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.146 2003/09/21 18:57:12 phk Exp $"); #include "opt_ata.h" #include @@ -243,7 +243,7 @@ free(entry, M_ACD); } destroy_dev(cdp->dev); -#ifdef GONE_IN_5 +#ifdef BURN_BRIDGES EVENTHANDLER_DEREGISTER(dev_clone, cdp->clone_evh); #endif devstat_remove_entry(cdp->stats); @@ -276,7 +276,7 @@ return cdp; } -#ifdef GONE_IN_5 +#ifdef BURN_BRIDGES static void acd_clone(void *arg, char *name, int namelen, dev_t *dev) { @@ -288,8 +288,13 @@ return; if (!dev_stdclone(name, &p, "acd", &unit)) return; +#ifdef GONE_IN_5 + if (*p != '\0') + return; +#else if (*p != '\0' && strcmp(p, "a") != 0 && strcmp(p, "c") != 0) return; +#endif if (unit == cdp->lun) *dev = makedev(acd_cdevsw.d_maj, cdp->lun); } @@ -305,7 +310,7 @@ dev->si_drv1 = cdp; cdp->dev = dev; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Sep 22 10:24:43 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8FEEA16A4C2; Mon, 22 Sep 2003 10:24:43 -0700 (PDT) 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 6A12116A4B3 for ; Mon, 22 Sep 2003 10:24:43 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D65CE43FE1 for ; Mon, 22 Sep 2003 10:24:41 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8MHOfXJ017561 for ; Mon, 22 Sep 2003 10:24:41 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8MHOfWZ017558 for perforce@freebsd.org; Mon, 22 Sep 2003 10:24:41 -0700 (PDT) (envelope-from areisse@nailabs.com) Date: Mon, 22 Sep 2003 10:24:41 -0700 (PDT) Message-Id: <200309221724.h8MHOfWZ017558@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 38427 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2003 17:24:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=38427 Change 38427 by areisse@areisse_tislabs on 2003/09/22 10:24:16 add autogenerated file to avoid fixing build system Affected files ... .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/avc/flask.h#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Mon Sep 22 11:42:19 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CDC1616A4C0; Mon, 22 Sep 2003 11:42:18 -0700 (PDT) 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 9DAE616A4B3 for ; Mon, 22 Sep 2003 11:42:18 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 214CA43FB1 for ; Mon, 22 Sep 2003 11:42:18 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8MIgHXJ024263 for ; Mon, 22 Sep 2003 11:42:17 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8MIgH3d024260 for perforce@freebsd.org; Mon, 22 Sep 2003 11:42:17 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Mon, 22 Sep 2003 11:42:17 -0700 (PDT) Message-Id: <200309221842.h8MIgH3d024260@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38430 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2003 18:42:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=38430 Change 38430 by sam@sam_ebb on 2003/09/22 11:41:47 remove bogus work done in the wrapper function: unlike netbsd we pass in an ip header with fields in host byte order; also don't need to do delayed checksum on output, it's already been done in ip_output Pointed out by: "Max Laier" Affected files ... .. //depot/projects/netperf/sys/contrib/ipfilter/netinet/ip_fil.c#3 edit Differences ... ==== //depot/projects/netperf/sys/contrib/ipfilter/netinet/ip_fil.c#3 (text+ko) ==== @@ -314,41 +314,7 @@ fr_check_wrapper(void *arg, struct mbuf **mp, struct ifnet *ifp, int dir) { struct ip *ip = mtod(*mp, struct ip *); - int rv, hlen = ip->ip_hl << 2; - - /* - * If the packet is out-bound, we can't delay checksums - * here. For in-bound, the checksum has already been - * validated. - */ - if (dir == PFIL_OUT) { - if ((*mp)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { - in_delayed_cksum(*mp); - (*mp)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; - } - } - - /* - * We get the packet with all fields in network byte - * order. We expect ip_len and ip_off to be in host - * order. We frob them, call the filter, then frob - * them back. - * - * Note, we don't need to update the checksum, because - * it has already been verified. - */ - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); - - rv = fr_check(ip, hlen, ifp, (dir == PFIL_OUT), mp); - - if (rv == 0 && *mp != NULL) { - ip = mtod(*mp, struct ip *); - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); - } - - return (rv); + return fr_check(ip, ip->ip_hl << 2, ifp, (dir == PFIL_OUT), mp); } # ifdef USE_INET6 From owner-p4-projects@FreeBSD.ORG Mon Sep 22 11:44:22 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F094B16A4D6; Mon, 22 Sep 2003 11:44:21 -0700 (PDT) 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 CC10516A4B3 for ; Mon, 22 Sep 2003 11:44:21 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4781D43F75 for ; Mon, 22 Sep 2003 11:44:21 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8MIiLXJ024361 for ; Mon, 22 Sep 2003 11:44:21 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8MIiKM3024358 for perforce@freebsd.org; Mon, 22 Sep 2003 11:44:20 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Mon, 22 Sep 2003 11:44:20 -0700 (PDT) Message-Id: <200309221844.h8MIiKM3024358@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38431 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2003 18:44:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=38431 Change 38431 by sam@sam_ebb on 2003/09/22 11:43:44 Nuke pfil_head from protosw entries; no longer needed. Pointed out by: "Max Laier" Affected files ... .. //depot/projects/netperf/sys/netinet/ip_output.c#6 edit .. //depot/projects/netperf/sys/netinet6/ip6protosw.h#2 edit .. //depot/projects/netperf/sys/sys/protosw.h#2 edit Differences ... ==== //depot/projects/netperf/sys/netinet/ip_output.c#6 (text+ko) ==== @@ -65,6 +65,10 @@ #include #include +#ifdef PFIL_HOOKS +#include +#endif + #include static MALLOC_DEFINE(M_IPMOPTS, "ip_moptions", "internet multicast options"); ==== //depot/projects/netperf/sys/netinet6/ip6protosw.h#2 (text+ko) ==== @@ -72,11 +72,6 @@ #define _NETINET6_IP6PROTOSW_H_ /* - * For pfil_head structure. - */ -#include - -/* * Protocol switch table for IPv6. * All other definitions should refer to sys/protosw.h */ @@ -153,7 +148,6 @@ void (*pr_drain) /* flush any excess space possible */ __P((void)); struct pr_usrreqs *pr_usrreqs; /* supersedes pr_usrreq() */ - struct pfil_head pr_pfh; }; #ifdef _KERNEL ==== //depot/projects/netperf/sys/sys/protosw.h#2 (text+ko) ==== @@ -37,11 +37,6 @@ #ifndef _SYS_PROTOSW_H_ #define _SYS_PROTOSW_H_ -/* - * For pfil_head structure. - */ -#include - /* Forward declare these structures referenced from prototypes below. */ struct mbuf; struct thread; @@ -107,7 +102,6 @@ pr_drain_t *pr_drain; /* flush any excess space possible */ struct pr_usrreqs *pr_usrreqs; /* supersedes pr_usrreq() */ - struct pfil_head pr_pfh; }; /*#endif*/ From owner-p4-projects@FreeBSD.ORG Mon Sep 22 16:18:04 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C2FE416A4C0; Mon, 22 Sep 2003 16:18:03 -0700 (PDT) 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 9DBEA16A4B3 for ; Mon, 22 Sep 2003 16:18:03 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DDEE543FF9 for ; Mon, 22 Sep 2003 16:18:02 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8MNI2XJ055377 for ; Mon, 22 Sep 2003 16:18:02 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8MNI2us055373 for perforce@freebsd.org; Mon, 22 Sep 2003 16:18:02 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Mon, 22 Sep 2003 16:18:02 -0700 (PDT) Message-Id: <200309222318.h8MNI2us055373@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38448 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2003 23:18:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=38448 Change 38448 by sam@sam_ebb on 2003/09/22 16:17:51 cope with net/pfil.h not being included by sys/protosw.h, etc. Affected files ... .. //depot/projects/netperf/sys/contrib/ipfilter/netinet/ip_fil.c#4 edit Differences ... ==== //depot/projects/netperf/sys/contrib/ipfilter/netinet/ip_fil.c#4 (text+ko) ==== @@ -71,6 +71,9 @@ # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include "opt_ipfilter.h" # endif +# if defined(_KERNEL) && (__FreeBSD_version >= 501108) && !defined(KLD_MODULE) +# include "opt_pfil_hooks.h" +# endif #endif #ifdef __sgi #include @@ -592,7 +595,7 @@ pfil_remove_hook((void *)fr_check, PFIL_IN|PFIL_OUT); # endif # ifdef USE_INET6 -# if __NetBSD_Version__ >= 105110000 +# if (__NetBSD_Version__ >= 105110000) || (__FreeBSD_version >= 501108) if (ph_inet6 != NULL) error = pfil_remove_hook((void *)fr_check_wrapper6, NULL, PFIL_IN|PFIL_OUT, ph_inet6); From owner-p4-projects@FreeBSD.ORG Mon Sep 22 16:19:05 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 90F3516A4C0; Mon, 22 Sep 2003 16:19:05 -0700 (PDT) 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 6CC9A16A4B3 for ; Mon, 22 Sep 2003 16:19:05 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E310F43FD7 for ; Mon, 22 Sep 2003 16:19:04 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8MNJ4XJ055409 for ; Mon, 22 Sep 2003 16:19:04 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8MNJ4ko055406 for perforce@freebsd.org; Mon, 22 Sep 2003 16:19:04 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Mon, 22 Sep 2003 16:19:04 -0700 (PDT) Message-Id: <200309222319.h8MNJ4ko055406@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38449 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2003 23:19:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=38449 Change 38449 by sam@sam_ebb on 2003/09/22 16:18:27 strip out Giant stuff; think this through more carefully Affected files ... .. //depot/projects/netperf/sys/net/pfil.c#3 edit .. //depot/projects/netperf/sys/net/pfil.h#3 edit .. //depot/projects/netperf/sys/netinet/ip_input.c#6 edit Differences ... ==== //depot/projects/netperf/sys/net/pfil.c#3 (text+ko) ==== @@ -117,17 +117,11 @@ { struct packet_filter_hook *pfh; struct mbuf *m = *mp; - int rv = 0, lockgiant; + int rv = 0; if (ph->ph_busy_count == -1 || ph->ph_want_write) return (0); - lockgiant = dir & PFIL_GIANT; - if (lockgiant) { - mtx_lock(&Giant); - dir &= ~PFIL_GIANT; - } - PFIL_RLOCK(ph); for (pfh = pfil_hook_get(dir, ph); pfh != NULL; pfh = TAILQ_NEXT(pfh, pfil_link)) { @@ -138,9 +132,6 @@ } } PFIL_RUNLOCK(ph); - - if (lockgiant) - mtx_unlock(&Giant); *mp = m; return (rv); ==== //depot/projects/netperf/sys/net/pfil.h#3 (text+ko) ==== @@ -55,8 +55,6 @@ #define PFIL_IN 0x00000001 #define PFIL_OUT 0x00000002 #define PFIL_WAITOK 0x00000004 -/* XXX temporary until Giant gets removed */ -#define PFIL_GIANT 0x00000008 /* lock Giant around calls */ #define PFIL_ALL (PFIL_IN|PFIL_OUT) typedef TAILQ_HEAD(pfil_list, packet_filter_hook) pfil_list_t; ==== //depot/projects/netperf/sys/netinet/ip_input.c#6 (text+ko) ==== @@ -472,7 +472,7 @@ * Run through list of hooks for input packets. */ if (pfil_run_hooks(&inet_pfil_hook, &m, m->m_pkthdr.rcvif, - PFIL_IN | PFIL_GIANT) != 0) + PFIL_IN) != 0) return; if (m == NULL) /* consumed by filter */ return; From owner-p4-projects@FreeBSD.ORG Mon Sep 22 18:19:46 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1DFB916A4C0; Mon, 22 Sep 2003 18:19:46 -0700 (PDT) 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 BFFB416A4B3 for ; Mon, 22 Sep 2003 18:19:45 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD57043FAF for ; Mon, 22 Sep 2003 18:19:43 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8N1JhXJ072362 for ; Mon, 22 Sep 2003 18:19:43 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8N1JaYd072358 for perforce@freebsd.org; Mon, 22 Sep 2003 18:19:36 -0700 (PDT) (envelope-from peter@freebsd.org) Date: Mon, 22 Sep 2003 18:19:36 -0700 (PDT) Message-Id: <200309230119.h8N1JaYd072358@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 Subject: PERFORCE change 38457 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2003 01:19:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=38457 Change 38457 by peter@peter_daintree on 2003/09/22 18:19:32 IFC @38456 Affected files ... .. //depot/projects/hammer/Makefile.inc1#28 integrate .. //depot/projects/hammer/UPDATING#16 integrate .. //depot/projects/hammer/bin/df/df.c#8 integrate .. //depot/projects/hammer/bin/sh/mkbuiltins#3 integrate .. //depot/projects/hammer/contrib/amd/doc/version.texi#2 integrate .. //depot/projects/hammer/contrib/gcc/config/freebsd-spec.h#7 integrate .. //depot/projects/hammer/contrib/groff/tmac/doc-common#8 integrate .. //depot/projects/hammer/contrib/groff/tmac/doc-syms#3 integrate .. //depot/projects/hammer/contrib/groff/tmac/doc.tmac#7 integrate .. //depot/projects/hammer/contrib/groff/tmac/groff_mdoc.man#6 integrate .. //depot/projects/hammer/contrib/isc-dhcp/client/scripts/freebsd#4 integrate .. //depot/projects/hammer/contrib/sendmail/FREEBSD-upgrade#5 integrate .. //depot/projects/hammer/contrib/sendmail/LICENSE#2 integrate .. //depot/projects/hammer/contrib/sendmail/RELEASE_NOTES#5 integrate .. //depot/projects/hammer/contrib/sendmail/cf/README#5 integrate .. //depot/projects/hammer/contrib/sendmail/cf/cf/submit.cf#5 integrate .. //depot/projects/hammer/contrib/sendmail/cf/cf/submit.mc#3 integrate .. //depot/projects/hammer/contrib/sendmail/cf/m4/cfhead.m4#4 integrate .. //depot/projects/hammer/contrib/sendmail/cf/m4/proto.m4#5 integrate .. //depot/projects/hammer/contrib/sendmail/cf/m4/version.m4#5 integrate .. //depot/projects/hammer/contrib/sendmail/contrib/domainmap.m4#2 integrate .. //depot/projects/hammer/contrib/sendmail/contrib/doublebounce.pl#3 integrate .. //depot/projects/hammer/contrib/sendmail/contrib/expn.pl#3 integrate .. //depot/projects/hammer/contrib/sendmail/doc/op/op.me#5 integrate .. //depot/projects/hammer/contrib/sendmail/include/sm/conf.h#5 integrate .. //depot/projects/hammer/contrib/sendmail/include/sm/errstring.h#2 integrate .. //depot/projects/hammer/contrib/sendmail/include/sm/io.h#2 integrate .. //depot/projects/hammer/contrib/sendmail/include/sm/os/sm_os_aix.h#2 integrate .. //depot/projects/hammer/contrib/sendmail/include/sm/shm.h#2 integrate .. //depot/projects/hammer/contrib/sendmail/libmilter/README#3 integrate .. //depot/projects/hammer/contrib/sendmail/libmilter/docs/sample.html#3 integrate .. //depot/projects/hammer/contrib/sendmail/libmilter/docs/smfi_chgheader.html#3 integrate .. //depot/projects/hammer/contrib/sendmail/libmilter/docs/smfi_register.html#3 integrate .. //depot/projects/hammer/contrib/sendmail/libmilter/docs/smfi_setconn.html#3 integrate .. //depot/projects/hammer/contrib/sendmail/libmilter/docs/smfi_setreply.html#4 integrate .. //depot/projects/hammer/contrib/sendmail/libmilter/engine.c#4 integrate .. //depot/projects/hammer/contrib/sendmail/libmilter/libmilter.h#3 integrate .. //depot/projects/hammer/contrib/sendmail/libmilter/listener.c#4 integrate .. //depot/projects/hammer/contrib/sendmail/libmilter/signal.c#3 integrate .. //depot/projects/hammer/contrib/sendmail/libsm/clock.c#4 integrate .. //depot/projects/hammer/contrib/sendmail/libsm/errstring.c#2 integrate .. //depot/projects/hammer/contrib/sendmail/libsm/flags.c#2 integrate .. //depot/projects/hammer/contrib/sendmail/libsm/ldap.c#3 integrate .. //depot/projects/hammer/contrib/sendmail/libsm/shm.c#2 integrate .. //depot/projects/hammer/contrib/sendmail/libsm/smstdio.c#2 integrate .. //depot/projects/hammer/contrib/sendmail/libsm/stdio.c#3 integrate .. //depot/projects/hammer/contrib/sendmail/libsm/vasprintf.c#2 integrate .. //depot/projects/hammer/contrib/sendmail/libsmdb/smdb2.c#3 integrate .. //depot/projects/hammer/contrib/sendmail/mail.local/mail.local.c#5 integrate .. //depot/projects/hammer/contrib/sendmail/smrsh/README#2 integrate .. //depot/projects/hammer/contrib/sendmail/smrsh/smrsh.8#3 integrate .. //depot/projects/hammer/contrib/sendmail/src/README#4 integrate .. //depot/projects/hammer/contrib/sendmail/src/TRACEFLAGS#4 integrate .. //depot/projects/hammer/contrib/sendmail/src/alias.c#2 integrate .. //depot/projects/hammer/contrib/sendmail/src/bf.c#2 integrate .. //depot/projects/hammer/contrib/sendmail/src/collect.c#5 integrate .. //depot/projects/hammer/contrib/sendmail/src/conf.c#6 integrate .. //depot/projects/hammer/contrib/sendmail/src/control.c#3 integrate .. //depot/projects/hammer/contrib/sendmail/src/daemon.c#3 integrate .. //depot/projects/hammer/contrib/sendmail/src/deliver.c#5 integrate .. //depot/projects/hammer/contrib/sendmail/src/domain.c#4 integrate .. //depot/projects/hammer/contrib/sendmail/src/headers.c#6 integrate .. //depot/projects/hammer/contrib/sendmail/src/main.c#5 integrate .. //depot/projects/hammer/contrib/sendmail/src/map.c#4 integrate .. //depot/projects/hammer/contrib/sendmail/src/mci.c#4 integrate .. //depot/projects/hammer/contrib/sendmail/src/milter.c#5 integrate .. //depot/projects/hammer/contrib/sendmail/src/mime.c#2 integrate .. //depot/projects/hammer/contrib/sendmail/src/parseaddr.c#5 integrate .. //depot/projects/hammer/contrib/sendmail/src/queue.c#5 integrate .. //depot/projects/hammer/contrib/sendmail/src/readcf.c#5 integrate .. //depot/projects/hammer/contrib/sendmail/src/recipient.c#3 integrate .. //depot/projects/hammer/contrib/sendmail/src/sendmail.8#3 integrate .. //depot/projects/hammer/contrib/sendmail/src/sendmail.h#5 integrate .. //depot/projects/hammer/contrib/sendmail/src/sfsasl.c#4 integrate .. //depot/projects/hammer/contrib/sendmail/src/srvrsmtp.c#5 integrate .. //depot/projects/hammer/contrib/sendmail/src/stab.c#2 integrate .. //depot/projects/hammer/contrib/sendmail/src/udb.c#3 integrate .. //depot/projects/hammer/contrib/sendmail/src/usersmtp.c#5 integrate .. //depot/projects/hammer/contrib/sendmail/src/util.c#3 integrate .. //depot/projects/hammer/contrib/sendmail/src/version.c#5 integrate .. //depot/projects/hammer/crypto/openssh/FREEBSD-tricks#3 integrate .. //depot/projects/hammer/crypto/openssh/buffer.c#2 integrate .. //depot/projects/hammer/crypto/openssh/channels.c#5 integrate .. //depot/projects/hammer/crypto/openssh/deattack.c#2 integrate .. //depot/projects/hammer/crypto/openssh/misc.c#3 integrate .. //depot/projects/hammer/crypto/openssh/session.c#6 integrate .. //depot/projects/hammer/crypto/openssh/ssh-agent.c#5 integrate .. //depot/projects/hammer/crypto/openssh/version.h#5 integrate .. //depot/projects/hammer/etc/Makefile#16 integrate .. //depot/projects/hammer/etc/defaults/pccard.conf#11 integrate .. //depot/projects/hammer/etc/defaults/rc.conf#15 integrate .. //depot/projects/hammer/etc/pccard_ether#7 integrate .. //depot/projects/hammer/etc/rc.d/dhclient#6 integrate .. //depot/projects/hammer/etc/services#6 integrate .. //depot/projects/hammer/games/fortune/datfiles/fortunes-o.real#3 integrate .. //depot/projects/hammer/gnu/usr.bin/groff/tmac/fr.ISO8859-1#4 integrate .. //depot/projects/hammer/gnu/usr.bin/groff/tmac/mdoc.local#9 integrate .. //depot/projects/hammer/gnu/usr.bin/groff/tmac/ru.KOI8-R#3 integrate .. //depot/projects/hammer/gnu/usr.bin/man/manpath/manpath.config#4 integrate .. //depot/projects/hammer/lib/libc/gen/devname.3#4 integrate .. //depot/projects/hammer/lib/libc/net/getaddrinfo.3#4 integrate .. //depot/projects/hammer/lib/libc/net/getnameinfo.3#4 integrate .. //depot/projects/hammer/lib/libc/net/inet_net_pton.c#2 integrate .. //depot/projects/hammer/lib/libc/posix1e/mac_get.3#4 integrate .. //depot/projects/hammer/lib/libc/rpc/rpc_clnt_create.3#4 integrate .. //depot/projects/hammer/lib/libc/stdlib/exit.3#5 integrate .. //depot/projects/hammer/lib/libc/stdlib/grantpt.3#3 integrate .. //depot/projects/hammer/lib/libc/sys/ntp_gettime.2#3 integrate .. //depot/projects/hammer/lib/libc_r/man/pthread_condattr.3#3 integrate .. //depot/projects/hammer/lib/libpam/modules/pam_ssh/pam_ssh.c#3 integrate .. //depot/projects/hammer/lib/libpthread/arch/alpha/include/pthread_md.h#2 integrate .. //depot/projects/hammer/lib/libpthread/arch/amd64/amd64/context.S#3 integrate .. //depot/projects/hammer/lib/libpthread/arch/amd64/include/pthread_md.h#3 integrate .. //depot/projects/hammer/lib/libpthread/arch/i386/i386/thr_getcontext.S#3 integrate .. //depot/projects/hammer/lib/libpthread/arch/i386/include/pthread_md.h#5 integrate .. //depot/projects/hammer/lib/libpthread/arch/ia64/ia64/context.S#4 integrate .. //depot/projects/hammer/lib/libpthread/arch/ia64/include/pthread_md.h#4 integrate .. //depot/projects/hammer/lib/libpthread/man/pthread_condattr.3#3 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_attr_setguardsize.c#3 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_attr_setinheritsched.c#2 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_attr_setscope.c#3 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_cond.c#15 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_create.c#11 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_exit.c#7 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_info.c#5 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_kern.c#20 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_private.h#16 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_sig.c#18 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_sigmask.c#8 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_stack.c#4 integrate .. //depot/projects/hammer/libexec/ftpd/ftpd.8#8 integrate .. //depot/projects/hammer/libexec/ftpd/ftpd.c#8 integrate .. //depot/projects/hammer/libexec/rtld-elf/Makefile#7 integrate .. //depot/projects/hammer/libexec/rtld-elf/libmap.c#9 integrate .. //depot/projects/hammer/libexec/rtld-elf/libmap.h#2 integrate .. //depot/projects/hammer/libexec/rtld-elf/rtld.c#12 integrate .. //depot/projects/hammer/release/Makefile#36 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/errata/article.sgml#8 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#28 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#39 integrate .. //depot/projects/hammer/release/i386/drivers.conf#13 integrate .. //depot/projects/hammer/release/scripts/doFS.sh#12 integrate .. //depot/projects/hammer/release/scripts/print-cdrom-packages.sh#10 integrate .. //depot/projects/hammer/sbin/devfs/devfs.8#6 integrate .. //depot/projects/hammer/sbin/dump/optr.c#5 integrate .. //depot/projects/hammer/sbin/ifconfig/ifieee80211.c#3 integrate .. //depot/projects/hammer/sbin/mdconfig/mdconfig.8#7 integrate .. //depot/projects/hammer/sbin/newfs/newfs.8#6 integrate .. //depot/projects/hammer/sbin/raidctl/raidctl.8#4 integrate .. //depot/projects/hammer/share/examples/cvsup/cvs-supfile#3 integrate .. //depot/projects/hammer/share/examples/cvsup/doc-supfile#2 integrate .. //depot/projects/hammer/share/examples/cvsup/gnats-supfile#2 integrate .. //depot/projects/hammer/share/examples/cvsup/ports-supfile#3 integrate .. //depot/projects/hammer/share/examples/cvsup/refuse#4 integrate .. //depot/projects/hammer/share/examples/cvsup/refuse.README#4 integrate .. //depot/projects/hammer/share/examples/cvsup/stable-supfile#2 integrate .. //depot/projects/hammer/share/examples/cvsup/standard-supfile#2 integrate .. //depot/projects/hammer/share/examples/cvsup/www-supfile#2 integrate .. //depot/projects/hammer/share/examples/etc/README.examples#3 integrate .. //depot/projects/hammer/share/examples/ses/getencstat/getencstat.0#2 integrate .. //depot/projects/hammer/share/examples/ses/sesd/sesd.0#2 integrate .. //depot/projects/hammer/share/man/man4/ath.4#7 integrate .. //depot/projects/hammer/share/man/man4/ath_hal.4#5 integrate .. //depot/projects/hammer/share/man/man4/bge.4#6 integrate .. //depot/projects/hammer/share/man/man4/bridge.4#2 integrate .. //depot/projects/hammer/share/man/man4/mac_mls.4#5 integrate .. //depot/projects/hammer/share/man/man4/natm.4#5 integrate .. //depot/projects/hammer/share/man/man4/ng_bt3c.4#5 integrate .. //depot/projects/hammer/share/man/man4/puc.4#3 integrate .. //depot/projects/hammer/share/man/man4/re.4#2 integrate .. //depot/projects/hammer/share/man/man4/rl.4#6 integrate .. //depot/projects/hammer/share/man/man4/sk.4#2 integrate .. //depot/projects/hammer/share/man/man4/uart.4#2 integrate .. //depot/projects/hammer/share/man/man4/ulpt.4#2 integrate .. //depot/projects/hammer/share/man/man4/usb.4#6 integrate .. //depot/projects/hammer/share/man/man4/wi.4#15 integrate .. //depot/projects/hammer/share/man/man5/device.hints.5#5 integrate .. //depot/projects/hammer/share/man/man5/libmap.conf.5#3 integrate .. //depot/projects/hammer/share/man/man5/make.conf.5#13 integrate .. //depot/projects/hammer/share/man/man5/rc.conf.5#16 integrate .. //depot/projects/hammer/share/man/man7/hier.7#7 integrate .. //depot/projects/hammer/share/man/man7/ports.7#5 integrate .. //depot/projects/hammer/share/man/man7/release.7#13 integrate .. //depot/projects/hammer/share/man/man7/tuning.7#5 integrate .. //depot/projects/hammer/share/man/man9/VOP_GETEXTATTR.9#7 integrate .. //depot/projects/hammer/share/man/man9/VOP_SETEXTATTR.9#5 integrate .. //depot/projects/hammer/share/man/man9/mtx_pool.9#3 integrate .. //depot/projects/hammer/share/man/man9/physio.9#2 integrate .. //depot/projects/hammer/share/man/man9/signal.9#5 integrate .. //depot/projects/hammer/share/man/man9/sx.9#3 integrate .. //depot/projects/hammer/sys/alpha/alpha/pmap.c#17 integrate .. //depot/projects/hammer/sys/alpha/conf/GENERIC#12 integrate .. //depot/projects/hammer/sys/amd64/acpica/acpi_machdep.c#7 integrate .. //depot/projects/hammer/sys/amd64/amd64/busdma_machdep.c#8 integrate .. //depot/projects/hammer/sys/amd64/amd64/exception.S#18 integrate .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#52 integrate .. //depot/projects/hammer/sys/amd64/amd64/pmap.c#35 integrate .. //depot/projects/hammer/sys/amd64/amd64/trap.c#28 integrate .. //depot/projects/hammer/sys/amd64/amd64/tsc.c#8 integrate .. //depot/projects/hammer/sys/amd64/conf/GENERIC#23 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_syscall.c#6 integrate .. //depot/projects/hammer/sys/amd64/include/acpica_machdep.h#7 integrate .. //depot/projects/hammer/sys/amd64/include/clock.h#7 integrate .. //depot/projects/hammer/sys/amd64/include/cpu.h#7 integrate .. //depot/projects/hammer/sys/amd64/include/endian.h#4 integrate .. //depot/projects/hammer/sys/amd64/include/legacyvar.h#5 integrate .. //depot/projects/hammer/sys/amd64/include/md_var.h#14 integrate .. //depot/projects/hammer/sys/amd64/include/pci_cfgreg.h#6 integrate .. //depot/projects/hammer/sys/amd64/include/segments.h#10 integrate .. //depot/projects/hammer/sys/amd64/include/specialreg.h#7 integrate .. //depot/projects/hammer/sys/amd64/include/vmparam.h#13 integrate .. //depot/projects/hammer/sys/amd64/isa/clock.c#9 integrate .. //depot/projects/hammer/sys/amd64/pci/pci_bus.c#8 integrate .. //depot/projects/hammer/sys/boot/forth/beastie.4th#4 integrate .. //depot/projects/hammer/sys/boot/i386/libi386/comconsole.c#3 integrate .. //depot/projects/hammer/sys/boot/pc98/libpc98/comconsole.c#3 integrate .. //depot/projects/hammer/sys/cam/cam_periph.c#11 integrate .. //depot/projects/hammer/sys/cam/scsi/scsi_all.c#8 integrate .. //depot/projects/hammer/sys/cam/scsi/scsi_cd.c#12 integrate .. //depot/projects/hammer/sys/cam/scsi/scsi_sa.c#9 integrate .. //depot/projects/hammer/sys/coda/coda_vfsops.c#5 integrate .. //depot/projects/hammer/sys/compat/linprocfs/linprocfs.c#13 integrate .. //depot/projects/hammer/sys/conf/NOTES#25 integrate .. //depot/projects/hammer/sys/conf/files#27 integrate .. //depot/projects/hammer/sys/conf/files.ia64#12 integrate .. //depot/projects/hammer/sys/conf/options#23 integrate .. //depot/projects/hammer/sys/contrib/dev/acpica/rsaddr.c#4 integrate .. //depot/projects/hammer/sys/contrib/dev/acpica/rsirq.c#4 integrate .. //depot/projects/hammer/sys/crypto/rijndael/rijndael-api-fst.c#4 integrate .. //depot/projects/hammer/sys/dev/aac/aac.c#14 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi.c#12 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_acad.c#5 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_button.c#3 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_cmbat.c#6 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_ec.c#11 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_pci.c#5 integrate .. //depot/projects/hammer/sys/dev/acpica/acpiio.h#3 integrate .. //depot/projects/hammer/sys/dev/ata/ata-lowlevel.c#2 integrate .. //depot/projects/hammer/sys/dev/ata/ata-queue.c#2 integrate .. //depot/projects/hammer/sys/dev/ata/atapi-cam.c#10 integrate .. //depot/projects/hammer/sys/dev/ata/atapi-cd.c#8 integrate .. //depot/projects/hammer/sys/dev/ata/atapi-cd.h#5 integrate .. //depot/projects/hammer/sys/dev/ath/if_ath.c#6 integrate .. //depot/projects/hammer/sys/dev/ath/if_athvar.h#5 integrate .. //depot/projects/hammer/sys/dev/bge/if_bge.c#19 integrate .. //depot/projects/hammer/sys/dev/ed/if_ed_pccard.c#9 integrate .. //depot/projects/hammer/sys/dev/em/if_em.c#15 integrate .. //depot/projects/hammer/sys/dev/em/if_em.h#14 integrate .. //depot/projects/hammer/sys/dev/ic/ns16550.h#3 integrate .. //depot/projects/hammer/sys/dev/ips/ips.h#4 integrate .. //depot/projects/hammer/sys/dev/ips/ips_disk.c#5 integrate .. //depot/projects/hammer/sys/dev/ips/ips_pci.c#6 integrate .. //depot/projects/hammer/sys/dev/isp/isp.c#9 integrate .. //depot/projects/hammer/sys/dev/isp/isp_freebsd.c#8 integrate .. //depot/projects/hammer/sys/dev/isp/isp_freebsd.h#4 integrate .. //depot/projects/hammer/sys/dev/isp/isp_inline.h#3 integrate .. //depot/projects/hammer/sys/dev/isp/isp_target.c#5 integrate .. //depot/projects/hammer/sys/dev/isp/isp_target.h#2 integrate .. //depot/projects/hammer/sys/dev/isp/isp_tpublic.h#3 integrate .. //depot/projects/hammer/sys/dev/isp/ispvar.h#5 integrate .. //depot/projects/hammer/sys/dev/mii/e1000phy.c#5 integrate .. //depot/projects/hammer/sys/dev/mii/e1000phyreg.h#2 integrate .. //depot/projects/hammer/sys/dev/mii/miidevs#7 integrate .. //depot/projects/hammer/sys/dev/pccard/pccarddevs#15 integrate .. //depot/projects/hammer/sys/dev/pccard/pccarddevs.h#15 integrate .. //depot/projects/hammer/sys/dev/pccard/pccardvar.h#7 integrate .. //depot/projects/hammer/sys/dev/pci/pci.c#14 integrate .. //depot/projects/hammer/sys/dev/pci/pci_private.h#7 integrate .. //depot/projects/hammer/sys/dev/pci/pcireg.h#4 integrate .. //depot/projects/hammer/sys/dev/pci/pcivar.h#6 integrate .. //depot/projects/hammer/sys/dev/puc/pucdata.c#9 integrate .. //depot/projects/hammer/sys/dev/re/if_re.c#2 integrate .. //depot/projects/hammer/sys/dev/sio/sio.c#20 integrate .. //depot/projects/hammer/sys/dev/sio/sioreg.h#4 integrate .. //depot/projects/hammer/sys/dev/sound/isa/mpu.c#2 integrate .. //depot/projects/hammer/sys/dev/sound/isa/uartsio.c#3 integrate .. //depot/projects/hammer/sys/dev/sound/pci/ich.c#9 integrate .. //depot/projects/hammer/sys/dev/uart/uart_bus.h#2 integrate .. //depot/projects/hammer/sys/dev/uart/uart_bus_pccard.c#1 branch .. //depot/projects/hammer/sys/dev/uart/uart_core.c#2 integrate .. //depot/projects/hammer/sys/dev/uart/uart_cpu_sparc64.c#2 integrate .. //depot/projects/hammer/sys/dev/uart/uart_dev_i8251.c#2 integrate .. //depot/projects/hammer/sys/dev/uart/uart_dev_ns8250.c#2 integrate .. //depot/projects/hammer/sys/dev/uart/uart_dev_sab82532.c#2 integrate .. //depot/projects/hammer/sys/dev/uart/uart_dev_z8530.c#2 integrate .. //depot/projects/hammer/sys/dev/uart/uart_if.m#2 integrate .. //depot/projects/hammer/sys/dev/uart/uart_tty.c#2 integrate .. //depot/projects/hammer/sys/dev/usb/if_aue.c#9 integrate .. //depot/projects/hammer/sys/dev/usb/umass.c#12 integrate .. //depot/projects/hammer/sys/dev/usb/usbdevs#18 integrate .. //depot/projects/hammer/sys/dev/usb/usbdevs.h#17 integrate .. //depot/projects/hammer/sys/dev/usb/usbdevs_data.h#17 integrate .. //depot/projects/hammer/sys/dev/wi/if_wi_pccard.c#16 integrate .. //depot/projects/hammer/sys/fs/nwfs/nwfs_io.c#5 integrate .. //depot/projects/hammer/sys/fs/smbfs/smbfs_io.c#7 integrate .. //depot/projects/hammer/sys/i386/acpica/acpi_machdep.c#10 integrate .. //depot/projects/hammer/sys/i386/conf/GENERIC#15 integrate .. //depot/projects/hammer/sys/i386/conf/NOTES#20 integrate .. //depot/projects/hammer/sys/i386/i386/pmap.c#17 integrate .. //depot/projects/hammer/sys/i386/i386/trap.c#18 integrate .. //depot/projects/hammer/sys/i386/include/endian.h#5 integrate .. //depot/projects/hammer/sys/i386/include/pci_cfgreg.h#4 integrate .. //depot/projects/hammer/sys/ia64/ia64/genassym.c#6 integrate .. //depot/projects/hammer/sys/ia64/ia64/machdep.c#24 integrate .. //depot/projects/hammer/sys/ia64/ia64/pmap.c#19 integrate .. //depot/projects/hammer/sys/ia64/ia64/trap.c#17 integrate .. //depot/projects/hammer/sys/ia64/ia64/uma_machdep.c#1 branch .. //depot/projects/hammer/sys/ia64/include/cpu.h#10 integrate .. //depot/projects/hammer/sys/isa/fd.c#11 integrate .. //depot/projects/hammer/sys/kern/kern_malloc.c#12 integrate .. //depot/projects/hammer/sys/kern/kern_proc.c#21 integrate .. //depot/projects/hammer/sys/kern/kern_prot.c#8 integrate .. //depot/projects/hammer/sys/kern/kern_xxx.c#4 integrate .. //depot/projects/hammer/sys/kern/linker_if.m#2 integrate .. //depot/projects/hammer/sys/kern/sched_ule.c#11 integrate .. //depot/projects/hammer/sys/kern/sys_pipe.c#11 integrate .. //depot/projects/hammer/sys/kern/vfs_bio.c#18 integrate .. //depot/projects/hammer/sys/kern/vfs_subr.c#23 integrate .. //depot/projects/hammer/sys/modules/uart/Makefile#2 integrate .. //depot/projects/hammer/sys/net/bridge.c#6 integrate .. //depot/projects/hammer/sys/net/if_iso88025subr.c#6 integrate .. //depot/projects/hammer/sys/net/radix.c#7 integrate .. //depot/projects/hammer/sys/net/raw_usrreq.c#4 integrate .. //depot/projects/hammer/sys/net80211/ieee80211.c#6 integrate .. //depot/projects/hammer/sys/net80211/ieee80211.h#3 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_input.c#6 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_ioctl.c#5 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_node.c#6 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_output.c#5 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_var.h#5 integrate .. //depot/projects/hammer/sys/netinet/ip_dummynet.c#12 integrate .. //depot/projects/hammer/sys/netinet/ip_fw2.c#14 integrate .. //depot/projects/hammer/sys/netinet/raw_ip.c#10 integrate .. //depot/projects/hammer/sys/netinet/tcp_subr.c#9 integrate .. //depot/projects/hammer/sys/netinet6/in6_ifattach.c#3 integrate .. //depot/projects/hammer/sys/netinet6/in6_pcb.c#6 integrate .. //depot/projects/hammer/sys/netinet6/nd6.c#5 integrate .. //depot/projects/hammer/sys/netinet6/nd6_nbr.c#4 integrate .. //depot/projects/hammer/sys/netipx/ipx_input.c#4 integrate .. //depot/projects/hammer/sys/netipx/spx_usrreq.c#4 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_bio.c#8 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_node.c#7 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_subs.c#5 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_vnops.c#12 integrate .. //depot/projects/hammer/sys/nfsclient/nfsnode.h#2 integrate .. //depot/projects/hammer/sys/pc98/pc98/fd.c#11 integrate .. //depot/projects/hammer/sys/pci/agp_intel.c#9 integrate .. //depot/projects/hammer/sys/pci/if_dc.c#19 integrate .. //depot/projects/hammer/sys/pci/if_rlreg.h#7 integrate .. //depot/projects/hammer/sys/pci/if_sk.c#10 integrate .. //depot/projects/hammer/sys/pci/if_skreg.h#2 integrate .. //depot/projects/hammer/sys/pci/if_xl.c#19 integrate .. //depot/projects/hammer/sys/pci/if_xlreg.h#7 integrate .. //depot/projects/hammer/sys/pci/yukonreg.h#1 branch .. //depot/projects/hammer/sys/posix4/ksched.c#7 integrate .. //depot/projects/hammer/sys/powerpc/powermac/ata_macio.c#4 integrate .. //depot/projects/hammer/sys/powerpc/powerpc/pmap.c#13 integrate .. //depot/projects/hammer/sys/powerpc/psim/ata_iobus.c#4 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/ofw_machdep.c#3 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/pmap.c#18 integrate .. //depot/projects/hammer/sys/sys/kobj.h#2 integrate .. //depot/projects/hammer/sys/sys/lock.h#5 integrate .. //depot/projects/hammer/sys/sys/mutex.h#7 integrate .. //depot/projects/hammer/sys/sys/param.h#18 integrate .. //depot/projects/hammer/sys/vm/pmap.h#13 integrate .. //depot/projects/hammer/sys/vm/uma.h#5 integrate .. //depot/projects/hammer/sys/vm/uma_core.c#16 integrate .. //depot/projects/hammer/sys/vm/uma_dbg.c#5 integrate .. //depot/projects/hammer/sys/vm/uma_int.h#7 integrate .. //depot/projects/hammer/sys/vm/vm_fault.c#11 integrate .. //depot/projects/hammer/sys/vm/vm_kern.c#8 integrate .. //depot/projects/hammer/sys/vm/vm_object.c#27 integrate .. //depot/projects/hammer/sys/vm/vm_page.c#14 integrate .. //depot/projects/hammer/sys/vm/vm_pageout.c#21 integrate .. //depot/projects/hammer/sys/vm/vnode_pager.c#14 integrate .. //depot/projects/hammer/tools/tools/ath/athstats.c#2 integrate .. //depot/projects/hammer/tools/tools/mtxstat/mtxstat.pl#2 integrate .. //depot/projects/hammer/tools/tools/tinderbox/tbmaster.pl#13 integrate .. //depot/projects/hammer/tools/tools/tinderbox/tinderbox.pl#5 integrate .. //depot/projects/hammer/usr.bin/colldef/colldef.1#6 integrate .. //depot/projects/hammer/usr.bin/doscmd/doscmd.1#3 integrate .. //depot/projects/hammer/usr.bin/make/dir.c#5 integrate .. //depot/projects/hammer/usr.bin/make/dir.h#2 integrate .. //depot/projects/hammer/usr.bin/make/main.c#10 integrate .. //depot/projects/hammer/usr.bin/make/make.1#6 integrate .. //depot/projects/hammer/usr.bin/make/var.c#8 integrate .. //depot/projects/hammer/usr.bin/tftp/tftp.1#3 integrate .. //depot/projects/hammer/usr.bin/window/main.c#2 integrate .. //depot/projects/hammer/usr.sbin/Makefile#28 integrate .. //depot/projects/hammer/usr.sbin/acpi/acpiconf/acpiconf.8#5 integrate .. //depot/projects/hammer/usr.sbin/acpi/acpiconf/acpiconf.c#4 integrate .. //depot/projects/hammer/usr.sbin/acpi/acpidump/acpi.c#5 integrate .. //depot/projects/hammer/usr.sbin/boot0cfg/boot0cfg.8#3 integrate .. //depot/projects/hammer/usr.sbin/i4b/isdnd/isdnd.rc.5#4 integrate .. //depot/projects/hammer/usr.sbin/i4b/isdndebug/isdndebug.8#2 integrate .. //depot/projects/hammer/usr.sbin/mrouted/mrouted.8#3 integrate .. //depot/projects/hammer/usr.sbin/mtree/mtree.8#3 integrate .. //depot/projects/hammer/usr.sbin/newsyslog/Makefile#3 integrate .. //depot/projects/hammer/usr.sbin/newsyslog/extern.h#1 branch .. //depot/projects/hammer/usr.sbin/newsyslog/newsyslog.c#10 integrate .. //depot/projects/hammer/usr.sbin/newsyslog/ptimes.c#1 branch .. //depot/projects/hammer/usr.sbin/rtadvd/if.c#3 integrate .. //depot/projects/hammer/usr.sbin/rtadvd/rtadvd.conf.5#4 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/config.c#7 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/dmenu.c#2 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/menus.c#13 integrate .. //depot/projects/hammer/usr.sbin/vidcontrol/vidcontrol.c#3 integrate .. //depot/projects/hammer/usr.sbin/wicontrol/wicontrol.8#7 integrate Differences ... ==== //depot/projects/hammer/Makefile.inc1#28 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.390 2003/09/07 14:15:40 ru Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.392 2003/09/16 12:53:18 ru Exp $ # # Make command line options: # -DNO_KERBEROS Do not build Heimdal (Kerberos 5) @@ -51,6 +51,17 @@ SUBDIR+= lib .endif +# When upgrading to a dynamically linked root, install the runtime +# linker early into its new location before make(1) has a chance +# to run the dynamically linked /bin/sh. +.if defined(WITH_DYNAMICROOT) && !defined(NOPIC) && \ + (!defined(TARGET_ARCH) || ${TARGET_ARCH} == ${MACHINE_ARCH}) && \ + !defined(DISTDIR) && \ + (!defined(DESTDIR) || empty(DESTDIR) || ${DESTDIR} == "/") && \ + !exists(/libexec/ld-elf.so.1) +SUBDIR+= libexec/rtld-elf +.endif + .if exists(${.CURDIR}/bin) SUBDIR+= bin .endif @@ -814,8 +825,6 @@ # gnu/lib/csu, gnu/lib/libgcc and lib/csu must be built before all # shared libraries for ELF. # -# lib/libc (libc_pic.a) must be built before lib/libpthread. -# _startup_libs= gnu/lib/csu gnu/lib/libgcc .if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf) _startup_libs+= lib/csu/${MACHINE_ARCH}-elf @@ -824,6 +833,7 @@ .endif _prebuild_libs= + _generic_libs= gnu/lib .if exists(${.CURDIR}/kerberos5) && exists(${.CURDIR}/crypto) && \ @@ -835,9 +845,6 @@ _generic_libs+= kerberos5/lib .endif -.if !defined(NOLIBPTHREAD) -_prebuild_libs+= lib/libc -.endif _prebuild_libs+= lib/libcom_err lib/libcrypt lib/libexpat \ lib/libkvm lib/libmd \ lib/libncurses lib/libopie lib/libpam lib/libradius \ ==== //depot/projects/hammer/UPDATING#16 (text+ko) ==== @@ -17,6 +17,12 @@ developers choose to disable these features on build machines to maximize performance. +20030915: + A change to /etc/defaults/rc.conf now causes inetd to be started + with `-C 60' if it is not overridden in /etc/rc.conf. This + causes inetd to stop accepting connections from an IP address + that exceeds the rate of 60 connections per minute. + 20030829: The following rc.d scripts have been removed and should be deleted from your installation: atm2.sh atm3.sh devdb @@ -1356,4 +1362,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.265 2003/08/29 13:25:08 mtm Exp $ +$FreeBSD: src/UPDATING,v 1.266 2003/09/15 17:20:05 nectar Exp $ ==== //depot/projects/hammer/bin/df/df.c#8 (text+ko) ==== @@ -48,7 +48,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/bin/df/df.c,v 1.50 2003/06/03 11:54:42 bde Exp $"); +__FBSDID("$FreeBSD: src/bin/df/df.c,v 1.51 2003/09/13 20:46:58 obrien Exp $"); #include #include @@ -122,10 +122,10 @@ static char *getmntpt(const char *); static size_t longwidth(long); static char *makenetvfslist(void); -static void prthuman(const struct statfs *, long); +static void prthuman(const struct statfs *, size_t); static void prthumanval(double); static void prtstat(struct statfs *, struct maxwidths *); -static long regetmntinfo(struct statfs **, long, const char **); +static size_t regetmntinfo(struct statfs **, long, const char **); static unit_t unit_adjust(double *); static void update_maxwidths(struct maxwidths *, const struct statfs *); static void usage(void); @@ -148,8 +148,8 @@ const char *fstype; char *mntpath, *mntpt; const char **vfslist; - long mntsize; - int ch, i, rv; + size_t i, mntsize; + int ch, rv; fstype = "ufs"; @@ -305,7 +305,7 @@ static char * getmntpt(const char *name) { - long mntsize, i; + size_t mntsize, i; struct statfs *mntbuf; mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); @@ -321,7 +321,7 @@ * file system types not in vfslist and possibly re-stating to get * current (not cached) info. Returns the new count of valid statfs bufs. */ -static long +static size_t regetmntinfo(struct statfs **mntbufp, long mntsize, const char **vfslist) { int i, j; @@ -371,7 +371,7 @@ } static void -prthuman(const struct statfs *sfsp, long used) +prthuman(const struct statfs *sfsp, size_t used) { prthumanval((double)sfsp->f_blocks * (double)sfsp->f_bsize); @@ -411,7 +411,7 @@ static long blocksize; static int headerlen, timesthrough = 0; static const char *header; - long used, availblks, inodes; + size_t used, availblks, inodes; if (++timesthrough == 1) { mwp->mntfrom = max(mwp->mntfrom, strlen("Filesystem")); @@ -456,8 +456,8 @@ if (iflag) { inodes = sfsp->f_files; used = inodes - sfsp->f_ffree; - (void)printf(" %*ld %*ld %4.0f%% ", - (u_int)mwp->iused, used, + (void)printf(" %*lu %*lu %4.0f%% ", + (u_int)mwp->iused, (u_long)used, (u_int)mwp->ifree, sfsp->f_ffree, inodes == 0 ? 100.0 : (double)used / (double)inodes * 100.0); } else ==== //depot/projects/hammer/bin/sh/mkbuiltins#3 (text+ko) ==== @@ -35,11 +35,11 @@ # SUCH DAMAGE. # # @(#)mkbuiltins 8.2 (Berkeley) 5/4/95 -# $FreeBSD: src/bin/sh/mkbuiltins,v 1.11 2002/10/18 10:33:32 tjr Exp $ +# $FreeBSD: src/bin/sh/mkbuiltins,v 1.12 2003/09/13 06:59:22 schweikh Exp $ temp=`/usr/bin/mktemp -t ka` havejobs=0 -if grep '^#define JOBS[ ]*1' shell.h > /dev/null +if grep '^#define[ ]*JOBS[ ]*1' shell.h > /dev/null then havejobs=1 fi havehist=1 ==== //depot/projects/hammer/contrib/amd/doc/version.texi#2 (text+ko) ==== @@ -1,3 +1,3 @@ -@set UPDATED 3 July 2001 -@set EDITION 6.0.7 -@set VERSION 6.0.7 +@set UPDATED 28 August 2003 +@set EDITION 6.0.9 +@set VERSION 6.0.9 ==== //depot/projects/hammer/contrib/gcc/config/freebsd-spec.h#7 (text+ko) ==== @@ -18,7 +18,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $FreeBSD: src/contrib/gcc/config/freebsd-spec.h,v 1.12 2003/09/03 15:44:34 deischen Exp $ */ +/* $FreeBSD: src/contrib/gcc/config/freebsd-spec.h,v 1.14 2003/09/21 07:59:16 deischen Exp $ */ /* Common FreeBSD configuration. All FreeBSD architectures should include this file, which will specify @@ -80,7 +80,7 @@ #ifdef FREEBSD_NATIVE #define FBSD_NATIVE_TARGET_OS_CPP_BUILTINS() \ do { \ - builtin_define_std ("__FreeBSD_cc_version=500006"); \ + builtin_define_std ("__FreeBSD_cc_version=510002"); \ } while (0) #else #define FBSD_NATIVE_TARGET_OS_CPP_BUILTINS() \ @@ -159,10 +159,9 @@ #include #if __FreeBSD_version >= 500016 #define FBSD_LIB_SPEC " \ - %{pthread: %eThe -pthread option is deprecated.} \ %{!shared: \ - %{!pg: -lc} \ - %{pg: -lc_p} \ + %{!pg: %{pthread:-lc_r} -lc} \ + %{pg: %{pthread:-lc_r_p} -lc_p} \ }" #else #define FBSD_LIB_SPEC " \ ==== //depot/projects/hammer/contrib/groff/tmac/doc-common#8 (text+ko) ==== @@ -339,12 +339,18 @@ .. . . +.\" NS doc-default-operating-system global string +.\" NS the exact (default) version of the operating system +.\" NS +.\" NS override this in `mdoc.local', if necessary +. +.ds doc-default-operating-system BSD +. +. .\" NS doc-operating-system global string .\" NS the exact version of the operating system -.\" NS -.\" NS override this in `mdoc.local', if necessary . -.ds doc-operating-system BSD +.ds doc-operating-system . . .\" NS Os user macro (not parsed, not callable) @@ -434,10 +440,9 @@ .ds doc-operating-system-FreeBSD-5.0 5.0 . .de Os -. if "\$1"" \ -. return -. -. ie "\$1"ATT" \{\ +. ie "\$1"" \ +. ds doc-operating-system "\*[doc-default-operating-system] +. el \{ .ie "\$1"ATT" \{\ . ds doc-operating-system AT&T . if \A\$2 \{\ . ie d doc-operating-system-ATT-\$2 \ @@ -472,7 +477,7 @@ . ds doc-operating-system \$1 . if !"\$2"" \ . as doc-operating-system " \$2 -. \}\}\}\} +. \}\}\}\}\} .. . . @@ -696,6 +701,12 @@ .nr doc-in-synopsis-section 0 . . +.\" NS doc-in-library-section global register (bool) +.\" NS whether we are in the `library' section +. +.nr doc-in-library-section 0 +. +. .\" NS doc-in-see-also-section global register (bool) .\" NS whether we are in the `see also' section . @@ -733,6 +744,7 @@ .\" NS doc-func-count .\" NS doc-in-authors-section .\" NS doc-in-files-section +.\" NS doc-in-library-section .\" NS doc-in-see-also-section .\" NS doc-in-synopsis-section .\" NS doc-indent-synopsis @@ -749,6 +761,7 @@ . .ds doc-section-name NAME .ds doc-section-synopsis SYNOPSIS +.ds doc-section-library LIBRARY .ds doc-section-description DESCRIPTION .ds doc-section-see-also SEE .ds doc-section-files FILES @@ -795,6 +808,7 @@ . \} . el \{\ . nr doc-in-synopsis-section 0 +. nr doc-in-library-section 0 . nr doc-in-see-also-section 0 . nr doc-in-files-section 0 . nr doc-in-authors-section 0 @@ -806,6 +820,9 @@ . nr doc-indent-synopsis 0 . nr doc-indent-synopsis-active 0 . \} +. el \{ .ie "\*[doc-str-dfp]"\*[doc-section-library]" \{\ +. nr doc-in-library-section 1 +. \} . el \{ .ie "\*[doc-str-dfp]"\*[doc-section-description]" \{\ . nr doc-is-func 0 . nr doc-func-count 0 @@ -821,7 +838,7 @@ . nr doc-in-files-section 1 . el .if "\*[doc-str-dfp]"\*[doc-section-authors]" \ . nr doc-in-authors-section 1 -. \}\}\} +. \}\}\}\} . . in 0 . nr doc-have-author 0 @@ -1058,6 +1075,7 @@ . tm doc-display-vertical == \n[doc-display-vertical] . tm doc-header-string == `\*[doc-header-string]' . tm doc-in-synopsis-section == \n[doc-in-synopsis-section] +. tm doc-in-library-section == \n[doc-in-library-section] . tm doc-in-see-also-section == \n[doc-in-see-also-section] . tm doc-in-files-section == \n[doc-in-files-section] . tm doc-in-authors-section == \n[doc-in-authors-section] ==== //depot/projects/hammer/contrib/groff/tmac/doc-syms#3 (text+ko) ==== @@ -716,7 +716,11 @@ . \" replacing argument with result . ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Lb] . +. if \n[doc-in-library-section] \ +. br . doc-print-recursive +. if \n[doc-in-library-section] \ +. br . \} . el \{\ . tm Usage: .Lb library_name ... (#\n[.c]) ==== //depot/projects/hammer/contrib/groff/tmac/doc.tmac#7 (text+ko) ==== @@ -3321,6 +3321,7 @@ . nr doc-curr-font-saved \n[doc-curr-font] . nr doc-curr-size-saved \n[doc-curr-size] . nr doc-in-synopsis-section-saved \n[doc-in-synopsis-section] +. nr doc-in-library-section-saved \n[doc-in-library-section] . nr doc-indent-synopsis-saved \n[doc-indent-synopsis] . nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active] . nr doc-have-decl-saved \n[doc-have-decl] @@ -3460,6 +3461,7 @@ . nr doc-curr-font \n[doc-curr-font-saved] . nr doc-curr-size \n[doc-curr-size-saved] . nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved] +. nr doc-in-library-section \n[doc-in-library-section-saved] . nr doc-indent-synopsis \n[doc-indent-synopsis-saved] . nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved] . nr doc-have-decl \n[doc-have-decl-saved] @@ -5164,11 +5166,14 @@ .\" NS doc-issue-count .\" NS doc-issue-name .\" NS doc-journal-count -.\" NS doc-journam-name +.\" NS doc-journal-name .\" NS doc-optional-count .\" NS doc-optional-string .\" NS doc-page-number-count .\" NS doc-page-number-string +.\" NS doc-publisher-count +.\" NS doc-publisher-name +.\" NS doc-reference-count .\" NS doc-reference-title-count .\" NS doc-reference-title-name .\" NS doc-reference-title-name-for-book @@ -5192,6 +5197,8 @@ . nr doc-date-count 0 . nr doc-page-number-count 0 . nr doc-book-count 0 +. nr doc-publisher-count 0 +. nr doc-reference-count 0 . . ds doc-journal-name . ds doc-issue-name @@ -5204,6 +5211,7 @@ . ds doc-date . ds doc-page-number-string . ds doc-book-name +. ds doc-publisher-name .. . . ==== //depot/projects/hammer/contrib/groff/tmac/groff_mdoc.man#6 (text+ko) ==== @@ -786,7 +786,7 @@ the middle part of the manual page header strings are shown. Note how .Ql \e& -prevents the digit\~1 from being a valid numeric expression. +prevents the digit\~7 from being a valid numeric expression. . .Bd -ragged .Bl -tag -width ".Li .Dt\ FOO\ 2\ i386" -compact -offset indent @@ -1108,6 +1108,15 @@ To remove the special meaning from a punctuation character escape it with .Ql \e& . .Pp +The following punctuation characters are recognized by +.Nm \-mdoc : +. +.Bl -column -offset indent-two XXXXXX XXXXXX XXXXXX XXXXXX +.It Li .\& Ta Li ,\& Ta Li :\& Ta Li ;\& Ta Li (\& +.It Li )\& Ta Li [\& Ta Li ]\& Ta Li ?\& Ta Li !\& +.El +.Pp +. .Xr Troff is limited as a macro language, and has difficulty when presented with a string containing a member of the mathematical, logical or quotation set: @@ -1693,6 +1702,13 @@ then denotes the keyword to be used with the .Ql .Lb macro. +.Pp +In the +.Sx LIBRARY +section an +.Ql .Lb +command causes a line break before and after its arguments are printed. +.Pp . .Ss Literals . ==== //depot/projects/hammer/contrib/isc-dhcp/client/scripts/freebsd#4 (text+ko) ==== @@ -2,7 +2,7 @@ # # $Id: freebsd,v 1.13.2.5 2003/04/27 19:44:01 dhankins Exp $ # -# $FreeBSD: src/contrib/isc-dhcp/client/scripts/freebsd,v 1.24 2003/09/09 16:19:46 mbr Exp $ +# $FreeBSD: src/contrib/isc-dhcp/client/scripts/freebsd,v 1.26 2003/09/15 15:48:12 mbr Exp $ if [ -x /usr/bin/logger ]; then LOGGER="/usr/bin/logger -s -p user.notice -t dhclient" @@ -66,6 +66,15 @@ alias_subnet_arg="netmask $alias_subnet_mask" fi +# Get the interface to which our default route is bound to. +if [ -x /usr/bin/netstat ]; then + if_defaultroute=`/usr/bin/netstat -rn \ + | /usr/bin/grep "^default" \ + | /usr/bin/awk '{print $6}'` +else + if_defaultroute="x" +fi + if [ x$reason = xMEDIUM ]; then eval "ifconfig $interface $medium" eval "ifconfig $interface inet -alias 0.0.0.0 $medium" >/dev/null 2>&1 @@ -161,7 +170,9 @@ eval "ifconfig $interface inet -alias $old_ip_address $medium" route delete $old_ip_address 127.1 >/dev/null 2>&1 for router in $old_routers; do - route delete default $router >/dev/null 2>&1 + if [ $if_defaultroute = x ] || [ $if_defaultroute = $interface ]; then + route delete default $router >/dev/null 2>&1 + fi done if [ -n "$old_static_routes" ]; then set -- $old_static_routes ==== //depot/projects/hammer/contrib/sendmail/FREEBSD-upgrade#5 (text+ko) ==== @@ -1,6 +1,6 @@ -$FreeBSD: src/contrib/sendmail/FREEBSD-upgrade,v 1.21 2003/03/29 19:21:28 gshapiro Exp $ +$FreeBSD: src/contrib/sendmail/FREEBSD-upgrade,v 1.22 2003/09/19 23:20:46 gshapiro Exp $ -sendmail 8.12.9 +sendmail 8.12.10 originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/ For the import of sendmail, the following files were removed: @@ -21,8 +21,8 @@ Imported using: - cvs import -m 'Import sendmail 8.12.9' \ - src/contrib/sendmail SENDMAIL v8_12_9 + cvs import -m 'Import sendmail 8.12.10' \ + src/contrib/sendmail SENDMAIL v8_12_10 To make local changes to sendmail, simply patch and commit to the main @@ -92,4 +92,4 @@ usr.sbin/mailwrapper/Makefile gshapiro@FreeBSD.org -29-March-2003 +19-September-2003 ==== //depot/projects/hammer/contrib/sendmail/LICENSE#2 (text+ko) ==== @@ -2,7 +2,7 @@ The following license terms and conditions apply, unless a different license is obtained from Sendmail, Inc., 6425 Christie Ave, Fourth Floor, -Emeryville, CA 94608, or by electronic mail at license@sendmail.com. +Emeryville, CA 94608, USA, or by electronic mail at license@sendmail.com. License Terms: @@ -33,7 +33,7 @@ forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: - "Copyright (c) 1998-2002 Sendmail, Inc. All rights reserved." + "Copyright (c) 1998-2003 Sendmail, Inc. All rights reserved." 4. Neither the name of Sendmail, Inc. nor the University of California nor the names of their contributors may be used to endorse or promote @@ -76,4 +76,4 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -$Revision: 8.11 $, Last updated $Date: 2002/04/24 22:26:56 $ +$Revision: 8.11.2.1 $, Last updated $Date: 2003/04/19 14:30:36 $ ==== //depot/projects/hammer/contrib/sendmail/RELEASE_NOTES#5 (text+ko) ==== @@ -1,16 +1,83 @@ SENDMAIL RELEASE NOTES - $Id: RELEASE_NOTES,v 8.1340.2.132 2003/03/29 14:02:26 ca Exp $ + $Id: RELEASE_NOTES,v 8.1340.2.165 2003/09/16 20:50:42 ca Exp $ This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.12.10/8.12.10 2003/09/24 + SECURITY: Fix a buffer overflow in address parsing. Problem + detected by Michal Zalewski, patch from Todd C. Miller + of Courtesan Consulting. + Fix a potential buffer overflow in ruleset parsing. This problem + is not exploitable in the default sendmail configuration; + only if non-standard rulesets recipient (2), final (4), or + mailer-specific envelope recipients rulesets are used then + a problem may occur. Problem noted by Timo Sirainen. + Accept 0 (and 0/0) as valid input for set MaxMimeHeaderLength. + Problem noted by Thomas Schulz. + Add several checks to avoid (theoretical) buffer over/underflows. + Properly count message size when performing 7->8 or 8->7 bit MIME + conversions. Problem noted by Werner Wiethege. + Properly compute message priority based on size of entire message, + not just header. Problem noted by Axel Holscher. + Reset SevenBitInput to its configured value between SMTP + transactions for broken clients which do not properly + announce 8 bit data. Problem noted by Stefan Roehrich. + Set {addr_type} during queue runs when processing recipients. + Based on patch from Arne Jansen. + Better error handling in case of (very unlikely) queue-id conflicts. + Perform better error recovery for address parsing, e.g., when + encountering a comment that is too long. Problem noted by + Tanel Kokk, Union Bank of Estonia. + Add ':' to the allowed character list for bogus HELO/EHLO + checking. It is used for IPv6 domain literals. Patch from + Iwaizako Takahiro of FreeBit Co., Ltd. + Reset SASL connection context after a failed authentication attempt. + Based on patch from Rob Siemborski of CMU. + Check Berkeley DB compile time version against run time version + to make sure they match. + Do not attempt AAAA (IPv6) DNS lookups if IPv6 is not enabled + in the kernel. >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Sep 22 19:42:27 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6638216A4C0; Mon, 22 Sep 2003 19:42:27 -0700 (PDT) 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 22D1116A4BF for ; Mon, 22 Sep 2003 19:42:27 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FAAC43F93 for ; Mon, 22 Sep 2003 19:42:23 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8N2gNXJ076266 for ; Mon, 22 Sep 2003 19:42:23 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8N2gNaI076263 for perforce@freebsd.org; Mon, 22 Sep 2003 19:42:23 -0700 (PDT) (envelope-from peter@freebsd.org) Date: Mon, 22 Sep 2003 19:42:23 -0700 (PDT) Message-Id: <200309230242.h8N2gNaI076263@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 Subject: PERFORCE change 38458 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2003 02:42:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=38458 Change 38458 by peter@peter_daintree on 2003/09/22 19:42:20 p4 integ -I to pick up jhb's latest changes Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/io_apic.c#4 integrate .. //depot/projects/hammer/sys/amd64/amd64/local_apic.c#2 integrate .. //depot/projects/hammer/sys/amd64/include/apicvar.h#3 integrate .. //depot/projects/hammer/sys/amd64/include/intr_machdep.h#2 integrate .. //depot/projects/hammer/sys/amd64/isa/atpic.c#3 integrate .. //depot/projects/hammer/sys/jhb_notes#2 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/io_apic.c#4 (text+ko) ==== @@ -29,6 +29,8 @@ * $FreeBSD$ */ +#include "opt_isa.h" + #include #include #include @@ -55,6 +57,10 @@ #endif #include +#ifdef DEV_ISA +#define MIXED_MODE +#endif + #define IOAPIC_ISA_INTS 16 #define IOAPIC_MEM_REGION 32 #define IOAPIC_REDTBL_LO(i) (IOAPIC_REDTBL + (i) * 2) @@ -65,6 +71,10 @@ #define VECTOR_SMI -3 #define VECTOR_DISABLED -4 +#define DEST_NONE -1 +#define DEST_EXTINT -2 +#define DEST_EXTINT_ENABLED -3 + #define TODO printf("%s: not implemented!\n", __func__) MALLOC_DEFINE(M_IOAPIC, "I/O APIC", "I/O APIC structures"); @@ -112,17 +122,21 @@ static void ioapic_write(volatile ioapic_t *apic, int reg, u_int val); static void ioapic_enable_source(struct intsrc *isrc); static void ioapic_disable_source(struct intsrc *isrc); +static void ioapic_eoi_source(struct intsrc *isrc); static void ioapic_enable_intr(struct intsrc *isrc); static int ioapic_vector(struct intsrc *isrc); static int ioapic_source_pending(struct intsrc *isrc); static void ioapic_suspend(struct intsrc *isrc); static void ioapic_resume(struct intsrc *isrc); static void ioapic_program_destination(struct ioapic_intsrc *intpin); +#ifdef MIXED_MODE +static struct intsrc *mixedpic_create_source(struct ioapic_intsrc *intpin); +#endif struct pic ioapic_template = { ioapic_enable_source, ioapic_disable_source, - ioapic_enable_intr, ioapic_vector, - ioapic_source_pending, ioapic_suspend, - ioapic_resume }; + ioapic_eoi_source, ioapic_enable_intr, + ioapic_vector, ioapic_source_pending, + ioapic_suspend, ioapic_resume }; static int next_ioapic_base, logical_clusters, current_cluster; @@ -182,6 +196,13 @@ mtx_unlock_spin(&icu_lock); } +static void +ioapic_eoi_source(struct intsrc *isrc) +{ + TODO; + /* lapic_eoi(); */ +} + /* * Program an individual intpin's logical destination. */ @@ -191,10 +212,18 @@ struct ioapic *io = (struct ioapic *)intpin->io_intsrc.is_pic; uint32_t value; - KASSERT(intpin->io_dest != -1, ("intpin not assigned to a cluster")); + KASSERT(intpin->io_dest != DEST_NONE, + ("intpin not assigned to a cluster")); + KASSERT(intpin->io_dest != DEST_EXTINT && + intpin->io_dest != DEST_EXTINT_ENABLED, + ("intpin routed via ExtINT")); /* XXXTEST */ - printf("ioapic%u: routing intpin %u (IRQ %u) to cluster %u\n", - io->io_id, intpin->io_intpin, intpin->io_vector, intpin->io_dest); + printf("ioapic%u: routing intpin %u (", io->io_id, intpin->io_intpin); + if (intpin->io_vector == VECTOR_EXTINT) + printf("ExtINT"); + else + printf("IRQ %u", intpin->io_vector); + printf(") to cluster %u\n", intpin->io_dest); mtx_lock_spin(&icu_lock); value = ioapic_read(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin)); value &= ~IOART_DESTMOD; @@ -209,18 +238,8 @@ } static void -ioapic_enable_intr(struct intsrc *isrc) +ioapic_assign_cluster(struct ioapic_intsrc *intpin) { - struct ioapic_intsrc *intpin = (struct ioapic_intsrc *)isrc; - - if (intpin->io_vector == IDT_SYSCALL - NRSVIDT) { - printf("WARNING: IRQ %d is not routed!\n", - IDT_SYSCALL - NRSVIDT); - return; - } - if (intpin->io_dest != -1) - return; - /* * Assign this intpin to a logical APIC cluster in a * round-robin fashion. We don't actually use the logical @@ -236,6 +255,38 @@ current_cluster = 0; if (program_logical_dest) ioapic_program_destination(intpin); +} + +static void +ioapic_enable_intr(struct intsrc *isrc) +{ + struct ioapic_intsrc *intpin = (struct ioapic_intsrc *)isrc; + struct ioapic_intsrc *extint; + struct ioapic *io; + + if (intpin->io_vector == IDT_TO_IRQ(IDT_SYSCALL)) { + printf("WARNING: IRQ %d is not routed!\n", + IDT_TO_IRQ(IDT_SYSCALL)); + return; + } + switch (intpin->io_dest) { + case DEST_NONE: + ioapic_assign_cluster(intpin); + break; + case DEST_EXTINT: + io = (struct ioapic *)isrc->is_pic; + extint = &io->io_pins[0]; + if (extint->io_vector != VECTOR_EXTINT) + panic("Can't find ExtINT pin to route through!"); + if (extint->io_dest == DEST_NONE) { + ioapic_assign_cluster(extint); + ioapic_enable_source(&extint->io_intsrc); + } + intpin->io_dest = DEST_EXTINT_ENABLED; + break; + default: + return; + } lapic_enable_intr(intpin->io_vector); } @@ -527,6 +578,7 @@ void ioapic_register(void *cookie) { + struct ioapic_intsrc *pin; struct ioapic *io; volatile ioapic_t *apic; uint32_t flags; @@ -540,43 +592,43 @@ mtx_unlock_spin(&icu_lock); printf("ioapic%u irqs %u-%u on motherboard\n", io->io_id, flags, io->io_intbase, io->io_intbase + io->io_numintr - 1); - for (i = 0; i < io->io_numintr; i++) { + for (i = 0, pin = io->io_pins; i < io->io_numintr; i++, pin++) { /* * Finish initializing the pins by programming the vectors * and delivery mode. XXX this may not be all right yet */ - if (io->io_pins[i].io_vector == VECTOR_DISABLED) + if (pin->io_vector == VECTOR_DISABLED) continue; flags = IOART_DESTPHY; - if (io->io_pins[i].io_edgetrigger) + if (pin->io_edgetrigger) flags |= IOART_TRGREDG; else flags |= IOART_TRGRLVL; - if (io->io_pins[i].io_activehi) + if (pin->io_activehi) flags |= IOART_INTAHI; else flags |= IOART_INTALO; - if (io->io_pins[i].io_masked) + if (pin->io_masked) flags |= IOART_INTMSET; - switch (io->io_pins[i].io_vector) { + switch (pin->io_vector) { case VECTOR_EXTINT: - KASSERT(io->io_pins[i].io_edgetrigger, + KASSERT(pin->io_edgetrigger, ("EXTINT not edge triggered")); flags |= IOART_DELEXINT; break; case VECTOR_NMI: - KASSERT(io->io_pins[i].io_edgetrigger, + KASSERT(pin->io_edgetrigger, ("NMI not edge triggered")); flags |= IOART_DELNMI; break; case VECTOR_SMI: - KASSERT(io->io_pins[i].io_edgetrigger, + KASSERT(pin->io_edgetrigger, ("SMI not edge triggered")); flags |= IOART_DELSMI; break; default: flags |= IOART_DELLOPRI | - (io->io_pins[i].io_vector + NRSVIDT); + IRQ_TO_IDT(pin->io_vector); } mtx_lock_spin(&icu_lock); ioapic_write(apic, IOAPIC_REDTBL_LO(i), flags); @@ -591,8 +643,17 @@ flags |= IOART_DEST; ioapic_write(apic, IOAPIC_REDTBL_HI(i), flags); mtx_unlock_spin(&icu_lock); - if (io->io_pins[i].io_vector >= 0) - intr_register_source(&io->io_pins[i].io_intsrc); + if (pin->io_vector >= 0) { + struct intsrc *isrc; +#ifdef MIXED_MODE + /* Route IRQ0 via the 8259A using mixed mode. */ + if (pin->io_vector == 0) + isrc = mixedpic_create_source(pin); + else +#endif + isrc = &pin->io_intsrc; + intr_register_source(isrc); + } } } @@ -609,24 +670,13 @@ program_logical_dest = 1; STAILQ_FOREACH(io, &ioapic_list, io_next) for (i = 0; i < io->io_numintr; i++) - if (io->io_pins[i].io_dest != -1) + if (io->io_pins[i].io_dest != DEST_NONE) ioapic_program_destination(&io->io_pins[i]); } SYSINIT(ioapic_destinations, SI_SUB_SMP, SI_ORDER_SECOND, ioapic_set_logical_destinations, NULL) - -#ifdef MIXED_MODE_notyet -/* - * Hmm, so we have the problem that we may need to EOI both the local APIC - * and the 8259's in mixed mode. Also, the mapping of vectors to intpins - * is more cmplicated with IO APICs, so perhaps instead we should add another - * PIC-independent layer for the actual low-level interrupt code to register - * handlers in IDT and then use intsrc pointers to handle EOI and - * block/unblock. Not too happy about adding extra overhead to the critical - * path however. Maybe I can talk about this with Peter this week. Bah. - */ -#endif +#ifdef MIXED_MODE /* * Support for mixed-mode interrupt sources. These sources route an ISA * IRQ through the 8259A's via the ExtINT on pin 0 of the I/O APIC that @@ -642,17 +692,17 @@ static void mixedpic_enable_source(struct intsrc *isrc); static void mixedpic_disable_source(struct intsrc *isrc); +static void mixedpic_eoi_source(struct intsrc *isrc); static void mixedpic_enable_intr(struct intsrc *isrc); static int mixedpic_vector(struct intsrc *isrc); static int mixedpic_source_pending(struct intsrc *isrc); static void mixedpic_suspend(struct intsrc *isrc); static void mixedpic_resume(struct intsrc *isrc); -static struct intsrc *mixedpic_create_source(struct ioapic_intsrc *intpin); struct pic mixedpic = { mixedpic_enable_source, mixedpic_disable_source, - mixedpic_enable_intr, mixedpic_vector, - mixedpic_source_pending, mixedpic_suspend, - mixedpic_resume }; + mixedpic_eoi_source, mixedpic_enable_intr, + mixedpic_vector, mixedpic_source_pending, + mixedpic_suspend, mixedpic_resume }; static void mixedpic_enable_source(struct intsrc *isrc) @@ -668,16 +718,43 @@ mixedpic_disable_source(struct intsrc *isrc) { struct mixedpic_intsrc *mpsrc; + struct intsrc *intpin; mpsrc = (struct mixedpic_intsrc *)isrc; + intpin = mpsrc->mp_apicpin; isrc = mpsrc->mp_atpicsrc; isrc->is_pic->pic_disable_source(isrc); + + /* + * If the interrupt is pending in the local APIC, assume that + * we have been called just before the local APIC gets its + * EOI and send an EOI out to the 8259As. + */ + if (intpin->is_pic->pic_source_pending(intpin)) + isrc->is_pic->pic_eoi_source(isrc); +} + +static void +mixedpic_eoi_source(struct intsrc *isrc) +{ + struct mixedpic_intsrc *mpsrc; + struct intsrc *intpin; + + mpsrc = (struct mixedpic_intsrc *)isrc; + intpin = mpsrc->mp_apicpin; + isrc = mpsrc->mp_atpicsrc; + isrc->is_pic->pic_eoi_source(isrc); + intpin->is_pic->pic_eoi_source(intpin); } static void mixedpic_enable_intr(struct intsrc *isrc) { - /* here be dragons */ + struct mixedpic_intsrc *mpsrc; + + mpsrc = (struct mixedpic_intsrc *)isrc; + isrc = mpsrc->mp_apicpin; + isrc->is_pic->pic_enable_intr(isrc); } static int @@ -720,10 +797,15 @@ struct mixedpic_intsrc *mpsrc; int vector; + KASSERT(intpin->io_dest == DEST_NONE, ("%s: intpin already enabled", + __func__)); mpsrc = malloc(sizeof(struct mixedpic_intsrc), M_IOAPIC, M_WAITOK); mpsrc->mp_intsrc.is_pic = &mixedpic; mpsrc->mp_apicpin = (struct intsrc *)intpin; vector = intpin->io_intsrc.is_pic->pic_vector(&intpin->io_intsrc); mpsrc->mp_atpicsrc = atpic_lookup_source(vector); + intpin->io_dest = DEST_EXTINT; /* XXX */ return (&mpsrc->mp_intsrc); } + +#endif /* MIXED_MODE */ ==== //depot/projects/hammer/sys/amd64/amd64/local_apic.c#2 (text+ko) ==== @@ -241,10 +241,10 @@ { /* Convert to IDT vector. */ - vector += NRSVIDT; - KASSERT(vector != 0x80, ("Attempt to overwrite syscall entry")); + vector = IRQ_TO_IDT(vector); + KASSERT(vector != IDT_SYSCALL, ("Attempt to overwrite syscall entry")); KASSERT(ioint_handlers[vector / 32] != NULL, - ("No ISR handler for IRQ %d", vector - NRSVIDT)); + ("No ISR handler for IRQ %d", IDT_TO_IRQ(vector))); setidt(vector, ioint_handlers[vector / 32], SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); } ==== //depot/projects/hammer/sys/amd64/include/apicvar.h#3 (text+ko) ==== @@ -82,7 +82,7 @@ #define APIC_ID_ALL 0xff #define APIC_NUM_IOINTS 160 -#define APIC_LOCAL_INTS (NRSVIDT + APIC_NUM_IOINTS) +#define APIC_LOCAL_INTS (IDT_IO_INTS + APIC_NUM_IOINTS) #define APIC_TIMER_INT APIC_LOCAL_INTS #define APIC_ERROR_INT (APIC_LOCAL_INTS + 1) #define APIC_THERMAL_INT (APIC_LOCAL_INTS + 2) ==== //depot/projects/hammer/sys/amd64/include/intr_machdep.h#2 (text+ko) ==== @@ -51,6 +51,7 @@ struct pic { void (*pic_enable_source)(struct intsrc *); void (*pic_disable_source)(struct intsrc *); + void (*pic_eoi_source)(struct intsrc *); void (*pic_enable_intr)(struct intsrc *); int (*pic_vector)(struct intsrc *); int (*pic_source_pending)(struct intsrc *); @@ -77,7 +78,7 @@ extern struct mtx icu_lock; void atpic_startup(void); -void atpic_lookup_source(int vector); +struct intsrc *atpic_lookup_source(int vector); int intr_add_handler(const char *name, int vector, driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep); ==== //depot/projects/hammer/sys/amd64/isa/atpic.c#3 (text+ko) ==== @@ -54,6 +54,10 @@ #ifdef DEV_ISA #include + +#define MASTER 0 +#define SLAVE 1 + #endif static void atpic_init(void *dummy); @@ -80,10 +84,10 @@ #define IRQ(ap, ai) ((ap)->at_irqbase + (ai)->at_irq) -#define ATPIC(io, base, intbase, imenptr) \ - { { atpic_enable_source, atpic_disable_source, atpic_enable_intr, \ - atpic_vector, atpic_source_pending, NULL, atpic_resume }, \ - (io), (base), (intbase), (imenptr) } +#define ATPIC(io, base, eoi, imenptr) \ + { { atpic_enable_source, atpic_disable_source, (eoi), \ + atpic_enable_intr, atpic_vector, atpic_source_pending, NULL, \ + atpic_resume }, (io), (base), IRQ_TO_IDT(base), (imenptr) } #define INTSRC(irq) \ { { (struct pic *)(&atpics[(irq) / 8]) }, (irq) % 8, \ @@ -113,6 +117,8 @@ static void atpic_enable_source(struct intsrc *isrc); static void atpic_disable_source(struct intsrc *isrc); +static void atpic_eoi_master(struct intsrc *isrc); +static void atpic_eoi_slave(struct intsrc *isrc); static void atpic_enable_intr(struct intsrc *isrc); static int atpic_vector(struct intsrc *isrc); static void atpic_resume(struct intsrc *isrc); @@ -120,8 +126,8 @@ static void i8259_init(struct atpic *pic, int slave); static struct atpic atpics[] = { - ATPIC(IO_ICU1, 0, NRSVIDT, (uint8_t *)&imen), - ATPIC(IO_ICU2, 8, NRSVIDT+8, ((uint8_t *)&imen) + 1) + ATPIC(IO_ICU1, 0, atpic_eoi_master, (uint8_t *)&imen), + ATPIC(IO_ICU2, 8, atpic_eoi_slave, ((uint8_t *)&imen) + 1) }; static struct atpic_intsrc atintrs[] = { @@ -168,6 +174,35 @@ } static void +atpic_eoi_master(struct intsrc *isrc) +{ + + KASSERT(isrc->is_pic == &atpics[MASTER].at_pic, + ("%s: mismatched pic", __func__)); +#ifndef AUTO_EOI_1 + mtx_lock_spin(&icu_lock); + outb(atpics[MASTER].at_ioaddr, ICU_EOI); + mtx_unlock_spin(&icu_lock); +#endif +} + +static void +atpic_eoi_slave(struct intsrc *isrc) +{ + + KASSERT(isrc->is_pic == &atpics[SLAVE].at_pic, + ("%s: mismatched pic", __func__)); +#ifndef AUTO_EOI_2 + mtx_lock_spin(&icu_lock); + outb(atpics[SLAVE].at_ioaddr, ICU_EOI); +#ifndef AUTO_EOI_1 + outb(atpics[MASTER].at_ioaddr, ICU_EOI); +#endif + mtx_unlock_spin(&icu_lock); +#endif +} + +static void atpic_enable_intr(struct intsrc *isrc) { struct atpic_intsrc *ai = (struct atpic_intsrc *)isrc; @@ -223,7 +258,7 @@ struct atpic *ap = (struct atpic *)isrc->is_pic; if (ai->at_irq == 0) - i8259_init(ap, !(ap == &atpics[0])); + i8259_init(ap, ap == &atpics[SLAVE]); } static void @@ -283,8 +318,8 @@ /* Start off with all interrupts disabled. */ imen = 0xffff; - i8259_init(&atpics[0], 0); - i8259_init(&atpics[1], 1); + i8259_init(&atpics[MASTER], 0); + i8259_init(&atpics[SLAVE], 1); atpic_enable_source((struct intsrc *)&atintrs[ICU_SLAVEID]); } @@ -317,14 +352,14 @@ intr_execute_handlers(&atintrs[iframe.if_vec].at_intsrc, &iframe); } -void +struct intsrc * atpic_lookup_source(int vector) { KASSERT(vector >= 0 && vector != ICU_SLAVEID && vector < sizeof(atintrs) / sizeof(struct atpic_intsrc), ("%s: invalid vector %d", __func__, vector)); - return (&atintrs[vector]); + return (&atintrs[vector].at_intsrc); } /* ==== //depot/projects/hammer/sys/jhb_notes#2 (text+ko) ==== @@ -27,13 +27,10 @@ - isa/vector.s Todo: -- Add ICU locking - - atpic low-level asm still dinks with pic w/o lock - XXX (should be ok) +- Fix IDT_SYSCALL mapping in APIC case +- Test mixed mode - Kill isa_irq_pending() (maybe, is this an MI function?) -- Use mixed-mode by default for rtc and clk or add back in a runtime test. - Add ACPI MADT APIC enumerator. - + UP works - + SMP works - solve ACPI module problem where madt wants APIC symbols :( - Implement mixed-mode and use it for IRQ0 unless no ExtINT pin or NO_MIXED_MODE @@ -51,8 +48,8 @@ - Suspend/resume support for I/O APICs - check XXX and XXXTEST in new code - reimplement lazy masking of interrupts for critical sections w/o bitmasks?? -- Revisit cpu_add, make call #ifdef SMP? - Enhance acpi_cpu(4) driver to grok SMP at all? +- Rip out CPU halting stuff perhaps and maybe disable MPTable HTT fixup? Unrelated to this branch: - Work on cleaning up nested includes in sys/* headers. According to Bruce, From owner-p4-projects@FreeBSD.ORG Tue Sep 23 09:16:05 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EDCB416A4C0; Tue, 23 Sep 2003 09:16:04 -0700 (PDT) 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 BD2B316A4B3 for ; Tue, 23 Sep 2003 09:16:04 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75A8643FF7 for ; Tue, 23 Sep 2003 09:16:03 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8NGG3XJ042833 for ; Tue, 23 Sep 2003 09:16:03 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8NGG2FA042830 for perforce@freebsd.org; Tue, 23 Sep 2003 09:16:02 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Tue, 23 Sep 2003 09:16:02 -0700 (PDT) Message-Id: <200309231616.h8NGG2FA042830@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38485 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2003 16:16:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=38485 Change 38485 by sam@sam_ebb on 2003/09/23 09:15:06 IFC @ 38484 Affected files ... .. //depot/projects/netperf/sys/alpha/include/bus.h#3 integrate .. //depot/projects/netperf/sys/amd64/acpica/acpi_machdep.c#4 integrate .. //depot/projects/netperf/sys/amd64/amd64/busdma_machdep.c#4 integrate .. //depot/projects/netperf/sys/amd64/amd64/exception.S#3 integrate .. //depot/projects/netperf/sys/amd64/amd64/machdep.c#5 integrate .. //depot/projects/netperf/sys/amd64/amd64/trap.c#3 integrate .. //depot/projects/netperf/sys/amd64/amd64/tsc.c#3 integrate .. //depot/projects/netperf/sys/amd64/ia32/ia32_syscall.c#4 integrate .. //depot/projects/netperf/sys/amd64/include/acpica_machdep.h#2 integrate .. //depot/projects/netperf/sys/amd64/include/bus_amd64.h#2 integrate .. //depot/projects/netperf/sys/amd64/include/clock.h#2 integrate .. //depot/projects/netperf/sys/amd64/include/cpu.h#3 integrate .. //depot/projects/netperf/sys/amd64/include/endian.h#2 integrate .. //depot/projects/netperf/sys/amd64/include/legacyvar.h#2 integrate .. //depot/projects/netperf/sys/amd64/include/md_var.h#3 integrate .. //depot/projects/netperf/sys/amd64/include/pci_cfgreg.h#2 integrate .. //depot/projects/netperf/sys/amd64/include/segments.h#2 integrate .. //depot/projects/netperf/sys/amd64/include/specialreg.h#2 integrate .. //depot/projects/netperf/sys/amd64/include/vmparam.h#2 integrate .. //depot/projects/netperf/sys/amd64/isa/clock.c#3 integrate .. //depot/projects/netperf/sys/amd64/pci/pci_bus.c#5 integrate .. //depot/projects/netperf/sys/compat/linprocfs/linprocfs.c#6 integrate .. //depot/projects/netperf/sys/dev/ata/atapi-cd.c#7 integrate .. //depot/projects/netperf/sys/dev/ata/atapi-cd.h#6 integrate .. //depot/projects/netperf/sys/dev/bge/if_bge.c#8 integrate .. //depot/projects/netperf/sys/dev/em/if_em.c#5 integrate .. //depot/projects/netperf/sys/dev/em/if_em.h#6 integrate .. //depot/projects/netperf/sys/dev/uart/uart.h#2 integrate .. //depot/projects/netperf/sys/dev/uart/uart_bus_pccard.c#2 integrate .. //depot/projects/netperf/sys/dev/uart/uart_core.c#3 integrate .. //depot/projects/netperf/sys/dev/uart/uart_cpu.h#2 integrate .. //depot/projects/netperf/sys/dev/uart/uart_cpu_alpha.c#2 integrate .. //depot/projects/netperf/sys/dev/uart/uart_cpu_amd64.c#2 integrate .. //depot/projects/netperf/sys/dev/uart/uart_cpu_i386.c#2 integrate .. //depot/projects/netperf/sys/dev/uart/uart_cpu_ia64.c#2 integrate .. //depot/projects/netperf/sys/dev/uart/uart_cpu_pc98.c#2 integrate .. //depot/projects/netperf/sys/dev/uart/uart_cpu_sparc64.c#2 integrate .. //depot/projects/netperf/sys/dev/uart/uart_dev_sab82532.c#3 integrate .. //depot/projects/netperf/sys/dev/uart/uart_dev_z8530.c#3 integrate .. //depot/projects/netperf/sys/geom/geom_disk.c#3 integrate .. //depot/projects/netperf/sys/i386/include/bus_at386.h#2 integrate .. //depot/projects/netperf/sys/i386/include/bus_pc98.h#2 integrate .. //depot/projects/netperf/sys/i386/include/endian.h#3 integrate .. //depot/projects/netperf/sys/ia64/include/bus.h#3 integrate .. //depot/projects/netperf/sys/kern/kern_linker.c#3 integrate .. //depot/projects/netperf/sys/net/radix.c#4 integrate .. //depot/projects/netperf/sys/net80211/ieee80211_radiotap.h#2 integrate .. //depot/projects/netperf/sys/pc98/i386/busiosubr.c#2 integrate .. //depot/projects/netperf/sys/sparc64/include/bus.h#3 integrate .. //depot/projects/netperf/sys/sys/kobj.h#2 integrate .. //depot/projects/netperf/sys/vm/vm_map.c#5 integrate Differences ... ==== //depot/projects/netperf/sys/alpha/include/bus.h#3 (text+ko) ==== @@ -67,7 +67,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $FreeBSD: src/sys/alpha/include/bus.h,v 1.23 2003/07/27 13:52:09 mux Exp $ */ +/* $FreeBSD: src/sys/alpha/include/bus.h,v 1.24 2003/09/23 08:22:33 nyan Exp $ */ #ifndef _ALPHA_BUS_H_ #define _ALPHA_BUS_H_ @@ -91,6 +91,24 @@ #define BUS_SPACE_UNRESTRICTED (~0UL) /* + * Map a region of device bus space into CPU virtual address space. + */ + +static __inline int bus_space_map(bus_space_tag_t t, bus_addr_t addr, + bus_size_t size, int flags, + bus_space_handle_t *bshp); + +static __inline int +bus_space_map(bus_space_tag_t t __unused, bus_addr_t addr, + bus_size_t size __unused, int flags __unused, + bus_space_handle_t *bshp) +{ + + *bshp = addr; + return (0); +} + +/* * Unmap a region of device bus space. */ ==== //depot/projects/netperf/sys/amd64/acpica/acpi_machdep.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/acpica/acpi_machdep.c,v 1.11 2003/08/28 16:30:31 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/acpica/acpi_machdep.c,v 1.12 2003/09/22 22:12:46 peter Exp $"); #include #include @@ -33,6 +33,8 @@ #include "acpi.h" #include +static int intr_model = ACPI_INTR_PIC; + int acpi_machdep_init(device_t dev) { @@ -43,5 +45,15 @@ acpi_install_wakeup_handler(sc); + if (intr_model != ACPI_INTR_PIC) + acpi_SetIntrModel(intr_model); + return (0); } + +void +acpi_SetDefaultIntrModel(int model) +{ + + intr_model = model; +} ==== //depot/projects/netperf/sys/amd64/amd64/busdma_machdep.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.51 2003/08/04 23:40:35 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.54 2003/09/22 23:11:42 peter Exp $"); #include #include @@ -65,6 +65,7 @@ int map_count; bus_dma_lock_t *lockfunc; void *lockfuncarg; + bus_dma_segment_t *segments; }; struct bounce_page { @@ -169,11 +170,7 @@ static void dflt_lock(void *arg, bus_dma_lock_op_t op) { -#ifdef INVARIANTS panic("driver error: busdma dflt_lock called"); -#else - printf("DRIVER_ERROR: busdma dflt_lock called\n"); -#endif } #define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 @@ -219,7 +216,8 @@ newtag->lockfunc = dflt_lock; newtag->lockfuncarg = NULL; } - + newtag->segments = NULL; + /* Take into account any restrictions imposed by our parent tag */ if (parent != NULL) { newtag->lowaddr = MIN(parent->lowaddr, newtag->lowaddr); @@ -289,6 +287,8 @@ parent = dmat->parent; atomic_subtract_int(&dmat->ref_count, 1); if (dmat->ref_count == 0) { + if (dmat->segments != NULL) + free(dmat->segments, M_DEVBUF); free(dmat, M_DEVBUF); /* * Last reference count, so @@ -314,6 +314,14 @@ error = 0; + if (dmat->segments == NULL) { + dmat->segments = (bus_dma_segment_t *)malloc( + sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF, + M_NOWAIT); + if (dmat->segments == NULL) + return (ENOMEM); + } + if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem)) { /* Must bounce */ int maxpages; @@ -402,6 +410,14 @@ /* If we succeed, no mapping/bouncing will be required */ *mapp = NULL; + if (dmat->segments == NULL) { + dmat->segments = (bus_dma_segment_t *)malloc( + sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF, + M_NOWAIT); + if (dmat->segments == NULL) + return (ENOMEM); + } + if ((dmat->maxsize <= PAGE_SIZE) && dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem)) { *vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags); @@ -452,7 +468,6 @@ static int _bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, - bus_dma_segment_t segs[], void *buf, bus_size_t buflen, struct thread *td, int flags, @@ -460,6 +475,7 @@ int *segp, int first) { + bus_dma_segment_t *segs; bus_size_t sgsize; bus_addr_t curaddr, lastaddr, baddr, bmask; vm_offset_t vaddr; @@ -468,6 +484,8 @@ int seg; pmap_t pmap; + segs = dmat->segments; + if (map == NULL) map = &nobounce_dmamap; @@ -589,8 +607,6 @@ return (buflen != 0 ? EFBIG : 0); /* XXX better return value here? */ } -#define BUS_DMAMAP_NSEGS ((64 * 1024) / PAGE_SIZE + 1) - /* * Map the buffer buf into bus space using the dmamap map. */ @@ -599,11 +615,6 @@ bus_size_t buflen, bus_dmamap_callback_t *callback, void *callback_arg, int flags) { -#ifdef __GNUC__ - bus_dma_segment_t dm_segments[dmat->nsegments]; -#else - bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; -#endif bus_addr_t lastaddr = 0; int error, nsegs = 0; @@ -613,16 +624,16 @@ map->callback_arg = callback_arg; } - error = _bus_dmamap_load_buffer(dmat, map, dm_segments, buf, buflen, - NULL, flags, &lastaddr, &nsegs, 1); + error = _bus_dmamap_load_buffer(dmat, map, buf, buflen, NULL, flags, + &lastaddr, &nsegs, 1); if (error == EINPROGRESS) return (error); if (error) - (*callback)(callback_arg, dm_segments, 0, error); + (*callback)(callback_arg, dmat->segments, 0, error); else - (*callback)(callback_arg, dm_segments, nsegs + 1, 0); + (*callback)(callback_arg, dmat->segments, nsegs + 1, 0); return (0); } @@ -637,11 +648,6 @@ bus_dmamap_callback2_t *callback, void *callback_arg, int flags) { -#ifdef __GNUC__ - bus_dma_segment_t dm_segments[dmat->nsegments]; -#else - bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; -#endif int nsegs, error; M_ASSERTPKTHDR(m0); @@ -657,7 +663,6 @@ for (m = m0; m != NULL && error == 0; m = m->m_next) { if (m->m_len > 0) { error = _bus_dmamap_load_buffer(dmat, map, - dm_segments, m->m_data, m->m_len, NULL, flags, &lastaddr, &nsegs, first); @@ -670,9 +675,9 @@ if (error) { /* force "no valid mappings" in callback */ - (*callback)(callback_arg, dm_segments, 0, 0, error); + (*callback)(callback_arg, dmat->segments, 0, 0, error); } else { - (*callback)(callback_arg, dm_segments, + (*callback)(callback_arg, dmat->segments, nsegs+1, m0->m_pkthdr.len, error); } return (error); @@ -688,11 +693,6 @@ int flags) { bus_addr_t lastaddr; -#ifdef __GNUC__ - bus_dma_segment_t dm_segments[dmat->nsegments]; -#else - bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; -#endif int nsegs, error, first, i; bus_size_t resid; struct iovec *iov; @@ -722,7 +722,6 @@ if (minlen > 0) { error = _bus_dmamap_load_buffer(dmat, map, - dm_segments, addr, minlen, td, flags, &lastaddr, &nsegs, first); first = 0; @@ -733,9 +732,9 @@ if (error) { /* force "no valid mappings" in callback */ - (*callback)(callback_arg, dm_segments, 0, 0, error); + (*callback)(callback_arg, dmat->segments, 0, 0, error); } else { - (*callback)(callback_arg, dm_segments, + (*callback)(callback_arg, dmat->segments, nsegs+1, uio->uio_resid, error); } return (error); ==== //depot/projects/netperf/sys/amd64/amd64/exception.S#3 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.111 2003/09/09 19:32:09 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.112 2003/09/22 22:54:14 peter Exp $ */ #include @@ -332,7 +332,7 @@ doreti_ast: /* * Check for ASTs atomically with returning. Disabling CPU - * interrupts provides sufficient locking evein the SMP case, + * interrupts provides sufficient locking eve in the SMP case, * since we will be informed of any new ASTs by an IPI. */ cli ==== //depot/projects/netperf/sys/amd64/amd64/machdep.c#5 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.589 2003/09/09 19:32:09 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.593 2003/09/23 00:45:55 peter Exp $"); #include "opt_atalk.h" #include "opt_compat.h" @@ -756,6 +756,8 @@ u_int32_t type; } __packed; +u_int basemem; + /* * Populate the (physmap) array with base/bound pairs describing the * available physical memory in the system, then test this memory and @@ -773,7 +775,7 @@ getmemsize(caddr_t kmdp, u_int64_t first) { int i, physmap_idx, pa_indx; - u_int basemem, extmem; + u_int extmem; vm_paddr_t pa, physmap[PHYSMAP_SIZE]; pt_entry_t *pte; char *cp; @@ -1166,32 +1168,31 @@ * under witness. */ mutex_init(); - mtx_init(&clock_lock, "clk", NULL, MTX_SPIN | MTX_RECURSE); + mtx_init(&clock_lock, "clk", NULL, MTX_SPIN); mtx_init(&icu_lock, "icu", NULL, MTX_SPIN | MTX_NOWITNESS); /* exceptions */ for (x = 0; x < NIDT; x++) setidt(x, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); - setidt(0, &IDTVEC(div), SDT_SYSIGT, SEL_KPL, 0); - setidt(1, &IDTVEC(dbg), SDT_SYSIGT, SEL_KPL, 0); - setidt(2, &IDTVEC(nmi), SDT_SYSIGT, SEL_KPL, 0); - setidt(3, &IDTVEC(bpt), SDT_SYSIGT, SEL_UPL, 0); - setidt(4, &IDTVEC(ofl), SDT_SYSIGT, SEL_KPL, 0); - setidt(5, &IDTVEC(bnd), SDT_SYSIGT, SEL_KPL, 0); - setidt(6, &IDTVEC(ill), SDT_SYSIGT, SEL_KPL, 0); - setidt(7, &IDTVEC(dna), SDT_SYSIGT, SEL_KPL, 0); - setidt(8, &IDTVEC(dblfault), SDT_SYSIGT, SEL_KPL, 1); - setidt(9, &IDTVEC(fpusegm), SDT_SYSIGT, SEL_KPL, 0); - setidt(10, &IDTVEC(tss), SDT_SYSIGT, SEL_KPL, 0); - setidt(11, &IDTVEC(missing), SDT_SYSIGT, SEL_KPL, 0); - setidt(12, &IDTVEC(stk), SDT_SYSIGT, SEL_KPL, 0); - setidt(13, &IDTVEC(prot), SDT_SYSIGT, SEL_KPL, 0); - setidt(14, &IDTVEC(page), SDT_SYSIGT, SEL_KPL, 0); - setidt(15, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); - setidt(16, &IDTVEC(fpu), SDT_SYSIGT, SEL_KPL, 0); - setidt(17, &IDTVEC(align), SDT_SYSIGT, SEL_KPL, 0); - setidt(18, &IDTVEC(mchk), SDT_SYSIGT, SEL_KPL, 0); - setidt(19, &IDTVEC(xmm), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_DE, &IDTVEC(div), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_DB, &IDTVEC(dbg), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_NMI, &IDTVEC(nmi), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_BP, &IDTVEC(bpt), SDT_SYSIGT, SEL_UPL, 0); + setidt(IDT_OF, &IDTVEC(ofl), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_BR, &IDTVEC(bnd), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_UD, &IDTVEC(ill), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_NM, &IDTVEC(dna), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_DF, &IDTVEC(dblfault), SDT_SYSIGT, SEL_KPL, 1); + setidt(IDT_FPUGP, &IDTVEC(fpusegm), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_TS, &IDTVEC(tss), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_NP, &IDTVEC(missing), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_SS, &IDTVEC(stk), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_GP, &IDTVEC(prot), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_PF, &IDTVEC(page), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_MF, &IDTVEC(fpu), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_AC, &IDTVEC(align), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_MC, &IDTVEC(mchk), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_XF, &IDTVEC(xmm), SDT_SYSIGT, SEL_KPL, 0); r_idt.rd_limit = sizeof(idt0) - 1; r_idt.rd_base = (long) idt; ==== //depot/projects/netperf/sys/amd64/amd64/trap.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.262 2003/07/25 21:15:44 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.264 2003/09/22 22:52:46 peter Exp $"); /* * AMD64 Trap and System call handling @@ -88,8 +88,6 @@ #include -#include - extern void trap(struct trapframe frame); extern void syscall(struct trapframe frame); @@ -239,6 +237,7 @@ case T_BPTFLT: /* bpt instruction fault */ case T_TRCTRAP: /* trace trap */ + enable_intr(); frame.tf_rflags &= ~PSL_T; i = SIGTRAP; break; ==== //depot/projects/netperf/sys/amd64/amd64/tsc.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/tsc.c,v 1.201 2003/07/25 21:15:44 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/tsc.c,v 1.203 2003/09/23 00:18:45 peter Exp $"); #include "opt_clock.h" @@ -43,7 +43,6 @@ uint64_t tsc_freq; int tsc_is_broken; -u_int tsc_present = 1; #ifdef SMP static int smp_tsc; @@ -59,7 +58,8 @@ 0, /* no poll_pps */ ~0u, /* counter_mask */ 0, /* frequency */ - "TSC" /* name */ + "TSC", /* name */ + 800, /* quality (adjusted in code) */ }; void @@ -78,12 +78,17 @@ if (bootverbose) printf("TSC clock: %lu Hz\n", tsc_freq); + return; +} + +void +init_TSC_tc(void) +{ + if (tsc_freq != 0 && !tsc_is_broken) { tsc_timecounter.tc_frequency = tsc_freq; tc_init(&tsc_timecounter); } - - return; } static int ==== //depot/projects/netperf/sys/amd64/ia32/ia32_syscall.c#4 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.4 2003/08/23 00:04:53 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.5 2003/09/22 22:09:02 peter Exp $"); /* * 386 Trap and System call handling @@ -263,14 +263,14 @@ ia32_syscall_enable(void *dummy) { - setidt(0x80, &IDTVEC(int0x80_syscall), SDT_SYSIGT, SEL_UPL, 0); + setidt(IDT_SYSCALL, &IDTVEC(int0x80_syscall), SDT_SYSIGT, SEL_UPL, 0); } static void ia32_syscall_disable(void *dummy) { - setidt(0x80, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_SYSCALL, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); } SYSINIT(ia32_syscall, SI_SUB_EXEC, SI_ORDER_ANY, ia32_syscall_enable, NULL); ==== //depot/projects/netperf/sys/amd64/include/acpica_machdep.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/acpica_machdep.h,v 1.2 2003/05/31 06:43:55 peter Exp $ + * $FreeBSD: src/sys/amd64/include/acpica_machdep.h,v 1.3 2003/09/22 22:12:46 peter Exp $ */ /****************************************************************************** @@ -103,4 +103,6 @@ #define COMPILER_DEPENDENT_INT64 long #define COMPILER_DEPENDENT_UINT64 unsigned long +void acpi_SetDefaultIntrModel(int model); + #endif /* __ACPICA_MACHDEP_H__ */ ==== //depot/projects/netperf/sys/amd64/include/bus_amd64.h#2 (text+ko) ==== @@ -67,7 +67,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $FreeBSD: src/sys/amd64/include/bus_amd64.h,v 1.25 2003/05/23 05:04:54 peter Exp $ */ +/* $FreeBSD: src/sys/amd64/include/bus_amd64.h,v 1.26 2003/09/23 08:22:33 nyan Exp $ */ #ifndef _AMD64_BUS_AMD64_H_ #define _AMD64_BUS_AMD64_H_ @@ -114,11 +114,19 @@ * Map a region of device bus space into CPU virtual address space. */ -#define BUS_SPACE_MAP_CACHEABLE 0x01 -#define BUS_SPACE_MAP_LINEAR 0x02 +static __inline int bus_space_map(bus_space_tag_t t, bus_addr_t addr, + bus_size_t size, int flags, + bus_space_handle_t *bshp); + +static __inline int +bus_space_map(bus_space_tag_t t __unused, bus_addr_t addr, + bus_size_t size __unused, int flags __unused, + bus_space_handle_t *bshp) +{ -int bus_space_map(bus_space_tag_t t, bus_addr_t addr, bus_size_t size, - int flags, bus_space_handle_t *bshp); + *bshp = addr; + return (0); +} /* * Unmap a region of device bus space. ==== //depot/projects/netperf/sys/amd64/include/clock.h#2 (text+ko) ==== @@ -3,7 +3,7 @@ * Garrett Wollman, September 1994. * This file is in the public domain. * - * $FreeBSD: src/sys/amd64/include/clock.h,v 1.45 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/clock.h,v 1.46 2003/09/22 23:02:24 peter Exp $ */ #ifndef _MACHINE_CLOCK_H_ @@ -37,6 +37,7 @@ int rtcin(int val); int sysbeep(int pitch, int period); void init_TSC(void); +void init_TSC_tc(void); #endif /* _KERNEL */ ==== //depot/projects/netperf/sys/amd64/include/cpu.h#3 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)cpu.h 5.4 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/cpu.h,v 1.69 2003/08/16 16:57:56 marcel Exp $ + * $FreeBSD: src/sys/amd64/include/cpu.h,v 1.70 2003/09/23 00:18:45 peter Exp $ */ #ifndef _MACHINE_CPU_H_ @@ -78,7 +78,6 @@ #ifdef _KERNEL extern char btext[]; extern char etext[]; -extern u_int tsc_present; void cpu_halt(void); void cpu_reset(void); ==== //depot/projects/netperf/sys/amd64/include/endian.h#2 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)endian.h 7.8 (Berkeley) 4/3/91 - * $FreeBSD: src/sys/amd64/include/endian.h,v 1.4 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/endian.h,v 1.5 2003/09/22 22:37:49 peter Exp $ */ #ifndef _MACHINE_ENDIAN_H_ @@ -69,26 +69,92 @@ #ifdef __GNUC__ -#define __word_swap_int(x) \ +#define __word_swap_int_var(x) \ __extension__ ({ register __uint32_t __X = (x); \ __asm ("rorl $16, %0" : "+r" (__X)); \ __X; }) -#define __byte_swap_int(x) \ +#ifdef __OPTIMIZE__ + +#define __word_swap_int_const(x) \ + ((((x) & 0xffff0000) >> 16) | \ + (((x) & 0x0000ffff) << 16)) +#define __word_swap_int(x) (__builtin_constant_p(x) ? \ + __word_swap_int_const(x) : __word_swap_int_var(x)) + +#else /* __OPTIMIZE__ */ + +#define __word_swap_int(x) __word_swap_int_var(x) + +#endif /* __OPTIMIZE__ */ + +#define __byte_swap_int_var(x) \ __extension__ ({ register __uint32_t __X = (x); \ __asm ("bswap %0" : "+r" (__X)); \ __X; }) -#define __byte_swap_long(x) \ +#ifdef __OPTIMIZE__ + +#define __byte_swap_int_const(x) \ + ((((x) & 0xff000000) >> 24) | \ + (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0x0000ff00) << 8) | \ + (((x) & 0x000000ff) << 24)) +#define __byte_swap_int(x) (__builtin_constant_p(x) ? \ + __byte_swap_int_const(x) : __byte_swap_int_var(x)) + +#else /* __OPTIMIZE__ */ + +#define __byte_swap_int(x) __byte_swap_int_var(x) + +#endif /* __OPTIMIZE__ */ + +#define __byte_swap_long_var(x) \ __extension__ ({ register __uint64_t __X = (x); \ __asm ("bswap %0" : "+r" (__X)); \ __X; }) -#define __byte_swap_word(x) \ +#ifdef __OPTIMIZE__ + +#define __byte_swap_long_const(x) \ + (((x >> 56) | \ + ((x >> 40) & 0xff00) | \ + ((x >> 24) & 0xff0000) | \ + ((x >> 8) & 0xff000000) | \ + ((x << 8) & (0xfful << 32)) | \ + ((x << 24) & (0xfful << 40)) | \ + ((x << 40) & (0xfful << 48)) | \ + ((x << 56)))) + +#define __byte_swap_long(x) (__builtin_constant_p(x) ? \ + __byte_swap_long_const(x) : __byte_swap_long_var(x)) + +#else /* __OPTIMIZE__ */ + +#define __byte_swap_long(x) __byte_swap_long_var(x) + +#endif /* __OPTIMIZE__ */ + +#define __byte_swap_word_var(x) \ __extension__ ({ register __uint16_t __X = (x); \ __asm ("xchgb %h0, %b0" : "+Q" (__X)); \ __X; }) +#ifdef __OPTIMIZE__ + +#define __byte_swap_word_const(x) \ + ((((x) & 0xff00) >> 8) | \ + (((x) & 0x00ff) << 8)) + +#define __byte_swap_word(x) (__builtin_constant_p(x) ? \ + __byte_swap_word_const(x) : __byte_swap_word_var(x)) + +#else /* __OPTIMIZE__ */ + +#define __byte_swap_word(x) __byte_swap_word_var(x) + +#endif /* __OPTIMIZE__ */ + static __inline __uint64_t __bswap64(__uint64_t _x) { ==== //depot/projects/netperf/sys/amd64/include/legacyvar.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/legacyvar.h,v 1.3 2002/09/23 15:50:06 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/legacyvar.h,v 1.4 2003/09/23 00:03:44 peter Exp $ */ #ifndef _MACHINE_LEGACYVAR_H_ @@ -40,4 +40,15 @@ #undef LEGACY_ACCESSOR +int legacy_pcib_attach(device_t dev); +int legacy_pcib_maxslots(device_t dev); +u_int32_t legacy_pcib_read_config(device_t dev, int bus, int slot, int func, + int reg, int bytes); +int legacy_pcib_read_ivar(device_t dev, device_t child, int which, + uintptr_t *result); +void legacy_pcib_write_config(device_t dev, int bus, int slot, int func, + int reg, u_int32_t data, int bytes); +int legacy_pcib_write_ivar(device_t dev, device_t child, int which, + uintptr_t value); + #endif /* !_MACHINE_LEGACYVAR_H_ */ ==== //depot/projects/netperf/sys/amd64/include/md_var.h#3 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/md_var.h,v 1.67 2003/08/16 16:57:56 marcel Exp $ + * $FreeBSD: src/sys/amd64/include/md_var.h,v 1.68 2003/09/22 23:33:29 peter Exp $ */ #ifndef _MACHINE_MD_VAR_H_ @@ -50,6 +50,7 @@ extern char kstack[]; extern char sigcode[]; extern int szsigcode; +extern u_int basemem; typedef void alias_for_inthand_t(u_int cs, u_int ef, u_int esp, u_int ss); struct thread; ==== //depot/projects/netperf/sys/amd64/include/pci_cfgreg.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/pci_cfgreg.h,v 1.10 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/pci_cfgreg.h,v 1.11 2003/09/22 22:21:21 peter Exp $ * */ @@ -32,7 +32,7 @@ #define CONF1_ENABLE 0x80000000ul #define CONF1_ENABLE_CHK 0x80000000ul -#define CONF1_ENABLE_MSK 0x7ff00000ul +#define CONF1_ENABLE_MSK 0x7f000000ul #define CONF1_ENABLE_CHK1 0xff000001ul #define CONF1_ENABLE_MSK1 0x80000001ul #define CONF1_ENABLE_RES1 0x80000000ul ==== //depot/projects/netperf/sys/amd64/include/segments.h#2 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)segments.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/segments.h,v 1.35 2003/05/14 04:10:49 peter Exp $ + * $FreeBSD: src/sys/amd64/include/segments.h,v 1.36 2003/09/22 22:09:02 peter Exp $ */ #ifndef _MACHINE_SEGMENTS_H_ @@ -170,6 +170,30 @@ #define NRSVIDT 32 /* reserved entries for cpu exceptions */ /* + * Entries in the Interrupt Descriptor Table (IDT) + */ +#define IDT_DE 0 /* #DE: Divide Error */ +#define IDT_DB 1 /* #DB: Debug */ +#define IDT_NMI 2 /* Nonmaskable External Interrupt */ +#define IDT_BP 3 /* #BP: Breakpoint */ +#define IDT_OF 4 /* #OF: Overflow */ +#define IDT_BR 5 /* #BR: Bound Range Exceeded */ +#define IDT_UD 6 /* #UD: Undefined/Invalid Opcode */ +#define IDT_NM 7 /* #NM: No Math Coprocessor */ +#define IDT_DF 8 /* #DF: Double Fault */ +#define IDT_FPUGP 9 /* Coprocessor Segment Overrun */ +#define IDT_TS 10 /* #TS: Invalid TSS */ +#define IDT_NP 11 /* #NP: Segment Not Present */ +#define IDT_SS 12 /* #SS: Stack Segment Fault */ +#define IDT_GP 13 /* #GP: General Protection Fault */ +#define IDT_PF 14 /* #PF: Page Fault */ +#define IDT_MF 16 /* #MF: FPU Floating-Point Error */ +#define IDT_AC 17 /* #AC: Alignment Check */ +#define IDT_MC 18 /* #MC: Machine Check */ +#define IDT_XF 19 /* #XF: SIMD Floating-Point Exception */ +#define IDT_SYSCALL 0x80 /* System Call Interrupt Vector */ + +/* * Entries in the Global Descriptor Table (GDT) */ #define GNULL_SEL 0 /* Null Descriptor */ ==== //depot/projects/netperf/sys/amd64/include/specialreg.h#2 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.24 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.25 2003/09/22 22:51:46 peter Exp $ */ #ifndef _MACHINE_SPECIALREG_H_ @@ -133,16 +133,30 @@ #define MSR_P5_MC_ADDR 0x000 #define MSR_P5_MC_TYPE 0x001 #define MSR_TSC 0x010 +#define MSR_P5_CESR 0x011 +#define MSR_P5_CTR0 0x012 +#define MSR_P5_CTR1 0x013 +#define MSR_IA32_PLATFORM_ID 0x017 #define MSR_APICBASE 0x01b #define MSR_EBL_CR_POWERON 0x02a +#define MSR_TEST_CTL 0x033 #define MSR_BIOS_UPDT_TRIG 0x079 +#define MSR_BBL_CR_D0 0x088 +#define MSR_BBL_CR_D1 0x089 +#define MSR_BBL_CR_D2 0x08a #define MSR_BIOS_SIGN 0x08b #define MSR_PERFCTR0 0x0c1 #define MSR_PERFCTR1 0x0c2 #define MSR_MTRRcap 0x0fe -#define MSR_SYSENTER_CS 0x174 -#define MSR_SYSENTER_ESP 0x175 -#define MSR_SYSENTER_EIP 0x176 +#define MSR_BBL_CR_ADDR 0x116 +#define MSR_BBL_CR_DECC 0x118 +#define MSR_BBL_CR_CTL 0x119 +#define MSR_BBL_CR_TRIG 0x11a +#define MSR_BBL_CR_BUSY 0x11b +#define MSR_BBL_CR_CTL3 0x11e +#define MSR_SYSENTER_CS_MSR 0x174 +#define MSR_SYSENTER_ESP_MSR 0x175 +#define MSR_SYSENTER_EIP_MSR 0x176 #define MSR_MCG_CAP 0x179 #define MSR_MCG_STATUS 0x17a #define MSR_MCG_CTL 0x17b @@ -182,6 +196,14 @@ #define MSR_MC3_MISC 0x413 /* + * Constants related to MSR's. + */ +#define APICBASE_RESERVED 0x000006ff +#define APICBASE_BSP 0x00000100 +#define APICBASE_ENABLED 0x00000800 +#define APICBASE_ADDRESS 0xfffff000 + +/* * Constants related to MTRRs */ #define MTRR_N64K 8 /* numbers of fixed-size entries */ ==== //depot/projects/netperf/sys/amd64/include/vmparam.h#2 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)vmparam.h 5.9 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/include/vmparam.h,v 1.39 2003/07/09 23:04:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/vmparam.h,v 1.41 2003/09/23 03:20:34 peter Exp $ */ ==== //depot/projects/netperf/sys/amd64/isa/clock.c#3 (text+ko) ==== @@ -37,7 +37,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.200 2003/07/25 21:18:52 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.202 2003/09/22 23:02:24 peter Exp $"); /* * Routines to handle clock hardware. @@ -413,8 +413,18 @@ * takes about 1.5 usec for each of the i/o's in getit(). The loop * takes about 6 usec on a 486/33 and 13 usec on a 386/20. The * multiplications and divisions to scale the count take a while). + * + * However, if ddb is active then use a fake counter since reading + * the i8254 counter involves acquiring a lock. ddb must not go + * locking for many reasons, but it calls here for at least atkbd + * input. */ - prev_tick = getit(); +#ifdef DDB + if (db_active) + prev_tick = 0; + else +#endif + prev_tick = getit(); n -= 0; /* XXX actually guess no initial overhead */ /* * Calculate (n * (timer_freq / 1e6)) without using floating point @@ -441,7 +451,13 @@ / 1000000; while (ticks_left > 0) { - tick = getit(); +#ifdef DDB + if (db_active) { + inb(0x84); + tick = prev_tick + 1; + } else +#endif + tick = getit(); #ifdef DELAYDEBUG ++getit_calls; #endif @@ -880,6 +896,8 @@ intr_restore(crit); writertc(RTC_STATUSB, rtc_statusb); + + init_TSC_tc(); } >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Sep 23 14:22:23 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 346A816A4C0; Tue, 23 Sep 2003 14:22:23 -0700 (PDT) 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 02D2816A4BF for ; Tue, 23 Sep 2003 14:22:23 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 61AF543FEC for ; Tue, 23 Sep 2003 14:22:19 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8NLMJXJ065122 for ; Tue, 23 Sep 2003 14:22:19 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8NLMIZM065119 for perforce@freebsd.org; Tue, 23 Sep 2003 14:22:18 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Tue, 23 Sep 2003 14:22:18 -0700 (PDT) Message-Id: <200309232122.h8NLMIZM065119@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38496 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2003 21:22:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=38496 Change 38496 by sam@sam_ebb on 2003/09/23 14:22:05 First pass cleanup sweep and netbsd diff reduction: o add ipsec_osdep.h that holds os-specific definitions for portability o s/KASSERT/IPSEC_ASSERT/ for portability o s/SPLASSERT/IPSEC_SPLASSERT/ for portability o remove function names from ASSERT strings since line#+file pinpints the location o use __func__ uniformly to reduce string storage o convert some random #ifdef DIAGNOSTIC code to assertions o remove some debuggging assertions no longer needed Affected files ... .. //depot/projects/netperf/sys/netipsec/ipcomp.h#2 edit .. //depot/projects/netperf/sys/netipsec/ipsec.c#4 edit .. //depot/projects/netperf/sys/netipsec/ipsec.h#4 edit .. //depot/projects/netperf/sys/netipsec/ipsec_input.c#5 edit .. //depot/projects/netperf/sys/netipsec/ipsec_mbuf.c#2 edit .. //depot/projects/netperf/sys/netipsec/ipsec_osdep.h#1 add .. //depot/projects/netperf/sys/netipsec/ipsec_output.c#4 edit .. //depot/projects/netperf/sys/netipsec/key.c#4 edit .. //depot/projects/netperf/sys/netipsec/key_debug.c#2 edit .. //depot/projects/netperf/sys/netipsec/keysock.c#2 edit .. //depot/projects/netperf/sys/netipsec/xform_ah.c#4 edit .. //depot/projects/netperf/sys/netipsec/xform_esp.c#4 edit .. //depot/projects/netperf/sys/netipsec/xform_ipcomp.c#4 edit .. //depot/projects/netperf/sys/netipsec/xform_ipip.c#2 edit Differences ... ==== //depot/projects/netperf/sys/netipsec/ipcomp.h#2 (text+ko) ==== ==== //depot/projects/netperf/sys/netipsec/ipsec.c#4 (text+ko) ==== @@ -92,8 +92,6 @@ #include -#include - #ifdef IPSEC_DEBUG int ipsec_debug = 1; #else @@ -249,14 +247,14 @@ { struct secpolicy *sp; - KASSERT(tdbi != NULL, ("ipsec_getpolicy: null tdbi")); - KASSERT(dir == IPSEC_DIR_INBOUND || dir == IPSEC_DIR_OUTBOUND, - ("ipsec_getpolicy: invalid direction %u", dir)); + IPSEC_ASSERT(tdbi != NULL, ("null tdbi")); + IPSEC_ASSERT(dir == IPSEC_DIR_INBOUND || dir == IPSEC_DIR_OUTBOUND, + ("invalid direction %u", dir)); sp = KEY_ALLOCSP2(tdbi->spi, &tdbi->dst, tdbi->proto, dir); if (sp == NULL) /*XXX????*/ sp = KEY_ALLOCSP_DEFAULT(); - KASSERT(sp != NULL, ("ipsec_getpolicy: null SP")); + IPSEC_ASSERT(sp != NULL, ("null SP")); return sp; } @@ -283,11 +281,11 @@ struct secpolicy *currsp = NULL; /* policy on socket */ struct secpolicy *sp; - KASSERT(m != NULL, ("ipsec_getpolicybysock: null mbuf")); - KASSERT(inp != NULL, ("ipsec_getpolicybysock: null inpcb")); - KASSERT(error != NULL, ("ipsec_getpolicybysock: null error")); - KASSERT(dir == IPSEC_DIR_INBOUND || dir == IPSEC_DIR_OUTBOUND, - ("ipsec_getpolicybysock: invalid direction %u", dir)); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(inp != NULL, ("null inpcb")); + IPSEC_ASSERT(error != NULL, ("null error")); + IPSEC_ASSERT(dir == IPSEC_DIR_INBOUND || dir == IPSEC_DIR_OUTBOUND, + ("invalid direction %u", dir)); /* set spidx in pcb */ if (inp->inp_vflag & INP_IPV6PROTO) { @@ -304,7 +302,7 @@ if (*error) return NULL; - KASSERT(pcbsp != NULL, ("ipsec_getpolicybysock: null pcbsp")); + IPSEC_ASSERT(pcbsp != NULL, ("null pcbsp")); switch (dir) { case IPSEC_DIR_INBOUND: currsp = pcbsp->sp_in; @@ -313,7 +311,7 @@ currsp = pcbsp->sp_out; break; } - KASSERT(currsp != NULL, ("ipsec_getpolicybysock: null currsp")); + IPSEC_ASSERT(currsp != NULL, ("null currsp")); if (pcbsp->priv) { /* when privilieged socket */ switch (currsp->policy) { @@ -331,8 +329,8 @@ break; default: - ipseclog((LOG_ERR, "ipsec_getpolicybysock: " - "Invalid policy for PCB %d\n", currsp->policy)); + ipseclog((LOG_ERR, "%s: Invalid policy for PCB %d\n", + __func__, currsp->policy)); *error = EINVAL; return NULL; } @@ -341,9 +339,9 @@ if (sp == NULL) { /* no SP found */ switch (currsp->policy) { case IPSEC_POLICY_BYPASS: - ipseclog((LOG_ERR, "ipsec_getpolicybysock: " - "Illegal policy for non-priviliged defined %d\n", - currsp->policy)); + ipseclog((LOG_ERR, "%s: Illegal policy for " + "non-priviliged defined %d\n", + __func__, currsp->policy)); *error = EINVAL; return NULL; @@ -357,20 +355,18 @@ break; default: - ipseclog((LOG_ERR, "ipsec_getpolicybysock: " - "Invalid policy for PCB %d\n", currsp->policy)); + ipseclog((LOG_ERR, "%s: Invalid policy for " + "PCB %d\n", __func__, currsp->policy)); *error = EINVAL; return NULL; } } } - KASSERT(sp != NULL, - ("ipsec_getpolicybysock: null SP (priv %u policy %u", - pcbsp->priv, currsp->policy)); + IPSEC_ASSERT(sp != NULL, + ("null SP (priv %u policy %u", pcbsp->priv, currsp->policy)); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ipsec_getpolicybysock (priv %u policy %u) allocates " - "SP:%p (refcnt %u)\n", pcbsp->priv, currsp->policy, - sp, sp->refcnt)); + printf("DP %s (priv %u policy %u) allocate SP:%p (refcnt %u)\n", + __func__, pcbsp->priv, currsp->policy, sp, sp->refcnt)); return sp; } @@ -394,10 +390,10 @@ struct secpolicyindex spidx; struct secpolicy *sp; - KASSERT(m != NULL, ("ipsec_getpolicybyaddr: null mbuf")); - KASSERT(error != NULL, ("ipsec_getpolicybyaddr: null error")); - KASSERT(dir == IPSEC_DIR_INBOUND || dir == IPSEC_DIR_OUTBOUND, - ("ipsec4_getpolicybaddr: invalid direction %u", dir)); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(error != NULL, ("null error")); + IPSEC_ASSERT(dir == IPSEC_DIR_INBOUND || dir == IPSEC_DIR_OUTBOUND, + ("invalid direction %u", dir)); sp = NULL; if (key_havesp(dir)) { @@ -405,8 +401,8 @@ *error = ipsec_setspidx(m, &spidx, (flag & IP_FORWARDING) ? 0 : 1); if (*error != 0) { - DPRINTF(("ipsec_getpolicybyaddr: setpidx failed," - " dir %u flag %u\n", dir, flag)); + DPRINTF(("%s: setpidx failed, dir %u flag %u\n", + __func__, dir, flag)); bzero(&spidx, sizeof (spidx)); return NULL; } @@ -416,7 +412,7 @@ } if (sp == NULL) /* no SP found, use system default */ sp = KEY_ALLOCSP_DEFAULT(); - KASSERT(sp != NULL, ("ipsec_getpolicybyaddr: null SP")); + IPSEC_ASSERT(sp != NULL, ("null SP")); return sp; } @@ -435,17 +431,15 @@ else sp = ipsec_getpolicybysock(m, dir, inp, error); if (sp == NULL) { - KASSERT(*error != 0, - ("ipsec4_checkpolicy: getpolicy failed w/o error")); + IPSEC_ASSERT(*error != 0, ("getpolicy failed w/o error")); newipsecstat.ips_out_inval++; return NULL; } - KASSERT(*error == 0, - ("ipsec4_checkpolicy: sp w/ error set to %u", *error)); + IPSEC_ASSERT(*error == 0, ("sp w/ error set to %u", *error)); switch (sp->policy) { case IPSEC_POLICY_ENTRUST: default: - printf("ipsec4_checkpolicy: invalid policy %u\n", sp->policy); + printf("%s: invalid policy %u\n", __func__, sp->policy); /* fall thru... */ case IPSEC_POLICY_DISCARD: newipsecstat.ips_out_polvio++; @@ -475,10 +469,10 @@ { int error; - KASSERT(pcb != NULL, ("ipsec4_setspidx_inpcb: null pcb")); - KASSERT(pcb->inp_sp != NULL, ("ipsec4_setspidx_inpcb: null inp_sp")); - KASSERT(pcb->inp_sp->sp_out != NULL && pcb->inp_sp->sp_in != NULL, - ("ipsec4_setspidx_inpcb: null sp_in || sp_out")); + IPSEC_ASSERT(pcb != NULL, ("null pcb")); + IPSEC_ASSERT(pcb->inp_sp != NULL, ("null inp_sp")); + IPSEC_ASSERT(pcb->inp_sp->sp_out != NULL && pcb->inp_sp->sp_in != NULL, + ("null sp_in || sp_out")); error = ipsec_setspidx(m, &pcb->inp_sp->sp_in->spidx, 1); if (error == 0) { @@ -503,10 +497,10 @@ struct secpolicyindex *spidx; int error; - KASSERT(pcb != NULL, ("ipsec6_setspidx_in6pcb: null pcb")); - KASSERT(pcb->in6p_sp != NULL, ("ipsec6_setspidx_in6pcb: null inp_sp")); - KASSERT(pcb->in6p_sp->sp_out != NULL && pcb->in6p_sp->sp_in != NULL, - ("ipsec6_setspidx_in6pcb: null sp_in || sp_out")); + IPSEC_ASSERT(pcb != NULL, ("null pcb")); + IPSEC_ASSERT(pcb->in6p_sp != NULL, ("null inp_sp")); + IPSEC_ASSERT(pcb->in6p_sp->sp_out != NULL && pcb->in6p_sp->sp_in != NULL, + ("null sp_in || sp_out")); bzero(&pcb->in6p_sp->sp_in->spidx, sizeof(*spidx)); bzero(&pcb->in6p_sp->sp_out->spidx, sizeof(*spidx)); @@ -550,7 +544,7 @@ int len; int error; - KASSERT(m != NULL, ("ipsec_setspidx: null mbuf")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); /* * validate m->m_pkthdr.len. we see incorrect length if we @@ -562,18 +556,15 @@ len += n->m_len; if (m->m_pkthdr.len != len) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_setspidx: " - "total of m_len(%d) != pkthdr.len(%d), " - "ignored.\n", - len, m->m_pkthdr.len)); + printf("%s: pkthdr len(%d) mismatch (%d), ignored.\n", + __func__, len, m->m_pkthdr.len)); return EINVAL; } if (m->m_pkthdr.len < sizeof(struct ip)) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_setspidx: " - "pkthdr.len(%d) < sizeof(struct ip), ignored.\n", - m->m_pkthdr.len)); + printf("%s: pkthdr len(%d) too small (v4), ignored.\n", + __func__, m->m_pkthdr.len)); return EINVAL; } @@ -599,9 +590,8 @@ case 6: if (m->m_pkthdr.len < sizeof(struct ip6_hdr)) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_setspidx: " - "pkthdr.len(%d) < sizeof(struct ip6_hdr), " - "ignored.\n", m->m_pkthdr.len)); + printf("%s: pkthdr len(%d) too small (v6), " + "ignored\n", __func__, m->m_pkthdr.len)); return EINVAL; } error = ipsec6_setspidx_ipaddr(m, spidx); @@ -612,8 +602,8 @@ #endif default: KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_setspidx: " - "unknown IP version %u, ignored.\n", v)); + printf("%s: " "unknown IP version %u, ignored.\n", + __func__, v)); return EINVAL; } } @@ -625,9 +615,8 @@ int off; /* sanity check */ - KASSERT(m != NULL, ("ipsec4_get_ulp: null mbuf")); - KASSERT(m->m_pkthdr.len >= sizeof(struct ip), - ("ipsec4_get_ulp: packet too short")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(m->m_pkthdr.len >= sizeof(struct ip),("packet too short")); /* NB: ip_input() flips it into host endian XXX need more checking */ if (m->m_len < sizeof (struct ip)) { @@ -747,10 +736,10 @@ /* sanity check */ if (m == NULL) - panic("ipsec6_get_ulp: NULL pointer was passed.\n"); + panic("%s: NULL pointer was passed.\n", __func__); KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec6_get_ulp:\n"); kdebug_mbuf(m)); + printf("%s:\n", __func__); kdebug_mbuf(m)); /* set default */ spidx->ul_proto = IPSEC_ULPROTO_ANY; @@ -851,19 +840,16 @@ /* sanity check. */ if (so == NULL || pcb_sp == NULL) - panic("ipsec_init_policy: NULL pointer was passed.\n"); + panic("%s: NULL pointer was passed.\n", __func__); new = (struct inpcbpolicy *) malloc(sizeof(struct inpcbpolicy), M_IPSEC_INPCB, M_NOWAIT|M_ZERO); if (new == NULL) { - ipseclog((LOG_DEBUG, "ipsec_init_policy: No more memory.\n")); + ipseclog((LOG_DEBUG, "%s: No more memory.\n", __func__)); return ENOBUFS; } - if (so->so_cred != 0 && so->so_cred->cr_uid == 0) - new->priv = 1; - else - new->priv = 0; + new->priv = IPSEC_IS_PRIVILEGED_SO(so); if ((new->sp_in = KEY_NEWSP()) == NULL) { ipsec_delpcbpolicy(new); @@ -1005,7 +991,7 @@ xpl = (struct sadb_x_policy *)request; KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_set_policy: passed policy\n"); + printf("%s: passed policy\n", __func__); kdebug_sadb_x_policy((struct sadb_ext *)xpl)); /* check policy type */ @@ -1028,7 +1014,7 @@ KEY_FREESP(pcb_sp); *pcb_sp = newsp; KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_set_policy: new policy\n"); + printf("%s: new policy\n", __func__); kdebug_secpolicy(newsp)); return 0; @@ -1046,14 +1032,13 @@ *mp = key_sp2msg(pcb_sp); if (!*mp) { - ipseclog((LOG_DEBUG, "ipsec_get_policy: No more memory.\n")); + ipseclog((LOG_DEBUG, "%s: No more memory.\n", __func__)); return ENOBUFS; } (*mp)->m_type = MT_DATA; KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_get_policy:\n"); - kdebug_mbuf(*mp)); + printf("%s:\n", __func__); kdebug_mbuf(*mp)); return 0; } @@ -1085,7 +1070,7 @@ pcb_sp = &inp->inp_sp->sp_out; break; default: - ipseclog((LOG_ERR, "ipsec4_set_policy: invalid direction=%u\n", + ipseclog((LOG_ERR, "%s: invalid direction=%u\n", __func__, xpl->sadb_x_policy_dir)); return EINVAL; } @@ -1106,7 +1091,7 @@ /* sanity check. */ if (inp == NULL || request == NULL || mp == NULL) return EINVAL; - KASSERT(inp->inp_sp != NULL, ("ipsec4_get_policy: null inp_sp")); + IPSEC_ASSERT(inp->inp_sp != NULL, ("null inp_sp")); if (len < sizeof(*xpl)) return EINVAL; xpl = (struct sadb_x_policy *)request; @@ -1120,7 +1105,7 @@ pcb_sp = inp->inp_sp->sp_out; break; default: - ipseclog((LOG_ERR, "ipsec4_set_policy: invalid direction=%u\n", + ipseclog((LOG_ERR, "%s: invalid direction=%u\n", __func__, xpl->sadb_x_policy_dir)); return EINVAL; } @@ -1133,7 +1118,7 @@ ipsec4_delete_pcbpolicy(inp) struct inpcb *inp; { - KASSERT(inp != NULL, ("ipsec4_delete_pcbpolicy: null inp")); + IPSEC_ASSERT(inp != NULL, ("null inp")); if (inp->inp_sp == NULL) return 0; @@ -1178,7 +1163,7 @@ pcb_sp = &in6p->in6p_sp->sp_out; break; default: - ipseclog((LOG_ERR, "ipsec6_set_policy: invalid direction=%u\n", + ipseclog((LOG_ERR, "%s: invalid direction=%u\n", __func__, xpl->sadb_x_policy_dir)); return EINVAL; } @@ -1199,7 +1184,7 @@ /* sanity check. */ if (in6p == NULL || request == NULL || mp == NULL) return EINVAL; - KASSERT(in6p->in6p_sp != NULL, ("ipsec6_get_policy: null in6p_sp")); + IPSEC_ASSERT(in6p->in6p_sp != NULL, ("null in6p_sp")); if (len < sizeof(*xpl)) return EINVAL; xpl = (struct sadb_x_policy *)request; @@ -1213,7 +1198,7 @@ pcb_sp = in6p->in6p_sp->sp_out; break; default: - ipseclog((LOG_ERR, "ipsec6_set_policy: invalid direction=%u\n", + ipseclog((LOG_ERR, "%s: invalid direction=%u\n", __func__, xpl->sadb_x_policy_dir)); return EINVAL; } @@ -1225,7 +1210,7 @@ ipsec6_delete_pcbpolicy(in6p) struct in6pcb *in6p; { - KASSERT(in6p != NULL, ("ipsec6_delete_pcbpolicy: null in6p")); + IPSEC_ASSERT(in6p != NULL, ("null in6p")); if (in6p->in6p_sp == NULL) return 0; @@ -1255,10 +1240,9 @@ u_int esp_trans_deflev, esp_net_deflev; u_int ah_trans_deflev, ah_net_deflev; - KASSERT(isr != NULL && isr->sp != NULL, - ("ipsec_get_reqlevel: null argument")); - KASSERT(isr->sp->spidx.src.sa.sa_family == isr->sp->spidx.dst.sa.sa_family, - ("ipsec_get_reqlevel: af family mismatch, src %u, dst %u", + IPSEC_ASSERT(isr != NULL && isr->sp != NULL, ("null argument")); + IPSEC_ASSERT(isr->sp->spidx.src.sa.sa_family == isr->sp->spidx.dst.sa.sa_family, + ("af family mismatch, src %u, dst %u", isr->sp->spidx.src.sa.sa_family, isr->sp->spidx.dst.sa.sa_family)); @@ -1293,8 +1277,8 @@ break; #endif /* INET6 */ default: - panic("key_get_reqlevel: unknown af %u", - isr->sp->spidx.src.sa.sa_family); + panic("%s: unknown af %u", + __func__, isr->sp->spidx.src.sa.sa_family); } #undef IPSEC_CHECK_DEFAULT @@ -1322,8 +1306,7 @@ level = IPSEC_LEVEL_USE; break; default: - panic("ipsec_get_reqlevel: " - "Illegal protocol defined %u\n", + panic("%s: Illegal protocol defined %u\n", __func__, isr->saidx.proto); } break; @@ -1337,8 +1320,7 @@ break; default: - panic("ipsec_get_reqlevel: Illegal IPsec level %u\n", - isr->level); + panic("%s: Illegal IPsec level %u\n", __func__, isr->level); } return level; @@ -1361,8 +1343,7 @@ int need_auth; KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec_in_reject: using SP\n"); - kdebug_secpolicy(sp)); + printf("%s: using SP\n", __func__); kdebug_secpolicy(sp)); /* check policy */ switch (sp->policy) { @@ -1373,8 +1354,8 @@ return 0; } - KASSERT(sp->policy == IPSEC_POLICY_IPSEC, - ("ipsec_in_reject: invalid policy %u", sp->policy)); + IPSEC_ASSERT(sp->policy == IPSEC_POLICY_IPSEC, + ("invalid policy %u", sp->policy)); /* XXX should compare policy against ipsec header history */ @@ -1386,7 +1367,7 @@ case IPPROTO_ESP: if ((m->m_flags & M_DECRYPTED) == 0) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_in_reject: ESP m_flags:%x\n", + printf("%s: ESP m_flags:%x\n", __func__, m->m_flags)); return 1; } @@ -1396,7 +1377,7 @@ isr->sav->tdb_authalgxform != NULL && (m->m_flags & M_AUTHIPDGM) == 0) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_in_reject: ESP/AH m_flags:%x\n", + printf("%s: ESP/AH m_flags:%x\n", __func__, m->m_flags)); return 1; } @@ -1405,7 +1386,7 @@ need_auth = 1; if ((m->m_flags & M_AUTHIPHDR) == 0) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_in_reject: AH m_flags:%x\n", + printf("%s: AH m_flags:%x\n", __func__, m->m_flags)); return 1; } @@ -1437,7 +1418,7 @@ int error; int result; - KASSERT(m != NULL, ("ipsec4_in_reject_so: null mbuf")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); /* get SP for this packet. * When we are called from ip_forward(), we call @@ -1512,8 +1493,7 @@ size_t siz; KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec_hdrsiz: using SP\n"); - kdebug_secpolicy(sp)); + printf("%s: using SP\n", __func__); kdebug_secpolicy(sp)); switch (sp->policy) { case IPSEC_POLICY_DISCARD: @@ -1522,8 +1502,8 @@ return 0; } - KASSERT(sp->policy == IPSEC_POLICY_IPSEC, - ("ipsec_hdrsiz: invalid policy %u", sp->policy)); + IPSEC_ASSERT(sp->policy == IPSEC_POLICY_IPSEC, + ("invalid policy %u", sp->policy)); siz = 0; for (isr = sp->req; isr != NULL; isr = isr->next) { @@ -1552,8 +1532,8 @@ break; #endif default: - ipseclog((LOG_ERR, "ipsec_hdrsiz: " - "unknown AF %d in IPsec tunnel SA\n", + ipseclog((LOG_ERR, "%s: unknown AF %d in " + "IPsec tunnel SA\n", __func__, ((struct sockaddr *)&isr->saidx.dst)->sa_family)); break; } @@ -1575,7 +1555,7 @@ int error; size_t size; - KASSERT(m != NULL, ("ipsec4_hdrsiz: null mbuf")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); /* get SP for this packet. * When we are called from ip_forward(), we call @@ -1589,7 +1569,7 @@ if (sp != NULL) { size = ipsec_hdrsiz(sp); KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec4_hdrsiz: size:%lu.\n", + printf("%s: size:%lu.\n", __func__, (unsigned long)size)); KEY_FREESP(&sp); @@ -1613,9 +1593,9 @@ int error; size_t size; - KASSERT(m != NULL, ("ipsec6_hdrsiz: null mbuf")); - KASSERT(in6p == NULL || in6p->in6p_socket != NULL, - ("ipsec6_hdrsize: socket w/o inpcb")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(in6p == NULL || in6p->in6p_socket != NULL, + ("socket w/o inpcb")); /* get SP for this packet */ /* XXX Is it right to call with IP_FORWARDING. */ @@ -1628,7 +1608,7 @@ return 0; size = ipsec_hdrsiz(sp); KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec6_hdrsiz: size:%lu.\n", (unsigned long)size)); + printf("%s: size:%lu.\n", __func__, (unsigned long)size)); KEY_FREESP(&sp); return size; @@ -1656,12 +1636,10 @@ u_int32_t wsizeb; /* constant: bits of window size */ int frlast; /* constant: last frame */ -#if 0 - SPLASSERT(net, "ipsec_chkreplay"); -#endif + IPSEC_SPLASSERT_SOFTNET(__func__); - KASSERT(sav != NULL, ("ipsec_chkreplay: Null SA")); - KASSERT(sav->replay != NULL, ("ipsec_chkreplay: Null replay state")); + IPSEC_ASSERT(sav != NULL, ("Null SA")); + IPSEC_ASSERT(sav->replay != NULL, ("Null replay state")); replay = sav->replay; @@ -1718,12 +1696,10 @@ u_int32_t wsizeb; /* constant: bits of window size */ int frlast; /* constant: last frame */ -#if 0 - SPLASSERT(net, "ipsec_updatereplay"); -#endif + IPSEC_SPLASSERT_SOFTNET(__func__); - KASSERT(sav != NULL, ("ipsec_updatereplay: Null SA")); - KASSERT(sav->replay != NULL, ("ipsec_updatereplay: Null replay state")); + IPSEC_ASSERT(sav != NULL, ("Null SA")); + IPSEC_ASSERT(sav->replay != NULL, ("Null replay state")); replay = sav->replay; @@ -1794,8 +1770,8 @@ if ((sav->flags & SADB_X_EXT_CYCSEQ) == 0) return 1; - ipseclog((LOG_WARNING, "replay counter made %d cycle. %s\n", - replay->overflow, ipsec_logsastr(sav))); + ipseclog((LOG_WARNING, "%s: replay counter made %d cycle. %s\n", + __func__, replay->overflow, ipsec_logsastr(sav))); } replay->count++; @@ -1872,8 +1848,8 @@ char *p; struct secasindex *saidx = &sav->sah->saidx; - KASSERT(saidx->src.sa.sa_family == saidx->dst.sa.sa_family, - ("ipsec_logsastr: address family mismatch")); + IPSEC_ASSERT(saidx->src.sa.sa_family == saidx->dst.sa.sa_family, + ("address family mismatch")); p = buf; snprintf(buf, sizeof(buf), "SA(SPI=%u ", (u_int32_t)ntohl(sav->spi)); ==== //depot/projects/netperf/sys/netipsec/ipsec.h#4 (text+ko) ==== @@ -44,6 +44,7 @@ #include #include +#include #ifdef _KERNEL ==== //depot/projects/netperf/sys/netipsec/ipsec_input.c#5 (text+ko) ==== @@ -91,8 +91,6 @@ #include #include -#include - #define IPSEC_ISTAT(p,x,y,z) ((p) == IPPROTO_ESP ? (x)++ : \ (p) == IPPROTO_AH ? (y)++ : (z)++) @@ -113,7 +111,7 @@ IPSEC_ISTAT(sproto, espstat.esps_input, ahstat.ahs_input, ipcompstat.ipcomps_input); - KASSERT(m != NULL, ("ipsec_common_input: null packet")); + IPSEC_ASSERT(m != NULL, ("null packet")); if ((sproto == IPPROTO_ESP && !esp_enable) || (sproto == IPPROTO_AH && !ah_enable) || @@ -128,7 +126,7 @@ m_freem(m); IPSEC_ISTAT(sproto, espstat.esps_hdrops, ahstat.ahs_hdrops, ipcompstat.ipcomps_hdrops); - DPRINTF(("ipsec_common_input: packet too small\n")); + DPRINTF(("%s: packet too small\n", __func__)); return EINVAL; } @@ -170,8 +168,7 @@ break; #endif /* INET6 */ default: - DPRINTF(("ipsec_common_input: unsupported protocol " - "family %u\n", af)); + DPRINTF(("%s: unsupported protocol family %u\n", __func__, af)); m_freem(m); IPSEC_ISTAT(sproto, espstat.esps_nopf, ahstat.ahs_nopf, ipcompstat.ipcomps_nopf); @@ -181,9 +178,8 @@ /* NB: only pass dst since key_allocsa follows RFC2401 */ sav = KEY_ALLOCSA(&dst_address, sproto, spi); if (sav == NULL) { - DPRINTF(("ipsec_common_input: no key association found for" - " SA %s/%08lx/%u\n", - ipsec_address(&dst_address), + DPRINTF(("%s: no key association found for SA %s/%08lx/%u\n", + __func__, ipsec_address(&dst_address), (u_long) ntohl(spi), sproto)); IPSEC_ISTAT(sproto, espstat.esps_notdb, ahstat.ahs_notdb, ipcompstat.ipcomps_notdb); @@ -192,9 +188,8 @@ } if (sav->tdb_xform == NULL) { - DPRINTF(("ipsec_common_input: attempted to use uninitialized" - " SA %s/%08lx/%u\n", - ipsec_address(&dst_address), + DPRINTF(("%s: attempted to use uninitialized SA %s/%08lx/%u\n", + __func__, ipsec_address(&dst_address), (u_long) ntohl(spi), sproto)); IPSEC_ISTAT(sproto, espstat.esps_noxform, ahstat.ahs_noxform, ipcompstat.ipcomps_noxform); @@ -266,25 +261,22 @@ struct secasindex *saidx; int error; -#if 0 - SPLASSERT(net, "ipsec4_common_input_cb"); -#endif + IPSEC_SPLASSERT_SOFTNET(__func__); - KASSERT(m != NULL, ("ipsec4_common_input_cb: null mbuf")); - KASSERT(sav != NULL, ("ipsec4_common_input_cb: null SA")); - KASSERT(sav->sah != NULL, ("ipsec4_common_input_cb: null SAH")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(sav != NULL, ("null SA")); + IPSEC_ASSERT(sav->sah != NULL, ("null SAH")); saidx = &sav->sah->saidx; af = saidx->dst.sa.sa_family; - KASSERT(af == AF_INET, ("ipsec4_common_input_cb: unexpected af %u",af)); + IPSEC_ASSERT(af == AF_INET, ("unexpected af %u", af)); sproto = saidx->proto; - KASSERT(sproto == IPPROTO_ESP || sproto == IPPROTO_AH || + IPSEC_ASSERT(sproto == IPPROTO_ESP || sproto == IPPROTO_AH || sproto == IPPROTO_IPCOMP, - ("ipsec4_common_input_cb: unexpected security protocol %u", - sproto)); + ("unexpected security protocol %u", sproto)); /* Sanity check */ if (m == NULL) { - DPRINTF(("ipsec4_common_input_cb: null mbuf")); + DPRINTF(("%s: null mbuf", __func__)); IPSEC_ISTAT(sproto, espstat.esps_badkcr, ahstat.ahs_badkcr, ipcompstat.ipcomps_badkcr); KEY_FREESAV(&sav); @@ -294,9 +286,8 @@ if (skip != 0) { /* Fix IPv4 header */ if (m->m_len < skip && (m = m_pullup(m, skip)) == NULL) { - DPRINTF(("ipsec4_common_input_cb: processing failed " - "for SA %s/%08lx\n", - ipsec_address(&sav->sah->saidx.dst), + DPRINTF(("%s: processing failed for SA %s/%08lx\n", + __func__, ipsec_address(&sav->sah->saidx.dst), (u_long) ntohl(sav->spi))); IPSEC_ISTAT(sproto, espstat.esps_hdrops, ahstat.ahs_hdrops, ipcompstat.ipcomps_hdrops); @@ -343,9 +334,9 @@ (saidx->proxy.sa.sa_family != AF_INET && saidx->proxy.sa.sa_family != 0)) { - DPRINTF(("ipsec4_common_input_cb: inner " - "source address %s doesn't correspond to " - "expected proxy source %s, SA %s/%08lx\n", + DPRINTF(("%s: inner source address %s doesn't " + "correspond to expected proxy source %s, " + "SA %s/%08lx\n", __func__, inet_ntoa4(ipn.ip_src), ipsp_address(saidx->proxy), ipsp_address(saidx->dst), @@ -387,9 +378,9 @@ (saidx->proxy.sa.sa_family != AF_INET6 && saidx->proxy.sa.sa_family != 0)) { - DPRINTF(("ipsec4_common_input_cb: inner " - "source address %s doesn't correspond to " - "expected proxy source %s, SA %s/%08lx\n", + DPRINTF(("%s: inner source address %s doesn't " + "correspond to expected proxy source %s, " + "SA %s/%08lx\n", __func__, ip6_sprintf(&ip6n.ip6_src), ipsec_address(&saidx->proxy), ipsec_address(&saidx->dst), @@ -417,7 +408,7 @@ mtag = m_tag_get(PACKET_TAG_IPSEC_IN_DONE, sizeof(struct tdb_ident), M_NOWAIT); if (mtag == NULL) { - DPRINTF(("ipsec4_common_input_cb: failed to get tag\n")); + DPRINTF(("%s: failed to get tag\n", __func__)); IPSEC_ISTAT(sproto, espstat.esps_hdrops, ahstat.ahs_hdrops, ipcompstat.ipcomps_hdrops); error = ENOMEM; @@ -444,8 +435,8 @@ IPSEC_ISTAT(sproto, espstat.esps_qfull, ahstat.ahs_qfull, ipcompstat.ipcomps_qfull); - DPRINTF(("ipsec4_common_input_cb: queue full; " - "proto %u packet dropped\n", sproto)); + DPRINTF(("%s: queue full; proto %u packet dropped\n", + __func__, sproto)); return ENOBUFS; } return 0; @@ -465,7 +456,7 @@ struct ip6_ext ip6e; if (*offp < sizeof(struct ip6_hdr)) { - DPRINTF(("ipsec6_common_input: bad offset %u\n", *offp)); + DPRINTF(("%s: bad offset %u\n", __func__, *offp)); return IPPROTO_DONE; } else if (*offp == sizeof(struct ip6_hdr)) { protoff = offsetof(struct ip6_hdr, ip6_nxt); @@ -482,13 +473,13 @@ l = (ip6e.ip6e_len + 2) << 2; else l = (ip6e.ip6e_len + 1) << 3; - KASSERT(l > 0, ("ah6_input: l went zero or negative")); + IPSEC_ASSERT(l > 0, ("l went zero or negative")); } while (protoff + l < *offp); /* Malformed packet check */ if (protoff + l != *offp) { - DPRINTF(("ipsec6_common_input: bad packet header chain, " - "protoff %u, l %u, off %u\n", protoff, l, *offp)); + DPRINTF(("%s: bad packet header chain, protoff %u, " + "l %u, off %u\n", __func__, protoff, l, *offp)); IPSEC_ISTAT(proto, espstat.esps_hdrops, ahstat.ahs_hdrops, ipcompstat.ipcomps_hdrops); @@ -595,22 +586,20 @@ u_int8_t nxt8; int error, nest; - KASSERT(m != NULL, ("ipsec6_common_input_cb: null mbuf")); - KASSERT(sav != NULL, ("ipsec6_common_input_cb: null SA")); - KASSERT(sav->sah != NULL, ("ipsec6_common_input_cb: null SAH")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(sav != NULL, ("null SA")); + IPSEC_ASSERT(sav->sah != NULL, ("null SAH")); saidx = &sav->sah->saidx; af = saidx->dst.sa.sa_family; - KASSERT(af == AF_INET6, - ("ipsec6_common_input_cb: unexpected af %u", af)); + IPSEC_ASSERT(af == AF_INET6, ("unexpected af %u", af)); sproto = saidx->proto; - KASSERT(sproto == IPPROTO_ESP || sproto == IPPROTO_AH || + IPSEC_ASSERT(sproto == IPPROTO_ESP || sproto == IPPROTO_AH || sproto == IPPROTO_IPCOMP, - ("ipsec6_common_input_cb: unexpected security protocol %u", - sproto)); + ("unexpected security protocol %u", sproto)); /* Sanity check */ if (m == NULL) { - DPRINTF(("ipsec4_common_input_cb: null mbuf")); + DPRINTF(("%s: null mbuf", __func__)); IPSEC_ISTAT(sproto, espstat.esps_badkcr, ahstat.ahs_badkcr, ipcompstat.ipcomps_badkcr); error = EINVAL; @@ -621,8 +610,8 @@ if (m->m_len < sizeof(struct ip6_hdr) && (m = m_pullup(m, sizeof(struct ip6_hdr))) == NULL) { - DPRINTF(("ipsec_common_input_cb: processing failed " - "for SA %s/%08lx\n", ipsec_address(&sav->sah->saidx.dst), + DPRINTF(("%s: processing failed for SA %s/%08lx\n", + __func__, ipsec_address(&sav->sah->saidx.dst), (u_long) ntohl(sav->spi))); IPSEC_ISTAT(sproto, espstat.esps_hdrops, ahstat.ahs_hdrops, @@ -663,9 +652,9 @@ (saidx->proxy.sa.sa_family != AF_INET && saidx->proxy.sa.sa_family != 0)) { - DPRINTF(("ipsec_common_input_cb: inner " - "source address %s doesn't correspond to " - "expected proxy source %s, SA %s/%08lx\n", + DPRINTF(("%s: inner source address %s doesn't " + "correspond to expected proxy source %s, " + "SA %s/%08lx\n", __func__, inet_ntoa4(ipn.ip_src), ipsec_address(&saidx->proxy), ipsec_address(&saidx->dst), @@ -707,9 +696,9 @@ (saidx->proxy.sa.sa_family != AF_INET6 && saidx->proxy.sa.sa_family != 0)) { - DPRINTF(("ipsec_common_input_cb: inner " - "source address %s doesn't correspond to " - "expected proxy source %s, SA %s/%08lx\n", + DPRINTF(("%s: inner source address %s doesn't " + "correspond to expected proxy source %s, " + "SA %s/%08lx\n", __func__, ip6_sprintf(&ip6n.ip6_src), ipsec_address(&saidx->proxy), ipsec_address(&saidx->dst), @@ -735,8 +724,7 @@ mtag = m_tag_get(PACKET_TAG_IPSEC_IN_DONE, sizeof(struct tdb_ident), M_NOWAIT); if (mtag == NULL) { - DPRINTF(("ipsec_common_input_cb: failed to " - "get tag\n")); + DPRINTF(("%s: failed to get tag\n", __func__)); IPSEC_ISTAT(sproto, espstat.esps_hdrops, ahstat.ahs_hdrops, ipcompstat.ipcomps_hdrops); error = ENOMEM; ==== //depot/projects/netperf/sys/netipsec/ipsec_mbuf.c#2 (text+ko) ==== @@ -60,7 +60,7 @@ struct mbuf *n, *mfirst, *mlast; int len, off; - KASSERT(m0 != NULL, ("m_clone: null mbuf")); + IPSEC_ASSERT(m0 != NULL, ("null mbuf")); mprev = NULL; for (m = m0; m != NULL; m = mprev->m_next) { @@ -105,8 +105,7 @@ * it anyway, we try to reduce the number of mbufs and * clusters so that future work is easier). */ - KASSERT(m->m_flags & M_EXT, - ("m_clone: m_flags 0x%x", m->m_flags)); + IPSEC_ASSERT(m->m_flags & M_EXT, ("m_flags 0x%x", m->m_flags)); /* NB: we only coalesce into a cluster or larger */ if (mprev != NULL && (mprev->m_flags & M_EXT) && m->m_len <= M_TRAILINGSPACE(mprev)) { @@ -208,8 +207,8 @@ struct mbuf *m; unsigned remain; - KASSERT(m0 != NULL, ("m_dmakespace: null mbuf")); - KASSERT(hlen < MHLEN, ("m_makespace: hlen too big: %u", hlen)); + IPSEC_ASSERT(m0 != NULL, ("null mbuf")); + IPSEC_ASSERT(hlen < MHLEN, ("hlen too big: %u", hlen)); for (m = m0; m && skip > m->m_len; m = m->m_next) skip -= m->m_len; @@ -228,8 +227,7 @@ struct mbuf *n; /* XXX code doesn't handle clusters XXX */ - KASSERT(remain < MLEN, - ("m_makespace: remainder too big: %u", remain)); + IPSEC_ASSERT(remain < MLEN, ("remainder too big: %u", remain)); /* * Not enough space in m, split the contents * of m, inserting new mbufs as required. @@ -313,7 +311,7 @@ caddr_t retval; if (n <= 0) { /* No stupid arguments. */ - DPRINTF(("m_pad: pad length invalid (%d)\n", n)); + DPRINTF(("%s: pad length invalid (%d)\n", __func__, n)); m_freem(m); return NULL; } @@ -323,14 +321,14 @@ m0 = m; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Sep 23 16:08:28 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3A07316A4C0; Tue, 23 Sep 2003 16:08:28 -0700 (PDT) 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 0F3F716A4B3 for ; Tue, 23 Sep 2003 16:08:28 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F66643FE0 for ; Tue, 23 Sep 2003 16:08:27 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8NN8RXJ070679 for ; Tue, 23 Sep 2003 16:08:27 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8NN8RvZ070676 for perforce@freebsd.org; Tue, 23 Sep 2003 16:08:27 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Tue, 23 Sep 2003 16:08:27 -0700 (PDT) Message-Id: <200309232308.h8NN8RvZ070676@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38497 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2003 23:08:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=38497 Change 38497 by sam@sam_ebb on 2003/09/23 16:08:26 clearly noone is running this code... Affected files ... .. //depot/projects/netperf/sys/netipsec/ipsec.c#5 edit Differences ... ==== //depot/projects/netperf/sys/netipsec/ipsec.c#5 (text+ko) ==== @@ -903,8 +903,14 @@ struct ipsecrequest *p; p = malloc(sizeof(struct ipsecrequest), M_IPSEC_SR, M_NOWAIT|M_ZERO); - if (p != NULL) - mtx_init(&p->lock, "ipsec request", NULL, MTX_DEF); + if (p != NULL) { + /* + * Need recursion for when crypto callbacks happen + * directly, as in the case of software crypto. Need + * to look at how hard it is to remove this... + */ + mtx_init(&p->lock, "ipsec request", NULL, MTX_DEF|MTX_RECURSE); + } return p; } From owner-p4-projects@FreeBSD.ORG Tue Sep 23 16:13:36 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4BADE16A4C0; Tue, 23 Sep 2003 16:13:36 -0700 (PDT) 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 22EDE16A4B3 for ; Tue, 23 Sep 2003 16:13:36 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E6A543FA3 for ; Tue, 23 Sep 2003 16:13:34 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8NNDYXJ070892 for ; Tue, 23 Sep 2003 16:13:34 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8NNDXoV070888 for perforce@freebsd.org; Tue, 23 Sep 2003 16:13:33 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Tue, 23 Sep 2003 16:13:33 -0700 (PDT) Message-Id: <200309232313.h8NNDXoV070888@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38498 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2003 23:13:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=38498 Change 38498 by sam@sam_ebb on 2003/09/23 16:12:59 replace numerous bogus panic's with equally bogus assertions that at least go away on a production system Affected files ... .. //depot/projects/netperf/sys/netipsec/key.c#5 edit Differences ... ==== //depot/projects/netperf/sys/netipsec/key.c#5 (text+ko) ==== @@ -855,9 +855,9 @@ /* Which SA is the better ? */ - /* sanity check 2 */ - if (candidate->lft_c == NULL || sav->lft_c == NULL) - panic("%s: lifetime_current is NULL\n", __func__); + IPSEC_ASSERT(candidate->lft_c != NULL, + ("null candidate lifetime")); + IPSEC_ASSERT(sav->lft_c != NULL, ("null sav lifetime")); /* What the best method is to compare ? */ if (key_prefered_oldsa) { @@ -1059,7 +1059,6 @@ void key_freeso(struct socket *so) { - /* sanity check */ IPSEC_ASSERT(so != NULL, ("null so")); switch (so->so_proto->pr_domain->dom_family) { @@ -1276,11 +1275,9 @@ { struct secpolicy *newsp; - /* sanity check */ - if (xpl0 == NULL) - panic("%s: NULL pointer was passed.\n", __func__); - if (len < sizeof(*xpl0)) - panic("%s: invalid length.\n", __func__); + IPSEC_ASSERT(xpl0 != NULL, ("null xpl0")); + IPSEC_ASSERT(len >= sizeof(*xpl0), ("policy too short: %u", len)); + if (len != PFKEY_EXTLEN(xpl0)) { ipseclog((LOG_DEBUG, "%s: Invalid msg length.\n", __func__)); *error = EINVAL; @@ -1514,9 +1511,7 @@ caddr_t p; struct mbuf *m; - /* sanity check. */ - if (sp == NULL) - panic("%s: NULL pointer was passed.\n", __func__); + IPSEC_ASSERT(sp != NULL, ("null policy")); tlen = key_getspreqmsglen(sp); @@ -1589,8 +1584,8 @@ struct mbuf *result = NULL, *n; int len; - if (m == NULL || mhp == NULL) - panic("%s: null pointer passed", __func__); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); va_start(ap, nitem); for (i = 0; i < nitem; i++) { @@ -1606,10 +1601,9 @@ if (idx == SADB_EXT_RESERVED) { len = PFKEY_ALIGN8(sizeof(struct sadb_msg)); -#ifdef DIAGNOSTIC - if (len > MHLEN) - panic("assumption failed"); -#endif + + IPSEC_ASSERT(len <= MHLEN, ("header too big %u", len)); + MGETHDR(n, M_DONTWAIT, MT_DATA); if (!n) goto fail; @@ -1683,9 +1677,10 @@ struct secpolicy *newsp; int error; - /* sanity check */ - if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(so != NULL, ("null socket")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); if (mhp->ext[SADB_EXT_ADDRESS_SRC] == NULL || mhp->ext[SADB_EXT_ADDRESS_DST] == NULL || @@ -1943,9 +1938,10 @@ struct secpolicyindex spidx; struct secpolicy *sp; - /* sanity check */ - if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("key_spddelete: NULL pointer is passed.\n"); + IPSEC_ASSERT(so != NULL, ("null so")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); if (mhp->ext[SADB_EXT_ADDRESS_SRC] == NULL || mhp->ext[SADB_EXT_ADDRESS_DST] == NULL || @@ -2039,9 +2035,10 @@ u_int32_t id; struct secpolicy *sp; - /* sanity check */ - if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(so != NULL, ("null socket")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); if (mhp->ext[SADB_X_EXT_POLICY] == NULL || mhp->extlen[SADB_X_EXT_POLICY] < sizeof(struct sadb_x_policy)) { @@ -2135,9 +2132,10 @@ struct secpolicy *sp; struct mbuf *n; - /* sanity check */ - if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(so != NULL, ("null socket")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); if (mhp->ext[SADB_X_EXT_POLICY] == NULL || mhp->extlen[SADB_X_EXT_POLICY] < sizeof(struct sadb_x_policy)) { @@ -2185,13 +2183,10 @@ struct secspacq *newspacq; int error; - /* sanity check */ - if (sp == NULL) - panic("%s: NULL pointer is passed.\n", __func__); - if (sp->req != NULL) - panic("%s: called but there is request.\n", __func__); - if (sp->policy != IPSEC_POLICY_IPSEC) - panic("%s: policy mismathed. IPsec is expected.\n", __func__); + IPSEC_ASSERT(sp != NULL, ("null secpolicy")); + IPSEC_ASSERT(sp->req == NULL, ("policy exists")); + IPSEC_ASSERT(sp->policy == IPSEC_POLICY_IPSEC, + ("policy not IPSEC %u", sp->policy)); /* Get an entry to check whether sent message or not. */ newspacq = key_getspacq(&sp->spidx); @@ -2257,9 +2252,10 @@ struct secpolicy *sp; u_int dir; - /* sanity check */ - if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(so != NULL, ("null socket")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); if (m->m_len != PFKEY_ALIGN8(sizeof(struct sadb_msg))) return key_senderror(so, m, EINVAL); @@ -2308,9 +2304,10 @@ u_int dir; struct mbuf *n; - /* sanity check */ - if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(so != NULL, ("null socket")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); /* search SPD entry and get buffer size. */ cnt = 0; @@ -2445,9 +2442,7 @@ /* XXX: Why do we lock ? */ - /* sanity check */ - if (sp == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(sp != NULL, ("null secpolicy")); /* set msg header */ m = key_setsadbmsg(SADB_X_SPDEXPIRE, 0, 0, 0, 0, 0); @@ -2581,7 +2576,6 @@ u_int stateidx, state; int zombie = 0; - /* sanity check */ IPSEC_ASSERT(sah != NULL, ("NULL sah")); mtx_assert(&sahtree_lock, MA_OWNED); @@ -2647,9 +2641,10 @@ struct secasvar *newsav; const struct sadb_sa *xsa; - /* sanity check */ - if (m == NULL || mhp == NULL || mhp->msg == NULL || sah == NULL) - panic("key_newsa: NULL pointer is passed.\n"); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); + IPSEC_ASSERT(sah != NULL, ("null secashead")); newsav = malloc(sizeof(struct secasvar), M_IPSEC_SA, M_NOWAIT|M_ZERO); if (newsav == NULL) { @@ -2916,9 +2911,9 @@ { int error = 0; - /* sanity check */ - if (m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); /* initialization */ sav->replay = NULL; @@ -3585,9 +3580,7 @@ struct in_ifaddr *ia; #endif - /* sanity check */ - if (sa == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(sa != NULL, ("null sockaddr")); switch (sa->sa_family) { #ifdef INET @@ -4313,9 +4306,10 @@ u_int32_t reqid; int error; - /* sanity check */ - if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(so != NULL, ("null socket")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); if (mhp->ext[SADB_EXT_ADDRESS_SRC] == NULL || mhp->ext[SADB_EXT_ADDRESS_DST] == NULL) { @@ -4589,9 +4583,10 @@ u_int32_t reqid; int error; - /* sanity check */ - if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(so != NULL, ("null socket")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); /* map satype to proto */ if ((proto = key_satype2proto(mhp->msg->sadb_msg_satype)) == 0) { @@ -4783,9 +4778,10 @@ u_int32_t reqid; int error; - /* sanity check */ - if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(so != NULL, ("null socket")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); /* map satype to proto */ if ((proto = key_satype2proto(mhp->msg->sadb_msg_satype)) == 0) { @@ -4895,9 +4891,10 @@ const struct sadb_ident *idsrc, *iddst; int idsrclen, iddstlen; - /* sanity check */ - if (sah == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(sah != NULL, ("null secashead")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); /* don't make buffer if not there */ if (mhp->ext[SADB_EXT_IDENTITY_SRC] == NULL && @@ -4965,9 +4962,9 @@ { struct mbuf *n; - /* sanity check */ - if (m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); /* create new sadb_msg to reply. */ n = key_gather_mbuf(m, mhp, 1, 9, SADB_EXT_RESERVED, @@ -5017,9 +5014,10 @@ struct secasvar *sav = NULL; u_int16_t proto; - /* sanity check */ - if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(so != NULL, ("null socket")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); /* map satype to proto */ if ((proto = key_satype2proto(mhp->msg->sadb_msg_satype)) == 0) { @@ -5212,9 +5210,10 @@ struct secasvar *sav = NULL; u_int16_t proto; - /* sanity check */ - if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(so != NULL, ("null socket")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); /* map satype to proto */ if ((proto = key_satype2proto(mhp->msg->sadb_msg_satype)) == 0) { @@ -5577,7 +5576,6 @@ int error = -1; u_int32_t seq; - /* sanity check */ IPSEC_ASSERT(saidx != NULL, ("null saidx")); satype = key_proto2satype(saidx->proto); IPSEC_ASSERT(satype != 0, ("null satype, protocol %u", saidx->proto)); @@ -5861,9 +5859,10 @@ u_int16_t proto; int error; - /* sanity check */ - if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(so != NULL, ("null socket")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); /* * Error message from KMd. @@ -5977,9 +5976,10 @@ { struct secreg *reg, *newreg = 0; - /* sanity check */ - if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(so != NULL, ("null socket")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); /* check for invalid register message */ if (mhp->msg->sadb_msg_satype >= sizeof(regtree)/sizeof(regtree[0])) @@ -6131,7 +6131,6 @@ struct secreg *reg; int i; - /* sanity check */ IPSEC_ASSERT(so != NULL, ("NULL so")); /* @@ -6175,15 +6174,12 @@ /* XXX: Why do we lock ? */ s = splnet(); /*called from softclock()*/ - /* sanity check */ - if (sav == NULL) - panic("%s: NULL pointer is passed.\n", __func__); - if (sav->sah == NULL) - panic("%s: Why was SA index in SA NULL.\n", __func__); - if ((satype = key_proto2satype(sav->sah->saidx.proto)) == 0) - panic("%s: invalid proto is passed.\n", __func__); + IPSEC_ASSERT (sav != NULL, ("null sav")); + IPSEC_ASSERT (sav->sah != NULL, ("null sa header")); /* set msg header */ + satype = key_proto2satype(sav->sah->saidx.proto); + IPSEC_ASSERT(satype != 0, ("invalid proto, satype %u", satype)); m = key_setsadbmsg(SADB_EXPIRE, 0, satype, sav->seq, 0, sav->refcnt); if (!m) { error = ENOBUFS; @@ -6305,9 +6301,9 @@ u_int8_t state; u_int stateidx; - /* sanity check */ - if (so == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(so != NULL, ("null socket")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); /* map satype to proto */ if ((proto = key_satype2proto(mhp->msg->sadb_msg_satype)) == 0) { @@ -6391,9 +6387,10 @@ struct sadb_msg *newmsg; struct mbuf *n; - /* sanity check */ - if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(so != NULL, ("null socket")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); /* map satype to proto */ if ((proto = key_satype2proto(mhp->msg->sadb_msg_satype)) == 0) { @@ -6474,9 +6471,10 @@ { int olen; - /* sanity check */ - if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(so != NULL, ("null socket")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(mhp->msg != NULL, ("null msg")); olen = PFKEY_UNUNIT64(mhp->msg->sadb_msg_len); @@ -6565,9 +6563,8 @@ int error; int target; - /* sanity check */ - if (m == NULL || so == NULL) - panic("%s: NULL pointer is passed.\n", __func__); + IPSEC_ASSERT(so != NULL, ("null socket")); + IPSEC_ASSERT(m != NULL, ("null mbuf")); #if 0 /*kdebug_sadb assumes msg in linear buffer*/ KEYDEBUG(KEYDEBUG_KEY_DUMP, @@ -6817,8 +6814,8 @@ { struct sadb_msg *msg; - if (m->m_len < sizeof(struct sadb_msg)) - panic("%s: invalid mbuf passed", __func__); + IPSEC_ASSERT(m->m_len >= sizeof(struct sadb_msg), + ("mbuf too small, len %u", m->m_len)); msg = mtod(m, struct sadb_msg *); msg->sadb_msg_errno = code; @@ -6841,11 +6838,10 @@ int extlen; int toff; - /* sanity check */ - if (m == NULL || mhp == NULL) - panic("%s: NULL pointer is passed", __func__); - if (m->m_len < sizeof(struct sadb_msg)) - panic("%s: invalid mbuf passed", __func__); + IPSEC_ASSERT(m != NULL, ("null mbuf")); + IPSEC_ASSERT(mhp != NULL, ("null msghdr")); + IPSEC_ASSERT(m->m_len >= sizeof(struct sadb_msg), + ("mbuf too small, len %u", m->m_len)); /* initialize */ bzero(mhp, sizeof(*mhp)); @@ -7045,9 +7041,7 @@ caddr_t src; caddr_t dst; { - /* sanity check */ - if (sav->sah == NULL) - panic("%s: sav->sah == NULL", __func__); + IPSEC_ASSERT(sav->sah != NULL, ("null SA header")); /* XXX: check inner IP header */ @@ -7138,8 +7132,7 @@ struct secasvar *sav; { - if (!sav->iv) - panic("%s: sav == NULL", __func__); + IPSEC_ASSERT(sav->iv != NULL, ("null IV")); key_randomfill(sav->iv, sav->ivlen); } From owner-p4-projects@FreeBSD.ORG Tue Sep 23 20:56:19 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E830816A4C0; Tue, 23 Sep 2003 20:56:18 -0700 (PDT) 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 BD96816A4B3 for ; Tue, 23 Sep 2003 20:56:18 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A776343FE5 for ; Tue, 23 Sep 2003 20:56:16 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8O3uGXJ096001 for ; Tue, 23 Sep 2003 20:56:16 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8O3uG9d095998 for perforce@freebsd.org; Tue, 23 Sep 2003 20:56:16 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Tue, 23 Sep 2003 20:56:16 -0700 (PDT) Message-Id: <200309240356.h8O3uG9d095998@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38502 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2003 03:56:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=38502 Change 38502 by sam@sam_ebb on 2003/09/23 20:55:57 change explicit mtx operations to #defines to simplify future changes to a different lock type Affected files ... .. //depot/projects/netperf/sys/netipsec/key.c#6 edit Differences ... ==== //depot/projects/netperf/sys/netipsec/key.c#6 (text+ko) ==== @@ -125,15 +125,52 @@ static LIST_HEAD(_sptree, secpolicy) sptree[IPSEC_DIR_MAX]; /* SPD */ static struct mtx sptree_lock; +#define SPTREE_LOCK_INIT() \ + mtx_init(&sptree_lock, "sptree", \ + "fast ipsec security policy database", MTX_DEF) +#define SPTREE_LOCK_DESTROY() mtx_destroy(&sptree_lock) +#define SPTREE_LOCK() mtx_lock(&sptree_lock) +#define SPTREE_UNLOCK() mtx_unlock(&sptree_lock) +#define SPTREE_LOCK_ASSERT() mtx_assert(&sptree_lock, MA_OWNED) + static LIST_HEAD(_sahtree, secashead) sahtree; /* SAD */ static struct mtx sahtree_lock; +#define SAHTREE_LOCK_INIT() \ + mtx_init(&sahtree_lock, "sahtree", \ + "fast ipsec security association database", MTX_DEF) +#define SAHTREE_LOCK_DESTROY() mtx_destroy(&sahtree_lock) +#define SAHTREE_LOCK() mtx_lock(&sahtree_lock) +#define SAHTREE_UNLOCK() mtx_unlock(&sahtree_lock) +#define SAHTREE_LOCK_ASSERT() mtx_assert(&sahtree_lock, MA_OWNED) + /* registed list */ static LIST_HEAD(_regtree, secreg) regtree[SADB_SATYPE_MAX + 1]; static struct mtx regtree_lock; +#define REGTREE_LOCK_INIT() \ + mtx_init(®tree_lock, "regtree", "fast ipsec regtree", MTX_DEF) +#define REGTREE_LOCK_DESTROY() mtx_destroy(®tree_lock) +#define REGTREE_LOCK() mtx_lock(®tree_lock) +#define REGTREE_UNLOCK() mtx_unlock(®tree_lock) +#define REGTREE_LOCK_ASSERT() mtx_assert(®tree_lock, MA_OWNED) + static LIST_HEAD(_acqtree, secacq) acqtree; /* acquiring list */ static struct mtx acq_lock; +#define ACQ_LOCK_INIT() \ + mtx_init(&acq_lock, "acqtree", "fast ipsec acquire list", MTX_DEF) +#define ACQ_LOCK_DESTROY() mtx_destroy(&acq_lock) +#define ACQ_LOCK() mtx_lock(&acq_lock) +#define ACQ_UNLOCK() mtx_unlock(&acq_lock) +#define ACQ_LOCK_ASSERT() mtx_assert(&acq_lock, MA_OWNED) + static LIST_HEAD(_spacqtree, secspacq) spacqtree; /* SP acquiring list */ static struct mtx spacq_lock; +#define SPACQ_LOCK_INIT() \ + mtx_init(&spacq_lock, "spacqtree", \ + "fast ipsec security policy acquire list", MTX_DEF) +#define SPACQ_LOCK_DESTROY() mtx_destroy(&spacq_lock) +#define SPACQ_LOCK() mtx_lock(&spacq_lock) +#define SPACQ_UNLOCK() mtx_unlock(&spacq_lock) +#define SPACQ_LOCK_ASSERT() mtx_assert(&spacq_lock, MA_OWNED) /* search order for SAs */ static u_int saorder_state_valid[] = { @@ -517,7 +554,7 @@ printf("*** objects\n"); kdebug_secpolicyindex(spidx)); - mtx_lock(&sptree_lock); + SPTREE_LOCK(); LIST_FOREACH(sp, &sptree[dir], chain) { KEYDEBUG(KEYDEBUG_IPSEC_DATA, printf("*** in SPD\n"); @@ -538,7 +575,7 @@ sp->lastused = time_second; SP_ADDREF(sp); } - mtx_unlock(&sptree_lock); + SPTREE_UNLOCK(); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, printf("DP %s return SP:%p (ID=%u) refcnt %u\n", __func__, @@ -574,7 +611,7 @@ printf("spi %u proto %u dir %u\n", spi, proto, dir); kdebug_sockaddr(&dst->sa)); - mtx_lock(&sptree_lock); + SPTREE_LOCK(); LIST_FOREACH(sp, &sptree[dir], chain) { KEYDEBUG(KEYDEBUG_IPSEC_DATA, printf("*** in SPD\n"); @@ -601,7 +638,7 @@ sp->lastused = time_second; SP_ADDREF(sp); } - mtx_unlock(&sptree_lock); + SPTREE_UNLOCK(); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, printf("DP %s return SP:%p (ID=%u) refcnt %u\n", __func__, @@ -635,7 +672,7 @@ goto done; } - mtx_lock(&sptree_lock); + SPTREE_LOCK(); LIST_FOREACH(sp, &sptree[dir], chain) { if (sp->state == IPSEC_SPSTATE_DEAD) continue; @@ -677,7 +714,7 @@ sp->lastused = time_second; SP_ADDREF(sp); } - mtx_unlock(&sptree_lock); + SPTREE_UNLOCK(); done: KEYDEBUG(KEYDEBUG_IPSEC_STAMP, printf("DP %s return SP:%p (ID=%u) refcnt %u\n", __func__, @@ -792,16 +829,16 @@ struct secasvar *sav; u_int stateidx, state; - mtx_lock(&sahtree_lock); + SAHTREE_LOCK(); LIST_FOREACH(sah, &sahtree, chain) { if (sah->state == SADB_SASTATE_DEAD) continue; if (key_cmpsaidx(&sah->saidx, saidx, CMP_MODE_REQID)) { - mtx_unlock(&sahtree_lock); /* XXX??? */ + SAHTREE_UNLOCK(); goto found; } } - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); return NULL; @@ -837,7 +874,7 @@ /* initilize */ candidate = NULL; - mtx_lock(&sahtree_lock); + SAHTREE_LOCK(); for (sav = LIST_FIRST(&sah->savtree[state]); sav != NULL; sav = nextsav) { @@ -944,7 +981,7 @@ printf("DP %s cause refcnt++:%d SA:%p\n", __func__, candidate->refcnt, candidate)); } - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); return candidate; } @@ -986,7 +1023,7 @@ * IPsec tunnel packet is received. But ESP tunnel mode is * encrypted so we can't check internal IP header. */ - mtx_lock(&sahtree_lock); + SAHTREE_LOCK(); LIST_FOREACH(sah, &sahtree, chain) { /* search valid state */ for (stateidx = 0; @@ -1019,7 +1056,7 @@ } sav = NULL; done: - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, printf("DP %s return SA:%p; refcnt %u\n", __func__, @@ -1038,7 +1075,7 @@ IPSEC_ASSERT(sp != NULL, ("null sp")); - mtx_lock(&sptree_lock); + SPTREE_LOCK(); SP_DELREF(sp); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, @@ -1049,7 +1086,7 @@ *spp = NULL; key_delsp(sp); } - mtx_unlock(&sptree_lock); + SPTREE_UNLOCK(); } /* @@ -1153,7 +1190,7 @@ struct ipsecrequest *isr, *nextisr; IPSEC_ASSERT(sp != NULL, ("null sp")); - mtx_assert(&sptree_lock, MA_OWNED); + SPTREE_LOCK_ASSERT(); sp->state = IPSEC_SPSTATE_DEAD; @@ -1188,7 +1225,7 @@ IPSEC_ASSERT(spidx != NULL, ("null spidx")); - mtx_lock(&sptree_lock); + SPTREE_LOCK(); LIST_FOREACH(sp, &sptree[spidx->dir], chain) { if (sp->state == IPSEC_SPSTATE_DEAD) continue; @@ -1197,7 +1234,7 @@ break; } } - mtx_unlock(&sptree_lock); + SPTREE_UNLOCK(); return sp; } @@ -1212,7 +1249,7 @@ { struct secpolicy *sp; - mtx_lock(&sptree_lock); + SPTREE_LOCK(); LIST_FOREACH(sp, &sptree[IPSEC_DIR_INBOUND], chain) { if (sp->state == IPSEC_SPSTATE_DEAD) continue; @@ -1231,7 +1268,7 @@ } } done: - mtx_unlock(&sptree_lock); + SPTREE_UNLOCK(); return sp; } @@ -1833,7 +1870,7 @@ /* reset counter in order to deletion by timehandler. */ spacq->created = time_second; spacq->count = 0; - mtx_unlock(&spacq_lock); + SPACQ_UNLOCK(); } } @@ -2199,7 +2236,7 @@ newspacq->count++; return 0; } - mtx_unlock(&spacq_lock); + SPACQ_UNLOCK(); } else { /* make new entry for blocking to send SADB_ACQUIRE. */ newspacq = key_newspacq(&sp->spidx); @@ -2558,9 +2595,9 @@ /* add to saidxtree */ newsah->state = SADB_SASTATE_MATURE; - mtx_lock(&sahtree_lock); + SAHTREE_LOCK(); LIST_INSERT_HEAD(&sahtree, newsah, chain); - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); } return(newsah); } @@ -2577,7 +2614,7 @@ int zombie = 0; IPSEC_ASSERT(sah != NULL, ("NULL sah")); - mtx_assert(&sahtree_lock, MA_OWNED); + SAHTREE_LOCK_ASSERT(); /* searching all SA registerd in the secindex. */ for (stateidx = 0; @@ -2805,14 +2842,14 @@ { struct secashead *sah; - mtx_lock(&sahtree_lock); + SAHTREE_LOCK(); LIST_FOREACH(sah, &sahtree, chain) { if (sah->state == SADB_SASTATE_DEAD) continue; if (key_cmpsaidx(&sah->saidx, saidx, CMP_REQID)) break; } - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); return sah; } @@ -2841,7 +2878,7 @@ sav = NULL; /* check all SAD */ - mtx_lock(&sahtree_lock); + SAHTREE_LOCK(); LIST_FOREACH(sah, &sahtree, chain) { if (!key_ismyaddr((struct sockaddr *)&sah->saidx.dst)) continue; @@ -2849,7 +2886,7 @@ if (sav != NULL) break; } - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); return sav; } @@ -2869,7 +2906,7 @@ u_int stateidx, state; sav = NULL; - mtx_lock(&sahtree_lock); + SAHTREE_LOCK(); /* search all status */ for (stateidx = 0; stateidx < _ARRAYLEN(saorder_state_alive); @@ -2890,7 +2927,7 @@ break; } } - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); return sav; } @@ -3195,9 +3232,9 @@ break; } if (error == 0) { - mtx_lock(&sahtree_lock); + SAHTREE_LOCK(); key_sa_chgstate(sav, SADB_SASTATE_MATURE); - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); } return (error); } @@ -3945,7 +3982,7 @@ /* SPD */ for (dir = 0; dir < IPSEC_DIR_MAX; dir++) { - mtx_lock(&sptree_lock); + SPTREE_LOCK(); for (sp = LIST_FIRST(&sptree[dir]); sp != NULL; sp = nextsp) { @@ -3968,7 +4005,7 @@ continue; } } - mtx_unlock(&sptree_lock); + SPTREE_UNLOCK(); } } @@ -3979,7 +4016,7 @@ struct secasvar *sav, *nextsav; /* SAD */ - mtx_lock(&sahtree_lock); + SAHTREE_LOCK(); for (sah = LIST_FIRST(&sahtree); sah != NULL; sah = nextsah) { @@ -4134,7 +4171,7 @@ */ } } - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); } static void @@ -4143,7 +4180,7 @@ struct secacq *acq, *nextacq; /* ACQ tree */ - mtx_lock(&acq_lock); + ACQ_LOCK(); for (acq = LIST_FIRST(&acqtree); acq != NULL; acq = nextacq) { nextacq = LIST_NEXT(acq, chain); if (now - acq->created > key_blockacq_lifetime @@ -4152,7 +4189,7 @@ free(acq, M_IPSEC_SAQ); } } - mtx_unlock(&acq_lock); + ACQ_UNLOCK(); } static void @@ -4161,7 +4198,7 @@ struct secspacq *acq, *nextacq; /* SP ACQ tree */ - mtx_lock(&spacq_lock); + SPACQ_LOCK(); for (acq = LIST_FIRST(&spacqtree); acq != NULL; acq = nextacq) { nextacq = LIST_NEXT(acq, chain); if (now - acq->created > key_blockacq_lifetime @@ -4170,7 +4207,7 @@ free(acq, M_IPSEC_SAQ); } } - mtx_unlock(&spacq_lock); + SPACQ_UNLOCK(); } /* @@ -5062,7 +5099,7 @@ KEY_SETSECASIDX(proto, IPSEC_MODE_ANY, 0, src0 + 1, dst0 + 1, &saidx); /* get a SA header */ - mtx_lock(&sahtree_lock); + SAHTREE_LOCK(); LIST_FOREACH(sah, &sahtree, chain) { if (sah->state == SADB_SASTATE_DEAD) continue; @@ -5075,13 +5112,13 @@ break; } if (sah == NULL) { - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); ipseclog((LOG_DEBUG, "%s: no SA found.\n", __func__)); return key_senderror(so, m, ENOENT); } key_sa_chgstate(sav, SADB_SASTATE_DEAD); - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); KEY_FREESAV(&sav); { @@ -5130,7 +5167,7 @@ /* XXX boundary check against sa_len */ KEY_SETSECASIDX(proto, IPSEC_MODE_ANY, 0, src0 + 1, dst0 + 1, &saidx); - mtx_lock(&sahtree_lock); + SAHTREE_LOCK(); LIST_FOREACH(sah, &sahtree, chain) { if (sah->state == SADB_SASTATE_DEAD) continue; @@ -5160,7 +5197,7 @@ } } } - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); { struct mbuf *n; struct sadb_msg *newmsg; @@ -5245,7 +5282,7 @@ KEY_SETSECASIDX(proto, IPSEC_MODE_ANY, 0, src0 + 1, dst0 + 1, &saidx); /* get a SA header */ - mtx_lock(&sahtree_lock); + SAHTREE_LOCK(); LIST_FOREACH(sah, &sahtree, chain) { if (sah->state == SADB_SASTATE_DEAD) continue; @@ -5257,7 +5294,7 @@ if (sav) break; } - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); if (sah == NULL) { ipseclog((LOG_DEBUG, "%s: no SA found.\n", __func__)); return key_senderror(so, m, ENOENT); @@ -5751,9 +5788,9 @@ newacq->count = 0; /* add to acqtree */ - mtx_lock(&acq_lock); + ACQ_LOCK(); LIST_INSERT_HEAD(&acqtree, newacq, chain); - mtx_unlock(&acq_lock); + ACQ_UNLOCK(); return newacq; } @@ -5763,12 +5800,12 @@ { struct secacq *acq; - mtx_lock(&acq_lock); + ACQ_LOCK(); LIST_FOREACH(acq, &acqtree, chain) { if (key_cmpsaidx(saidx, &acq->saidx, CMP_EXACTLY)) break; } - mtx_unlock(&acq_lock); + ACQ_UNLOCK(); return acq; } @@ -5779,12 +5816,12 @@ { struct secacq *acq; - mtx_lock(&acq_lock); + ACQ_LOCK(); LIST_FOREACH(acq, &acqtree, chain) { if (acq->seq == seq) break; } - mtx_unlock(&acq_lock); + ACQ_UNLOCK(); return acq; } @@ -5808,9 +5845,9 @@ acq->count = 0; /* add to spacqtree */ - mtx_lock(&spacq_lock); + SPACQ_LOCK(); LIST_INSERT_HEAD(&spacqtree, acq, chain); - mtx_unlock(&spacq_lock); + SPACQ_UNLOCK(); return acq; } @@ -5821,14 +5858,14 @@ { struct secspacq *acq; - mtx_lock(&spacq_lock); + SPACQ_LOCK(); LIST_FOREACH(acq, &spacqtree, chain) { if (key_cmpspidx_exactly(spidx, &acq->spidx)) { /* NB: return holding spacq_lock */ return acq; } } - mtx_unlock(&spacq_lock); + SPACQ_UNLOCK(); return NULL; } @@ -5932,14 +5969,14 @@ KEY_SETSECASIDX(proto, IPSEC_MODE_ANY, 0, src0 + 1, dst0 + 1, &saidx); /* get a SA index */ - mtx_lock(&sahtree_lock); + SAHTREE_LOCK(); LIST_FOREACH(sah, &sahtree, chain) { if (sah->state == SADB_SASTATE_DEAD) continue; if (key_cmpsaidx(&sah->saidx, &saidx, CMP_MODE_REQID)) break; } - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); if (sah != NULL) { ipseclog((LOG_DEBUG, "%s: a SA exists already.\n", __func__)); return key_senderror(so, m, EEXIST); @@ -5990,10 +6027,10 @@ goto setmsg; /* check whether existing or not */ - mtx_lock(®tree_lock); + REGTREE_LOCK(); LIST_FOREACH(reg, ®tree[mhp->msg->sadb_msg_satype], chain) { if (reg->so == so) { - mtx_unlock(®tree_lock); + REGTREE_UNLOCK(); ipseclog((LOG_DEBUG, "%s: socket exists already.\n", __func__)); return key_senderror(so, m, EEXIST); @@ -6003,7 +6040,7 @@ /* create regnode */ newreg = malloc(sizeof(struct secreg), M_IPSEC_SAR, M_NOWAIT|M_ZERO); if (newreg == NULL) { - mtx_unlock(®tree_lock); + REGTREE_UNLOCK(); ipseclog((LOG_DEBUG, "%s: No more memory.\n", __func__)); return key_senderror(so, m, ENOBUFS); } @@ -6013,7 +6050,7 @@ /* add regnode to regtree. */ LIST_INSERT_HEAD(®tree[mhp->msg->sadb_msg_satype], newreg, chain); - mtx_unlock(®tree_lock); + REGTREE_UNLOCK(); setmsg: { @@ -6138,7 +6175,7 @@ * check all type of SA, because there is a potential that * one socket is registered to multiple type of SA. */ - mtx_lock(®tree_lock); + REGTREE_LOCK(); for (i = 0; i <= SADB_SATYPE_MAX; i++) { LIST_FOREACH(reg, ®tree[i], chain) { if (reg->so == so && __LIST_CHAINED(reg)) { @@ -6148,7 +6185,7 @@ } } } - mtx_unlock(®tree_lock); + REGTREE_UNLOCK(); } /* @@ -6313,7 +6350,7 @@ } /* no SATYPE specified, i.e. flushing all SA. */ - mtx_lock(&sahtree_lock); + SAHTREE_LOCK(); for (sah = LIST_FIRST(&sahtree); sah != NULL; sah = nextsah) { @@ -6340,7 +6377,7 @@ sah->state = SADB_SASTATE_DEAD; } - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); if (m->m_len < sizeof(struct sadb_msg) || sizeof(struct sadb_msg) > m->m_len + M_TRAILINGSPACE(m)) { @@ -6401,7 +6438,7 @@ /* count sav entries to be sent to the userland. */ cnt = 0; - mtx_lock(&sahtree_lock); + SAHTREE_LOCK(); LIST_FOREACH(sah, &sahtree, chain) { if (mhp->msg->sadb_msg_satype != SADB_SATYPE_UNSPEC && proto != sah->saidx.proto) @@ -6418,7 +6455,7 @@ } if (cnt == 0) { - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); return key_senderror(so, m, ENOENT); } @@ -6431,7 +6468,7 @@ /* map proto to satype */ if ((satype = key_proto2satype(sah->saidx.proto)) == 0) { - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); ipseclog((LOG_DEBUG, "%s: there was invalid proto in " "SAD.\n", __func__)); return key_senderror(so, m, EINVAL); @@ -6445,14 +6482,14 @@ n = key_setdumpsa(sav, SADB_DUMP, satype, --cnt, mhp->msg->sadb_msg_pid); if (!n) { - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); return key_senderror(so, m, ENOBUFS); } key_sendup_mbuf(so, n, KEY_SENDUP_ONE); } } } - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); m_freem(m); return 0; @@ -6993,11 +7030,11 @@ { int i; - mtx_init(&sptree_lock, "sptree lock", "fast ipsec sadb", MTX_DEF); - mtx_init(®tree_lock, "regtree lock", "fast ipsec sadb", MTX_DEF); - mtx_init(&sahtree_lock, "sahtree lock", "fast ipsec sadb", MTX_DEF); - mtx_init(&acq_lock, "acqtree lock", "fast ipsec sadb", MTX_DEF); - mtx_init(&spacq_lock, "spacqtree lock", "fast ipsec sadb", MTX_DEF); + SPTREE_LOCK_INIT(); + REGTREE_LOCK_INIT(); + SAHTREE_LOCK_INIT(); + ACQ_LOCK_INIT(); + SPACQ_LOCK_INIT(); for (i = 0; i < IPSEC_DIR_MAX; i++) LIST_INIT(&sptree[i]); @@ -7099,7 +7136,7 @@ struct secashead *sah; struct route *ro; - mtx_lock(&sahtree_lock); + SAHTREE_LOCK(); LIST_FOREACH(sah, &sahtree, chain) { ro = &sah->sa_route; if (ro->ro_rt && dst->sa_len == ro->ro_dst.sa_len @@ -7108,7 +7145,7 @@ ro->ro_rt = (struct rtentry *)NULL; } } - mtx_unlock(&sahtree_lock); + SAHTREE_UNLOCK(); } static void @@ -7117,7 +7154,7 @@ u_int8_t state; { IPSEC_ASSERT(sav != NULL, ("NULL sav")); - mtx_assert(&sahtree_lock, MA_OWNED); + SAHTREE_LOCK_ASSERT(); if (sav->state != state) { if (__LIST_CHAINED(sav)) From owner-p4-projects@FreeBSD.ORG Wed Sep 24 08:27:23 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9384516A4C0; Wed, 24 Sep 2003 08:27:23 -0700 (PDT) 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 6E19F16A4B3 for ; Wed, 24 Sep 2003 08:27:23 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B99F43FF9 for ; Wed, 24 Sep 2003 08:27:22 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8OFRMXJ084514 for ; Wed, 24 Sep 2003 08:27:22 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8OFRMik084511 for perforce@freebsd.org; Wed, 24 Sep 2003 08:27:22 -0700 (PDT) (envelope-from jhb@freebsd.org) Date: Wed, 24 Sep 2003 08:27:22 -0700 (PDT) Message-Id: <200309241527.h8OFRMik084511@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 Subject: PERFORCE change 38516 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2003 15:27:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=38516 Change 38516 by jhb@jhb_laptop on 2003/09/24 08:26:54 Add methods to ACPI for getting/setting device power state. Affected files ... .. //depot/projects/power/sys/dev/acpica/acpi.c#2 edit Differences ... ==== //depot/projects/power/sys/dev/acpica/acpi.c#2 (text+ko) ==== @@ -1415,6 +1415,43 @@ } /* + * Get a specified device's power state. + */ +ACPI_STATUS +acpi_GetPowerState(ACPI_HANDLE handle, int *state) +{ + + return (acpi_EvaluateInteger(handle, "_PSC", state); +} + +/* + * Set a specified device's power state. + */ +ACPI_STATUS +acpi_SetPowerState(ACPI_HANDLE handle, int state) +{ + char *method; + + switch (state) { + case ACPI_STATE_D0: + method = "_PS0"; + break; + case ACPI_STATE_D1: + method = "_PS1"; + break; + case ACPI_STATE_D2: + method = "_PS2"; + break; + case ACPI_STATE_D3: + method = "_PS3"; + break; + default: + return (AE_BAD_PARAMETER); + } + return (AcpiEvaluateObject(handle, method, NULL, NULL); +} + +/* * Set the system sleep state * * Currently we support S1-S5 but S4 is only S4BIOS From owner-p4-projects@FreeBSD.ORG Wed Sep 24 09:45:59 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 63AD316A4C0; Wed, 24 Sep 2003 09:45:59 -0700 (PDT) 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 3AEE716A4B3 for ; Wed, 24 Sep 2003 09:45:59 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B576743FF5 for ; Wed, 24 Sep 2003 09:45:58 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8OGjwXJ094140 for ; Wed, 24 Sep 2003 09:45:58 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8OGjw5a094137 for perforce@freebsd.org; Wed, 24 Sep 2003 09:45:58 -0700 (PDT) (envelope-from jhb@freebsd.org) Date: Wed, 24 Sep 2003 09:45:58 -0700 (PDT) Message-Id: <200309241645.h8OGjw5a094137@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 Subject: PERFORCE change 38518 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2003 16:45:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=38518 Change 38518 by jhb@jhb_laptop on 2003/09/24 09:45:08 Add prototypes. Affected files ... .. //depot/projects/power/sys/dev/acpica/acpivar.h#2 edit Differences ... ==== //depot/projects/power/sys/dev/acpica/acpivar.h#2 (text+ko) ==== @@ -172,6 +172,7 @@ extern BOOLEAN acpi_MatchHid(device_t dev, char *hid); extern ACPI_STATUS acpi_GetHandleInScope(ACPI_HANDLE parent, char *path, ACPI_HANDLE *result); +extern ACPI_STATUS acpi_GetPowerState(ACPI_HANDLE handle, int *state); extern ACPI_BUFFER *acpi_AllocBuffer(int size); extern ACPI_STATUS acpi_EvaluateInteger(ACPI_HANDLE handle, char *path, int *number); @@ -185,6 +186,7 @@ extern ACPI_STATUS acpi_AppendBufferResource(ACPI_BUFFER *buf, ACPI_RESOURCE *res); extern ACPI_STATUS acpi_SetIntrModel(int model); +extern ACPI_STATUS acpi_SetPowerState(ACPI_HANDLE handle, int state); extern ACPI_STATUS acpi_SetSleepState(struct acpi_softc *sc, int state); extern ACPI_STATUS acpi_Enable(struct acpi_softc *sc); extern ACPI_STATUS acpi_Disable(struct acpi_softc *sc); From owner-p4-projects@FreeBSD.ORG Wed Sep 24 11:05:38 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F33ED16A4C0; Wed, 24 Sep 2003 11:05:37 -0700 (PDT) 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 AE99616A4B3 for ; Wed, 24 Sep 2003 11:05:37 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C74644014 for ; Wed, 24 Sep 2003 11:05:37 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8OI5aXJ099411 for ; Wed, 24 Sep 2003 11:05:36 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8OI5alR099408 for perforce@freebsd.org; Wed, 24 Sep 2003 11:05:36 -0700 (PDT) (envelope-from jhb@freebsd.org) Date: Wed, 24 Sep 2003 11:05:36 -0700 (PDT) Message-Id: <200309241805.h8OI5alR099408@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 Subject: PERFORCE change 38520 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2003 18:05:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=38520 Change 38520 by jhb@jhb_laptop on 2003/09/24 11:05:16 Update the ACPI PCI bus driver to set the ACPI device power state "outside" of the PCI power state. Affected files ... .. //depot/projects/power/sys/dev/acpica/acpi_pci.c#2 edit Differences ... ==== //depot/projects/power/sys/dev/acpica/acpi_pci.c#2 (text+ko) ==== @@ -65,11 +65,8 @@ static int acpi_pci_attach(device_t dev); static int acpi_pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result); -#if 0 static int acpi_pci_set_powerstate_method(device_t dev, device_t child, int state); -static int acpi_pci_get_powerstate_method(device_t dev, device_t child); -#endif static ACPI_STATUS acpi_pci_save_handle(ACPI_HANDLE handle, UINT32 level, void *context, void **status); @@ -108,9 +105,8 @@ DEVMETHOD(pci_disable_busmaster, pci_disable_busmaster_method), DEVMETHOD(pci_enable_io, pci_enable_io_method), DEVMETHOD(pci_disable_io, pci_disable_io_method), - /* XXX: We should override these two. */ DEVMETHOD(pci_get_powerstate, pci_get_powerstate_method), - DEVMETHOD(pci_set_powerstate, pci_set_powerstate_method), + DEVMETHOD(pci_set_powerstate, acpi_pci_set_powerstate_method), DEVMETHOD(pci_assign_interrupt, pci_assign_interrupt_method), { 0, 0 } @@ -140,24 +136,58 @@ return(pci_read_ivar(dev, child, which, result)); } -#if 0 /* * PCI power manangement */ static int acpi_pci_set_powerstate_method(device_t dev, device_t child, int state) { - /* XXX: TODO */ - return (ENXIO); -} + ACPI_STATUS status; + int acpi_state, old_state, error; + + switch (state) { + case PCI_POWERSTATE_D0: + acpi_state = ACPI_STATE_D0; + break; + case PCI_POWERSTATE_D1: + acpi_state = ACPI_STATE_D1; + break; + case PCI_POWERSTATE_D2: + acpi_state = ACPI_STATE_D2; + break; + case PCI_POWERSTATE_D3: + acpi_state = ACPI_STATE_D3; + break; + default: + return (EINVAL); + } -static int -acpi_pci_get_powerstate_method(device_t dev, device_t child) -{ - /* XXX: TODO */ - return (ENXIO); + /* + * We set the state using PCI Power Management outside of setting + * the ACPI state. This means that when powering down a device, we + * first shut it down using PCI, and then using ACPI, which lets ACPI + * try to power down any Power Resources that are now no longer used. + * When powering up a device, we let ACPI set the state first so that + * it can enable any needed Power Resources before changing the PCI + * power state. + */ + old_state = pci_get_powerstate(child); + if (old_state < state) { + error = pci_set_powerstate_method(dev, child, state); + if (error) + return (error); + } + status = acpi_SetPowerState(acpi_get_handle(child), acpi_state); + if (ACPI_FAILURE(status)) + device_printf(dev, + "Failed to set ACPI power state D%d on %s: %s\n", + acpi_state, device_get_nameunit(child), + AcpiFormatException(status)); + if (state > old_state) + return (pci_set_powerstate_method(dev, child, state)); + else + return (0); } -#endif static ACPI_STATUS acpi_pci_save_handle(ACPI_HANDLE handle, UINT32 level, void *context, From owner-p4-projects@FreeBSD.ORG Wed Sep 24 11:06:40 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3D83616A4C0; Wed, 24 Sep 2003 11:06:40 -0700 (PDT) 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 12ED216A4B3 for ; Wed, 24 Sep 2003 11:06:40 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6AAD04400F for ; Wed, 24 Sep 2003 11:06:39 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8OI6dXJ099477 for ; Wed, 24 Sep 2003 11:06:39 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8OI6clh099474 for perforce@freebsd.org; Wed, 24 Sep 2003 11:06:38 -0700 (PDT) (envelope-from jhb@freebsd.org) Date: Wed, 24 Sep 2003 11:06:38 -0700 (PDT) Message-Id: <200309241806.h8OI6clh099474@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 Subject: PERFORCE change 38521 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2003 18:06:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=38521 Change 38521 by jhb@jhb_laptop on 2003/09/24 11:06:19 Update. Affected files ... .. //depot/projects/power/notes#4 edit Differences ... ==== //depot/projects/power/notes#4 (text+ko) ==== @@ -11,10 +11,15 @@ - support PCI devices by detaching driver and going into D3 for off and D0 and re-attach for on - add support for ACPI devices using _PSx methods - - add ACPI device powerstate constants - - add ACPI helper functions for setting a device's powerstate via _PSx - - fix ACPI PCI bus driver to call _PSx outside of calling the default + + add ACPI device powerstate constants + + ACPI_STATE_Dx already exist + + add ACPI helper functions for getting and setting a device's + powerstate via _PSx + + fix ACPI PCI bus driver to call _PSx outside of calling the default PCI powerstate functions + - XXX: need to handle _PRx and _SxD !! + - We should be able to hook the power resource stuff up once we have + our power shadow tree in the acpi_SetPowerState() function. - convert to a model of suspending the device via device_suspend()/resume() rather than detach()/attach() - This may require fixes to drivers so that they continue to function From owner-p4-projects@FreeBSD.ORG Wed Sep 24 13:03:08 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4829716A4C0; Wed, 24 Sep 2003 13:03:08 -0700 (PDT) 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 0255F16A4B3 for ; Wed, 24 Sep 2003 13:03:07 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5465E44017 for ; Wed, 24 Sep 2003 13:03:07 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8OK37XJ012567 for ; Wed, 24 Sep 2003 13:03:07 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8OK36mO012564 for perforce@freebsd.org; Wed, 24 Sep 2003 13:03:06 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Wed, 24 Sep 2003 13:03:06 -0700 (PDT) Message-Id: <200309242003.h8OK36mO012564@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38530 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2003 20:03:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=38530 Change 38530 by sam@sam_ebb on 2003/09/24 13:03:06 convert explicit mtx calls to #defines to simpify future changes and to improve portability Affected files ... .. //depot/projects/netperf/sys/netipsec/ipsec.c#6 edit .. //depot/projects/netperf/sys/netipsec/ipsec.h#5 edit .. //depot/projects/netperf/sys/netipsec/key.c#7 edit .. //depot/projects/netperf/sys/netipsec/keydb.h#4 edit .. //depot/projects/netperf/sys/netipsec/xform_ah.c#5 edit .. //depot/projects/netperf/sys/netipsec/xform_esp.c#5 edit .. //depot/projects/netperf/sys/netipsec/xform_ipcomp.c#5 edit Differences ... ==== //depot/projects/netperf/sys/netipsec/ipsec.c#6 (text+ko) ==== @@ -903,21 +903,15 @@ struct ipsecrequest *p; p = malloc(sizeof(struct ipsecrequest), M_IPSEC_SR, M_NOWAIT|M_ZERO); - if (p != NULL) { - /* - * Need recursion for when crypto callbacks happen - * directly, as in the case of software crypto. Need - * to look at how hard it is to remove this... - */ - mtx_init(&p->lock, "ipsec request", NULL, MTX_DEF|MTX_RECURSE); - } + if (p != NULL) + IPSECREQUEST_LOCK_INIT(p); return p; } void ipsec_delisr(struct ipsecrequest *p) { - mtx_destroy(&p->lock); + IPSECREQUEST_LOCK_DESTROY(p); free(p, M_IPSEC_SR); } ==== //depot/projects/netperf/sys/netipsec/ipsec.h#5 (text+ko) ==== @@ -99,6 +99,13 @@ long validtime; /* duration this policy is valid without use */ }; +#define SECPOLICY_LOCK_INIT(_sp) \ + mtx_init(&(_sp)->lock, "ipsec policy", NULL, MTX_DEF) +#define SECPOLICY_LOCK(_sp) mtx_lock(&(_sp)->lock) +#define SECPOLICY_UNLOCK(_sp) mtx_unlock(&(_sp)->lock) +#define SECPOLICY_LOCK_DESTROY(_sp) mtx_destroy(&(_sp)->lock) +#define SECPOLICY_LOCK_ASSERT(_sp) mtx_assert(&(_sp)->lock, MA_OWNED) + /* Request for IPsec */ struct ipsecrequest { struct ipsecrequest *next; @@ -113,6 +120,18 @@ struct mtx lock; /* to interlock updates */ }; +/* + * Need recursion for when crypto callbacks happen directly, + * as in the case of software crypto. Need to look at how + * hard it is to remove this... + */ +#define IPSECREQUEST_LOCK_INIT(_isr) \ + mtx_init(&(_isr)->lock, "ipsec request", NULL, MTX_DEF | MTX_RECURSE) +#define IPSECREQUEST_LOCK(_isr) mtx_lock(&(_isr)->lock) +#define IPSECREQUEST_UNLOCK(_isr) mtx_unlock(&(_isr)->lock) +#define IPSECREQUEST_LOCK_DESTROY(_isr) mtx_destroy(&(_isr)->lock) +#define IPSECREQUEST_LOCK_ASSERT(_isr) mtx_assert(&(_isr)->lock, MA_OWNED) + /* security policy in PCB */ struct inpcbpolicy { struct secpolicy *sp_in; @@ -368,7 +387,9 @@ struct m_tag; extern void ah4_input(struct mbuf *m, int off); +extern void ah4_ctlinput(int cmd, struct sockaddr *sa, void *); extern void esp4_input(struct mbuf *m, int off); +extern void esp4_ctlinput(int cmd, struct sockaddr *sa, void *); extern void ipcomp4_input(struct mbuf *m, int off); extern int ipsec4_common_input(struct mbuf *m, ...); extern int ipsec4_common_input_cb(struct mbuf *m, struct secasvar *sav, ==== //depot/projects/netperf/sys/netipsec/key.c#7 (text+ko) ==== @@ -746,7 +746,7 @@ * temporarily null out below. Need to rethink how we * handle bundled SA's in the callback thread. */ - mtx_assert(&isr->lock, MA_OWNED); + IPSECREQUEST_LOCK_ASSERT(isr); /* get current level */ level = ipsec_get_reqlevel(isr); @@ -1281,7 +1281,7 @@ newsp = (struct secpolicy *) malloc(sizeof(struct secpolicy), M_IPSEC_SP, M_NOWAIT|M_ZERO); if (newsp) { - mtx_init(&newsp->lock, "ipsec policy", NULL, MTX_DEF); + SECPOLICY_LOCK_INIT(newsp); newsp->refcnt = 1; newsp->req = NULL; } @@ -1295,7 +1295,7 @@ static void _key_delsp(struct secpolicy *sp) { - mtx_destroy(&sp->lock); + SECPOLICY_LOCK_DESTROY(sp); free(sp, M_IPSEC_SP); } @@ -2029,7 +2029,7 @@ xpl0->sadb_x_policy_id = sp->id; sp->state = IPSEC_SPSTATE_DEAD; - mtx_destroy(&sp->lock); + SECPOLICY_LOCK_DESTROY(sp); KEY_FREESP(&sp); { @@ -2093,7 +2093,7 @@ } sp->state = IPSEC_SPSTATE_DEAD; - mtx_destroy(&sp->lock); + SECPOLICY_LOCK_DESTROY(sp); KEY_FREESP(&sp); { @@ -2736,7 +2736,7 @@ } } - mtx_init(&newsav->lock, "ipsec sa", NULL, MTX_DEF); + SECASVAR_LOCK_INIT(newsav); /* reset created */ newsav->created = time_second; @@ -2826,7 +2826,7 @@ if (__LIST_CHAINED(sav)) LIST_REMOVE(sav, chain); key_cleansav(sav); - mtx_destroy(&sav->lock); + SECASVAR_LOCK_DESTROY(sav); free(sav, M_IPSEC_SA); } ==== //depot/projects/netperf/sys/netipsec/keydb.h#4 (text+ko) ==== @@ -125,6 +125,13 @@ u_int64_t tdb_cryptoid; /* crypto session id */ }; +#define SECASVAR_LOCK_INIT(_sav) \ + mtx_init(&(_sav)->lock, "ipsec association", NULL, MTX_DEF) +#define SECASVAR_LOCK(_sav) mtx_lock(&(_sav)->lock) +#define SECASVAR_UNLOCK(_sav) mtx_unlock(&(_sav)->lock) +#define SECASVAR_LOCK_DESTROY(_sav) mtx_destroy(&(_sav)->lock) +#define SECASVAR_LOCK_ASSERT(_sav) mtx_assert(&(_sav)->lock, MA_OWNED) + /* replay prevention */ struct secreplay { u_int32_t count; ==== //depot/projects/netperf/sys/netipsec/xform_ah.c#5 (text+ko) ==== @@ -1122,7 +1122,7 @@ m = (struct mbuf *) crp->crp_buf; isr = tc->tc_isr; - mtx_lock(&isr->lock); + IPSECREQUEST_LOCK(isr); sav = KEY_ALLOCSA(&tc->tc_dst, tc->tc_proto, tc->tc_spi); if (sav == NULL) { ahstat.ahs_notdb++; @@ -1139,7 +1139,7 @@ if (crp->crp_etype == EAGAIN) { KEY_FREESAV(&sav); - mtx_unlock(&isr->lock); + IPSECREQUEST_UNLOCK(isr); return crypto_dispatch(crp); } @@ -1171,13 +1171,13 @@ /* NB: m is reclaimed by ipsec_process_done. */ err = ipsec_process_done(m, isr); KEY_FREESAV(&sav); - mtx_unlock(&isr->lock); + IPSECREQUEST_UNLOCK(isr); return err; bad: if (sav) KEY_FREESAV(&sav); - mtx_unlock(&isr->lock); + IPSECREQUEST_UNLOCK(isr); if (m) m_freem(m); free(tc, M_XDATA); ==== //depot/projects/netperf/sys/netipsec/xform_esp.c#5 (text+ko) ==== @@ -866,7 +866,7 @@ m = (struct mbuf *) crp->crp_buf; isr = tc->tc_isr; - mtx_lock(&isr->lock); + IPSECREQUEST_LOCK(isr); sav = KEY_ALLOCSA(&tc->tc_dst, tc->tc_proto, tc->tc_spi); if (sav == NULL) { espstat.esps_notdb++; @@ -887,7 +887,7 @@ if (crp->crp_etype == EAGAIN) { KEY_FREESAV(&sav); - mtx_unlock(&isr->lock); + IPSECREQUEST_UNLOCK(isr); return crypto_dispatch(crp); } @@ -915,13 +915,13 @@ /* NB: m is reclaimed by ipsec_process_done. */ err = ipsec_process_done(m, isr); KEY_FREESAV(&sav); - mtx_unlock(&isr->lock); + IPSECREQUEST_UNLOCK(isr); return err; bad: if (sav) KEY_FREESAV(&sav); - mtx_unlock(&isr->lock); + IPSECREQUEST_UNLOCK(isr); if (m) m_freem(m); free(tc, M_XDATA); ==== //depot/projects/netperf/sys/netipsec/xform_ipcomp.c#5 (text+ko) ==== @@ -500,7 +500,7 @@ rlen = crp->crp_ilen - skip; isr = tc->tc_isr; - mtx_lock(&isr->lock); + IPSECREQUEST_LOCK(isr); sav = KEY_ALLOCSA(&tc->tc_dst, tc->tc_proto, tc->tc_spi); if (sav == NULL) { ipcompstat.ipcomps_notdb++; @@ -518,7 +518,7 @@ if (crp->crp_etype == EAGAIN) { KEY_FREESAV(&sav); - mtx_unlock(&isr->lock); + IPSECREQUEST_UNLOCK(isr); return crypto_dispatch(crp); } ipcompstat.ipcomps_noxform++; @@ -571,13 +571,13 @@ /* NB: m is reclaimed by ipsec_process_done. */ error = ipsec_process_done(m, isr); KEY_FREESAV(&sav); - mtx_unlock(&isr->lock); + IPSECREQUEST_UNLOCK(isr); return error; bad: if (sav) KEY_FREESAV(&sav); - mtx_unlock(&isr->lock); + IPSECREQUEST_UNLOCK(isr); if (m) m_freem(m); free(tc, M_XDATA); From owner-p4-projects@FreeBSD.ORG Wed Sep 24 13:05:11 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 923E216A4C3; Wed, 24 Sep 2003 13:05:11 -0700 (PDT) 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 3BC8D16A4C1 for ; Wed, 24 Sep 2003 13:05:11 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8763943FAF for ; Wed, 24 Sep 2003 13:05:10 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8OK5AXJ012630 for ; Wed, 24 Sep 2003 13:05:10 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8OK5ADC012627 for perforce@freebsd.org; Wed, 24 Sep 2003 13:05:10 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Wed, 24 Sep 2003 13:05:10 -0700 (PDT) Message-Id: <200309242005.h8OK5ADC012627@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38531 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2003 20:05:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=38531 Change 38531 by sam@sam_ebb on 2003/09/24 13:05:04 o hookup ipv4 ctlinput paths to a noop routine; we should be handling path mtu changes at least o correct potential null pointer deref in ipsec4_common_input_cb Affected files ... .. //depot/projects/netperf/sys/netinet/in_proto.c#3 edit .. //depot/projects/netperf/sys/netipsec/ipsec_input.c#6 edit .. //depot/projects/netperf/sys/netipsec/ipsec_output.c#5 edit Differences ... ==== //depot/projects/netperf/sys/netinet/in_proto.c#3 (text+ko) ==== @@ -160,13 +160,13 @@ #endif /* IPSEC */ #ifdef FAST_IPSEC { SOCK_RAW, &inetdomain, IPPROTO_AH, PR_ATOMIC|PR_ADDR, - ah4_input, 0, 0, 0, + ah4_input, 0, ah4_ctlinput, 0, 0, 0, 0, 0, 0, &nousrreqs }, { SOCK_RAW, &inetdomain, IPPROTO_ESP, PR_ATOMIC|PR_ADDR, - esp4_input, 0, 0, 0, + esp4_input, 0, esp4_ctlinput, 0, 0, 0, 0, 0, 0, &nousrreqs ==== //depot/projects/netperf/sys/netipsec/ipsec_input.c#6 (text+ko) ==== @@ -94,6 +94,8 @@ #define IPSEC_ISTAT(p,x,y,z) ((p) == IPPROTO_ESP ? (x)++ : \ (p) == IPPROTO_AH ? (y)++ : (z)++) +static void ipsec4_common_ctlinput(int, struct sockaddr *, void *, int); + /* * ipsec_common_input gets called when an IPsec-protected packet * is received by IPv4 or IPv6. It's job is to find the right SA @@ -231,12 +233,26 @@ { ipsec4_common_input(m, off, IPPROTO_AH); } +void +ah4_ctlinput(int cmd, struct sockaddr *sa, void *v) +{ + if (sa->sa_family == AF_INET && + sa->sa_len == sizeof(struct sockaddr_in)) + ipsec4_common_ctlinput(cmd, sa, v, IPPROTO_AH); +} void esp4_input(struct mbuf *m, int off) { ipsec4_common_input(m, off, IPPROTO_ESP); } +void +esp4_ctlinput(int cmd, struct sockaddr *sa, void *v) +{ + if (sa->sa_family == AF_INET && + sa->sa_len == sizeof(struct sockaddr_in)) + ipsec4_common_ctlinput(cmd, sa, v, IPPROTO_ESP); +} void ipcomp4_input(struct mbuf *m, int off) @@ -444,6 +460,12 @@ m_freem(m); return error; } + +void +ipsec4_common_ctlinput(int cmd, struct sockaddr *sa, void *v, int proto) +{ + /* XXX nothing just yet */ +} #endif /* INET */ #ifdef INET6 @@ -493,82 +515,6 @@ return IPPROTO_DONE; } -void -esp6_ctlinput(int cmd, struct sockaddr *sa, void *d) -{ - if (sa->sa_family != AF_INET6 || - sa->sa_len != sizeof(struct sockaddr_in6)) - return; - if ((unsigned)cmd >= PRC_NCMDS) - return; - - /* if the parameter is from icmp6, decode it. */ - if (d != NULL) { - struct ip6ctlparam *ip6cp = (struct ip6ctlparam *)d; - struct mbuf *m = ip6cp->ip6c_m; - int off = ip6cp->ip6c_off; - - struct ip6ctlparam ip6cp1; - - /* - * Notify the error to all possible sockets via pfctlinput2. - * Since the upper layer information (such as protocol type, - * source and destination ports) is embedded in the encrypted - * data and might have been cut, we can't directly call - * an upper layer ctlinput function. However, the pcbnotify - * function will consider source and destination addresses - * as well as the flow info value, and may be able to find - * some PCB that should be notified. - * Although pfctlinput2 will call esp6_ctlinput(), there is - * no possibility of an infinite loop of function calls, - * because we don't pass the inner IPv6 header. - */ - bzero(&ip6cp1, sizeof(ip6cp1)); - ip6cp1.ip6c_src = ip6cp->ip6c_src; - pfctlinput2(cmd, sa, (void *)&ip6cp1); - - /* - * Then go to special cases that need ESP header information. - * XXX: We assume that when ip6 is non NULL, - * M and OFF are valid. - */ - - if (cmd == PRC_MSGSIZE) { - struct secasvar *sav; - u_int32_t spi; - int valid; - - /* check header length before using m_copydata */ - if (m->m_pkthdr.len < off + sizeof (struct esp)) - return; - m_copydata(m, off + offsetof(struct esp, esp_spi), - sizeof(u_int32_t), (caddr_t) &spi); - /* - * Check to see if we have a valid SA corresponding to - * the address in the ICMP message payload. - */ - sav = KEY_ALLOCSA((union sockaddr_union *)sa, - IPPROTO_ESP, spi); - valid = (sav != NULL); - if (sav) - KEY_FREESAV(&sav); - - /* XXX Further validation? */ - - /* - * Depending on whether the SA is "valid" and - * routing table size (mtudisc_{hi,lo}wat), we will: - * - recalcurate the new MTU and create the - * corresponding routing entry, or - * - ignore the MTU change notification. - */ - icmp6_mtudisc_update(ip6cp, valid); - } - } else { - /* we normally notify any pcb here */ - } -} - /* * IPsec input callback, called by the transform callback. Takes care of * filtering and other sanity checks on the processed packet. @@ -738,7 +684,8 @@ m_tag_prepend(m, mtag); } else { - mt->m_tag_id = PACKET_TAG_IPSEC_IN_DONE; + if (mt != NULL) + mt->m_tag_id = PACKET_TAG_IPSEC_IN_DONE; /* XXX do we need to mark m_flags??? */ } @@ -788,4 +735,80 @@ m_freem(m); return error; } + +void +esp6_ctlinput(int cmd, struct sockaddr *sa, void *d) +{ + if (sa->sa_family != AF_INET6 || + sa->sa_len != sizeof(struct sockaddr_in6)) + return; + if ((unsigned)cmd >= PRC_NCMDS) + return; + + /* if the parameter is from icmp6, decode it. */ + if (d != NULL) { + struct ip6ctlparam *ip6cp = (struct ip6ctlparam *)d; + struct mbuf *m = ip6cp->ip6c_m; + int off = ip6cp->ip6c_off; + + struct ip6ctlparam ip6cp1; + + /* + * Notify the error to all possible sockets via pfctlinput2. + * Since the upper layer information (such as protocol type, + * source and destination ports) is embedded in the encrypted + * data and might have been cut, we can't directly call + * an upper layer ctlinput function. However, the pcbnotify + * function will consider source and destination addresses + * as well as the flow info value, and may be able to find + * some PCB that should be notified. + * Although pfctlinput2 will call esp6_ctlinput(), there is + * no possibility of an infinite loop of function calls, + * because we don't pass the inner IPv6 header. + */ + bzero(&ip6cp1, sizeof(ip6cp1)); + ip6cp1.ip6c_src = ip6cp->ip6c_src; + pfctlinput2(cmd, sa, (void *)&ip6cp1); + + /* + * Then go to special cases that need ESP header information. + * XXX: We assume that when ip6 is non NULL, + * M and OFF are valid. + */ + + if (cmd == PRC_MSGSIZE) { + struct secasvar *sav; + u_int32_t spi; + int valid; + + /* check header length before using m_copydata */ + if (m->m_pkthdr.len < off + sizeof (struct esp)) + return; + m_copydata(m, off + offsetof(struct esp, esp_spi), + sizeof(u_int32_t), (caddr_t) &spi); + /* + * Check to see if we have a valid SA corresponding to + * the address in the ICMP message payload. + */ + sav = KEY_ALLOCSA((union sockaddr_union *)sa, + IPPROTO_ESP, spi); + valid = (sav != NULL); + if (sav) + KEY_FREESAV(&sav); + + /* XXX Further validation? */ + + /* + * Depending on whether the SA is "valid" and + * routing table size (mtudisc_{hi,lo}wat), we will: + * - recalcurate the new MTU and create the + * corresponding routing entry, or + * - ignore the MTU change notification. + */ + icmp6_mtudisc_update(ip6cp, valid); + } + } else { + /* we normally notify any pcb here */ + } +} #endif /* INET6 */ ==== //depot/projects/netperf/sys/netipsec/ipsec_output.c#5 (text+ko) ==== @@ -347,7 +347,7 @@ IPSEC_ASSERT(m != NULL, ("null mbuf")); IPSEC_ASSERT(isr != NULL, ("null isr")); - mtx_lock(&isr->lock); /* insure SA contents don't change */ + IPSECREQUEST_LOCK(isr); /* insure SA contents don't change */ isr = ipsec_nextisr(m, isr, AF_INET, &saidx, &error); if (isr == NULL) @@ -466,10 +466,10 @@ } else { error = ipsec_process_done(m, isr); } - mtx_unlock(&isr->lock); + IPSECREQUEST_UNLOCK(isr); return error; bad: - mtx_unlock(&isr->lock); + IPSECREQUEST_UNLOCK(isr); if (m) m_freem(m); return error; From owner-p4-projects@FreeBSD.ORG Wed Sep 24 14:45:16 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7695D16A4C0; Wed, 24 Sep 2003 14:45:16 -0700 (PDT) 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 4BA3616A4B3 for ; Wed, 24 Sep 2003 14:45:16 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C745243FBF for ; Wed, 24 Sep 2003 14:45:15 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8OLjFXJ017996 for ; Wed, 24 Sep 2003 14:45:15 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8OLjFGn017993 for perforce@freebsd.org; Wed, 24 Sep 2003 14:45:15 -0700 (PDT) (envelope-from peter@freebsd.org) Date: Wed, 24 Sep 2003 14:45:15 -0700 (PDT) Message-Id: <200309242145.h8OLjFGn017993@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 Subject: PERFORCE change 38539 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2003 21:45:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=38539 Change 38539 by peter@peter_daintree on 2003/09/24 14:44:28 Integrate -I from jhb_acpipci Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/local_apic.c#3 integrate .. //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#5 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/local_apic.c#3 (text+ko) ==== @@ -187,6 +187,9 @@ value |= (APIC_SVR_FEN | APIC_SVR_SWEN | APIC_SPURIOUS_INT); lapic->svr = value; + /* Set BSP's per-CPU local APIC ID. */ + PCPU_SET(apic_id, lapic_id()); + /* XXX: timer/error/thermal interrupts */ } ==== //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#5 (text+ko) ==== @@ -279,8 +279,8 @@ mtx_init(&smp_tlb_mtx, "tlb", NULL, MTX_SPIN); - /* Setup BSP apic ID */ - PCPU_SET(apic_id, lapic_id()); + /* Set boot_cpu_id if needed. */ + KASSERT(PCPU_GET(apic_id) == lapic_id(), ("APIC ID mismatch")); /* XXXTEST */ if (boot_cpu_id == -1) { boot_cpu_id = PCPU_GET(apic_id); cpu_info[boot_cpu_id].cpu_bsp = 1; From owner-p4-projects@FreeBSD.ORG Wed Sep 24 14:47:21 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 755FD16A4C0; Wed, 24 Sep 2003 14:47:21 -0700 (PDT) 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 3398916A4B3 for ; Wed, 24 Sep 2003 14:47:21 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFC2343FE0 for ; Wed, 24 Sep 2003 14:47:18 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8OLlIXJ018091 for ; Wed, 24 Sep 2003 14:47:18 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8OLlIiC018088 for perforce@freebsd.org; Wed, 24 Sep 2003 14:47:18 -0700 (PDT) (envelope-from peter@freebsd.org) Date: Wed, 24 Sep 2003 14:47:18 -0700 (PDT) Message-Id: <200309242147.h8OLlIiC018088@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 Subject: PERFORCE change 38540 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2003 21:47:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=38540 Change 38540 by peter@peter_daintree on 2003/09/24 14:46:33 integrate -I from jhb_acpipci Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/io_apic.c#5 integrate .. //depot/projects/hammer/sys/jhb_notes#3 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/io_apic.c#5 (text+ko) ==== @@ -634,13 +634,14 @@ ioapic_write(apic, IOAPIC_REDTBL_LO(i), flags); /* - * Route interrupts to all CPU's by default using physical + * Route interrupts to the BSP by default using physical * addressing. Vectored interrupts get readdressed using - * logical IDs when they are enabled. + * logical IDs to CPU clusters when they are enabled. */ flags = ioapic_read(apic, IOAPIC_REDTBL_HI(i)); flags &= ~IOART_DEST; - flags |= IOART_DEST; + KASSERT(PCPU_GET(apic_id) == lapic_id(), ("APIC ID mismatch")); /* XXXTEST */ + flags |= PCPU_GET(apic_id) << APIC_ID_SHIFT; ioapic_write(apic, IOAPIC_REDTBL_HI(i), flags); mtx_unlock_spin(&icu_lock); if (pin->io_vector >= 0) { @@ -718,13 +719,18 @@ mixedpic_disable_source(struct intsrc *isrc) { struct mixedpic_intsrc *mpsrc; +#if 0 struct intsrc *intpin; +#endif mpsrc = (struct mixedpic_intsrc *)isrc; +#if 0 intpin = mpsrc->mp_apicpin; +#endif isrc = mpsrc->mp_atpicsrc; isrc->is_pic->pic_disable_source(isrc); +#if 0 /* * If the interrupt is pending in the local APIC, assume that * we have been called just before the local APIC gets its @@ -732,19 +738,26 @@ */ if (intpin->is_pic->pic_source_pending(intpin)) isrc->is_pic->pic_eoi_source(isrc); +#endif } static void mixedpic_eoi_source(struct intsrc *isrc) { struct mixedpic_intsrc *mpsrc; +#if 0 struct intsrc *intpin; +#endif mpsrc = (struct mixedpic_intsrc *)isrc; +#if 0 intpin = mpsrc->mp_apicpin; +#endif isrc = mpsrc->mp_atpicsrc; isrc->is_pic->pic_eoi_source(isrc); +#if 0 intpin->is_pic->pic_eoi_source(intpin); +#endif } static void @@ -753,7 +766,7 @@ struct mixedpic_intsrc *mpsrc; mpsrc = (struct mixedpic_intsrc *)isrc; - isrc = mpsrc->mp_apicpin; + isrc = mpsrc->mp_atpicsrc; isrc->is_pic->pic_enable_intr(isrc); } ==== //depot/projects/hammer/sys/jhb_notes#3 (text+ko) ==== @@ -27,8 +27,14 @@ - isa/vector.s Todo: +- Set PCPU(apic_id) for UP case in lapic_init(). +- Use apic id of BSP (current CPU) when programming temporary physical + destinations into I/O APIC RDT entries. - Fix IDT_SYSCALL mapping in APIC case - Test mixed mode + - Dang, mixed mode interrupts don't actually set the bit in the ISR. *grump* + - Need to write mixed mode interrupt entry points and use those in + mixed mode enable_intr() - Kill isa_irq_pending() (maybe, is this an MI function?) - Add ACPI MADT APIC enumerator. - solve ACPI module problem where madt wants APIC symbols :( @@ -53,4 +59,4 @@ Unrelated to this branch: - Work on cleaning up nested includes in sys/* headers. According to Bruce, - the only nested sys/* headers should be _*.h and queue.h.+ the only nested sys/* headers should be _*.h and queue.h. From owner-p4-projects@FreeBSD.ORG Wed Sep 24 14:50:26 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6994016A516; Wed, 24 Sep 2003 14:50:26 -0700 (PDT) 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 4106F16A514 for ; Wed, 24 Sep 2003 14:50:26 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8518E43FF9 for ; Wed, 24 Sep 2003 14:50:24 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8OLoOXJ018387 for ; Wed, 24 Sep 2003 14:50:24 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8OLoNCN018384 for perforce@freebsd.org; Wed, 24 Sep 2003 14:50:23 -0700 (PDT) (envelope-from peter@freebsd.org) Date: Wed, 24 Sep 2003 14:50:23 -0700 (PDT) Message-Id: <200309242150.h8OLoNCN018384@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 Subject: PERFORCE change 38542 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2003 21:50:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=38542 Change 38542 by peter@peter_daintree on 2003/09/24 14:49:39 IFC @38532 Affected files ... .. //depot/projects/hammer/UPDATING#17 integrate .. //depot/projects/hammer/crypto/openssh/auth-chall.c#4 integrate .. //depot/projects/hammer/crypto/openssh/auth2-pam-freebsd.c#5 integrate .. //depot/projects/hammer/crypto/openssh/ssh_config#5 integrate .. //depot/projects/hammer/crypto/openssh/ssh_config.5#5 integrate .. //depot/projects/hammer/crypto/openssh/sshd_config#5 integrate .. //depot/projects/hammer/crypto/openssh/sshd_config.5#5 integrate .. //depot/projects/hammer/crypto/openssh/version.h#6 integrate .. //depot/projects/hammer/etc/sendmail/Makefile#5 integrate .. //depot/projects/hammer/lib/libalias/Makefile#5 integrate .. //depot/projects/hammer/lib/libalias/alias.c#3 integrate .. //depot/projects/hammer/lib/libalias/alias.h#3 integrate .. //depot/projects/hammer/lib/libalias/alias_db.c#4 integrate .. //depot/projects/hammer/lib/libalias/alias_local.h#2 integrate .. //depot/projects/hammer/lib/libalias/alias_skinny.c#1 branch .. //depot/projects/hammer/lib/libalias/libalias.3#5 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_kern.c#21 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_mutex.c#10 integrate .. //depot/projects/hammer/sbin/natd/natd.8#6 integrate .. //depot/projects/hammer/sbin/natd/natd.c#5 integrate .. //depot/projects/hammer/share/examples/etc/make.conf#13 integrate .. //depot/projects/hammer/share/man/man4/ugen.4#3 integrate .. //depot/projects/hammer/share/man/man5/make.conf.5#14 integrate .. //depot/projects/hammer/share/man/man9/BUS_CONFIG_INTR.9#1 branch .. //depot/projects/hammer/share/man/man9/Makefile#16 integrate .. //depot/projects/hammer/sys/alpha/include/bus.h#11 integrate .. //depot/projects/hammer/sys/amd64/include/bus_amd64.h#5 integrate .. //depot/projects/hammer/sys/amd64/include/vmparam.h#14 integrate .. //depot/projects/hammer/sys/contrib/ipfilter/netinet/ip_fil.c#4 integrate .. //depot/projects/hammer/sys/dev/ata/atapi-cam.c#11 integrate .. //depot/projects/hammer/sys/dev/bge/if_bge.c#20 integrate .. //depot/projects/hammer/sys/dev/uart/uart.h#2 integrate .. //depot/projects/hammer/sys/dev/uart/uart_bus_pccard.c#2 integrate .. //depot/projects/hammer/sys/dev/uart/uart_core.c#3 integrate .. //depot/projects/hammer/sys/dev/uart/uart_cpu.h#2 integrate .. //depot/projects/hammer/sys/dev/uart/uart_cpu_alpha.c#2 integrate .. //depot/projects/hammer/sys/dev/uart/uart_cpu_amd64.c#2 integrate .. //depot/projects/hammer/sys/dev/uart/uart_cpu_i386.c#2 integrate .. //depot/projects/hammer/sys/dev/uart/uart_cpu_ia64.c#2 integrate .. //depot/projects/hammer/sys/dev/uart/uart_cpu_pc98.c#2 integrate .. //depot/projects/hammer/sys/dev/uart/uart_cpu_sparc64.c#3 integrate .. //depot/projects/hammer/sys/dev/uart/uart_dev_sab82532.c#3 integrate .. //depot/projects/hammer/sys/dev/uart/uart_dev_z8530.c#3 integrate .. //depot/projects/hammer/sys/dev/usb/usbdevs#19 integrate .. //depot/projects/hammer/sys/dev/usb/usbdevs.h#18 integrate .. //depot/projects/hammer/sys/dev/usb/usbdevs_data.h#18 integrate .. //depot/projects/hammer/sys/geom/geom_disk.c#17 integrate .. //depot/projects/hammer/sys/i386/include/bus_at386.h#4 integrate .. //depot/projects/hammer/sys/i386/include/bus_pc98.h#3 integrate .. //depot/projects/hammer/sys/i386/include/clock.h#4 integrate .. //depot/projects/hammer/sys/i386/isa/clock.c#11 integrate .. //depot/projects/hammer/sys/ia64/include/bus.h#10 integrate .. //depot/projects/hammer/sys/kern/kern_linker.c#8 integrate .. //depot/projects/hammer/sys/modules/bridge/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/ipfilter/Makefile#2 integrate .. //depot/projects/hammer/sys/net/bridge.c#7 integrate .. //depot/projects/hammer/sys/net/pfil.c#3 integrate .. //depot/projects/hammer/sys/net/pfil.h#2 integrate .. //depot/projects/hammer/sys/netinet/if_ether.c#3 integrate .. //depot/projects/hammer/sys/netinet/ip_input.c#15 integrate .. //depot/projects/hammer/sys/netinet/ip_output.c#16 integrate .. //depot/projects/hammer/sys/netinet/ip_var.h#9 integrate .. //depot/projects/hammer/sys/netinet6/ip6_forward.c#3 integrate .. //depot/projects/hammer/sys/netinet6/ip6_input.c#4 integrate .. //depot/projects/hammer/sys/netinet6/ip6_output.c#6 integrate .. //depot/projects/hammer/sys/netinet6/ip6_var.h#4 integrate .. //depot/projects/hammer/sys/netinet6/ip6protosw.h#2 integrate .. //depot/projects/hammer/sys/pc98/i386/busiosubr.c#2 integrate .. //depot/projects/hammer/sys/powerpc/include/param.h#6 integrate .. //depot/projects/hammer/sys/sparc64/include/bus.h#14 integrate .. //depot/projects/hammer/sys/sys/param.h#19 integrate .. //depot/projects/hammer/sys/sys/protosw.h#4 integrate .. //depot/projects/hammer/sys/vm/vm_map.c#19 integrate .. //depot/projects/hammer/usr.bin/Makefile#20 integrate .. //depot/projects/hammer/usr.bin/fstat/msdosfs.c#3 integrate .. //depot/projects/hammer/usr.sbin/ppp/command.c#5 integrate .. //depot/projects/hammer/usr.sbin/ppp/nat_cmd.c#3 integrate .. //depot/projects/hammer/usr.sbin/ppp/nat_cmd.h#2 integrate .. //depot/projects/hammer/usr.sbin/ppp/ppp.8.m4#6 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/menus.c#14 integrate Differences ... ==== //depot/projects/hammer/UPDATING#17 (text+ko) ==== @@ -17,6 +17,12 @@ developers choose to disable these features on build machines to maximize performance. +20030923: + Fix a bug in arplookup(), whereby a hostile party on a locally + attached network could exhaust kernel memory, and cause a system + panic, by sending a flood of spoofed ARP requests. See + FreeBSD-SA-03:14.arp. + 20030915: A change to /etc/defaults/rc.conf now causes inetd to be started with `-C 60' if it is not overridden in /etc/rc.conf. This @@ -1362,4 +1368,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.266 2003/09/15 17:20:05 nectar Exp $ +$FreeBSD: src/UPDATING,v 1.267 2003/09/23 16:39:30 bms Exp $ ==== //depot/projects/hammer/crypto/openssh/auth-chall.c#4 (text+ko) ==== @@ -24,7 +24,7 @@ #include "includes.h" RCSID("$OpenBSD: auth-chall.c,v 1.8 2001/05/18 14:13:28 markus Exp $"); -RCSID("$FreeBSD: src/crypto/openssh/auth-chall.c,v 1.6 2003/03/31 13:45:36 des Exp $"); +RCSID("$FreeBSD: src/crypto/openssh/auth-chall.c,v 1.7 2003/09/24 18:24:27 des Exp $"); #include "auth.h" #include "log.h" @@ -93,7 +93,7 @@ xfree(info); } /* if we received more prompts, we're screwed */ - res = (numprompts != 0); + res = (res == 0 && numprompts == 0) ? 0 : -1; } device->free_ctx(authctxt->kbdintctxt); authctxt->kbdintctxt = NULL; ==== //depot/projects/hammer/crypto/openssh/auth2-pam-freebsd.c#5 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include "includes.h" -RCSID("$FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $"); +RCSID("$FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.13 2003/09/24 19:11:52 des Exp $"); #ifdef USE_PAM #include @@ -134,8 +134,8 @@ *resp = xmalloc(n * sizeof **resp); buffer_init(&buffer); for (i = 0; i < n; ++i) { - resp[i]->resp_retcode = 0; - resp[i]->resp = NULL; + (*resp)[i].resp_retcode = 0; + (*resp)[i].resp = NULL; switch (msg[i]->msg_style) { case PAM_PROMPT_ECHO_OFF: buffer_put_cstring(&buffer, msg[i]->msg); @@ -143,7 +143,7 @@ ssh_msg_recv(ctxt->pam_csock, &buffer); if (buffer_get_char(&buffer) != PAM_AUTHTOK) goto fail; - resp[i]->resp = buffer_get_string(&buffer, NULL); + (*resp)[i].resp = buffer_get_string(&buffer, NULL); break; case PAM_PROMPT_ECHO_ON: buffer_put_cstring(&buffer, msg[i]->msg); @@ -151,7 +151,7 @@ ssh_msg_recv(ctxt->pam_csock, &buffer); if (buffer_get_char(&buffer) != PAM_AUTHTOK) goto fail; - resp[i]->resp = buffer_get_string(&buffer, NULL); + (*resp)[i].resp = buffer_get_string(&buffer, NULL); break; case PAM_ERROR_MSG: buffer_put_cstring(&buffer, msg[i]->msg); @@ -169,8 +169,6 @@ buffer_free(&buffer); return (PAM_SUCCESS); fail: - while (i) - xfree(resp[--i]); xfree(*resp); *resp = NULL; buffer_free(&buffer); @@ -550,20 +548,20 @@ for (i = 0; i < n; ++i) { switch (msg[i]->msg_style) { case PAM_PROMPT_ECHO_OFF: - resp[i]->resp = + (*resp)[i].resp = read_passphrase(msg[i]->msg, RP_ALLOW_STDIN); - resp[i]->resp_retcode = PAM_SUCCESS; + (*resp)[i].resp_retcode = PAM_SUCCESS; break; case PAM_PROMPT_ECHO_ON: fputs(msg[i]->msg, stderr); fgets(input, sizeof input, stdin); - resp[i]->resp = xstrdup(input); - resp[i]->resp_retcode = PAM_SUCCESS; + (*resp)[i].resp = xstrdup(input); + (*resp)[i].resp_retcode = PAM_SUCCESS; break; case PAM_ERROR_MSG: case PAM_TEXT_INFO: fputs(msg[i]->msg, stderr); - resp[i]->resp_retcode = PAM_SUCCESS; + (*resp)[i].resp_retcode = PAM_SUCCESS; break; default: goto fail; @@ -571,8 +569,6 @@ } return (PAM_SUCCESS); fail: - while (i) - xfree(resp[--i]); xfree(*resp); *resp = NULL; return (PAM_CONV_ERR); ==== //depot/projects/hammer/crypto/openssh/ssh_config#5 (text+ko) ==== @@ -1,5 +1,5 @@ # $OpenBSD: ssh_config,v 1.16 2002/07/03 14:21:05 markus Exp $ -# $FreeBSD: src/crypto/openssh/ssh_config,v 1.21 2003/04/23 17:10:53 des Exp $ +# $FreeBSD: src/crypto/openssh/ssh_config,v 1.22 2003/09/24 19:20:23 des Exp $ # This is the ssh client system-wide configuration file. See # ssh_config(5) for more information. This file provides defaults for @@ -35,4 +35,4 @@ # Cipher 3des # Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc # EscapeChar ~ -# VersionAddendum FreeBSD-20030423 +# VersionAddendum FreeBSD-20030924 ==== //depot/projects/hammer/crypto/openssh/ssh_config.5#5 (text+ko) ==== @@ -35,7 +35,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $OpenBSD: ssh_config.5,v 1.7 2003/03/28 10:11:43 jmc Exp $ -.\" $FreeBSD: src/crypto/openssh/ssh_config.5,v 1.9 2003/04/23 17:10:53 des Exp $ +.\" $FreeBSD: src/crypto/openssh/ssh_config.5,v 1.10 2003/09/24 19:20:23 des Exp $ .Dd September 25, 1999 .Dt SSH_CONFIG 5 .Os @@ -623,7 +623,7 @@ Specifies a string to append to the regular version string to identify OS- or site-specific modifications. The default is -.Dq FreeBSD-20030423 . +.Dq FreeBSD-20030924 . .It Cm XAuthLocation Specifies the full pathname of the .Xr xauth 1 ==== //depot/projects/hammer/crypto/openssh/sshd_config#5 (text+ko) ==== @@ -1,5 +1,5 @@ # $OpenBSD: sshd_config,v 1.59 2002/09/25 11:17:16 markus Exp $ -# $FreeBSD: src/crypto/openssh/sshd_config,v 1.32 2003/04/23 17:10:53 des Exp $ +# $FreeBSD: src/crypto/openssh/sshd_config,v 1.33 2003/09/24 19:20:23 des Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. @@ -14,7 +14,7 @@ # Note that some of FreeBSD's defaults differ from OpenBSD's, and # FreeBSD has a few additional options. -#VersionAddendum FreeBSD-20030423 +#VersionAddendum FreeBSD-20030924 #Port 22 #Protocol 2,1 ==== //depot/projects/hammer/crypto/openssh/sshd_config.5#5 (text+ko) ==== @@ -35,7 +35,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $OpenBSD: sshd_config.5,v 1.15 2003/03/28 10:11:43 jmc Exp $ -.\" $FreeBSD: src/crypto/openssh/sshd_config.5,v 1.11 2003/04/23 17:10:53 des Exp $ +.\" $FreeBSD: src/crypto/openssh/sshd_config.5,v 1.12 2003/09/24 19:20:23 des Exp $ .Dd September 25, 1999 .Dt SSHD_CONFIG 5 .Os @@ -650,7 +650,7 @@ Specifies a string to append to the regular version string to identify OS- or site-specific modifications. The default is -.Dq FreeBSD-20030423 . +.Dq FreeBSD-20030924 . .It Cm X11DisplayOffset Specifies the first display number available for .Nm sshd Ns 's ==== //depot/projects/hammer/crypto/openssh/version.h#6 (text+ko) ==== @@ -1,11 +1,11 @@ /* $OpenBSD: version.h,v 1.37 2003/04/01 10:56:46 markus Exp $ */ -/* $FreeBSD: src/crypto/openssh/version.h,v 1.22 2003/09/17 14:36:14 nectar Exp $ */ +/* $FreeBSD: src/crypto/openssh/version.h,v 1.23 2003/09/24 19:20:23 des Exp $ */ #ifndef SSH_VERSION #define SSH_VERSION (ssh_version_get()) #define SSH_VERSION_BASE "OpenSSH_3.6.1p1" -#define SSH_VERSION_ADDENDUM "FreeBSD-20030917" +#define SSH_VERSION_ADDENDUM "FreeBSD-20030924" const char *ssh_version_get(void); void ssh_version_set_addendum(const char *add); ==== //depot/projects/hammer/etc/sendmail/Makefile#5 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.19 (Berkeley) 1/14/97 -# $FreeBSD: src/etc/sendmail/Makefile,v 1.28 2003/09/01 03:40:33 gshapiro Exp $ +# $FreeBSD: src/etc/sendmail/Makefile,v 1.29 2003/09/24 04:19:26 gshapiro Exp $ M4= m4 CHMOD= chmod @@ -8,17 +8,17 @@ SENDMAIL_DIR= ${.CURDIR}/../../contrib/sendmail SMDIR= ${SENDMAIL_DIR}/src -CFDIR= ${SENDMAIL_DIR}/cf +SENDMAIL_CF_DIR?=${SENDMAIL_DIR}/cf # this is overkill, but.... -M4FILES!= find ${CFDIR} -type f -name '*.m4' -print +M4FILES!= find ${SENDMAIL_CF_DIR} -type f -name '*.m4' -print .SUFFIXES: .mc .cf .mc.cf: ${M4FILES} ${RM} ${.TARGET} - ${M4} -D_CF_DIR_=${CFDIR}/ ${SENDMAIL_M4_FLAGS} \ - ${CFDIR}/m4/cf.m4 ${.IMPSRC} > ${.TARGET} + ${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_M4_FLAGS} \ + ${SENDMAIL_CF_DIR}/m4/cf.m4 ${.IMPSRC} > ${.TARGET} ${CHMOD} ${ROMODE} ${.TARGET} DEST_CF= ${DESTDIR}/etc/mail/sendmail.cf @@ -61,10 +61,10 @@ all: ${ALL} # Build the installed submit.cf from the sendmail distributed submit.mc. -freebsd.submit.cf: ${CFDIR}/cf/submit.mc +freebsd.submit.cf: ${SENDMAIL_CF_DIR}/cf/submit.mc ${RM} ${.TARGET} - ${M4} -D_CF_DIR_=${CFDIR}/ ${SENDMAIL_M4_FLAGS} \ - ${CFDIR}/m4/cf.m4 ${.ALLSRC} > ${.TARGET} + ${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_M4_FLAGS} \ + ${SENDMAIL_CF_DIR}/m4/cf.m4 ${.ALLSRC} > ${.TARGET} ${CHMOD} ${ROMODE} ${.TARGET} install distribution: @@ -76,7 +76,8 @@ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${.CURDIR}/freebsd.mc freebsd.cf ${DESTDIR}/etc/mail ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ - ${CFDIR}/cf/submit.mc ${DESTDIR}/etc/mail/freebsd.submit.mc + ${SENDMAIL_CF_DIR}/cf/submit.mc \ + ${DESTDIR}/etc/mail/freebsd.submit.mc ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ freebsd.submit.cf ${DESTDIR}/etc/mail ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ==== //depot/projects/hammer/lib/libalias/Makefile#5 (text+ko) ==== @@ -1,11 +1,11 @@ -# $FreeBSD: src/lib/libalias/Makefile,v 1.22 2003/08/18 15:25:38 obrien Exp $ +# $FreeBSD: src/lib/libalias/Makefile,v 1.23 2003/09/23 07:41:53 marcus Exp $ LIB= alias SHLIBDIR?= /lib SHLIB_MAJOR= 4 MAN= libalias.3 SRCS= alias.c alias_cuseeme.c alias_db.c alias_ftp.c alias_irc.c \ - alias_nbt.c alias_pptp.c alias_proxy.c alias_smedia.c \ + alias_nbt.c alias_pptp.c alias_proxy.c alias_skinny.c alias_smedia.c \ alias_util.c INCS= alias.h ==== //depot/projects/hammer/lib/libalias/alias.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libalias/alias.c,v 1.37 2003/06/13 21:54:01 ru Exp $"); +__FBSDID("$FreeBSD: src/lib/libalias/alias.c,v 1.38 2003/09/23 07:41:53 marcus Exp $"); /* Alias.c provides supervisory control for the functions of the @@ -917,6 +917,9 @@ if (ntohs(tc->th_dport) == PPTP_CONTROL_PORT_NUMBER || ntohs(tc->th_sport) == PPTP_CONTROL_PORT_NUMBER) AliasHandlePptpIn(pip, link); + else if (skinnyPort != 0 && (ntohs(tc->th_dport) == skinnyPort + || ntohs(tc->th_sport) == skinnyPort)) + AliasHandleSkinny(pip, link); alias_address = GetAliasAddress(link); original_address = GetOriginalAddress(link); @@ -1098,6 +1101,9 @@ else if (ntohs(tc->th_dport) == PPTP_CONTROL_PORT_NUMBER || ntohs(tc->th_sport) == PPTP_CONTROL_PORT_NUMBER) AliasHandlePptpOut(pip, link); + else if (skinnyPort != 0 && (ntohs(tc->th_sport) == skinnyPort + || ntohs(tc->th_dport) == skinnyPort)) + AliasHandleSkinny(pip, link); /* Adjust TCP checksum since source port is being aliased */ /* and source address is being altered */ ==== //depot/projects/hammer/lib/libalias/alias.h#3 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libalias/alias.h,v 1.24 2003/06/01 23:15:00 ru Exp $ + * $FreeBSD: src/lib/libalias/alias.h,v 1.25 2003/09/23 07:41:53 marcus Exp $ */ /*- @@ -45,6 +45,7 @@ void PacketAliasInit(void); void PacketAliasSetAddress(struct in_addr _addr); void PacketAliasSetFWBase(unsigned int _base, unsigned int _num); +void PacketAliasSetSkinnyPort(unsigned int _port); unsigned int PacketAliasSetMode(unsigned int _flags, unsigned int _mask); void PacketAliasUninit(void); ==== //depot/projects/hammer/lib/libalias/alias_db.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libalias/alias_db.c,v 1.54 2003/09/09 23:50:57 ru Exp $"); +__FBSDID("$FreeBSD: src/lib/libalias/alias_db.c,v 1.55 2003/09/23 07:41:53 marcus Exp $"); /* Alias_db.c encapsulates all data structures used for storing @@ -398,6 +398,9 @@ /* flag. */ #endif +unsigned int skinnyPort = 0; /* TCP port used by the Skinny */ + /* protocol. */ + @@ -2948,3 +2951,8 @@ fireWallNumNums = num; #endif } + +void +PacketAliasSetSkinnyPort(unsigned int port) { + skinnyPort = port; +} ==== //depot/projects/hammer/lib/libalias/alias_local.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libalias/alias_local.h,v 1.23 2002/07/01 11:19:40 brian Exp $ + * $FreeBSD: src/lib/libalias/alias_local.h,v 1.24 2003/09/23 07:41:53 marcus Exp $ */ /* @@ -74,6 +74,7 @@ /* Globals */ extern int packetAliasMode; +extern unsigned int skinnyPort; /* Prototypes */ @@ -212,6 +213,9 @@ void AliasHandleCUSeeMeOut(struct ip *_pip, struct alias_link *_link); void AliasHandleCUSeeMeIn(struct ip *_pip, struct in_addr _original_addr); +/* Skinny routines */ +void AliasHandleSkinny(struct ip *_pip, struct alias_link *_link); + /* Transparent proxy routines */ int ProxyCheck(struct ip *_pip, struct in_addr *_proxy_server_addr, u_short *_proxy_server_port); ==== //depot/projects/hammer/lib/libalias/libalias.3#5 (text+ko) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libalias/libalias.3,v 1.48 2003/09/08 19:57:13 ru Exp $ +.\" $FreeBSD: src/lib/libalias/libalias.3,v 1.49 2003/09/23 07:41:53 marcus Exp $ .\" .Dd April 13, 2000 .Dt LIBALIAS 3 @@ -265,6 +265,16 @@ flag). The range will be cleared for all rules on initialization. .Ed +.Pp +.Ft void +.Fn PacketAliasSkinnyPort "unsigned int port" +.Bd -ragged -offset indent +Set the TCP port used by the Skinny Station protocol. +Skinny is used by Cisco IP phones to communicate with +Cisco Call Managers to set up voice over IP calls. +If this is not set, Skinny aliasing will not be done. +The typical port used by Skinny is 2000. +.Ed .Sh PACKET HANDLING The packet handling functions are used to modify incoming (remote to local) and outgoing (local to remote) packets. ==== //depot/projects/hammer/lib/libpthread/thread/thr_kern.c#21 (text+ko) ==== @@ -33,7 +33,7 @@ * */ #include -__FBSDID("$FreeBSD: src/lib/libpthread/thread/thr_kern.c,v 1.96 2003/09/19 23:28:13 marcel Exp $"); +__FBSDID("$FreeBSD: src/lib/libpthread/thread/thr_kern.c,v 1.97 2003/09/23 04:02:23 davidxu Exp $"); #include #include @@ -2352,6 +2352,10 @@ kse_critical_t crit; DBG_MSG("Freeing thread %p\n", thread); + if (thread->name) { + free(thread->name); + thread->name = NULL; + } if ((curthread == NULL) || (free_thread_count >= MAX_CACHED_THREADS)) { thr_destroy(thread); } else { ==== //depot/projects/hammer/lib/libpthread/thread/thr_mutex.c#10 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_mutex.c,v 1.41 2003/09/04 14:06:42 davidxu Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_mutex.c,v 1.42 2003/09/24 12:52:57 davidxu Exp $ */ #include #include @@ -346,6 +346,7 @@ (*mutex)->m_prio = curthread->active_priority; (*mutex)->m_saved_prio = curthread->inherited_priority; + curthread->inherited_priority = (*mutex)->m_prio; THR_SCHED_UNLOCK(curthread, curthread); /* Add to the list of owned mutexes: */ @@ -540,10 +541,10 @@ /* Schedule the next thread: */ _thr_sched_switch(curthread); + curthread->data.mutex = NULL; if (THR_IN_MUTEXQ(curthread)) { THR_LOCK_ACQUIRE(curthread, &(*m)->m_lock); mutex_queue_remove(*m, curthread); - curthread->data.mutex = NULL; THR_LOCK_RELEASE(curthread, &(*m)->m_lock); } } @@ -619,10 +620,10 @@ /* Schedule the next thread: */ _thr_sched_switch(curthread); + curthread->data.mutex = NULL; if (THR_IN_MUTEXQ(curthread)) { THR_LOCK_ACQUIRE(curthread, &(*m)->m_lock); mutex_queue_remove(*m, curthread); - curthread->data.mutex = NULL; THR_LOCK_RELEASE(curthread, &(*m)->m_lock); } } @@ -708,10 +709,10 @@ /* Schedule the next thread: */ _thr_sched_switch(curthread); + curthread->data.mutex = NULL; if (THR_IN_MUTEXQ(curthread)) { THR_LOCK_ACQUIRE(curthread, &(*m)->m_lock); mutex_queue_remove(*m, curthread); - curthread->data.mutex = NULL; THR_LOCK_RELEASE(curthread, &(*m)->m_lock); } @@ -1590,9 +1591,6 @@ TAILQ_REMOVE(&mutex->m_queue, pthread, sqe); pthread->sflags &= ~THR_FLAGS_IN_SYNCQ; - /* This thread is no longer waiting for this mutex. */ - pthread->data.mutex = NULL; - /* * Only exit the loop if the thread hasn't been * cancelled. ==== //depot/projects/hammer/sbin/natd/natd.8#6 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" $FreeBSD: src/sbin/natd/natd.8,v 1.60 2003/08/13 15:13:33 ru Exp $ +.\" $FreeBSD: src/sbin/natd/natd.8,v 1.61 2003/09/23 07:41:55 marcus Exp $ .Dd February 28, 2003 .Dt NATD 8 .Os @@ -31,6 +31,7 @@ .Op Fl log_denied .Op Fl log_facility Ar facility_name .Op Fl punch_fw Ar firewall_range +.Op Fl skinny_port Ar port .Op Fl log_ipfw_denied .Op Fl pid_file | P Ar pidfile .Ek @@ -483,6 +484,13 @@ .Ar basenumber will be used for punching firewall holes. The range will be cleared for all rules on startup. +.It Fl skinny_port Ar port +This option allows you to specify the TCP port used for +the Skinny Station protocol. +Skinny is used by Cisco IP phones to communicate with +Cisco Call Managers to set up voice over IP calls. +By default, Skinny aliasing is not performed. +The typical port value for Skinny is 2000. .It Fl log_ipfw_denied Log when a packet cannot be re-injected because an .Xr ipfw 8 ==== //depot/projects/hammer/sbin/natd/natd.c#5 (text+ko) ==== @@ -11,7 +11,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/natd/natd.c,v 1.43 2003/08/13 13:16:19 ru Exp $"); +__FBSDID("$FreeBSD: src/sbin/natd/natd.c,v 1.44 2003/09/23 07:41:55 marcus Exp $"); #define SYSLOG_NAMES @@ -99,6 +99,7 @@ static int StrToAddrAndPortRange (const char* str, struct in_addr* addr, char* proto, port_range *portRange); static void ParseArgs (int argc, char** argv); static void SetupPunchFW(const char *strValue); +static void SetupSkinnyPort(const char *strValue); /* * Globals. @@ -838,6 +839,7 @@ LogDenied, LogFacility, PunchFW, + SkinnyPort, LogIpfwDenied, PidFile }; @@ -1059,6 +1061,14 @@ "punch_fw", NULL }, + { SkinnyPort, + 0, + String, + "port", + "set the TCP port for use with the Skinny Station protocol", + "skinny_port", + NULL }, + { LogIpfwDenied, 0, YesNo, @@ -1258,6 +1268,10 @@ SetupPunchFW(strValue); break; + case SkinnyPort: + SetupSkinnyPort(strValue); + break; + case LogIpfwDenied: logIpfwDenied = yesNoValue;; break; @@ -1705,3 +1719,14 @@ PacketAliasSetFWBase(base, num); (void)PacketAliasSetMode(PKT_ALIAS_PUNCH_FW, PKT_ALIAS_PUNCH_FW); } + +static void +SetupSkinnyPort(const char *strValue) +{ + unsigned int port; + + if (sscanf(strValue, "%u", &port) != 1) + errx(1, "skinny_port: port parameter required"); + + PacketAliasSetSkinnyPort(port); +} ==== //depot/projects/hammer/share/examples/etc/make.conf#13 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/examples/etc/make.conf,v 1.217 2003/07/06 19:01:41 gshapiro Exp $ +# $FreeBSD: src/share/examples/etc/make.conf,v 1.218 2003/09/24 04:19:26 gshapiro Exp $ # # NOTE: Please would any committer updating this file also update the # make.conf(5) manual page, if necessary, which is located in @@ -263,6 +263,11 @@ # #SENDMAIL_ADDITIONAL_MC=/etc/mail/foo.mc /etc/mail/bar.mc # +# The following overrides the default location for the m4 configuration +# files used to build a .cf file from a .mc file. +# +#SENDMAIL_CF_DIR=/usr/local/share/sendmail/cf +# # Setting the following variable modifies the flags passed to m4 when # building a .cf file from a .mc file. It can be used to enable # features disabled by default. ==== //depot/projects/hammer/share/man/man4/ugen.4#3 (text+ko) ==== @@ -34,7 +34,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/ugen.4,v 1.3 2003/02/28 19:28:29 jhay Exp $ +.\" $FreeBSD: src/share/man/man4/ugen.4,v 1.5 2003/09/24 05:55:59 jb Exp $ .\" .Dd July 12, 1998 .Dt UGEN 4 @@ -145,27 +145,27 @@ Get the alternative setting number for the interface with the given index. The -.Va config_index +.Va uai_config_index is ignored in this call. .Bd -literal struct usb_alt_interface { - int config_index; - int interface_index; - int alt_no; + int uai_config_index; + int uai_interface_index; + int uai_alt_no; }; .Ed .It Dv USB_SET_ALTINTERFACE Pq Vt "struct usb_alt_interface" Set the alternative setting to the given number in the interface with the given index. The -.Va config_index +.Va uai_config_index is ignored in this call. .Pp This operation can only be performed when no endpoints for the interface are open. .It Dv USB_GET_NO_ALT Pq Vt "struct usb_alt_interface" Return the number of different alternate settings in the -.Va alt_no +.Va uai_alt_no field. .It Dv USB_GET_DEVICE_DESC Pq Vt usb_device_descriptor_t Return the device descriptor. @@ -175,8 +175,8 @@ .Dv USB_CURRENT_CONFIG_INDEX . .Bd -literal struct usb_config_desc { - int config_index; - usb_config_descriptor_t desc; + int ucd_config_index; + usb_config_descriptor_t ucd_desc; }; .Ed .It Dv USB_GET_INTERFACE_DESC Pq Vt "struct usb_interface_desc" @@ -186,10 +186,10 @@ .Dv USB_CURRENT_ALT_INDEX . .Bd -literal struct usb_interface_desc { - int config_index; - int interface_index; - int alt_index; - usb_interface_descriptor_t desc; + int uid_config_index; + int uid_interface_index; + int uid_alt_index; + usb_interface_descriptor_t uid_desc; }; .Ed .It Dv USB_GET_ENDPOINT_DESC Pq Vt "struct usb_endpoint_desc" @@ -198,26 +198,26 @@ endpoint index. .Bd -literal struct usb_endpoint_desc { - int config_index; - int interface_index; - int alt_index; - int endpoint_index; - usb_endpoint_descriptor_t desc; + int ued_config_index; + int ued_interface_index; + int ued_alt_index; + int ued_endpoint_index; + usb_endpoint_descriptor_t ued_desc; }; .Ed .It Dv USB_GET_FULL_DESC Pq Vt "struct usb_full_desc" Return all the descriptors for the given configuration. .Bd -literal struct usb_full_desc { - int config_index; - u_int size; - u_char *data; + int ufd_config_index; + u_int ufd_size; + u_char *ufd_data; }; .Ed The -.Va data +.Va ufd_data field should point to a memory area of the size given in the -.Va size +.Va ufd_size field. The proper size can be determined by first issuing a .Dv USB_GET_CONFIG_DESC @@ -229,34 +229,34 @@ string index. .Bd -literal struct usb_string_desc { - int string_index; - int language_id; - usb_string_descriptor_t desc; + int usd_string_index; + int usd_language_id; + usb_string_descriptor_t usd_desc; }; .Ed .It Dv USB_DO_REQUEST Pq Vt "struct usb_ctl_request" Send a USB request to the device on the control endpoint. Any data sent to/from the device is located at -.Va data . +.Va ucr_data . The size of the transferred data is determined from the -.Va request . +.Va ucr_request . The -.Va addr +.Va ucr_addr field is ignored in this call. The -.Va flags +.Va ucr_flags field can be used to flag that the request is allowed to be shorter than the requested size, and the -.Va actlen +.Va ucr_actlen will contain the actual size on completion. .Bd -literal struct usb_ctl_request { - int addr; - usb_device_request_t request; - void *data; - int flags; + int ucr_addr; + usb_device_request_t ucr_request; + void *ucr_data; + int ucr_flags; #define USBD_SHORT_XFER_OK 0x04 /* allow short reads */ - int actlen; /* actual length transferred */ + int ucr_actlen; /* actual length transferred */ }; .Ed This is a dangerous operation in that it can perform arbitrary operations ==== //depot/projects/hammer/share/man/man5/make.conf.5#14 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man5/make.conf.5,v 1.79 2003/09/15 16:11:41 sheldonh Exp $ +.\" $FreeBSD: src/share/man/man5/make.conf.5,v 1.80 2003/09/24 04:19:26 gshapiro Exp $ .\" .Dd November 3, 2000 .Dt MAKE.CONF 5 @@ -635,6 +635,13 @@ file(s), e.g., .Pa /etc/mail/foo.mc .Pa /etc/mail/bar.mc . +.It Va SENDMAIL_CF_DIR +.Pq Vt str +Override the default location for the m4 configuration files used to build a +.Pa .cf +file from a +.Pa .mc +file. .It Va SENDMAIL_M4_FLAGS .Pq Vt str Flags passed to m4 when building a ==== //depot/projects/hammer/share/man/man9/Makefile#16 (text+ko) ==== @@ -1,8 +1,8 @@ -# $FreeBSD: src/share/man/man9/Makefile,v 1.199 2003/07/21 14:20:58 harti Exp $ +# $FreeBSD: src/share/man/man9/Makefile,v 1.200 2003/09/24 05:18:41 marcel Exp $ MAN= BUF_LOCK.9 BUF_LOCKFREE.9 BUF_LOCKINIT.9 BUF_REFCNT.9 \ - BUF_TIMELOCK.9 BUF_UNLOCK.9 BUS_PRINT_CHILD.9 BUS_READ_IVAR.9 \ - BUS_SETUP_INTR.9 \ + BUF_TIMELOCK.9 BUF_UNLOCK.9 BUS_CONFIG_INTR.9 BUS_PRINT_CHILD.9 \ + BUS_READ_IVAR.9 BUS_SETUP_INTR.9 \ DECLARE_MODULE.9 DELAY.9 DEVICE_ATTACH.9 DEVICE_DETACH.9 \ DEVICE_IDENTIFY.9 DEVICE_PROBE.9 DEVICE_SHUTDOWN.9 \ DEV_MODULE.9 DRIVER_MODULE.9 \ ==== //depot/projects/hammer/sys/alpha/include/bus.h#11 (text+ko) ==== @@ -67,7 +67,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $FreeBSD: src/sys/alpha/include/bus.h,v 1.23 2003/07/27 13:52:09 mux Exp $ */ +/* $FreeBSD: src/sys/alpha/include/bus.h,v 1.24 2003/09/23 08:22:33 nyan Exp $ */ #ifndef _ALPHA_BUS_H_ #define _ALPHA_BUS_H_ @@ -91,6 +91,24 @@ #define BUS_SPACE_UNRESTRICTED (~0UL) /* + * Map a region of device bus space into CPU virtual address space. + */ + +static __inline int bus_space_map(bus_space_tag_t t, bus_addr_t addr, + bus_size_t size, int flags, + bus_space_handle_t *bshp); + +static __inline int +bus_space_map(bus_space_tag_t t __unused, bus_addr_t addr, + bus_size_t size __unused, int flags __unused, + bus_space_handle_t *bshp) +{ + + *bshp = addr; + return (0); +} + +/* * Unmap a region of device bus space. */ ==== //depot/projects/hammer/sys/amd64/include/bus_amd64.h#5 (text+ko) ==== @@ -67,7 +67,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $FreeBSD: src/sys/amd64/include/bus_amd64.h,v 1.25 2003/05/23 05:04:54 peter Exp $ */ +/* $FreeBSD: src/sys/amd64/include/bus_amd64.h,v 1.26 2003/09/23 08:22:33 nyan Exp $ */ #ifndef _AMD64_BUS_AMD64_H_ #define _AMD64_BUS_AMD64_H_ @@ -114,11 +114,19 @@ * Map a region of device bus space into CPU virtual address space. */ -#define BUS_SPACE_MAP_CACHEABLE 0x01 -#define BUS_SPACE_MAP_LINEAR 0x02 +static __inline int bus_space_map(bus_space_tag_t t, bus_addr_t addr, + bus_size_t size, int flags, + bus_space_handle_t *bshp); + +static __inline int +bus_space_map(bus_space_tag_t t __unused, bus_addr_t addr, + bus_size_t size __unused, int flags __unused, + bus_space_handle_t *bshp) +{ -int bus_space_map(bus_space_tag_t t, bus_addr_t addr, bus_size_t size, - int flags, bus_space_handle_t *bshp); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Sep 24 14:54:32 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 40BDF16A4C0; Wed, 24 Sep 2003 14:54:32 -0700 (PDT) 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 172FA16A4B3 for ; Wed, 24 Sep 2003 14:54:32 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CE2A43FF3 for ; Wed, 24 Sep 2003 14:54:31 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8OLsVXJ018691 for ; Wed, 24 Sep 2003 14:54:31 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8OLsUsw018688 for perforce@freebsd.org; Wed, 24 Sep 2003 14:54:30 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Wed, 24 Sep 2003 14:54:30 -0700 (PDT) Message-Id: <200309242154.h8OLsUsw018688@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38544 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2003 21:54:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=38544 Change 38544 by sam@sam_ebb on 2003/09/24 14:53:56 Correct rate set negotiation when operating as a station: if the AP has basic rates that we do not support then ignore them instead of marking the rate set in error. This fixes an 11b station associating with an 11g/b AP. Affected files ... .. //depot/projects/netperf/sys/net80211/ieee80211_proto.c#3 edit Differences ... ==== //depot/projects/netperf/sys/net80211/ieee80211_proto.c#3 (text+ko) ==== @@ -220,7 +220,7 @@ okrate = badrate = 0; srs = &ic->ic_sup_rates[ieee80211_chan2mode(ic, ni->ni_chan)]; nrs = &ni->ni_rates; - for (i = 0; i < ni->ni_rates.rs_nrates; ) { + for (i = 0; i < nrs->rs_nrates; ) { ignore = 0; if (flags & IEEE80211_F_DOSORT) { /* @@ -259,7 +259,16 @@ break; } if (j == srs->rs_nrates) { - if (nrs->rs_rates[i] & IEEE80211_RATE_BASIC) + /* + * A rate in the node's rate set is not + * supported. If this is a basic rate and we + * are operating as an AP then this is an error. + * Otherwise we just discard/ignore the rate. + * Note that this is important for 11b stations + * when they want to associate with an 11g AP. + */ + if (ic->ic_opmode == IEEE80211_M_HOSTAP && + (nrs->rs_rates[i] & IEEE80211_RATE_BASIC)) error++; ignore++; } From owner-p4-projects@FreeBSD.ORG Wed Sep 24 18:11:36 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0636816A4C0; Wed, 24 Sep 2003 18:11:36 -0700 (PDT) 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 B873116A4B3 for ; Wed, 24 Sep 2003 18:11:35 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 164CE44014 for ; Wed, 24 Sep 2003 18:11:34 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8P1BXXJ035638 for ; Wed, 24 Sep 2003 18:11:33 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8P1BXSN035635 for perforce@freebsd.org; Wed, 24 Sep 2003 18:11:33 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Wed, 24 Sep 2003 18:11:33 -0700 (PDT) Message-Id: <200309250111.h8P1BXSN035635@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38551 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2003 01:11:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=38551 Change 38551 by sam@sam_ebb on 2003/09/24 18:10:56 Try yet again to deal with timing out nodes. We cannot hold the node lock while sending a management frame as this will potentially result in a LOR with a driver lock. This doesn't happen for the Atheros driver but does for the wi driver. Use a generation number to help process each node once when scanning the node table and drop the node lock if we need to timeout a node and send a frame. Affected files ... .. //depot/projects/netperf/sys/net80211/ieee80211_node.c#9 edit .. //depot/projects/netperf/sys/net80211/ieee80211_node.h#6 edit .. //depot/projects/netperf/sys/net80211/ieee80211_var.h#6 edit Differences ... ==== //depot/projects/netperf/sys/net80211/ieee80211_node.c#9 (text+ko) ==== @@ -92,6 +92,7 @@ ic->ic_node_free = ieee80211_node_free; ic->ic_node_copy = ieee80211_node_copy; ic->ic_node_getrssi = ieee80211_node_getrssi; + ic->ic_scangen = 1; } void @@ -544,30 +545,48 @@ mtx_unlock(&ic->ic_nodelock); } +/* + * Timeout inactive nodes. Note that we cannot hold the node + * lock while sending a frame as this would lead to a LOR. + * Instead we use a generation number to mark nodes that we've + * scanned and drop the lock and restart a scan if we have to + * time out a node. Since we are single-threaded by virtue of + * controlling the inactivity timer we can be sure this will + * process each node only once. + */ void ieee80211_timeout_nodes(struct ieee80211com *ic) { - struct ieee80211_node *ni, *nextbs; + struct ieee80211_node *ni; + u_int gen = ic->ic_scangen++; /* NB: ok 'cuz single-threaded*/ +restart: mtx_lock(&ic->ic_nodelock); - for (ni = TAILQ_FIRST(&ic->ic_node); ni != NULL;) { + TAILQ_FOREACH(ni, &ic->ic_node, ni_list) { + if (ni->ni_scangen == gen) /* previously handled */ + continue; + ni->ni_scangen = gen; if (++ni->ni_inact > IEEE80211_INACT_MAX) { IEEE80211_DPRINTF(("station %s timed out " "due to inactivity (%u secs)\n", ether_sprintf(ni->ni_macaddr), ni->ni_inact)); - nextbs = TAILQ_NEXT(ni, ni_list); /* * Send a deauthenticate frame. + * + * Drop the node lock before sending the + * deauthentication frame in case the driver takes + * a lock, as this will result in a LOR between the + * node lock and the driver lock. */ + mtx_unlock(&ic->ic_nodelock); IEEE80211_SEND_MGMT(ic, ni, IEEE80211_FC0_SUBTYPE_DEAUTH, IEEE80211_REASON_AUTH_EXPIRE); ieee80211_free_node(ic, ni); ic->ic_stats.is_node_timeout++; - ni = nextbs; - } else - ni = TAILQ_NEXT(ni, ni_list); + goto restart; + } } if (!TAILQ_EMPTY(&ic->ic_node)) ic->ic_inact_timer = IEEE80211_INACT_WAIT; ==== //depot/projects/netperf/sys/net80211/ieee80211_node.h#6 (text+ko) ==== @@ -62,6 +62,7 @@ TAILQ_ENTRY(ieee80211_node) ni_list; LIST_ENTRY(ieee80211_node) ni_hash; u_int ni_refcnt; + u_int ni_scangen; /* gen# for timeout scan */ /* hardware */ u_int32_t ni_rstamp; /* recv timestamp */ ==== //depot/projects/netperf/sys/net80211/ieee80211_var.h#6 (text+ko) ==== @@ -166,6 +166,7 @@ u_int16_t ic_rtsthreshold; u_int16_t ic_fragthreshold; struct mtx ic_nodelock; /* on node table */ + u_int ic_scangen; /* gen# for timeout scan */ struct ieee80211_node *(*ic_node_alloc)(struct ieee80211com *); void (*ic_node_free)(struct ieee80211com *, struct ieee80211_node *); From owner-p4-projects@FreeBSD.ORG Wed Sep 24 20:49:53 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 03F9E16A4C0; Wed, 24 Sep 2003 20:49:53 -0700 (PDT) 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 B58FB16A4B3 for ; Wed, 24 Sep 2003 20:49:52 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 404E843FE3 for ; Wed, 24 Sep 2003 20:49:46 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8P3nkXJ049740 for ; Wed, 24 Sep 2003 20:49:46 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8P3njii049737 for perforce@freebsd.org; Wed, 24 Sep 2003 20:49:45 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Wed, 24 Sep 2003 20:49:45 -0700 (PDT) Message-Id: <200309250349.h8P3njii049737@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 38554 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2003 03:49:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=38554 Change 38554 by marcel@marcel_nfs on 2003/09/24 20:49:34 The problem: some hardware drivers communicate with multi-channel hardware and need to know which channel they control so that they can figure out how to program the hardware. The old solution: use the bus handle at first and the I/O address after that to determine the channel. The problem is that it creates a hardware dependency we can do without and also doesn't handle devices that access multiple channels through a single bus space. The new solution: add a channel number to struct uart_bas. It is filled in when the bas is constructed. The bus front-ends also pass a channel number to uart_bus_probe() for when it creates the bas in the softc. This way hardware drivers have direct (non-kludged) access to something that tells them which channel they control. Note that the current change to puc(4) is wrong. It sets the channel number for each UART, even those that aren't multi-channeled. We may not match system devices for which the channel is not set. This change is in preparation of syncing with HEAD after talking to nyan@ about the best way to go forward. A backout of his change is probably more work than committing on top of it. In any case it's better to work out the details off- branch and merge the end result to CVS when everybody is happy. Affected files ... .. //depot/projects/uart/dev/puc/puc.c#10 edit .. //depot/projects/uart/dev/puc/pucvar.h#8 edit .. //depot/projects/uart/dev/uart/uart.h#5 edit .. //depot/projects/uart/dev/uart/uart_bus.h#30 edit .. //depot/projects/uart/dev/uart/uart_bus_acpi.c#4 edit .. //depot/projects/uart/dev/uart/uart_bus_ebus.c#6 edit .. //depot/projects/uart/dev/uart/uart_bus_isa.c#4 edit .. //depot/projects/uart/dev/uart/uart_bus_pccard.c#2 edit .. //depot/projects/uart/dev/uart/uart_bus_pci.c#6 edit .. //depot/projects/uart/dev/uart/uart_bus_puc.c#8 edit .. //depot/projects/uart/dev/uart/uart_core.c#30 edit .. //depot/projects/uart/dev/uart/uart_cpu.h#11 edit .. //depot/projects/uart/dev/uart/uart_cpu_alpha.c#6 edit .. //depot/projects/uart/dev/uart/uart_cpu_amd64.c#4 edit .. //depot/projects/uart/dev/uart/uart_cpu_i386.c#5 edit .. //depot/projects/uart/dev/uart/uart_cpu_ia64.c#5 edit .. //depot/projects/uart/dev/uart/uart_cpu_pc98.c#4 edit .. //depot/projects/uart/dev/uart/uart_cpu_sparc64.c#14 edit .. //depot/projects/uart/dev/uart/uart_dev_sab82532.c#29 edit .. //depot/projects/uart/dev/uart/uart_dev_z8530.c#15 edit Differences ... ==== //depot/projects/uart/dev/puc/puc.c#10 (text+ko) ==== @@ -105,9 +105,10 @@ struct puc_device { struct resource_list resources; + int port; + int regshft; u_int serialfreq; u_int subtype; - int regshft; }; static void puc_intr(void *arg); @@ -331,6 +332,7 @@ &rle->res->r_bushandle); } + pdev->port = i + 1; pdev->serialfreq = sc->sc_desc.ports[i].serialfreq; pdev->subtype = sc->sc_desc.ports[i].type & PUC_PORT_SUBTYPE_MASK; @@ -598,12 +600,15 @@ case PUC_IVAR_FREQ: *result = pdev->serialfreq; break; - case PUC_IVAR_SUBTYPE: - *result = pdev->subtype; + case PUC_IVAR_PORT: + *result = pdev->port; break; case PUC_IVAR_REGSHFT: *result = pdev->regshft; break; + case PUC_IVAR_SUBTYPE: + *result = pdev->subtype; + break; default: return (ENOENT); } ==== //depot/projects/uart/dev/puc/pucvar.h#8 (text+ko) ==== @@ -115,8 +115,9 @@ enum puc_device_ivars { PUC_IVAR_FREQ, - PUC_IVAR_SUBTYPE, - PUC_IVAR_REGSHFT + PUC_IVAR_PORT, + PUC_IVAR_REGSHFT, + PUC_IVAR_SUBTYPE }; #ifdef PUC_ENTRAILS ==== //depot/projects/uart/dev/uart/uart.h#5 (text+ko) ==== @@ -38,8 +38,9 @@ struct uart_bas { bus_space_tag_t bst; bus_space_handle_t bsh; + u_int chan; + u_int rclk; u_int regshft; - u_int rclk; }; #define uart_regofs(bas, reg) ((reg) << (bas)->regshft) ==== //depot/projects/uart/dev/uart/uart_bus.h#30 (text+ko) ==== @@ -172,7 +172,7 @@ int uart_bus_attach(device_t dev); int uart_bus_detach(device_t dev); -int uart_bus_probe(device_t dev, int regshft, int rclk, int rid); +int uart_bus_probe(device_t dev, int regshft, int rclk, int rid, int chan); int uart_tty_attach(struct uart_softc *); int uart_tty_detach(struct uart_softc *); ==== //depot/projects/uart/dev/uart/uart_bus_acpi.c#4 (text+ko) ==== @@ -73,7 +73,7 @@ if (!ISA_PNP_PROBE(parent, dev, acpi_ns8250_ids)) { sc->sc_class = &uart_ns8250_class; - return (uart_bus_probe(dev, 0, 0, 0)); + return (uart_bus_probe(dev, 0, 0, 0, 0)); } /* Add checks for non-ns8250 IDs here. */ ==== //depot/projects/uart/dev/uart/uart_bus_ebus.c#6 (text+ko) ==== @@ -71,11 +71,11 @@ nm = ebus_get_name(dev); if (!strcmp(nm, "su")) { sc->sc_class = &uart_ns8250_class; - return (uart_bus_probe(dev, 0, 0, 0)); + return (uart_bus_probe(dev, 0, 0, 0, 0)); } if (!strcmp(nm, "se")) { sc->sc_class = &uart_sab82532_class; - error = uart_bus_probe(dev, 0, 0, 0); + error = uart_bus_probe(dev, 0, 0, 0, 1); return ((error) ? error : -1); } ==== //depot/projects/uart/dev/uart/uart_bus_isa.c#4 (text+ko) ==== @@ -155,13 +155,13 @@ if (!ISA_PNP_PROBE(parent, dev, isa_ns8250_ids)) { sc->sc_class = &uart_ns8250_class; - return (uart_bus_probe(dev, 0, 0, 0)); + return (uart_bus_probe(dev, 0, 0, 0, 0)); } /* Add checks for non-ns8250 IDs here. */ sc->sc_class = &uart_ns8250_class; - return (uart_bus_probe(dev, 0, 0, 0)); + return (uart_bus_probe(dev, 0, 0, 0, 0)); } DRIVER_MODULE(uart, isa, uart_isa_driver, uart_devclass, 0, 0); ==== //depot/projects/uart/dev/uart/uart_bus_pccard.c#2 (text+ko) ==== @@ -100,7 +100,7 @@ /* Do not probe IRQ - pccard doesn't turn on the interrupt line */ /* until bus_setup_intr but how can I do so?*/ - return (uart_bus_probe(dev, 0, 0, 0)); + return (uart_bus_probe(dev, 0, 0, 0, 0)); } DRIVER_MODULE(uart, pccard, uart_pccard_driver, uart_devclass, 0, 0); ==== //depot/projects/uart/dev/uart/uart_bus_pci.c#6 (text+ko) ==== @@ -111,7 +111,7 @@ match: if (id->desc) device_set_desc(dev, id->desc); - return (uart_bus_probe(dev, 0, 0, id->rid)); + return (uart_bus_probe(dev, 0, 0, id->rid, 0)); } DRIVER_MODULE(uart, pci, uart_pci_driver, uart_devclass, 0, 0); ==== //depot/projects/uart/dev/uart/uart_bus_puc.c#8 (text+ko) ==== @@ -63,7 +63,7 @@ { device_t parent; struct uart_softc *sc; - uintptr_t rclk, regshft, type; + uintptr_t port, rclk, regshft, type; parent = device_get_parent(dev); sc = device_get_softc(dev); @@ -84,11 +84,13 @@ return (ENXIO); } + if (BUS_READ_IVAR(parent, dev, PUC_IVAR_PORT, &port)) + port = 0; if (BUS_READ_IVAR(parent, dev, PUC_IVAR_FREQ, &rclk)) rclk = 0; if (BUS_READ_IVAR(parent, dev, PUC_IVAR_REGSHFT, ®shft)) regshft = 0; - return (uart_bus_probe(dev, regshft, rclk, 0)); + return (uart_bus_probe(dev, regshft, rclk, 0, port)); } DRIVER_MODULE(uart, puc, uart_puc_driver, uart_devclass, 0, 0); ==== //depot/projects/uart/dev/uart/uart_core.c#30 (text+ko) ==== @@ -221,7 +221,7 @@ } int -uart_bus_probe(device_t dev, int regshft, int rclk, int rid) +uart_bus_probe(device_t dev, int regshft, int rclk, int rid, int chan) { struct uart_softc *sc; struct uart_devinfo *sysdev; @@ -269,11 +269,13 @@ */ sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres); sc->sc_bas.bst = rman_get_bustag(sc->sc_rres); + sc->sc_bas.chan = chan; sc->sc_bas.regshft = regshft; sc->sc_bas.rclk = (rclk == 0) ? sc->sc_class->uc_rclk : rclk; SLIST_FOREACH(sysdev, &uart_sysdevs, next) { - if (uart_cpu_eqres(&sc->sc_bas, &sysdev->bas)) { + if (chan == sysdev->bas.chan && + uart_cpu_eqres(&sc->sc_bas, &sysdev->bas)) { /* XXX check if ops matches class. */ sc->sc_sysdev = sysdev; break; ==== //depot/projects/uart/dev/uart/uart_cpu.h#11 (text+ko) ==== @@ -67,7 +67,6 @@ void *cookie; /* Type dependent use. */ }; -bus_addr_t uart_cpu_busaddr(struct uart_bas *); int uart_cpu_eqres(struct uart_bas *, struct uart_bas *); int uart_cpu_getdev(int, struct uart_devinfo *); ==== //depot/projects/uart/dev/uart/uart_cpu_alpha.c#6 (text+ko) ==== @@ -39,13 +39,6 @@ #include #include -bus_addr_t -uart_cpu_busaddr(struct uart_bas *bas) -{ - - return (bas->bsh); -} - int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { @@ -65,6 +58,7 @@ return (ENXIO); boothowto |= RB_SERIAL; di->ops = uart_ns8250_ops; + di->bas.chan = 0; di->bas.bst = busspace_isa_io; di->bas.bsh = 0x3f8; di->bas.regshft = 0; @@ -101,6 +95,7 @@ * only have ns8250 and successors on alpha. */ di->ops = uart_ns8250_ops; + di->bas.chan = 0; di->bas.bst = busspace_isa_io; di->bas.bsh = ivar; di->bas.regshft = 0; ==== //depot/projects/uart/dev/uart/uart_cpu_amd64.c#4 (text+ko) ==== @@ -36,13 +36,6 @@ #include #include -bus_addr_t -uart_cpu_busaddr(struct uart_bas *bas) -{ - - return (bas->bsh); -} - int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { @@ -82,6 +75,7 @@ * ns8250 and successors on i386. */ di->ops = uart_ns8250_ops; + di->bas.chan = 0; di->bas.bst = AMD64_BUS_SPACE_IO; di->bas.bsh = ivar; di->bas.regshft = 0; ==== //depot/projects/uart/dev/uart/uart_cpu_i386.c#5 (text+ko) ==== @@ -36,13 +36,6 @@ #include #include -bus_addr_t -uart_cpu_busaddr(struct uart_bas *bas) -{ - - return (bas->bsh); -} - int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { @@ -82,6 +75,7 @@ * ns8250 and successors on i386. */ di->ops = uart_ns8250_ops; + di->bas.chan = 0; di->bas.bst = I386_BUS_SPACE_IO; di->bas.bsh = ivar; di->bas.regshft = 0; ==== //depot/projects/uart/dev/uart/uart_cpu_ia64.c#5 (text+ko) ==== @@ -44,13 +44,6 @@ UART_PARITY_ODD, UART_PARITY_MARK, UART_PARITY_SPACE }; -bus_addr_t -uart_cpu_busaddr(struct uart_bas *bas) -{ - - return (bas->bsh); -} - int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { @@ -82,7 +75,7 @@ continue; di->ops = uart_ns8250_ops; - di->bas.bst = IA64_BUS_SPACE_IO; + di->bas.chan = 0; di->bas.bst = (ent->address.addr_space == 0) ? IA64_BUS_SPACE_MEM : IA64_BUS_SPACE_IO; di->bas.bsh = ent->address.addr_high; @@ -129,6 +122,7 @@ * ns8250 and successors on i386. */ di->ops = uart_ns8250_ops; + di->bas.chan = 0; di->bas.bst = IA64_BUS_SPACE_IO; di->bas.bsh = ivar; di->bas.regshft = 0; ==== //depot/projects/uart/dev/uart/uart_cpu_pc98.c#4 (text+ko) ==== @@ -36,13 +36,6 @@ #include #include -bus_addr_t -uart_cpu_busaddr(struct uart_bas *bas) -{ - - return (bas->bsh->bsh_base); -} - int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { @@ -87,6 +80,7 @@ di->ops = uart_ns8250_ops; else di->ops = uart_i8251_ops; + di->bas.chan = 0; di->bas.bst = I386_BUS_SPACE_IO; i386_bus_space_handle_alloc(di->bas.bst, ivar, 8, &di->bas.bsh); di->bas.regshft = 0; ==== //depot/projects/uart/dev/uart/uart_cpu_sparc64.c#14 (text+ko) ==== @@ -55,14 +55,7 @@ if (len < 2 || alias[len - 2] != ':' || alias[len - 1] < 'a' || alias[len - 1] > 'b') return (0); - return (alias[len - 1] - 'a'); -} - -bus_addr_t -uart_cpu_busaddr(struct uart_bas *bas) -{ - - return (bas->bsh); + return (alias[len - 1] - 'a' + 1); } int @@ -78,7 +71,7 @@ char buf[32], dev[32], compat[32]; phandle_t input, options, output; bus_addr_t addr; - int baud, bits, ch, error, space, stop; + int baud, bits, error, space, stop; char flag, par; /* @@ -130,16 +123,18 @@ di->bas.rclk = 0; if (!strcmp(buf, "se")) { di->ops = uart_sab82532_ops; - addr += 64 * uart_cpu_channel(dev); + di->bas.chan = uart_cpu_channel(dev); + addr += 64 * (di->bas.chan - 1); } else if (!strcmp(buf, "zs")) { di->ops = uart_z8530_ops; + di->bas.chan = uart_cpu_channel(dev); di->bas.regshft = 1; - ch = uart_cpu_channel(dev); - addr += 4 - 4 * ch; + addr += 4 - 4 * (di->bas.chan - 1); } else if (!strcmp(buf, "su") || !strcmp(buf, "su_pnp") || - !strcmp(compat, "su") || !strcmp(compat, "su16550")) + !strcmp(compat, "su") || !strcmp(compat, "su16550")) { di->ops = uart_ns8250_ops; - else + di->bas.chan = 0; + } else return (ENXIO); /* Fill in the device info. */ ==== //depot/projects/uart/dev/uart/uart_dev_sab82532.c#29 (text+ko) ==== @@ -42,9 +42,6 @@ #define DEFAULT_RCLK 29491200 -#define IS_CHANNEL_A(bas) ((uart_cpu_busaddr(bas) & 0x40) == 0x00) -#define IS_CHANNEL_B(bas) ((uart_cpu_busaddr(bas) & 0x40) == 0x40) - /* * NOTE: To allow us to read the baudrate divisor from the chip, we * copy the value written to the write-only BGR register to an unused @@ -219,7 +216,14 @@ uart_barrier(bas); /* Set DTR. */ pvr = uart_getreg(bas, SAB_PVR); - pvr &= IS_CHANNEL_A(bas) ? ~SAB_PVR_DTR_A : ~SAB_PVR_DTR_B; + switch (bas->chan) { + case 1: + pvr &= ~SAB_PVR_DTR_A; + break; + case 2: + pvr &= ~SAB_PVR_DTR_B; + break; + } uart_setreg(bas, SAB_PVR, pvr | SAB_PVR_MAGIC); uart_barrier(bas); @@ -268,7 +272,14 @@ uint8_t pvr; pvr = uart_getreg(bas, SAB_PVR); - pvr |= IS_CHANNEL_A(bas) ? SAB_PVR_DTR_A : SAB_PVR_DTR_B; + switch (bas->chan) { + case 1: + pvr |= SAB_PVR_DTR_A; + break; + case 2: + pvr |= SAB_PVR_DTR_B; + break; + } uart_setreg(bas, SAB_PVR, pvr); uart_barrier(bas); } @@ -448,7 +459,14 @@ vstr = uart_getreg(bas, SAB_VSTR); SIGCHG(vstr & SAB_VSTR_CD, sig, UART_SIG_DCD, UART_SIG_DDCD); pvr = uart_getreg(bas, SAB_PVR); - pvr &= (IS_CHANNEL_A(bas)) ? SAB_PVR_DSR_A : SAB_PVR_DSR_B; + switch (bas->chan) { + case 1: + pvr &= SAB_PVR_DSR_A; + break; + case 2: + pvr &= SAB_PVR_DSR_B; + break; + } SIGCHG(~pvr, sig, UART_SIG_DSR, UART_SIG_DDSR); mtx_unlock_spin(&sc->sc_hwmtx); new = sig & ~UART_SIGMASK_DELTA; @@ -558,15 +576,15 @@ sab82532_bus_probe(struct uart_softc *sc) { char buf[80]; - const char *ch, *vstr; + const char *vstr; int error; + char ch; error = sab82532_probe(&sc->sc_bas); if (error) return (error); - /* Assume the address range is naturally aligned. */ - ch = IS_CHANNEL_A(&sc->sc_bas) ? "A" : "B"; + ch = sc->sc_bas.chan - 1 + 'A'; switch (uart_getreg(&sc->sc_bas, SAB_VSTR) & SAB_VSTR_VMASK) { case SAB_VSTR_V_1: @@ -585,7 +603,7 @@ break; } - snprintf(buf, sizeof(buf), "SAB 82532 %s, channel %s", vstr, ch); + snprintf(buf, sizeof(buf), "SAB 82532 %s, channel %c", vstr, ch); device_set_desc_copy(sc->sc_dev, buf); return (0); } @@ -650,10 +668,20 @@ mtx_lock_spin(&sc->sc_hwmtx); /* Set DTR pin. */ pvr = uart_getreg(bas, SAB_PVR); - if (new & UART_SIG_DTR) - pvr &= (IS_CHANNEL_A(bas)) ? ~SAB_PVR_DTR_A : ~SAB_PVR_DTR_B; - else - pvr |= (IS_CHANNEL_A(bas)) ? SAB_PVR_DTR_A : SAB_PVR_DTR_B; + switch (bas->chan) { + case 1: + if (new & UART_SIG_DTR) + pvr &= ~SAB_PVR_DTR_A; + else + pvr |= SAB_PVR_DTR_A; + break; + case 2: + if (new & UART_SIG_DTR) + pvr &= ~SAB_PVR_DTR_B; + else + pvr |= SAB_PVR_DTR_B; + break; + } uart_setreg(bas, SAB_PVR, pvr); /* Set RTS pin. */ ==== //depot/projects/uart/dev/uart/uart_dev_z8530.c#15 (text+ko) ==== @@ -42,9 +42,6 @@ #define DEFAULT_RCLK 307200 -#define IS_CHANNEL_A(bas) ((uart_cpu_busaddr(bas) & 7) != 0) -#define IS_CHANNEL_B(bas) ((uart_cpu_busaddr(bas) & 7) == 0) - /* Multiplexed I/O. */ static __inline void uart_setmreg(struct uart_bas *bas, int reg, int val) @@ -144,14 +141,22 @@ z8530_setup(struct uart_bas *bas, int baudrate, int databits, int stopbits, int parity) { - uint8_t tpc; + uint8_t mic, tpc; if (bas->rclk == 0) bas->rclk = DEFAULT_RCLK; /* Assume we don't need to perform a full hardware reset. */ - uart_setmreg(bas, WR_MIC, ((IS_CHANNEL_A(bas)) ? MIC_CRA : MIC_CRB) | - MIC_MIE | MIC_NV); + mic = MIC_MIE | MIC_NV; + switch (bas->chan) { + case 1: + mic |= MIC_CRA; + break; + case 2: + mic |= MIC_CRB; + break; + } + uart_setmreg(bas, WR_MIC, mic); uart_barrier(bas); /* Set clock sources and enable BRG. */ uart_setmreg(bas, WR_CMC, CMC_RC_BRG | CMC_TC_BRG); @@ -433,17 +438,16 @@ z8530_bus_probe(struct uart_softc *sc) { char buf[80]; - const char *ch; int error; + char ch; error = z8530_probe(&sc->sc_bas); if (error) return (error); - /* Assume the address range is naturally aligned. */ - ch = IS_CHANNEL_A(&sc->sc_bas) ? "A" : "B"; + ch = sc->sc_bas.chan - 1 + 'A'; - snprintf(buf, sizeof(buf), "z8530, channel %s", ch); + snprintf(buf, sizeof(buf), "z8530, channel %c", ch); device_set_desc_copy(sc->sc_dev, buf); return (0); } From owner-p4-projects@FreeBSD.ORG Wed Sep 24 21:04:08 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7E7D016A4C0; Wed, 24 Sep 2003 21:04:08 -0700 (PDT) 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 5152616A4BF for ; Wed, 24 Sep 2003 21:04:08 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BE2043F75 for ; Wed, 24 Sep 2003 21:04:05 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8P444XJ051282 for ; Wed, 24 Sep 2003 21:04:05 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8P443f0051266 for perforce@freebsd.org; Wed, 24 Sep 2003 21:04:03 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Wed, 24 Sep 2003 21:04:03 -0700 (PDT) Message-Id: <200309250404.h8P443f0051266@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 38555 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2003 04:04:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=38555 Change 38555 by marcel@marcel_nfs on 2003/09/24 21:03:34 IFC @38553 Affected files ... .. //depot/projects/ia64/UPDATING#52 integrate .. //depot/projects/ia64/crypto/openssh/auth-chall.c#6 integrate .. //depot/projects/ia64/crypto/openssh/auth2-pam-freebsd.c#11 integrate .. //depot/projects/ia64/crypto/openssh/ssh_config#12 integrate .. //depot/projects/ia64/crypto/openssh/ssh_config.5#8 integrate .. //depot/projects/ia64/crypto/openssh/sshd_config#13 integrate .. //depot/projects/ia64/crypto/openssh/sshd_config.5#8 integrate .. //depot/projects/ia64/crypto/openssh/version.h#13 integrate .. //depot/projects/ia64/etc/sendmail/Makefile#14 integrate .. //depot/projects/ia64/lib/libalias/Makefile#5 integrate .. //depot/projects/ia64/lib/libalias/alias.c#7 integrate .. //depot/projects/ia64/lib/libalias/alias.h#5 integrate .. //depot/projects/ia64/lib/libalias/alias_db.c#8 integrate .. //depot/projects/ia64/lib/libalias/alias_local.h#4 integrate .. //depot/projects/ia64/lib/libalias/alias_skinny.c#1 branch .. //depot/projects/ia64/lib/libalias/libalias.3#7 integrate .. //depot/projects/ia64/lib/libpthread/arch/i386/i386/thr_getcontext.S#4 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_info.c#5 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_kern.c#37 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_mutex.c#11 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_private.h#25 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_sig.c#25 integrate .. //depot/projects/ia64/release/scripts/print-cdrom-packages.sh#28 integrate .. //depot/projects/ia64/sbin/dump/optr.c#12 integrate .. //depot/projects/ia64/sbin/mdconfig/mdconfig.8#8 integrate .. //depot/projects/ia64/sbin/natd/natd.8#10 integrate .. //depot/projects/ia64/sbin/natd/natd.c#8 integrate .. //depot/projects/ia64/share/examples/etc/make.conf#34 integrate .. //depot/projects/ia64/share/man/man4/ath.4#11 integrate .. //depot/projects/ia64/share/man/man4/bridge.4#5 integrate .. //depot/projects/ia64/share/man/man4/ugen.4#3 integrate .. //depot/projects/ia64/share/man/man4/wi.4#31 integrate .. //depot/projects/ia64/share/man/man5/make.conf.5#41 integrate .. //depot/projects/ia64/share/man/man9/BUS_CONFIG_INTR.9#1 branch .. //depot/projects/ia64/share/man/man9/Makefile#30 integrate .. //depot/projects/ia64/sys/alpha/alpha/elf_machdep.c#10 integrate .. //depot/projects/ia64/sys/alpha/include/bus.h#14 integrate .. //depot/projects/ia64/sys/alpha/include/elf.h#5 integrate .. //depot/projects/ia64/sys/alpha/linux/linux_sysvec.c#13 integrate .. //depot/projects/ia64/sys/alpha/osf1/osf1_sysvec.c#7 integrate .. //depot/projects/ia64/sys/amd64/acpica/acpi_machdep.c#4 integrate .. //depot/projects/ia64/sys/amd64/amd64/busdma_machdep.c#8 integrate .. //depot/projects/ia64/sys/amd64/amd64/elf_machdep.c#5 integrate .. //depot/projects/ia64/sys/amd64/amd64/exception.S#6 integrate .. //depot/projects/ia64/sys/amd64/amd64/machdep.c#14 integrate .. //depot/projects/ia64/sys/amd64/amd64/trap.c#9 integrate .. //depot/projects/ia64/sys/amd64/amd64/tsc.c#3 integrate .. //depot/projects/ia64/sys/amd64/ia32/ia32_syscall.c#5 integrate .. //depot/projects/ia64/sys/amd64/include/acpica_machdep.h#3 integrate .. //depot/projects/ia64/sys/amd64/include/bus_amd64.h#3 integrate .. //depot/projects/ia64/sys/amd64/include/clock.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/cpu.h#3 integrate .. //depot/projects/ia64/sys/amd64/include/elf.h#3 integrate .. //depot/projects/ia64/sys/amd64/include/endian.h#3 integrate .. //depot/projects/ia64/sys/amd64/include/legacyvar.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/md_var.h#5 integrate .. //depot/projects/ia64/sys/amd64/include/pci_cfgreg.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/segments.h#3 integrate .. //depot/projects/ia64/sys/amd64/include/specialreg.h#2 integrate .. //depot/projects/ia64/sys/amd64/include/vmparam.h#4 integrate .. //depot/projects/ia64/sys/amd64/isa/clock.c#3 integrate .. //depot/projects/ia64/sys/amd64/pci/pci_bus.c#5 integrate .. //depot/projects/ia64/sys/arm/include/elf.h#2 integrate .. //depot/projects/ia64/sys/compat/ia32/ia32_sysvec.c#2 integrate .. //depot/projects/ia64/sys/compat/ia32/ia32_util.h#2 integrate .. //depot/projects/ia64/sys/compat/linprocfs/linprocfs.c#23 integrate .. //depot/projects/ia64/sys/compat/pecoff/imgact_pecoff.c#17 integrate .. //depot/projects/ia64/sys/compat/svr4/svr4_sysvec.c#15 integrate .. //depot/projects/ia64/sys/contrib/ipfilter/netinet/ip_fil.c#9 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi_button.c#10 integrate .. //depot/projects/ia64/sys/dev/ata/atapi-cam.c#19 integrate .. //depot/projects/ia64/sys/dev/ata/atapi-cd.c#31 integrate .. //depot/projects/ia64/sys/dev/ata/atapi-cd.h#12 integrate .. //depot/projects/ia64/sys/dev/bge/if_bge.c#42 integrate .. //depot/projects/ia64/sys/dev/em/if_em.c#27 integrate .. //depot/projects/ia64/sys/dev/em/if_em.h#20 integrate .. //depot/projects/ia64/sys/dev/exca/exca.c#11 integrate .. //depot/projects/ia64/sys/dev/ips/ips_disk.c#4 integrate .. //depot/projects/ia64/sys/dev/pccard/pccarddevs#37 integrate .. //depot/projects/ia64/sys/dev/pccard/pccarddevs.h#37 integrate .. //depot/projects/ia64/sys/dev/uart/uart.h#2 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus_pccard.c#2 integrate .. //depot/projects/ia64/sys/dev/uart/uart_core.c#4 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu.h#4 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_alpha.c#3 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_amd64.c#3 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_i386.c#3 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_ia64.c#3 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_pc98.c#4 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_sparc64.c#4 integrate .. //depot/projects/ia64/sys/dev/uart/uart_dev_sab82532.c#4 integrate .. //depot/projects/ia64/sys/dev/uart/uart_dev_z8530.c#4 integrate .. //depot/projects/ia64/sys/dev/usb/usbdevs#48 integrate .. //depot/projects/ia64/sys/dev/usb/usbdevs.h#46 integrate .. //depot/projects/ia64/sys/dev/usb/usbdevs_data.h#46 integrate .. //depot/projects/ia64/sys/dev/wi/if_wi_pccard.c#32 integrate .. //depot/projects/ia64/sys/geom/geom_disk.c#38 integrate .. //depot/projects/ia64/sys/i386/acpica/acpi_wakeup.c#21 integrate .. //depot/projects/ia64/sys/i386/i386/elf_machdep.c#12 integrate .. //depot/projects/ia64/sys/i386/i386/pmap.c#65 integrate .. //depot/projects/ia64/sys/i386/ibcs2/ibcs2_sysvec.c#5 integrate .. //depot/projects/ia64/sys/i386/include/bus_at386.h#7 integrate .. //depot/projects/ia64/sys/i386/include/bus_pc98.h#6 integrate .. //depot/projects/ia64/sys/i386/include/clock.h#7 integrate .. //depot/projects/ia64/sys/i386/include/elf.h#6 integrate .. //depot/projects/ia64/sys/i386/include/endian.h#9 integrate .. //depot/projects/ia64/sys/i386/include/pmap.h#14 integrate .. //depot/projects/ia64/sys/i386/isa/clock.c#23 integrate .. //depot/projects/ia64/sys/i386/linux/linux_sysvec.c#27 integrate .. //depot/projects/ia64/sys/ia64/ia32/ia32_sysvec.c#8 integrate .. //depot/projects/ia64/sys/ia64/ia64/elf_machdep.c#13 integrate .. //depot/projects/ia64/sys/ia64/include/bus.h#15 integrate .. //depot/projects/ia64/sys/ia64/include/elf.h#9 integrate .. //depot/projects/ia64/sys/kern/imgact_aout.c#17 integrate .. //depot/projects/ia64/sys/kern/imgact_elf.c#33 integrate .. //depot/projects/ia64/sys/kern/init_main.c#37 integrate .. //depot/projects/ia64/sys/kern/kern_exec.c#53 integrate .. //depot/projects/ia64/sys/kern/kern_linker.c#28 integrate .. //depot/projects/ia64/sys/kern/vfs_bio.c#61 integrate .. //depot/projects/ia64/sys/modules/bridge/Makefile#3 integrate .. //depot/projects/ia64/sys/modules/ipfilter/Makefile#3 integrate .. //depot/projects/ia64/sys/net/bridge.c#22 integrate .. //depot/projects/ia64/sys/net/pfil.c#5 integrate .. //depot/projects/ia64/sys/net/pfil.h#4 integrate .. //depot/projects/ia64/sys/net/radix.c#10 integrate .. //depot/projects/ia64/sys/netinet/if_ether.c#19 integrate .. //depot/projects/ia64/sys/netinet/ip_input.c#34 integrate .. //depot/projects/ia64/sys/netinet/ip_output.c#32 integrate .. //depot/projects/ia64/sys/netinet/ip_var.h#15 integrate .. //depot/projects/ia64/sys/netinet6/ip6_forward.c#6 integrate .. //depot/projects/ia64/sys/netinet6/ip6_input.c#17 integrate .. //depot/projects/ia64/sys/netinet6/ip6_output.c#14 integrate .. //depot/projects/ia64/sys/netinet6/ip6_var.h#6 integrate .. //depot/projects/ia64/sys/netinet6/ip6protosw.h#4 integrate .. //depot/projects/ia64/sys/pc98/i386/busiosubr.c#3 integrate .. //depot/projects/ia64/sys/powerpc/include/elf.h#5 integrate .. //depot/projects/ia64/sys/powerpc/include/param.h#9 integrate .. //depot/projects/ia64/sys/powerpc/powermac/ata_macio.c#6 integrate .. //depot/projects/ia64/sys/powerpc/powerpc/elf_machdep.c#9 integrate .. //depot/projects/ia64/sys/powerpc/powerpc/pmap.c#30 integrate .. //depot/projects/ia64/sys/powerpc/psim/ata_iobus.c#5 integrate .. //depot/projects/ia64/sys/sparc64/include/bus.h#21 integrate .. //depot/projects/ia64/sys/sparc64/include/elf.h#7 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/elf_machdep.c#16 integrate .. //depot/projects/ia64/sys/sys/kobj.h#3 integrate .. //depot/projects/ia64/sys/sys/param.h#43 integrate .. //depot/projects/ia64/sys/sys/protosw.h#6 integrate .. //depot/projects/ia64/sys/sys/sysent.h#11 integrate .. //depot/projects/ia64/sys/vm/vm_map.c#64 integrate .. //depot/projects/ia64/sys/vm/vm_mmap.c#24 integrate .. //depot/projects/ia64/sys/vm/vm_page.c#54 integrate .. //depot/projects/ia64/usr.bin/Makefile#55 integrate .. //depot/projects/ia64/usr.bin/fstat/msdosfs.c#5 integrate .. //depot/projects/ia64/usr.sbin/newsyslog/extern.h#2 integrate .. //depot/projects/ia64/usr.sbin/newsyslog/newsyslog.c#24 integrate .. //depot/projects/ia64/usr.sbin/newsyslog/ptimes.c#3 integrate .. //depot/projects/ia64/usr.sbin/ppp/command.c#16 integrate .. //depot/projects/ia64/usr.sbin/ppp/nat_cmd.c#5 integrate .. //depot/projects/ia64/usr.sbin/ppp/nat_cmd.h#3 integrate .. //depot/projects/ia64/usr.sbin/ppp/ppp.8.m4#18 integrate .. //depot/projects/ia64/usr.sbin/sysinstall/menus.c#34 integrate Differences ... ==== //depot/projects/ia64/UPDATING#52 (text+ko) ==== @@ -17,6 +17,12 @@ developers choose to disable these features on build machines to maximize performance. +20030923: + Fix a bug in arplookup(), whereby a hostile party on a locally + attached network could exhaust kernel memory, and cause a system + panic, by sending a flood of spoofed ARP requests. See + FreeBSD-SA-03:14.arp. + 20030915: A change to /etc/defaults/rc.conf now causes inetd to be started with `-C 60' if it is not overridden in /etc/rc.conf. This @@ -1362,4 +1368,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.266 2003/09/15 17:20:05 nectar Exp $ +$FreeBSD: src/UPDATING,v 1.267 2003/09/23 16:39:30 bms Exp $ ==== //depot/projects/ia64/crypto/openssh/auth-chall.c#6 (text+ko) ==== @@ -24,7 +24,7 @@ #include "includes.h" RCSID("$OpenBSD: auth-chall.c,v 1.8 2001/05/18 14:13:28 markus Exp $"); -RCSID("$FreeBSD: src/crypto/openssh/auth-chall.c,v 1.6 2003/03/31 13:45:36 des Exp $"); +RCSID("$FreeBSD: src/crypto/openssh/auth-chall.c,v 1.7 2003/09/24 18:24:27 des Exp $"); #include "auth.h" #include "log.h" @@ -93,7 +93,7 @@ xfree(info); } /* if we received more prompts, we're screwed */ - res = (numprompts != 0); + res = (res == 0 && numprompts == 0) ? 0 : -1; } device->free_ctx(authctxt->kbdintctxt); authctxt->kbdintctxt = NULL; ==== //depot/projects/ia64/crypto/openssh/auth2-pam-freebsd.c#11 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include "includes.h" -RCSID("$FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $"); +RCSID("$FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.13 2003/09/24 19:11:52 des Exp $"); #ifdef USE_PAM #include @@ -134,8 +134,8 @@ *resp = xmalloc(n * sizeof **resp); buffer_init(&buffer); for (i = 0; i < n; ++i) { - resp[i]->resp_retcode = 0; - resp[i]->resp = NULL; + (*resp)[i].resp_retcode = 0; + (*resp)[i].resp = NULL; switch (msg[i]->msg_style) { case PAM_PROMPT_ECHO_OFF: buffer_put_cstring(&buffer, msg[i]->msg); @@ -143,7 +143,7 @@ ssh_msg_recv(ctxt->pam_csock, &buffer); if (buffer_get_char(&buffer) != PAM_AUTHTOK) goto fail; - resp[i]->resp = buffer_get_string(&buffer, NULL); + (*resp)[i].resp = buffer_get_string(&buffer, NULL); break; case PAM_PROMPT_ECHO_ON: buffer_put_cstring(&buffer, msg[i]->msg); @@ -151,7 +151,7 @@ ssh_msg_recv(ctxt->pam_csock, &buffer); if (buffer_get_char(&buffer) != PAM_AUTHTOK) goto fail; - resp[i]->resp = buffer_get_string(&buffer, NULL); + (*resp)[i].resp = buffer_get_string(&buffer, NULL); break; case PAM_ERROR_MSG: buffer_put_cstring(&buffer, msg[i]->msg); @@ -169,8 +169,6 @@ buffer_free(&buffer); return (PAM_SUCCESS); fail: - while (i) - xfree(resp[--i]); xfree(*resp); *resp = NULL; buffer_free(&buffer); @@ -550,20 +548,20 @@ for (i = 0; i < n; ++i) { switch (msg[i]->msg_style) { case PAM_PROMPT_ECHO_OFF: - resp[i]->resp = + (*resp)[i].resp = read_passphrase(msg[i]->msg, RP_ALLOW_STDIN); - resp[i]->resp_retcode = PAM_SUCCESS; + (*resp)[i].resp_retcode = PAM_SUCCESS; break; case PAM_PROMPT_ECHO_ON: fputs(msg[i]->msg, stderr); fgets(input, sizeof input, stdin); - resp[i]->resp = xstrdup(input); - resp[i]->resp_retcode = PAM_SUCCESS; + (*resp)[i].resp = xstrdup(input); + (*resp)[i].resp_retcode = PAM_SUCCESS; break; case PAM_ERROR_MSG: case PAM_TEXT_INFO: fputs(msg[i]->msg, stderr); - resp[i]->resp_retcode = PAM_SUCCESS; + (*resp)[i].resp_retcode = PAM_SUCCESS; break; default: goto fail; @@ -571,8 +569,6 @@ } return (PAM_SUCCESS); fail: - while (i) - xfree(resp[--i]); xfree(*resp); *resp = NULL; return (PAM_CONV_ERR); ==== //depot/projects/ia64/crypto/openssh/ssh_config#12 (text+ko) ==== @@ -1,5 +1,5 @@ # $OpenBSD: ssh_config,v 1.16 2002/07/03 14:21:05 markus Exp $ -# $FreeBSD: src/crypto/openssh/ssh_config,v 1.21 2003/04/23 17:10:53 des Exp $ +# $FreeBSD: src/crypto/openssh/ssh_config,v 1.22 2003/09/24 19:20:23 des Exp $ # This is the ssh client system-wide configuration file. See # ssh_config(5) for more information. This file provides defaults for @@ -35,4 +35,4 @@ # Cipher 3des # Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc # EscapeChar ~ -# VersionAddendum FreeBSD-20030423 +# VersionAddendum FreeBSD-20030924 ==== //depot/projects/ia64/crypto/openssh/ssh_config.5#8 (text+ko) ==== @@ -35,7 +35,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $OpenBSD: ssh_config.5,v 1.7 2003/03/28 10:11:43 jmc Exp $ -.\" $FreeBSD: src/crypto/openssh/ssh_config.5,v 1.9 2003/04/23 17:10:53 des Exp $ +.\" $FreeBSD: src/crypto/openssh/ssh_config.5,v 1.10 2003/09/24 19:20:23 des Exp $ .Dd September 25, 1999 .Dt SSH_CONFIG 5 .Os @@ -623,7 +623,7 @@ Specifies a string to append to the regular version string to identify OS- or site-specific modifications. The default is -.Dq FreeBSD-20030423 . +.Dq FreeBSD-20030924 . .It Cm XAuthLocation Specifies the full pathname of the .Xr xauth 1 ==== //depot/projects/ia64/crypto/openssh/sshd_config#13 (text+ko) ==== @@ -1,5 +1,5 @@ # $OpenBSD: sshd_config,v 1.59 2002/09/25 11:17:16 markus Exp $ -# $FreeBSD: src/crypto/openssh/sshd_config,v 1.32 2003/04/23 17:10:53 des Exp $ +# $FreeBSD: src/crypto/openssh/sshd_config,v 1.33 2003/09/24 19:20:23 des Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. @@ -14,7 +14,7 @@ # Note that some of FreeBSD's defaults differ from OpenBSD's, and # FreeBSD has a few additional options. -#VersionAddendum FreeBSD-20030423 +#VersionAddendum FreeBSD-20030924 #Port 22 #Protocol 2,1 ==== //depot/projects/ia64/crypto/openssh/sshd_config.5#8 (text+ko) ==== @@ -35,7 +35,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $OpenBSD: sshd_config.5,v 1.15 2003/03/28 10:11:43 jmc Exp $ -.\" $FreeBSD: src/crypto/openssh/sshd_config.5,v 1.11 2003/04/23 17:10:53 des Exp $ +.\" $FreeBSD: src/crypto/openssh/sshd_config.5,v 1.12 2003/09/24 19:20:23 des Exp $ .Dd September 25, 1999 .Dt SSHD_CONFIG 5 .Os @@ -650,7 +650,7 @@ Specifies a string to append to the regular version string to identify OS- or site-specific modifications. The default is -.Dq FreeBSD-20030423 . +.Dq FreeBSD-20030924 . .It Cm X11DisplayOffset Specifies the first display number available for .Nm sshd Ns 's ==== //depot/projects/ia64/crypto/openssh/version.h#13 (text+ko) ==== @@ -1,11 +1,11 @@ /* $OpenBSD: version.h,v 1.37 2003/04/01 10:56:46 markus Exp $ */ -/* $FreeBSD: src/crypto/openssh/version.h,v 1.22 2003/09/17 14:36:14 nectar Exp $ */ +/* $FreeBSD: src/crypto/openssh/version.h,v 1.23 2003/09/24 19:20:23 des Exp $ */ #ifndef SSH_VERSION #define SSH_VERSION (ssh_version_get()) #define SSH_VERSION_BASE "OpenSSH_3.6.1p1" -#define SSH_VERSION_ADDENDUM "FreeBSD-20030917" +#define SSH_VERSION_ADDENDUM "FreeBSD-20030924" const char *ssh_version_get(void); void ssh_version_set_addendum(const char *add); ==== //depot/projects/ia64/etc/sendmail/Makefile#14 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.19 (Berkeley) 1/14/97 -# $FreeBSD: src/etc/sendmail/Makefile,v 1.28 2003/09/01 03:40:33 gshapiro Exp $ +# $FreeBSD: src/etc/sendmail/Makefile,v 1.29 2003/09/24 04:19:26 gshapiro Exp $ M4= m4 CHMOD= chmod @@ -8,17 +8,17 @@ SENDMAIL_DIR= ${.CURDIR}/../../contrib/sendmail SMDIR= ${SENDMAIL_DIR}/src -CFDIR= ${SENDMAIL_DIR}/cf +SENDMAIL_CF_DIR?=${SENDMAIL_DIR}/cf # this is overkill, but.... -M4FILES!= find ${CFDIR} -type f -name '*.m4' -print +M4FILES!= find ${SENDMAIL_CF_DIR} -type f -name '*.m4' -print .SUFFIXES: .mc .cf .mc.cf: ${M4FILES} ${RM} ${.TARGET} - ${M4} -D_CF_DIR_=${CFDIR}/ ${SENDMAIL_M4_FLAGS} \ - ${CFDIR}/m4/cf.m4 ${.IMPSRC} > ${.TARGET} + ${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_M4_FLAGS} \ + ${SENDMAIL_CF_DIR}/m4/cf.m4 ${.IMPSRC} > ${.TARGET} ${CHMOD} ${ROMODE} ${.TARGET} DEST_CF= ${DESTDIR}/etc/mail/sendmail.cf @@ -61,10 +61,10 @@ all: ${ALL} # Build the installed submit.cf from the sendmail distributed submit.mc. -freebsd.submit.cf: ${CFDIR}/cf/submit.mc +freebsd.submit.cf: ${SENDMAIL_CF_DIR}/cf/submit.mc ${RM} ${.TARGET} - ${M4} -D_CF_DIR_=${CFDIR}/ ${SENDMAIL_M4_FLAGS} \ - ${CFDIR}/m4/cf.m4 ${.ALLSRC} > ${.TARGET} + ${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_M4_FLAGS} \ + ${SENDMAIL_CF_DIR}/m4/cf.m4 ${.ALLSRC} > ${.TARGET} ${CHMOD} ${ROMODE} ${.TARGET} install distribution: @@ -76,7 +76,8 @@ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${.CURDIR}/freebsd.mc freebsd.cf ${DESTDIR}/etc/mail ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ - ${CFDIR}/cf/submit.mc ${DESTDIR}/etc/mail/freebsd.submit.mc + ${SENDMAIL_CF_DIR}/cf/submit.mc \ + ${DESTDIR}/etc/mail/freebsd.submit.mc ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ freebsd.submit.cf ${DESTDIR}/etc/mail ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ==== //depot/projects/ia64/lib/libalias/Makefile#5 (text+ko) ==== @@ -1,11 +1,11 @@ -# $FreeBSD: src/lib/libalias/Makefile,v 1.22 2003/08/18 15:25:38 obrien Exp $ +# $FreeBSD: src/lib/libalias/Makefile,v 1.23 2003/09/23 07:41:53 marcus Exp $ LIB= alias SHLIBDIR?= /lib SHLIB_MAJOR= 4 MAN= libalias.3 SRCS= alias.c alias_cuseeme.c alias_db.c alias_ftp.c alias_irc.c \ - alias_nbt.c alias_pptp.c alias_proxy.c alias_smedia.c \ + alias_nbt.c alias_pptp.c alias_proxy.c alias_skinny.c alias_smedia.c \ alias_util.c INCS= alias.h ==== //depot/projects/ia64/lib/libalias/alias.c#7 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libalias/alias.c,v 1.37 2003/06/13 21:54:01 ru Exp $"); +__FBSDID("$FreeBSD: src/lib/libalias/alias.c,v 1.38 2003/09/23 07:41:53 marcus Exp $"); /* Alias.c provides supervisory control for the functions of the @@ -917,6 +917,9 @@ if (ntohs(tc->th_dport) == PPTP_CONTROL_PORT_NUMBER || ntohs(tc->th_sport) == PPTP_CONTROL_PORT_NUMBER) AliasHandlePptpIn(pip, link); + else if (skinnyPort != 0 && (ntohs(tc->th_dport) == skinnyPort + || ntohs(tc->th_sport) == skinnyPort)) + AliasHandleSkinny(pip, link); alias_address = GetAliasAddress(link); original_address = GetOriginalAddress(link); @@ -1098,6 +1101,9 @@ else if (ntohs(tc->th_dport) == PPTP_CONTROL_PORT_NUMBER || ntohs(tc->th_sport) == PPTP_CONTROL_PORT_NUMBER) AliasHandlePptpOut(pip, link); + else if (skinnyPort != 0 && (ntohs(tc->th_sport) == skinnyPort + || ntohs(tc->th_dport) == skinnyPort)) + AliasHandleSkinny(pip, link); /* Adjust TCP checksum since source port is being aliased */ /* and source address is being altered */ ==== //depot/projects/ia64/lib/libalias/alias.h#5 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libalias/alias.h,v 1.24 2003/06/01 23:15:00 ru Exp $ + * $FreeBSD: src/lib/libalias/alias.h,v 1.25 2003/09/23 07:41:53 marcus Exp $ */ /*- @@ -45,6 +45,7 @@ void PacketAliasInit(void); void PacketAliasSetAddress(struct in_addr _addr); void PacketAliasSetFWBase(unsigned int _base, unsigned int _num); +void PacketAliasSetSkinnyPort(unsigned int _port); unsigned int PacketAliasSetMode(unsigned int _flags, unsigned int _mask); void PacketAliasUninit(void); ==== //depot/projects/ia64/lib/libalias/alias_db.c#8 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libalias/alias_db.c,v 1.54 2003/09/09 23:50:57 ru Exp $"); +__FBSDID("$FreeBSD: src/lib/libalias/alias_db.c,v 1.55 2003/09/23 07:41:53 marcus Exp $"); /* Alias_db.c encapsulates all data structures used for storing @@ -398,6 +398,9 @@ /* flag. */ #endif +unsigned int skinnyPort = 0; /* TCP port used by the Skinny */ + /* protocol. */ + @@ -2948,3 +2951,8 @@ fireWallNumNums = num; #endif } + +void +PacketAliasSetSkinnyPort(unsigned int port) { + skinnyPort = port; +} ==== //depot/projects/ia64/lib/libalias/alias_local.h#4 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libalias/alias_local.h,v 1.23 2002/07/01 11:19:40 brian Exp $ + * $FreeBSD: src/lib/libalias/alias_local.h,v 1.24 2003/09/23 07:41:53 marcus Exp $ */ /* @@ -74,6 +74,7 @@ /* Globals */ extern int packetAliasMode; +extern unsigned int skinnyPort; /* Prototypes */ @@ -212,6 +213,9 @@ void AliasHandleCUSeeMeOut(struct ip *_pip, struct alias_link *_link); void AliasHandleCUSeeMeIn(struct ip *_pip, struct in_addr _original_addr); +/* Skinny routines */ +void AliasHandleSkinny(struct ip *_pip, struct alias_link *_link); + /* Transparent proxy routines */ int ProxyCheck(struct ip *_pip, struct in_addr *_proxy_server_addr, u_short *_proxy_server_port); ==== //depot/projects/ia64/lib/libalias/libalias.3#7 (text+ko) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libalias/libalias.3,v 1.48 2003/09/08 19:57:13 ru Exp $ +.\" $FreeBSD: src/lib/libalias/libalias.3,v 1.49 2003/09/23 07:41:53 marcus Exp $ .\" .Dd April 13, 2000 .Dt LIBALIAS 3 @@ -265,6 +265,16 @@ flag). The range will be cleared for all rules on initialization. .Ed +.Pp +.Ft void +.Fn PacketAliasSkinnyPort "unsigned int port" +.Bd -ragged -offset indent +Set the TCP port used by the Skinny Station protocol. +Skinny is used by Cisco IP phones to communicate with +Cisco Call Managers to set up voice over IP calls. +If this is not set, Skinny aliasing will not be done. +The typical port used by Skinny is 2000. +.Ed .Sh PACKET HANDLING The packet handling functions are used to modify incoming (remote to local) and outgoing (local to remote) packets. ==== //depot/projects/ia64/lib/libpthread/arch/i386/i386/thr_getcontext.S#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libpthread/arch/i386/i386/thr_getcontext.S,v 1.4 2003/08/05 22:45:59 deischen Exp $"); +__FBSDID("$FreeBSD: src/lib/libpthread/arch/i386/i386/thr_getcontext.S,v 1.5 2003/09/22 14:34:02 davidxu Exp $"); /* * Where do we define these? @@ -88,9 +88,9 @@ cmpl $MC_OWNEDFP_PCB, MC_OWNEDFP_OFFSET(%edx) jne 5f 3: cmpl $MC_FPFMT_387, MC_FPFMT_OFFSET(%edx) - jne 5f + jne 4f frstor MC_FPREGS_OFFSET(%edx) /* restore 387 FP regs */ - jmp 5f + jmp 6f 4: cmpl $MC_FPFMT_XMM, MC_FPFMT_OFFSET(%edx) jne 5f fxrstor MC_FPREGS_OFFSET(%edx) /* restore XMM FP regs */ ==== //depot/projects/ia64/lib/libpthread/thread/thr_info.c#5 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_info.c,v 1.26 2003/07/07 12:12:33 davidxu Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_info.c,v 1.27 2003/09/22 00:40:23 davidxu Exp $ */ #include #include @@ -185,7 +185,7 @@ __sys_write(fd, s, strlen(s)); for (i = _SIG_WORDS - 1; i >= 0; i--) { snprintf(s, sizeof(s), "%08x ", - ~pthread->sigmask.__bits[i]); + pthread->data.sigwait->waitset->__bits[i]); __sys_write(fd, s, strlen(s)); } snprintf(s, sizeof(s), "(lo)\n"); ==== //depot/projects/ia64/lib/libpthread/thread/thr_kern.c#37 (text+ko) ==== @@ -33,7 +33,7 @@ * */ #include -__FBSDID("$FreeBSD: src/lib/libpthread/thread/thr_kern.c,v 1.96 2003/09/19 23:28:13 marcel Exp $"); +__FBSDID("$FreeBSD: src/lib/libpthread/thread/thr_kern.c,v 1.97 2003/09/23 04:02:23 davidxu Exp $"); #include #include @@ -2352,6 +2352,10 @@ kse_critical_t crit; DBG_MSG("Freeing thread %p\n", thread); + if (thread->name) { + free(thread->name); + thread->name = NULL; + } if ((curthread == NULL) || (free_thread_count >= MAX_CACHED_THREADS)) { thr_destroy(thread); } else { ==== //depot/projects/ia64/lib/libpthread/thread/thr_mutex.c#11 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_mutex.c,v 1.41 2003/09/04 14:06:42 davidxu Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_mutex.c,v 1.42 2003/09/24 12:52:57 davidxu Exp $ */ #include #include @@ -346,6 +346,7 @@ (*mutex)->m_prio = curthread->active_priority; (*mutex)->m_saved_prio = curthread->inherited_priority; + curthread->inherited_priority = (*mutex)->m_prio; THR_SCHED_UNLOCK(curthread, curthread); /* Add to the list of owned mutexes: */ @@ -540,10 +541,10 @@ /* Schedule the next thread: */ _thr_sched_switch(curthread); + curthread->data.mutex = NULL; if (THR_IN_MUTEXQ(curthread)) { THR_LOCK_ACQUIRE(curthread, &(*m)->m_lock); mutex_queue_remove(*m, curthread); - curthread->data.mutex = NULL; THR_LOCK_RELEASE(curthread, &(*m)->m_lock); } } @@ -619,10 +620,10 @@ /* Schedule the next thread: */ _thr_sched_switch(curthread); + curthread->data.mutex = NULL; if (THR_IN_MUTEXQ(curthread)) { THR_LOCK_ACQUIRE(curthread, &(*m)->m_lock); mutex_queue_remove(*m, curthread); - curthread->data.mutex = NULL; THR_LOCK_RELEASE(curthread, &(*m)->m_lock); } } @@ -708,10 +709,10 @@ /* Schedule the next thread: */ _thr_sched_switch(curthread); + curthread->data.mutex = NULL; if (THR_IN_MUTEXQ(curthread)) { THR_LOCK_ACQUIRE(curthread, &(*m)->m_lock); mutex_queue_remove(*m, curthread); - curthread->data.mutex = NULL; THR_LOCK_RELEASE(curthread, &(*m)->m_lock); } @@ -1590,9 +1591,6 @@ TAILQ_REMOVE(&mutex->m_queue, pthread, sqe); pthread->sflags &= ~THR_FLAGS_IN_SYNCQ; - /* This thread is no longer waiting for this mutex. */ - pthread->data.mutex = NULL; - /* * Only exit the loop if the thread hasn't been * cancelled. ==== //depot/projects/ia64/lib/libpthread/thread/thr_private.h#25 (text+ko) ==== @@ -31,7 +31,7 @@ * * Private thread definitions for the uthread kernel. * - * $FreeBSD: src/lib/libpthread/thread/thr_private.h,v 1.102 2003/09/14 22:52:16 davidxu Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_private.h,v 1.103 2003/09/22 14:40:36 davidxu Exp $ */ #ifndef _THR_PRIVATE_H @@ -580,6 +580,7 @@ int psf_valid; int psf_flags; int psf_interrupted; + int psf_timeout; int psf_signo; enum pthread_state psf_state; union pthread_wait_data psf_wait_data; ==== //depot/projects/ia64/lib/libpthread/thread/thr_sig.c#25 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_sig.c,v 1.72 2003/09/15 00:08:48 davidxu Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_sig.c,v 1.73 2003/09/22 14:40:36 davidxu Exp $ */ #include #include @@ -349,7 +349,7 @@ intr_save = curthread->interrupted; _kse_critical_enter(); /* Get a fresh copy of signal mask */ - curthread->sigmask = ucp->uc_sigmask; + __sys_sigprocmask(SIG_BLOCK, NULL, &curthread->sigmask); KSE_LOCK_ACQUIRE(curkse, &_thread_signal_lock); sigfunc = _thread_sigact[sig - 1].sa_sigaction; sa_flags = _thread_sigact[sig - 1].sa_flags & SA_SIGINFO; @@ -1072,6 +1072,7 @@ PANIC("invalid pthread_sigframe\n"); thread->flags = psf->psf_flags; thread->interrupted = psf->psf_interrupted; + thread->timeout = psf->psf_timeout; thread->state = psf->psf_state; thread->data = psf->psf_wait_data; thread->wakeup_time = psf->psf_wakeup_time; @@ -1084,6 +1085,7 @@ psf->psf_flags = thread->flags & (THR_FLAGS_PRIVATE | THR_FLAGS_IN_TDLIST); psf->psf_interrupted = thread->interrupted; + psf->psf_timeout = thread->timeout; psf->psf_state = thread->state; psf->psf_wait_data = thread->data; psf->psf_wakeup_time = thread->wakeup_time; ==== //depot/projects/ia64/release/scripts/print-cdrom-packages.sh#28 (text+ko) ==== @@ -2,7 +2,7 @@ # # Author: Jordan Hubbard # Date: Mon Jul 10 01:18:20 2000 -# Version: $FreeBSD: src/release/scripts/print-cdrom-packages.sh,v 1.46 2003/08/19 05:48:08 murray Exp $ +# Version: $FreeBSD: src/release/scripts/print-cdrom-packages.sh,v 1.47 2003/09/21 19:05:40 marcus Exp $ # # MAINTAINER: re # @@ -92,7 +92,7 @@ CDROM_SET_1="${CDROM_SET_1} x11-wm/afterstep" CDROM_SET_1="${CDROM_SET_1} x11-wm/enlightenment" CDROM_SET_1="${CDROM_SET_1} x11-wm/fvwm2" -CDROM_SET_1="${CDROM_SET_1} x11-wm/sawfish" +CDROM_SET_1="${CDROM_SET_1} x11-wm/sawfish2" CDROM_SET_1="${CDROM_SET_1} x11-wm/windowmaker" CDROM_SET_1="${CDROM_SET_1} x11/XFree86-4" CDROM_SET_1="${CDROM_SET_1} x11/XFree86-4-clients" @@ -114,7 +114,7 @@ CDROM_SET_1="${CDROM_SET_1} graphics/gimp1" CDROM_SET_1="${CDROM_SET_1} graphics/xpdf" CDROM_SET_1="${CDROM_SET_1} graphics/xv" -CDROM_SET_1="${CDROM_SET_1} irc/xchat" +CDROM_SET_1="${CDROM_SET_1} irc/xchat2" CDROM_SET_1="${CDROM_SET_1} mail/exim" CDROM_SET_1="${CDROM_SET_1} mail/fetchmail" CDROM_SET_1="${CDROM_SET_1} mail/mutt" ==== //depot/projects/ia64/sbin/dump/optr.c#12 (text+ko) ==== @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)optr.c 8.2 (Berkeley) 1/6/94"; #endif static const char rcsid[] = - "$FreeBSD: src/sbin/dump/optr.c,v 1.26 2003/09/20 23:35:37 ps Exp $"; + "$FreeBSD: src/sbin/dump/optr.c,v 1.27 2003/09/21 22:14:49 ps Exp $"; #endif /* not lint */ #include @@ -227,17 +227,20 @@ msg(const char *fmt, ...) { va_list ap; + va_list ap2; (void) fprintf(stderr," DUMP: "); #ifdef TDEBUG (void) fprintf(stderr, "pid=%d ", getpid()); #endif va_start(ap, fmt); - (void) vsnprintf(lastmsg, sizeof(lastmsg), fmt, ap); - (void) fprintf(stderr, lastmsg); + va_copy(ap2, ap); + (void) vfprintf(stderr, fmt, ap); (void) fflush(stdout); (void) fflush(stderr); + (void) vsnprintf(lastmsg, sizeof(lastmsg), fmt, ap2); va_end(ap); + va_end(ap2); } void ==== //depot/projects/ia64/sbin/mdconfig/mdconfig.8#8 (text+ko) ==== @@ -39,7 +39,7 @@ .\" @(#)vnconfig.8 8.1 (Berkeley) 6/5/93 .\" from: src/usr.sbin/vnconfig/vnconfig.8,v 1.19 2000/12/27 15:30:29 .\" -.\" $FreeBSD: src/sbin/mdconfig/mdconfig.8,v 1.20 2003/06/11 06:38:24 rwatson Exp $ +.\" $FreeBSD: src/sbin/mdconfig/mdconfig.8,v 1.21 2003/09/21 19:05:35 phk Exp $ .\" .Dd December 31, 2000 .Dt MDCONFIG 8 @@ -60,6 +60,8 @@ .Op Fl f Ar file .Op Fl S Ar sectorsize .Op Fl u Ar unit +.Op Fl x Ar sectors/track +.Op Fl y Ar heads/cyl .Nm .Fl d .Fl u Ar unit @@ -119,6 +121,18 @@ denotes kilobyte, megabyte and gigabyte respectively. .It Fl S Ar sectorsize Sectorsize to use for malloc backed device. +.It Fl x Ar sectors/track +See description of +.Fl y +below. +.It Fl y Ar heads/cylinder +For malloc backed devices, the +.Fl x +and +.Fl y +options can be used to specify a synthetic geometry. +This is useful for constructing bootable images for later download to +other devices. .It Fl o Oo Cm no Oc Ns Ar option Set or reset options. .Bl -tag -width indent ==== //depot/projects/ia64/sbin/natd/natd.8#10 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" $FreeBSD: src/sbin/natd/natd.8,v 1.60 2003/08/13 15:13:33 ru Exp $ +.\" $FreeBSD: src/sbin/natd/natd.8,v 1.61 2003/09/23 07:41:55 marcus Exp $ .Dd February 28, 2003 .Dt NATD 8 .Os @@ -31,6 +31,7 @@ .Op Fl log_denied .Op Fl log_facility Ar facility_name .Op Fl punch_fw Ar firewall_range +.Op Fl skinny_port Ar port .Op Fl log_ipfw_denied .Op Fl pid_file | P Ar pidfile .Ek @@ -483,6 +484,13 @@ .Ar basenumber will be used for punching firewall holes. The range will be cleared for all rules on startup. +.It Fl skinny_port Ar port +This option allows you to specify the TCP port used for +the Skinny Station protocol. +Skinny is used by Cisco IP phones to communicate with +Cisco Call Managers to set up voice over IP calls. +By default, Skinny aliasing is not performed. +The typical port value for Skinny is 2000. .It Fl log_ipfw_denied Log when a packet cannot be re-injected because an .Xr ipfw 8 ==== //depot/projects/ia64/sbin/natd/natd.c#8 (text+ko) ==== @@ -11,7 +11,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/natd/natd.c,v 1.43 2003/08/13 13:16:19 ru Exp $"); +__FBSDID("$FreeBSD: src/sbin/natd/natd.c,v 1.44 2003/09/23 07:41:55 marcus Exp $"); #define SYSLOG_NAMES @@ -99,6 +99,7 @@ static int StrToAddrAndPortRange (const char* str, struct in_addr* addr, char* proto, port_range *portRange); static void ParseArgs (int argc, char** argv); static void SetupPunchFW(const char *strValue); +static void SetupSkinnyPort(const char *strValue); /* * Globals. @@ -838,6 +839,7 @@ LogDenied, LogFacility, PunchFW, + SkinnyPort, LogIpfwDenied, PidFile }; @@ -1059,6 +1061,14 @@ "punch_fw", NULL }, + { SkinnyPort, + 0, + String, + "port", + "set the TCP port for use with the Skinny Station protocol", + "skinny_port", + NULL }, + { LogIpfwDenied, 0, YesNo, @@ -1258,6 +1268,10 @@ SetupPunchFW(strValue); break; + case SkinnyPort: + SetupSkinnyPort(strValue); + break; + case LogIpfwDenied: logIpfwDenied = yesNoValue;; break; @@ -1705,3 +1719,14 @@ PacketAliasSetFWBase(base, num); (void)PacketAliasSetMode(PKT_ALIAS_PUNCH_FW, PKT_ALIAS_PUNCH_FW); } + +static void +SetupSkinnyPort(const char *strValue) +{ + unsigned int port; + + if (sscanf(strValue, "%u", &port) != 1) + errx(1, "skinny_port: port parameter required"); + >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Sep 24 21:12:18 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C7E7216A4C0; Wed, 24 Sep 2003 21:12:17 -0700 (PDT) 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 A1D8516A4B3 for ; Wed, 24 Sep 2003 21:12:17 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CE9C43F3F for ; Wed, 24 Sep 2003 21:12:16 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8P4CGXJ053125 for ; Wed, 24 Sep 2003 21:12:16 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8P4CFIu053122 for perforce@freebsd.org; Wed, 24 Sep 2003 21:12:15 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Wed, 24 Sep 2003 21:12:15 -0700 (PDT) Message-Id: <200309250412.h8P4CFIu053122@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 38556 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2003 04:12:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=38556 Change 38556 by marcel@marcel_nfs on 2003/09/24 21:12:09 IFC @38553 Affected files ... .. //depot/projects/uart/alpha/alpha/elf_machdep.c#3 integrate .. //depot/projects/uart/alpha/include/bus.h#4 integrate .. //depot/projects/uart/alpha/include/elf.h#2 integrate .. //depot/projects/uart/alpha/linux/linux_sysvec.c#3 integrate .. //depot/projects/uart/alpha/osf1/osf1_sysvec.c#3 integrate .. //depot/projects/uart/amd64/acpica/acpi_machdep.c#4 integrate .. //depot/projects/uart/amd64/amd64/busdma_machdep.c#5 integrate .. //depot/projects/uart/amd64/amd64/elf_machdep.c#4 integrate .. //depot/projects/uart/amd64/amd64/exception.S#3 integrate .. //depot/projects/uart/amd64/amd64/machdep.c#6 integrate .. //depot/projects/uart/amd64/amd64/trap.c#3 integrate .. //depot/projects/uart/amd64/amd64/tsc.c#3 integrate .. //depot/projects/uart/amd64/ia32/ia32_syscall.c#4 integrate .. //depot/projects/uart/amd64/include/acpica_machdep.h#2 integrate .. //depot/projects/uart/amd64/include/bus_amd64.h#2 integrate .. //depot/projects/uart/amd64/include/clock.h#2 integrate .. //depot/projects/uart/amd64/include/cpu.h#3 integrate .. //depot/projects/uart/amd64/include/elf.h#2 integrate .. //depot/projects/uart/amd64/include/endian.h#2 integrate .. //depot/projects/uart/amd64/include/legacyvar.h#2 integrate .. //depot/projects/uart/amd64/include/md_var.h#3 integrate .. //depot/projects/uart/amd64/include/pci_cfgreg.h#2 integrate .. //depot/projects/uart/amd64/include/segments.h#2 integrate .. //depot/projects/uart/amd64/include/specialreg.h#2 integrate .. //depot/projects/uart/amd64/include/vmparam.h#3 integrate .. //depot/projects/uart/amd64/isa/clock.c#3 integrate .. //depot/projects/uart/amd64/pci/pci_bus.c#5 integrate .. //depot/projects/uart/arm/include/elf.h#2 integrate .. //depot/projects/uart/cam/cam_periph.c#3 integrate .. //depot/projects/uart/cam/scsi/scsi_all.c#2 integrate .. //depot/projects/uart/compat/ia32/ia32_sysvec.c#2 integrate .. //depot/projects/uart/compat/ia32/ia32_util.h#2 integrate .. //depot/projects/uart/compat/linprocfs/linprocfs.c#6 integrate .. //depot/projects/uart/compat/pecoff/imgact_pecoff.c#2 integrate .. //depot/projects/uart/compat/svr4/svr4_sysvec.c#2 integrate .. //depot/projects/uart/conf/files.ia64#9 integrate .. //depot/projects/uart/contrib/ipfilter/netinet/ip_fil.c#2 integrate .. //depot/projects/uart/dev/acpica/acpi_button.c#4 integrate .. //depot/projects/uart/dev/ata/ata-lowlevel.c#9 integrate .. //depot/projects/uart/dev/ata/atapi-cam.c#7 integrate .. //depot/projects/uart/dev/ata/atapi-cd.c#8 integrate .. //depot/projects/uart/dev/ata/atapi-cd.h#5 integrate .. //depot/projects/uart/dev/bge/if_bge.c#10 integrate .. //depot/projects/uart/dev/ed/if_ed_pccard.c#6 integrate .. //depot/projects/uart/dev/em/if_em.c#5 integrate .. //depot/projects/uart/dev/em/if_em.h#7 integrate .. //depot/projects/uart/dev/exca/exca.c#5 integrate .. //depot/projects/uart/dev/ips/ips_disk.c#3 integrate .. //depot/projects/uart/dev/mii/e1000phy.c#3 integrate .. //depot/projects/uart/dev/mii/e1000phyreg.h#2 integrate .. //depot/projects/uart/dev/mii/miidevs#4 integrate .. //depot/projects/uart/dev/pccard/pccarddevs#9 integrate .. //depot/projects/uart/dev/pccard/pccarddevs.h#9 integrate .. //depot/projects/uart/dev/pccard/pccardvar.h#3 integrate .. //depot/projects/uart/dev/re/if_re.c#5 integrate .. //depot/projects/uart/dev/uart/uart.h#6 integrate .. //depot/projects/uart/dev/uart/uart_bus_pccard.c#3 integrate .. //depot/projects/uart/dev/uart/uart_core.c#31 integrate .. //depot/projects/uart/dev/uart/uart_cpu.h#12 integrate .. //depot/projects/uart/dev/uart/uart_cpu_alpha.c#7 integrate .. //depot/projects/uart/dev/uart/uart_cpu_amd64.c#5 integrate .. //depot/projects/uart/dev/uart/uart_cpu_i386.c#6 integrate .. //depot/projects/uart/dev/uart/uart_cpu_ia64.c#6 integrate .. //depot/projects/uart/dev/uart/uart_cpu_pc98.c#5 integrate .. //depot/projects/uart/dev/uart/uart_cpu_sparc64.c#15 integrate .. //depot/projects/uart/dev/uart/uart_dev_sab82532.c#30 integrate .. //depot/projects/uart/dev/uart/uart_dev_z8530.c#16 integrate .. //depot/projects/uart/dev/usb/umass.c#6 integrate .. //depot/projects/uart/dev/usb/usbdevs#7 integrate .. //depot/projects/uart/dev/usb/usbdevs.h#6 integrate .. //depot/projects/uart/dev/usb/usbdevs_data.h#6 integrate .. //depot/projects/uart/dev/wi/if_wi_pccard.c#10 integrate .. //depot/projects/uart/geom/geom_disk.c#3 integrate .. //depot/projects/uart/i386/acpica/acpi_wakeup.c#7 integrate .. //depot/projects/uart/i386/i386/elf_machdep.c#4 integrate .. //depot/projects/uart/i386/i386/pmap.c#18 integrate .. //depot/projects/uart/i386/ibcs2/ibcs2_sysvec.c#2 integrate .. //depot/projects/uart/i386/include/bus_at386.h#2 integrate .. //depot/projects/uart/i386/include/bus_pc98.h#2 integrate .. //depot/projects/uart/i386/include/clock.h#4 integrate .. //depot/projects/uart/i386/include/elf.h#2 integrate .. //depot/projects/uart/i386/include/endian.h#3 integrate .. //depot/projects/uart/i386/include/pmap.h#2 integrate .. //depot/projects/uart/i386/isa/clock.c#6 integrate .. //depot/projects/uart/i386/linux/linux_sysvec.c#2 integrate .. //depot/projects/uart/ia64/ia32/ia32_sysvec.c#3 integrate .. //depot/projects/uart/ia64/ia64/elf_machdep.c#4 integrate .. //depot/projects/uart/ia64/ia64/machdep.c#13 integrate .. //depot/projects/uart/ia64/ia64/pmap.c#11 integrate .. //depot/projects/uart/ia64/ia64/uma_machdep.c#1 branch .. //depot/projects/uart/ia64/include/bus.h#4 integrate .. //depot/projects/uart/ia64/include/elf.h#2 integrate .. //depot/projects/uart/kern/imgact_aout.c#2 integrate .. //depot/projects/uart/kern/imgact_elf.c#2 integrate .. //depot/projects/uart/kern/init_main.c#4 integrate .. //depot/projects/uart/kern/kern_exec.c#3 integrate .. //depot/projects/uart/kern/kern_linker.c#3 integrate .. //depot/projects/uart/kern/linker_if.m#2 integrate .. //depot/projects/uart/kern/vfs_bio.c#7 integrate .. //depot/projects/uart/modules/bridge/Makefile#2 integrate .. //depot/projects/uart/modules/ipfilter/Makefile#2 integrate .. //depot/projects/uart/net/bridge.c#4 integrate .. //depot/projects/uart/net/pfil.c#2 integrate .. //depot/projects/uart/net/pfil.h#2 integrate .. //depot/projects/uart/net/radix.c#2 integrate .. //depot/projects/uart/netinet/if_ether.c#2 integrate .. //depot/projects/uart/netinet/ip_input.c#4 integrate .. //depot/projects/uart/netinet/ip_output.c#6 integrate .. //depot/projects/uart/netinet/ip_var.h#4 integrate .. //depot/projects/uart/netinet6/ip6_forward.c#2 integrate .. //depot/projects/uart/netinet6/ip6_input.c#2 integrate .. //depot/projects/uart/netinet6/ip6_output.c#2 integrate .. //depot/projects/uart/netinet6/ip6_var.h#2 integrate .. //depot/projects/uart/netinet6/ip6protosw.h#2 integrate .. //depot/projects/uart/pc98/i386/busiosubr.c#2 integrate .. //depot/projects/uart/pci/if_sk.c#4 integrate .. //depot/projects/uart/pci/if_skreg.h#2 integrate .. //depot/projects/uart/pci/yukonreg.h#1 branch .. //depot/projects/uart/powerpc/include/elf.h#2 integrate .. //depot/projects/uart/powerpc/include/param.h#3 integrate .. //depot/projects/uart/powerpc/powermac/ata_macio.c#2 integrate .. //depot/projects/uart/powerpc/powerpc/elf_machdep.c#3 integrate .. //depot/projects/uart/powerpc/powerpc/pmap.c#7 integrate .. //depot/projects/uart/powerpc/psim/ata_iobus.c#2 integrate .. //depot/projects/uart/sparc64/include/bus.h#5 integrate .. //depot/projects/uart/sparc64/include/elf.h#3 integrate .. //depot/projects/uart/sparc64/sparc64/elf_machdep.c#3 integrate .. //depot/projects/uart/sparc64/sparc64/pmap.c#9 integrate .. //depot/projects/uart/sys/kobj.h#2 integrate .. //depot/projects/uart/sys/param.h#9 integrate .. //depot/projects/uart/sys/protosw.h#2 integrate .. //depot/projects/uart/sys/sysent.h#2 integrate .. //depot/projects/uart/vm/uma_core.c#11 integrate .. //depot/projects/uart/vm/vm_map.c#9 integrate .. //depot/projects/uart/vm/vm_mmap.c#5 integrate .. //depot/projects/uart/vm/vm_page.c#6 integrate Differences ... ==== //depot/projects/uart/alpha/alpha/elf_machdep.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/elf_machdep.c,v 1.15 2003/08/17 08:08:38 gordon Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/elf_machdep.c,v 1.16 2003/09/25 01:10:22 peter Exp $"); #include #include @@ -73,7 +73,8 @@ PS_STRINGS, VM_PROT_ALL, exec_copyout_strings, - exec_setregs + exec_setregs, + NULL }; static Elf64_Brandinfo freebsd_brand_info = { ==== //depot/projects/uart/alpha/include/bus.h#4 (text+ko) ==== @@ -67,7 +67,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $FreeBSD: src/sys/alpha/include/bus.h,v 1.23 2003/07/27 13:52:09 mux Exp $ */ +/* $FreeBSD: src/sys/alpha/include/bus.h,v 1.24 2003/09/23 08:22:33 nyan Exp $ */ #ifndef _ALPHA_BUS_H_ #define _ALPHA_BUS_H_ @@ -91,6 +91,24 @@ #define BUS_SPACE_UNRESTRICTED (~0UL) /* + * Map a region of device bus space into CPU virtual address space. + */ + +static __inline int bus_space_map(bus_space_tag_t t, bus_addr_t addr, + bus_size_t size, int flags, + bus_space_handle_t *bshp); + +static __inline int +bus_space_map(bus_space_tag_t t __unused, bus_addr_t addr, + bus_size_t size __unused, int flags __unused, + bus_space_handle_t *bshp) +{ + + *bshp = addr; + return (0); +} + +/* * Unmap a region of device bus space. */ ==== //depot/projects/uart/alpha/include/elf.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/include/elf.h,v 1.13 2002/05/30 08:32:18 dfr Exp $ + * $FreeBSD: src/sys/alpha/include/elf.h,v 1.14 2003/09/25 01:10:22 peter Exp $ */ #ifndef _MACHINE_ELF_H_ @@ -135,16 +135,4 @@ #define ELF_TARG_MACH EM_ALPHA #define ELF_TARG_VER 1 -#ifdef _KERNEL - -/* - * On the Alpha we load the dynamic linker where a userland call - * to mmap(0, ...) would put it. The rationale behind this - * calculation is that it leaves room for the heap to grow to - * its maximum allowed size. - */ -#define ELF_RTLD_ADDR(vmspace) \ - (round_page((vm_offset_t)(vmspace)->vm_daddr + maxdsiz)) - -#endif #endif /* !_MACHINE_ELF_H_ */ ==== //depot/projects/uart/alpha/linux/linux_sysvec.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/linux/linux_sysvec.c,v 1.90 2003/08/22 07:20:26 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/linux/linux_sysvec.c,v 1.91 2003/09/25 01:10:22 peter Exp $"); /* XXX we use functions that might not exist. */ #include "opt_compat.h" @@ -200,7 +200,8 @@ PS_STRINGS, VM_PROT_ALL, exec_copyout_strings, - exec_setregs + exec_setregs, + NULL }; static Elf64_Brandinfo linux_brand = { ==== //depot/projects/uart/alpha/osf1/osf1_sysvec.c#3 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/osf1/osf1_sysvec.c,v 1.10 2003/08/22 07:20:27 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/osf1/osf1_sysvec.c,v 1.11 2003/09/25 01:10:22 peter Exp $"); /* XXX we use functions that might not exist. */ #include "opt_compat.h" @@ -87,7 +87,8 @@ PS_STRINGS, VM_PROT_ALL, exec_copyout_strings, - exec_setregs + exec_setregs, + NULL }; /* ==== //depot/projects/uart/amd64/acpica/acpi_machdep.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/acpica/acpi_machdep.c,v 1.11 2003/08/28 16:30:31 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/acpica/acpi_machdep.c,v 1.12 2003/09/22 22:12:46 peter Exp $"); #include #include @@ -33,6 +33,8 @@ #include "acpi.h" #include +static int intr_model = ACPI_INTR_PIC; + int acpi_machdep_init(device_t dev) { @@ -43,5 +45,15 @@ acpi_install_wakeup_handler(sc); + if (intr_model != ACPI_INTR_PIC) + acpi_SetIntrModel(intr_model); + return (0); } + +void +acpi_SetDefaultIntrModel(int model) +{ + + intr_model = model; +} ==== //depot/projects/uart/amd64/amd64/busdma_machdep.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.51 2003/08/04 23:40:35 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.54 2003/09/22 23:11:42 peter Exp $"); #include #include @@ -65,6 +65,7 @@ int map_count; bus_dma_lock_t *lockfunc; void *lockfuncarg; + bus_dma_segment_t *segments; }; struct bounce_page { @@ -169,11 +170,7 @@ static void dflt_lock(void *arg, bus_dma_lock_op_t op) { -#ifdef INVARIANTS panic("driver error: busdma dflt_lock called"); -#else - printf("DRIVER_ERROR: busdma dflt_lock called\n"); -#endif } #define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 @@ -219,7 +216,8 @@ newtag->lockfunc = dflt_lock; newtag->lockfuncarg = NULL; } - + newtag->segments = NULL; + /* Take into account any restrictions imposed by our parent tag */ if (parent != NULL) { newtag->lowaddr = MIN(parent->lowaddr, newtag->lowaddr); @@ -289,6 +287,8 @@ parent = dmat->parent; atomic_subtract_int(&dmat->ref_count, 1); if (dmat->ref_count == 0) { + if (dmat->segments != NULL) + free(dmat->segments, M_DEVBUF); free(dmat, M_DEVBUF); /* * Last reference count, so @@ -314,6 +314,14 @@ error = 0; + if (dmat->segments == NULL) { + dmat->segments = (bus_dma_segment_t *)malloc( + sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF, + M_NOWAIT); + if (dmat->segments == NULL) + return (ENOMEM); + } + if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem)) { /* Must bounce */ int maxpages; @@ -402,6 +410,14 @@ /* If we succeed, no mapping/bouncing will be required */ *mapp = NULL; + if (dmat->segments == NULL) { + dmat->segments = (bus_dma_segment_t *)malloc( + sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF, + M_NOWAIT); + if (dmat->segments == NULL) + return (ENOMEM); + } + if ((dmat->maxsize <= PAGE_SIZE) && dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem)) { *vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags); @@ -452,7 +468,6 @@ static int _bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, - bus_dma_segment_t segs[], void *buf, bus_size_t buflen, struct thread *td, int flags, @@ -460,6 +475,7 @@ int *segp, int first) { + bus_dma_segment_t *segs; bus_size_t sgsize; bus_addr_t curaddr, lastaddr, baddr, bmask; vm_offset_t vaddr; @@ -468,6 +484,8 @@ int seg; pmap_t pmap; + segs = dmat->segments; + if (map == NULL) map = &nobounce_dmamap; @@ -589,8 +607,6 @@ return (buflen != 0 ? EFBIG : 0); /* XXX better return value here? */ } -#define BUS_DMAMAP_NSEGS ((64 * 1024) / PAGE_SIZE + 1) - /* * Map the buffer buf into bus space using the dmamap map. */ @@ -599,11 +615,6 @@ bus_size_t buflen, bus_dmamap_callback_t *callback, void *callback_arg, int flags) { -#ifdef __GNUC__ - bus_dma_segment_t dm_segments[dmat->nsegments]; -#else - bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; -#endif bus_addr_t lastaddr = 0; int error, nsegs = 0; @@ -613,16 +624,16 @@ map->callback_arg = callback_arg; } - error = _bus_dmamap_load_buffer(dmat, map, dm_segments, buf, buflen, - NULL, flags, &lastaddr, &nsegs, 1); + error = _bus_dmamap_load_buffer(dmat, map, buf, buflen, NULL, flags, + &lastaddr, &nsegs, 1); if (error == EINPROGRESS) return (error); if (error) - (*callback)(callback_arg, dm_segments, 0, error); + (*callback)(callback_arg, dmat->segments, 0, error); else - (*callback)(callback_arg, dm_segments, nsegs + 1, 0); + (*callback)(callback_arg, dmat->segments, nsegs + 1, 0); return (0); } @@ -637,11 +648,6 @@ bus_dmamap_callback2_t *callback, void *callback_arg, int flags) { -#ifdef __GNUC__ - bus_dma_segment_t dm_segments[dmat->nsegments]; -#else - bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; -#endif int nsegs, error; M_ASSERTPKTHDR(m0); @@ -657,7 +663,6 @@ for (m = m0; m != NULL && error == 0; m = m->m_next) { if (m->m_len > 0) { error = _bus_dmamap_load_buffer(dmat, map, - dm_segments, m->m_data, m->m_len, NULL, flags, &lastaddr, &nsegs, first); @@ -670,9 +675,9 @@ if (error) { /* force "no valid mappings" in callback */ - (*callback)(callback_arg, dm_segments, 0, 0, error); + (*callback)(callback_arg, dmat->segments, 0, 0, error); } else { - (*callback)(callback_arg, dm_segments, + (*callback)(callback_arg, dmat->segments, nsegs+1, m0->m_pkthdr.len, error); } return (error); @@ -688,11 +693,6 @@ int flags) { bus_addr_t lastaddr; -#ifdef __GNUC__ - bus_dma_segment_t dm_segments[dmat->nsegments]; -#else - bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; -#endif int nsegs, error, first, i; bus_size_t resid; struct iovec *iov; @@ -722,7 +722,6 @@ if (minlen > 0) { error = _bus_dmamap_load_buffer(dmat, map, - dm_segments, addr, minlen, td, flags, &lastaddr, &nsegs, first); first = 0; @@ -733,9 +732,9 @@ if (error) { /* force "no valid mappings" in callback */ - (*callback)(callback_arg, dm_segments, 0, 0, error); + (*callback)(callback_arg, dmat->segments, 0, 0, error); } else { - (*callback)(callback_arg, dm_segments, + (*callback)(callback_arg, dmat->segments, nsegs+1, uio->uio_resid, error); } return (error); ==== //depot/projects/uart/amd64/amd64/elf_machdep.c#4 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/elf_machdep.c,v 1.17 2003/08/17 08:08:38 gordon Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/elf_machdep.c,v 1.18 2003/09/25 01:10:23 peter Exp $"); #include #include @@ -70,7 +70,8 @@ PS_STRINGS, VM_PROT_ALL, exec_copyout_strings, - exec_setregs + exec_setregs, + NULL }; static Elf64_Brandinfo freebsd_brand_info = { ==== //depot/projects/uart/amd64/amd64/exception.S#3 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.111 2003/09/09 19:32:09 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.112 2003/09/22 22:54:14 peter Exp $ */ #include @@ -332,7 +332,7 @@ doreti_ast: /* * Check for ASTs atomically with returning. Disabling CPU - * interrupts provides sufficient locking evein the SMP case, + * interrupts provides sufficient locking eve in the SMP case, * since we will be informed of any new ASTs by an IPI. */ cli ==== //depot/projects/uart/amd64/amd64/machdep.c#6 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.589 2003/09/09 19:32:09 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.593 2003/09/23 00:45:55 peter Exp $"); #include "opt_atalk.h" #include "opt_compat.h" @@ -756,6 +756,8 @@ u_int32_t type; } __packed; +u_int basemem; + /* * Populate the (physmap) array with base/bound pairs describing the * available physical memory in the system, then test this memory and @@ -773,7 +775,7 @@ getmemsize(caddr_t kmdp, u_int64_t first) { int i, physmap_idx, pa_indx; - u_int basemem, extmem; + u_int extmem; vm_paddr_t pa, physmap[PHYSMAP_SIZE]; pt_entry_t *pte; char *cp; @@ -1166,32 +1168,31 @@ * under witness. */ mutex_init(); - mtx_init(&clock_lock, "clk", NULL, MTX_SPIN | MTX_RECURSE); + mtx_init(&clock_lock, "clk", NULL, MTX_SPIN); mtx_init(&icu_lock, "icu", NULL, MTX_SPIN | MTX_NOWITNESS); /* exceptions */ for (x = 0; x < NIDT; x++) setidt(x, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); - setidt(0, &IDTVEC(div), SDT_SYSIGT, SEL_KPL, 0); - setidt(1, &IDTVEC(dbg), SDT_SYSIGT, SEL_KPL, 0); - setidt(2, &IDTVEC(nmi), SDT_SYSIGT, SEL_KPL, 0); - setidt(3, &IDTVEC(bpt), SDT_SYSIGT, SEL_UPL, 0); - setidt(4, &IDTVEC(ofl), SDT_SYSIGT, SEL_KPL, 0); - setidt(5, &IDTVEC(bnd), SDT_SYSIGT, SEL_KPL, 0); - setidt(6, &IDTVEC(ill), SDT_SYSIGT, SEL_KPL, 0); - setidt(7, &IDTVEC(dna), SDT_SYSIGT, SEL_KPL, 0); - setidt(8, &IDTVEC(dblfault), SDT_SYSIGT, SEL_KPL, 1); - setidt(9, &IDTVEC(fpusegm), SDT_SYSIGT, SEL_KPL, 0); - setidt(10, &IDTVEC(tss), SDT_SYSIGT, SEL_KPL, 0); - setidt(11, &IDTVEC(missing), SDT_SYSIGT, SEL_KPL, 0); - setidt(12, &IDTVEC(stk), SDT_SYSIGT, SEL_KPL, 0); - setidt(13, &IDTVEC(prot), SDT_SYSIGT, SEL_KPL, 0); - setidt(14, &IDTVEC(page), SDT_SYSIGT, SEL_KPL, 0); - setidt(15, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); - setidt(16, &IDTVEC(fpu), SDT_SYSIGT, SEL_KPL, 0); - setidt(17, &IDTVEC(align), SDT_SYSIGT, SEL_KPL, 0); - setidt(18, &IDTVEC(mchk), SDT_SYSIGT, SEL_KPL, 0); - setidt(19, &IDTVEC(xmm), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_DE, &IDTVEC(div), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_DB, &IDTVEC(dbg), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_NMI, &IDTVEC(nmi), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_BP, &IDTVEC(bpt), SDT_SYSIGT, SEL_UPL, 0); + setidt(IDT_OF, &IDTVEC(ofl), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_BR, &IDTVEC(bnd), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_UD, &IDTVEC(ill), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_NM, &IDTVEC(dna), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_DF, &IDTVEC(dblfault), SDT_SYSIGT, SEL_KPL, 1); + setidt(IDT_FPUGP, &IDTVEC(fpusegm), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_TS, &IDTVEC(tss), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_NP, &IDTVEC(missing), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_SS, &IDTVEC(stk), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_GP, &IDTVEC(prot), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_PF, &IDTVEC(page), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_MF, &IDTVEC(fpu), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_AC, &IDTVEC(align), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_MC, &IDTVEC(mchk), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_XF, &IDTVEC(xmm), SDT_SYSIGT, SEL_KPL, 0); r_idt.rd_limit = sizeof(idt0) - 1; r_idt.rd_base = (long) idt; ==== //depot/projects/uart/amd64/amd64/trap.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.262 2003/07/25 21:15:44 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.264 2003/09/22 22:52:46 peter Exp $"); /* * AMD64 Trap and System call handling @@ -88,8 +88,6 @@ #include -#include - extern void trap(struct trapframe frame); extern void syscall(struct trapframe frame); @@ -239,6 +237,7 @@ case T_BPTFLT: /* bpt instruction fault */ case T_TRCTRAP: /* trace trap */ + enable_intr(); frame.tf_rflags &= ~PSL_T; i = SIGTRAP; break; ==== //depot/projects/uart/amd64/amd64/tsc.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/tsc.c,v 1.201 2003/07/25 21:15:44 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/tsc.c,v 1.203 2003/09/23 00:18:45 peter Exp $"); #include "opt_clock.h" @@ -43,7 +43,6 @@ uint64_t tsc_freq; int tsc_is_broken; -u_int tsc_present = 1; #ifdef SMP static int smp_tsc; @@ -59,7 +58,8 @@ 0, /* no poll_pps */ ~0u, /* counter_mask */ 0, /* frequency */ - "TSC" /* name */ + "TSC", /* name */ + 800, /* quality (adjusted in code) */ }; void @@ -78,12 +78,17 @@ if (bootverbose) printf("TSC clock: %lu Hz\n", tsc_freq); + return; +} + +void +init_TSC_tc(void) +{ + if (tsc_freq != 0 && !tsc_is_broken) { tsc_timecounter.tc_frequency = tsc_freq; tc_init(&tsc_timecounter); } - - return; } static int ==== //depot/projects/uart/amd64/ia32/ia32_syscall.c#4 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.4 2003/08/23 00:04:53 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.5 2003/09/22 22:09:02 peter Exp $"); /* * 386 Trap and System call handling @@ -263,14 +263,14 @@ ia32_syscall_enable(void *dummy) { - setidt(0x80, &IDTVEC(int0x80_syscall), SDT_SYSIGT, SEL_UPL, 0); + setidt(IDT_SYSCALL, &IDTVEC(int0x80_syscall), SDT_SYSIGT, SEL_UPL, 0); } static void ia32_syscall_disable(void *dummy) { - setidt(0x80, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_SYSCALL, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); } SYSINIT(ia32_syscall, SI_SUB_EXEC, SI_ORDER_ANY, ia32_syscall_enable, NULL); ==== //depot/projects/uart/amd64/include/acpica_machdep.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/acpica_machdep.h,v 1.2 2003/05/31 06:43:55 peter Exp $ + * $FreeBSD: src/sys/amd64/include/acpica_machdep.h,v 1.3 2003/09/22 22:12:46 peter Exp $ */ /****************************************************************************** @@ -103,4 +103,6 @@ #define COMPILER_DEPENDENT_INT64 long #define COMPILER_DEPENDENT_UINT64 unsigned long +void acpi_SetDefaultIntrModel(int model); + #endif /* __ACPICA_MACHDEP_H__ */ ==== //depot/projects/uart/amd64/include/bus_amd64.h#2 (text+ko) ==== @@ -67,7 +67,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $FreeBSD: src/sys/amd64/include/bus_amd64.h,v 1.25 2003/05/23 05:04:54 peter Exp $ */ +/* $FreeBSD: src/sys/amd64/include/bus_amd64.h,v 1.26 2003/09/23 08:22:33 nyan Exp $ */ #ifndef _AMD64_BUS_AMD64_H_ #define _AMD64_BUS_AMD64_H_ @@ -114,11 +114,19 @@ * Map a region of device bus space into CPU virtual address space. */ -#define BUS_SPACE_MAP_CACHEABLE 0x01 -#define BUS_SPACE_MAP_LINEAR 0x02 +static __inline int bus_space_map(bus_space_tag_t t, bus_addr_t addr, + bus_size_t size, int flags, + bus_space_handle_t *bshp); + +static __inline int +bus_space_map(bus_space_tag_t t __unused, bus_addr_t addr, + bus_size_t size __unused, int flags __unused, + bus_space_handle_t *bshp) +{ -int bus_space_map(bus_space_tag_t t, bus_addr_t addr, bus_size_t size, - int flags, bus_space_handle_t *bshp); + *bshp = addr; + return (0); +} /* * Unmap a region of device bus space. ==== //depot/projects/uart/amd64/include/clock.h#2 (text+ko) ==== @@ -3,7 +3,7 @@ * Garrett Wollman, September 1994. * This file is in the public domain. * - * $FreeBSD: src/sys/amd64/include/clock.h,v 1.45 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/clock.h,v 1.46 2003/09/22 23:02:24 peter Exp $ */ #ifndef _MACHINE_CLOCK_H_ @@ -37,6 +37,7 @@ int rtcin(int val); int sysbeep(int pitch, int period); void init_TSC(void); +void init_TSC_tc(void); #endif /* _KERNEL */ ==== //depot/projects/uart/amd64/include/cpu.h#3 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)cpu.h 5.4 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/cpu.h,v 1.69 2003/08/16 16:57:56 marcel Exp $ + * $FreeBSD: src/sys/amd64/include/cpu.h,v 1.70 2003/09/23 00:18:45 peter Exp $ */ #ifndef _MACHINE_CPU_H_ @@ -78,7 +78,6 @@ #ifdef _KERNEL extern char btext[]; extern char etext[]; -extern u_int tsc_present; void cpu_halt(void); void cpu_reset(void); ==== //depot/projects/uart/amd64/include/elf.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/elf.h,v 1.15 2003/05/14 04:10:49 peter Exp $ + * $FreeBSD: src/sys/amd64/include/elf.h,v 1.16 2003/09/25 01:10:23 peter Exp $ */ #ifndef _MACHINE_ELF_H_ @@ -137,16 +137,4 @@ #define ELF_TARG_MACH EM_X86_64 #define ELF_TARG_VER 1 -#ifdef _KERNEL - -/* - * On the i386 we load the dynamic linker where a userland call - * to mmap(0, ...) would put it. The rationale behind this - * calculation is that it leaves room for the heap to grow to - * its maximum allowed size. - */ -#define ELF_RTLD_ADDR(vmspace) \ - (round_page((vm_offset_t)(vmspace)->vm_daddr + maxdsiz)) - -#endif /* _KERNEL */ #endif /* !_MACHINE_ELF_H_ */ ==== //depot/projects/uart/amd64/include/endian.h#2 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)endian.h 7.8 (Berkeley) 4/3/91 - * $FreeBSD: src/sys/amd64/include/endian.h,v 1.4 2003/05/01 01:05:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/endian.h,v 1.5 2003/09/22 22:37:49 peter Exp $ */ #ifndef _MACHINE_ENDIAN_H_ @@ -69,26 +69,92 @@ #ifdef __GNUC__ -#define __word_swap_int(x) \ +#define __word_swap_int_var(x) \ __extension__ ({ register __uint32_t __X = (x); \ __asm ("rorl $16, %0" : "+r" (__X)); \ __X; }) -#define __byte_swap_int(x) \ +#ifdef __OPTIMIZE__ + +#define __word_swap_int_const(x) \ + ((((x) & 0xffff0000) >> 16) | \ + (((x) & 0x0000ffff) << 16)) +#define __word_swap_int(x) (__builtin_constant_p(x) ? \ + __word_swap_int_const(x) : __word_swap_int_var(x)) + +#else /* __OPTIMIZE__ */ + +#define __word_swap_int(x) __word_swap_int_var(x) + +#endif /* __OPTIMIZE__ */ + +#define __byte_swap_int_var(x) \ __extension__ ({ register __uint32_t __X = (x); \ __asm ("bswap %0" : "+r" (__X)); \ __X; }) -#define __byte_swap_long(x) \ +#ifdef __OPTIMIZE__ + +#define __byte_swap_int_const(x) \ + ((((x) & 0xff000000) >> 24) | \ + (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0x0000ff00) << 8) | \ + (((x) & 0x000000ff) << 24)) +#define __byte_swap_int(x) (__builtin_constant_p(x) ? \ + __byte_swap_int_const(x) : __byte_swap_int_var(x)) + +#else /* __OPTIMIZE__ */ + +#define __byte_swap_int(x) __byte_swap_int_var(x) + +#endif /* __OPTIMIZE__ */ + +#define __byte_swap_long_var(x) \ __extension__ ({ register __uint64_t __X = (x); \ __asm ("bswap %0" : "+r" (__X)); \ __X; }) -#define __byte_swap_word(x) \ +#ifdef __OPTIMIZE__ + +#define __byte_swap_long_const(x) \ + (((x >> 56) | \ + ((x >> 40) & 0xff00) | \ + ((x >> 24) & 0xff0000) | \ + ((x >> 8) & 0xff000000) | \ + ((x << 8) & (0xfful << 32)) | \ + ((x << 24) & (0xfful << 40)) | \ + ((x << 40) & (0xfful << 48)) | \ + ((x << 56)))) + +#define __byte_swap_long(x) (__builtin_constant_p(x) ? \ + __byte_swap_long_const(x) : __byte_swap_long_var(x)) + +#else /* __OPTIMIZE__ */ + +#define __byte_swap_long(x) __byte_swap_long_var(x) + +#endif /* __OPTIMIZE__ */ + +#define __byte_swap_word_var(x) \ __extension__ ({ register __uint16_t __X = (x); \ __asm ("xchgb %h0, %b0" : "+Q" (__X)); \ __X; }) +#ifdef __OPTIMIZE__ + +#define __byte_swap_word_const(x) \ + ((((x) & 0xff00) >> 8) | \ + (((x) & 0x00ff) << 8)) + +#define __byte_swap_word(x) (__builtin_constant_p(x) ? \ + __byte_swap_word_const(x) : __byte_swap_word_var(x)) + +#else /* __OPTIMIZE__ */ + +#define __byte_swap_word(x) __byte_swap_word_var(x) + +#endif /* __OPTIMIZE__ */ + static __inline __uint64_t __bswap64(__uint64_t _x) { ==== //depot/projects/uart/amd64/include/legacyvar.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/legacyvar.h,v 1.3 2002/09/23 15:50:06 jhb Exp $ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Sep 24 21:31:43 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9153D16A4C0; Wed, 24 Sep 2003 21:31:43 -0700 (PDT) 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 6BACD16A4B3 for ; Wed, 24 Sep 2003 21:31:43 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6393B44037 for ; Wed, 24 Sep 2003 21:31:42 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8P4VgXJ053914 for ; Wed, 24 Sep 2003 21:31:42 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8P4VfYt053911 for perforce@freebsd.org; Wed, 24 Sep 2003 21:31:41 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Wed, 24 Sep 2003 21:31:41 -0700 (PDT) Message-Id: <200309250431.h8P4VfYt053911@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 38558 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2003 04:31:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=38558 Change 38558 by marcel@marcel_nfs on 2003/09/24 21:31:33 Remove last remnants of iobase. Affected files ... .. //depot/projects/uart/dev/uart/uart.h#7 edit .. //depot/projects/uart/dev/uart/uart_core.c#32 edit .. //depot/projects/uart/dev/uart/uart_cpu_ia64.c#7 edit .. //depot/projects/uart/dev/uart/uart_cpu_pc98.c#6 edit .. //depot/projects/uart/dev/uart/uart_cpu_sparc64.c#16 edit Differences ... ==== //depot/projects/uart/dev/uart/uart.h#7 (text+ko) ==== @@ -36,7 +36,6 @@ * other timing related computations. */ struct uart_bas { - bus_addr_t iobase; bus_space_tag_t bst; bus_space_handle_t bsh; u_int chan; ==== //depot/projects/uart/dev/uart/uart_core.c#32 (text+ko) ==== @@ -267,7 +267,6 @@ * accordingly. In general, you don't want to permanently disrupt * console I/O. */ - sc->sc_bas.iobase = rman_get_start(sc->sc_rres); sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres); sc->sc_bas.bst = rman_get_bustag(sc->sc_rres); sc->sc_bas.chan = chan; @@ -327,10 +326,6 @@ if (sc->sc_rres == NULL) return (ENXIO); - sc->sc_bas.iobase = rman_get_start(sc->sc_rres); - sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres); - sc->sc_bas.bst = rman_get_bustag(sc->sc_rres); - sc->sc_irid = 0; sc->sc_ires = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->sc_irid, 0, ~0, 1, RF_ACTIVE); ==== //depot/projects/uart/dev/uart/uart_cpu_ia64.c#7 (text+ko) ==== @@ -56,6 +56,7 @@ { struct dig64_hcdp_table *tbl; struct dig64_hcdp_entry *ent; + bus_addr_t addr; unsigned int i, ivar; /* @@ -74,12 +75,14 @@ ent->type != DIG64_HCDP_DBGPORT) continue; + addr = ent->address.addr_high; + addr = (addr << 32) + ent->address.addr_low di->ops = uart_ns8250_ops; di->bas.chan = 0; di->bas.bst = (ent->address.addr_space == 0) ? IA64_BUS_SPACE_MEM : IA64_BUS_SPACE_IO; - if (bus_space_map(di->bas.bst, di->bas.iobase, 8, 0, - &di->bas.bsh) != 0) + if (bus_space_map(di->bas.bst, addr, 8, 0, + &di->bas.bsh) != 0) continue; di->bas.regshft = 0; di->bas.rclk = ent->pclock << 4; ==== //depot/projects/uart/dev/uart/uart_cpu_pc98.c#6 (text+ko) ==== @@ -40,7 +40,7 @@ uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { - return ((b1->iobase == b2->iobase && b1->bst == b2->bst) ? 1 : 0); + return (0); /* XXX */ } int ==== //depot/projects/uart/dev/uart/uart_cpu_sparc64.c#16 (text+ko) ==== @@ -138,7 +138,6 @@ return (ENXIO); /* Fill in the device info. */ - di->bas.iobase = addr; di->bas.bst = &bst_store[devtype]; di->bas.bsh = sparc64_fake_bustag(space, addr, di->bas.bst); From owner-p4-projects@FreeBSD.ORG Wed Sep 24 23:14:54 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 04E6916A4C0; Wed, 24 Sep 2003 23:14:54 -0700 (PDT) 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 B543C16A4B3 for ; Wed, 24 Sep 2003 23:14:53 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DD2244015 for ; Wed, 24 Sep 2003 23:14:52 -0700 (PDT) (envelope-from tzukanov@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8P6EqXJ060883 for ; Wed, 24 Sep 2003 23:14:52 -0700 (PDT) (envelope-from tzukanov@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8P6Eqf6060880 for perforce@freebsd.org; Wed, 24 Sep 2003 23:14:52 -0700 (PDT) (envelope-from tzukanov@freebsd.org) Date: Wed, 24 Sep 2003 23:14:52 -0700 (PDT) Message-Id: <200309250614.h8P6Eqf6060880@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to tzukanov@freebsd.org using -f From: Serguei Tzukanov To: Perforce Change Reviews Subject: PERFORCE change 38564 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2003 06:14:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=38564 Change 38564 by tzukanov@tzukanov_antares on 2003/09/24 23:14:02 Update to -current. Move some definitions related to ELF relocation into one file. Misc style(9) fixes. Affected files ... .. //depot/projects/s390/libexec/rtld-elf/s390/reloc.c#6 edit .. //depot/projects/s390/sys/s390/include/elf.h#2 edit .. //depot/projects/s390/sys/s390/include/endian.h#2 edit .. //depot/projects/s390/sys/s390/include/signal.h#4 edit .. //depot/projects/s390/sys/s390/s390/critical.c#3 edit .. //depot/projects/s390/sys/s390/s390/elf_machdep.c#6 edit .. //depot/projects/s390/sys/s390/s390/external.c#5 edit .. //depot/projects/s390/sys/s390/s390/identcpu.c#6 edit .. //depot/projects/s390/sys/s390/s390/machdep.c#11 edit .. //depot/projects/s390/sys/s390/s390/mp_machdep.c#3 edit .. //depot/projects/s390/sys/s390/s390/pmap.c#16 edit .. //depot/projects/s390/sys/s390/s390/sys_machdep.c#4 edit .. //depot/projects/s390/sys/s390/s390/trap.c#11 edit .. //depot/projects/s390/sys/s390/s390/vm_machdep.c#10 edit .. //depot/projects/s390/usr.bin/Makefile#12 edit Differences ... ==== //depot/projects/s390/libexec/rtld-elf/s390/reloc.c#6 (text+ko) ==== @@ -41,65 +41,10 @@ #include #include "debug.h" +#define _RTLD_COMMON_RELOC #include "rtld.h" -#define _ILL 0 -#define _B8 1 -#define _L12 2 -#define _H16 3 -#define _PC16 5 -#define _W32 6 - -#ifdef __s390x__ -#define _PC32 7 -#define _Q64 8 - -#define _AD _Q64 -#else -#define _AD _W32 -#endif - -#define _B 1 -#define _G 2 -#define _L 4 -#define _O 8 -#define _P 16 -#define _S 32 - -static struct _reldesc { - uint8_t field; - uint8_t action; -} reldesc[] = { - { _ILL }, /* R_390_NONE */ - { _B8, _S, }, /* R_390_8 */ - { _L12, _S, }, /* R_390_12 */ - { _H16, _S, }, /* R_390_16 */ - { _W32, _S, }, /* R_390_32 */ - { _W32, _S | _P }, /* R_390_PC32 */ - { _L12, _O }, /* R_390_GOT12 */ - { _W32, _O, }, /* R_390_GOT32 */ - { _W32, _L, }, /* R_390_PLT32 */ - { _ILL }, /* R_390_COPY */ - { _AD, _S }, /* R_390_GLOB_DAT */ - { _ILL }, /* R_390_JMP_SLOT */ - { _AD, _B }, /* R_390_RELATIVE */ - { _AD, _S | _G }, /* R_390_GOTOFF */ - { _AD, _G | _P }, /* R_390_GOTPC */ - { _H16, _O }, /* R_390_GOT16 */ - { _H16, _S | _P }, /* R_390_PC16 */ - { _PC16, _S | _P }, /* R_390_PC16DBL */ - { _PC16, _L | _P }, /* R_390_PLT16DBL */ -#ifdef __s390x__ - { _PC32, _S | _P }, /* R_390_PC32DBL */ - { _PC32, _L | _P }, /* R_390_PLT32DBL */ - { _PC32, _G | _P }, /* R_390_GOTPCDBL */ - { _Q64, _S }, /* R_390_64 */ - { _Q64, _S | _P }, /* R_390_PC64 */ - { _Q64, _O }, /* R_390_GOT64 */ - { _Q64, _L }, /* R_390_PLT64 */ - { _PC32, _G | _O | _P }, /* R_390_GOTENT */ -#endif -}; +static struct _reldesc reldesc[] = _RELDESC_INITIALIZER; /* * Process the special R_390_COPY relocations in the main program. These ==== //depot/projects/s390/sys/s390/include/elf.h#2 (text+ko) ==== @@ -108,4 +108,76 @@ #define ELF_RTLD_ADDR(vmspace) (round_page((vmspace)->vm_daddr + maxdsiz)) #endif +#ifdef _RTLD_COMMON_RELOC +#define _ILL 0 +#define _B8 1 +#define _L12 2 +#define _H16 3 +#define _PC16 5 +#define _W32 6 + +#define _B 1 +#define _G 2 +#define _L 4 +#define _O 8 +#define _P 16 +#define _S 32 + +struct _reldesc { + uint8_t field; + uint8_t action; +}; + +#define _RELDESC_INITIALIZER_S390 \ + { _ILL }, /* R_390_NONE */ \ + { _B8, _S, }, /* R_390_8 */ \ + { _L12, _S, }, /* R_390_12 */ \ + { _H16, _S, }, /* R_390_16 */ \ + { _W32, _S, }, /* R_390_32 */ \ + { _W32, _S | _P }, /* R_390_PC32 */ \ + { _L12, _O }, /* R_390_GOT12 */ \ + { _W32, _O, }, /* R_390_GOT32 */ \ + { _W32, _L, }, /* R_390_PLT32 */ \ + { _ILL }, /* R_390_COPY */ \ + { _AD, _S }, /* R_390_GLOB_DAT */ \ + { _ILL }, /* R_390_JMP_SLOT */ \ + { _AD, _B }, /* R_390_RELATIVE */ \ + { _AD, _S | _G }, /* R_390_GOTOFF */ \ + { _AD, _G | _P }, /* R_390_GOTPC */ \ + { _H16, _O }, /* R_390_GOT16 */ \ + { _H16, _S | _P }, /* R_390_PC16 */ \ + { _PC16, _S | _P }, /* R_390_PC16DBL */ \ + { _PC16, _L | _P }, /* R_390_PLT16DBL */ + +#ifdef __s390x__ +#define _PC32 7 +#define _Q64 8 + +#define _AD _Q64 + +#define _RELDESC_INITIALIZER_S390X \ + { _PC32, _S | _P }, /* R_390_PC32DBL */ \ + { _PC32, _L | _P }, /* R_390_PLT32DBL */ \ + { _PC32, _G | _P }, /* R_390_GOTPCDBL */ \ + { _Q64, _S }, /* R_390_64 */ \ + { _Q64, _S | _P }, /* R_390_PC64 */ \ + { _Q64, _O }, /* R_390_GOT64 */ \ + { _Q64, _L }, /* R_390_PLT64 */ \ + { _PC32, _G | _O | _P }, /* R_390_GOTENT */ + +#define _RELDESC_INITIALIZER \ +{ \ + _RELDESC_INITIALIZER_S390 \ + _RELDESC_INITIALIZER_S390X \ +} +#else +#define _AD _W32 + +#define _RELDESC_INITIALIZER \ +{ \ + _RELDESC_INITIALIZER_S390 \ +} +#endif + +#endif /* _RTLD_COMMON_RELOC */ #endif /* !_MACHINE_ELF_H_ */ ==== //depot/projects/s390/sys/s390/include/endian.h#2 (text+ko) ==== @@ -29,6 +29,8 @@ #define BYTE_ORDER _BYTE_ORDER #endif +#ifdef __GNUC__ + static __inline __uint16_t __bswap16(__uint16_t x) { @@ -83,4 +85,15 @@ #define __ntohl(x) ((__uint32_t)(x)) #define __ntohs(x) ((__uint16_t)(x)) +#else /* !__GNUC__ */ + +/* + * No optimizations are available for this compiler. Fall back to + * non-optimized functions by defining the constant usually used to prevent + * redefinition. + */ +#define _BYTEORDER_FUNC_DEFINED + +#endif /* __GNUC__ */ + #endif /* !_MACHINE_ENDIAN_H_ */ ==== //depot/projects/s390/sys/s390/include/signal.h#4 (text+ko) ==== @@ -11,7 +11,6 @@ #define _MACHINE_SIGNAL_H_ #include -#include typedef int sig_atomic_t; @@ -59,6 +58,8 @@ #endif #if __BSD_VISIBLE +#include + struct sigcontext { struct __sigset sc_mask; int sc_onstack; ==== //depot/projects/s390/sys/s390/s390/critical.c#3 (text+ko) ==== @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -20,8 +19,6 @@ { struct thread *td = curthread; - CTR1(KTR_PROC, "cpu_critical_fork_exit: td = %p", td); - td->td_critnest = 1; td->td_md.md_savecrit = SM_T|SM_IO|SM_EX|esa_sm_per; } ==== //depot/projects/s390/sys/s390/s390/elf_machdep.c#6 (text+ko) ==== @@ -11,10 +11,10 @@ #include __FBSDID("$FreeBSD: src/sys/s390/s390/elf_machdep.c,v 1.0 2002/08/01 23:51:16 tzukanov Exp $"); +#define _RTLD_COMMON_RELOC #include #include #include -#include #include #include #include @@ -24,74 +24,10 @@ #include #include #include -#include #include -#include + #include -#ifndef KTR_LD -#define KTR_LD KTR_GEN -#endif - -#define _SHIFT1 (1 << 7) - -#define _B8 1 -#define _L12 2 -#define _H16 3 -#define _PC16 (_H16 | _SHIFT1) -#define _W32 4 -#define _PC32 (_W32 | _SHIFT1) -#define _Q64 5 - -#ifdef __s390x__ -#define _AD _Q64 -#else -#define _AD _W32 -#endif - -#define _B 1 -#define _G 2 -#define _L 3 -#define _O 4 -#define _P 5 -#define _S 6 - -#define _ILL 0 - -static struct _reldesc { - uint8_t op[4]; -} reldesc[] = { - {{ _ILL }}, /* R_390_NONE */ - {{ _B8, _S, }}, /* R_390_8 */ - {{ _L12, _S, }}, /* R_390_12 */ - {{ _H16, _S, }}, /* R_390_16 */ - {{ _W32, _S, }}, /* R_390_32 */ - {{ _W32, _S, _P }}, /* R_390_PC32 */ - {{ _L12, _O, }}, /* R_390_GOT12 */ - {{ _W32, _O, }}, /* R_390_GOT32 */ - {{ _W32, _L, }}, /* R_390_PLT32 */ - {{ _ILL }}, /* R_390_COPY */ - {{ _AD, _S }}, /* R_390_GLOB_DAT */ - {{ _ILL }}, /* R_390_JMP_SLOT */ - {{ _AD, _B }}, /* R_390_RELATIVE */ - {{ _AD, _S, _G }}, /* R_390_GOTOFF */ - {{ _AD, _G, _P }}, /* R_390_GOTPC */ - {{ _H16, _O }}, /* R_390_GOT16 */ - {{ _H16, _S, _P }}, /* R_390_PC16 */ - {{ _PC16, _S, _P }}, /* R_390_PC16DBL */ - {{ _PC16, _L, _P }}, /* R_390_PLT16DBL */ -#ifdef __s390x__ - {{ _PC32, _S, _P }}, /* R_390_PC32DBL */ - {{ _PC32, _L, _P }}, /* R_390_PLT32DBL */ - {{ _PC32, _G, _P }}, /* R_390_GOTPCDBL */ - {{ _Q64, _S }}, /* R_390_64 */ - {{ _Q64, _S, _P }}, /* R_390_PC64 */ - {{ _Q64, _O }}, /* R_390_GOT64 */ - {{ _Q64, _L }}, /* R_390_PLT64 */ - {{ _PC32, _G, _O, _P }}, /* R_390_GOTENT */ -#endif -}; - struct sysentvec elf32_freebsd_sysvec = { SYS_MAXSYSCALL, sysent, @@ -133,78 +69,65 @@ (sysinit_cfunc_t)elf32_insert_brand_entry, &freebsd_brand_info); +static struct _reldesc reldesc[] = _RELDESC_INITIALIZER; + static int elf_reloc_internal(linker_file_t lf, const void *data, int type, int local) { - Elf_Addr A, *where = NULL; /* XXX */ + Elf_Addr value, *where; const Elf_Rela *rela; - struct _reldesc d; - int t, i; + struct _reldesc desc; - CTR3(KTR_LD, "elf_reloc: lf = %p, data = %p, type = %d", lf, data, type); - - /* S/390 and zSeries use only Elf32_Rela and Elf64_Rela respectively. */ + /* + * S/390 and zSeries use only Elf32_Rela + * and Elf64_Rela respectively. + */ if (type != ELF_RELOC_RELA) return -1; rela = (const Elf_Rela *)data; - d = reldesc[ELF_R_TYPE(rela->r_info)]; - t = d.op[0]; - if (t == _ILL) { - return -1; - } + desc = reldesc[ELF_R_TYPE(rela->r_info)]; + + value = rela->r_addend; + where = (Elf_Addr *)(lf->address + rela->r_offset); + + if (desc.action & _B) + value += (Elf_Addr)lf->address; - A = rela->r_addend; - for (i = 1; d.op[i] && (i < 4); i++) { - switch (d.op[i]) { - case _B: - A += (Elf_Addr)lf->address; - break; - case _G: - CTR0(KTR_LD, "elf_reloc: unimplemented t"); - break; - case _L: - CTR0(KTR_LD, "elf_reloc: unimplemented t"); - break; - case _O: - CTR0(KTR_LD, "elf_reloc: unimplemented t"); - break; - case _P: - A -= (Elf_Addr)where; - break; - case _S: - A += elf_lookup(lf, ELF_R_SYM(rela->r_info), 1); - break; - } - } + if (desc.action & (_S|_L)) + value += elf_lookup(lf, ELF_R_SYM(rela->r_info), 1); - if (t & _SHIFT1) { - /* We need shifting with sign copying. */ - A = ((long)A) >> 1; - t &= ~_SHIFT1; - } + if (desc.action & _P) + value -= (Elf_Addr)where; - switch (t) { + switch (desc.field) { case _B8: - *(uint8_t *)where = (uint8_t)A; + *(uint8_t *)where = (uint8_t)value; break; case _L12: - *(uint16_t *)where += A << 4; + *(uint16_t *)where |= value << 4; + break; + case _PC16: + *(int16_t *)where = ((int16_t)value) >> 1; break; case _H16: - *(int16_t *)where = (int16_t)A; + *(int16_t *)where = (int16_t)value; break; case _W32: - *(int32_t *)where = (int32_t)A; + *(int32_t *)where = (int32_t)value; break; #ifdef __s390x__ + case _PC32: + *(int32_t *)where = ((int32_t)value) >> 1; + break; case _Q64: - *where = A; + *where = value; + break; #endif } - return 0; + return (0); } int ==== //depot/projects/s390/sys/s390/s390/external.c#5 (text+ko) ==== @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -84,8 +83,6 @@ code = sysarea.external_code; - CTR1(KTR_INTR, "Entering external interruption %#x", code); - td = curthread; atomic_add_int(&td->td_intr_nesting_level, 1); @@ -105,8 +102,6 @@ } atomic_subtract_int(&td->td_intr_nesting_level, 1); - - CTR1(KTR_INTR, "Leaving external interruption %#x", code); } /* ==== //depot/projects/s390/sys/s390/s390/identcpu.c#6 (text+ko) ==== @@ -58,6 +58,7 @@ {"9672", "Yn7", "Generation 6"}, {"2066", "nnn", "z800"}, {"2064", "nnn", "z900"}, + {"2084", "nnn", "z990"}, {"nnnn", "HERCULES", "Hercules"} }; @@ -111,10 +112,10 @@ : [r0]"r"(r1), [r1]"r"(r1), [sysib]"a"(sysib) : "r0", "r1", "cc"); - return cc; + return (cc); nostsi: - return 3; + return (3); } /* @@ -149,15 +150,15 @@ mc = *model++; if (mc == '\0') { if (pc == '\0') - return 0; + return (0); else - return 1; + return (1); } if ((pc != mc) && (pc != 'n')) - return 1; + return (1); } - return 0; + return (0); } void ==== //depot/projects/s390/sys/s390/s390/machdep.c#11 (text+ko) ==== @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include @@ -260,8 +259,6 @@ struct proc *p; int oonstack; - CTR3(KTR_SIG, "sendsig: td = %p, sig = %d, code = %u", curthread, sig, code); - td = curthread; p = td->td_proc; @@ -323,8 +320,6 @@ psw_define_addr(&tf->tf_psw, PS_STRINGS - *(p->p_sysent->sv_szsigcode)); tf->tf_gpr[15] = (u_long)sfp - sizeof(struct stackframe); - CTR2(KTR_SIG, "ps_strings = %p, *sz = %d", PS_STRINGS, *(p->p_sysent->sv_szsigcode)); - PROC_LOCK(p); } @@ -345,8 +340,6 @@ ucontext_t uc; int error; - CTR2(KTR_SIG, "sigreturn: td = %p, uap->sigcntxp = %p", td, uap->sigcntxp); - error = copyin(uap->sigcntxp, &uc, sizeof(uc)); if (error) return (error); @@ -400,9 +393,6 @@ { struct trapframe *tf; - CTR4(KTR_PROC, "setregs: td = %p, entry = %x, stack = %x, ps_strings = %x", - td, entry, stack, ps_strings); - tf = td->td_frame; bzero(tf, sizeof(*tf)); psw_define(&tf->tf_psw, PSW_USER, entry); @@ -415,7 +405,7 @@ u_long x; int argc; - CTR0(KTR_PROC, "setregs: stack not aligned properly"); + printf("%s: stack is not aligned properly\n", __func__); ostack = (caddr_t)stack; stack &= ~7ul; ==== //depot/projects/s390/sys/s390/s390/mp_machdep.c#3 (text+ko) ==== @@ -28,8 +28,8 @@ static u_int cpu2cpuid[MAXCPU]; /* - * There are no machines with more than 16 simultaneously - * online CPUs at the time (July 2002). + * There are no machines with more than 32 simultaneously + * online CPUs at the time (last revised: September 2003). */ static int mp_overflow; ==== //depot/projects/s390/sys/s390/s390/pmap.c#16 (text+ko) ==== @@ -55,14 +55,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -297,8 +295,6 @@ else pte = (vm_offset_t)&invalid_pte; - CTR3(KTR_PMAP, "pmap_ptepa: pmap = %p, va = %x, pte = %x", pmap, va, pte); - return (pte); } @@ -368,26 +364,20 @@ static int pmap_unwire_pte_hold(pmap_t pmap, vm_page_t mpte) { - CTR2(KTR_PMAP, "pmap_unwire_pte_hold: pmap = %p, mpte = %x", pmap, mpte); - vm_page_unhold(mpte); if (mpte->hold_count) - return 0; + return (0); while (vm_page_sleep_if_busy(mpte , FALSE, "pmuph")) vm_page_lock_queues(); if (mpte->hold_count == 0) { - CTR0(KTR_PMAP, "\tmpte_hold_count == 0"); - pmap_clear_ste_quad(&pmap->pm_sto[mpte->pindex << 2]); pmap->pm_stats.resident_count--; /* Free the page if it is finally unwired. */ if (--mpte->wire_count == 0) { - CTR0(KTR_PMAP, "\t\tmpte->wire_count == 0"); - vm_page_busy(mpte); vm_page_free(mpte); cnt.v_wire_count--; @@ -400,8 +390,6 @@ static int pmap_unuse_ptp(pmap_t pmap, vm_offset_t va, vm_page_t mpte) { - CTR3(KTR_PMAP, "pmap_unuse_ptp: pmap = %p, va = %x, mpte = %x", pmap, va, mpte); - if (pmap == kernel_pmap) return (0); @@ -422,16 +410,12 @@ pv_entry_t pv; int rv = 0; - CTR3(KTR_PMAP, "pmap_remove_entry: pmap = %p, va = %x, pa = %x", pmap, va, VM_PAGE_TO_PHYS(m)); - if (m->md.pv_list_count < pmap->pm_stats.resident_count) { - CTR0(KTR_PMAP, "\tpv_list_count < resident_count"); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { if (pmap == pv->pv_pmap && va == pv->pv_va) break; } } else { - CTR0(KTR_PMAP, "\tpv_list_count > resident_count"); TAILQ_FOREACH(pv, &pmap->pm_pvlist, pv_plist) { if (va == pv->pv_va) break; @@ -455,8 +439,6 @@ { pv_entry_t pv; - CTR4(KTR_PMAP, "pmap_insert_entry: pmap = %p, va = %x, pa = %x, mpte = %x", pmap, va, VM_PAGE_TO_PHYS(m), mpte); - pv = pv_get(); pv->pv_va = va; pv->pv_pmap = pmap; @@ -477,8 +459,6 @@ pmap_t pmap; pte_t pte; - CTR1(KTR_PMAP, "pmap_remove_all: pa = %x", VM_PAGE_TO_PHYS(m)); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { pmap = pv->pv_pmap; @@ -514,8 +494,6 @@ vm_page_t mpte; int i; - CTR2(KTR_PMAP, "pmap_create_pte: pmap = %p, ptindex = %u", pmap, ptindex); - VM_OBJECT_LOCK(pmap->pm_pteobj); mpte = vm_page_grab(pmap->pm_pteobj, (ptindex >> 2), VM_ALLOC_RETRY | VM_ALLOC_WIRED); @@ -551,10 +529,7 @@ vm_page_t mpte; ste_t ste; - CTR2(KTR_PMAP, "pmap_get_pte: pmap = %p, va = %x", pmap, va); - ste = pmap->pm_sto[ptindex]; - CTR1(KTR_PMAP, "\tste = %x", ste); if (ste_valid(ste)) { mpte = PHYS_TO_VM_PAGE(ste); KASSERT(mpte != NULL, ("pmap_get_pte: mpte == NULL")); @@ -569,11 +544,9 @@ static int pmap_remove_pte(pmap_t pmap, vm_paddr_t ptepa, vm_offset_t va) { - vm_page_t m; + vm_page_t m, mpte; pte_t pte; - CTR3(KTR_PMAP, "pmap_remove_pte: pmap = %p, ptepa = %x, va = %x", pmap, ptepa, va); - ipte(ptepa); pte = lura(ptepa); @@ -582,8 +555,6 @@ pmap->pm_stats.resident_count--; if (pte & PTE_MANAGED) { - CTR0(KTR_PMAP, "\tpage managed"); - m = PHYS_TO_VM_PAGE(pte); if (pmap_is_modified(m) && pmap_track_modified(va)) vm_page_dirty(m); @@ -592,10 +563,9 @@ return pmap_remove_entry(pmap, m, va); } else { - return pmap_unuse_ptp(pmap, va, NULL); + mpte = PHYS_TO_VM_PAGE(ptepa); + return pmap_unuse_ptp(pmap, va, mpte); } - - return (0); } static void * @@ -613,8 +583,6 @@ pmap_t pmap; u_long cr7; - CTR1(KTR_PMAP, "pmap_activate: td = %p", td); - pmap = vmspace_pmap(td->td_proc->p_vmspace); pmap->pm_active |= PCPU_GET(cpumask); stopa = vtophys(pmap->pm_sto); @@ -626,8 +594,6 @@ vm_offset_t pmap_addr_hint(vm_object_t object, vm_offset_t va, vm_size_t size) { - CTR3(KTR_PMAP, "pmap_addr_hint: object = %p, va = %x, size = %u", object, va, size); - return (va); } @@ -637,8 +603,6 @@ vm_offset_t ptepa; pte_t pte; - CTR3(KTR_PMAP, "pmap_change_wiring: pmap = %p, va = %x, wired = %d", pmap, va, wired); - ptepa = pmap_ptepa(pmap, va); pte = lura(ptepa); if (wired) { @@ -658,8 +622,6 @@ { vm_paddr_t pa = VM_PAGE_TO_PHYS(m); - CTR1(KTR_PMAP, "pmap_clear_modify: pa = %x", pa); - sk_set(pa, sk_get(pa) & ~SK_C); } @@ -668,8 +630,6 @@ { vm_paddr_t pa = VM_PAGE_TO_PHYS(m); - CTR1(KTR_PMAP, "pmap_clear_reference: pa = %x", pa); - __asm volatile ( " rrbe %%r0, %[pa]" :: [pa]"r"(pa) : "r0", "cc"); @@ -679,9 +639,6 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, vm_offset_t src_addr) { - CTR5(KTR_PMAP, "pmap_copy: dst_pmap = %p, src_pmap = %p, va = %x, len = %u, src_addr = %x", - dst_pmap, src_pmap, dst_addr, len, src_addr); - /* Optional for perfomance */ } @@ -691,8 +648,6 @@ vm_paddr_t srcpa = VM_PAGE_TO_PHYS(src); vm_paddr_t dstpa = VM_PAGE_TO_PHYS(dst); - CTR2(KTR_PMAP, "pmap_copy_page: srcpa = %x, dstpa = %x", srcpa, dstpa); - KASSERT(lura(csrc_ptepa) & PTE_INVALID, ("pmap_copy_page: csrc_ptepa busy")); KASSERT(lura(cdst_ptepa) & PTE_INVALID, @@ -715,9 +670,6 @@ pte_t opte, pte; vm_page_t mpte; - CTR5(KTR_PMAP, "pmap_enter: pmap=%p, va = %x, pa = %x, prot = %x, wired = %d", - pmap, va, VM_PAGE_TO_PHYS(m), prot, wired); - KASSERT(va < VM_MAX_ADDRESS, ("pmap_enter: va is too big")); @@ -737,8 +689,6 @@ /* If this is protection or wiring change. */ if (((opte & PTE_INVALID) == 0) && (pte == opa)) { - CTR0(KTR_PMAP, "\tprotection or wiring change"); - if (wired && !pte_wired(opte)) pmap->pm_stats.wired_count++; else if (!wired && pte_wired(opte)) @@ -775,8 +725,6 @@ if ((opte & PTE_INVALID) == 0) { int error; - CTR0(KTR_PMAP, "\told pte valid"); - vm_page_lock_queues(); error = pmap_remove_pte(pmap, ptepa, va); vm_page_unlock_queues(); @@ -786,8 +734,6 @@ /* Enter on the pv list if part of our managed memory. */ if (pmap_initialized && ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0)) { - CTR0(KTR_PMAP, "\tentering on the pv list"); - pmap_insert_entry(pmap, va, mpte, m); pte |= PTE_MANAGED; } @@ -873,7 +819,7 @@ } vm_page_t -pmap_extract_and_hold(pmap_t pmap, vm_offset_t va) +pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) { vm_paddr_t pa; vm_page_t m; @@ -896,7 +842,6 @@ pmap_growkernel(vm_offset_t va) { kernel_vm_end = 4*nkptp*SEGMENT_SIZE; - CTR2(KTR_PMAP, "pmap_growkernel: va = %x, kernel_vm_end = %x", va, kernel_vm_end); } void @@ -904,8 +849,6 @@ { int i; - CTR2(KTR_PMAP, "pmap_init: spa = %x, epa = %x", spa, epa); - /* Allocate memory for random pmap structures. */ for (i = 0; i < vm_page_array_size; i++) { vm_page_t m; @@ -930,8 +873,6 @@ { int shpgperproc = PMAP_SHPGPERPROC; - CTR0(KTR_PMAP, "pmap_init2: "); - TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); pv_entry_max = shpgperproc * maxproc + vm_page_array_size; TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max); @@ -944,8 +885,6 @@ { vm_paddr_t pa = VM_PAGE_TO_PHYS(m); - CTR1(KTR_PMAP, "pmap_is_modified: pa = %x", pa); - if (!pmap_initialized || (m->flags & PG_FICTITIOUS)) return FALSE; @@ -957,8 +896,6 @@ { vm_paddr_t ptepa; - CTR2(KTR_PMAP, "pmap_kenter: va = %x, pa = %x", va, pa); - ptepa = pmap_ptepa(kernel_pmap, va); ipte(ptepa); stura(ptepa, pa); @@ -978,8 +915,6 @@ void pmap_kremove(vm_offset_t va) { - CTR1(KTR_PMAP, "pmap_kremove: va = %x", va); - ipte(pmap_ptepa(kernel_pmap, va)); } @@ -988,8 +923,6 @@ { vm_offset_t va, sva; - CTR4(KTR_PMAP, "pmap_map: vap = %p, spa = %x, epa = %x, prot = %d", vap, spa, epa, prot); - va = sva = *vap; for (; spa < epa; va += PAGE_SIZE, spa += PAGE_SIZE) pmap_kenter(va, spa); @@ -1005,8 +938,6 @@ pte_t pte; int rv; - CTR2(KTR_PMAP, "pmap_mincore: pmap = %p, va = %x", pmap, va); - pte = lura(pmap_ptepa(pmap, va)); if (!pte_valid(pte)) return (0); @@ -1042,8 +973,6 @@ pv_entry_t pv; int loops = 0; - CTR2(KTR_PMAP, "pmap_page_exists_quick: pmap = %p, pa = %x", pmap, VM_PAGE_TO_PHYS(m)); - if (m->flags & PG_FICTITIOUS) return FALSE; @@ -1063,7 +992,6 @@ vm_offset_t pa = VM_PAGE_TO_PHYS(m); panic("GGGG: %s", __func__); - CTR2(KTR_PMAP, "pmap_page_protect: pa = %x, prot = %d", pa, prot); KASSERT((prot == VM_PROT_READ) || (prot == VM_PROT_NONE), ("pmap_page_protect: unexpected prot")); @@ -1080,11 +1008,10 @@ void pmap_pinit(pmap_t pmap) { + static int color; vm_page_t stpg; int i; - CTR1(KTR_PMAP, "pmap_pinit: pmap = %p", pmap); - if (pmap->pm_sto == NULL) pmap->pm_sto = (ste_t *) kmem_alloc_pageable(kernel_map, PAGE_SIZE); @@ -1092,15 +1019,19 @@ if (pmap->pm_pteobj == NULL) pmap->pm_pteobj = vm_object_allocate(OBJT_DEFAULT, NPTP + 1); - VM_OBJECT_LOCK(pmap->pm_pteobj); - stpg = vm_page_grab(pmap->pm_pteobj, NPTP, - VM_ALLOC_NORMAL | VM_ALLOC_RETRY | - VM_ALLOC_WIRED); - vm_page_lock_queues(); - vm_page_flag_clear(stpg, PG_BUSY); - stpg->valid = VM_PAGE_BITS_ALL; - vm_page_unlock_queues(); - VM_OBJECT_UNLOCK(pmap->pm_pteobj); + for (;;) { + stpg = vm_page_alloc(NULL, color++, + VM_ALLOC_NORMAL | VM_ALLOC_WIRED | + VM_ALLOC_NOOBJ); + if (stpg == NULL) { + VM_WAIT; + } else { + vm_page_lock_queues(); + vm_page_flag_clear(stpg, PG_BUSY); + stpg->valid = VM_PAGE_BITS_ALL; + vm_page_unlock_queues(); + } + } pmap_kenter((vm_offset_t)pmap->pm_sto, VM_PAGE_TO_PHYS(stpg)); for (i = 0; i < 4*NPTP; i++) @@ -1114,8 +1045,6 @@ void pmap_pinit0(pmap_t pmap) { - CTR1(KTR_PMAP, "pmap_pinit0: pmap = %p", pmap); - pmap->pm_sto = proc0sto; pmap->pm_active = 0; TAILQ_INIT(&pmap->pm_pvlist); @@ -1131,7 +1060,6 @@ void pmap_prefault(pmap_t pmap, vm_offset_t va, vm_map_entry_t entry) { - CTR3(KTR_PMAP, "pmap_prefault: pmap = %p, va = %x, entry = %p", pmap, va, entry); /* optional */ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Sep 25 06:35:55 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 04C2F16A4C4; Thu, 25 Sep 2003 06:35:55 -0700 (PDT) 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 CF25216A4C0 for ; Thu, 25 Sep 2003 06:35:54 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F1AA4402F for ; Thu, 25 Sep 2003 06:35:54 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8PDZrXJ096662 for ; Thu, 25 Sep 2003 06:35:53 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8PDZqhp096659 for perforce@freebsd.org; Thu, 25 Sep 2003 06:35:53 -0700 (PDT) (envelope-from cvance@nailabs.com) Date: Thu, 25 Sep 2003 06:35:53 -0700 (PDT) Message-Id: <200309251335.h8PDZqhp096659@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@nailabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 38572 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2003 13:35:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=38572 Change 38572 by cvance@cvance_korben on 2003/09/25 06:35:22 Clean up references to flask.h Affected files ... .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/avc/avc_ss.h#4 edit .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/avc/flask.h#2 delete .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/flask/Makefile#3 edit .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/security.h#4 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/avc/avc_ss.h#4 (text+ko) ==== @@ -8,7 +8,7 @@ #include #include -#include +#include int avc_ss_grant(security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t perms, u32 seqno); ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/flask/Makefile#3 (text+ko) ==== @@ -7,18 +7,19 @@ FLASK_H_DEPEND = security_classes initial_sids AV_H_DEPEND = access_vectors -FLASK_H_FILES = av_inherit.h av_perm_to_string.h av_permissions.h class_to_string.h common_perm_to_string.h flask.h initial_sid_to_string.h +FLASK_H_FILES = av_inherit.h av_perm_to_string.h av_permissions.h class_to_string.h common_perm_to_string.h initial_sid_to_string.h all: flask.h av_permissions.h flask.h: $(FLASK_H_DEPEND) - ./mkflask.sh $(AWK) $(FLASK_H_DEPEND) + /bin/sh ./mkflask.sh $(AWK) $(FLASK_H_DEPEND) av_permissions.h: $(AV_H_DEPEND) - ./mkaccess_vector.sh $(AWK) $(AV_H_DEPEND) + /bin/sh ./mkaccess_vector.sh $(AWK) $(AV_H_DEPEND) install: flask.h av_permissions.h install -C -m0644 $(FLASK_H_FILES) ../avc + install -C -m0644 flask.h .. clean: rm -f $(FLASK_H_FILES) ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/security.h#4 (text+ko) ==== @@ -7,7 +7,7 @@ #define _SELINUX_SECURITY_H_ #include -#include +#include #include #define SECSID_NULL 0x00000000 /* unspecified SID */ From owner-p4-projects@FreeBSD.ORG Thu Sep 25 06:37:58 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 461CF16A4C0; Thu, 25 Sep 2003 06:37:58 -0700 (PDT) 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 2025F16A4B3 for ; Thu, 25 Sep 2003 06:37:58 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95DA144001 for ; Thu, 25 Sep 2003 06:37:57 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8PDbvXJ096775 for ; Thu, 25 Sep 2003 06:37:57 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8PDbuvh096772 for perforce@freebsd.org; Thu, 25 Sep 2003 06:37:56 -0700 (PDT) (envelope-from areisse@nailabs.com) Date: Thu, 25 Sep 2003 06:37:56 -0700 (PDT) Message-Id: <200309251337.h8PDbuvh096772@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 38573 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2003 13:37:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=38573 Change 38573 by areisse@areisse_tislabs on 2003/09/25 06:37:02 fix auditing of capabilities Affected files ... .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/avc/avc.c#5 edit .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/avc/avc.h#5 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/avc/avc.c#5 (text+ko) ==== @@ -97,8 +97,8 @@ void avc_dump_av(security_class_t tclass, access_vector_t av) { char **common_pts = 0; - access_vector_t common_base = 0; - int i, i2, perm; + access_vector_t common_base = 0, perm; + int i, i2; if (av == 0) { printk(" null"); @@ -561,7 +561,13 @@ printk(" key=%d", a->u.ipc_id); break; case AVC_AUDIT_DATA_CAP: - printk(" capability=%s", capv_to_text (a->u.cap)); + { + const char *capt = capv_to_text (a->u.cap); + if (capt[7] == '!') + printk (" capability=<%lld>", a->u.cap); + else + printk(" capability=%s", capv_to_text (a->u.cap)); + } break; case AVC_AUDIT_DATA_FS: if (a->u.fs.vp) { ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/avc/avc.h#5 (text+ko) ==== @@ -14,6 +14,8 @@ #include #endif /* _KERNEL */ +#include + #include #include #include @@ -63,7 +65,7 @@ u16 port; u32 daddr; } net; - int cap; + cap_value_t cap; int ipc_id; } u; }; From owner-p4-projects@FreeBSD.ORG Thu Sep 25 07:17:57 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EE5B116A4C0; Thu, 25 Sep 2003 07:17:56 -0700 (PDT) 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 C412916A4B3 for ; Thu, 25 Sep 2003 07:17:56 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5461444061 for ; Thu, 25 Sep 2003 07:16:50 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8PEGnXJ099311 for ; Thu, 25 Sep 2003 07:16:50 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8PEGkTb099308 for perforce@freebsd.org; Thu, 25 Sep 2003 07:16:46 -0700 (PDT) (envelope-from areisse@nailabs.com) Date: Thu, 25 Sep 2003 07:16:46 -0700 (PDT) Message-Id: <200309251416.h8PEGkTb099308@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 38576 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2003 14:17:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=38576 Change 38576 by areisse@areisse_tislabs on 2003/09/25 07:15:54 Updates to selinux policy. Files should be labelled correctly. ssh and login should work in enforcing mode. Affected files ... .. //depot/projects/trustedbsd/sebsd_policy/policy/Makefile#3 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/atrun.te#1 add .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/checkpolicy.te#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/cleanvar.te#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/dhcpc.te#1 add .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/getty.te#3 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/lpd.te#1 add .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/lpr.te#1 add .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/mta.te#1 add .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/rpcd.te#1 add .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/sendmail.te#1 add .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/ssh.te#3 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/unused/rpcd.te#3 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/atrun.fc#1 add .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/checkpolicy.fc#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/crond.fc#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/dhcpc.fc#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/fsadm.fc#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/getty.fc#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/login.fc#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/mount.fc#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/ping.fc#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/save-entropy.fc#1 add .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/ssh.fc#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/su.fc#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/usbd.fc#1 add .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/types.fc#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/fs_use#3 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/macros/global_macros.te#3 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/macros/program/ssh_macros.te#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/macros/user_macros.te#2 edit Differences ... ==== //depot/projects/trustedbsd/sebsd_policy/policy/Makefile#3 (text+ko) ==== @@ -26,12 +26,14 @@ M4 = $(REALDESTDIR)/usr/bin/m4 -Imacros -s #POLICYVER := policy.$(shell $(CHECKPOLICY) -V) -POLICYVER := policy.13 +POLICYVER := policy.16 INSTALLDIR = $(DESTDIR)/etc/security/sebsd LOADPATH = $(INSTALLDIR)/$(POLICYVER) SRCINSTALLDIR = $(INSTALLDIR)/src POLICYCONF = $(SRCINSTALLDIR)/policy.conf +MULTILABELMOUNTS := $(shell /sbin/mount -t ufs -p | /usr/bin/awk '{if (match($$4, "multilabel")) {print $$2}}') + POLICYFILES = $(addprefix $(FLASKDIR),security_classes initial_sids access_vectors) ifeq ($(MLS),y) POLICYFILES += mls @@ -72,7 +74,7 @@ $(POLICYCONF): policy.conf mkdir -p $(SRCINSTALLDIR) - install -m 644 -o root -g root policy.conf $@ + install -m 644 -o root -g wheel policy.conf $@ reload tmp/load: $(LOADPATH) $(LOADPOLICY) $(LOADPATH) @@ -121,10 +123,10 @@ cat domains/*.te domains/misc/*.te domains/program/*.te > $@ relabel: $(FC) $(SETFILES) - $(SETFILES) $(FC) `mount | awk '/ext[23]/{print $$3}'` + $(SETFILES) $(FC) $(MULTILABELMOUNTS) reset: $(FC) $(SETFILES) - $(SETFILES) -R $(FC) `mount | awk '/ext[23]/{print $$3}'` + $(SETFILES) -R $(FC) $(MULTILABELMOUNTS) $(FC): $(FCFILES) file_contexts/program cat $(FCFILES) > $@ ==== //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/checkpolicy.te#2 (text+ko) ==== @@ -57,4 +57,5 @@ can_exec(user_t, checkpolicy_exec_t) allow checkpolicy_t privfd:fd use; +allow checkpolicy_t checkpolicy_t:fd { use create }; ==== //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/cleanvar.te#2 (text+ko) ==== @@ -18,5 +18,6 @@ allow cleanvar_t { pidfile var_spool_t }:file { getattr unlink }; allow cleanvar_t { var_t etc_t bin_t sbin_t root_t } :dir r_dir_perms; +allow cleanvar_t self:capability dac_override; can_exec(cleanvar_t, bin_t) general_domain_access(cleanvar_t) #!!! ==== //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/getty.te#3 (text+ko) ==== ==== //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/ssh.te#3 (text+ko) ==== @@ -13,7 +13,7 @@ uses_shlib($1) allow $1 self:unix_dgram_socket create_socket_perms; allow $1 self:unix_stream_socket create_stream_socket_perms; -allow $1 self:fifo_file rw_file_perms; +allow $1 self:fifo_file { poll rw_file_perms }; allow $1 self:process { fork sigchld setsched }; allow $1 self:fd *; @@ -172,6 +172,11 @@ allow sshd_login_t sshd_devpts_t:chr_file { relabelfrom relabelto }; allow sshd_login_t userpty_type:chr_file { getattr relabelfrom relabelto }; +# open old-style ptys +allow sshd_login_t devpts_t:chr_file { read write relabelfrom relabelto getattr setattr }; + +allow sshd_login_t self:capability { linux_immutable sys_resource }; + read_locale(sshd_t) # Allow checking users mail at login ==== //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/unused/rpcd.te#3 (text+ko) ==== ==== //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/checkpolicy.fc#2 (text+ko) ==== @@ -1,2 +1,3 @@ # checkpolicy /usr/bin/checkpolicy system_u:object_r:checkpolicy_exec_t +/sbin/sebsd_checkpolicy system_u:object_r:checkpolicy_exec_t ==== //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/crond.fc#2 (text+ko) ==== @@ -19,3 +19,7 @@ /var/spool/fcron/systab system_u:object_r:sysadm_cron_spool_t /var/run/fcron\.fifo system_u:object_r:crond_var_run_t /var/run/fcron\.pid system_u:object_r:crond_var_run_t +# FreeBSD +/var/cron system_u:object_r:cron_spool_t +/var/cron/tabs/.* system_u:object_r:user_cron_spool_t +/var/cron/tabs/root system_u:object_r:sysadm_cron_spool_t ==== //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/dhcpc.fc#2 (text+ko) ==== @@ -7,5 +7,6 @@ /var/lib/dhcp(3)? system_u:object_r:dhcp_state_t /var/lib/dhcp(3)?/dhclient.* system_u:object_r:dhcpc_state_t /var/run/dhclient.*\.pid system_u:object_r:dhcpc_var_run_t +/var/db/dhclient.leases system_u:object_r:dhcpc_state_t # pump /sbin/pump system_u:object_r:dhcpc_exec_t ==== //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/fsadm.fc#2 (text+ko) ==== @@ -17,7 +17,7 @@ /sbin/parted system_u:object_r:fsadm_exec_t /sbin/tune2fs system_u:object_r:fsadm_exec_t /sbin/dumpe2fs system_u:object_r:fsadm_exec_t -/sbin/swapon system_u:object_r:fsadm_exec_t +/sbin/swap(on|off|ctl) system_u:object_r:fsadm_exec_t /sbin/hdparm system_u:object_r:fsadm_exec_t /sbin/raidstart system_u:object_r:fsadm_exec_t /sbin/mkraid system_u:object_r:fsadm_exec_t @@ -28,3 +28,9 @@ /usr/sbin/smart(d|ctl) system_u:object_r:fsadm_exec_t /sbin/lvmiopversion system_u:object_r:fsadm_exec_t /sbin/install-mbr system_u:object_r:fsadm_exec_t + +# FreeBSD +/sbin/bsdlabel system_u:object_r:fsadm_exec_t +/sbin/disklabel system_u:object_r:fsadm_exec_t +/sbin/dumpon system_u:object_r:fsadm_exec_t +/sbin/newfs system_u:object_r:fsadm_exec_t ==== //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/getty.fc#2 (text+ko) ==== @@ -1,3 +1,4 @@ # getty /sbin/.*getty system_u:object_r:getty_exec_t /etc/mgetty(/.*)? system_u:object_r:etc_getty_t +/usr/libexec/getty system_u:object_r:getty_exec_t ==== //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/login.fc#2 (text+ko) ==== @@ -1,2 +1,3 @@ # login /bin/login system_u:object_r:login_exec_t +/usr/bin/login system_u:object_r:login_exec_t ==== //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/mount.fc#2 (text+ko) ==== @@ -1,3 +1,6 @@ # mount /bin/mount system_u:object_r:mount_exec_t +/sbin/mdmfs system_u:object_r:mount_exec_t +/sbin/mount_.* system_u:object_r:mount_exec_t +/sbin/umount system_u:object_r:mount_exec_t /bin/umount system_u:object_r:mount_exec_t ==== //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/ping.fc#2 (text+ko) ==== @@ -1,3 +1,4 @@ # ping /bin/ping.* system_u:object_r:ping_exec_t /usr/sbin/hping2 system_u:object_r:ping_exec_t +/sbin/ping system_u:object_r:ping_exec_t ==== //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/ssh.fc#2 (text+ko) ==== @@ -1,6 +1,8 @@ # ssh /usr/bin/ssh system_u:object_r:ssh_exec_t +/usr/bin/slogin system_u:object_r:ssh_exec_t # sshd +/etc/ssh/moduli system_u:object_r:sshd_key_t /etc/ssh/primes system_u:object_r:sshd_key_t /etc/ssh/ssh_host_key system_u:object_r:sshd_key_t /etc/ssh/ssh_host_dsa_key system_u:object_r:sshd_key_t ==== //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/su.fc#2 (text+ko) ==== @@ -1,2 +1,3 @@ # su /bin/su system_u:object_r:su_exec_t +/usr/bin/su system_u:object_r:su_exec_t ==== //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/types.fc#2 (text+ko) ==== @@ -58,6 +58,8 @@ /var/tmp(/.*)? system_u:object_r:tmp_t # /var/tmp/vi\.recover system_u:object_r:tmp_t +/var/empty system_u:object_r:etc_t +/var/db/mounttab system_u:object_r:etc_runtime_t # # /var/ftp @@ -81,17 +83,21 @@ /home system_u:object_r:home_root_t /home/[^/]+ -d system_u:object_r:user_home_dir_t /home/[^/]+/.+ system_u:object_r:user_home_t +/usr/home system_u:object_r:home_root_t +/home/[^/]+ -d system_u:object_r:user_home_dir_t +/home/[^/]+/.+ system_u:object_r:user_home_t # # Other staff home directories, replace "jadmin" with appropriate name # -/home/jadmin/(/.*)? system_u:object_r:staff_home_t -/home/jadmin system_u:object_r:staff_home_dir_t +#/home/jadmin/(/.*)? system_u:object_r:staff_home_t +#/home/jadmin system_u:object_r:staff_home_dir_t # # /bin # /bin(/.*)? system_u:object_r:bin_t +/bin/sh -- system_u:object_r:shell_exec_t /bin/tcsh -- system_u:object_r:shell_exec_t /bin/bash -- system_u:object_r:shell_exec_t /bin/bash2 -- system_u:object_r:shell_exec_t @@ -122,14 +128,7 @@ /dev/[^/]*tty[^/]* system_u:object_r:tty_device_t /dev/vcs[^/]* system_u:object_r:tty_device_t /dev/tty system_u:object_r:devtty_t -/dev/[shmr]d[^/]* system_u:object_r:fixed_disk_device_t -/dev/ubd[^/]* system_u:object_r:fixed_disk_device_t -/dev/cciss/[^/]* system_u:object_r:fixed_disk_device_t -/dev/ida/[^/]* system_u:object_r:fixed_disk_device_t -/dev/dasd[^/]* system_u:object_r:fixed_disk_device_t -/dev/flash[^/]* system_u:object_r:fixed_disk_device_t -/dev/nb[^/]+ system_u:object_r:fixed_disk_device_t -/dev/ataraid/.* system_u:object_r:fixed_disk_device_t +/dev/ad[^/]* system_u:object_r:fixed_disk_device_t /dev/loop.* system_u:object_r:fixed_disk_device_t /dev/ram.* system_u:object_r:fixed_disk_device_t /dev/s(cd|r)[^/]* system_u:object_r:removable_device_t @@ -137,14 +136,8 @@ /dev/rtc system_u:object_r:clock_device_t /dev/psaux system_u:object_r:mouse_device_t /dev/.*mouse.* -c system_u:object_r:mouse_device_t -/dev/input/.*mouse.* system_u:object_r:mouse_device_t -/dev/input/mice system_u:object_r:mouse_device_t /dev/ptmx system_u:object_r:ptmx_t /dev/sequencer system_u:object_r:misc_device_t -/dev/fb[0-9]* system_u:object_r:framebuf_device_t -/dev/apm_bios system_u:object_r:apm_bios_t -/dev/cpu/mtrr system_u:object_r:mtrr_device_t -/dev/(radio|video|vbi|vtx).* -c system_u:object_r:v4l_device_t /proc(/.*)? <> @@ -154,24 +147,30 @@ /etc(/.*)? system_u:object_r:etc_t /etc/shadow.* system_u:object_r:shadow_t /etc/gshadow.* system_u:object_r:shadow_t +/etc/master.passwd system_u:object_r:shadow_t /etc/\.pwd\.lock system_u:object_r:shadow_t /etc/fstab\.REVOKE system_u:object_r:etc_runtime_t /etc/HOSTNAME system_u:object_r:etc_runtime_t /etc/ioctl\.save system_u:object_r:etc_runtime_t /etc/mtab -- system_u:object_r:etc_runtime_t +/var/db/mounttab system_u:object_r:etc_runtime_t /etc/motd system_u:object_r:etc_runtime_t /etc/issue system_u:object_r:etc_runtime_t /etc/issue\.net system_u:object_r:etc_runtime_t -/etc/sysconfig/hwconf system_u:object_r:etc_runtime_t -/etc/asound\.state system_u:object_r:etc_runtime_t /etc/ld\.so\.cache system_u:object_r:ld_so_cache_t /etc/ld\.so\.preload system_u:object_r:ld_so_cache_t /etc/resolv\.conf.* system_u:object_r:resolv_conf_t -/etc/selinux(/.*)? system_u:object_r:policy_src_t -/etc/security/selinux(/.*)? system_u:object_r:policy_config_t -/etc/security/selinux/src(/.*)? system_u:object_r:policy_src_t +/etc/security/sebsd(/.*)? system_u:object_r:policy_config_t +/etc/security/sebsd/src(/.*)? system_u:object_r:policy_src_t /etc/security/default_context.* system_u:object_r:default_context_t /etc/services system_u:object_r:etc_t +/etc/namedb(/.*)? system_u:object_r:named_zone_t +/etc/namedb/named.conf system_u:object_r:named_conf_t +/etc/rc.d/cleanvar system_u:object_r:cleanvar_exec_t +/etc/rc.d/dhclient system_u:object_r:initrc_exec_t +/etc/rc.d/sshd system_u:object_r:initrc_exec_t +/etc/rc.shutdown system_u:object_r:initrc_exec_t +/etc/rc system_u:object_r:initrc_exec_t # # /lib @@ -224,35 +223,16 @@ /usr/lib/autofs/.*\.so system_u:object_r:shlib_t /usr/lib/perl5/man(/.*)? system_u:object_r:man_t /usr/lib/perl.*\.so system_u:object_r:shlib_t -/usr/lib/selinux(/.*)? system_u:object_r:policy_src_t /usr/lib/emacsen-common/.* system_u:object_r:bin_t /usr/lib/.*/bin(/.*)? system_u:object_r:bin_t /usr/lib/gconv/.*\.so system_u:object_r:shlib_t /usr/share/guile/g-wrapped/.*\.so system_u:object_r:shlib_t /usr/share/selinux(/.*)? system_u:object_r:policy_src_t /usr/games(/.*)? system_u:object_r:bin_t - -# -# /usr/.*glibc.*-linux/lib -# -/usr/.*glibc.*-linux/lib(/.*)? system_u:object_r:lib_t -/usr/.*glibc.*-linux/lib/ld.*\.so.* system_u:object_r:ld_so_t -/usr/.*glibc.*-linux/lib/lib.*\.so.* system_u:object_r:shlib_t +/usr/libexec/ld.*\.so.* system_u:object_r:ld_so_t +/usr/lib/pam_.* system_u:object_r:shlib_t -# /usr/.*redhat-linux/lib # -/usr/.*redhat-linux/lib(/.*)? system_u:object_r:lib_t -/usr/.*redhat-linux/lib/ld.*\.so.* system_u:object_r:ld_so_t -/usr/.*redhat-linux/lib/lib.*\.so.* system_u:object_r:shlib_t - -# -# /usr/.*linux-libc.*/lib -# -/usr/.*linux-libc.*/lib(/.*)? system_u:object_r:lib_t -/usr/.*linux-libc.*/lib/ld.*\.so.* system_u:object_r:ld_so_t -/usr/.*linux-libc.*/lib/lib.*\.so.* system_u:object_r:shlib_t - -# # /usr/local # /usr/local/etc(/.*)? system_u:object_r:etc_t @@ -264,6 +244,7 @@ # /usr/local/bin # /usr/local/bin(/.*)? system_u:object_r:bin_t +/usr/local/bin/bash system_u:object_r:shell_exec_t # # /usr/local/lib @@ -302,18 +283,12 @@ /usr/kerberos/lib/lib.*\.so.* system_u:object_r:shlib_t # -# /usr/local/selinux -# -/usr/local/selinux/bin(/.*)? system_u:object_r:bin_t -/usr/local/selinux/sbin(/.*)? system_u:object_r:bin_t -/usr/local/selinux/lib(/.*)? system_u:object_r:lib_t -/usr/local/selinux/libexec(/.*)? system_u:object_r:lib_t - -# # /var/run # /var/run(/.*)? system_u:object_r:var_run_t /var/run/.*\.*pid <> +/var/run/ld\.so\..* system_u:object_r:ld_so_cache_t +/var/run/ld-elf\.so\..* system_u:object_r:ld_so_cache_t # # /var/spool @@ -333,17 +308,7 @@ /var/log/lastlog system_u:object_r:lastlog_t /var/log/ksymoops(/.*)? system_u:object_r:var_log_ksyms_t /var/log/syslog system_u:object_r:var_log_t - -# -# Persistent label mappings. -# -/\.\.\.security(/.*)? system_u:object_r:file_labels_t -/usr/\.\.\.security(/.*)? system_u:object_r:file_labels_t -/boot/\.\.\.security(/.*)? system_u:object_r:file_labels_t -/home/\.\.\.security(/.*)? system_u:object_r:file_labels_t -/var/\.\.\.security(/.*)? system_u:object_r:file_labels_t -/tmp/\.\.\.security(/.*)? system_u:object_r:file_labels_t -/usr/local/\.\.\.security(/.*)? system_u:object_r:file_labels_t +/var/log/messages system_u:object_r:var_log_t # # Lost and found directories. @@ -364,14 +329,3 @@ /usr/lib/locale/.* system_u:object_r:locale_t /etc/localtime -- system_u:object_r:locale_t /etc/localtime -l system_u:object_r:etc_t - -# -# initrd mount point, only used during boot -# -/initrd system_u:object_r:root_t - -# -# The Sun Java development kit, RPM install -# -/usr/java/j2sdk.*/bin(/.*)? system_u:object_r:bin_t -/usr/java/j2sdk.*/jre/lib/i386(/.*)? system_u:object_r:lib_t ==== //depot/projects/trustedbsd/sebsd_policy/policy/fs_use#3 (text+ko) ==== @@ -2,9 +2,7 @@ # Define the labeling behavior for inodes in particular filesystem types. # This information was formerly hardcoded in the SELinux module. -fs_use_psid ext2; -fs_use_psid ext3; -fs_use_psid ufs; +fs_use_xattr ufs system_u:object_r:fs_t; # Use the allocating task SID to label inodes in the following filesystem # types, and label the filesystem itself with the specified context. ==== //depot/projects/trustedbsd/sebsd_policy/policy/macros/global_macros.te#3 (text+ko) ==== @@ -623,6 +623,10 @@ # allow searching /dev/pts allow $1_t devpts_t:dir { getattr read search }; + +# For systems without /dev/ptmx +allow $1_t devpts_t:chr_file { poll getattr setattr read write }; +type_change $1_t devpts_t:chr_file $1_devpts_t; ') ################################## @@ -642,7 +646,7 @@ type_transition $1_t devpts_t:chr_file $1_devpts_t; # Read and write my pty files. -allow $1_t $1_devpts_t:chr_file { setattr rw_file_perms }; +allow $1_t $1_devpts_t:chr_file { poll setattr rw_file_perms }; ') @@ -658,7 +662,7 @@ type_transition $1_t devpts_t:chr_file $2_devpts_t; # Read and write pty files. -allow $1_t $2_devpts_t:chr_file { setattr rw_file_perms }; +allow $1_t $2_devpts_t:chr_file { setattr poll rw_file_perms }; ') ################################## ==== //depot/projects/trustedbsd/sebsd_policy/policy/macros/program/ssh_macros.te#2 (text+ko) ==== @@ -125,8 +125,8 @@ ') # Write to the user domain tty. -allow $1_ssh_t $1_tty_device_t:chr_file rw_file_perms; -allow $1_ssh_t $1_devpts_t:chr_file rw_file_perms; +allow $1_ssh_t $1_tty_device_t:chr_file { poll rw_file_perms }; +allow $1_ssh_t $1_devpts_t:chr_file { poll rw_file_perms }; # Allow the user shell to signal the ssh program. allow $1_t $1_ssh_t:process signal; ==== //depot/projects/trustedbsd/sebsd_policy/policy/macros/user_macros.te#2 (text+ko) ==== @@ -44,7 +44,7 @@ type $1_tty_device_t, file_type, sysadmfile, ttyfile; # Access ttys. allow $1_t privfd:fd use; -allow $1_t $1_tty_device_t:chr_file { setattr rw_file_perms }; +allow $1_t $1_tty_device_t:chr_file { poll setattr rw_file_perms }; # Use the type when relabeling terminal devices. type_change $1_t tty_device_t:chr_file $1_tty_device_t; ifdef(`dpkg.te', ` From owner-p4-projects@FreeBSD.ORG Thu Sep 25 07:24:13 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D1BFE16A4C1; Thu, 25 Sep 2003 07:24:12 -0700 (PDT) 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 A639C16A4B3; Thu, 25 Sep 2003 07:24:12 -0700 (PDT) Received: from watery.cc.kogakuin.ac.jp (watery.cc.kogakuin.ac.jp [133.80.152.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73D294404B; Thu, 25 Sep 2003 07:24:03 -0700 (PDT) (envelope-from nyan@jp.FreeBSD.org) Received: from localhost (localhost [IPv6:::1])h8PEO1Zn089112; Thu, 25 Sep 2003 23:24:01 +0900 (JST) (envelope-from nyan@jp.FreeBSD.org) Date: Thu, 25 Sep 2003 23:23:35 +0900 (JST) Message-Id: <20030925.232335.71146213.nyan@jp.FreeBSD.org> To: marcel@freebsd.org From: Takahashi Yoshihiro In-Reply-To: <200309250431.h8P4VfYt053911@repoman.freebsd.org> References: <200309250431.h8P4VfYt053911@repoman.freebsd.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: perforce@freebsd.org Subject: Re: PERFORCE change 38558 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2003 14:24:13 -0000 In article <200309250431.h8P4VfYt053911@repoman.freebsd.org> Marcel Moolenaar writes: > http://perforce.freebsd.org/chv.cgi?CH=38558 > > Change 38558 by marcel@marcel_nfs on 2003/09/24 21:31:33 > > Remove last remnants of iobase. > - sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres); > - sc->sc_bas.bst = rman_get_bustag(sc->sc_rres); Please don't remove these lines. The bus_tag and bus_handle must be initialized whenever new resource is allocated by bus_alloc_resource(). --- TAKAHASHI Yoshihiro From owner-p4-projects@FreeBSD.ORG Thu Sep 25 10:38:01 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6225E16A4C0; Thu, 25 Sep 2003 10:38:01 -0700 (PDT) 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 384A716A4B3 for ; Thu, 25 Sep 2003 10:38:01 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A07A143F75 for ; Thu, 25 Sep 2003 10:38:00 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8PHc0XJ016383 for ; Thu, 25 Sep 2003 10:38:00 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8PHbxUm016380 for perforce@freebsd.org; Thu, 25 Sep 2003 10:37:59 -0700 (PDT) (envelope-from areisse@nailabs.com) Date: Thu, 25 Sep 2003 10:37:59 -0700 (PDT) Message-Id: <200309251737.h8PHbxUm016380@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 38583 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2003 17:38:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=38583 Change 38583 by areisse@areisse_tislabs on 2003/09/25 10:37:36 a file was missing Affected files ... .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/cleanvar.fc#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Thu Sep 25 11:18:54 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E3EB516A4C0; Thu, 25 Sep 2003 11:18:53 -0700 (PDT) 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 BEE7616A4B3 for ; Thu, 25 Sep 2003 11:18:53 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55F9E4400E for ; Thu, 25 Sep 2003 11:18:52 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8PIIqXJ018920 for ; Thu, 25 Sep 2003 11:18:52 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8PIIpVJ018917 for perforce@freebsd.org; Thu, 25 Sep 2003 11:18:51 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Thu, 25 Sep 2003 11:18:51 -0700 (PDT) Message-Id: <200309251818.h8PIIpVJ018917@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 38586 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2003 18:18:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=38586 Change 38586 by marcel@marcel_nfs on 2003/09/25 11:18:30 Reinitialize the tag and handle after reallocating the register resource. It is required on pc98 where tags and handles are dynamicly allocated when resources are allocated. Reuse of tags and handles after the resource has been deallocated or freed is invalid. Affected files ... .. //depot/projects/uart/dev/uart/uart_core.c#33 edit Differences ... ==== //depot/projects/uart/dev/uart/uart_core.c#33 (text+ko) ==== @@ -325,6 +325,8 @@ 0, ~0, sc->sc_class->uc_range, RF_ACTIVE); if (sc->sc_rres == NULL) return (ENXIO); + sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres); + sc->sc_bas.bst = rman_get_bustag(sc->sc_rres); sc->sc_irid = 0; sc->sc_ires = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->sc_irid, From owner-p4-projects@FreeBSD.ORG Thu Sep 25 12:20:15 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 286FF16A4C0; Thu, 25 Sep 2003 12:20:15 -0700 (PDT) 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 026EE16A4B3 for ; Thu, 25 Sep 2003 12:20:15 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6632B43FAF for ; Thu, 25 Sep 2003 12:20:14 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8PJKEXJ022963 for ; Thu, 25 Sep 2003 12:20:14 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8PJKDFH022954 for perforce@freebsd.org; Thu, 25 Sep 2003 12:20:13 -0700 (PDT) (envelope-from cvance@nailabs.com) Date: Thu, 25 Sep 2003 12:20:13 -0700 (PDT) Message-Id: <200309251920.h8PJKDFH022954@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@nailabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 38596 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2003 19:20:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=38596 Change 38596 by cvance@cvance_korben on 2003/09/25 12:19:54 Make sure sshd uses UseLogin. SEBSD policy should also prohibit this option from being set to 'no' Affected files ... .. //depot/projects/trustedbsd/sebsd/crypto/openssh/sshd_config#4 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/crypto/openssh/sshd_config#4 (text+ko) ==== @@ -80,7 +80,7 @@ #PrintMotd yes #PrintLastLog yes #KeepAlive yes -#UseLogin no +UseLogin yes #UsePrivilegeSeparation yes #PermitUserEnvironment no #Compression yes From owner-p4-projects@FreeBSD.ORG Thu Sep 25 12:43:46 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D3E1016A4C0; Thu, 25 Sep 2003 12:43:45 -0700 (PDT) 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 AA17016A4B3 for ; Thu, 25 Sep 2003 12:43:45 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A7ED43FE5 for ; Thu, 25 Sep 2003 12:43:45 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8PJhiXJ024013 for ; Thu, 25 Sep 2003 12:43:44 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8PJhiXK024010 for perforce@freebsd.org; Thu, 25 Sep 2003 12:43:44 -0700 (PDT) (envelope-from areisse@nailabs.com) Date: Thu, 25 Sep 2003 12:43:44 -0700 (PDT) Message-Id: <200309251943.h8PJhiXK024010@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 38599 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2003 19:43:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=38599 Change 38599 by areisse@areisse_tislabs on 2003/09/25 12:43:20 sshd can't run shells directly sshd can be restarted sebsd_loadpolicy labelling makefile no longer deletes symlinks Affected files ... .. //depot/projects/trustedbsd/sebsd_policy/policy/Makefile#4 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/load_policy.te#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/ssh.te#4 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/load_policy.fc#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/macros/program/ssh_macros.te#3 edit Differences ... ==== //depot/projects/trustedbsd/sebsd_policy/policy/Makefile#4 (text+ko) ==== @@ -136,7 +136,7 @@ rm -f tmp/* rm -f $(FC) # for the policy regression tester - find "domains/program/" -maxdepth 1 -type l -exec rm {} \; ; \ + #find "domains/program/" -maxdepth 1 -type l -exec rm {} \; ; \ # Policy regression tester. # Written by Colin Walters ==== //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/load_policy.te#2 (text+ko) ==== @@ -50,6 +50,7 @@ allow load_policy_t self:capability dac_override; allow load_policy_t { initrc_t privfd }:fd use; +allow load_policy_t self:fd { create use }; allow load_policy_t fs_t:filesystem getattr; ==== //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/ssh.te#4 (text+ko) ==== @@ -59,11 +59,12 @@ allow $1 { home_root_t user_home_dir_type sysadm_home_dir_t }:dir { search getattr }; # Run shells in user_t by default -domain_auto_trans($1, shell_exec_t, user_t) -domain_trans($1, shell_exec_t, unpriv_userdomain) +# Disabled - must use UseLogin option on FreeBSD +#domain_auto_trans($1, shell_exec_t, user_t) +#domain_trans($1, shell_exec_t, unpriv_userdomain) # Set exec context. -can_setexec($1) +#can_setexec($1) # Allow shells to be run in sysadm_t as well. # Commented out. Use newrole rather than directly entering sysadm_t. @@ -131,6 +132,9 @@ # Execute Login domain_auto_trans(sshd_t, login_exec_t, sshd_login_t) +# Allow restarting self on SIGHUP +can_exec(sshd_t, sshd_exec_t); + # Use capabilities. allow sshd_t self:capability { sys_chroot sys_resource }; @@ -177,6 +181,10 @@ allow sshd_login_t self:capability { linux_immutable sys_resource }; +# run user shells +domain_auto_trans(sshd_login_t, shell_exec_t, user_t) +domain_trans(sshd_login_t, shell_exec_t, unpriv_userdomain) + read_locale(sshd_t) # Allow checking users mail at login ==== //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/load_policy.fc#2 (text+ko) ==== @@ -1,2 +1,2 @@ # load_policy -/usr/sbin/load_policy system_u:object_r:load_policy_exec_t +/usr/sbin/sebsd_loadpolicy system_u:object_r:load_policy_exec_t ==== //depot/projects/trustedbsd/sebsd_policy/policy/macros/program/ssh_macros.te#3 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Thu Sep 25 20:01:55 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 397FF16A4C0; Thu, 25 Sep 2003 20:01:55 -0700 (PDT) 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 128FE16A4B3 for ; Thu, 25 Sep 2003 20:01:55 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CA1343FDF for ; Thu, 25 Sep 2003 20:01:54 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8Q31sXJ059659 for ; Thu, 25 Sep 2003 20:01:54 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8Q31sgY059656 for perforce@freebsd.org; Thu, 25 Sep 2003 20:01:54 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Thu, 25 Sep 2003 20:01:54 -0700 (PDT) Message-Id: <200309260301.h8Q31sgY059656@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 38612 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 03:01:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=38612 Change 38612 by marcel@marcel_nfs on 2003/09/25 20:01:32 Only set the channel for sab82532 and z8530. The ns8250 is not multi-channeled. Affected files ... .. //depot/projects/uart/dev/uart/uart_bus_puc.c#9 edit Differences ... ==== //depot/projects/uart/dev/uart/uart_bus_puc.c#9 (text+ko) ==== @@ -73,19 +73,22 @@ switch (type) { case PUC_PORT_UART_NS8250: sc->sc_class = &uart_ns8250_class; + port = 0; break; case PUC_PORT_UART_SAB82532: sc->sc_class = &uart_sab82532_class; + if (BUS_READ_IVAR(parent, dev, PUC_IVAR_PORT, &port)) + port = 0; break; case PUC_PORT_UART_Z8530: sc->sc_class = &uart_z8530_class; + if (BUS_READ_IVAR(parent, dev, PUC_IVAR_PORT, &port)) + port = 0; break; default: return (ENXIO); } - if (BUS_READ_IVAR(parent, dev, PUC_IVAR_PORT, &port)) - port = 0; if (BUS_READ_IVAR(parent, dev, PUC_IVAR_FREQ, &rclk)) rclk = 0; if (BUS_READ_IVAR(parent, dev, PUC_IVAR_REGSHFT, ®shft)) From owner-p4-projects@FreeBSD.ORG Thu Sep 25 21:20:09 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AF50216A4C0; Thu, 25 Sep 2003 21:20:08 -0700 (PDT) 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 87BAC16A4B3; Thu, 25 Sep 2003 21:20:08 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id A04E64401A; Thu, 25 Sep 2003 21:20:06 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9p1/8.12.9) with ESMTP id h8Q4K5AD014065; Thu, 25 Sep 2003 22:20:05 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 25 Sep 2003 22:20:07 -0600 (MDT) Message-Id: <20030925.222007.131976187.imp@bsdimp.com> To: marcel@freebsd.org From: "M. Warner Losh" In-Reply-To: <200309260301.h8Q31sgY059656@repoman.freebsd.org> References: <200309260301.h8Q31sgY059656@repoman.freebsd.org> X-Mailer: Mew version 2.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: perforce@freebsd.org Subject: Re: PERFORCE change 38612 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 04:20:09 -0000 In message: <200309260301.h8Q31sgY059656@repoman.freebsd.org> Marcel Moolenaar writes: : Only set the channel for sab82532 and z8530. The ns8250 : is not multi-channeled. Neither is the i8251 as far as I can tell. Warner From owner-p4-projects@FreeBSD.ORG Thu Sep 25 22:26:01 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A373D16A4C0; Thu, 25 Sep 2003 22:26:01 -0700 (PDT) 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 7CFAC16A4B3 for ; Thu, 25 Sep 2003 22:26:01 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 242244400B for ; Thu, 25 Sep 2003 22:26:00 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8Q5Q0XJ073827 for ; Thu, 25 Sep 2003 22:26:00 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8Q5Pxxa073822 for perforce@freebsd.org; Thu, 25 Sep 2003 22:25:59 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Thu, 25 Sep 2003 22:25:59 -0700 (PDT) Message-Id: <200309260525.h8Q5Pxxa073822@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 38622 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 05:26:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=38622 Change 38622 by marcel@marcel_nfs on 2003/09/25 22:25:43 IFC @38620 Affected files ... .. //depot/projects/uart/amd64/amd64/pmap.c#17 integrate .. //depot/projects/uart/cam/scsi/scsi_targ_bh.c#2 integrate .. //depot/projects/uart/conf/NOTES#15 integrate .. //depot/projects/uart/dev/acpica/acpi.c#12 integrate .. //depot/projects/uart/dev/aic7xxx/aic79xx_pci.c#3 integrate .. //depot/projects/uart/dev/aic7xxx/aic7xxx_pci.c#4 integrate .. //depot/projects/uart/dev/firewire/fwphyreg.h#1 branch .. //depot/projects/uart/dev/puc/puc.c#11 integrate .. //depot/projects/uart/dev/puc/pucvar.h#9 integrate .. //depot/projects/uart/dev/uart/uart.h#8 integrate .. //depot/projects/uart/dev/uart/uart_bus.h#31 integrate .. //depot/projects/uart/dev/uart/uart_bus_acpi.c#5 integrate .. //depot/projects/uart/dev/uart/uart_bus_ebus.c#7 integrate .. //depot/projects/uart/dev/uart/uart_bus_isa.c#5 integrate .. //depot/projects/uart/dev/uart/uart_bus_pccard.c#4 integrate .. //depot/projects/uart/dev/uart/uart_bus_pci.c#7 integrate .. //depot/projects/uart/dev/uart/uart_bus_puc.c#10 integrate .. //depot/projects/uart/dev/uart/uart_core.c#34 integrate .. //depot/projects/uart/dev/uart/uart_cpu_alpha.c#8 integrate .. //depot/projects/uart/dev/uart/uart_cpu_amd64.c#6 integrate .. //depot/projects/uart/dev/uart/uart_cpu_i386.c#7 integrate .. //depot/projects/uart/dev/uart/uart_cpu_ia64.c#8 integrate .. //depot/projects/uart/dev/uart/uart_cpu_pc98.c#7 integrate .. //depot/projects/uart/dev/uart/uart_cpu_sparc64.c#17 integrate .. //depot/projects/uart/dev/uart/uart_dev_sab82532.c#31 integrate .. //depot/projects/uart/dev/uart/uart_dev_z8530.c#17 integrate .. //depot/projects/uart/netinet/icmp6.h#2 integrate .. //depot/projects/uart/netinet/ip6.h#2 integrate .. //depot/projects/uart/netkey/key.c#2 integrate .. //depot/projects/uart/netkey/key_debug.c#2 integrate .. //depot/projects/uart/netkey/key_debug.h#2 integrate .. //depot/projects/uart/netkey/keysock.c#2 integrate Differences ... ==== //depot/projects/uart/amd64/amd64/pmap.c#17 (text+ko) ==== @@ -73,7 +73,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.437 2003/09/13 21:57:38 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.439 2003/09/26 04:12:41 alc Exp $"); /* * Manages physical address maps. @@ -1012,6 +1012,7 @@ register struct pmap *pmap; { vm_page_t pml4pg; + static vm_pindex_t color; /* * allocate object for the ptes @@ -1022,14 +1023,13 @@ /* * allocate the page directory page */ - VM_OBJECT_LOCK(pmap->pm_pteobj); - pml4pg = vm_page_grab(pmap->pm_pteobj, NUPDE + NUPDPE + NUPML4E, - VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED | VM_ALLOC_ZERO); + while ((pml4pg = vm_page_alloc(NULL, color++, VM_ALLOC_NOOBJ | + VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) + VM_WAIT; vm_page_lock_queues(); vm_page_flag_clear(pml4pg, PG_BUSY); pml4pg->valid = VM_PAGE_BITS_ALL; vm_page_unlock_queues(); - VM_OBJECT_UNLOCK(pmap->pm_pteobj); pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pml4pg)); @@ -1241,14 +1241,8 @@ void pmap_release(pmap_t pmap) { - vm_object_t object; vm_page_t m; - object = pmap->pm_pteobj; - - KASSERT(object->ref_count == 1, - ("pmap_release: pteobj reference count %d != 1", - object->ref_count)); KASSERT(pmap->pm_stats.resident_count == 0, ("pmap_release: pmap resident count %ld != 0", pmap->pm_stats.resident_count)); @@ -1258,15 +1252,14 @@ mtx_unlock_spin(&allpmaps_lock); vm_page_lock_queues(); - while ((m = TAILQ_FIRST(&object->memq)) != NULL) { - m->wire_count--; - atomic_subtract_int(&cnt.v_wire_count, 1); - vm_page_busy(m); - vm_page_free(m); - } - KASSERT(TAILQ_EMPTY(&object->memq), + m = PHYS_TO_VM_PAGE(pmap->pm_pml4[PML4PML4I]); + m->wire_count--; + atomic_subtract_int(&cnt.v_wire_count, 1); + vm_page_busy(m); + vm_page_free(m); + vm_page_unlock_queues(); + KASSERT(TAILQ_EMPTY(&pmap->pm_pteobj->memq), ("pmap_release: leaking page table pages")); - vm_page_unlock_queues(); } static int ==== //depot/projects/uart/cam/scsi/scsi_targ_bh.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_targ_bh.c,v 1.18 2003/06/10 18:14:05 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_targ_bh.c,v 1.19 2003/09/25 05:02:19 simokawa Exp $"); #include #include @@ -167,7 +167,7 @@ xpt_setup_ccb(&csa.ccb_h, path, /*priority*/5); csa.ccb_h.func_code = XPT_SASYNC_CB; - csa.event_enable = AC_PATH_REGISTERED; + csa.event_enable = AC_PATH_REGISTERED | AC_PATH_DEREGISTERED; csa.callback = targbhasync; csa.callback_arg = NULL; xpt_action((union ccb *)&csa); @@ -185,15 +185,26 @@ targbhasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg) { - struct cam_periph *periph; + struct cam_path *new_path; + cam_status status; + + /* + * Allocate a peripheral instance for + * this target instance. + */ + status = xpt_create_path(&new_path, NULL, + xpt_path_path_id(path), + CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); + if (status != CAM_REQ_CMP) { + printf("targbhasync: Unable to create path " + "due to status 0x%x\n", status); + return; + } - periph = (struct cam_periph *)callback_arg; switch (code) { case AC_PATH_REGISTERED: { struct ccb_pathinq *cpi; - struct cam_path *new_path; - cam_status status; cpi = (struct ccb_pathinq *)arg; @@ -201,35 +212,23 @@ if ((cpi->target_sprt & PIT_PROCESSOR) == 0) break; - /* - * Allocate a peripheral instance for - * this target instance. - */ - status = xpt_create_path(&new_path, NULL, - xpt_path_path_id(path), - CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); - if (status != CAM_REQ_CMP) { - printf("targbhasync: Unable to create path " - "due to status 0x%x\n", status); - break; - } status = cam_periph_alloc(targbhctor, NULL, targbhdtor, targbhstart, "targbh", CAM_PERIPH_BIO, new_path, targbhasync, AC_PATH_REGISTERED, cpi); - xpt_free_path(new_path); break; } case AC_PATH_DEREGISTERED: { - targbhdislun(periph); + cam_periph_invalidate(cam_periph_find(new_path, "targbh")); break; } default: break; } + xpt_free_path(new_path); } /* Attempt to enable our lun */ @@ -439,6 +438,8 @@ case 1: /* FALLTHROUGH */ default: + /* XXX Wait for callback of targbhdislun() */ + tsleep(softc, PRIBIO, "targbh", hz/2); free(softc, M_DEVBUF); break; } ==== //depot/projects/uart/conf/NOTES#15 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1176 2003/09/19 19:04:30 jhb Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1177 2003/09/25 16:06:17 sam Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -569,7 +569,7 @@ # # PFIL_HOOKS enables an abtraction layer which is meant to be used in # network code where filtering is required. See the pfil(9) man page. -# This option is a subset of the IPFILTER option. +# This option is required by the IPFILTER option. # # TCPDEBUG enables code which keeps traces of the TCP state machine # for sockets with the SO_DEBUG option set, which can then be examined @@ -591,7 +591,7 @@ options IPFILTER_LOG #ipfilter logging options IPFILTER_DEFAULT_BLOCK #block all packets by default options IPSTEALTH #support for stealth forwarding -options PFIL_HOOKS +options PFIL_HOOKS #required by IPFILTER options TCPDEBUG # The MBUF_STRESS_TEST option enables options which create ==== //depot/projects/uart/dev/acpica/acpi.c#12 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.102 2003/09/18 05:12:45 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.103 2003/09/26 04:32:40 njl Exp $ */ #include "opt_acpi.h" @@ -2081,6 +2081,7 @@ {"ACPI_CA_DEBUGGER", ACPI_CA_DEBUGGER}, {"ACPI_OS_SERVICES", ACPI_OS_SERVICES}, {"ACPI_CA_DISASSEMBLER", ACPI_CA_DISASSEMBLER}, + {"ACPI_ALL_COMPONENTS", ACPI_ALL_COMPONENTS}, {"ACPI_BUS", ACPI_BUS}, {"ACPI_SYSTEM", ACPI_SYSTEM}, @@ -2092,9 +2093,7 @@ {"ACPI_PROCESSOR", ACPI_PROCESSOR}, {"ACPI_THERMAL", ACPI_THERMAL}, {"ACPI_FAN", ACPI_FAN}, - {"ACPI_ALL_DRIVERS", ACPI_ALL_DRIVERS}, - {"ACPI_ALL_COMPONENTS", ACPI_ALL_COMPONENTS}, {NULL, 0} }; @@ -2107,6 +2106,7 @@ {"ACPI_LV_ALL_EXCEPTIONS", ACPI_LV_ALL_EXCEPTIONS}, /* Trace verbosity level 1 [Standard Trace Level] */ + {"ACPI_LV_INIT_NAMES", ACPI_LV_INIT_NAMES}, {"ACPI_LV_PARSE", ACPI_LV_PARSE}, {"ACPI_LV_LOAD", ACPI_LV_LOAD}, {"ACPI_LV_DISPATCH", ACPI_LV_DISPATCH}, @@ -2120,7 +2120,6 @@ {"ACPI_LV_RESOURCES", ACPI_LV_RESOURCES}, {"ACPI_LV_USER_REQUESTS", ACPI_LV_USER_REQUESTS}, {"ACPI_LV_PACKAGE", ACPI_LV_PACKAGE}, - {"ACPI_LV_INIT_NAMES", ACPI_LV_INIT_NAMES}, {"ACPI_LV_VERBOSITY1", ACPI_LV_VERBOSITY1}, /* Trace verbosity level 2 [Function tracing and memory allocation] */ ==== //depot/projects/uart/dev/aic7xxx/aic79xx_pci.c#3 (text+ko) ==== @@ -38,11 +38,11 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#76 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#80 $ */ #include -__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic79xx_pci.c,v 1.15 2003/08/24 17:48:03 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic79xx_pci.c,v 1.16 2003/09/25 23:36:41 scottl Exp $"); #ifdef __linux__ #include "aic79xx_osm.h" @@ -453,8 +453,10 @@ * or read prefetching could be initiated by the * CPU or host bridge. Our device does not support * either, so look for data corruption and/or flaged - * PCI errors. + * PCI errors. First pause without causing another + * chip reset. */ + hcntrl &= ~CHIPRST; ahd_outb(ahd, HCNTRL, hcntrl|PAUSE); while (ahd_is_paused(ahd) == 0) ; ==== //depot/projects/uart/dev/aic7xxx/aic7xxx_pci.c#4 (text+ko) ==== @@ -39,11 +39,11 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#69 $ + * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#72 $ */ #include -__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic7xxx_pci.c,v 1.30 2003/09/02 17:30:34 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic7xxx_pci.c,v 1.31 2003/09/25 23:36:41 scottl Exp $"); #ifdef __linux__ #include "aic7xxx_osm.h" @@ -1285,8 +1285,10 @@ * or read prefetching could be initiated by the * CPU or host bridge. Our device does not support * either, so look for data corruption and/or flagged - * PCI errors. + * PCI errors. First pause without causing another + * chip reset. */ + hcntrl &= ~CHIPRST; ahc_outb(ahc, HCNTRL, hcntrl|PAUSE); while (ahc_is_paused(ahc) == 0) ; ==== //depot/projects/uart/dev/puc/puc.c#11 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/puc/puc.c,v 1.26 2003/09/06 21:48:49 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/puc/puc.c,v 1.27 2003/09/26 04:44:55 marcel Exp $"); /* * Copyright (c) 1996, 1998, 1999 @@ -61,7 +61,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/puc/puc.c,v 1.26 2003/09/06 21:48:49 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/puc/puc.c,v 1.27 2003/09/26 04:44:55 marcel Exp $"); /* * PCI "universal" communication card device driver, glues com, lpt, ==== //depot/projects/uart/dev/puc/pucvar.h#9 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: pucvar.h,v 1.2 1999/02/06 06:29:54 cgd Exp $ */ -/* $FreeBSD: src/sys/dev/puc/pucvar.h,v 1.11 2003/09/06 21:48:50 marcel Exp $ */ +/* $FreeBSD: src/sys/dev/puc/pucvar.h,v 1.12 2003/09/26 04:44:55 marcel Exp $ */ /*- * Copyright (c) 2002 JF Hay. All rights reserved. @@ -115,9 +115,9 @@ enum puc_device_ivars { PUC_IVAR_FREQ, - PUC_IVAR_PORT, + PUC_IVAR_SUBTYPE, PUC_IVAR_REGSHFT, - PUC_IVAR_SUBTYPE + PUC_IVAR_PORT }; #ifdef PUC_ENTRAILS ==== //depot/projects/uart/dev/uart/uart.h#8 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/uart/uart.h,v 1.2 2003/09/23 09:25:38 nyan Exp $ + * $FreeBSD: src/sys/dev/uart/uart.h,v 1.3 2003/09/26 05:14:56 marcel Exp $ */ #ifndef _DEV_UART_H_ ==== //depot/projects/uart/dev/uart/uart_bus.h#31 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/uart/uart_bus.h,v 1.3 2003/09/17 01:41:21 marcel Exp $ + * $FreeBSD: src/sys/dev/uart/uart_bus.h,v 1.4 2003/09/26 05:14:56 marcel Exp $ */ #ifndef _DEV_UART_BUS_H_ ==== //depot/projects/uart/dev/uart/uart_bus_acpi.c#5 (text+ko) ==== @@ -23,7 +23,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_acpi.c,v 1.1 2003/09/06 23:13:47 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_acpi.c,v 1.2 2003/09/26 05:14:56 marcel Exp $"); #include #include ==== //depot/projects/uart/dev/uart/uart_bus_ebus.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_ebus.c,v 1.1 2003/09/06 23:13:47 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_ebus.c,v 1.2 2003/09/26 05:14:56 marcel Exp $"); #include #include ==== //depot/projects/uart/dev/uart/uart_bus_isa.c#5 (text+ko) ==== @@ -23,7 +23,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_isa.c,v 1.1 2003/09/06 23:13:47 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_isa.c,v 1.2 2003/09/26 05:14:56 marcel Exp $"); #include #include ==== //depot/projects/uart/dev/uart/uart_bus_pccard.c#4 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_pccard.c,v 1.4 2003/09/23 09:20:03 nyan Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_pccard.c,v 1.5 2003/09/26 05:14:56 marcel Exp $"); #include #include ==== //depot/projects/uart/dev/uart/uart_bus_pci.c#7 (text+ko) ==== @@ -23,7 +23,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_pci.c,v 1.1 2003/09/06 23:13:47 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_pci.c,v 1.2 2003/09/26 05:14:56 marcel Exp $"); #include #include ==== //depot/projects/uart/dev/uart/uart_bus_puc.c#10 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_puc.c,v 1.1 2003/09/06 23:13:47 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_puc.c,v 1.2 2003/09/26 05:14:56 marcel Exp $"); #include #include ==== //depot/projects/uart/dev/uart/uart_core.c#34 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_core.c,v 1.6 2003/09/23 09:55:21 nyan Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_core.c,v 1.7 2003/09/26 05:14:56 marcel Exp $"); #ifndef KLD_MODULE #include "opt_comconsole.h" ==== //depot/projects/uart/dev/uart/uart_cpu_alpha.c#8 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_alpha.c,v 1.5 2003/09/23 13:03:22 nyan Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_alpha.c,v 1.6 2003/09/26 05:14:56 marcel Exp $"); #include #include ==== //depot/projects/uart/dev/uart/uart_cpu_amd64.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_amd64.c,v 1.5 2003/09/23 13:03:22 nyan Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_amd64.c,v 1.6 2003/09/26 05:14:56 marcel Exp $"); #include #include ==== //depot/projects/uart/dev/uart/uart_cpu_i386.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_i386.c,v 1.5 2003/09/23 13:03:22 nyan Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_i386.c,v 1.6 2003/09/26 05:14:56 marcel Exp $"); #include #include ==== //depot/projects/uart/dev/uart/uart_cpu_ia64.c#8 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_ia64.c,v 1.5 2003/09/23 13:03:22 nyan Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_ia64.c,v 1.6 2003/09/26 05:14:56 marcel Exp $"); #include #include @@ -76,7 +76,7 @@ continue; addr = ent->address.addr_high; - addr = (addr << 32) + ent->address.addr_low + addr = (addr << 32) + ent->address.addr_low; di->ops = uart_ns8250_ops; di->bas.chan = 0; di->bas.bst = (ent->address.addr_space == 0) ==== //depot/projects/uart/dev/uart/uart_cpu_pc98.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_pc98.c,v 1.8 2003/09/23 13:03:22 nyan Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_pc98.c,v 1.9 2003/09/26 05:14:56 marcel Exp $"); #include #include ==== //depot/projects/uart/dev/uart/uart_cpu_sparc64.c#17 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_sparc64.c,v 1.4 2003/09/23 09:25:38 nyan Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_cpu_sparc64.c,v 1.5 2003/09/26 05:14:56 marcel Exp $"); #include #include ==== //depot/projects/uart/dev/uart/uart_dev_sab82532.c#31 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_sab82532.c,v 1.4 2003/09/23 09:25:38 nyan Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_sab82532.c,v 1.5 2003/09/26 05:14:56 marcel Exp $"); #include #include ==== //depot/projects/uart/dev/uart/uart_dev_z8530.c#17 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_z8530.c,v 1.5 2003/09/23 09:25:38 nyan Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_dev_z8530.c,v 1.6 2003/09/26 05:14:56 marcel Exp $"); #include #include ==== //depot/projects/uart/netinet/icmp6.h#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netinet/icmp6.h,v 1.9 2002/09/23 06:25:08 alfred Exp $ */ +/* $FreeBSD: src/sys/netinet/icmp6.h,v 1.10 2003/09/25 13:40:06 ume Exp $ */ /* $KAME: icmp6.h,v 1.46 2001/04/27 15:09:48 itojun Exp $ */ /* @@ -515,7 +515,7 @@ p = (u_char *)filterp; \ for (i = 0; i < sizeof(struct icmp6_filter); i++) \ p[i] = 0xff; \ -} while (0) +} while (/*CONSTCOND*/ 0) #define ICMP6_FILTER_SETBLOCKALL(filterp) \ bzero(filterp, sizeof(struct icmp6_filter)) #else /* _KERNEL */ @@ -678,7 +678,7 @@ && icmp6_ifstat && icmp6_ifstat[(ifp)->if_index]) { \ icmp6_ifstat[(ifp)->if_index]->tag++; \ } \ -} while (0) +} while (/*CONSTCOND*/ 0) #define icmp6_ifoutstat_inc(ifp, type, code) \ do { \ @@ -731,7 +731,7 @@ icmp6_ifstat_inc(ifp, ifs6_out_redirect); \ break; \ } \ -} while (0) +} while (/*CONSTCOND*/ 0) extern int icmp6_rediraccept; /* accept/process redirects */ extern int icmp6_redirtimeout; /* cache time for redirect routes */ ==== //depot/projects/uart/netinet/ip6.h#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netinet/ip6.h,v 1.6 2002/09/23 06:25:08 alfred Exp $ */ +/* $FreeBSD: src/sys/netinet/ip6.h,v 1.7 2003/09/25 13:40:06 ume Exp $ */ /* $KAME: ip6.h,v 1.18 2001/03/29 05:34:30 itojun Exp $ */ /* @@ -255,7 +255,7 @@ return ret; \ } \ } \ -} while (0) +} while (/*CONSTCOND*/ 0) /* * IP6_EXTHDR_GET ensures that intermediate protocol header (from "off" to @@ -284,7 +284,7 @@ (m) = NULL; \ } \ } \ -} while (0) +} while (/*CONSTCOND*/ 0) #define IP6_EXTHDR_GET0(val, typ, m, off, len) \ do { \ @@ -302,7 +302,7 @@ (m) = NULL; \ } \ } \ -} while (0) +} while (/*CONSTCOND*/ 0) #endif /*_KERNEL*/ #endif /* not _NETINET_IP6_H_ */ ==== //depot/projects/uart/netkey/key.c#2 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/netkey/key.c,v 1.48 2003/06/11 05:26:11 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/netkey/key.c,v 1.50 2003/09/25 13:40:06 ume Exp $"); /* * This code is referd to RFC 2367 @@ -284,7 +284,7 @@ curelm = LIST_NEXT(curelm, field);\ LIST_INSERT_AFTER(curelm, elm, field);\ }\ -} while (0) +} while (/*CONSTCOND*/ 0) #define KEY_CHKSASTATE(head, sav, name) \ do { \ @@ -293,7 +293,7 @@ (name), (head), (sav))); \ continue; \ } \ -} while (0) +} while (/*CONSTCOND*/ 0) #define KEY_CHKSPDIR(head, sp, name) \ do { \ @@ -302,7 +302,7 @@ "anyway continue.\n", \ (name), (head), (sp))); \ } \ -} while (0) +} while (/*CONSTCOND*/ 0) #if 1 #define KMALLOC(p, t, n) \ @@ -315,13 +315,13 @@ ((p) = (t)malloc((unsigned long)(n), M_SECA, M_NOWAIT)); \ printf("%s %d: %p <- KMALLOC(%s, %d)\n", \ __FILE__, __LINE__, (p), #t, n); \ -} while (0) +} while (/*CONSTCOND*/ 0) #define KFREE(p) \ do { \ printf("%s %d: %p -> KFREE()\n", __FILE__, __LINE__, (p)); \ free((caddr_t)(p), M_SECA); \ - } while (0) + } while (/*CONSTCOND*/ 0) #endif /* @@ -337,7 +337,7 @@ (idx)->ul_proto = (ulp); \ bcopy((s), &(idx)->src, ((const struct sockaddr *)(s))->sa_len); \ bcopy((d), &(idx)->dst, ((const struct sockaddr *)(d))->sa_len); \ -} while (0) +} while (/*CONSTCOND*/ 0) /* * set parameters into secasindex buffer. @@ -351,7 +351,7 @@ (idx)->reqid = (r); \ bcopy((s), &(idx)->src, ((const struct sockaddr *)(s))->sa_len); \ bcopy((d), &(idx)->dst, ((const struct sockaddr *)(d))->sa_len); \ -} while (0) +} while (/*CONSTCOND*/ 0) /* key statistics */ struct _keystat { @@ -514,7 +514,7 @@ /* sanity check */ if (spidx == NULL) - panic("key_allocsp: NULL pointer is passed.\n"); + panic("key_allocsp: NULL pointer is passed."); /* check direction */ switch (dir) { @@ -522,7 +522,7 @@ case IPSEC_DIR_OUTBOUND: break; default: - panic("key_allocsp: Invalid direction is passed.\n"); + panic("key_allocsp: Invalid direction is passed."); } /* get a SP entry */ @@ -650,7 +650,7 @@ /* sanity check */ if (isr == NULL || saidx == NULL) - panic("key_checkrequest: NULL pointer is passed.\n"); + panic("key_checkrequest: NULL pointer is passed."); /* check mode */ switch (saidx->mode) { @@ -659,7 +659,7 @@ break; case IPSEC_MODE_ANY: default: - panic("key_checkrequest: Invalid policy defined.\n"); + panic("key_checkrequest: Invalid policy defined."); } /* get current level */ @@ -672,7 +672,7 @@ */ if (isr->sav != NULL) { if (isr->sav->sah == NULL) - panic("key_checkrequest: sah is null.\n"); + panic("key_checkrequest: sah is null."); if (isr->sav == (struct secasvar *)LIST_FIRST( &isr->sav->sah->savtree[SADB_SASTATE_DEAD])) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, @@ -811,7 +811,7 @@ /* sanity check 2 */ if (candidate->lft_c == NULL || sav->lft_c == NULL) panic("key_do_allocsa_policy: " - "lifetime_current is NULL.\n"); + "lifetime_current is NULL."); /* What the best method is to compare ? */ if (key_preferred_oldsa) { @@ -934,7 +934,7 @@ /* sanity check */ if (src == NULL || dst == NULL) - panic("key_allocsa: NULL pointer is passed.\n"); + panic("key_allocsa: NULL pointer is passed."); /* * when both systems employ similar strategy to use a SA. @@ -1075,7 +1075,7 @@ { /* sanity check */ if (sp == NULL) - panic("key_freesp: NULL pointer is passed.\n"); + panic("key_freesp: NULL pointer is passed."); sp->refcnt--; KEYDEBUG(KEYDEBUG_IPSEC_STAMP, @@ -1098,7 +1098,7 @@ { /* sanity check */ if (so == NULL) - panic("key_freeso: NULL pointer is passed.\n"); + panic("key_freeso: NULL pointer is passed."); switch (so->so_proto->pr_domain->dom_family) { #ifdef INET @@ -1152,7 +1152,7 @@ { /* sanity check */ if (sp == NULL || *sp == NULL) - panic("key_freesp_so: sp == NULL\n"); + panic("key_freesp_so: sp == NULL"); switch ((*sp)->policy) { case IPSEC_POLICY_IPSEC: @@ -1182,7 +1182,7 @@ { /* sanity check */ if (sav == NULL) - panic("key_freesav: NULL pointer is passed.\n"); + panic("key_freesav: NULL pointer is passed."); sav->refcnt--; KEYDEBUG(KEYDEBUG_IPSEC_STAMP, @@ -1207,7 +1207,7 @@ /* sanity check */ if (sp == NULL) - panic("key_delsp: NULL pointer is passed.\n"); + panic("key_delsp: NULL pointer is passed."); sp->state = IPSEC_SPSTATE_DEAD; @@ -1257,7 +1257,7 @@ /* sanity check */ if (spidx == NULL) - panic("key_getsp: NULL pointer is passed.\n"); + panic("key_getsp: NULL pointer is passed."); LIST_FOREACH(sp, &sptree[spidx->dir], chain) { if (sp->state == IPSEC_SPSTATE_DEAD) @@ -1333,9 +1333,9 @@ /* sanity check */ if (xpl0 == NULL) - panic("key_msg2sp: NULL pointer was passed.\n"); + panic("key_msg2sp: NULL pointer was passed."); if (len < sizeof(*xpl0)) - panic("key_msg2sp: invalid length.\n"); + panic("key_msg2sp: invalid length."); if (len != PFKEY_EXTLEN(xpl0)) { ipseclog((LOG_DEBUG, "key_msg2sp: Invalid msg length.\n")); *error = EINVAL; @@ -1570,7 +1570,7 @@ /* sanity check. */ if (sp == NULL) - panic("key_sp2msg: NULL pointer was passed.\n"); + panic("key_sp2msg: NULL pointer was passed."); tlen = key_getspreqmsglen(sp); @@ -1740,7 +1740,7 @@ /* sanity check */ if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("key_spdadd: NULL pointer is passed.\n"); + panic("key_spdadd: NULL pointer is passed."); if (mhp->ext[SADB_EXT_ADDRESS_SRC] == NULL || mhp->ext[SADB_EXT_ADDRESS_DST] == NULL || @@ -1996,7 +1996,7 @@ /* sanity check */ if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("key_spddelete: NULL pointer is passed.\n"); + panic("key_spddelete: NULL pointer is passed."); if (mhp->ext[SADB_EXT_ADDRESS_SRC] == NULL || mhp->ext[SADB_EXT_ADDRESS_DST] == NULL || @@ -2089,7 +2089,7 @@ /* sanity check */ if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("key_spddelete2: NULL pointer is passed.\n"); + panic("key_spddelete2: NULL pointer is passed."); if (mhp->ext[SADB_X_EXT_POLICY] == NULL || mhp->extlen[SADB_X_EXT_POLICY] < sizeof(struct sadb_x_policy)) { @@ -2186,7 +2186,7 @@ /* sanity check */ if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("key_spdget: NULL pointer is passed.\n"); + panic("key_spdget: NULL pointer is passed."); if (mhp->ext[SADB_X_EXT_POLICY] == NULL || mhp->extlen[SADB_X_EXT_POLICY] < sizeof(struct sadb_x_policy)) { @@ -2235,11 +2235,11 @@ /* sanity check */ if (sp == NULL) - panic("key_spdacquire: NULL pointer is passed.\n"); + panic("key_spdacquire: NULL pointer is passed."); if (sp->req != NULL) - panic("key_spdacquire: called but there is request.\n"); + panic("key_spdacquire: called but there is request."); if (sp->policy != IPSEC_POLICY_IPSEC) - panic("key_spdacquire: policy mismathed. IPsec is expected.\n"); + panic("key_spdacquire: policy mismathed. IPsec is expected."); /* Get an entry to check whether sent message or not. */ if ((newspacq = key_getspacq(&sp->spidx)) != NULL) { @@ -2307,7 +2307,7 @@ /* sanity check */ if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("key_spdflush: NULL pointer is passed.\n"); + panic("key_spdflush: NULL pointer is passed."); if (m->m_len != PFKEY_ALIGN8(sizeof(struct sadb_msg))) return key_senderror(so, m, EINVAL); @@ -2358,7 +2358,7 @@ /* sanity check */ if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL) - panic("key_spddump: NULL pointer is passed.\n"); + panic("key_spddump: NULL pointer is passed."); /* search SPD entry and get buffer size. */ cnt = 0; @@ -2497,7 +2497,7 @@ /* sanity check */ if (sp == NULL) - panic("key_spdexpire: NULL pointer is passed.\n"); + panic("key_spdexpire: NULL pointer is passed."); /* set msg header */ m = key_setsadbmsg(SADB_X_SPDEXPIRE, 0, 0, 0, 0, 0); @@ -2604,7 +2604,7 @@ /* sanity check */ if (saidx == NULL) - panic("key_newsaidx: NULL pointer is passed.\n"); + panic("key_newsaidx: NULL pointer is passed."); newsah = keydb_newsecashead(); if (newsah == NULL) @@ -2633,7 +2633,7 @@ /* sanity check */ if (sah == NULL) - panic("key_delsah: NULL pointer is passed.\n"); + panic("key_delsah: NULL pointer is passed."); s = splnet(); /*called from softclock()*/ @@ -2711,7 +2711,7 @@ /* sanity check */ if (m == NULL || mhp == NULL || mhp->msg == NULL || sah == NULL) - panic("key_newsa: NULL pointer is passed.\n"); + panic("key_newsa: NULL pointer is passed."); KMALLOC(newsav, struct secasvar *, sizeof(struct secasvar)); if (newsav == NULL) { @@ -2790,7 +2790,7 @@ { /* sanity check */ if (sav == NULL) - panic("key_delsav: NULL pointer is passed.\n"); + panic("key_delsav: NULL pointer is passed."); if (sav->refcnt > 0) return; /* can't free */ @@ -2955,7 +2955,7 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Sep 25 22:30:07 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8D11416A4C0; Thu, 25 Sep 2003 22:30:07 -0700 (PDT) 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 6509316A4B3 for ; Thu, 25 Sep 2003 22:30:07 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFCBE44028 for ; Thu, 25 Sep 2003 22:30:05 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8Q5U5XJ074121 for ; Thu, 25 Sep 2003 22:30:05 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8Q5U5i9074098 for perforce@freebsd.org; Thu, 25 Sep 2003 22:30:05 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Thu, 25 Sep 2003 22:30:05 -0700 (PDT) Message-Id: <200309260530.h8Q5U5i9074098@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 38623 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 05:30:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=38623 Change 38623 by marcel@marcel_nfs on 2003/09/25 22:29:38 IFC @38620 Affected files ... .. //depot/projects/ia64/UPDATING#53 integrate .. //depot/projects/ia64/lib/libc/amd64/gen/fabs.S#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_sigaction.c#7 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#69 integrate .. //depot/projects/ia64/share/examples/scsi_target/scsi_cmds.c#3 integrate .. //depot/projects/ia64/share/examples/scsi_target/scsi_target.c#4 integrate .. //depot/projects/ia64/share/man/man4/acpi.4#13 integrate .. //depot/projects/ia64/share/man/man4/wlan.4#3 integrate .. //depot/projects/ia64/share/man/man9/Makefile#31 integrate .. //depot/projects/ia64/share/man/man9/pfil.9#4 integrate .. //depot/projects/ia64/share/man/man9/pmap.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_activate.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_addr_hint.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_change_wiring.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_clear_modify.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_copy.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_enter.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_extract.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_growkernel.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_init.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_is_modified.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_map.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_mincore.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_object_init_pt.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_page_exists_quick.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_page_protect.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_pinit.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_prefault.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_qenter.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_release.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_remove.9#1 branch .. //depot/projects/ia64/share/man/man9/pmap_zero_page.9#1 branch .. //depot/projects/ia64/sys/amd64/amd64/pmap.c#25 integrate .. //depot/projects/ia64/sys/cam/scsi/scsi_targ_bh.c#7 integrate .. //depot/projects/ia64/sys/conf/NOTES#70 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi.c#42 integrate .. //depot/projects/ia64/sys/dev/aic7xxx/aic79xx_pci.c#14 integrate .. //depot/projects/ia64/sys/dev/aic7xxx/aic7xxx_pci.c#12 integrate .. //depot/projects/ia64/sys/dev/firewire/fwphyreg.h#1 branch .. //depot/projects/ia64/sys/dev/puc/puc.c#21 integrate .. //depot/projects/ia64/sys/dev/puc/pucvar.h#12 integrate .. //depot/projects/ia64/sys/dev/uart/uart.h#3 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus.h#4 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus_acpi.c#2 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus_ebus.c#2 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus_isa.c#2 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus_pccard.c#3 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus_pci.c#2 integrate .. //depot/projects/ia64/sys/dev/uart/uart_bus_puc.c#2 integrate .. //depot/projects/ia64/sys/dev/uart/uart_core.c#5 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_alpha.c#4 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_amd64.c#4 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_i386.c#4 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_ia64.c#4 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_pc98.c#5 integrate .. //depot/projects/ia64/sys/dev/uart/uart_cpu_sparc64.c#5 integrate .. //depot/projects/ia64/sys/dev/uart/uart_dev_sab82532.c#5 integrate .. //depot/projects/ia64/sys/dev/uart/uart_dev_z8530.c#5 integrate .. //depot/projects/ia64/sys/netinet/icmp6.h#6 integrate .. //depot/projects/ia64/sys/netinet/ip6.h#3 integrate .. //depot/projects/ia64/sys/netkey/key.c#13 integrate .. //depot/projects/ia64/sys/netkey/key_debug.c#6 integrate .. //depot/projects/ia64/sys/netkey/key_debug.h#4 integrate .. //depot/projects/ia64/sys/netkey/keysock.c#16 integrate .. //depot/projects/ia64/usr.sbin/asf/asf.8#3 integrate .. //depot/projects/ia64/usr.sbin/asf/asf.c#2 integrate .. //depot/projects/ia64/usr.sbin/fwcontrol/fwcontrol.8#9 integrate .. //depot/projects/ia64/usr.sbin/fwcontrol/fwcontrol.c#12 integrate Differences ... ==== //depot/projects/ia64/UPDATING#53 (text+ko) ==== @@ -17,6 +17,13 @@ developers choose to disable these features on build machines to maximize performance. +20030925: + Configuring a system to use IPFILTER now requires that PFIL_HOOKS + also be explicitly configured. Previously this dependency was + magically handled through some cruft in net/pfil.h; but that has + been removed. Building a kernel with IPFILTER but not PFIL_HOOKS + will fail with obtuse errors in ip_fil.c. + 20030923: Fix a bug in arplookup(), whereby a hostile party on a locally attached network could exhaust kernel memory, and cause a system @@ -1368,4 +1375,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.267 2003/09/23 16:39:30 bms Exp $ +$FreeBSD: src/UPDATING,v 1.268 2003/09/25 16:12:12 sam Exp $ ==== //depot/projects/ia64/lib/libc/amd64/gen/fabs.S#2 (text+ko) ==== @@ -2,7 +2,7 @@ #if defined(LIBC_SCCS) RCSID("$NetBSD: fabs.S,v 1.4 1997/07/16 14:37:16 christos Exp $") #endif -__FBSDID("$FreeBSD: src/lib/libc/amd64/gen/fabs.S,v 1.1 2003/04/30 16:21:03 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/amd64/gen/fabs.S,v 1.2 2003/09/26 01:49:48 peter Exp $"); /* * Ok, this sucks. Is there really no way to push an xmm register onto @@ -13,6 +13,6 @@ movsd %xmm0, -8(%rsp) fldl -8(%rsp) fabs - fstp -8(%rsp) + fstpl -8(%rsp) movsd -8(%rsp),%xmm0 ret ==== //depot/projects/ia64/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c#3 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c,v 1.7 2003/04/18 05:04:15 deischen Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c,v 1.8 2003/09/25 13:53:49 davidxu Exp $ */ #include #include @@ -41,9 +41,9 @@ _pthread_attr_setcreatesuspend_np(pthread_attr_t *attr) { int ret; + if (attr == NULL || *attr == NULL) { - errno = EINVAL; - ret = -1; + ret = EINVAL; } else { (*attr)->suspend = THR_CREATE_SUSPENDED; ret = 0; ==== //depot/projects/ia64/lib/libpthread/thread/thr_sigaction.c#7 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libpthread/thread/thr_sigaction.c,v 1.21 2003/08/18 03:58:29 davidxu Exp $ + * $FreeBSD: src/lib/libpthread/thread/thr_sigaction.c,v 1.22 2003/09/25 06:23:40 davidxu Exp $ */ #include #include @@ -42,6 +42,7 @@ _sigaction(int sig, const struct sigaction * act, struct sigaction * oact) { int ret = 0; + int err = 0; struct sigaction newact, oldact; struct pthread *curthread; kse_critical_t crit; @@ -58,14 +59,8 @@ crit = _kse_critical_enter(); curthread = _get_curthread(); KSE_LOCK_ACQUIRE(curthread->kse, &_thread_signal_lock); - /* - * Check if the existing signal action structure contents are - * to be returned: - */ - if (oact != NULL) { - /* Return the existing signal action contents: */ - oldact = _thread_sigact[sig - 1]; - } + + oldact = _thread_sigact[sig - 1]; /* Check if a signal action was supplied: */ if (act != NULL) { @@ -94,14 +89,27 @@ newact.sa_handler = (void (*) ())_thr_sig_handler; } /* Change the signal action in the kernel: */ - if (__sys_sigaction(sig, &newact, NULL) != 0) + if (__sys_sigaction(sig, &newact, NULL) != 0) { + _thread_sigact[sig - 1] = oldact; + /* errno is in kse, will copy it to thread */ + err = errno; ret = -1; + } } KSE_LOCK_RELEASE(curthread->kse, &_thread_signal_lock); _kse_critical_leave(crit); - - if (oact != NULL) + /* + * Check if the existing signal action structure contents are + * to be returned: + */ + if (oact != NULL) { + /* Return the existing signal action contents: */ *oact = oldact; + } + if (ret != 0) { + /* Return errno to thread */ + errno = err; + } } /* Return the completion status: */ ==== //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#69 (text+ko) ==== @@ -29,7 +29,7 @@ - $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.182 2003/09/13 12:51:12 nyan Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.183 2003/09/25 21:15:55 wilko Exp $ Supported Devices @@ -371,9 +371,11 @@ are not supported. Booting from these controllers is not - supported due to SRM limitations. This list includes - controllers sold by Digital/Compaq in Alpha systems in the - StorageWorks family, e.g. KZPSC or KZPAC. + supported due to SRM limitations. + DAC960 controllers sold by Digital/Compaq for Alpha systems as part + of the StorageWorks family, e.g. KZPSC or KZPAC are bootable from SRM. + Note that these cards used 2.x firmware. SRM bootability of newer + firmware is unknown. ==== //depot/projects/ia64/share/examples/scsi_target/scsi_cmds.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/share/examples/scsi_target/scsi_cmds.c,v 1.2 2003/01/16 00:24:29 njl Exp $ + * $FreeBSD: src/share/examples/scsi_target/scsi_cmds.c,v 1.3 2003/09/25 05:43:26 simokawa Exp $ */ #include @@ -246,10 +246,8 @@ /* Fill out the supplied CTIO */ if (ctio != NULL) { - /* No autosense yet bcopy(sense, &ctio->sense_data, sizeof(*sense)); - ctio->sense_len = sizeof(*sense); XXX - */ + ctio->sense_len = sizeof(*sense); /* XXX */ ctio->ccb_h.flags &= ~CAM_DIR_MASK; ctio->ccb_h.flags |= CAM_DIR_NONE | /* CAM_SEND_SENSE | */ CAM_SEND_STATUS; @@ -331,7 +329,11 @@ inq = &inq_data; bzero(inq, sizeof(*inq)); inq->device = T_DIRECT | (SID_QUAL_LU_CONNECTED << 5); +#ifdef SCSI_REV_SPC inq->version = SCSI_REV_SPC; /* was 2 */ +#else + inq->version = SCSI_REV_3; /* was 2 */ +#endif /* * XXX cpi.hba_inquiry doesn't support Addr16 so we give the ==== //depot/projects/ia64/share/examples/scsi_target/scsi_target.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/share/examples/scsi_target/scsi_target.c,v 1.14 2003/01/16 00:24:29 njl Exp $ + * $FreeBSD: src/share/examples/scsi_target/scsi_target.c,v 1.15 2003/09/25 05:43:26 simokawa Exp $ */ #include @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -199,7 +200,18 @@ if (fstat(file_fd, &st) < 0) err(1, "fstat file"); - volume_size = st.st_size / sector_size; +#if __FreeBSD_version >= 500000 + if ((st.st_mode & S_IFCHR) != 0) { + /* raw device */ + off_t mediasize; + if (ioctl(file_fd, DIOCGMEDIASIZE, &mediasize) < 0) + err(1, "DIOCGMEDIASIZE"); + + /* XXX get sector size by ioctl()?? */ + volume_size = mediasize / sector_size; + } else +#endif + volume_size = st.st_size / sector_size; } else { volume_size = user_size / sector_size; } @@ -582,6 +594,8 @@ c_descr->offset = a_descr->base_off + a_descr->targ_req; else if ((a_descr->flags & CAM_DIR_MASK) == CAM_DIR_OUT) c_descr->offset = a_descr->base_off + a_descr->init_req; + else + c_descr->offset = a_descr->base_off; /* * Return a check condition if there was an error while @@ -684,6 +698,14 @@ ctio = (struct ccb_scsiio *)ccb_h; c_descr = (struct ctio_descr *)ctio->ccb_h.targ_descr; + if (ctio->ccb_h.status == CAM_REQ_ABORTED) { + TAILQ_REMOVE(&a_descr->cmplt_io, ccb_h, + periph_links.tqe); + free_ccb((union ccb *)ctio); + send_ccb((union ccb *)atio, /*priority*/1); + continue; + } + /* If completed item is in range, call handler */ if ((c_descr->event == AIO_DONE && c_descr->offset == a_descr->base_off + a_descr->targ_ack) ==== //depot/projects/ia64/share/man/man4/acpi.4#13 (text+ko) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/acpi.4,v 1.14 2003/08/07 04:46:53 njl Exp $ +.\" $FreeBSD: src/share/man/man4/acpi.4,v 1.15 2003/09/26 04:32:40 njl Exp $ .\" .Dd July 2, 2001 .Dt ACPI 4 @@ -88,10 +88,14 @@ .It .Li ACPI_RESOURCES .It -.Li ACPI_DEBUGGER +.Li ACPI_CA_DEBUGGER .It .Li ACPI_OS_SERVICES .It +.Li ACPI_CA_DISASSEMBLER +.It +.Li ACPI_ALL_COMPONENTS +.It .Li ACPI_BUS .It .Li ACPI_SYSTEM @@ -112,35 +116,33 @@ .It .Li ACPI_FAN .It -.Li ACPI_ALL_COMPONENTS +.Li ACPI_ALL_DRIVERS .El .Pp The supported levels are: .Pp .Bl -item -offset indent -compact .It -.Li ACPI_LV_OK +.Li ACPI_LV_ERROR .It -.Li ACPI_LV_INFO -.It .Li ACPI_LV_WARN .It -.Li ACPI_LV_ERROR +.Li ACPI_LV_INIT .It -.Li ACPI_LV_FATAL +.Li ACPI_LV_DEBUG_OBJECT .It -.Li ACPI_LV_DEBUG_OBJECT +.Li ACPI_LV_INFO .It .Li ACPI_LV_ALL_EXCEPTIONS .It -.Li ACPI_LV_THREADS +.Li ACPI_LV_INIT_NAMES .It .Li ACPI_LV_PARSE .It +.Li ACPI_LV_LOAD +.It .Li ACPI_LV_DISPATCH .It -.Li ACPI_LV_LOAD -.It .Li ACPI_LV_EXEC .It .Li ACPI_LV_NAMES @@ -149,43 +151,49 @@ .It .Li ACPI_LV_BFIELD .It -.Li ACPI_LV_TRASH -.It .Li ACPI_LV_TABLES .It -.Li ACPI_LV_FUNCTIONS -.It .Li ACPI_LV_VALUES .It .Li ACPI_LV_OBJECTS .It +.Li ACPI_LV_RESOURCES +.It +.Li ACPI_LV_USER_REQUESTS +.It +.Li ACPI_LV_PACKAGE +.It +.Li ACPI_LV_VERBOSITY1 +.It .Li ACPI_LV_ALLOCATIONS .It -.Li ACPI_LV_RESOURCES +.Li ACPI_LV_FUNCTIONS +.It +.Li ACPI_LV_OPTIMIZATIONS .It -.Li ACPI_LV_IO +.Li ACPI_LV_VERBOSITY2 .It -.Li ACPI_LV_INTERRUPTS +.Li ACPI_LV_ALL .It -.Li ACPI_LV_USER_REQUESTS +.Li ACPI_LV_MUTEX .It -.Li ACPI_LV_PACKAGE +.Li ACPI_LV_THREADS .It -.Li ACPI_LV_MUTEX +.Li ACPI_LV_IO .It -.Li ACPI_LV_INIT +.Li ACPI_LV_INTERRUPTS .It -.Li ACPI_LV_ALL +.Li ACPI_LV_VERBOSITY3 .It -.Li ACPI_DB_AML_DISASSEMBLE +.Li ACPI_LV_AML_DISASSEMBLE .It -.Li ACPI_DB_VERBOSE_INFO +.Li ACPI_LV_VERBOSE_INFO .It -.Li ACPI_DB_FULL_TABLES +.Li ACPI_LV_FULL_TABLES .It -.Li ACPI_DB_EVENTS +.Li ACPI_LV_EVENTS .It -.Li ACPI_DB_VERBOSE +.Li ACPI_LV_VERBOSE .El .Pp Selection of the appropriate layer and level values is important @@ -290,9 +298,7 @@ .Xr acpidump 8 and .Xr iasl 1 -utilities from the -.Pa devel/acpicatools -port, and some ACPI knowledge. +utilities and some ACPI knowledge. .Sh TUNABLES .Bl -tag -width indent .It Va acpi_dsdt_load @@ -328,7 +334,8 @@ .Xr loader.conf 5 , .Xr acpiconf 8 , .Xr acpidump 8 , -.Xr config 8 +.Xr config 8 , +.Xr iasl 8 .Rs .%A "Compaq Computer Corporation" .%A "Intel Corporation" ==== //depot/projects/ia64/share/man/man4/wlan.4#3 (text+ko) ==== @@ -23,9 +23,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/wlan.4,v 1.2 2003/07/18 11:40:41 hmp Exp $ +.\" $FreeBSD: src/share/man/man4/wlan.4,v 1.3 2003/09/25 23:56:20 sam Exp $ .\" -.Dd March 25, 2003 +.Dd September 25, 2003 .Dt WLAN 4 .Os .Sh NAME @@ -44,6 +44,29 @@ and .Xr ath 4 drivers but will eventually be required by all 802.11 drivers. +.Pp +If the associated interface is marked for debugging with, for example, +.Bd -literal -offset indent +ifconfig wi0 debug +.Ed +.Pp +then messages describing the operation of the 802.11 protocol will +be sent to the console. +With the interface marked for debugging, doing: +.Bd -literal -offset indent +sysctl debug.ieee80211=1 +.Ed +.Pp +causes additional messages to be generated. +Many drivers will also display the contents of each 802.11 frame +sent and received when the interface is marked with +both debugging and ``link2''; e.g. +.Bd -literal -offset indent +ifconfig wi0 debug link2 +.Ed +.Pp +Beware however that some management frames may be processed entirely within +the device and not be received by the host. .Sh COMPATIBILITY The module name of .Nm @@ -63,10 +86,13 @@ driver first appeared in .Fx 5.0 . .Sh AUTHORS -Support for generic 802.11 devices was adapted from +Atsushi Onoe is the original author of this software. +The .Nx +support was adapted to +.Fx by .An -nosplit -.An Sam Leffler Aq sam@FreeBSD.org . +.An Sam Leffler . This manual page was written by .An Tom Rhodes Aq trhodes@FreeBSD.org . ==== //depot/projects/ia64/share/man/man9/Makefile#31 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/man/man9/Makefile,v 1.200 2003/09/24 05:18:41 marcel Exp $ +# $FreeBSD: src/share/man/man9/Makefile,v 1.202 2003/09/25 23:44:15 bms Exp $ MAN= BUF_LOCK.9 BUF_LOCKFREE.9 BUF_LOCKINIT.9 BUF_REFCNT.9 \ BUF_TIMELOCK.9 BUF_UNLOCK.9 BUS_CONFIG_INTR.9 BUS_PRINT_CHILD.9 \ @@ -59,6 +59,12 @@ namei.9 \ panic.9 pbuf.9 pci.9 pfil.9 pfind.9 pgfind.9 \ physio.9 printf.9 pseudofs.9 psignal.9 \ + pmap.9 pmap_activate.9 pmap_addr_hint.9 pmap_change_wiring.9 \ + pmap_clear_modify.9 pmap_copy.9 pmap_enter.9 pmap_extract.9 \ + pmap_growkernel.9 pmap_init.9 pmap_is_modified.9 pmap_map.9 \ + pmap_mincore.9 pmap_object_init_pt.9 pmap_page_exists_quick.9 \ + pmap_page_protect.9 pmap_pinit.9 pmap_prefault.9 pmap_qenter.9 \ + pmap_release.9 pmap_remove.9 pmap_zero_page.9 \ random.9 resettodr.9 resource_int_value.9 resource_query_string.9 \ rtalloc.9 rtentry.9 runqueue.9 random_harvest.9 rijndael.9 \ rman.9 \ @@ -203,6 +209,19 @@ MLINKS+=pci.9 pci_find_bsf.9 pci.9 pci_find_device.9 MLINKS+=pfil.9 pfil_hook_get.9 pfil.9 pfil_add_hook.9 pfil.9 pfil_remove_hook.9 MLINKS+=pfind.9 zpfind.9 +MLINKS+=pmap_clear_modify.9 pmap_clear_reference.9 +MLINKS+=pmap_copy.9 pmap_copy_page.9 +MLINKS+=pmap_extract.9 pmap_extract_and_hold.9 +MLINKS+=pmap_init.9 pmap_init2.9 +MLINKS+=pmap_is_modified.9 pmap_ts_modified.9 +MLINKS+=pmap_page_protect.9 pmap_protect.9 +MLINKS+=pmap_pinit.9 pmap_pinit0.9 +MLINKS+=pmap_pinit.9 pmap_pinit2.9 +MLINKS+=pmap_qenter.9 pmap_qremove.9 +MLINKS+=pmap_remove.9 pmap_remove_all.9 +MLINKS+=pmap_remove.9 pmap_remove_pages.9 +MLINKS+=pmap_zero_page.9 pmap_zero_idle.9 +MLINKS+=pmap_zero_page.9 pmap_zero_area.9 MLINKS+=psignal.9 gsignal.9 psignal.9 pgsignal.9 MLINKS+=random.9 srandom.9 random.9 arc4random.9 random.9 read_random.9 MLINKS+=random.9 arc4rand.9 ==== //depot/projects/ia64/share/man/man9/pfil.9#4 (text+ko) ==== @@ -1,3 +1,5 @@ +.\" $NetBSD: pfil.9,v 1.22 2003/07/01 13:04:06 wiz Exp $ +.\" .\" Copyright (c) 1996 Matthew R. Green .\" All rights reserved. .\" @@ -24,106 +26,110 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man9/pfil.9,v 1.11 2003/09/08 19:57:21 ru Exp $ -.Dd August 4, 1996 +.\" $FreeBSD: src/share/man/man9/pfil.9,v 1.12 2003/09/25 20:49:28 sam Exp $ +.Dd September 8, 2003 .Dt PFIL 9 .Os .Sh NAME .Nm pfil , +.Nm pfil_head_register , +.Nm pfil_head_unregister , +.Nm pfil_head_get , .Nm pfil_hook_get , .Nm pfil_add_hook , -.Nm pfil_remove_hook +.Nm pfil_remove_hook , +.Nm pfil_run_hooks .Nd packet filter interface .Sh SYNOPSIS .In sys/param.h .In sys/mbuf.h -.In sys/socket.h .In net/if.h .In net/pfil.h -.Ft "struct packet_filter_hook *" -.Fn pfil_hook_get "int flag" "struct pfil_head *ph" +.Ft int +.Fn pfil_head_register "struct pfil_head *head" +.Ft int +.Fn pfil_head_unregister "struct pfil_head *head" +.Ft struct pfil_head * +.Fn pfil_head_get "int af" "u_long dlt" +.Ft struct packet_filter_hook * +.Fn pfil_hook_get "int dir" "struct pfil_head *head" +.Ft void +.Fn pfil_add_hook "int (*func)()" "void *arg" "int flags" "struct pfil_head *" +.Ft void +.Fn pfil_remove_hook "int (*func)()" "void *arg" "int flags" "struct pfil_head *" .Ft int -.Fo pfil_add_hook -.Fa "int \*[lp]*func\*[rp]\*[lp]void *, int, struct ifnet *, int, struct mbuf **\*[rp]" -.Fa "int flags" -.Fa "struct pfil_head *ph" -.Fc +.Fn (*func) "void *arg" "struct mbuf **mp" "struct ifnet *" "int dir" .Ft int -.Fo pfil_remove_hook -.Fa "int \*[lp]*func\*[rp]\*[lp]void *, int, struct ifnet *, int, struct mbuf **\*[rp]" -.Fa "int flags" -.Fa "struct pfil_head *ph" -.Fc +.Fn pfil_run_hooks "struct pfil_head *head" "struct mbuf **mp" "struct ifnet *" "int dir" .Sh DESCRIPTION The .Nm -interface allows a function to be called on every incoming or outgoing -packets. -The hooks for these are embedded in the -.Fn ip_input -and -.Fn ip_output -routines. -The -.Fn pfil_hook_get -function returns the first member of a particular hook, either the in or out -list. -The +framework allows for a specified function to be invoked for every +incoming or outgoing packet for a particular network I/O stream. +These hooks may be used to implement a firewall or perform packet +transformations. +.Pp +Packet filtering points are registered with +.Fn pfil_head_register . +Filtering points are identified by a key (void *) and a data link type +(int) in the +.Em pfil_head +structure. +Packet filters use the key and data link type to look up the filtering +point with which they register themselves. +The key is unique to the filtering point. +The data link type is a +.Xr bpf 4 +DLT constant indicating what kind of header is present on the packet +at the filtering point. +Filtering points may be unregistered with the +.Fn pfil_head_unregister +function. +.Pp +Packet filters register/unregister themselves with a filtering point +with the .Fn pfil_add_hook -function takes a function of the form below as its first argument, and the -flags for which lists to add the function to. -The possible values for these -flags are some combination of -.Dv PFIL_IN and -.Dv PFIL_OUT . -The .Fn pfil_remove_hook -removes a hook from the specified lists. +functions, respectively. +The head is looked up using the +.Fn pfil_head_get +function, which takes the key and data link type that the packet filter +expects. +Filters may provide an argument to be passed to the filter when +invoked on a packet. .Pp -The -.Fa func -argument is a function with the following prototype. -.Pp -.Ft int -.Fn func "void *data" "int hlen" "struct ifnet *net" "int dir" "struct mbuf **m" -.Pp -The -.Fa data -describes the packet. -Currently, this may only be a pointer to an -.Vt ip -structure. -The -.Fa net -and -.Fa m -arguments describe the network interface and the mbuf holding data for this -packet. -The -.Fa dir -is the direction; 0 for incoming packets and 1 for outgoing packets. -If the function -returns non-zero, this signals an error and no further processing of this packet is -performed. -The function should set -.Va errno -to indicate the nature of the error. -It is the hook's responsibility to free the chain if the packet is being dropped. +When a filter is invoked, the packet appears just as if it +.Dq came off the wire . +That is, all protocol fields are in network byte order. +The filter is called with its specified argument, the pointer to the +pointer to the mbuf containing the packet, the pointer to the network +interface that the packet is traversing, and the direction (PFIL_IN +or PFIL_OUT) that the packet is traveling. +The filter may change which mbuf the mbuf ** argument references. +The filter returns an errno if the packet processing is to stop, or 0 +if the processing is to continue. +If the packet processing is to stop, it is the responsibility of the +filter to free the packet. .Pp The .Nm interface is enabled in the kernel via the -.Cd PFIL_HOOKS +.Sy PFIL_HOOKS option. .Sh RETURN VALUES If successful, -.Fn pfil_hook_get -returns the first member of the packet filter list, -.Fn pfil_add_hook +.Fn pfil_head_get +returns the pfil_head structure for the given key/dlt. +.Fn pfil_add_hook and .Fn pfil_remove_hook -are expected to always succeed. +return 0 if successful. If called with flag PFIL_WAITOK, +.Fn pfil_remove_hook +is expected to always succeed. +.Pp +.Fn pfil_head_unregister +might sleep! .Sh HISTORY The .Nm @@ -132,7 +138,7 @@ The .Nm input and output lists were originally implemented as -.In sys/queue.h +.Fd \*[Lt]sys/queue.h\*[Gt] .Dv LIST structures; however this was changed in @@ -140,9 +146,8 @@ to .Dv TAILQ structures. -This change was to allow the input and output filters to be -processed in reverse order, to allow the same path to be taken, in or out -of the kernel. +This change was to allow the input and output filters to be processed in +reverse order, to allow the same path to be taken, in or out of the kernel. .Pp The .Nm @@ -151,11 +156,31 @@ and .Fn pfil_remove_hook , introducing the capability of per-protocol filtering. -This was done -primarily in order to support filtering of IPv6. +This was done primarily in order to support filtering of IPv6. +.Pp +In 1.5K, the +.Nm +framework was changed to work with an arbitrary number of filtering points, +as well as be less IP-centric. +.Pp +Fine-grained locking was adding in FreeBSD 5.2. .Sh BUGS -The current -.Nm -implementation will need changes to suit a threaded kernel model. +.Fn pfil_hook_get +is only safe for internal use. +.Pp +FreeBSD implements only hooks for AF_INET and AF_INET6. +Packets diverted through these hooks have data in +host byte order contrary to the above statements. +.Pp +The +.Xr bridge 4 +diverts inbound AF_INET traffic, but contrary to the above +statements, the data is provided in host byte order. +.Pp +When a pfil_head is being modified no traffic is diverted +(to avoid deadlock). +This means that unwanted traffic may flow for a short period +of time. .Sh SEE ALSO -.Xr bpf 4 +.Xr bpf 4 , +.Xr bridge 4 ==== //depot/projects/ia64/sys/amd64/amd64/pmap.c#25 (text+ko) ==== @@ -73,7 +73,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.437 2003/09/13 21:57:38 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.439 2003/09/26 04:12:41 alc Exp $"); /* * Manages physical address maps. @@ -1012,6 +1012,7 @@ register struct pmap *pmap; { vm_page_t pml4pg; + static vm_pindex_t color; /* * allocate object for the ptes @@ -1022,14 +1023,13 @@ /* * allocate the page directory page */ - VM_OBJECT_LOCK(pmap->pm_pteobj); - pml4pg = vm_page_grab(pmap->pm_pteobj, NUPDE + NUPDPE + NUPML4E, - VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED | VM_ALLOC_ZERO); + while ((pml4pg = vm_page_alloc(NULL, color++, VM_ALLOC_NOOBJ | + VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) + VM_WAIT; vm_page_lock_queues(); vm_page_flag_clear(pml4pg, PG_BUSY); pml4pg->valid = VM_PAGE_BITS_ALL; vm_page_unlock_queues(); - VM_OBJECT_UNLOCK(pmap->pm_pteobj); pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pml4pg)); @@ -1241,14 +1241,8 @@ void pmap_release(pmap_t pmap) { - vm_object_t object; vm_page_t m; - object = pmap->pm_pteobj; - - KASSERT(object->ref_count == 1, - ("pmap_release: pteobj reference count %d != 1", - object->ref_count)); KASSERT(pmap->pm_stats.resident_count == 0, ("pmap_release: pmap resident count %ld != 0", pmap->pm_stats.resident_count)); @@ -1258,15 +1252,14 @@ mtx_unlock_spin(&allpmaps_lock); vm_page_lock_queues(); - while ((m = TAILQ_FIRST(&object->memq)) != NULL) { - m->wire_count--; - atomic_subtract_int(&cnt.v_wire_count, 1); - vm_page_busy(m); - vm_page_free(m); - } - KASSERT(TAILQ_EMPTY(&object->memq), + m = PHYS_TO_VM_PAGE(pmap->pm_pml4[PML4PML4I]); + m->wire_count--; + atomic_subtract_int(&cnt.v_wire_count, 1); + vm_page_busy(m); + vm_page_free(m); + vm_page_unlock_queues(); + KASSERT(TAILQ_EMPTY(&pmap->pm_pteobj->memq), ("pmap_release: leaking page table pages")); - vm_page_unlock_queues(); } static int ==== //depot/projects/ia64/sys/cam/scsi/scsi_targ_bh.c#7 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_targ_bh.c,v 1.18 2003/06/10 18:14:05 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_targ_bh.c,v 1.19 2003/09/25 05:02:19 simokawa Exp $"); #include #include @@ -167,7 +167,7 @@ xpt_setup_ccb(&csa.ccb_h, path, /*priority*/5); csa.ccb_h.func_code = XPT_SASYNC_CB; - csa.event_enable = AC_PATH_REGISTERED; + csa.event_enable = AC_PATH_REGISTERED | AC_PATH_DEREGISTERED; csa.callback = targbhasync; csa.callback_arg = NULL; xpt_action((union ccb *)&csa); @@ -185,15 +185,26 @@ targbhasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg) { - struct cam_periph *periph; + struct cam_path *new_path; + cam_status status; + + /* + * Allocate a peripheral instance for + * this target instance. + */ + status = xpt_create_path(&new_path, NULL, + xpt_path_path_id(path), + CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); + if (status != CAM_REQ_CMP) { + printf("targbhasync: Unable to create path " + "due to status 0x%x\n", status); + return; + } - periph = (struct cam_periph *)callback_arg; switch (code) { case AC_PATH_REGISTERED: { struct ccb_pathinq *cpi; - struct cam_path *new_path; - cam_status status; cpi = (struct ccb_pathinq *)arg; @@ -201,35 +212,23 @@ if ((cpi->target_sprt & PIT_PROCESSOR) == 0) break; - /* - * Allocate a peripheral instance for - * this target instance. - */ - status = xpt_create_path(&new_path, NULL, - xpt_path_path_id(path), - CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); - if (status != CAM_REQ_CMP) { - printf("targbhasync: Unable to create path " - "due to status 0x%x\n", status); - break; - } status = cam_periph_alloc(targbhctor, NULL, targbhdtor, targbhstart, "targbh", CAM_PERIPH_BIO, new_path, targbhasync, AC_PATH_REGISTERED, >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Sep 26 10:12:22 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5D3C216A4C1; Fri, 26 Sep 2003 10:12:22 -0700 (PDT) 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 F3D2716A4B3 for ; Fri, 26 Sep 2003 10:12:21 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7471843FE5 for ; Fri, 26 Sep 2003 10:12:20 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8QHCKXJ033163 for ; Fri, 26 Sep 2003 10:12:20 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8QHCJJn033160 for perforce@freebsd.org; Fri, 26 Sep 2003 10:12:19 -0700 (PDT) (envelope-from areisse@nailabs.com) Date: Fri, 26 Sep 2003 10:12:19 -0700 (PDT) Message-Id: <200309261712.h8QHCJJn033160@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 38659 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 17:12:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=38659 Change 38659 by areisse@areisse_tislabs on 2003/09/26 10:11:56 apache policy modified for FreeBSD Affected files ... .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/unused/apache.te#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/apache.fc#2 edit Differences ... ==== //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/unused/apache.te#2 (text+ko) ==== @@ -336,7 +336,7 @@ ################################################################ # Allow the web server to run scripts and serve pages ############################################################## -allow httpd_t httpd_sys_content_t:file r_file_perms; +allow httpd_t httpd_sys_content_t:{lnk_file file} r_file_perms; allow httpd_t httpd_sys_content_t:dir r_dir_perms; allow httpd_t httpd_sys_htaccess_t: file r_file_perms; ==== //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/apache.fc#2 (text+ko) ==== @@ -1,26 +1,16 @@ # apache -/var/www/html(/.*)? system_u:object_r:httpd_sys_content_t -/var/www/mrtg(/.*)? system_u:object_r:httpd_sys_content_t -/var/www/cgi-bin(/.*)? system_u:object_r:httpd_sys_script_t -/usr/lib/cgi-bin(/.*)? system_u:object_r:httpd_sys_script_t -/var/www/perl(/.*)? system_u:object_r:httpd_sys_script_t -/var/www/icons(/.*)? system_u:object_r:httpd_sys_content_t -/var/cache/httpd(/.*)? system_u:object_r:httpd_cache_t -/etc/httpd system_u:object_r:httpd_config_t -/etc/httpd/conf(/.*)? system_u:object_r:httpd_config_t -/etc/httpd/logs system_u:object_r:httpd_log_files_t -/etc/httpd/modules system_u:object_r:httpd_modules_t -/etc/apache(2)?(/.*)? system_u:object_r:httpd_config_t -/etc/vhosts system_u:object_r:httpd_config_t -/usr/lib/apache(/.*)? system_u:object_r:httpd_modules_t -/usr/lib/apache2/modules(/.*)? system_u:object_r:httpd_modules_t -/usr/sbin/httpd system_u:object_r:httpd_exec_t -/usr/sbin/apache(2)? system_u:object_r:httpd_exec_t -/usr/sbin/suexec system_u:object_r:httpd_suexec_exec_t -/usr/lib/cgi-bin/(nph-)?cgiwrap(d)? system_u:object_r:httpd_suexec_exec_t -/usr/lib/apache(2)?/suexec(2)? system_u:object_r:httpd_suexec_exec_t +/usr/local/www/data(/.*)? system_u:object_r:httpd_sys_content_t +/usr/local/www/cgi-bin(/.*)? system_u:object_r:httpd_sys_script_t +/usr/local/www/icons(/.*)? system_u:object_r:httpd_sys_content_t +#/var/cache/httpd(/.*)? system_u:object_r:httpd_cache_t +/usr/local/etc/apache system_u:object_r:httpd_config_t +/usr/local/libexec/apache(/.*)? system_u:object_r:httpd_modules_t +/usr/local/sbin/httpd system_u:object_r:httpd_exec_t +#/usr/sbin/suexec system_u:object_r:httpd_suexec_exec_t +#/usr/lib/cgi-bin/(nph-)?cgiwrap(d)? system_u:object_r:httpd_suexec_exec_t +#/usr/lib/apache(2)?/suexec(2)? system_u:object_r:httpd_suexec_exec_t /var/log/httpd(/.*)? system_u:object_r:httpd_log_files_t -/var/log/apache(2)?(/.*)? system_u:object_r:httpd_log_files_t -/var/log/cgiwrap\.log.* system_u:object_r:httpd_log_files_t -/var/cache/ssl.*\.sem system_u:object_r:httpd_cache_t +#/var/log/apache(2)?(/.*)? system_u:object_r:httpd_log_files_t +#/var/log/cgiwrap\.log.* system_u:object_r:httpd_log_files_t +#/var/cache/ssl.*\.sem system_u:object_r:httpd_cache_t /var/run/apache(2)?.pid.* system_u:object_r:httpd_var_run_t From owner-p4-projects@FreeBSD.ORG Fri Sep 26 10:28:43 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A86D916A4C0; Fri, 26 Sep 2003 10:28:43 -0700 (PDT) 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 7EA3F16A4B3 for ; Fri, 26 Sep 2003 10:28:43 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 848E343FFB for ; Fri, 26 Sep 2003 10:28:42 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8QHSgXJ033993 for ; Fri, 26 Sep 2003 10:28:42 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8QHSgLB033990 for perforce@freebsd.org; Fri, 26 Sep 2003 10:28:42 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Fri, 26 Sep 2003 10:28:42 -0700 (PDT) Message-Id: <200309261728.h8QHSgLB033990@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38662 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 17:28:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=38662 Change 38662 by sam@sam_ebb on 2003/09/26 10:28:38 IFC arp bug fix + fixup locking Affected files ... .. //depot/projects/netperf/sys/netinet/if_ether.c#7 integrate Differences ... ==== //depot/projects/netperf/sys/netinet/if_ether.c#7 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_ether.c 8.1 (Berkeley) 6/10/93 - * $FreeBSD: src/sys/netinet/if_ether.c,v 1.104 2003/03/04 23:19:52 jlemon Exp $ + * $FreeBSD: src/sys/netinet/if_ether.c,v 1.106 2003/09/24 20:52:25 bms Exp $ */ /* @@ -920,7 +920,6 @@ rt = rtalloc1((struct sockaddr *)&sin, create, 0UL); if (rt == 0) return (0); - rt->rt_refcnt--; if (rt->rt_flags & RTF_GATEWAY) why = "host is not on local network"; @@ -929,16 +928,27 @@ else if (rt->rt_gateway->sa_family != AF_LINK) why = "gateway route is not ours"; - RT_UNLOCK(rt); - - if (why && create) { - log(LOG_DEBUG, "arplookup %s failed: %s\n", - inet_ntoa(sin.sin_addr), why); - return 0; - } else if (why) { - return 0; + if (why) { + if (create) + log(LOG_DEBUG, "arplookup %s failed: %s\n", + inet_ntoa(sin.sin_addr), why); + /* + * If this is the only references to a protocol + * cloned route, remove it. + */ + if (rt->rt_refcnt == 1 && (rt->rt_flags & RTF_WASCLONED)) { + rtrequest(RTM_DELETE, + (struct sockaddr *)rt_key(rt), + rt->rt_gateway, rt_mask(rt), + rt->rt_flags, 0); + } + RTFREE(rt); + return (0); + } else { + rt->rt_refcnt--; + RT_UNLOCK(rt); + return ((struct llinfo_arp *)rt->rt_llinfo); } - return ((struct llinfo_arp *)rt->rt_llinfo); } void From owner-p4-projects@FreeBSD.ORG Fri Sep 26 10:28:46 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 23F5516A4BF; Fri, 26 Sep 2003 10:28:46 -0700 (PDT) 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 D6FA616A4C3 for ; Fri, 26 Sep 2003 10:28:45 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F23C44005 for ; Fri, 26 Sep 2003 10:28:42 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8QHSfXJ033987 for ; Fri, 26 Sep 2003 10:28:41 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8QHSedj033984 for perforce@freebsd.org; Fri, 26 Sep 2003 10:28:40 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Fri, 26 Sep 2003 10:28:40 -0700 (PDT) Message-Id: <200309261728.h8QHSedj033984@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38661 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 17:28:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=38661 Change 38661 by sam@sam_ebb on 2003/09/26 10:28:08 IFC @ 38660 Affected files ... .. //depot/projects/netperf/sys/alpha/alpha/elf_machdep.c#3 integrate .. //depot/projects/netperf/sys/alpha/alpha/promcons.c#3 integrate .. //depot/projects/netperf/sys/alpha/include/elf.h#2 integrate .. //depot/projects/netperf/sys/alpha/linux/linux_sysvec.c#3 integrate .. //depot/projects/netperf/sys/alpha/osf1/osf1_sysvec.c#3 integrate .. //depot/projects/netperf/sys/alpha/tlsb/zs_tlsb.c#3 integrate .. //depot/projects/netperf/sys/amd64/amd64/elf_machdep.c#4 integrate .. //depot/projects/netperf/sys/amd64/amd64/pmap.c#9 integrate .. //depot/projects/netperf/sys/amd64/include/elf.h#2 integrate .. //depot/projects/netperf/sys/amd64/include/vmparam.h#3 integrate .. //depot/projects/netperf/sys/arm/include/elf.h#2 integrate .. //depot/projects/netperf/sys/cam/scsi/scsi_targ_bh.c#2 integrate .. //depot/projects/netperf/sys/compat/ia32/ia32_sysvec.c#2 integrate .. //depot/projects/netperf/sys/compat/ia32/ia32_util.h#2 integrate .. //depot/projects/netperf/sys/compat/pecoff/imgact_pecoff.c#2 integrate .. //depot/projects/netperf/sys/compat/svr4/svr4_sysvec.c#2 integrate .. //depot/projects/netperf/sys/conf/NOTES#10 integrate .. //depot/projects/netperf/sys/contrib/ipfilter/netinet/ip_fil.c#5 integrate .. //depot/projects/netperf/sys/dev/acpica/acpi.c#8 integrate .. //depot/projects/netperf/sys/dev/acpica/acpi_acad.c#5 integrate .. //depot/projects/netperf/sys/dev/acpica/acpi_cmbat.c#5 integrate .. //depot/projects/netperf/sys/dev/acpica/acpi_ec.c#6 integrate .. //depot/projects/netperf/sys/dev/acpica/acpi_resource.c#5 integrate .. //depot/projects/netperf/sys/dev/acpica/acpi_thermal.c#4 integrate .. //depot/projects/netperf/sys/dev/aic7xxx/aic79xx_pci.c#3 integrate .. //depot/projects/netperf/sys/dev/aic7xxx/aic7xxx_pci.c#4 integrate .. //depot/projects/netperf/sys/dev/asr/asr.c#5 integrate .. //depot/projects/netperf/sys/dev/ata/atapi-cam.c#7 integrate .. //depot/projects/netperf/sys/dev/bge/if_bge.c#9 integrate .. //depot/projects/netperf/sys/dev/digi/digi.c#3 integrate .. //depot/projects/netperf/sys/dev/exca/exca.c#4 integrate .. //depot/projects/netperf/sys/dev/fb/fb.c#3 integrate .. //depot/projects/netperf/sys/dev/fb/fbreg.h#3 integrate .. //depot/projects/netperf/sys/dev/firewire/fwphyreg.h#1 branch .. //depot/projects/netperf/sys/dev/gfb/gfb_pci.c#4 integrate .. //depot/projects/netperf/sys/dev/iir/iir.c#3 integrate .. //depot/projects/netperf/sys/dev/iir/iir.h#2 integrate .. //depot/projects/netperf/sys/dev/iir/iir_ctrl.c#3 integrate .. //depot/projects/netperf/sys/dev/iir/iir_pci.c#5 integrate .. //depot/projects/netperf/sys/dev/ofw/ofw_console.c#3 integrate .. //depot/projects/netperf/sys/dev/puc/puc.c#5 integrate .. //depot/projects/netperf/sys/dev/puc/pucvar.h#3 integrate .. //depot/projects/netperf/sys/dev/sio/sio.c#7 integrate .. //depot/projects/netperf/sys/dev/uart/uart.h#3 integrate .. //depot/projects/netperf/sys/dev/uart/uart_bus.h#3 integrate .. //depot/projects/netperf/sys/dev/uart/uart_bus_acpi.c#2 integrate .. //depot/projects/netperf/sys/dev/uart/uart_bus_ebus.c#2 integrate .. //depot/projects/netperf/sys/dev/uart/uart_bus_isa.c#2 integrate .. //depot/projects/netperf/sys/dev/uart/uart_bus_pccard.c#3 integrate .. //depot/projects/netperf/sys/dev/uart/uart_bus_pci.c#2 integrate .. //depot/projects/netperf/sys/dev/uart/uart_bus_puc.c#2 integrate .. //depot/projects/netperf/sys/dev/uart/uart_core.c#4 integrate .. //depot/projects/netperf/sys/dev/uart/uart_cpu_alpha.c#3 integrate .. //depot/projects/netperf/sys/dev/uart/uart_cpu_amd64.c#3 integrate .. //depot/projects/netperf/sys/dev/uart/uart_cpu_i386.c#3 integrate .. //depot/projects/netperf/sys/dev/uart/uart_cpu_ia64.c#3 integrate .. //depot/projects/netperf/sys/dev/uart/uart_cpu_pc98.c#3 integrate .. //depot/projects/netperf/sys/dev/uart/uart_cpu_sparc64.c#3 integrate .. //depot/projects/netperf/sys/dev/uart/uart_dev_sab82532.c#4 integrate .. //depot/projects/netperf/sys/dev/uart/uart_dev_z8530.c#4 integrate .. //depot/projects/netperf/sys/dev/usb/usbdevs#4 integrate .. //depot/projects/netperf/sys/dev/usb/usbdevs.h#4 integrate .. //depot/projects/netperf/sys/dev/usb/usbdevs_data.h#4 integrate .. //depot/projects/netperf/sys/fs/smbfs/smbfs_vnops.c#3 integrate .. //depot/projects/netperf/sys/i386/acpica/acpi_wakeup.c#5 integrate .. //depot/projects/netperf/sys/i386/i386/elf_machdep.c#4 integrate .. //depot/projects/netperf/sys/i386/i386/pmap.c#10 integrate .. //depot/projects/netperf/sys/i386/ibcs2/ibcs2_sysvec.c#2 integrate .. //depot/projects/netperf/sys/i386/include/clock.h#4 integrate .. //depot/projects/netperf/sys/i386/include/elf.h#2 integrate .. //depot/projects/netperf/sys/i386/include/pmap.h#2 integrate .. //depot/projects/netperf/sys/i386/isa/clock.c#5 integrate .. //depot/projects/netperf/sys/i386/isa/pcvt/pcvt_drv.c#2 integrate .. //depot/projects/netperf/sys/i386/linux/linux_sysvec.c#2 integrate .. //depot/projects/netperf/sys/ia64/ia32/ia32_sysvec.c#3 integrate .. //depot/projects/netperf/sys/ia64/ia64/elf_machdep.c#3 integrate .. //depot/projects/netperf/sys/ia64/ia64/ssc.c#2 integrate .. //depot/projects/netperf/sys/ia64/include/elf.h#2 integrate .. //depot/projects/netperf/sys/isa/vga_isa.c#2 integrate .. //depot/projects/netperf/sys/kern/imgact_aout.c#2 integrate .. //depot/projects/netperf/sys/kern/imgact_elf.c#2 integrate .. //depot/projects/netperf/sys/kern/init_main.c#4 integrate .. //depot/projects/netperf/sys/kern/kern_exec.c#3 integrate .. //depot/projects/netperf/sys/kern/kern_sig.c#5 integrate .. //depot/projects/netperf/sys/kern/tty_cons.c#3 integrate .. //depot/projects/netperf/sys/kern/vfs_mount.c#3 integrate .. //depot/projects/netperf/sys/modules/bridge/Makefile#3 integrate .. //depot/projects/netperf/sys/modules/ipfilter/Makefile#3 integrate .. //depot/projects/netperf/sys/net/bridge.c#10 integrate .. //depot/projects/netperf/sys/net/pfil.c#4 integrate .. //depot/projects/netperf/sys/net/pfil.h#4 integrate .. //depot/projects/netperf/sys/net80211/ieee80211_ioctl.c#4 integrate .. //depot/projects/netperf/sys/net80211/ieee80211_ioctl.h#3 integrate .. //depot/projects/netperf/sys/net80211/ieee80211_node.c#10 integrate .. //depot/projects/netperf/sys/net80211/ieee80211_node.h#7 integrate .. //depot/projects/netperf/sys/net80211/ieee80211_proto.c#4 integrate .. //depot/projects/netperf/sys/net80211/ieee80211_var.h#7 integrate .. //depot/projects/netperf/sys/netinet/icmp6.h#2 integrate .. //depot/projects/netperf/sys/netinet/ip6.h#2 integrate .. //depot/projects/netperf/sys/netinet/ip_input.c#7 integrate .. //depot/projects/netperf/sys/netinet/ip_output.c#7 integrate .. //depot/projects/netperf/sys/netinet/ip_var.h#5 integrate .. //depot/projects/netperf/sys/netinet6/ip6_forward.c#3 integrate .. //depot/projects/netperf/sys/netinet6/ip6_input.c#4 integrate .. //depot/projects/netperf/sys/netinet6/ip6_output.c#5 integrate .. //depot/projects/netperf/sys/netinet6/ip6_var.h#3 integrate .. //depot/projects/netperf/sys/netinet6/ip6protosw.h#3 integrate .. //depot/projects/netperf/sys/netkey/key.c#2 integrate .. //depot/projects/netperf/sys/netkey/key_debug.c#2 integrate .. //depot/projects/netperf/sys/netkey/key_debug.h#2 integrate .. //depot/projects/netperf/sys/netkey/keysock.c#2 integrate .. //depot/projects/netperf/sys/pc98/pc98/pc98gdc.c#2 integrate .. //depot/projects/netperf/sys/powerpc/include/cpu.h#3 integrate .. //depot/projects/netperf/sys/powerpc/include/elf.h#2 integrate .. //depot/projects/netperf/sys/powerpc/include/param.h#3 integrate .. //depot/projects/netperf/sys/powerpc/powerpc/clock.c#2 integrate .. //depot/projects/netperf/sys/powerpc/powerpc/cpu.c#2 integrate .. //depot/projects/netperf/sys/powerpc/powerpc/elf_machdep.c#3 integrate .. //depot/projects/netperf/sys/sparc64/include/elf.h#2 integrate .. //depot/projects/netperf/sys/sparc64/sparc64/elf_machdep.c#3 integrate .. //depot/projects/netperf/sys/sys/cons.h#2 integrate .. //depot/projects/netperf/sys/sys/param.h#7 integrate .. //depot/projects/netperf/sys/sys/protosw.h#3 integrate .. //depot/projects/netperf/sys/sys/signalvar.h#2 integrate .. //depot/projects/netperf/sys/sys/sysent.h#2 integrate .. //depot/projects/netperf/sys/vm/vm_map.c#6 integrate .. //depot/projects/netperf/sys/vm/vm_mmap.c#4 integrate Differences ... ==== //depot/projects/netperf/sys/alpha/alpha/elf_machdep.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/elf_machdep.c,v 1.15 2003/08/17 08:08:38 gordon Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/elf_machdep.c,v 1.16 2003/09/25 01:10:22 peter Exp $"); #include #include @@ -73,7 +73,8 @@ PS_STRINGS, VM_PROT_ALL, exec_copyout_strings, - exec_setregs + exec_setregs, + NULL }; static Elf64_Brandinfo freebsd_brand_info = { ==== //depot/projects/netperf/sys/alpha/alpha/promcons.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/promcons.c,v 1.30 2003/08/22 07:20:25 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/promcons.c,v 1.31 2003/09/26 10:52:16 phk Exp $"); #include #include @@ -250,7 +250,7 @@ promcnattach(int alpha_console) { prom_consdev.cn_pri = CN_NORMAL; - prom_consdev.cn_dev = makedev(CDEV_MAJOR, 0); + sprintf(prom_consdev.cn_name, "promcons"); make_dev(&prom_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "promcons"); cnadd(&prom_consdev); promcn_attached = 1; ==== //depot/projects/netperf/sys/alpha/include/elf.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/include/elf.h,v 1.13 2002/05/30 08:32:18 dfr Exp $ + * $FreeBSD: src/sys/alpha/include/elf.h,v 1.14 2003/09/25 01:10:22 peter Exp $ */ #ifndef _MACHINE_ELF_H_ @@ -135,16 +135,4 @@ #define ELF_TARG_MACH EM_ALPHA #define ELF_TARG_VER 1 -#ifdef _KERNEL - -/* - * On the Alpha we load the dynamic linker where a userland call - * to mmap(0, ...) would put it. The rationale behind this - * calculation is that it leaves room for the heap to grow to - * its maximum allowed size. - */ -#define ELF_RTLD_ADDR(vmspace) \ - (round_page((vm_offset_t)(vmspace)->vm_daddr + maxdsiz)) - -#endif #endif /* !_MACHINE_ELF_H_ */ ==== //depot/projects/netperf/sys/alpha/linux/linux_sysvec.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/linux/linux_sysvec.c,v 1.90 2003/08/22 07:20:26 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/linux/linux_sysvec.c,v 1.91 2003/09/25 01:10:22 peter Exp $"); /* XXX we use functions that might not exist. */ #include "opt_compat.h" @@ -200,7 +200,8 @@ PS_STRINGS, VM_PROT_ALL, exec_copyout_strings, - exec_setregs + exec_setregs, + NULL }; static Elf64_Brandinfo linux_brand = { ==== //depot/projects/netperf/sys/alpha/osf1/osf1_sysvec.c#3 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/osf1/osf1_sysvec.c,v 1.10 2003/08/22 07:20:27 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/osf1/osf1_sysvec.c,v 1.11 2003/09/25 01:10:22 peter Exp $"); /* XXX we use functions that might not exist. */ #include "opt_compat.h" @@ -87,7 +87,8 @@ PS_STRINGS, VM_PROT_ALL, exec_copyout_strings, - exec_setregs + exec_setregs, + NULL }; /* ==== //depot/projects/netperf/sys/alpha/tlsb/zs_tlsb.c#3 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/tlsb/zs_tlsb.c,v 1.37 2003/08/22 07:20:27 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/tlsb/zs_tlsb.c,v 1.38 2003/09/26 10:53:29 phk Exp $"); #include "opt_ddb.h" @@ -227,7 +227,7 @@ /* should really bet part of ivars */ zs_console_addr = (caddr_t) ALPHA_PHYS_TO_K0SEG(base + offset); - zs_consdev.cn_dev = makedev(CDEV_MAJOR, 0); + sprintf(zs_consdev.cn_name, "zs0"); zs_consdev.cn_pri = CN_NORMAL; make_dev(&zs_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "zs0"); cnadd(&zs_consdev); ==== //depot/projects/netperf/sys/amd64/amd64/elf_machdep.c#4 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/elf_machdep.c,v 1.17 2003/08/17 08:08:38 gordon Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/elf_machdep.c,v 1.18 2003/09/25 01:10:23 peter Exp $"); #include #include @@ -70,7 +70,8 @@ PS_STRINGS, VM_PROT_ALL, exec_copyout_strings, - exec_setregs + exec_setregs, + NULL }; static Elf64_Brandinfo freebsd_brand_info = { ==== //depot/projects/netperf/sys/amd64/amd64/pmap.c#9 (text+ko) ==== @@ -73,7 +73,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.437 2003/09/13 21:57:38 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.439 2003/09/26 04:12:41 alc Exp $"); /* * Manages physical address maps. @@ -1012,6 +1012,7 @@ register struct pmap *pmap; { vm_page_t pml4pg; + static vm_pindex_t color; /* * allocate object for the ptes @@ -1022,14 +1023,13 @@ /* * allocate the page directory page */ - VM_OBJECT_LOCK(pmap->pm_pteobj); - pml4pg = vm_page_grab(pmap->pm_pteobj, NUPDE + NUPDPE + NUPML4E, - VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED | VM_ALLOC_ZERO); + while ((pml4pg = vm_page_alloc(NULL, color++, VM_ALLOC_NOOBJ | + VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) + VM_WAIT; vm_page_lock_queues(); vm_page_flag_clear(pml4pg, PG_BUSY); pml4pg->valid = VM_PAGE_BITS_ALL; vm_page_unlock_queues(); - VM_OBJECT_UNLOCK(pmap->pm_pteobj); pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pml4pg)); @@ -1241,14 +1241,8 @@ void pmap_release(pmap_t pmap) { - vm_object_t object; vm_page_t m; - object = pmap->pm_pteobj; - - KASSERT(object->ref_count == 1, - ("pmap_release: pteobj reference count %d != 1", - object->ref_count)); KASSERT(pmap->pm_stats.resident_count == 0, ("pmap_release: pmap resident count %ld != 0", pmap->pm_stats.resident_count)); @@ -1258,15 +1252,14 @@ mtx_unlock_spin(&allpmaps_lock); vm_page_lock_queues(); - while ((m = TAILQ_FIRST(&object->memq)) != NULL) { - m->wire_count--; - atomic_subtract_int(&cnt.v_wire_count, 1); - vm_page_busy(m); - vm_page_free(m); - } - KASSERT(TAILQ_EMPTY(&object->memq), + m = PHYS_TO_VM_PAGE(pmap->pm_pml4[PML4PML4I]); + m->wire_count--; + atomic_subtract_int(&cnt.v_wire_count, 1); + vm_page_busy(m); + vm_page_free(m); + vm_page_unlock_queues(); + KASSERT(TAILQ_EMPTY(&pmap->pm_pteobj->memq), ("pmap_release: leaking page table pages")); - vm_page_unlock_queues(); } static int ==== //depot/projects/netperf/sys/amd64/include/elf.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/elf.h,v 1.15 2003/05/14 04:10:49 peter Exp $ + * $FreeBSD: src/sys/amd64/include/elf.h,v 1.16 2003/09/25 01:10:23 peter Exp $ */ #ifndef _MACHINE_ELF_H_ @@ -137,16 +137,4 @@ #define ELF_TARG_MACH EM_X86_64 #define ELF_TARG_VER 1 -#ifdef _KERNEL - -/* - * On the i386 we load the dynamic linker where a userland call - * to mmap(0, ...) would put it. The rationale behind this - * calculation is that it leaves room for the heap to grow to - * its maximum allowed size. - */ -#define ELF_RTLD_ADDR(vmspace) \ - (round_page((vm_offset_t)(vmspace)->vm_daddr + maxdsiz)) - -#endif /* _KERNEL */ #endif /* !_MACHINE_ELF_H_ */ ==== //depot/projects/netperf/sys/amd64/include/vmparam.h#3 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)vmparam.h 5.9 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/include/vmparam.h,v 1.41 2003/09/23 03:20:34 peter Exp $ + * $FreeBSD: src/sys/amd64/include/vmparam.h,v 1.42 2003/09/25 01:11:17 peter Exp $ */ @@ -55,13 +55,13 @@ #define DFLDSIZ (128UL*1024*1024) /* initial data size limit */ #endif #ifndef MAXDSIZ -#define MAXDSIZ (512UL*1024*1024) /* max data size */ +#define MAXDSIZ (8192UL*1024*1024) /* max data size */ #endif #ifndef DFLSSIZ #define DFLSSIZ (8UL*1024*1024) /* initial stack size limit */ #endif #ifndef MAXSSIZ -#define MAXSSIZ (64UL*1024*1024) /* max stack size */ +#define MAXSSIZ (512UL*1024*1024) /* max stack size */ #endif #ifndef SGROWSIZ #define SGROWSIZ (128UL*1024) /* amount to grow stack */ ==== //depot/projects/netperf/sys/arm/include/elf.h#2 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/arm/include/elf.h,v 1.3 2001/10/10 23:06:51 ps Exp $ + * $FreeBSD: src/sys/arm/include/elf.h,v 1.4 2003/09/25 01:10:23 peter Exp $ */ #ifndef _MACHINE_ELF_H_ @@ -91,16 +91,4 @@ #define ELF_TARG_MACH EM_ARM #define ELF_TARG_VER 1 -#ifdef _KERNEL - -/* - * On the StrongARM we load the dynamic linker where a userland call - * to mmap(0, ...) would put it. The rationale behind this - * calculation is that it leaves room for the heap to grow to - * its maximum allowed size. - */ -#define ELF_RTLD_ADDR(vmspace) \ - (round_page((vm_offset_t)(vmspace)->vm_daddr + maxdsiz)) - -#endif /* _KERNEL */ #endif /* !_MACHINE_ELF_H_ */ ==== //depot/projects/netperf/sys/cam/scsi/scsi_targ_bh.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_targ_bh.c,v 1.18 2003/06/10 18:14:05 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_targ_bh.c,v 1.19 2003/09/25 05:02:19 simokawa Exp $"); #include #include @@ -167,7 +167,7 @@ xpt_setup_ccb(&csa.ccb_h, path, /*priority*/5); csa.ccb_h.func_code = XPT_SASYNC_CB; - csa.event_enable = AC_PATH_REGISTERED; + csa.event_enable = AC_PATH_REGISTERED | AC_PATH_DEREGISTERED; csa.callback = targbhasync; csa.callback_arg = NULL; xpt_action((union ccb *)&csa); @@ -185,15 +185,26 @@ targbhasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg) { - struct cam_periph *periph; + struct cam_path *new_path; + cam_status status; + + /* + * Allocate a peripheral instance for + * this target instance. + */ + status = xpt_create_path(&new_path, NULL, + xpt_path_path_id(path), + CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); + if (status != CAM_REQ_CMP) { + printf("targbhasync: Unable to create path " + "due to status 0x%x\n", status); + return; + } - periph = (struct cam_periph *)callback_arg; switch (code) { case AC_PATH_REGISTERED: { struct ccb_pathinq *cpi; - struct cam_path *new_path; - cam_status status; cpi = (struct ccb_pathinq *)arg; @@ -201,35 +212,23 @@ if ((cpi->target_sprt & PIT_PROCESSOR) == 0) break; - /* - * Allocate a peripheral instance for - * this target instance. - */ - status = xpt_create_path(&new_path, NULL, - xpt_path_path_id(path), - CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); - if (status != CAM_REQ_CMP) { - printf("targbhasync: Unable to create path " - "due to status 0x%x\n", status); - break; - } status = cam_periph_alloc(targbhctor, NULL, targbhdtor, targbhstart, "targbh", CAM_PERIPH_BIO, new_path, targbhasync, AC_PATH_REGISTERED, cpi); - xpt_free_path(new_path); break; } case AC_PATH_DEREGISTERED: { - targbhdislun(periph); + cam_periph_invalidate(cam_periph_find(new_path, "targbh")); break; } default: break; } + xpt_free_path(new_path); } /* Attempt to enable our lun */ @@ -439,6 +438,8 @@ case 1: /* FALLTHROUGH */ default: + /* XXX Wait for callback of targbhdislun() */ + tsleep(softc, PRIBIO, "targbh", hz/2); free(softc, M_DEVBUF); break; } ==== //depot/projects/netperf/sys/compat/ia32/ia32_sysvec.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/ia32/ia32_sysvec.c,v 1.8 2003/08/23 00:04:53 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/ia32/ia32_sysvec.c,v 1.9 2003/09/25 01:10:23 peter Exp $"); #include "opt_compat.h" @@ -78,9 +78,12 @@ static register_t *ia32_copyout_strings(struct image_params *imgp); static void ia32_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings); +static void ia32_fixlimits(struct image_params *imgp); extern struct sysent freebsd32_sysent[]; +SYSCTL_NODE(_compat, OID_AUTO, ia32, CTLFLAG_RW, 0, "ia32 mode"); + struct sysentvec ia32_freebsd_sysvec = { SYS_MAXSYSCALL, freebsd32_sysent, @@ -106,7 +109,8 @@ FREEBSD32_PS_STRINGS, VM_PROT_ALL, ia32_copyout_strings, - ia32_setregs + ia32_setregs, + ia32_fixlimits }; @@ -283,3 +287,62 @@ pcb->pcb_flags |= PCB_FULLCTX; td->td_retval[1] = 0; } + +static u_long ia32_maxdsiz = IA32_MAXDSIZ; +SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxdsiz, CTLFLAG_RW, &ia32_maxdsiz, 0, ""); +static u_long ia32_maxssiz = IA32_MAXSSIZ; +SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxssiz, CTLFLAG_RW, &ia32_maxssiz, 0, ""); +static u_long ia32_maxvmem = IA32_MAXVMEM; +SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxvmem, CTLFLAG_RW, &ia32_maxvmem, 0, ""); + +static void +ia32_fixlimits(struct image_params *imgp) +{ + struct proc *p = imgp->proc; + + if (ia32_maxdsiz != 0) { + if (p->p_rlimit[RLIMIT_DATA].rlim_cur > ia32_maxdsiz || + p->p_rlimit[RLIMIT_DATA].rlim_max > ia32_maxdsiz) { + if (p->p_limit->p_refcnt > 1) { + p->p_limit->p_refcnt--; + p->p_limit = limcopy(p->p_limit); + } + if (p->p_rlimit[RLIMIT_DATA].rlim_cur > ia32_maxdsiz) + p->p_rlimit[RLIMIT_DATA].rlim_cur = + ia32_maxdsiz; + if (p->p_rlimit[RLIMIT_DATA].rlim_max > ia32_maxdsiz) + p->p_rlimit[RLIMIT_DATA].rlim_max = + ia32_maxdsiz; + } + } + if (ia32_maxssiz != 0) { + if (p->p_rlimit[RLIMIT_STACK].rlim_cur > ia32_maxssiz || + p->p_rlimit[RLIMIT_STACK].rlim_max > ia32_maxssiz) { + if (p->p_limit->p_refcnt > 1) { + p->p_limit->p_refcnt--; + p->p_limit = limcopy(p->p_limit); + } + if (p->p_rlimit[RLIMIT_STACK].rlim_cur > ia32_maxssiz) + p->p_rlimit[RLIMIT_STACK].rlim_cur = + ia32_maxssiz; + if (p->p_rlimit[RLIMIT_STACK].rlim_max > ia32_maxssiz) + p->p_rlimit[RLIMIT_STACK].rlim_max = + ia32_maxssiz; + } + } + if (ia32_maxvmem != 0) { + if (p->p_rlimit[RLIMIT_VMEM].rlim_cur > ia32_maxvmem || + p->p_rlimit[RLIMIT_VMEM].rlim_max > ia32_maxvmem) { + if (p->p_limit->p_refcnt > 1) { + p->p_limit->p_refcnt--; + p->p_limit = limcopy(p->p_limit); + } + if (p->p_rlimit[RLIMIT_VMEM].rlim_cur > ia32_maxvmem) + p->p_rlimit[RLIMIT_VMEM].rlim_cur = + ia32_maxvmem; + if (p->p_rlimit[RLIMIT_VMEM].rlim_max > ia32_maxvmem) + p->p_rlimit[RLIMIT_VMEM].rlim_max = + ia32_maxvmem; + } + } +} ==== //depot/projects/netperf/sys/compat/ia32/ia32_util.h#2 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/ia32/ia32_util.h,v 1.7 2003/08/22 23:19:02 peter Exp $ + * $FreeBSD: src/sys/compat/ia32/ia32_util.h,v 1.8 2003/09/25 01:10:23 peter Exp $ */ #include @@ -38,3 +38,7 @@ #include #define FREEBSD32_USRSTACK ((1ul << 32) - PAGE_SIZE) + +#define IA32_MAXDSIZ (512*1024*1024) /* 512MB */ +#define IA32_MAXSSIZ (64*1024*1024) /* 64MB */ +#define IA32_MAXVMEM 0 /* Unlimited */ ==== //depot/projects/netperf/sys/compat/pecoff/imgact_pecoff.c#2 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/pecoff/imgact_pecoff.c,v 1.31 2003/06/10 21:29:12 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/pecoff/imgact_pecoff.c,v 1.32 2003/09/25 01:10:23 peter Exp $"); #include #include @@ -114,7 +114,8 @@ PS_STRINGS, VM_PROT_ALL, exec_copyout_strings, - exec_setregs + exec_setregs, + NULL }; ==== //depot/projects/netperf/sys/compat/svr4/svr4_sysvec.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_sysvec.c,v 1.33 2003/06/15 00:31:22 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_sysvec.c,v 1.34 2003/09/25 01:10:23 peter Exp $"); /* XXX we use functions that might not exist. */ #include "opt_compat.h" @@ -189,7 +189,8 @@ PS_STRINGS, VM_PROT_ALL, exec_copyout_strings, - exec_setregs + exec_setregs, + NULL }; Elf32_Brandinfo svr4_brand = { ==== //depot/projects/netperf/sys/conf/NOTES#10 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1176 2003/09/19 19:04:30 jhb Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1177 2003/09/25 16:06:17 sam Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -569,7 +569,7 @@ # # PFIL_HOOKS enables an abtraction layer which is meant to be used in # network code where filtering is required. See the pfil(9) man page. -# This option is a subset of the IPFILTER option. +# This option is required by the IPFILTER option. # # TCPDEBUG enables code which keeps traces of the TCP state machine # for sockets with the SO_DEBUG option set, which can then be examined @@ -591,7 +591,7 @@ options IPFILTER_LOG #ipfilter logging options IPFILTER_DEFAULT_BLOCK #block all packets by default options IPSTEALTH #support for stealth forwarding -options PFIL_HOOKS +options PFIL_HOOKS #required by IPFILTER options TCPDEBUG # The MBUF_STRESS_TEST option enables options which create ==== //depot/projects/netperf/sys/contrib/ipfilter/netinet/ip_fil.c#5 (text+ko) ==== @@ -131,7 +131,7 @@ #if !defined(lint) static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed"; /* static const char rcsid[] = "@(#)$Id: ip_fil.c,v 2.42.2.34 2001/07/23 13:49:57 darrenr Exp $"; */ -static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil.c,v 1.38 2003/02/19 05:47:00 imp Exp $"; +static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil.c,v 1.40 2003/09/24 05:08:58 sam Exp $"; #endif extern struct protosw inetsw[]; @@ -310,8 +310,7 @@ } # endif #endif /* __NetBSD_Version >= 105110000 && _KERNEL */ -#if (__FreeBSD_version >= 501108) -# include +#if (__FreeBSD_version >= 501108) && defined(_KERNEL) static int fr_check_wrapper(void *arg, struct mbuf **mp, struct ifnet *ifp, int dir) ==== //depot/projects/netperf/sys/dev/acpica/acpi.c#8 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.102 2003/09/18 05:12:45 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.103 2003/09/26 04:32:40 njl Exp $ */ #include "opt_acpi.h" @@ -2081,6 +2081,7 @@ {"ACPI_CA_DEBUGGER", ACPI_CA_DEBUGGER}, {"ACPI_OS_SERVICES", ACPI_OS_SERVICES}, {"ACPI_CA_DISASSEMBLER", ACPI_CA_DISASSEMBLER}, + {"ACPI_ALL_COMPONENTS", ACPI_ALL_COMPONENTS}, {"ACPI_BUS", ACPI_BUS}, {"ACPI_SYSTEM", ACPI_SYSTEM}, @@ -2092,9 +2093,7 @@ {"ACPI_PROCESSOR", ACPI_PROCESSOR}, {"ACPI_THERMAL", ACPI_THERMAL}, {"ACPI_FAN", ACPI_FAN}, - {"ACPI_ALL_DRIVERS", ACPI_ALL_DRIVERS}, - {"ACPI_ALL_COMPONENTS", ACPI_ALL_COMPONENTS}, {NULL, 0} }; @@ -2107,6 +2106,7 @@ {"ACPI_LV_ALL_EXCEPTIONS", ACPI_LV_ALL_EXCEPTIONS}, /* Trace verbosity level 1 [Standard Trace Level] */ + {"ACPI_LV_INIT_NAMES", ACPI_LV_INIT_NAMES}, {"ACPI_LV_PARSE", ACPI_LV_PARSE}, {"ACPI_LV_LOAD", ACPI_LV_LOAD}, {"ACPI_LV_DISPATCH", ACPI_LV_DISPATCH}, @@ -2120,7 +2120,6 @@ {"ACPI_LV_RESOURCES", ACPI_LV_RESOURCES}, {"ACPI_LV_USER_REQUESTS", ACPI_LV_USER_REQUESTS}, {"ACPI_LV_PACKAGE", ACPI_LV_PACKAGE}, - {"ACPI_LV_INIT_NAMES", ACPI_LV_INIT_NAMES}, {"ACPI_LV_VERBOSITY1", ACPI_LV_VERBOSITY1}, /* Trace verbosity level 2 [Function tracing and memory allocation] */ ==== //depot/projects/netperf/sys/dev/acpica/acpi_acad.c#5 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi_acad.c,v 1.18 2003/09/14 17:47:44 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi_acad.c,v 1.19 2003/09/26 05:24:55 njl Exp $ */ #include "opt_acpi.h" @@ -137,7 +137,7 @@ if (acpi_get_type(dev) == ACPI_TYPE_DEVICE && acpi_MatchHid(dev, "ACPI0003")) { - device_set_desc(dev, "AC adapter"); + device_set_desc(dev, "AC Adapter"); return (0); } return (ENXIO); ==== //depot/projects/netperf/sys/dev/acpica/acpi_cmbat.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.24 2003/09/13 20:13:01 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.25 2003/09/26 05:24:55 njl Exp $ */ #include "opt_acpi.h" @@ -316,7 +316,7 @@ if (acpi_get_type(dev) == ACPI_TYPE_DEVICE && !acpi_disabled("cmbat") && acpi_MatchHid(dev, "PNP0C0A")) { - device_set_desc(dev, "Control method Battery"); + device_set_desc(dev, "Control Method Battery"); return (0); } return (ENXIO); ==== //depot/projects/netperf/sys/dev/acpica/acpi_ec.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.40 2003/09/15 21:20:55 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.41 2003/09/26 05:24:55 njl Exp $ */ /****************************************************************************** * @@ -137,7 +137,7 @@ *****************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.40 2003/09/15 21:20:55 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.41 2003/09/26 05:24:55 njl Exp $"); #include "opt_acpi.h" #include @@ -437,7 +437,7 @@ */ magic = acpi_get_magic(dev); if (DEV_ECDT(dev)) { - snprintf(desc, sizeof(desc), "embedded controller: ECDT, GPE %#x, GLK", + snprintf(desc, sizeof(desc), "Embedded Controller: ECDT, GPE %#x, GLK", DEV_GET_GPEBIT(magic)); device_set_desc_copy(dev, desc); ret = 0; @@ -482,7 +482,7 @@ */ peer = devclass_get_device(acpi_ec_devclass, uid); if (peer == NULL || !device_is_alive(peer)) { - snprintf(desc, sizeof(desc), "embedded controller: GPE %#x%s", + snprintf(desc, sizeof(desc), "Embedded Controller: GPE %#x%s", gpebit, glk != 0 ? ", GLK" : ""); device_set_desc_copy(dev, desc); ret = 0; ==== //depot/projects/netperf/sys/dev/acpica/acpi_resource.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_resource.c,v 1.19 2003/09/10 22:06:41 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_resource.c,v 1.20 2003/09/26 05:24:55 njl Exp $"); #include "opt_acpi.h" #include @@ -571,7 +571,7 @@ acpi_sysresource_probe(device_t dev) { if (!acpi_disabled("sysresource") && acpi_MatchHid(dev, "PNP0C02")) - device_set_desc(dev, "system resource"); + device_set_desc(dev, "System Resource"); else return (ENXIO); ==== //depot/projects/netperf/sys/dev/acpica/acpi_thermal.c#4 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.31 2003/08/28 16:06:30 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.32 2003/09/26 05:24:55 njl Exp $"); #include "opt_acpi.h" #include @@ -155,7 +155,7 @@ /* No FUNCTION_TRACE - too noisy */ if (acpi_get_type(dev) == ACPI_TYPE_THERMAL && !acpi_disabled("thermal")) { - device_set_desc(dev, "thermal zone"); + device_set_desc(dev, "Thermal Zone"); result = -10; } else { result = ENXIO; ==== //depot/projects/netperf/sys/dev/aic7xxx/aic79xx_pci.c#3 (text+ko) ==== @@ -38,11 +38,11 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#76 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#80 $ */ #include -__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic79xx_pci.c,v 1.15 2003/08/24 17:48:03 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic79xx_pci.c,v 1.16 2003/09/25 23:36:41 scottl Exp $"); #ifdef __linux__ #include "aic79xx_osm.h" @@ -453,8 +453,10 @@ * or read prefetching could be initiated by the * CPU or host bridge. Our device does not support * either, so look for data corruption and/or flaged - * PCI errors. + * PCI errors. First pause without causing another + * chip reset. */ + hcntrl &= ~CHIPRST; ahd_outb(ahd, HCNTRL, hcntrl|PAUSE); while (ahd_is_paused(ahd) == 0) ; ==== //depot/projects/netperf/sys/dev/aic7xxx/aic7xxx_pci.c#4 (text+ko) ==== @@ -39,11 +39,11 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#69 $ + * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#72 $ */ #include -__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic7xxx_pci.c,v 1.30 2003/09/02 17:30:34 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic7xxx_pci.c,v 1.31 2003/09/25 23:36:41 scottl Exp $"); #ifdef __linux__ #include "aic7xxx_osm.h" @@ -1285,8 +1285,10 @@ * or read prefetching could be initiated by the * CPU or host bridge. Our device does not support * either, so look for data corruption and/or flagged - * PCI errors. + * PCI errors. First pause without causing another + * chip reset. */ + hcntrl &= ~CHIPRST; ahc_outb(ahc, HCNTRL, hcntrl|PAUSE); while (ahc_is_paused(ahc) == 0) ; ==== //depot/projects/netperf/sys/dev/asr/asr.c#5 (text+ko) ==== @@ -105,7 +105,7 @@ */ #include >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Sep 26 12:09:53 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1BC1816A4C0; Fri, 26 Sep 2003 12:09:53 -0700 (PDT) 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 EAB6516A4B3 for ; Fri, 26 Sep 2003 12:09:52 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 511F043F93 for ; Fri, 26 Sep 2003 12:09:52 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8QJ9qXJ040314 for ; Fri, 26 Sep 2003 12:09:52 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8QJ9pMB040311 for perforce@freebsd.org; Fri, 26 Sep 2003 12:09:51 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Fri, 26 Sep 2003 12:09:51 -0700 (PDT) Message-Id: <200309261909.h8QJ9pMB040311@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38673 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 19:09:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=38673 Change 38673 by sam@sam_ebb on 2003/09/26 12:09:20 IFC @ 38672 to get syscons fix Affected files ... .. //depot/projects/netperf/sys/dev/syscons/syscons.c#4 integrate .. //depot/projects/netperf/sys/dev/uart/uart_tty.c#2 integrate Differences ... ==== //depot/projects/netperf/sys/dev/syscons/syscons.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/syscons/syscons.c,v 1.407 2003/08/25 07:48:42 nyan Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/syscons/syscons.c,v 1.408 2003/09/26 18:57:34 phk Exp $"); #include "opt_syscons.h" #include "opt_splash.h" @@ -1395,7 +1395,7 @@ return; /* initialize required fields */ - cp->cn_dev = makedev(CDEV_MAJOR, SC_CONSOLECTL); + sprintf(cp->cn_name, "consolectl"); #endif /* __i386__ || __ia64__ || __amd64__ || __sparc64__ */ #if __alpha__ @@ -1475,7 +1475,7 @@ scinit(unit, flags | SC_KERNEL_CONSOLE); sc_console_unit = unit; sc_console = SC_STAT(sc_get_softc(unit, SC_KERNEL_CONSOLE)->dev[0]); - consdev.cn_dev = makedev(CDEV_MAJOR, 0); + sprintf(consdev.cn_name, "ttyv%r", 0); cnadd(&consdev); } ==== //depot/projects/netperf/sys/dev/uart/uart_tty.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_tty.c,v 1.2 2003/09/11 23:06:42 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/uart/uart_tty.c,v 1.3 2003/09/26 18:10:30 marcel Exp $"); #include #include @@ -85,7 +85,6 @@ uart_cnprobe(struct consdev *cp) { - cp->cn_dev = NULL; cp->cn_pri = CN_DEAD; KASSERT(uart_console.cookie == NULL, ("foo")); @@ -343,8 +342,8 @@ tp->t_stop = uart_tty_stop; if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE) { - ((struct consdev *)sc->sc_sysdev->cookie)->cn_dev = - makedev(uart_cdevsw.d_maj, device_get_unit(sc->sc_dev)); + sprintf(((struct consdev *)sc->sc_sysdev->cookie)->cn_name, + "ttyu%r", device_get_unit(sc->sc_dev)); } swi_add(&tty_ithd, uart_driver_name, uart_tty_intr, sc, SWI_TTY, From owner-p4-projects@FreeBSD.ORG Fri Sep 26 12:32:21 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F316A16A4C0; Fri, 26 Sep 2003 12:32:20 -0700 (PDT) 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 CDF1016A4B3 for ; Fri, 26 Sep 2003 12:32:20 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E652F43F75 for ; Fri, 26 Sep 2003 12:32:19 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8QJWJXJ041500 for ; Fri, 26 Sep 2003 12:32:19 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8QJWJs8041497 for perforce@freebsd.org; Fri, 26 Sep 2003 12:32:19 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Fri, 26 Sep 2003 12:32:19 -0700 (PDT) Message-Id: <200309261932.h8QJWJs8041497@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38674 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 19:32:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=38674 Change 38674 by sam@sam_ebb on 2003/09/26 12:32:10 rt is locked so must use RTFREE_LOCKED Affected files ... .. //depot/projects/netperf/sys/netinet/if_ether.c#8 edit Differences ... ==== //depot/projects/netperf/sys/netinet/if_ether.c#8 (text+ko) ==== @@ -942,7 +942,7 @@ rt->rt_gateway, rt_mask(rt), rt->rt_flags, 0); } - RTFREE(rt); + RTFREE_LOCKED(rt); return (0); } else { rt->rt_refcnt--; From owner-p4-projects@FreeBSD.ORG Fri Sep 26 12:34:24 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4565F16A4C0; Fri, 26 Sep 2003 12:34:24 -0700 (PDT) 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 213EC16A4B3 for ; Fri, 26 Sep 2003 12:34:24 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FFC34405F for ; Fri, 26 Sep 2003 12:34:23 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8QJYMXJ041548 for ; Fri, 26 Sep 2003 12:34:22 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8QJYMIk041545 for perforce@freebsd.org; Fri, 26 Sep 2003 12:34:22 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Fri, 26 Sep 2003 12:34:22 -0700 (PDT) Message-Id: <200309261934.h8QJYMIk041545@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38675 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 19:34:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=38675 Change 38675 by sam@sam_ebb on 2003/09/26 12:33:36 must use RTFREE for IP_ADD_MEMBERSHIP since rtalloc returns an unlocked reference Affected files ... .. //depot/projects/netperf/sys/netinet/ip_output.c#8 edit Differences ... ==== //depot/projects/netperf/sys/netinet/ip_output.c#8 (text+ko) ==== @@ -1986,7 +1986,7 @@ break; } ifp = ro.ro_rt->rt_ifp; - rtfree(ro.ro_rt); + RTFREE(ro.ro_rt); } else { ifp = ip_multicast_if(&mreq.imr_interface, NULL); From owner-p4-projects@FreeBSD.ORG Fri Sep 26 16:20:04 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 92C0016A4C0; Fri, 26 Sep 2003 16:20:04 -0700 (PDT) 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 68B8416A4B3 for ; Fri, 26 Sep 2003 16:20:04 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1F9044015 for ; Fri, 26 Sep 2003 16:20:02 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8QNK2XJ060838 for ; Fri, 26 Sep 2003 16:20:02 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8QNK2LV060835 for perforce@freebsd.org; Fri, 26 Sep 2003 16:20:02 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Fri, 26 Sep 2003 16:20:02 -0700 (PDT) Message-Id: <200309262320.h8QNK2LV060835@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38685 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 23:20:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=38685 Change 38685 by sam@sam_ebb on 2003/09/26 16:19:47 fix locking for bundled SA's and for when key exchange is required Affected files ... .. //depot/projects/netperf/sys/netipsec/ipsec_output.c#6 edit Differences ... ==== //depot/projects/netperf/sys/netipsec/ipsec_output.c#6 (text+ko) ==== @@ -204,6 +204,7 @@ struct secasvar *sav; IPSEC_SPLASSERT_SOFTNET(__func__); + IPSECREQUEST_LOCK_ASSERT(isr); IPSEC_ASSERT(af == AF_INET || af == AF_INET6, ("invalid address family %u", af)); @@ -287,12 +288,14 @@ IPSEC_ASSERT(ipsec_get_reqlevel(isr) == IPSEC_LEVEL_USE, ("no SA found, but required; level %u", ipsec_get_reqlevel(isr))); + IPSECREQUEST_UNLOCK(isr); isr = isr->next; if (isr == NULL) { /*XXXstatistic??*/ *error = EINVAL; /*XXX*/ return isr; } + IPSECREQUEST_LOCK(isr); goto again; } @@ -324,6 +327,7 @@ return isr; bad: IPSEC_ASSERT(*error != 0, ("error return w/ no error code")); + IPSECREQUEST_UNLOCK(isr); return NULL; #undef IPSEC_OSTAT } @@ -469,7 +473,8 @@ IPSECREQUEST_UNLOCK(isr); return error; bad: - IPSECREQUEST_UNLOCK(isr); + if (isr) + IPSECREQUEST_UNLOCK(isr); if (m) m_freem(m); return error; From owner-p4-projects@FreeBSD.ORG Fri Sep 26 16:21:09 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B79AF16A4C1; Fri, 26 Sep 2003 16:21:08 -0700 (PDT) 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 8C57816A4B3 for ; Fri, 26 Sep 2003 16:21:08 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D87BA44028 for ; Fri, 26 Sep 2003 16:21:04 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8QNL4XJ060958 for ; Fri, 26 Sep 2003 16:21:04 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8QNL4jt060955 for perforce@freebsd.org; Fri, 26 Sep 2003 16:21:04 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Fri, 26 Sep 2003 16:21:04 -0700 (PDT) Message-Id: <200309262321.h8QNL4jt060955@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38686 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 23:21:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=38686 Change 38686 by sam@sam_ebb on 2003/09/26 16:20:51 move iv free'ing to where it is allocated; this also corrects a malloc type mismatch that (in 4.x) made folks think there was a memory leak ('cuz memory was allocated to one bucket but free'd to another) Affected files ... .. //depot/projects/netperf/sys/netipsec/key.c#8 edit .. //depot/projects/netperf/sys/netipsec/xform_esp.c#6 edit Differences ... ==== //depot/projects/netperf/sys/netipsec/key.c#8 (text+ko) ==== @@ -2772,6 +2772,7 @@ sav->tdb_xform->xf_zeroize(sav); sav->tdb_xform = NULL; } else { + KASSERT(sav->iv == NULL, ("iv but no xform")); if (sav->key_auth != NULL) bzero(_KEYBUF(sav->key_auth), _KEYLEN(sav->key_auth)); if (sav->key_enc != NULL) @@ -2806,10 +2807,6 @@ free(sav->lft_s, M_IPSEC_MISC); sav->lft_s = NULL; } - if (sav->iv != NULL) { - free(sav->iv, M_IPSEC_MISC); - sav->iv = NULL; - } } /* ==== //depot/projects/netperf/sys/netipsec/xform_esp.c#6 (text+ko) ==== @@ -249,7 +249,10 @@ if (sav->key_enc) bzero(_KEYBUF(sav->key_enc), _KEYLEN(sav->key_enc)); - /* NB: sav->iv is freed elsewhere, even though we malloc it! */ + if (sav->iv) { + free(sav->iv, M_XDATA); + sav->iv = NULL; + } sav->tdb_encalgxform = NULL; sav->tdb_xform = NULL; return error; From owner-p4-projects@FreeBSD.ORG Sat Sep 27 17:22:53 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2CE2216A4C0; Sat, 27 Sep 2003 17:22:53 -0700 (PDT) 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 E261816A4B3 for ; Sat, 27 Sep 2003 17:22:52 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71C5243FF7 for ; Sat, 27 Sep 2003 17:22:51 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8S0MpXJ088236 for ; Sat, 27 Sep 2003 17:22:51 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8S0MoFM088233 for perforce@freebsd.org; Sat, 27 Sep 2003 17:22:50 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Sat, 27 Sep 2003 17:22:50 -0700 (PDT) Message-Id: <200309280022.h8S0MoFM088233@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 38729 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2003 00:22:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=38729 Change 38729 by marcel@marcel_nfs on 2003/09/27 17:22:10 IFC @38726 Affected files ... .. //depot/projects/ia64/UPDATING#54 integrate .. //depot/projects/ia64/etc/Makefile#35 integrate .. //depot/projects/ia64/etc/defaults/devfs.rules#2 integrate .. //depot/projects/ia64/etc/rc.d/ipfilter#11 integrate .. //depot/projects/ia64/gnu/usr.bin/groff/tmac/mdoc.local#18 integrate .. //depot/projects/ia64/lib/Makefile#38 integrate .. //depot/projects/ia64/lib/libc/stdlib/malloc.c#19 integrate .. //depot/projects/ia64/lib/libdisk/libdisk.h#15 integrate .. //depot/projects/ia64/lib/libkiconv/Makefile#1 branch .. //depot/projects/ia64/lib/libkiconv/kiconv.3#1 branch .. //depot/projects/ia64/lib/libkiconv/quirks.c#1 branch .. //depot/projects/ia64/lib/libkiconv/quirks.h#1 branch .. //depot/projects/ia64/lib/libkiconv/xlat16_iconv.c#1 branch .. //depot/projects/ia64/lib/libkiconv/xlat16_sysctl.c#1 branch .. //depot/projects/ia64/lib/libkvm/kvm_getprocs.3#4 integrate .. //depot/projects/ia64/lib/libkvm/kvm_proc.c#20 integrate .. //depot/projects/ia64/lib/libpthread/Makefile#13 integrate .. //depot/projects/ia64/lib/libpthread/arch/alpha/include/atomic_ops.h#3 integrate .. //depot/projects/ia64/lib/libpthread/arch/alpha/include/pthread_md.h#3 integrate .. //depot/projects/ia64/lib/libthr/Makefile#5 integrate .. //depot/projects/ia64/release/i386/fixit_crunch.conf#7 integrate .. //depot/projects/ia64/release/ia64/boot_crunch.conf#5 integrate .. //depot/projects/ia64/release/pc98/fixit-small_crunch.conf#4 integrate .. //depot/projects/ia64/release/pc98/fixit_crunch.conf#7 integrate .. //depot/projects/ia64/rescue/rescue/Makefile#12 integrate .. //depot/projects/ia64/sbin/devd/devd.8#9 integrate .. //depot/projects/ia64/sbin/ipfw/ipfw.8#27 integrate .. //depot/projects/ia64/sbin/mount_cd9660/Makefile#3 integrate .. //depot/projects/ia64/sbin/mount_cd9660/mount_cd9660.8#6 integrate .. //depot/projects/ia64/sbin/mount_cd9660/mount_cd9660.c#5 integrate .. //depot/projects/ia64/sbin/mount_msdosfs/Makefile#6 integrate .. //depot/projects/ia64/sbin/mount_msdosfs/iso22dos#2 delete .. //depot/projects/ia64/sbin/mount_msdosfs/iso72dos#2 delete .. //depot/projects/ia64/sbin/mount_msdosfs/koi2dos#2 delete .. //depot/projects/ia64/sbin/mount_msdosfs/koi8u2dos#2 delete .. //depot/projects/ia64/sbin/mount_msdosfs/mount_msdosfs.8#7 integrate .. //depot/projects/ia64/sbin/mount_msdosfs/mount_msdosfs.c#5 integrate .. //depot/projects/ia64/sbin/mount_ntfs/Makefile#3 integrate .. //depot/projects/ia64/sbin/mount_ntfs/mount_ntfs.8#6 integrate .. //depot/projects/ia64/sbin/mount_ntfs/mount_ntfs.c#4 integrate .. //depot/projects/ia64/sbin/rcorder/rcorder.c#4 integrate .. //depot/projects/ia64/sbin/route/route.8#4 integrate .. //depot/projects/ia64/share/man/man4/amr.4#5 integrate .. //depot/projects/ia64/share/man/man4/iir.4#5 integrate .. //depot/projects/ia64/share/man/man9/Makefile#32 integrate .. //depot/projects/ia64/share/man/man9/disk.9#1 branch .. //depot/projects/ia64/share/man/man9/style.9#23 integrate .. //depot/projects/ia64/share/mk/bsd.libnames.mk#19 integrate .. //depot/projects/ia64/share/mk/sys.mk#11 integrate .. //depot/projects/ia64/sys/alpha/alpha/promcons.c#9 integrate .. //depot/projects/ia64/sys/alpha/tlsb/zs_tlsb.c#9 integrate .. //depot/projects/ia64/sys/amd64/amd64/pmap.c#26 integrate .. //depot/projects/ia64/sys/amd64/include/pmap.h#6 integrate .. //depot/projects/ia64/sys/conf/NOTES#71 integrate .. //depot/projects/ia64/sys/conf/files#103 integrate .. //depot/projects/ia64/sys/conf/options#68 integrate .. //depot/projects/ia64/sys/dev/acpica/Osd/OsdSynch.c#9 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi.c#43 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi_acad.c#9 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi_cmbat.c#15 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi_ec.c#19 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi_resource.c#12 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi_thermal.c#12 integrate .. //depot/projects/ia64/sys/dev/adlink/adlink.c#6 integrate .. //depot/projects/ia64/sys/dev/asr/asr.c#20 integrate .. //depot/projects/ia64/sys/dev/ata/ata-all.c#43 integrate .. //depot/projects/ia64/sys/dev/digi/digi.c#16 integrate .. //depot/projects/ia64/sys/dev/fb/fb.c#12 integrate .. //depot/projects/ia64/sys/dev/fb/fbreg.h#9 integrate .. //depot/projects/ia64/sys/dev/gfb/gfb_pci.c#9 integrate .. //depot/projects/ia64/sys/dev/iir/iir.c#9 integrate .. //depot/projects/ia64/sys/dev/iir/iir.h#4 integrate .. //depot/projects/ia64/sys/dev/iir/iir_ctrl.c#10 integrate .. //depot/projects/ia64/sys/dev/iir/iir_pci.c#11 integrate .. //depot/projects/ia64/sys/dev/isp/isp_freebsd.c#18 integrate .. //depot/projects/ia64/sys/dev/kbd/kbd.c#9 integrate .. //depot/projects/ia64/sys/dev/kbd/kbdreg.h#2 integrate .. //depot/projects/ia64/sys/dev/md/md.c#34 integrate .. //depot/projects/ia64/sys/dev/null/null.c#14 integrate .. //depot/projects/ia64/sys/dev/ofw/ofw_console.c#11 integrate .. //depot/projects/ia64/sys/dev/ofw/openfirmio.c#7 integrate .. //depot/projects/ia64/sys/dev/sab/sab.c#15 integrate .. //depot/projects/ia64/sys/dev/sio/sio.c#54 integrate .. //depot/projects/ia64/sys/dev/syscons/syscons.c#23 integrate .. //depot/projects/ia64/sys/dev/uart/uart_tty.c#3 integrate .. //depot/projects/ia64/sys/dev/zs/zs.c#13 integrate .. //depot/projects/ia64/sys/fs/fdescfs/fdesc_vnops.c#15 integrate .. //depot/projects/ia64/sys/fs/msdosfs/direntry.h#3 integrate .. //depot/projects/ia64/sys/fs/msdosfs/msdosfs_conv.c#5 integrate .. //depot/projects/ia64/sys/fs/msdosfs/msdosfs_iconv.c#1 branch .. //depot/projects/ia64/sys/fs/msdosfs/msdosfs_lookup.c#4 integrate .. //depot/projects/ia64/sys/fs/msdosfs/msdosfs_vfsops.c#21 integrate .. //depot/projects/ia64/sys/fs/msdosfs/msdosfs_vnops.c#22 integrate .. //depot/projects/ia64/sys/fs/msdosfs/msdosfsmount.h#6 integrate .. //depot/projects/ia64/sys/fs/ntfs/ntfs.h#3 integrate .. //depot/projects/ia64/sys/fs/ntfs/ntfs_iconv.c#1 branch .. //depot/projects/ia64/sys/fs/ntfs/ntfs_subr.c#13 integrate .. //depot/projects/ia64/sys/fs/ntfs/ntfs_subr.h#3 integrate .. //depot/projects/ia64/sys/fs/ntfs/ntfs_vfsops.c#16 integrate .. //depot/projects/ia64/sys/fs/ntfs/ntfs_vnops.c#13 integrate .. //depot/projects/ia64/sys/fs/ntfs/ntfsmount.h#2 integrate .. //depot/projects/ia64/sys/fs/smbfs/smbfs_vfsops.c#18 integrate .. //depot/projects/ia64/sys/fs/smbfs/smbfs_vnops.c#19 integrate .. //depot/projects/ia64/sys/geom/geom_ctl.c#15 integrate .. //depot/projects/ia64/sys/geom/geom_io.c#30 integrate .. //depot/projects/ia64/sys/i386/bios/smapi.c#4 integrate .. //depot/projects/ia64/sys/i386/i386/elan-mmcr.c#13 integrate .. //depot/projects/ia64/sys/i386/i386/pmap.c#66 integrate .. //depot/projects/ia64/sys/i386/isa/cy.c#10 integrate .. //depot/projects/ia64/sys/i386/isa/pcvt/pcvt_drv.c#10 integrate .. //depot/projects/ia64/sys/ia64/ia64/ssc.c#8 integrate .. //depot/projects/ia64/sys/isa/vga_isa.c#8 integrate .. //depot/projects/ia64/sys/isofs/cd9660/cd9660_iconv.c#1 branch .. //depot/projects/ia64/sys/isofs/cd9660/cd9660_lookup.c#8 integrate .. //depot/projects/ia64/sys/isofs/cd9660/cd9660_mount.h#2 integrate .. //depot/projects/ia64/sys/isofs/cd9660/cd9660_rrip.c#6 integrate .. //depot/projects/ia64/sys/isofs/cd9660/cd9660_util.c#4 integrate .. //depot/projects/ia64/sys/isofs/cd9660/cd9660_vfsops.c#21 integrate .. //depot/projects/ia64/sys/isofs/cd9660/cd9660_vnops.c#17 integrate .. //depot/projects/ia64/sys/isofs/cd9660/iso.h#5 integrate .. //depot/projects/ia64/sys/kern/kern_conf.c#23 integrate .. //depot/projects/ia64/sys/kern/kern_exec.c#54 integrate .. //depot/projects/ia64/sys/kern/kern_sig.c#66 integrate .. //depot/projects/ia64/sys/kern/subr_devstat.c#10 integrate .. //depot/projects/ia64/sys/kern/subr_xxx.c#9 delete .. //depot/projects/ia64/sys/kern/sys_generic.c#27 integrate .. //depot/projects/ia64/sys/kern/tty_cons.c#16 integrate .. //depot/projects/ia64/sys/kern/tty_pty.c#15 integrate .. //depot/projects/ia64/sys/kern/tty_tty.c#10 integrate .. //depot/projects/ia64/sys/kern/vfs_default.c#27 integrate .. //depot/projects/ia64/sys/kern/vfs_mount.c#21 integrate .. //depot/projects/ia64/sys/libkern/iconv.c#7 integrate .. //depot/projects/ia64/sys/libkern/iconv_converter_if.m#2 integrate .. //depot/projects/ia64/sys/libkern/iconv_xlat.c#5 integrate .. //depot/projects/ia64/sys/libkern/iconv_xlat16.c#1 branch .. //depot/projects/ia64/sys/modules/Makefile#64 integrate .. //depot/projects/ia64/sys/modules/cd9660/Makefile#3 integrate .. //depot/projects/ia64/sys/modules/cd9660_iconv/Makefile#1 branch .. //depot/projects/ia64/sys/modules/libiconv/Makefile#3 integrate .. //depot/projects/ia64/sys/modules/msdosfs/Makefile#4 integrate .. //depot/projects/ia64/sys/modules/msdosfs_iconv/Makefile#1 branch .. //depot/projects/ia64/sys/modules/ntfs/Makefile#3 integrate .. //depot/projects/ia64/sys/modules/ntfs_iconv/Makefile#1 branch .. //depot/projects/ia64/sys/net/if_tun.c#18 integrate .. //depot/projects/ia64/sys/net/if_tunvar.h#2 integrate .. //depot/projects/ia64/sys/net80211/ieee80211_ioctl.c#6 integrate .. //depot/projects/ia64/sys/net80211/ieee80211_ioctl.h#3 integrate .. //depot/projects/ia64/sys/net80211/ieee80211_node.c#8 integrate .. //depot/projects/ia64/sys/net80211/ieee80211_node.h#6 integrate .. //depot/projects/ia64/sys/net80211/ieee80211_proto.c#4 integrate .. //depot/projects/ia64/sys/net80211/ieee80211_var.h#6 integrate .. //depot/projects/ia64/sys/netncp/ncp_mod.c#7 integrate .. //depot/projects/ia64/sys/netsmb/smb_dev.c#13 integrate .. //depot/projects/ia64/sys/opencrypto/cryptodev.c#13 integrate .. //depot/projects/ia64/sys/pc98/pc98/pc98gdc.c#7 integrate .. //depot/projects/ia64/sys/pc98/pc98/sio.c#27 integrate .. //depot/projects/ia64/sys/powerpc/include/cpu.h#11 integrate .. //depot/projects/ia64/sys/powerpc/powerpc/clock.c#10 integrate .. //depot/projects/ia64/sys/powerpc/powerpc/cpu.c#2 integrate .. //depot/projects/ia64/sys/sys/conf.h#23 integrate .. //depot/projects/ia64/sys/sys/cons.h#5 integrate .. //depot/projects/ia64/sys/sys/iconv.h#5 integrate .. //depot/projects/ia64/sys/sys/param.h#44 integrate .. //depot/projects/ia64/sys/sys/signalvar.h#15 integrate .. //depot/projects/ia64/sys/sys/systm.h#29 integrate .. //depot/projects/ia64/sys/vm/uma_dbg.c#11 integrate .. //depot/projects/ia64/sys/vm/vm_map.c#65 integrate .. //depot/projects/ia64/sys/vm/vm_map.h#27 integrate .. //depot/projects/ia64/sys/vm/vm_mmap.c#25 integrate .. //depot/projects/ia64/usr.bin/killall/killall.c#10 integrate .. //depot/projects/ia64/usr.sbin/sysinstall/config.c#16 integrate Differences ... ==== //depot/projects/ia64/UPDATING#54 (text+ko) ==== @@ -17,6 +17,10 @@ developers choose to disable these features on build machines to maximize performance. +20030926: + kiconv(3) has been added. mount_msdosfs(8), mount_ntfs(8) and + mount_cd9660(8) need to be in sync with kernel. + 20030925: Configuring a system to use IPFILTER now requires that PFIL_HOOKS also be explicitly configured. Previously this dependency was @@ -1375,4 +1379,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.268 2003/09/25 16:12:12 sam Exp $ +$FreeBSD: src/UPDATING,v 1.269 2003/09/27 14:12:39 fjoe Exp $ ==== //depot/projects/ia64/etc/Makefile#35 (text+ko) ==== @@ -1,5 +1,5 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 -# $FreeBSD: src/etc/Makefile,v 1.318 2003/09/18 16:35:43 markm Exp $ +# $FreeBSD: src/etc/Makefile,v 1.319 2003/09/27 17:33:03 markm Exp $ .if !defined(NO_SENDMAIL) SUBDIR= sendmail @@ -11,7 +11,7 @@ hosts hosts.allow hosts.equiv hosts.lpd \ inetd.conf login.access login.conf \ mac.conf motd netconfig network.subr networks newsyslog.conf \ - phones printcap profile protocols \ + phones profile protocols \ rc rc.firewall rc.firewall6 rc.sendmail rc.shutdown \ rc.subr remote rpc services \ shells sysctl.conf syslog.conf usbd.conf \ @@ -79,6 +79,11 @@ .if !defined(NO_I4B) cd ${.CURDIR}/isdn; ${MAKE} install .endif +.if !defined(NO_LPR) + cd ${.CURDIR}; \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + printcap ${DESTDIR}/etc +.endif .if !defined(NO_SENDMAIL) cd ${.CURDIR}/sendmail; ${MAKE} distribution .endif ==== //depot/projects/ia64/etc/defaults/devfs.rules#2 (text+ko) ==== @@ -13,7 +13,7 @@ # references must include a dollar sign '$' in-front of the # name to be expanded properly. # -# $FreeBSD: src/etc/defaults/devfs.rules,v 1.1 2003/08/20 06:15:18 mtm Exp $ +# $FreeBSD: src/etc/defaults/devfs.rules,v 1.2 2003/09/26 10:32:21 phk Exp $ # # Very basic and secure ruleset: Hide everything. @@ -28,6 +28,7 @@ [devfsrules_unhide_basic=2] add path null unhide add path zero unhide +add path crypto unhide add path random unhide add path urandom unhide ==== //depot/projects/ia64/etc/rc.d/ipfilter#11 (text+ko) ==== @@ -1,7 +1,7 @@ #!/bin/sh # # $NetBSD: ipfilter,v 1.10 2001/02/28 17:03:50 lukem Exp $ -# $FreeBSD: src/etc/rc.d/ipfilter,v 1.11 2003/07/30 18:53:59 mtm Exp $ +# $FreeBSD: src/etc/rc.d/ipfilter,v 1.12 2003/09/27 13:50:47 mux Exp $ # # PROVIDE: ipfilter @@ -40,7 +40,7 @@ case ${OSTYPE} in FreeBSD) # load ipfilter kernel module if needed - if ! sysctl net.inet.ipf.fr_pass > /dev/null 2>&1; then + if ! kldstat -v | grep "IP Filter" > /dev/null 2>&1; then if kldload ipl; then info 'IP-filter module loaded.' else @@ -79,12 +79,15 @@ echo "Enabling ipfilter." case ${OSTYPE} in FreeBSD) - ${ipfilter_program:-/sbin/ipf} -EFa + if [ `sysctl -n net.inet.ipf.fr_running` -eq 0 ]; then + ${ipfilter_program:-/sbin/ipf} -E + fi + ${ipfilter_program:-/sbin/ipf} -Fa if [ -r "${ipfilter_rules}" ]; then ${ipfilter_program:-/sbin/ipf} \ -f "${ipfilter_rules}" ${ipfilter_flags} fi - ${ipfilter_program:-/sbin/ipf} -6 -EFa + ${ipfilter_program:-/sbin/ipf} -6 -Fa if [ -r "${ipv6_ipfilter_rules}" ]; then ${ipfilter_program:-/sbin/ipf} -6 \ -f "${ipv6_ipfilter_rules}" ${ipfilter_flags} @@ -104,17 +107,21 @@ ipfilter_stop() { - case ${OSTYPE} in - FreeBSD) - echo "Saving firewall state tables" - ${ipfs_program:-/sbin/ipfs} -W ${ipfs_flags} - ;; - NetBSD) - ;; - esac - # XXX - The following command is not effective for 'lkm's - echo "Disabling ipfilter." - /sbin/ipf -D + # XXX - The ipf -D command is not effective for 'lkm's + if [ `sysctl -n net.inet.ipf.fr_running` -eq 1 ]; then + case ${OSTYPE} in + FreeBSD) + echo "Saving firewall state tables" + ${ipfs_program:-/sbin/ipfs} -W ${ipfs_flags} + echo "Disabling ipfilter." + ${ipfilter_program:-/sbin/ipf} -D + ;; + NetBSD) + echo "Disabling ipfilter." + /sbin/ipf -D + ;; + esac + fi } ipfilter_reload() @@ -157,7 +164,7 @@ case ${OSTYPE} in FreeBSD) # Don't resync if ipfilter is not loaded - [ sysctl net.inet.ipf.fr_pass > /dev/null 2>&1 ] && return + [ kldstat -v | grep "IP Filter" > /dev/null 2>&1 ] && return ;; esac ${ipfilter_program:-/sbin/ipf} -y ${ipfilter_flags} ==== //depot/projects/ia64/gnu/usr.bin/groff/tmac/mdoc.local#18 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.30 2003/09/20 21:32:26 ru Exp $ +.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.31 2003/09/26 20:26:20 fjoe Exp $ .\" .\" %beginstrip% . @@ -43,6 +43,7 @@ .ds doc-str-Lb-libfetch File Transfer Library (libfetch, \-lfetch) .ds doc-str-Lb-libgeom Userland API Library for kernel GEOM subsystem (libgeom, \-lgeom) .ds doc-str-Lb-libipx IPX Address Conversion Support Library (libipx, \-lipx) +.ds doc-str-Lb-libkiconv Kernel side iconv library (libkiconv, \-lkiconv) .ds doc-str-Lb-libmd Message Digest (MD4, MD5, etc.) Support Library (libmd, \-lmd) .ds doc-str-Lb-libnetgraph Netgraph User Library (libnetgraph, \-lnetgraph) .ds doc-str-Lb-libpam PAM Library (libpam, \-lpam) ==== //depot/projects/ia64/lib/Makefile#38 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 -# $FreeBSD: src/lib/Makefile,v 1.171 2003/08/29 10:35:00 phk Exp $ +# $FreeBSD: src/lib/Makefile,v 1.172 2003/09/26 20:26:20 fjoe Exp $ # To satisfy shared library or ELF linkage when only the libraries being # built are visible: @@ -26,7 +26,7 @@ ${_compat} libalias ${_libatm} ${_libbind} libbz2 libc ${_libc_r} \ libcalendar libcam libcompat libdevinfo libdevstat ${_libdisk} \ libedit libexpat libfetch libform libftpio libgeom ${_libio} libipsec \ - libipx libisc libmenu ${_libmilter} ${_libmp} ${_libncp} \ + libipx libisc libkiconv libmenu ${_libmilter} ${_libmp} ${_libncp} \ libnetgraph libopie libpam libpanel libpcap ${_libpthread} \ ${_libsm} ${_libsmb} ${_libsmdb} ${_libsmutil} \ libstand libtelnet ${_libthr} libufs libugidfw ${_libusbhid} \ ==== //depot/projects/ia64/lib/libc/stdlib/malloc.c#19 (text+ko) ==== @@ -9,17 +9,17 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.77 2003/07/29 11:16:14 phk Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.79 2003/09/27 18:58:26 phk Exp $"); /* - * Defining EXTRA_SANITY will enable extra checks which are related + * Defining MALLOC_EXTRA_SANITY will enable extra checks which are related * to internal conditions and consistency in malloc.c. This has a * noticeable runtime performance hit, and generally will not do you * any good unless you fiddle with the internals of malloc or want * to catch random pointer corruption as early as possible. */ -#ifndef MALLOC_EXTRA_SANITY -#undef MALLOC_EXTRA_SANITY +#ifndef MALLOC_MALLOC_EXTRA_SANITY +#undef MALLOC_MALLOC_EXTRA_SANITY #endif /* @@ -76,8 +76,8 @@ # include "libc_private.h" # include "spinlock.h" static spinlock_t thread_lock = _SPINLOCK_INITIALIZER; -# define THREAD_LOCK() if (__isthreaded) _SPINLOCK(&thread_lock); -# define THREAD_UNLOCK() if (__isthreaded) _SPINUNLOCK(&thread_lock); +# define _MALLOC_LOCK() if (__isthreaded) _SPINLOCK(&thread_lock); +# define _MALLOC_UNLOCK() if (__isthreaded) _SPINUNLOCK(&thread_lock); #endif /* __FreeBSD__ */ #if defined(__sparc__) && defined(sun) @@ -184,12 +184,12 @@ #define pageround(foo) (((foo) + (malloc_pagemask))&(~(malloc_pagemask))) #define ptr2index(foo) (((u_long)(foo) >> malloc_pageshift)-malloc_origo) -#ifndef THREAD_LOCK -#define THREAD_LOCK() +#ifndef _MALLOC_LOCK +#define _MALLOC_LOCK() #endif -#ifndef THREAD_UNLOCK -#define THREAD_UNLOCK() +#ifndef _MALLOC_UNLOCK +#define _MALLOC_UNLOCK() #endif #ifndef MMAP_FD @@ -331,22 +331,22 @@ result = (caddr_t)pageround((u_long)sbrk(0)); tail = result + (pages << malloc_pageshift); if (tail < result) - return 0; + return (NULL); if (brk(tail)) { -#ifdef EXTRA_SANITY - wrterror("(ES): map_pages fails\n"); -#endif /* EXTRA_SANITY */ - return 0; +#ifdef MALLOC_EXTRA_SANITY + wrterror("(ES): map_pages fails.\n"); +#endif /* MALLOC_EXTRA_SANITY */ + return (NULL); } last_index = ptr2index(tail) - 1; malloc_brk = tail; if ((last_index+1) >= malloc_ninfo && !extend_pgdir(last_index)) - return 0;; + return (NULL); - return result; + return (result); } /* @@ -383,8 +383,8 @@ /* Get new pages */ new = (struct pginfo**) MMAP(i * malloc_pagesize); - if (new == (struct pginfo **)-1) - return 0; + if (new == MAP_FAILED) + return (0); /* Copy the old stuff */ memcpy(new, page_dir, @@ -399,7 +399,7 @@ /* Now free the old stuff */ munmap(old, oldlen); - return 1; + return (1); } /* @@ -421,9 +421,9 @@ malloc_pageshift++; #endif -#ifdef EXTRA_SANITY +#ifdef MALLOC_EXTRA_SANITY malloc_junk = 1; -#endif /* EXTRA_SANITY */ +#endif /* MALLOC_EXTRA_SANITY */ for (i = 0; i < 3; i++) { if (i == 0) { @@ -439,7 +439,7 @@ } else { p = _malloc_options; } - for (; p && *p; p++) { + for (; p != NULL && *p != '\0'; p++) { switch (*p) { case '>': malloc_cache <<= 1; break; case '<': malloc_cache >>= 1; break; @@ -464,7 +464,7 @@ default: j = malloc_abort; malloc_abort = 0; - wrtwarning("unknown char in MALLOC_OPTIONS\n"); + wrtwarning("unknown char in MALLOC_OPTIONS.\n"); malloc_abort = j; break; } @@ -498,7 +498,7 @@ page_dir = (struct pginfo **) MMAP(malloc_pagesize); if (page_dir == (struct pginfo **) -1) - wrterror("mmap(2) failed, check limits\n"); + wrterror("mmap(2) failed, check limits.\n"); /* * We need a maximum of malloc_pageshift buckets, steal these from the @@ -509,6 +509,9 @@ malloc_ninfo = malloc_pagesize / sizeof *page_dir; + /* Been here, done that */ + malloc_started++; + /* Recalculate the cache size in bytes, and make sure it's nonzero */ if (!malloc_cache) @@ -521,9 +524,6 @@ * We can sbrk(2) further back when we keep this on a low address. */ px = (struct pgfree *) imalloc (sizeof *px); - - /* Been here, done that */ - malloc_started++; } /* @@ -532,41 +532,41 @@ static void * malloc_pages(size_t size) { - void *p, *delay_free = 0; + void *p, *delay_free = NULL; size_t i; struct pgfree *pf; u_long index; size = pageround(size); - p = 0; + p = NULL; /* Look for free pages before asking for more */ for(pf = free_list.next; pf; pf = pf->next) { -#ifdef EXTRA_SANITY +#ifdef MALLOC_EXTRA_SANITY if (pf->size & malloc_pagemask) - wrterror("(ES): junk length entry on free_list\n"); + wrterror("(ES): junk length entry on free_list.\n"); if (!pf->size) - wrterror("(ES): zero length entry on free_list\n"); + wrterror("(ES): zero length entry on free_list.\n"); if (pf->page == pf->end) - wrterror("(ES): zero entry on free_list\n"); + wrterror("(ES): zero entry on free_list.\n"); if (pf->page > pf->end) - wrterror("(ES): sick entry on free_list\n"); + wrterror("(ES): sick entry on free_list.\n"); if ((void*)pf->page >= (void*)sbrk(0)) - wrterror("(ES): entry on free_list past brk\n"); + wrterror("(ES): entry on free_list past brk.\n"); if (page_dir[ptr2index(pf->page)] != MALLOC_FREE) - wrterror("(ES): non-free first page on free-list\n"); + wrterror("(ES): non-free first page on free-list.\n"); if (page_dir[ptr2index(pf->end)-1] != MALLOC_FREE) - wrterror("(ES): non-free last page on free-list\n"); -#endif /* EXTRA_SANITY */ + wrterror("(ES): non-free last page on free-list.\n"); +#endif /* MALLOC_EXTRA_SANITY */ if (pf->size < size) continue; if (pf->size == size) { p = pf->page; - if (pf->next) + if (pf->next != NULL) pf->next->prev = pf->prev; pf->prev->next = pf->next; delay_free = pf; @@ -579,18 +579,18 @@ break; } -#ifdef EXTRA_SANITY - if (p && page_dir[ptr2index(p)] != MALLOC_FREE) - wrterror("(ES): allocated non-free page on free-list\n"); -#endif /* EXTRA_SANITY */ +#ifdef MALLOC_EXTRA_SANITY + if (p != NULL && page_dir[ptr2index(p)] != MALLOC_FREE) + wrterror("(ES): allocated non-free page on free-list.\n"); +#endif /* MALLOC_EXTRA_SANITY */ size >>= malloc_pageshift; /* Map new pages */ - if (!p) + if (p == NULL) p = map_pages(size); - if (p) { + if (p != NULL) { index = ptr2index(p); page_dir[index] = MALLOC_FIRST; @@ -602,13 +602,13 @@ } if (delay_free) { - if (!px) + if (px == NULL) px = delay_free; else ifree(delay_free); } - return p; + return (p); } /* @@ -624,8 +624,8 @@ /* Allocate a new bucket */ pp = malloc_pages(malloc_pagesize); - if (!pp) - return 0; + if (pp == NULL) + return (0); /* Find length of admin structure */ l = offsetof(struct pginfo, bits[0]); @@ -637,9 +637,9 @@ bp = (struct pginfo *)pp; } else { bp = (struct pginfo *)imalloc(l); - if (!bp) { + if (bp == NULL) { ifree(pp); - return 0; + return (0); } } @@ -678,7 +678,7 @@ /* MALLOC_UNLOCK */ - return 1; + return (1); } /* @@ -704,8 +704,8 @@ j++; /* If it's empty, make a page more of that size chunks */ - if (!page_dir[j] && !malloc_make_chunks(j)) - return 0; + if (page_dir[j] == NULL && !malloc_make_chunks(j)) + return (NULL); bp = page_dir[j]; @@ -725,7 +725,7 @@ /* If there are no more free, remove from free-list */ if (!--bp->free) { page_dir[j] = bp->next; - bp->next = 0; + bp->next = NULL; } /* Adjust to the real offset of that chunk */ @@ -735,7 +735,7 @@ if (malloc_junk) memset((u_char*)bp->page + k, SOME_JUNK, bp->size); - return (u_char *)bp->page + k; + return ((u_char *)bp->page + k); } /* @@ -746,22 +746,28 @@ { void *result; + if (!malloc_started) + malloc_init(); + if (suicide) abort(); if ((size + malloc_pagesize) < size) /* Check for overflow */ - result = 0; + result = NULL; else if ((size + malloc_pagesize) >= (uintptr_t)page_dir) - result = 0; + result = NULL; else if (size <= malloc_maxsize) - result = malloc_bytes(size); + result = malloc_bytes(size); else - result = malloc_pages(size); + result = malloc_pages(size); + + if (malloc_abort && result == NULL) + wrterror("allocation failed.\n"); - if (malloc_zero && result) + if (malloc_zero && result != NULL) memset(result, 0, size); - return result; + return (result); } /* @@ -778,16 +784,21 @@ if (suicide) abort(); + if (!malloc_started) { + wrtwarning("malloc() has never been called.\n"); + return (NULL); + } + index = ptr2index(ptr); if (index < malloc_pageshift) { - wrtwarning("junk pointer, too low to make sense\n"); - return 0; + wrtwarning("junk pointer, too low to make sense.\n"); + return (NULL); } if (index > last_index) { - wrtwarning("junk pointer, too high to make sense\n"); - return 0; + wrtwarning("junk pointer, too high to make sense.\n"); + return (NULL); } mp = &page_dir[index]; @@ -796,26 +807,28 @@ /* Check the pointer */ if ((u_long)ptr & malloc_pagemask) { - wrtwarning("modified (page-) pointer\n"); - return 0; + wrtwarning("modified (page-) pointer.\n"); + return (NULL); } /* Find the size in bytes */ - for (osize = malloc_pagesize; *++mp == MALLOC_FOLLOW;) + for (osize = malloc_pagesize; *(++mp) == MALLOC_FOLLOW;) osize += malloc_pagesize; - if (!malloc_realloc && /* unless we have to, */ + if (!malloc_realloc && /* Unless we have to, */ size <= osize && /* .. or are too small, */ size > (osize - malloc_pagesize)) { /* .. or can free a page, */ - return ptr; /* don't do anything. */ + if (malloc_junk) + memset((char *)ptr + size, SOME_JUNK, osize-size); + return (ptr); /* ..don't do anything else. */ } } else if (*mp >= MALLOC_MAGIC) { /* Chunk allocation */ /* Check the pointer for sane values */ if (((u_long)ptr & ((*mp)->size-1))) { - wrtwarning("modified (chunk-) pointer\n"); - return 0; + wrtwarning("modified (chunk-) pointer.\n"); + return (NULL); } /* Find the chunk index in the page */ @@ -823,27 +836,29 @@ /* Verify that it isn't a free chunk already */ if ((*mp)->bits[i/MALLOC_BITS] & (1<<(i%MALLOC_BITS))) { - wrtwarning("chunk is already free\n"); - return 0; + wrtwarning("chunk is already free.\n"); + return (NULL); } osize = (*mp)->size; if (!malloc_realloc && /* Unless we have to, */ - size < osize && /* ..or are too small, */ + size <= osize && /* ..or are too small, */ (size > osize/2 || /* ..or could use a smaller size, */ osize == malloc_minsize)) { /* ..(if there is one) */ - return ptr; /* ..Don't do anything */ + if (malloc_junk) + memset((char *)ptr + size, SOME_JUNK, osize-size); + return (ptr); /* ..don't do anything else. */ } } else { - wrtwarning("pointer to wrong page\n"); - return 0; + wrtwarning("pointer to wrong page.\n"); + return (NULL); } p = imalloc(size); - if (p) { + if (p != NULL) { /* copy the lesser of the two sizes, and free the old one */ if (!size || !osize) ; @@ -853,7 +868,7 @@ memcpy(p, ptr, size); ifree(ptr); } - return p; + return (p); } /* @@ -864,22 +879,22 @@ free_pages(void *ptr, u_long index, struct pginfo const *info) { u_long i; - struct pgfree *pf, *pt=0; + struct pgfree *pf, *pt=NULL; u_long l; void *tail; if (info == MALLOC_FREE) { - wrtwarning("page is already free\n"); + wrtwarning("page is already free.\n"); return; } if (info != MALLOC_FIRST) { - wrtwarning("pointer to wrong page\n"); + wrtwarning("pointer to wrong page.\n"); return; } if ((u_long)ptr & malloc_pagemask) { - wrtwarning("modified (page-) pointer\n"); + wrtwarning("modified (page-) pointer.\n"); return; } @@ -899,26 +914,27 @@ tail = (char *)ptr+l; /* add to free-list */ - if (!px) - px = imalloc(sizeof *pt); /* This cannot fail... */ + if (px == NULL) + px = imalloc(sizeof *px); /* This cannot fail... */ px->page = ptr; px->end = tail; px->size = l; - if (!free_list.next) { + if (free_list.next == NULL) { /* Nothing on free list, put this at head */ px->next = free_list.next; px->prev = &free_list; free_list.next = px; pf = px; - px = 0; + px = NULL; } else { /* Find the right spot, leave pf pointing to the modified entry. */ tail = (char *)ptr+l; - for(pf = free_list.next; pf->end < ptr && pf->next; pf = pf->next) + for(pf = free_list.next; pf->end < ptr && pf->next != NULL; + pf = pf->next) ; /* Race ahead here */ if (pf->page > tail) { @@ -928,38 +944,38 @@ pf->prev = px; px->prev->next = px; pf = px; - px = 0; + px = NULL; } else if (pf->end == ptr ) { /* Append to the previous entry */ pf->end = (char *)pf->end + l; pf->size += l; - if (pf->next && pf->end == pf->next->page ) { + if (pf->next != NULL && pf->end == pf->next->page ) { /* And collapse the next too. */ pt = pf->next; pf->end = pt->end; pf->size += pt->size; pf->next = pt->next; - if (pf->next) + if (pf->next != NULL) pf->next->prev = pf; } } else if (pf->page == tail) { /* Prepend to entry */ pf->size += l; pf->page = ptr; - } else if (!pf->next) { + } else if (pf->next == NULL) { /* Append at tail of chain */ - px->next = 0; + px->next = NULL; px->prev = pf; pf->next = px; pf = px; - px = 0; + px = NULL; } else { - wrterror("freelist is destroyed\n"); + wrterror("freelist is destroyed.\n"); } } /* Return something to OS ? */ - if (!pf->next && /* If we're the last one, */ + if (pf->next == NULL && /* If we're the last one, */ pf->size > malloc_cache && /* ..and the cache is full, */ pf->end == malloc_brk && /* ..and none behind us, */ malloc_brk == sbrk(0)) { /* ..and it's OK to do... */ @@ -983,7 +999,7 @@ /* XXX: We could realloc/shrink the pagedir here I guess. */ } - if (pt) + if (pt != NULL) ifree(pt); } @@ -1002,12 +1018,12 @@ i = ((u_long)ptr & malloc_pagemask) >> info->shift; if (((u_long)ptr & (info->size-1))) { - wrtwarning("modified (chunk-) pointer\n"); + wrtwarning("modified (chunk-) pointer.\n"); return; } if (info->bits[i/MALLOC_BITS] & (1<<(i%MALLOC_BITS))) { - wrtwarning("chunk is already free\n"); + wrtwarning("chunk is already free.\n"); return; } @@ -1038,10 +1054,10 @@ /* Find & remove this page in the queue */ while (*mp != info) { mp = &((*mp)->next); -#ifdef EXTRA_SANITY +#ifdef MALLOC_EXTRA_SANITY if (!*mp) - wrterror("(ES): Not on queue\n"); -#endif /* EXTRA_SANITY */ + wrterror("(ES): Not on queue.\n"); +#endif /* MALLOC_EXTRA_SANITY */ } *mp = info->next; @@ -1060,11 +1076,11 @@ u_long index; /* This is legal */ - if (!ptr) + if (ptr == NULL) return; if (!malloc_started) { - wrtwarning("malloc() has never been called\n"); + wrtwarning("malloc() has never been called.\n"); return; } @@ -1075,12 +1091,12 @@ index = ptr2index(ptr); if (index < malloc_pageshift) { - wrtwarning("junk pointer, too low to make sense\n"); + wrtwarning("junk pointer, too low to make sense.\n"); return; } if (index > last_index) { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Sep 27 17:27:00 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0EAD716A4C0; Sat, 27 Sep 2003 17:27:00 -0700 (PDT) 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 DD62F16A4B3 for ; Sat, 27 Sep 2003 17:26:59 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7882243FF3 for ; Sat, 27 Sep 2003 17:26:58 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8S0QwXJ090206 for ; Sat, 27 Sep 2003 17:26:58 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8S0QuaG090203 for perforce@freebsd.org; Sat, 27 Sep 2003 17:26:56 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Sat, 27 Sep 2003 17:26:56 -0700 (PDT) Message-Id: <200309280026.h8S0QuaG090203@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 38730 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2003 00:27:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=38730 Change 38730 by marcel@marcel_nfs on 2003/09/27 17:26:49 IFC @38726 Affected files ... .. //depot/projects/uart/alpha/alpha/promcons.c#3 integrate .. //depot/projects/uart/alpha/tlsb/zs_tlsb.c#3 integrate .. //depot/projects/uart/amd64/amd64/pmap.c#18 integrate .. //depot/projects/uart/amd64/include/pmap.h#3 integrate .. //depot/projects/uart/conf/NOTES#16 integrate .. //depot/projects/uart/conf/files#25 integrate .. //depot/projects/uart/conf/options#13 integrate .. //depot/projects/uart/dev/acpica/Osd/OsdSynch.c#3 integrate .. //depot/projects/uart/dev/acpica/acpi.c#13 integrate .. //depot/projects/uart/dev/acpica/acpi_acad.c#5 integrate .. //depot/projects/uart/dev/acpica/acpi_cmbat.c#6 integrate .. //depot/projects/uart/dev/acpica/acpi_ec.c#10 integrate .. //depot/projects/uart/dev/acpica/acpi_resource.c#5 integrate .. //depot/projects/uart/dev/acpica/acpi_thermal.c#4 integrate .. //depot/projects/uart/dev/adlink/adlink.c#5 integrate .. //depot/projects/uart/dev/asr/asr.c#5 integrate .. //depot/projects/uart/dev/ata/ata-all.c#7 integrate .. //depot/projects/uart/dev/digi/digi.c#3 integrate .. //depot/projects/uart/dev/fb/fb.c#4 integrate .. //depot/projects/uart/dev/fb/fbreg.h#3 integrate .. //depot/projects/uart/dev/gfb/gfb_pci.c#4 integrate .. //depot/projects/uart/dev/iir/iir.c#4 integrate .. //depot/projects/uart/dev/iir/iir.h#2 integrate .. //depot/projects/uart/dev/iir/iir_ctrl.c#3 integrate .. //depot/projects/uart/dev/iir/iir_pci.c#6 integrate .. //depot/projects/uart/dev/isp/isp_freebsd.c#4 integrate .. //depot/projects/uart/dev/kbd/kbd.c#3 integrate .. //depot/projects/uart/dev/kbd/kbdreg.h#2 integrate .. //depot/projects/uart/dev/md/md.c#4 integrate .. //depot/projects/uart/dev/null/null.c#3 integrate .. //depot/projects/uart/dev/ofw/ofw_console.c#3 integrate .. //depot/projects/uart/dev/ofw/openfirmio.c#3 integrate .. //depot/projects/uart/dev/sab/sab.c#4 integrate .. //depot/projects/uart/dev/sio/sio.c#9 integrate .. //depot/projects/uart/dev/syscons/syscons.c#5 integrate .. //depot/projects/uart/dev/uart/uart_tty.c#17 integrate .. //depot/projects/uart/dev/zs/zs.c#4 integrate .. //depot/projects/uart/fs/fdescfs/fdesc_vnops.c#2 integrate .. //depot/projects/uart/fs/msdosfs/direntry.h#2 integrate .. //depot/projects/uart/fs/msdosfs/msdosfs_conv.c#2 integrate .. //depot/projects/uart/fs/msdosfs/msdosfs_iconv.c#1 branch .. //depot/projects/uart/fs/msdosfs/msdosfs_lookup.c#2 integrate .. //depot/projects/uart/fs/msdosfs/msdosfs_vfsops.c#4 integrate .. //depot/projects/uart/fs/msdosfs/msdosfs_vnops.c#4 integrate .. //depot/projects/uart/fs/msdosfs/msdosfsmount.h#3 integrate .. //depot/projects/uart/fs/ntfs/ntfs.h#2 integrate .. //depot/projects/uart/fs/ntfs/ntfs_iconv.c#1 branch .. //depot/projects/uart/fs/ntfs/ntfs_subr.c#3 integrate .. //depot/projects/uart/fs/ntfs/ntfs_subr.h#2 integrate .. //depot/projects/uart/fs/ntfs/ntfs_vfsops.c#4 integrate .. //depot/projects/uart/fs/ntfs/ntfs_vnops.c#2 integrate .. //depot/projects/uart/fs/ntfs/ntfsmount.h#2 integrate .. //depot/projects/uart/fs/smbfs/smbfs_vfsops.c#3 integrate .. //depot/projects/uart/fs/smbfs/smbfs_vnops.c#3 integrate .. //depot/projects/uart/geom/geom_ctl.c#3 integrate .. //depot/projects/uart/geom/geom_io.c#4 integrate .. //depot/projects/uart/i386/bios/smapi.c#2 integrate .. //depot/projects/uart/i386/i386/elan-mmcr.c#4 integrate .. //depot/projects/uart/i386/i386/pmap.c#19 integrate .. //depot/projects/uart/i386/isa/cy.c#2 integrate .. //depot/projects/uart/i386/isa/pcvt/pcvt_drv.c#4 integrate .. //depot/projects/uart/ia64/ia64/ssc.c#2 integrate .. //depot/projects/uart/isa/vga_isa.c#2 integrate .. //depot/projects/uart/isofs/cd9660/cd9660_iconv.c#1 branch .. //depot/projects/uart/isofs/cd9660/cd9660_lookup.c#3 integrate .. //depot/projects/uart/isofs/cd9660/cd9660_mount.h#2 integrate .. //depot/projects/uart/isofs/cd9660/cd9660_rrip.c#2 integrate .. //depot/projects/uart/isofs/cd9660/cd9660_util.c#2 integrate .. //depot/projects/uart/isofs/cd9660/cd9660_vfsops.c#4 integrate .. //depot/projects/uart/isofs/cd9660/cd9660_vnops.c#2 integrate .. //depot/projects/uart/isofs/cd9660/iso.h#2 integrate .. //depot/projects/uart/kern/kern_conf.c#2 integrate .. //depot/projects/uart/kern/kern_exec.c#4 integrate .. //depot/projects/uart/kern/kern_sig.c#10 integrate .. //depot/projects/uart/kern/subr_devstat.c#3 integrate .. //depot/projects/uart/kern/subr_xxx.c#2 delete .. //depot/projects/uart/kern/sys_generic.c#3 integrate .. //depot/projects/uart/kern/tty_cons.c#3 integrate .. //depot/projects/uart/kern/tty_pty.c#2 integrate .. //depot/projects/uart/kern/tty_tty.c#2 integrate .. //depot/projects/uart/kern/vfs_default.c#2 integrate .. //depot/projects/uart/kern/vfs_mount.c#4 integrate .. //depot/projects/uart/libkern/iconv.c#2 integrate .. //depot/projects/uart/libkern/iconv_converter_if.m#2 integrate .. //depot/projects/uart/libkern/iconv_xlat.c#2 integrate .. //depot/projects/uart/libkern/iconv_xlat16.c#1 branch .. //depot/projects/uart/modules/Makefile#10 integrate .. //depot/projects/uart/modules/cd9660/Makefile#2 integrate .. //depot/projects/uart/modules/cd9660_iconv/Makefile#1 branch .. //depot/projects/uart/modules/libiconv/Makefile#2 integrate .. //depot/projects/uart/modules/msdosfs/Makefile#2 integrate .. //depot/projects/uart/modules/msdosfs_iconv/Makefile#1 branch .. //depot/projects/uart/modules/ntfs/Makefile#2 integrate .. //depot/projects/uart/modules/ntfs_iconv/Makefile#1 branch .. //depot/projects/uart/net/if_tun.c#2 integrate .. //depot/projects/uart/net/if_tunvar.h#2 integrate .. //depot/projects/uart/net80211/ieee80211_ioctl.c#5 integrate .. //depot/projects/uart/net80211/ieee80211_ioctl.h#2 integrate .. //depot/projects/uart/net80211/ieee80211_node.c#7 integrate .. //depot/projects/uart/net80211/ieee80211_node.h#5 integrate .. //depot/projects/uart/net80211/ieee80211_proto.c#3 integrate .. //depot/projects/uart/net80211/ieee80211_var.h#5 integrate .. //depot/projects/uart/netncp/ncp_mod.c#2 integrate .. //depot/projects/uart/netsmb/smb_dev.c#2 integrate .. //depot/projects/uart/opencrypto/cryptodev.c#2 integrate .. //depot/projects/uart/pc98/pc98/pc98gdc.c#3 integrate .. //depot/projects/uart/pc98/pc98/sio.c#5 integrate .. //depot/projects/uart/powerpc/include/cpu.h#3 integrate .. //depot/projects/uart/powerpc/powerpc/clock.c#2 integrate .. //depot/projects/uart/powerpc/powerpc/cpu.c#2 integrate .. //depot/projects/uart/sys/conf.h#2 integrate .. //depot/projects/uart/sys/cons.h#2 integrate .. //depot/projects/uart/sys/iconv.h#2 integrate .. //depot/projects/uart/sys/param.h#10 integrate .. //depot/projects/uart/sys/signalvar.h#3 integrate .. //depot/projects/uart/sys/systm.h#4 integrate .. //depot/projects/uart/vm/uma_dbg.c#3 integrate .. //depot/projects/uart/vm/vm_map.c#10 integrate .. //depot/projects/uart/vm/vm_map.h#6 integrate .. //depot/projects/uart/vm/vm_mmap.c#6 integrate Differences ... ==== //depot/projects/uart/alpha/alpha/promcons.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/promcons.c,v 1.30 2003/08/22 07:20:25 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/promcons.c,v 1.31 2003/09/26 10:52:16 phk Exp $"); #include #include @@ -250,7 +250,7 @@ promcnattach(int alpha_console) { prom_consdev.cn_pri = CN_NORMAL; - prom_consdev.cn_dev = makedev(CDEV_MAJOR, 0); + sprintf(prom_consdev.cn_name, "promcons"); make_dev(&prom_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "promcons"); cnadd(&prom_consdev); promcn_attached = 1; ==== //depot/projects/uart/alpha/tlsb/zs_tlsb.c#3 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/tlsb/zs_tlsb.c,v 1.37 2003/08/22 07:20:27 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/tlsb/zs_tlsb.c,v 1.39 2003/09/26 19:35:49 phk Exp $"); #include "opt_ddb.h" @@ -227,7 +227,8 @@ /* should really bet part of ivars */ zs_console_addr = (caddr_t) ALPHA_PHYS_TO_K0SEG(base + offset); - zs_consdev.cn_dev = makedev(CDEV_MAJOR, 0); + sprintf(zs_consdev.cn_name, "zs0"); + zs_consdev.cn_unit = 0; zs_consdev.cn_pri = CN_NORMAL; make_dev(&zs_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "zs0"); cnadd(&zs_consdev); @@ -238,7 +239,7 @@ zs_cngetc(struct consdev *cp) { int s = spltty(); - int c = zs_getc(zs_console_addr, minor(cp->cn_dev)); + int c = zs_getc(zs_console_addr, cp->cn_unit); splx(s); return c; } @@ -247,7 +248,7 @@ zs_cncheckc(struct consdev *cp) { int s = spltty(); - int c = zs_maygetc(zs_console_addr, minor(cp->cn_dev)); + int c = zs_maygetc(zs_console_addr, cp->cn_unit); splx(s); return c; } @@ -256,7 +257,7 @@ zs_cnputc(struct consdev *cp, int c) { int s = spltty(); - zs_putc(zs_console_addr, minor(cp->cn_dev), c); + zs_putc(zs_console_addr, cp->cn_unit, c); splx(s); } ==== //depot/projects/uart/amd64/amd64/pmap.c#18 (text+ko) ==== @@ -73,7 +73,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.439 2003/09/26 04:12:41 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.440 2003/09/27 20:53:00 alc Exp $"); /* * Manages physical address maps. @@ -1015,12 +1015,6 @@ static vm_pindex_t color; /* - * allocate object for the ptes - */ - if (pmap->pm_pteobj == NULL) - pmap->pm_pteobj = vm_object_allocate(OBJT_DEFAULT, NUPDE + NUPDPE + NUPML4E + 1); - - /* * allocate the page directory page */ while ((pml4pg = vm_page_alloc(NULL, color++, VM_ALLOC_NOOBJ | @@ -1068,6 +1062,11 @@ /* * this routine is called if the page table page is not * mapped correctly. + * + * Note: If a page allocation fails at page table level two or three, + * one or two pages may be held during the wait, only to be released + * afterwards. This conservative approach is easily argued to avoid + * race conditions. */ static vm_page_t _pmap_allocpte(pmap, ptepindex) @@ -1075,15 +1074,19 @@ vm_pindex_t ptepindex; { vm_page_t m, pdppg, pdpg; - int is_object_locked; /* - * Find or fabricate a new pagetable page + * Allocate a page table page. */ - if (!(is_object_locked = VM_OBJECT_LOCKED(pmap->pm_pteobj))) - VM_OBJECT_LOCK(pmap->pm_pteobj); - m = vm_page_grab(pmap->pm_pteobj, ptepindex, - VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_RETRY); + if ((m = vm_page_alloc(NULL, ptepindex, VM_ALLOC_NOOBJ | + VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) { + VM_WAIT; + /* + * Indicate the need to retry. While waiting, the page table + * page may have been allocated. + */ + return (NULL); + } if ((m->flags & PG_ZERO) == 0) pmap_zero_page(m); @@ -1125,7 +1128,13 @@ pml4 = &pmap->pm_pml4[pml4index]; if ((*pml4 & PG_V) == 0) { /* Have to allocate a new pdp, recurse */ - _pmap_allocpte(pmap, NUPDE + NUPDPE + pml4index); + if (_pmap_allocpte(pmap, NUPDE + NUPDPE + pml4index) == NULL) { + vm_page_lock_queues(); + vm_page_unhold(m); + vm_page_free(m); + vm_page_unlock_queues(); + return (NULL); + } } else { /* Add reference to pdp page */ pdppg = PHYS_TO_VM_PAGE(*pml4); @@ -1152,7 +1161,13 @@ pml4 = &pmap->pm_pml4[pml4index]; if ((*pml4 & PG_V) == 0) { /* Have to allocate a new pd, recurse */ - _pmap_allocpte(pmap, NUPDE + pdpindex); + if (_pmap_allocpte(pmap, NUPDE + pdpindex) == NULL) { + vm_page_lock_queues(); + vm_page_unhold(m); + vm_page_free(m); + vm_page_unlock_queues(); + return (NULL); + } pdp = (pdp_entry_t *)PHYS_TO_DMAP(*pml4 & PG_FRAME); pdp = &pdp[pdpindex & ((1ul << NPDPEPGSHIFT) - 1)]; } else { @@ -1160,7 +1175,13 @@ pdp = &pdp[pdpindex & ((1ul << NPDPEPGSHIFT) - 1)]; if ((*pdp & PG_V) == 0) { /* Have to allocate a new pd, recurse */ - _pmap_allocpte(pmap, NUPDE + pdpindex); + if (_pmap_allocpte(pmap, NUPDE + pdpindex) == NULL) { + vm_page_lock_queues(); + vm_page_unhold(m); + vm_page_free(m); + vm_page_unlock_queues(); + return (NULL); + } } else { /* Add reference to the pd page */ pdpg = PHYS_TO_VM_PAGE(*pdp); @@ -1179,8 +1200,6 @@ vm_page_flag_clear(m, PG_ZERO); vm_page_wakeup(m); vm_page_unlock_queues(); - if (!is_object_locked) - VM_OBJECT_UNLOCK(pmap->pm_pteobj); return m; } @@ -1196,7 +1215,7 @@ * Calculate pagetable page index */ ptepindex = pmap_pde_pindex(va); - +retry: /* * Get the page directory entry */ @@ -1219,13 +1238,16 @@ if (pd != 0 && (*pd & PG_V) != 0) { m = PHYS_TO_VM_PAGE(*pd); m->hold_count++; - return m; + } else { + /* + * Here if the pte page isn't mapped, or if it has been + * deallocated. + */ + m = _pmap_allocpte(pmap, ptepindex); + if (m == NULL) + goto retry; } - /* - * Here if the pte page isn't mapped, or if it has been deallocated. - */ - m = _pmap_allocpte(pmap, ptepindex); - return m; + return (m); } @@ -1258,8 +1280,6 @@ vm_page_busy(m); vm_page_free(m); vm_page_unlock_queues(); - KASSERT(TAILQ_EMPTY(&pmap->pm_pteobj->memq), - ("pmap_release: leaking page table pages")); } static int @@ -1955,6 +1975,7 @@ if (mpte && (mpte->pindex == ptepindex)) { mpte->hold_count++; } else { + retry: /* * Get the page directory entry */ @@ -1971,6 +1992,8 @@ mpte->hold_count++; } else { mpte = _pmap_allocpte(pmap, ptepindex); + if (mpte == NULL) + goto retry; } } } else { ==== //depot/projects/uart/amd64/include/pmap.h#3 (text+ko) ==== @@ -42,7 +42,7 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.105 2003/07/09 23:04:23 peter Exp $ + * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.106 2003/09/27 20:53:01 alc Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -219,7 +219,6 @@ struct pmap { pml4_entry_t *pm_pml4; /* KVA of level 4 page table */ - vm_object_t pm_pteobj; /* Container for pte's */ TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */ u_long pm_active; /* active on cpus */ struct pmap_statistics pm_stats; /* pmap statistics */ ==== //depot/projects/uart/conf/NOTES#16 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1177 2003/09/25 16:06:17 sam Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1178 2003/09/26 20:26:22 fjoe Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -788,6 +788,12 @@ # Cryptographically secure random number generator; /dev/[u]random device random +# Optional character code conversion support with LIBICONV. +# Each option requires their base file system and LIBICONV. +options CD9660_ICONV +options MSDOSFS_ICONV +options NTFS_ICONV + ##################################################################### # POSIX P1003.1B ==== //depot/projects/uart/conf/files#25 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.825 2003/09/14 17:02:59 takawata Exp $ +# $FreeBSD: src/sys/conf/files,v 1.827 2003/09/27 12:53:32 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -893,11 +893,13 @@ fs/msdosfs/msdosfs_lookup.c optional msdosfs fs/msdosfs/msdosfs_vfsops.c optional msdosfs fs/msdosfs/msdosfs_vnops.c optional msdosfs +fs/msdosfs/msdosfs_iconv.c optional msdosfs_iconv fs/ntfs/ntfs_compr.c optional ntfs fs/ntfs/ntfs_ihash.c optional ntfs fs/ntfs/ntfs_subr.c optional ntfs fs/ntfs/ntfs_vfsops.c optional ntfs fs/ntfs/ntfs_vnops.c optional ntfs +fs/ntfs/ntfs_iconv.c optional ntfs_iconv fs/nullfs/null_subr.c optional nullfs fs/nullfs/null_vfsops.c optional nullfs fs/nullfs/null_vnops.c optional nullfs @@ -1056,6 +1058,7 @@ isofs/cd9660/cd9660_util.c optional cd9660 isofs/cd9660/cd9660_vfsops.c optional cd9660 isofs/cd9660/cd9660_vnops.c optional cd9660 +isofs/cd9660/cd9660_iconv.c optional cd9660_iconv kern/imgact_elf.c standard kern/imgact_shell.c standard kern/inflate.c optional gzip @@ -1144,7 +1147,6 @@ kern/subr_taskqueue.c standard kern/subr_trap.c standard kern/subr_witness.c optional witness -kern/subr_xxx.c standard kern/sys_generic.c standard kern/sys_pipe.c standard kern/sys_process.c standard @@ -1198,6 +1200,7 @@ libkern/iconv.c optional libiconv libkern/iconv_converter_if.m optional libiconv libkern/iconv_xlat.c optional libiconv +libkern/iconv_xlat16.c optional libiconv libkern/index.c standard libkern/inet_ntoa.c standard libkern/mcount.c optional profiling-routine ==== //depot/projects/uart/conf/options#13 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.414 2003/09/11 23:06:41 marcel Exp $ +# $FreeBSD: src/sys/conf/options,v 1.415 2003/09/26 20:26:22 fjoe Exp $ # # On the handling of kernel options # @@ -198,6 +198,11 @@ NFSCLIENT opt_nfs.h NFSSERVER opt_nfs.h +# filesystems and libiconv bridge +CD9660_ICONV opt_dontuse.h +MSDOSFS_ICONV opt_dontuse.h +NTFS_ICONV opt_dontuse.h + # If you are following the conditions in the copyright, # you can enable soft-updates which will speed up a lot of thigs # and make the system safer from crashes at the same time. ==== //depot/projects/uart/dev/acpica/Osd/OsdSynch.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/Osd/OsdSynch.c,v 1.17 2003/07/13 22:57:16 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/Osd/OsdSynch.c,v 1.18 2003/09/26 21:22:10 njl Exp $ */ /* @@ -79,8 +79,9 @@ #endif static int acpi_semaphore_debug = 0; TUNABLE_INT("debug.acpi_semaphore_debug", &acpi_semaphore_debug); -SYSCTL_INT(_debug, OID_AUTO, acpi_semaphore_debug, CTLFLAG_RW, - &acpi_semaphore_debug, 0, ""); +SYSCTL_DECL(_debug_acpi); +SYSCTL_INT(_debug_acpi, OID_AUTO, semaphore_debug, CTLFLAG_RW, + &acpi_semaphore_debug, 0, "Enable ACPI semaphore debug messages"); #endif ACPI_STATUS ==== //depot/projects/uart/dev/acpica/acpi.c#13 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.103 2003/09/26 04:32:40 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.104 2003/09/26 21:22:10 njl Exp $ */ #include "opt_acpi.h" @@ -157,13 +157,10 @@ DRIVER_MODULE(acpi, nexus, acpi_driver, acpi_devclass, acpi_modevent, 0); MODULE_VERSION(acpi, 100); -SYSCTL_INT(_debug, OID_AUTO, acpi_debug_layer, CTLFLAG_RW, &AcpiDbgLayer, 0, - ""); -SYSCTL_INT(_debug, OID_AUTO, acpi_debug_level, CTLFLAG_RW, &AcpiDbgLevel, 0, - ""); -static int acpi_ca_version = ACPI_CA_VERSION; -SYSCTL_INT(_debug, OID_AUTO, acpi_ca_version, CTLFLAG_RD, &acpi_ca_version, 0, - ""); +SYSCTL_NODE(_debug, OID_AUTO, acpi, CTLFLAG_RW, NULL, "ACPI debugging"); +static char acpi_ca_version[12]; +SYSCTL_STRING(_debug_acpi, OID_AUTO, acpi_ca_version, CTLFLAG_RD, + acpi_ca_version, 0, "Version of Intel ACPI-CA"); /* * ACPI can only be loaded as a module by the loader; activating it after @@ -212,6 +209,9 @@ if (resource_disabled("acpi", 0)) return_VOID; + snprintf(acpi_ca_version, sizeof(acpi_ca_version), "0x%x", + ACPI_CA_VERSION); + /* Make sure we're not being doubly invoked. */ if (device_find_child(parent, "acpi", 0) != NULL) return_VOID; @@ -2187,11 +2187,11 @@ { char *cp; - if (!cold) - return; + if (cold) { + AcpiDbgLayer = 0; + AcpiDbgLevel = 0; + } - AcpiDbgLayer = 0; - AcpiDbgLevel = 0; if ((cp = getenv("debug.acpi.layer")) != NULL) { acpi_parse_debug(cp, &dbg_layer[0], &AcpiDbgLayer); freeenv(cp); @@ -2201,11 +2201,61 @@ freeenv(cp); } - printf("ACPI debug layer 0x%x debug level 0x%x\n", AcpiDbgLayer, - AcpiDbgLevel); + if (cold) { + printf("ACPI debug layer 0x%x debug level 0x%x\n", + AcpiDbgLayer, AcpiDbgLevel); + } } SYSINIT(acpi_debugging, SI_SUB_TUNABLES, SI_ORDER_ANY, acpi_set_debugging, NULL); + +static int +acpi_debug_sysctl(SYSCTL_HANDLER_ARGS) +{ + char *options; + int error, len, *dbg; + struct debugtag *tag; + + len = 512; + MALLOC(options, char *, len, M_TEMP, M_WAITOK); + options[0] = '\0'; + + if (strcmp(oidp->oid_arg1, "debug.acpi.layer") == 0) { + tag = &dbg_layer[0]; + dbg = &AcpiDbgLayer; + } else { + tag = &dbg_level[0]; + dbg = &AcpiDbgLevel; + } + + /* Get old values if this is a get request. */ + if (*dbg == 0) { + strlcpy(options, "NONE", sizeof(options)); + } else if (req->newptr == NULL) { + for (; tag->name != NULL; tag++) { + if ((*dbg & tag->value) == tag->value) { + strlcat(options, tag->name, len); + strlcat(options, " ", len); /* XXX */ + } + } + } + + error = sysctl_handle_string(oidp, options, len, req); + + /* If the user is setting a string, parse it. */ + if (error == 0 && req->newptr != NULL) { + *dbg = 0; + setenv((char *)oidp->oid_arg1, (char *)req->newptr); + acpi_set_debugging(NULL); + } + FREE(options, M_TEMP); + + return (error); +} +SYSCTL_PROC(_debug_acpi, OID_AUTO, layer, CTLFLAG_RW | CTLTYPE_STRING, + "debug.acpi.layer", 0, acpi_debug_sysctl, "A", ""); +SYSCTL_PROC(_debug_acpi, OID_AUTO, level, CTLFLAG_RW | CTLTYPE_STRING, + "debug.acpi.level", 0, acpi_debug_sysctl, "A", ""); #endif static int ==== //depot/projects/uart/dev/acpica/acpi_acad.c#5 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi_acad.c,v 1.18 2003/09/14 17:47:44 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi_acad.c,v 1.19 2003/09/26 05:24:55 njl Exp $ */ #include "opt_acpi.h" @@ -137,7 +137,7 @@ if (acpi_get_type(dev) == ACPI_TYPE_DEVICE && acpi_MatchHid(dev, "ACPI0003")) { - device_set_desc(dev, "AC adapter"); + device_set_desc(dev, "AC Adapter"); return (0); } return (ENXIO); ==== //depot/projects/uart/dev/acpica/acpi_cmbat.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.24 2003/09/13 20:13:01 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.25 2003/09/26 05:24:55 njl Exp $ */ #include "opt_acpi.h" @@ -316,7 +316,7 @@ if (acpi_get_type(dev) == ACPI_TYPE_DEVICE && !acpi_disabled("cmbat") && acpi_MatchHid(dev, "PNP0C0A")) { - device_set_desc(dev, "Control method Battery"); + device_set_desc(dev, "Control Method Battery"); return (0); } return (ENXIO); ==== //depot/projects/uart/dev/acpica/acpi_ec.c#10 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.40 2003/09/15 21:20:55 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.41 2003/09/26 05:24:55 njl Exp $ */ /****************************************************************************** * @@ -137,7 +137,7 @@ *****************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.40 2003/09/15 21:20:55 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.41 2003/09/26 05:24:55 njl Exp $"); #include "opt_acpi.h" #include @@ -437,7 +437,7 @@ */ magic = acpi_get_magic(dev); if (DEV_ECDT(dev)) { - snprintf(desc, sizeof(desc), "embedded controller: ECDT, GPE %#x, GLK", + snprintf(desc, sizeof(desc), "Embedded Controller: ECDT, GPE %#x, GLK", DEV_GET_GPEBIT(magic)); device_set_desc_copy(dev, desc); ret = 0; @@ -482,7 +482,7 @@ */ peer = devclass_get_device(acpi_ec_devclass, uid); if (peer == NULL || !device_is_alive(peer)) { - snprintf(desc, sizeof(desc), "embedded controller: GPE %#x%s", + snprintf(desc, sizeof(desc), "Embedded Controller: GPE %#x%s", gpebit, glk != 0 ? ", GLK" : ""); device_set_desc_copy(dev, desc); ret = 0; ==== //depot/projects/uart/dev/acpica/acpi_resource.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_resource.c,v 1.19 2003/09/10 22:06:41 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_resource.c,v 1.20 2003/09/26 05:24:55 njl Exp $"); #include "opt_acpi.h" #include @@ -571,7 +571,7 @@ acpi_sysresource_probe(device_t dev) { if (!acpi_disabled("sysresource") && acpi_MatchHid(dev, "PNP0C02")) - device_set_desc(dev, "system resource"); + device_set_desc(dev, "System Resource"); else return (ENXIO); ==== //depot/projects/uart/dev/acpica/acpi_thermal.c#4 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.31 2003/08/28 16:06:30 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.32 2003/09/26 05:24:55 njl Exp $"); #include "opt_acpi.h" #include @@ -155,7 +155,7 @@ /* No FUNCTION_TRACE - too noisy */ if (acpi_get_type(dev) == ACPI_TYPE_THERMAL && !acpi_disabled("thermal")) { - device_set_desc(dev, "thermal zone"); + device_set_desc(dev, "Thermal Zone"); result = -10; } else { result = ENXIO; ==== //depot/projects/uart/dev/adlink/adlink.c#5 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/adlink/adlink.c,v 1.5 2003/09/05 11:05:41 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/adlink/adlink.c,v 1.6 2003/09/27 12:00:58 phk Exp $"); #ifdef _KERNEL #include @@ -394,7 +394,6 @@ static struct cdevsw adlink_cdevsw = { .d_open = adlink_open, - .d_close = nullclose, .d_ioctl = adlink_ioctl, .d_mmap = adlink_mmap, .d_name = "adlink", ==== //depot/projects/uart/dev/asr/asr.c#5 (text+ko) ==== @@ -105,7 +105,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/asr/asr.c,v 1.37 2003/09/02 17:30:34 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/asr/asr.c,v 1.38 2003/09/26 15:56:42 phk Exp $"); #define ASR_VERSION 1 #define ASR_REVISION '0' @@ -590,48 +590,6 @@ IN struct timeval end); #endif -#ifdef ASR_VERY_BROKEN -/* - * Initialize the dynamic cdevsw hooks. - */ -STATIC void -asr_drvinit ( - void * unused) -{ - static int asr_devsw_installed = 0; - - if (asr_devsw_installed) { - return; - } - asr_devsw_installed++; - /* - * Find a free spot (the report during driver load used by - * osd layer in engine to generate the controlling nodes). - */ - while ((asr_cdevsw.d_maj < NUMCDEVSW) - && (devsw(makedev(asr_cdevsw.d_maj,0)) != (struct cdevsw *)NULL)) { - ++asr_cdevsw.d_maj; - } - if (asr_cdevsw.d_maj >= NUMCDEVSW) for ( - asr_cdevsw.d_maj = 0; - (asr_cdevsw.d_maj < CDEV_MAJOR) - && (devsw(makedev(asr_cdevsw.d_maj,0)) != (struct cdevsw *)NULL); - ++asr_cdevsw.d_maj); - /* - * Come to papa - */ - cdevsw_add(&asr_cdevsw); - /* - * delete any nodes that would attach to the primary adapter, - * let the adapter scans add them. - */ - destroy_dev(makedev(asr_cdevsw.d_maj,0)); -} /* asr_drvinit */ - -/* Must initialize before CAM layer picks up our HBA driver */ -SYSINIT(asrdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,asr_drvinit,NULL) -#endif - /* I2O support routines */ #define defAlignLong(STRUCT,NAME) char NAME[sizeof(STRUCT)] #define getAlignLong(STRUCT,NAME) ((STRUCT *)(NAME)) ==== //depot/projects/uart/dev/ata/ata-all.c#7 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.189 2003/09/08 08:30:43 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.190 2003/09/27 12:00:58 phk Exp $"); #include "opt_ata.h" #include @@ -57,8 +57,6 @@ /* device structures */ static d_ioctl_t ata_ioctl; static struct cdevsw ata_cdevsw = { - .d_open = nullopen, - .d_close = nullclose, .d_ioctl = ata_ioctl, .d_name = "ata", .d_maj = 159, ==== //depot/projects/uart/dev/digi/digi.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/digi/digi.c,v 1.35 2003/08/07 15:04:24 jhb Exp $ + * $FreeBSD: src/sys/dev/digi/digi.c,v 1.36 2003/09/26 09:05:57 phk Exp $ */ /*- @@ -1933,8 +1933,7 @@ digi_free_state(sc); - destroy_dev(makedev(CDEV_MAJOR, - (sc->res.unit << 16) | CTRL_DEV)); + destroy_dev(sc->res.ctldev); if (sc->res.mem != NULL) { bus_release_resource(dev, SYS_RES_MEMORY, sc->res.mrid, ==== //depot/projects/uart/dev/fb/fb.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/fb/fb.c,v 1.28 2003/08/24 17:46:06 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fb/fb.c,v 1.29 2003/09/26 10:41:43 phk Exp $"); #include "opt_fb.h" @@ -399,7 +399,7 @@ DECLARE_MODULE(fb, fb_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); int -fb_attach(dev_t dev, video_adapter_t *adp, struct cdevsw *cdevsw) +fb_attach(int unit, video_adapter_t *adp, struct cdevsw *cdevsw) { int s; @@ -409,7 +409,7 @@ return EINVAL; s = spltty(); - adp->va_minor = minor(dev); + adp->va_minor = unit; vidcdevsw[adp->va_index] = cdevsw; splx(s); @@ -418,7 +418,7 @@ } int -fb_detach(dev_t dev, video_adapter_t *adp, struct cdevsw *cdevsw) +fb_detach(int unit, video_adapter_t *adp, struct cdevsw *cdevsw) { int s; @@ -435,84 +435,6 @@ return 0; } -#if experimental -static int -fbopen(dev_t dev, int flag, int mode, struct thread *td) -{ - int unit; - - unit = FB_UNIT(dev); - if (unit >= adapters) - return ENXIO; - if (vidcdevsw[unit] == NULL) - return ENXIO; - return (*vidcdevsw[unit]->d_open)(makedev(0, adapter[unit]->va_minor), - flag, mode, td); -} - -static int -fbclose(dev_t dev, int flag, int mode, struct thread *td) -{ - int unit; - - unit = FB_UNIT(dev); - if (vidcdevsw[unit] == NULL) - return ENXIO; - return (*vidcdevsw[unit]->d_close)(makedev(0, adapter[unit]->va_minor), - flag, mode, td); -} - -static int -fbread(dev_t dev, struct uio *uio, int flag) -{ - int unit; - - unit = FB_UNIT(dev); - if (vidcdevsw[unit] == NULL) - return ENXIO; - return (*vidcdevsw[unit]->d_read)(makedev(0, adapter[unit]->va_minor), - uio, flag); -} - -static int -fbwrite(dev_t dev, struct uio *uio, int flag) -{ - int unit; - - unit = FB_UNIT(dev); - if (vidcdevsw[unit] == NULL) - return ENXIO; - return (*vidcdevsw[unit]->d_write)(makedev(0, adapter[unit]->va_minor), - uio, flag); -} - -static int -fbioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td) -{ - int unit; - - unit = FB_UNIT(dev); - if (vidcdevsw[unit] == NULL) - return ENXIO; - return (*vidcdevsw[unit]->d_ioctl)(makedev(0, adapter[unit]->va_minor), - cmd, arg, flag, td); -} - -static int -fbmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) -{ - int unit; - - unit = FB_UNIT(dev); - if (vidcdevsw[unit] == NULL) - return ENXIO; - return (*vidcdevsw[unit]->d_mmap)(makedev(0, adapter[unit]->va_minor), - offset, paddr, nprot); -} - -DEV_DRIVER_MODULE(fb, foo, fb_driver, fb_devclass, fb_cdevsw, 0, 0); -#endif - /* * Generic frame buffer cdev driver functions * Frame buffer subdrivers may call these functions to implement common ==== //depot/projects/uart/dev/fb/fbreg.h#3 (text+ko) ==== >>> TRUNCATED FOR MAIL (1000 lines) <<<